@websline/system-components 1.3.1 → 1.3.3
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.
- package/dist/components/atoms/actions/iconButton/IconButton.svelte +4 -4
- package/dist/components/atoms/actions/iconButton/IconButton.svelte.d.ts +4 -4
- package/dist/components/atoms/actions/iconButton/iconButton.variants.d.ts +0 -3
- package/dist/components/atoms/actions/iconButton/iconButton.variants.js +15 -11
- package/dist/components/atoms/icon/components/Info.svelte +33 -0
- package/dist/components/atoms/icon/components/Info.svelte.d.ts +41 -0
- package/dist/components/atoms/icon/index.d.ts +18 -0
- package/dist/components/atoms/icon/index.js +2 -0
- package/dist/components/molecules/richTextEditor/toolbar/ToolbarBold.svelte +2 -2
- package/dist/components/molecules/richTextEditor/toolbar/ToolbarItalic.svelte +2 -2
- package/dist/components/molecules/richTextEditor/toolbar/ToolbarLink.svelte +2 -2
- package/dist/components/molecules/richTextEditor/toolbar/ToolbarList.svelte +2 -2
- package/dist/components/molecules/richTextEditor/toolbar/ToolbarListOrdered.svelte +2 -2
- package/dist/components/molecules/richTextEditor/toolbar/ToolbarRedo.svelte +2 -2
- package/dist/components/molecules/richTextEditor/toolbar/ToolbarUnderline.svelte +2 -2
- package/dist/components/molecules/richTextEditor/toolbar/ToolbarUndo.svelte +2 -2
- package/dist/components/molecules/tagSelector/tagSelector.variants.js +1 -1
- package/package.json +3 -3
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @typedef {Object} Props
|
|
7
7
|
* @property {string} [as="button"] The HTML element to use for the button
|
|
8
8
|
* @property {string} [class=""] Additional CSS classes to apply to the component
|
|
9
|
-
* @property {"primary" | "secondary" | "success" | "danger"} [color="
|
|
9
|
+
* @property {"default" | "primary" | "secondary" | "success" | "danger" | "transparent"} [color="default"] Button color
|
|
10
10
|
* @property {boolean} [disabled=false] Whether the button is disabled
|
|
11
11
|
* @property {boolean} [loading=false] Whether the button is in a loading state, for example after a form submission
|
|
12
12
|
* @property {string} [icon=""] Icon name
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
* @property {"circle" | "square"} [shape="round"] Button shape
|
|
15
15
|
* @property {"small" | "medium" | "large"} [size="medium"] Button size
|
|
16
16
|
* @property {string} [type="button"] Button type, e.g. "button", "submit", "reset"
|
|
17
|
-
* @property {"filled" | "outlined"
|
|
17
|
+
* @property {"filled" | "outlined"} [variant="filled"] Button style
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
/** @type {Props} */
|
|
21
21
|
let {
|
|
22
22
|
as = "button",
|
|
23
23
|
class: className = "",
|
|
24
|
-
color = "
|
|
24
|
+
color = "default",
|
|
25
25
|
disabled = false,
|
|
26
26
|
icon = "",
|
|
27
27
|
iconSize,
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
{#if loading}
|
|
67
67
|
<Spinner size="small" />
|
|
68
68
|
{:else}
|
|
69
|
-
<Icon name={icon} size={iconSize > 0 ? iconSize :
|
|
69
|
+
<Icon name={icon} size={iconSize > 0 ? iconSize : size === "large" ? 24 : 16} />
|
|
70
70
|
{/if}
|
|
71
71
|
</svelte:element>
|
|
@@ -15,7 +15,7 @@ declare const IconButton: import("svelte").Component<{
|
|
|
15
15
|
/**
|
|
16
16
|
* Button color
|
|
17
17
|
*/
|
|
18
|
-
color?: "primary" | "secondary" | "success" | "danger";
|
|
18
|
+
color?: "default" | "primary" | "secondary" | "success" | "danger" | "transparent";
|
|
19
19
|
/**
|
|
20
20
|
* Whether the button is disabled
|
|
21
21
|
*/
|
|
@@ -47,7 +47,7 @@ declare const IconButton: import("svelte").Component<{
|
|
|
47
47
|
/**
|
|
48
48
|
* Button style
|
|
49
49
|
*/
|
|
50
|
-
variant?: "filled" | "outlined"
|
|
50
|
+
variant?: "filled" | "outlined";
|
|
51
51
|
}, {}, "">;
|
|
52
52
|
type Props = {
|
|
53
53
|
/**
|
|
@@ -61,7 +61,7 @@ type Props = {
|
|
|
61
61
|
/**
|
|
62
62
|
* Button color
|
|
63
63
|
*/
|
|
64
|
-
color?: "primary" | "secondary" | "success" | "danger";
|
|
64
|
+
color?: "default" | "primary" | "secondary" | "success" | "danger" | "transparent";
|
|
65
65
|
/**
|
|
66
66
|
* Whether the button is disabled
|
|
67
67
|
*/
|
|
@@ -93,5 +93,5 @@ type Props = {
|
|
|
93
93
|
/**
|
|
94
94
|
* Button style
|
|
95
95
|
*/
|
|
96
|
-
variant?: "filled" | "outlined"
|
|
96
|
+
variant?: "filled" | "outlined";
|
|
97
97
|
};
|
|
@@ -17,7 +17,6 @@ export const iconButtonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
17
17
|
variant: {
|
|
18
18
|
filled: string;
|
|
19
19
|
outlined: string;
|
|
20
|
-
transparent: string;
|
|
21
20
|
};
|
|
22
21
|
}, undefined, "inline-flex cursor-pointer transition duration-200 select-none", {
|
|
23
22
|
disabled: {
|
|
@@ -38,7 +37,6 @@ export const iconButtonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
38
37
|
variant: {
|
|
39
38
|
filled: string;
|
|
40
39
|
outlined: string;
|
|
41
|
-
transparent: string;
|
|
42
40
|
};
|
|
43
41
|
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
44
42
|
disabled: {
|
|
@@ -59,6 +57,5 @@ export const iconButtonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
59
57
|
variant: {
|
|
60
58
|
filled: string;
|
|
61
59
|
outlined: string;
|
|
62
|
-
transparent: string;
|
|
63
60
|
};
|
|
64
61
|
}, undefined, "inline-flex cursor-pointer transition duration-200 select-none", unknown, unknown, undefined>>;
|
|
@@ -21,10 +21,21 @@ const iconButtonVariants = tv({
|
|
|
21
21
|
variant: {
|
|
22
22
|
filled: "border border-transparent",
|
|
23
23
|
outlined: "border",
|
|
24
|
-
transparent: "border border-transparent",
|
|
25
24
|
},
|
|
26
25
|
},
|
|
27
26
|
compoundVariants: [
|
|
27
|
+
{
|
|
28
|
+
color: "default",
|
|
29
|
+
variant: "filled",
|
|
30
|
+
class:
|
|
31
|
+
"bg-neutral-100 text-neutral-900 hover:bg-neutral-300 dark:bg-neutral-900 dark:text-white dark:hover:bg-neutral-700",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
color: "default",
|
|
35
|
+
variant: "outlined",
|
|
36
|
+
class:
|
|
37
|
+
"text-neutral-900 hover:border-neutral-300 hover:bg-neutral-300 dark:border-white dark:text-white dark:hover:border-neutral-700 dark:hover:bg-neutral-700",
|
|
38
|
+
},
|
|
28
39
|
{
|
|
29
40
|
color: "primary",
|
|
30
41
|
variant: "filled",
|
|
@@ -47,7 +58,7 @@ const iconButtonVariants = tv({
|
|
|
47
58
|
color: "secondary",
|
|
48
59
|
variant: "outlined",
|
|
49
60
|
class:
|
|
50
|
-
"text-neutral-900 hover:border-neutral-900 hover:bg-neutral-900 hover:text-white dark:border-white dark:text-white dark:hover:border-neutral-200 dark:hover:bg-neutral-200 dark:hover:text-
|
|
61
|
+
"text-neutral-900 hover:border-neutral-900 hover:bg-neutral-900 hover:text-white dark:border-white dark:text-white dark:hover:border-neutral-200 dark:hover:bg-neutral-200 dark:hover:text-neutral-900",
|
|
51
62
|
},
|
|
52
63
|
{
|
|
53
64
|
color: "success",
|
|
@@ -74,16 +85,9 @@ const iconButtonVariants = tv({
|
|
|
74
85
|
"border-red-500 text-red-500 hover:border-red-700 hover:bg-red-700 hover:text-white dark:border-red-500 dark:text-red-500 dark:hover:border-red-700 dark:hover:bg-red-700",
|
|
75
86
|
},
|
|
76
87
|
{
|
|
77
|
-
|
|
78
|
-
variant: "transparent",
|
|
88
|
+
color: "transparent",
|
|
79
89
|
class:
|
|
80
|
-
"bg-transparent hover:bg-neutral-300 dark:text-white dark:hover:bg-neutral-700",
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
shape: "square",
|
|
84
|
-
variant: "filled",
|
|
85
|
-
class:
|
|
86
|
-
"bg-neutral-100 text-neutral-900 hover:bg-neutral-300 dark:bg-neutral-900 dark:text-white dark:hover:bg-neutral-700",
|
|
90
|
+
"border-transparent bg-transparent hover:bg-neutral-300 dark:text-white dark:hover:bg-neutral-700",
|
|
87
91
|
},
|
|
88
92
|
],
|
|
89
93
|
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
/**
|
|
3
|
+
* @typedef {Object} Props
|
|
4
|
+
* @property {string} [color=""] Icon color
|
|
5
|
+
* @property {number} [height=24] Icon height
|
|
6
|
+
* @property {number} [strokeWidth=24] Icon StrokeWidth
|
|
7
|
+
* @property {number} [width=24] Icon width
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/** @type {Props} */
|
|
11
|
+
let { color, height, width, strokeWidth, ...rest } = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<svg
|
|
15
|
+
{height}
|
|
16
|
+
{width}
|
|
17
|
+
viewBox="0 0 16 16"
|
|
18
|
+
fill="none"
|
|
19
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
20
|
+
{...rest}>
|
|
21
|
+
<path
|
|
22
|
+
d="M8 4.16663C8.18398 4.16663 8.33381 4.31569 8.33398 4.49963C8.33398 4.68372 8.18409 4.83362 8 4.83362C7.81606 4.83344 7.66699 4.68362 7.66699 4.49963C7.66717 4.3158 7.81617 4.1668 8 4.16663Z"
|
|
23
|
+
stroke={color}
|
|
24
|
+
stroke-width={strokeWidth}
|
|
25
|
+
stroke-linecap="round"
|
|
26
|
+
stroke-linejoin="round" />
|
|
27
|
+
<path
|
|
28
|
+
d="M8.16634 11.3334V6.66671H7.49967M6.99967 11.3334H9.33301M7.99967 14.6667C9.84061 14.6667 11.5073 13.9205 12.7137 12.7141C13.9201 11.5076 14.6663 9.84097 14.6663 8.00004C14.6663 6.15911 13.9201 4.49244 12.7137 3.28599C11.5073 2.07957 9.84061 1.33337 7.99967 1.33337C6.15874 1.33337 4.49207 2.07957 3.28563 3.28599C2.0792 4.49244 1.33301 6.15911 1.33301 8.00004C1.33301 9.84097 2.0792 11.5076 3.28563 12.7141C4.49207 13.9205 6.15874 14.6667 7.99967 14.6667Z"
|
|
29
|
+
stroke={color}
|
|
30
|
+
stroke-width={strokeWidth}
|
|
31
|
+
stroke-linecap="round"
|
|
32
|
+
stroke-linejoin="round" />
|
|
33
|
+
</svg>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export default Info;
|
|
2
|
+
type Info = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<Props>): void;
|
|
5
|
+
};
|
|
6
|
+
declare const Info: import("svelte").Component<{
|
|
7
|
+
/**
|
|
8
|
+
* Icon color
|
|
9
|
+
*/
|
|
10
|
+
color?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Icon height
|
|
13
|
+
*/
|
|
14
|
+
height?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Icon StrokeWidth
|
|
17
|
+
*/
|
|
18
|
+
strokeWidth?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Icon width
|
|
21
|
+
*/
|
|
22
|
+
width?: number;
|
|
23
|
+
}, {}, "">;
|
|
24
|
+
type Props = {
|
|
25
|
+
/**
|
|
26
|
+
* Icon color
|
|
27
|
+
*/
|
|
28
|
+
color?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Icon height
|
|
31
|
+
*/
|
|
32
|
+
height?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Icon StrokeWidth
|
|
35
|
+
*/
|
|
36
|
+
strokeWidth?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Icon width
|
|
39
|
+
*/
|
|
40
|
+
width?: number;
|
|
41
|
+
};
|
|
@@ -395,6 +395,24 @@ export const registry: {
|
|
|
395
395
|
*/
|
|
396
396
|
width?: number;
|
|
397
397
|
}, {}, "">;
|
|
398
|
+
info: import("svelte").Component<{
|
|
399
|
+
/**
|
|
400
|
+
* Icon color
|
|
401
|
+
*/
|
|
402
|
+
color?: string;
|
|
403
|
+
/**
|
|
404
|
+
* Icon height
|
|
405
|
+
*/
|
|
406
|
+
height?: number;
|
|
407
|
+
/**
|
|
408
|
+
* Icon StrokeWidth
|
|
409
|
+
*/
|
|
410
|
+
strokeWidth?: number;
|
|
411
|
+
/**
|
|
412
|
+
* Icon width
|
|
413
|
+
*/
|
|
414
|
+
width?: number;
|
|
415
|
+
}, {}, "">;
|
|
398
416
|
italic: import("svelte").Component<{
|
|
399
417
|
/**
|
|
400
418
|
* Icon color
|
|
@@ -20,6 +20,7 @@ import Dragger from "./components/Dragger.svelte";
|
|
|
20
20
|
import FilePDF from "./components/FilePDF.svelte";
|
|
21
21
|
import Globe from "./components/Globe.svelte";
|
|
22
22
|
import History from "./components/History.svelte";
|
|
23
|
+
import Info from "./components/Info.svelte";
|
|
23
24
|
import Italic from "./components/Italic.svelte";
|
|
24
25
|
import Layout from "./components/Layout.svelte";
|
|
25
26
|
import Link from "./components/Link.svelte";
|
|
@@ -64,6 +65,7 @@ export const registry = {
|
|
|
64
65
|
"file-pdf": FilePDF,
|
|
65
66
|
globe: Globe,
|
|
66
67
|
history: History,
|
|
68
|
+
info: Info,
|
|
67
69
|
italic: Italic,
|
|
68
70
|
layout: Layout,
|
|
69
71
|
link: Link,
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
{#if editor}
|
|
8
8
|
<IconButton
|
|
9
|
+
color={editor.isActive("bold") ? "default" : "transparent"}
|
|
9
10
|
icon="bold"
|
|
10
11
|
onclick={() => editor.chain().focus().toggleBold().run()}
|
|
11
|
-
shape="square"
|
|
12
|
-
variant={editor.isActive("bold") ? "filled" : "transparent"} />
|
|
12
|
+
shape="square" />
|
|
13
13
|
{/if}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
{#if editor}
|
|
8
8
|
<IconButton
|
|
9
|
+
color={editor.isActive("italic") ? "default" : "transparent"}
|
|
9
10
|
icon="italic"
|
|
10
11
|
onclick={() => editor.chain().focus().toggleItalic().run()}
|
|
11
|
-
shape="square"
|
|
12
|
-
variant={editor.isActive("italic") ? "filled" : "transparent"} />
|
|
12
|
+
shape="square" />
|
|
13
13
|
{/if}
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
|
|
28
28
|
{#if editor}
|
|
29
29
|
<IconButton
|
|
30
|
+
color={editor.isActive("link") ? "default" : "transparent"}
|
|
30
31
|
icon="link"
|
|
31
32
|
onclick={handleOpenLinkModal}
|
|
32
|
-
shape="square"
|
|
33
|
-
variant={editor.isActive("link") ? "filled" : "transparent"} />
|
|
33
|
+
shape="square" />
|
|
34
34
|
{/if}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
{#if editor}
|
|
8
8
|
<IconButton
|
|
9
|
+
color={editor.isActive("bulletList") ? "default" : "transparent"}
|
|
9
10
|
icon="listUnordered"
|
|
10
11
|
onclick={() => editor.chain().focus().toggleBulletList().run()}
|
|
11
|
-
shape="square"
|
|
12
|
-
variant={editor.isActive("bulletList") ? "filled" : "transparent"} />
|
|
12
|
+
shape="square" />
|
|
13
13
|
{/if}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
{#if editor}
|
|
8
8
|
<IconButton
|
|
9
|
+
color={editor.isActive("orderedList") ? "default" : "transparent"}
|
|
9
10
|
icon="listOrdered"
|
|
10
11
|
onclick={() => editor.chain().focus().toggleOrderedList().run()}
|
|
11
|
-
shape="square"
|
|
12
|
-
variant={editor.isActive("orderedList") ? "filled" : "transparent"} />
|
|
12
|
+
shape="square" />
|
|
13
13
|
{/if}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
{#if editor}
|
|
8
8
|
<IconButton
|
|
9
|
+
color={editor.isActive("underline") ? "default" : "transparent"}
|
|
9
10
|
icon="underline"
|
|
10
11
|
onclick={() => editor.chain().focus().toggleUnderline().run()}
|
|
11
|
-
shape="square"
|
|
12
|
-
variant={editor.isActive("underline") ? "filled" : "transparent"} />
|
|
12
|
+
shape="square" />
|
|
13
13
|
{/if}
|
|
@@ -8,7 +8,7 @@ const tagSelectorVariants = tv({
|
|
|
8
8
|
item: "h-7.5",
|
|
9
9
|
searchField: "relative h-7.5 w-30",
|
|
10
10
|
searchInput:
|
|
11
|
-
"absolute inset-0 appearance-none border-0 bg-transparent pr-1 pl-
|
|
11
|
+
"absolute inset-0 appearance-none border-0 bg-transparent pr-1 pl-7 ui-tag-badge placeholder-current focus:ring-0",
|
|
12
12
|
dropdown:
|
|
13
13
|
"absolute z-1 w-full max-w-100 overflow-y-auto bg-white p-1 pr-5 shadow-sm dark:border-neutral-700 dark:bg-neutral-800",
|
|
14
14
|
dropdownCheckmark: "ml-auto shrink-0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@websline/system-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"eslint-config-prettier": "^10.1.8",
|
|
63
63
|
"eslint-plugin-storybook": "^10.2.0",
|
|
64
64
|
"eslint-plugin-svelte": "^3.14.0",
|
|
65
|
-
"globals": "^17.
|
|
65
|
+
"globals": "^17.2.0",
|
|
66
66
|
"playwright": "^1.58.0",
|
|
67
67
|
"postcss-url": "^10.1.3",
|
|
68
68
|
"prettier": "^3.8.1",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
71
71
|
"publint": "^0.3.17",
|
|
72
72
|
"storybook": "^10.2.0",
|
|
73
|
-
"svelte": "^5.48.
|
|
73
|
+
"svelte": "^5.48.5",
|
|
74
74
|
"tailwindcss": "^4.1.18",
|
|
75
75
|
"typescript": "^5.9.3",
|
|
76
76
|
"vite": "^7.3.1",
|