@websline/system-components 0.0.6 → 1.0.1
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/button/Button.svelte +1 -1
- package/dist/components/atoms/actions/button/button.variants.js +10 -10
- package/dist/components/atoms/actions/closeButton/closeButton.variants.js +2 -2
- package/dist/components/atoms/actions/iconButton/iconButton.variants.js +8 -8
- package/dist/components/atoms/avatar/avatar.variants.js +3 -3
- package/dist/components/atoms/badge/badge.variants.js +4 -4
- package/dist/components/atoms/chip/chip.variants.d.ts +2 -2
- package/dist/components/atoms/chip/chip.variants.js +14 -14
- package/dist/components/atoms/colorChip/colorChip.variants.d.ts +3 -3
- package/dist/components/atoms/colorChip/colorChip.variants.js +9 -7
- package/dist/components/atoms/icon/Icon.svelte +1 -1
- package/dist/components/atoms/icon/components/Calendar.svelte +27 -0
- package/dist/components/atoms/icon/components/Calendar.svelte.d.ts +41 -0
- package/dist/components/atoms/icon/components/CheckboxStack.svelte +27 -0
- package/dist/components/atoms/icon/components/CheckboxStack.svelte.d.ts +41 -0
- package/dist/components/atoms/icon/components/Download.svelte +27 -0
- package/dist/components/atoms/icon/components/Download.svelte.d.ts +41 -0
- package/dist/components/atoms/icon/components/Dragger.svelte +6 -7
- package/dist/components/atoms/icon/components/FilePDF.svelte +53 -0
- package/dist/components/atoms/icon/components/FilePDF.svelte.d.ts +41 -0
- package/dist/components/atoms/icon/components/History.svelte +27 -0
- package/dist/components/atoms/icon/components/History.svelte.d.ts +41 -0
- package/dist/components/atoms/icon/components/Out.svelte +27 -0
- package/dist/components/atoms/icon/components/{Cogs.svelte.d.ts → Out.svelte.d.ts} +3 -3
- package/dist/components/atoms/icon/components/Overflow.svelte +28 -0
- package/dist/components/atoms/icon/components/Overflow.svelte.d.ts +41 -0
- package/dist/components/atoms/icon/components/Unlink.svelte +27 -0
- package/dist/components/atoms/icon/components/Unlink.svelte.d.ts +41 -0
- package/dist/components/atoms/icon/index.d.ts +686 -64
- package/dist/components/atoms/icon/index.js +16 -2
- package/dist/components/atoms/input/input.variants.d.ts +2 -2
- package/dist/components/atoms/input/input.variants.js +2 -2
- package/dist/components/atoms/select/select.variants.d.ts +9 -9
- package/dist/components/atoms/select/select.variants.js +25 -42
- package/dist/components/atoms/textarea/textarea.variants.d.ts +2 -2
- package/dist/components/atoms/textarea/textarea.variants.js +2 -2
- package/dist/components/molecules/formField/formField.variants.js +1 -1
- package/dist/components/molecules/notification/notification.variants.js +2 -2
- package/dist/components/molecules/pickers/colorSwatch/colorSwatch.variants.js +2 -2
- package/dist/components/molecules/richTextEditor/richTextEditor.variants.d.ts +3 -3
- package/dist/components/molecules/richTextEditor/richTextEditor.variants.js +14 -24
- package/dist/components/molecules/toggleGroup/toggleGroup.variants.d.ts +3 -3
- package/dist/components/molecules/toggleGroup/toggleGroup.variants.js +2 -2
- package/dist/components/molecules/toggleGroup/toggleGroupItem.variants.js +5 -5
- package/dist/components/organisms/dialog/dialog.variants.d.ts +3 -3
- package/dist/components/organisms/dialog/dialog.variants.js +5 -5
- package/dist/components/organisms/modal/modal.variants.js +1 -1
- package/dist/components/organisms/notificationGroup/notificationGroup.variants.js +2 -2
- package/dist/components/organisms/popover/PopoverContent.svelte +21 -17
- package/dist/components/organisms/popover/PopoverContent.svelte.d.ts +16 -8
- package/dist/components/organisms/popover/popover.variants.d.ts +20 -19
- package/dist/components/organisms/popover/popover.variants.js +11 -3
- package/package.json +23 -23
- package/dist/components/atoms/icon/components/Cogs.svelte +0 -31
|
@@ -3,16 +3,20 @@ import Add from "./components/Add.svelte";
|
|
|
3
3
|
import Attach from "./components/Attach.svelte";
|
|
4
4
|
import Block from "./components/Block.svelte";
|
|
5
5
|
import Bold from "./components/Bold.svelte";
|
|
6
|
+
import Calendar from "./components/Calendar.svelte";
|
|
6
7
|
import Check from "./components/Check.svelte";
|
|
8
|
+
import CheckboxStack from "./components/CheckboxStack.svelte";
|
|
7
9
|
import ChevronDown from "./components/ChevronDown.svelte";
|
|
8
10
|
import Close from "./components/Close.svelte";
|
|
9
11
|
import CloseSmall from "./components/CloseSmall.svelte";
|
|
10
|
-
import Cogs from "./components/Cogs.svelte";
|
|
11
12
|
import Controlling from "./components/Controlling.svelte";
|
|
12
13
|
import Dashboard from "./components/Dashboard.svelte";
|
|
13
14
|
import Database from "./components/Database.svelte";
|
|
15
|
+
import Download from "./components/Download.svelte";
|
|
14
16
|
import Dragger from "./components/Dragger.svelte";
|
|
17
|
+
import FilePDF from "./components/FilePDF.svelte";
|
|
15
18
|
import Globe from "./components/Globe.svelte";
|
|
19
|
+
import History from "./components/History.svelte";
|
|
16
20
|
import Italic from "./components/Italic.svelte";
|
|
17
21
|
import Layout from "./components/Layout.svelte";
|
|
18
22
|
import Link from "./components/Link.svelte";
|
|
@@ -20,6 +24,8 @@ import ListOrdered from "./components/ListOrdered.svelte";
|
|
|
20
24
|
import ListUnordered from "./components/ListUnordered.svelte";
|
|
21
25
|
import Menu from "./components/Menu.svelte";
|
|
22
26
|
import Notifications from "./components/Notifications.svelte";
|
|
27
|
+
import Out from "./components/Out.svelte";
|
|
28
|
+
import Overflow from "./components/Overflow.svelte";
|
|
23
29
|
import Page from "./components/Page.svelte";
|
|
24
30
|
import Picture from "./components/Picture.svelte";
|
|
25
31
|
import Redo from "./components/Redo.svelte";
|
|
@@ -29,6 +35,7 @@ import Settings from "./components/Settings.svelte";
|
|
|
29
35
|
import Trash from "./components/Trash.svelte";
|
|
30
36
|
import Underline from "./components/Underline.svelte";
|
|
31
37
|
import Undo from "./components/Undo.svelte";
|
|
38
|
+
import Unlink from "./components/Unlink.svelte";
|
|
32
39
|
|
|
33
40
|
export const registry = {
|
|
34
41
|
academy: Academy,
|
|
@@ -36,16 +43,20 @@ export const registry = {
|
|
|
36
43
|
attach: Attach,
|
|
37
44
|
block: Block,
|
|
38
45
|
bold: Bold,
|
|
46
|
+
calendar: Calendar,
|
|
39
47
|
check: Check,
|
|
48
|
+
"checkbox-stack": CheckboxStack,
|
|
40
49
|
chevronDown: ChevronDown,
|
|
41
50
|
close: Close,
|
|
42
51
|
closeSmall: CloseSmall,
|
|
43
|
-
cogs: Cogs,
|
|
44
52
|
controlling: Controlling,
|
|
45
53
|
dashboard: Dashboard,
|
|
46
54
|
database: Database,
|
|
55
|
+
download: Download,
|
|
47
56
|
dragger: Dragger,
|
|
57
|
+
"file-pdf": FilePDF,
|
|
48
58
|
globe: Globe,
|
|
59
|
+
history: History,
|
|
49
60
|
italic: Italic,
|
|
50
61
|
layout: Layout,
|
|
51
62
|
link: Link,
|
|
@@ -53,6 +64,8 @@ export const registry = {
|
|
|
53
64
|
listUnordered: ListUnordered,
|
|
54
65
|
menu: Menu,
|
|
55
66
|
notifications: Notifications,
|
|
67
|
+
out: Out,
|
|
68
|
+
overflow: Overflow,
|
|
56
69
|
page: Page,
|
|
57
70
|
picture: Picture,
|
|
58
71
|
redo: Redo,
|
|
@@ -62,4 +75,5 @@ export const registry = {
|
|
|
62
75
|
trash: Trash,
|
|
63
76
|
underline: Underline,
|
|
64
77
|
undo: Undo,
|
|
78
|
+
unlink: Unlink,
|
|
65
79
|
};
|
|
@@ -5,7 +5,7 @@ export const inputVariants: import("tailwind-variants").TVReturnType<{
|
|
|
5
5
|
error: {
|
|
6
6
|
true: string;
|
|
7
7
|
};
|
|
8
|
-
}, undefined, "
|
|
8
|
+
}, undefined, "transition-[border, outline] h-10 w-full rounded border border-neutral-500 bg-transparent px-4 body-default text-neutral-800 placeholder-neutral-500 outline-transparent duration-300 hover:border-neutral-800 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 dark:text-white dark:hover:border-neutral-200 dark:focus:border-white dark:focus:ring-white", {
|
|
9
9
|
disabled: {
|
|
10
10
|
true: string;
|
|
11
11
|
};
|
|
@@ -19,4 +19,4 @@ export const inputVariants: import("tailwind-variants").TVReturnType<{
|
|
|
19
19
|
error: {
|
|
20
20
|
true: string;
|
|
21
21
|
};
|
|
22
|
-
}, undefined, "
|
|
22
|
+
}, undefined, "transition-[border, outline] h-10 w-full rounded border border-neutral-500 bg-transparent px-4 body-default text-neutral-800 placeholder-neutral-500 outline-transparent duration-300 hover:border-neutral-800 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 dark:text-white dark:hover:border-neutral-200 dark:focus:border-white dark:focus:ring-white", unknown, unknown, undefined>>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { tv } from "tailwind-variants";
|
|
2
2
|
|
|
3
3
|
const inputVariants = tv({
|
|
4
|
-
base: "
|
|
4
|
+
base: "transition-[border, outline] h-10 w-full rounded border border-neutral-500 bg-transparent px-4 body-default text-neutral-800 placeholder-neutral-500 outline-transparent duration-300 hover:border-neutral-800 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 dark:text-white dark:hover:border-neutral-200 dark:focus:border-white dark:focus:ring-white",
|
|
5
5
|
variants: {
|
|
6
6
|
disabled: {
|
|
7
7
|
true: "cursor-not-allowed opacity-50",
|
|
8
8
|
},
|
|
9
9
|
error: {
|
|
10
|
-
true: "border border-red-500 outline
|
|
10
|
+
true: "border border-red-500 text-red-500 outline outline-red-500 focus:border-red-500 focus:ring-red-500",
|
|
11
11
|
},
|
|
12
12
|
},
|
|
13
13
|
});
|
|
@@ -6,7 +6,7 @@ export const selectVariants: import("tailwind-variants").TVReturnType<{
|
|
|
6
6
|
};
|
|
7
7
|
false: {
|
|
8
8
|
option: string;
|
|
9
|
-
select: string;
|
|
9
|
+
select: string[];
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
error: {
|
|
@@ -15,8 +15,8 @@ export const selectVariants: import("tailwind-variants").TVReturnType<{
|
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
}, {
|
|
18
|
-
select: string;
|
|
19
|
-
option: string;
|
|
18
|
+
select: string[];
|
|
19
|
+
option: string[];
|
|
20
20
|
}, undefined, {
|
|
21
21
|
disabled: {
|
|
22
22
|
true: {
|
|
@@ -25,7 +25,7 @@ export const selectVariants: import("tailwind-variants").TVReturnType<{
|
|
|
25
25
|
};
|
|
26
26
|
false: {
|
|
27
27
|
option: string;
|
|
28
|
-
select: string;
|
|
28
|
+
select: string[];
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
error: {
|
|
@@ -34,8 +34,8 @@ export const selectVariants: import("tailwind-variants").TVReturnType<{
|
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
}, {
|
|
37
|
-
select: string;
|
|
38
|
-
option: string;
|
|
37
|
+
select: string[];
|
|
38
|
+
option: string[];
|
|
39
39
|
}, import("tailwind-variants").TVReturnType<{
|
|
40
40
|
disabled: {
|
|
41
41
|
true: {
|
|
@@ -44,7 +44,7 @@ export const selectVariants: import("tailwind-variants").TVReturnType<{
|
|
|
44
44
|
};
|
|
45
45
|
false: {
|
|
46
46
|
option: string;
|
|
47
|
-
select: string;
|
|
47
|
+
select: string[];
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
50
|
error: {
|
|
@@ -53,6 +53,6 @@ export const selectVariants: import("tailwind-variants").TVReturnType<{
|
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
55
|
}, {
|
|
56
|
-
select: string;
|
|
57
|
-
option: string;
|
|
56
|
+
select: string[];
|
|
57
|
+
option: string[];
|
|
58
58
|
}, undefined, unknown, unknown, undefined>>;
|
|
@@ -2,44 +2,26 @@ import { tv } from "tailwind-variants";
|
|
|
2
2
|
|
|
3
3
|
const selectVariants = tv({
|
|
4
4
|
slots: {
|
|
5
|
-
select:
|
|
6
|
-
|
|
7
|
-
text-neutral-900 dark:text-neutral-200
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
[&::picker
|
|
12
|
-
[&::picker(select)]:
|
|
13
|
-
[&::
|
|
14
|
-
[&::
|
|
15
|
-
[
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
[&::
|
|
20
|
-
[&::
|
|
21
|
-
[&::
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
[&::after]:bg-current
|
|
26
|
-
[&::after]:content-[""]
|
|
27
|
-
[&:open::after]:rotate-180
|
|
28
|
-
`,
|
|
29
|
-
option: `
|
|
30
|
-
body-small p-2 rounded flex
|
|
31
|
-
[&::checkmark]:order-1
|
|
32
|
-
[&::checkmark]:shrink-0
|
|
33
|
-
[&::checkmark]:ml-auto
|
|
34
|
-
[&::checkmark]:content-[""]
|
|
35
|
-
[&::checkmark]:bg-no-repeat
|
|
36
|
-
[&::checkmark]:bg-center
|
|
37
|
-
[&::checkmark]:bg-size-[100%]
|
|
38
|
-
[&::checkmark]:size-4
|
|
39
|
-
[&::checkmark]:bg-current
|
|
40
|
-
bg-white dark:bg-neutral-800 text-neutral-900 dark:text-neutral-200
|
|
41
|
-
bg-linear-to-r to-transparent
|
|
42
|
-
`,
|
|
5
|
+
select: [
|
|
6
|
+
"flex min-h-10 w-full items-center rounded bg-transparent px-4 pr-2 body-default",
|
|
7
|
+
"text-neutral-900 dark:text-neutral-200",
|
|
8
|
+
"transition-[border, outline, color] outline-transparent duration-300",
|
|
9
|
+
"border border-neutral-500 bg-none",
|
|
10
|
+
"[&::picker(select)]:my-1 [&::picker(select)]:rounded [&::picker(select)]:border-0 [&::picker(select)]:p-1",
|
|
11
|
+
"[&::picker-icon]:hidden",
|
|
12
|
+
"[&::picker(select)]:bg-white [&::picker(select)]:shadow-sm dark:[&::picker(select)]:bg-neutral-800",
|
|
13
|
+
"[&::after]:bg-current [&::after]:bg-size-[100%] [&::after]:bg-center [&::after]:bg-no-repeat",
|
|
14
|
+
"[&::after]:ml-auto [&::after]:size-5 [&::after]:shrink-0 [&::after]:content-['']",
|
|
15
|
+
"[&:open::after]:rotate-180",
|
|
16
|
+
],
|
|
17
|
+
option: [
|
|
18
|
+
"flex rounded p-2 body-small",
|
|
19
|
+
"[&::checkmark]:order-1 [&::checkmark]:ml-auto [&::checkmark]:shrink-0",
|
|
20
|
+
"[&::checkmark]:bg-current [&::checkmark]:bg-size-[100%] [&::checkmark]:bg-center [&::checkmark]:bg-no-repeat",
|
|
21
|
+
"[&::checkmark]:size-4 [&::checkmark]:content-['']",
|
|
22
|
+
"bg-white text-neutral-900 dark:bg-neutral-800 dark:text-neutral-200",
|
|
23
|
+
"bg-linear-to-r to-transparent",
|
|
24
|
+
],
|
|
43
25
|
},
|
|
44
26
|
variants: {
|
|
45
27
|
disabled: {
|
|
@@ -50,14 +32,15 @@ const selectVariants = tv({
|
|
|
50
32
|
false: {
|
|
51
33
|
option:
|
|
52
34
|
"cursor-pointer hover:from-neutral-1000/30 dark:hover:from-neutral-50/30",
|
|
53
|
-
select:
|
|
54
|
-
hover:
|
|
55
|
-
|
|
35
|
+
select: [
|
|
36
|
+
"hover:border-current hover:ring-current focus:border-current focus:ring-current",
|
|
37
|
+
"hover:text-blue-500 hover:ring-1 focus:text-blue-500 focus:ring-1 dark:hover:text-blue-400 dark:focus:text-blue-400",
|
|
38
|
+
],
|
|
56
39
|
},
|
|
57
40
|
},
|
|
58
41
|
error: {
|
|
59
42
|
true: {
|
|
60
|
-
select: "
|
|
43
|
+
select: "border-red-500 text-red-500 dark:border-red-500 dark:text-red-500",
|
|
61
44
|
},
|
|
62
45
|
},
|
|
63
46
|
},
|
|
@@ -10,7 +10,7 @@ export const textareaVariants: import("tailwind-variants").TVReturnType<{
|
|
|
10
10
|
medium: string;
|
|
11
11
|
large: string;
|
|
12
12
|
};
|
|
13
|
-
}, undefined, "
|
|
13
|
+
}, undefined, "transition-[border, outline] w-full resize-none rounded border border-neutral-500 bg-transparent p-4 body-default text-neutral-800 placeholder-neutral-500 outline-transparent duration-300 hover:border-neutral-800 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 dark:text-white dark:hover:border-neutral-200 dark:focus:border-white dark:focus:ring-white", {
|
|
14
14
|
disabled: {
|
|
15
15
|
true: string;
|
|
16
16
|
};
|
|
@@ -34,4 +34,4 @@ export const textareaVariants: import("tailwind-variants").TVReturnType<{
|
|
|
34
34
|
medium: string;
|
|
35
35
|
large: string;
|
|
36
36
|
};
|
|
37
|
-
}, undefined, "
|
|
37
|
+
}, undefined, "transition-[border, outline] w-full resize-none rounded border border-neutral-500 bg-transparent p-4 body-default text-neutral-800 placeholder-neutral-500 outline-transparent duration-300 hover:border-neutral-800 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 dark:text-white dark:hover:border-neutral-200 dark:focus:border-white dark:focus:ring-white", unknown, unknown, undefined>>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { tv } from "tailwind-variants";
|
|
2
2
|
|
|
3
3
|
const textareaVariants = tv({
|
|
4
|
-
base: "
|
|
4
|
+
base: "transition-[border, outline] w-full resize-none rounded border border-neutral-500 bg-transparent p-4 body-default text-neutral-800 placeholder-neutral-500 outline-transparent duration-300 hover:border-neutral-800 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 dark:text-white dark:hover:border-neutral-200 dark:focus:border-white dark:focus:ring-white",
|
|
5
5
|
variants: {
|
|
6
6
|
disabled: {
|
|
7
7
|
true: "cursor-not-allowed opacity-50",
|
|
8
8
|
},
|
|
9
9
|
error: {
|
|
10
|
-
true: "border border-red-500 outline
|
|
10
|
+
true: "border border-red-500 text-red-500 outline outline-red-500 focus:border-red-500 focus:ring-red-500",
|
|
11
11
|
},
|
|
12
12
|
size: {
|
|
13
13
|
small: "h-30",
|
|
@@ -2,9 +2,9 @@ import { tv } from "tailwind-variants";
|
|
|
2
2
|
|
|
3
3
|
const notificationVariants = tv({
|
|
4
4
|
slots: {
|
|
5
|
-
base: "
|
|
5
|
+
base: "grid grid-cols-[40px_1fr_24px] gap-2 rounded-lg border-1 border-neutral-300 bg-white p-2 dark:border-neutral-700 dark:bg-neutral-900",
|
|
6
6
|
close: "col-[3] self-start",
|
|
7
|
-
icon: "flex h-10 items-center justify-center rounded-sm text-white
|
|
7
|
+
icon: "flex h-10 w-10 items-center justify-center rounded-sm text-white",
|
|
8
8
|
content: "flex flex-col justify-center",
|
|
9
9
|
message: "body-extra-small text-neutral-500",
|
|
10
10
|
title: "body-default dark:text-white",
|
|
@@ -2,8 +2,8 @@ import { tv } from "tailwind-variants";
|
|
|
2
2
|
|
|
3
3
|
const colorSwatchVariants = tv({
|
|
4
4
|
slots: {
|
|
5
|
-
base: "
|
|
6
|
-
iconText: "flex items-center justify-center
|
|
5
|
+
base: "flex cursor-pointer items-center justify-center gap-1 rounded transition duration-200 select-none hover:bg-neutral-300 dark:hover:bg-neutral-700",
|
|
6
|
+
iconText: "flex h-4 w-4 items-center justify-center rounded",
|
|
7
7
|
iconArrow: "dark:text-white",
|
|
8
8
|
},
|
|
9
9
|
variants: {
|
|
@@ -18,7 +18,7 @@ export const richTextEditorVariants: import("tailwind-variants").TVReturnType<{
|
|
|
18
18
|
}, {
|
|
19
19
|
base: string;
|
|
20
20
|
toolbar: string;
|
|
21
|
-
field: string;
|
|
21
|
+
field: string[];
|
|
22
22
|
}, undefined, {
|
|
23
23
|
hideToolbar: {
|
|
24
24
|
true: {
|
|
@@ -39,7 +39,7 @@ export const richTextEditorVariants: import("tailwind-variants").TVReturnType<{
|
|
|
39
39
|
}, {
|
|
40
40
|
base: string;
|
|
41
41
|
toolbar: string;
|
|
42
|
-
field: string;
|
|
42
|
+
field: string[];
|
|
43
43
|
}, import("tailwind-variants").TVReturnType<{
|
|
44
44
|
hideToolbar: {
|
|
45
45
|
true: {
|
|
@@ -60,5 +60,5 @@ export const richTextEditorVariants: import("tailwind-variants").TVReturnType<{
|
|
|
60
60
|
}, {
|
|
61
61
|
base: string;
|
|
62
62
|
toolbar: string;
|
|
63
|
-
field: string;
|
|
63
|
+
field: string[];
|
|
64
64
|
}, undefined, unknown, unknown, undefined>>;
|
|
@@ -4,30 +4,20 @@ const richTextEditorVariants = tv({
|
|
|
4
4
|
slots: {
|
|
5
5
|
base: "body-default text-neutral-800 dark:text-white",
|
|
6
6
|
toolbar:
|
|
7
|
-
"flex gap-0.5
|
|
8
|
-
field:
|
|
9
|
-
[&>div]:transition-[border]
|
|
10
|
-
[&>div]:
|
|
11
|
-
[&>div]:
|
|
12
|
-
[&>div]:
|
|
13
|
-
[&>div]:
|
|
14
|
-
|
|
15
|
-
[&>div]:
|
|
16
|
-
[&>div]:
|
|
17
|
-
[&>
|
|
18
|
-
[&>
|
|
19
|
-
[&>
|
|
20
|
-
|
|
21
|
-
[&>div>p.is-editor-empty:first-child::before]:h-0
|
|
22
|
-
[&>div>p.is-editor-empty:first-child::before]:text-neutral-500
|
|
23
|
-
[&>div>p.is-editor-empty:first-child::before]:pointer-events-none
|
|
24
|
-
[&>div_a]:underline
|
|
25
|
-
[&>div_a]:text-blue-500
|
|
26
|
-
[&>div_ol]:list-decimal
|
|
27
|
-
[&>div_ol]:pl-4
|
|
28
|
-
[&>div_ul]:list-disc
|
|
29
|
-
[&>div_ul]:pl-4
|
|
30
|
-
`,
|
|
7
|
+
"pointer flex gap-0.5 rounded-t-sm border border-b-0 border-neutral-300 px-5 py-2 dark:border-neutral-700",
|
|
8
|
+
field: [
|
|
9
|
+
"[&>div]:transition-[border] [&>div]:duration-300",
|
|
10
|
+
"[&>div]:rounded-b-sm [&>div]:border [&>div]:border-neutral-300 [&>div]:outline-none dark:[&>div]:border-neutral-700",
|
|
11
|
+
"[&>div]:h-full [&>div]:overflow-auto [&>div]:p-5",
|
|
12
|
+
"[&>div>p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]",
|
|
13
|
+
"[&>div>p.is-editor-empty:first-child::before]:float-left",
|
|
14
|
+
"[&>div>p.is-editor-empty:first-child::before]:h-0",
|
|
15
|
+
"[&>div>p.is-editor-empty:first-child::before]:text-neutral-500",
|
|
16
|
+
"[&>div>p.is-editor-empty:first-child::before]:pointer-events-none",
|
|
17
|
+
"[&>div_a]:text-blue-500 [&>div_a]:underline",
|
|
18
|
+
"[&>div_ol]:list-decimal [&>div_ol]:pl-4",
|
|
19
|
+
"[&>div_ul]:list-disc [&>div_ul]:pl-4",
|
|
20
|
+
],
|
|
31
21
|
},
|
|
32
22
|
variants: {
|
|
33
23
|
hideToolbar: {
|
|
@@ -7,7 +7,7 @@ export const toggleGroupVariants: import("tailwind-variants").TVReturnType<{
|
|
|
7
7
|
small: string;
|
|
8
8
|
medium: string;
|
|
9
9
|
};
|
|
10
|
-
}, undefined, "flex rounded-sm
|
|
10
|
+
}, undefined, "flex gap-1 rounded-sm", {
|
|
11
11
|
appearance: {
|
|
12
12
|
default: string;
|
|
13
13
|
raised: string;
|
|
@@ -25,11 +25,11 @@ export const toggleGroupVariants: import("tailwind-variants").TVReturnType<{
|
|
|
25
25
|
small: string;
|
|
26
26
|
medium: string;
|
|
27
27
|
};
|
|
28
|
-
}, undefined, "flex rounded-sm
|
|
28
|
+
}, undefined, "flex gap-1 rounded-sm", unknown, unknown, undefined>>;
|
|
29
29
|
export const toggleGroupTabVariants: import("tailwind-variants").TVReturnType<{} | {
|
|
30
30
|
[x: string]: {
|
|
31
31
|
[x: string]: import("tailwind-variants").ClassValue | {
|
|
32
32
|
base?: import("tailwind-variants").ClassValue;
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
}, undefined, "flex gap-5
|
|
35
|
+
}, undefined, "flex h-10 gap-5 border-b border-b-neutral-500", any, undefined, import("tailwind-variants").TVReturnType<any, undefined, "flex h-10 gap-5 border-b border-b-neutral-500", unknown, unknown, undefined>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { tv } from "tailwind-variants";
|
|
2
2
|
|
|
3
3
|
const toggleGroupVariants = tv({
|
|
4
|
-
base: "flex rounded-sm
|
|
4
|
+
base: "flex gap-1 rounded-sm",
|
|
5
5
|
variants: {
|
|
6
6
|
appearance: {
|
|
7
7
|
default: "bg-neutral-100 dark:bg-neutral-900",
|
|
@@ -15,7 +15,7 @@ const toggleGroupVariants = tv({
|
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
const toggleGroupTabVariants = tv({
|
|
18
|
-
base: "flex gap-5
|
|
18
|
+
base: "flex h-10 gap-5 border-b border-b-neutral-500",
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
export { toggleGroupVariants, toggleGroupTabVariants };
|
|
@@ -4,9 +4,9 @@ const toggleGroupItemVariants = tv({
|
|
|
4
4
|
slots: {
|
|
5
5
|
base: "relative h-full w-full whitespace-nowrap",
|
|
6
6
|
button:
|
|
7
|
-
"
|
|
7
|
+
"block h-full w-full cursor-pointer rounded-sm bg-transparent button-small transition-[background,color]",
|
|
8
8
|
span: "relative z-2 block",
|
|
9
|
-
trigger: "absolute inset-0 z-1 bg-white shadow-sm
|
|
9
|
+
trigger: "absolute inset-0 z-1 rounded-sm bg-white shadow-sm",
|
|
10
10
|
},
|
|
11
11
|
variants: {
|
|
12
12
|
isActive: {
|
|
@@ -48,11 +48,11 @@ const toggleGroupItemVariants = tv({
|
|
|
48
48
|
|
|
49
49
|
const toggleGroupItemTabVariants = tv({
|
|
50
50
|
slots: {
|
|
51
|
-
base: "relative h-full w-full whitespace-nowrap
|
|
52
|
-
button: "
|
|
51
|
+
base: "relative h-full w-full px-1 whitespace-nowrap",
|
|
52
|
+
button: "h-full w-full cursor-pointer button-default transition-[color]",
|
|
53
53
|
span: "block",
|
|
54
54
|
trigger:
|
|
55
|
-
"
|
|
55
|
+
"absolute -bottom-px left-0 h-0.5 w-full rounded-t-xs bg-blue-500 dark:bg-blue-400",
|
|
56
56
|
},
|
|
57
57
|
variants: {
|
|
58
58
|
isActive: {
|
|
@@ -25,7 +25,7 @@ export const dialogVariants: import("tailwind-variants").TVReturnType<{
|
|
|
25
25
|
overlay: string;
|
|
26
26
|
positioner: string;
|
|
27
27
|
trigger: string;
|
|
28
|
-
formActions: string;
|
|
28
|
+
formActions: string[];
|
|
29
29
|
}, undefined, {
|
|
30
30
|
size: {
|
|
31
31
|
sm: {
|
|
@@ -53,7 +53,7 @@ export const dialogVariants: import("tailwind-variants").TVReturnType<{
|
|
|
53
53
|
overlay: string;
|
|
54
54
|
positioner: string;
|
|
55
55
|
trigger: string;
|
|
56
|
-
formActions: string;
|
|
56
|
+
formActions: string[];
|
|
57
57
|
}, import("tailwind-variants").TVReturnType<{
|
|
58
58
|
size: {
|
|
59
59
|
sm: {
|
|
@@ -81,5 +81,5 @@ export const dialogVariants: import("tailwind-variants").TVReturnType<{
|
|
|
81
81
|
overlay: string;
|
|
82
82
|
positioner: string;
|
|
83
83
|
trigger: string;
|
|
84
|
-
formActions: string;
|
|
84
|
+
formActions: string[];
|
|
85
85
|
}, undefined, unknown, unknown, undefined>>;
|
|
@@ -9,11 +9,11 @@ const dialogVariants = tv({
|
|
|
9
9
|
positioner:
|
|
10
10
|
"fixed inset-0 z-1 grid items-center justify-items-center overflow-auto",
|
|
11
11
|
trigger: "cursor-pointer",
|
|
12
|
-
formActions:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
formActions: [
|
|
13
|
+
"[&>[data-role=dismiss]]:order-1 [&>[data-role=dismiss]]:mr-auto",
|
|
14
|
+
"[&>[data-role=secondary]]:order-2",
|
|
15
|
+
"[&>[data-role=cta]]:order-3",
|
|
16
|
+
],
|
|
17
17
|
},
|
|
18
18
|
variants: {
|
|
19
19
|
size: {
|
|
@@ -4,7 +4,7 @@ const modalVariants = tv({
|
|
|
4
4
|
slots: {
|
|
5
5
|
close: "ml-auto",
|
|
6
6
|
container:
|
|
7
|
-
"my-4 w-[calc(100vw-32px)] min-w-xs overflow-hidden rounded-2xl bg-white leading-[1.486] shadow-sm dark:bg-neutral-800 dark:text-neutral-200
|
|
7
|
+
"my-4 grid max-h-[calc(100vh-32px)] w-[calc(100vw-32px)] min-w-xs grid-rows-[auto_1fr] overflow-hidden rounded-2xl bg-white leading-[1.486] shadow-sm dark:bg-neutral-800 dark:text-neutral-200",
|
|
8
8
|
header: "flex items-start border-b border-neutral-300 px-4 py-3",
|
|
9
9
|
body: "h-full overflow-auto",
|
|
10
10
|
overlay: "fixed inset-0 bg-black/25",
|
|
@@ -2,9 +2,9 @@ import { tv } from "tailwind-variants";
|
|
|
2
2
|
|
|
3
3
|
const notificationGroupVariants = tv({
|
|
4
4
|
slots: {
|
|
5
|
-
bottomLeft: "
|
|
5
|
+
bottomLeft: "absolute bottom-4 left-4 z-9999 flex flex-col gap-2 overflow-hidden",
|
|
6
6
|
bottomRight:
|
|
7
|
-
"
|
|
7
|
+
"absolute right-4 bottom-4 z-9999 flex flex-col gap-2 overflow-hidden",
|
|
8
8
|
},
|
|
9
9
|
});
|
|
10
10
|
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @typedef {Object} Props
|
|
10
|
-
* @property {import('svelte').Snippet} [children] Children content – can be text, HTML, or other Svelte components
|
|
11
10
|
* @property {"start" | "center" | "end"} [align="center"] The preferred alignment of the anchor to render the floating element against when open. This may change when collisions occur.
|
|
12
11
|
* @property {number} [alignOffset=0] The distance in pixels from the anchor to the floating element.
|
|
12
|
+
* @property {import('svelte').Snippet} [children] Children content – can be text, HTML, or other Svelte components
|
|
13
|
+
* @property {string} [class=""] Additional CSS classes for the content
|
|
13
14
|
* @property {boolean} [preventScroll=false] When true, prevents the body from scrolling when the content is open. This is useful when you want to use the content as a modal.
|
|
14
15
|
* @property {boolean} [portalDisabled=false] Whether the portal is disabled or not. When disabled, the content will be rendered in its original DOM location.
|
|
15
16
|
* @property {string} [portalTarget='body'] Where to render the content when it is open. Defaults to the body.
|
|
@@ -24,6 +25,8 @@
|
|
|
24
25
|
align = "center",
|
|
25
26
|
alignOffset = 0,
|
|
26
27
|
children,
|
|
28
|
+
class: className = "",
|
|
29
|
+
noPadding = false,
|
|
27
30
|
preventScroll = false,
|
|
28
31
|
portalDisabled = false,
|
|
29
32
|
portalTarget = "body",
|
|
@@ -34,7 +37,7 @@
|
|
|
34
37
|
...rest
|
|
35
38
|
} = $props();
|
|
36
39
|
|
|
37
|
-
let styles = $derived(popoverVariants());
|
|
40
|
+
let styles = $derived(popoverVariants({ noPadding }));
|
|
38
41
|
|
|
39
42
|
let showHeader = $derived(showClose === true || title !== "");
|
|
40
43
|
</script>
|
|
@@ -58,27 +61,28 @@
|
|
|
58
61
|
{/if}
|
|
59
62
|
{/snippet}
|
|
60
63
|
|
|
64
|
+
{#snippet child({ open, props, wrapperProps })}
|
|
65
|
+
{#if open}
|
|
66
|
+
<div {...wrapperProps}>
|
|
67
|
+
<div {...props} in:scale={{ duration: 300, easing: quintOut, start: 0.75 }}>
|
|
68
|
+
<div class={styles.body()}>
|
|
69
|
+
{@render children()}
|
|
70
|
+
</div>
|
|
71
|
+
{@render header()}
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
{/if}
|
|
75
|
+
{/snippet}
|
|
76
|
+
|
|
61
77
|
<Popover.Portal disabled={portalDisabled} to={portalTarget}>
|
|
62
78
|
<Popover.Content
|
|
63
79
|
{align}
|
|
64
80
|
{alignOffset}
|
|
65
|
-
|
|
81
|
+
{child}
|
|
82
|
+
class={styles.content({ class: className })}
|
|
66
83
|
forceMount
|
|
67
84
|
{preventScroll}
|
|
68
85
|
{side}
|
|
69
86
|
{sideOffset}
|
|
70
|
-
{...rest}
|
|
71
|
-
{#snippet child({ wrapperProps, props, open })}
|
|
72
|
-
{#if open}
|
|
73
|
-
<div {...wrapperProps}>
|
|
74
|
-
<div {...props} in:scale={{ duration: 300, easing: quintOut, start: 0.75 }}>
|
|
75
|
-
<div class={styles.body()}>
|
|
76
|
-
{@render children()}
|
|
77
|
-
</div>
|
|
78
|
-
{@render header()}
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
{/if}
|
|
82
|
-
{/snippet}
|
|
83
|
-
</Popover.Content>
|
|
87
|
+
{...rest} />
|
|
84
88
|
</Popover.Portal>
|