Skip to content

Commit 253a317

Browse files
authored
Merge pull request #248 from silinternational/develop
Release 11.0.0
2 parents 5956823 + 2e6e769 commit 253a317

File tree

12 files changed

+20371
-33871
lines changed

12 files changed

+20371
-33871
lines changed

.github/workflows/deepfactor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ jobs:
1111
DF_RUN_TOKEN: ${{ secrets.DF_RUN_TOKEN }}
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v4
1515
- name: Scan with Deepfactor
1616
run: dfctl scan -s fs -a ${{ github.event.repository.name }} -c ${{ github.event.repository.name }} -V ${{ github.ref_name }} .

.github/workflows/gh-pages.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ jobs:
99
deploy:
1010
runs-on: ubuntu-22.04
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
1313

1414
- name: Setup Node
15-
uses: actions/setup-node@v2
15+
uses: actions/setup-node@v4
1616
with:
1717
node-version: '18'
1818

1919
- name: Cache dependencies
20-
uses: actions/cache@v2
20+
uses: actions/cache@v4
2121
with:
2222
path: ~/.npm
2323
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
runs-on: ubuntu-22.04
1010
steps:
1111
- name: Checkout
12-
uses: actions/checkout@v1
12+
uses: actions/checkout@v4
1313
- name: Setup Node.js
14-
uses: actions/setup-node@v1
14+
uses: actions/setup-node@v4
1515
with:
1616
node-version: 18
1717
- name: Install dependencies

.storybook/main.js

Lines changed: 16 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,26 @@
1-
const path = require('path')
2-
3-
module.exports = {
4-
"stories": [
1+
/** @type { import('@storybook/svelte-vite').StorybookConfig } */
2+
const config = {
3+
stories: [
54
"../**/*.stories.mdx",
65
"../**/*.stories.@(js|jsx|ts|tsx|svelte)"
76
],
8-
"addons": [
7+
addons: [
98
"@storybook/addon-links",
109
"@storybook/addon-essentials",
10+
"@storybook/addon-interactions",
1111
"@storybook/addon-svelte-csf",
1212
"@storybook/preset-scss",
13-
"@storybook/addon-postcss"
13+
"@storybook/addon-mdx-gfm",
1414
],
15-
"svelteOptions": {
16-
"emitCss": true,
17-
"preprocess": require("svelte-preprocess")()
18-
},
19-
"core": {
20-
"builder": "webpack5"
21-
},
22-
babel: async (options) => {
23-
options.presets[0][1].loose = true
24-
return options
25-
},
26-
webpackFinal: async (config, { configType }) => {
27-
// `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION'
28-
// You can change the configuration based on that.
29-
// 'PRODUCTION' is used when building the static version of storybook.
30-
31-
// Make whatever fine-grained changes you need
32-
config.resolve.fallback.crypto = false;
33-
config.resolve.alias.svelte = path.resolve('node_modules', 'svelte')
34-
35-
// config.module.rules[0].use[0].options.presets[0][1].loose = true
36-
// console.log('!!!!!!!!!!!!', JSON.stringify(config.module.rules[0].use[0].options, null, 4))
37-
// = [
38-
// '@babel/plugin-proposal-class-properties',
39-
// { loose: true }
40-
// ]
4115

42-
return config;
16+
framework: {
17+
name: '@storybook/svelte-vite',
18+
options: {
19+
emitCss: true,
20+
},
21+
},
22+
docs: {
23+
autodocs: true,
4324
},
44-
}
25+
}
26+
export default config

.storybook/preview.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '!style-loader!css-loader!../components/global.css'
1+
import '../components/global.css'
22

33
export const parameters = {
44
actions: { argTypesRegex: "^on[A-Z].*" },
@@ -16,8 +16,7 @@ loadIcons()
1616
function loadIcons() {
1717
const link = document.createElement('link')
1818

19-
link.href = 'https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet'
19+
link.href = 'https://fonts.googleapis.com/css?family=Material+Icons&display=block'
2020
link.rel = 'stylesheet'
21-
2221
document.head.appendChild(link)
23-
}
22+
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Reusable Svelte components for some internal applications
44

55
## installation
66

7-
To install to your Svelte project, open your project's root directory in a terminal. Type or paste `npm i -D @silintl/ui-components` and press enter. Sass (depending on your bundler and plugins) and material-components-web are required to develop additional material web components in your app, but it may depend on your version of npm if they are necessary even if you don't (I haven't figured out which versions require them). Enter the commands `npm i -D material-components-web@14` and `npm i -D sass@1` (versions will vary if you use an older release of this library). You should already have svelte@3 installed if you are using this library.
7+
To install to your Svelte project, open your project's root directory in a terminal. Type or paste `npm i -D @silintl/ui-components` and press enter. Sass (depending on your bundler and plugins) and material-components-web are required to develop additional material web components in your app, but it may depend on your version of npm if they are necessary even if you don't (I haven't figured out which versions require them). Enter the commands `npm i -D material-components-web@14` and `npm i -D sass@1` (versions will vary if you use an older release of this library). You should already have svelte@4 installed if you are using this library.
88

99
If you are using typescript you will need to run `npm i -D tslib` to avoid a material-components-web type error. This will already be installed if you have set up SvelteKit with typescript using `npm create svelte@latest app-name`.
1010

@@ -69,7 +69,7 @@ and then import it to your sass entry point like \_index.scss. You may prefer to
6969

7070
SvelteKit won't need a bundler as it uses Vite, but Svelte projects will need a bundler (rollup or webpack most likely) configuration. If you are using rollup your plugins in your "rollup.config.js" should look something like this taking special note of postcss and svelte:
7171

72-
```
72+
```js
7373
import postcss from 'rollup-plugin-postcss';
7474
import autoPreprocess from 'svelte-preprocess';
7575

0 commit comments

Comments
 (0)