@websline/system-components 1.3.6 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,28 +1,34 @@
|
|
|
1
|
+
// paths within the components folder are imported as component names automatically
|
|
2
|
+
// e.g. ./components/subDir/testIcon.svelte -> subDirTestIcon
|
|
3
|
+
// Check the icon story in Storybook to easily extract the icon name
|
|
4
|
+
// NOTE: this doesn't return anything outside of this package, so a custom import is required in the consuming project
|
|
1
5
|
const moduleRegistry = import.meta.glob("./**/*.svelte", {
|
|
2
6
|
eager: true,
|
|
3
7
|
base: "./components",
|
|
4
8
|
import: "default",
|
|
5
9
|
});
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
);
|
|
11
|
+
const registry = {};
|
|
12
|
+
|
|
13
|
+
const addIconsToRegistry = (pathModuleRecord) => {
|
|
14
|
+
const map = Object.fromEntries(
|
|
15
|
+
Object.entries(pathModuleRecord).map(([path, module]) => {
|
|
16
|
+
const name = path
|
|
17
|
+
// remove extension
|
|
18
|
+
.replace(/\.[^/.]+$/, "")
|
|
19
|
+
// squash any non-alphanumeric into single hyphen (handles underscores)
|
|
20
|
+
.replace(/[^a-zA-Z0-9]+/g, "-")
|
|
21
|
+
// replace "-" w/ uppercase of the following letter
|
|
22
|
+
.replace(/-([a-z])/g, (m, p1) => p1.toUpperCase())
|
|
23
|
+
// remove remaining "-"
|
|
24
|
+
.replaceAll("-", "")
|
|
25
|
+
// first letter lowercase
|
|
26
|
+
.replace(/^([A-Z])/, (m, p1) => p1.toLowerCase());
|
|
27
|
+
return [name, module];
|
|
28
|
+
}),
|
|
29
|
+
);
|
|
30
|
+
Object.assign(registry, map);
|
|
31
|
+
};
|
|
26
32
|
|
|
27
33
|
// e.g. for backwards compatibility
|
|
28
34
|
const synonyms = {
|
|
@@ -31,6 +37,8 @@ const synonyms = {
|
|
|
31
37
|
unlink: "connectCrossed",
|
|
32
38
|
};
|
|
33
39
|
|
|
40
|
+
addIconsToRegistry(moduleRegistry);
|
|
41
|
+
|
|
34
42
|
// attach synonyms to registry, with error handling for duplicates
|
|
35
43
|
Object.entries(synonyms).map(([k, v]) => {
|
|
36
44
|
if (registry[k]) {
|
|
@@ -42,4 +50,4 @@ Object.entries(synonyms).map(([k, v]) => {
|
|
|
42
50
|
registry[k] = registry[v];
|
|
43
51
|
});
|
|
44
52
|
|
|
45
|
-
export { registry, synonyms };
|
|
53
|
+
export { addIconsToRegistry, registry, synonyms };
|
|
@@ -12,7 +12,7 @@ const tagVariants = tv({
|
|
|
12
12
|
end: "flex-row-reverse",
|
|
13
13
|
},
|
|
14
14
|
selected: {
|
|
15
|
-
true: "border-neutral-900 bg-neutral-900 text-neutral-100 dark:border-blue-400 dark
|
|
15
|
+
true: "border-neutral-900 !bg-neutral-900 text-neutral-100 dark:border-blue-400 dark:!bg-blue-400",
|
|
16
16
|
},
|
|
17
17
|
shape: {
|
|
18
18
|
round: "rounded-sm",
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export { default as Chip } from "./components/atoms/chip/Chip.svelte";
|
|
|
8
8
|
export { default as CloseButton } from "./components/atoms/actions/closeButton/CloseButton.svelte";
|
|
9
9
|
export { default as ColorChip } from "./components/atoms/colorChip/ColorChip.svelte";
|
|
10
10
|
export { default as HelperText } from "./components/atoms/helperText/HelperText.svelte";
|
|
11
|
+
export { addIconsToRegistry } from "./components/atoms/icon/index.js";
|
|
11
12
|
export { default as Icon } from "./components/atoms/icon/Icon.svelte";
|
|
12
13
|
export { default as IconButton } from "./components/atoms/actions/iconButton/IconButton.svelte";
|
|
13
14
|
export { default as Input } from "./components/atoms/input/Input.svelte";
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,7 @@ export { default as Chip } from "./components/atoms/chip/Chip.svelte";
|
|
|
13
13
|
export { default as CloseButton } from "./components/atoms/actions/closeButton/CloseButton.svelte";
|
|
14
14
|
export { default as ColorChip } from "./components/atoms/colorChip/ColorChip.svelte";
|
|
15
15
|
export { default as HelperText } from "./components/atoms/helperText/HelperText.svelte";
|
|
16
|
+
export { addIconsToRegistry } from "./components/atoms/icon/index.js";
|
|
16
17
|
export { default as Icon } from "./components/atoms/icon/Icon.svelte";
|
|
17
18
|
export { default as IconButton } from "./components/atoms/actions/iconButton/IconButton.svelte";
|
|
18
19
|
export { default as Input } from "./components/atoms/input/Input.svelte";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@websline/system-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@tiptap/core": "^3.
|
|
30
|
-
"@tiptap/extension-color": "^3.
|
|
31
|
-
"@tiptap/extension-highlight": "^3.
|
|
32
|
-
"@tiptap/extension-placeholder": "^3.
|
|
33
|
-
"@tiptap/extension-text-align": "^3.
|
|
34
|
-
"@tiptap/extension-text-style": "^3.
|
|
35
|
-
"@tiptap/pm": "^3.
|
|
36
|
-
"@tiptap/starter-kit": "^3.
|
|
37
|
-
"bits-ui": "^2.
|
|
29
|
+
"@tiptap/core": "^3.20.0",
|
|
30
|
+
"@tiptap/extension-color": "^3.20.0",
|
|
31
|
+
"@tiptap/extension-highlight": "^3.20.0",
|
|
32
|
+
"@tiptap/extension-placeholder": "^3.20.0",
|
|
33
|
+
"@tiptap/extension-text-align": "^3.20.0",
|
|
34
|
+
"@tiptap/extension-text-style": "^3.20.0",
|
|
35
|
+
"@tiptap/pm": "^3.20.0",
|
|
36
|
+
"@tiptap/starter-kit": "^3.20.0",
|
|
37
|
+
"bits-ui": "^2.16.2",
|
|
38
38
|
"dompurify": "^3.3.1",
|
|
39
39
|
"tailwind-variants": "^3.2.2",
|
|
40
40
|
"uuid": "^13.0.0"
|
|
@@ -44,34 +44,34 @@
|
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@eslint/compat": "^2.0.2",
|
|
47
|
-
"@eslint/js": "^9.39.
|
|
48
|
-
"@storybook/addon-a11y": "^10.2.
|
|
49
|
-
"@storybook/addon-docs": "^10.2.
|
|
50
|
-
"@storybook/addon-svelte-csf": "^5.0.
|
|
51
|
-
"@storybook/sveltekit": "^10.2.
|
|
52
|
-
"@sveltejs/adapter-auto": "^7.0.
|
|
53
|
-
"@sveltejs/kit": "^2.
|
|
47
|
+
"@eslint/js": "^9.39.3",
|
|
48
|
+
"@storybook/addon-a11y": "^10.2.13",
|
|
49
|
+
"@storybook/addon-docs": "^10.2.13",
|
|
50
|
+
"@storybook/addon-svelte-csf": "^5.0.11",
|
|
51
|
+
"@storybook/sveltekit": "^10.2.13",
|
|
52
|
+
"@sveltejs/adapter-auto": "^7.0.1",
|
|
53
|
+
"@sveltejs/kit": "^2.53.3",
|
|
54
54
|
"@sveltejs/package": "^2.5.7",
|
|
55
55
|
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
|
56
56
|
"@tailwindcss/forms": "^0.5.11",
|
|
57
57
|
"@tailwindcss/typography": "^0.5.19",
|
|
58
|
-
"@tailwindcss/vite": "^4.1
|
|
59
|
-
"@types/node": "^25.
|
|
58
|
+
"@tailwindcss/vite": "^4.2.1",
|
|
59
|
+
"@types/node": "^25.3.2",
|
|
60
60
|
"@vitest/browser": "^4.0.18",
|
|
61
|
-
"eslint": "^9.39.
|
|
61
|
+
"eslint": "^9.39.3",
|
|
62
62
|
"eslint-config-prettier": "^10.1.8",
|
|
63
|
-
"eslint-plugin-storybook": "^10.2.
|
|
64
|
-
"eslint-plugin-svelte": "^3.
|
|
63
|
+
"eslint-plugin-storybook": "^10.2.13",
|
|
64
|
+
"eslint-plugin-svelte": "^3.15.0",
|
|
65
65
|
"globals": "^17.3.0",
|
|
66
66
|
"playwright": "^1.58.2",
|
|
67
67
|
"postcss-url": "^10.1.3",
|
|
68
68
|
"prettier": "^3.8.1",
|
|
69
|
-
"prettier-plugin-svelte": "^3.
|
|
69
|
+
"prettier-plugin-svelte": "^3.5.0",
|
|
70
70
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
71
71
|
"publint": "^0.3.17",
|
|
72
|
-
"storybook": "^10.2.
|
|
73
|
-
"svelte": "^5.
|
|
74
|
-
"tailwindcss": "^4.1
|
|
72
|
+
"storybook": "^10.2.13",
|
|
73
|
+
"svelte": "^5.53.5",
|
|
74
|
+
"tailwindcss": "^4.2.1",
|
|
75
75
|
"typescript": "^5.9.3",
|
|
76
76
|
"vite": "^7.3.1",
|
|
77
77
|
"vitest": "^4.0.18",
|