@opencode-ai/ui 0.0.0-dev-202609050337 → 0.0.0-dev-19145
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/actions/button/button.d.ts +10 -0
- package/dist/actions/icon-button/icon-button.d.ts +11 -0
- package/dist/actions/split-button/split-button.d.ts +5 -0
- package/dist/components/card.d.ts +1 -1
- package/dist/components/list.d.ts +1 -1
- package/dist/components/scroll-view.d.ts +3 -3
- package/dist/context/i18n.d.ts +10 -7
- package/dist/context/marked-base.d.ts +3 -0
- package/dist/context/marked-parser.d.ts +1 -2
- package/dist/{components → data-display/accordion}/accordion.d.ts +6 -6
- package/dist/{v2/components/avatar-v2.d.ts → data-display/avatar/avatar.d.ts} +1 -1
- package/dist/data-display/badge/badge.d.ts +7 -0
- package/dist/{components → data-display/diff-changes}/diff-changes.d.ts +2 -1
- package/dist/data-display/keybind/keybind.d.ts +7 -0
- package/dist/{v2/components/line-comment-v2.d.ts → data-display/line-comment/line-comment.d.ts} +9 -9
- package/dist/{v2/components/project-avatar-v2.d.ts → data-display/project-avatar/project-avatar.d.ts} +1 -1
- package/dist/feedback/loader/loader.d.ts +3 -0
- package/dist/{components → feedback/progress-circle}/progress-circle.d.ts +2 -0
- package/dist/feedback/toast/toast.d.ts +57 -0
- package/dist/{components → forms/checkbox}/checkbox.d.ts +2 -2
- package/dist/{v2/components/field-v2.d.ts → forms/field/field.d.ts} +4 -10
- package/dist/forms/radio/radio.d.ts +16 -0
- package/dist/{v2/components/select-v2.d.ts → forms/select/select.d.ts} +4 -6
- package/dist/{components → forms/switch}/switch.d.ts +4 -2
- package/dist/{v2/components/text-input-v2.d.ts → forms/text-input/text-input.d.ts} +3 -3
- package/dist/forms/textarea/textarea.d.ts +7 -0
- package/dist/hooks/use-filtered-list.d.ts +9 -0
- package/dist/i18n/ar.d.ts +0 -2
- package/dist/i18n/bg.d.ts +0 -2
- package/dist/i18n/br.d.ts +0 -2
- package/dist/i18n/bs.d.ts +0 -2
- package/dist/i18n/da.d.ts +0 -2
- package/dist/i18n/de.d.ts +0 -2
- package/dist/i18n/en.d.ts +242 -1
- package/dist/i18n/es.d.ts +0 -2
- package/dist/i18n/fr.d.ts +0 -2
- package/dist/i18n/he.d.ts +197 -0
- package/dist/i18n/ja.d.ts +0 -2
- package/dist/i18n/km.d.ts +0 -2
- package/dist/i18n/ko.d.ts +0 -2
- package/dist/i18n/lo.d.ts +0 -2
- package/dist/i18n/mk.d.ts +0 -2
- package/dist/i18n/mn.d.ts +0 -2
- package/dist/i18n/my.d.ts +0 -2
- package/dist/i18n/pl.d.ts +0 -2
- package/dist/i18n/ru.d.ts +0 -2
- package/dist/i18n/sr.d.ts +0 -2
- package/dist/i18n/tg.d.ts +0 -2
- package/dist/i18n/th.d.ts +0 -2
- package/dist/i18n/tr.d.ts +0 -2
- package/dist/i18n/zh.d.ts +0 -2
- package/dist/i18n/zht.d.ts +0 -2
- package/dist/{components/icon.d.ts → icons/icon/additional-icons.d.ts} +8 -8
- package/dist/{v2/components → icons/icon}/icon.d.ts +44 -1
- package/dist/layout/divider/divider.d.ts +5 -0
- package/dist/navigation/menu/menu.d.ts +59 -0
- package/dist/{v2/components/segmented-control-v2.d.ts → navigation/segmented-control/segmented-control.d.ts} +5 -5
- package/dist/{components → navigation/tabs}/tabs.d.ts +15 -8
- package/dist/{v2/components/dialog-v2.d.ts → overlays/dialog/dialog.d.ts} +1 -2
- package/dist/overlays/tooltip/tooltip.d.ts +15 -0
- package/dist/{components → typography/text-shimmer}/text-shimmer.d.ts +1 -0
- package/dist/typography/wordmark/wordmark.d.ts +2 -0
- package/package.json +141 -35
- package/src/{v2/components/button-v2.css → actions/button/button.css} +29 -0
- package/src/{components → actions/button}/button.tsx +19 -11
- package/src/actions/icon-button/icon-button.tsx +32 -0
- package/src/{v2/components/split-button-v2.css → actions/split-button/split-button.css} +2 -6
- package/src/{v2/components/split-button-v2.tsx → actions/split-button/split-button.tsx} +4 -4
- package/src/components/animated-number.css +29 -11
- package/src/components/animated-number.tsx +2 -2
- package/src/components/card.css +2 -23
- package/src/components/card.tsx +4 -4
- package/src/components/collapsible.tsx +2 -2
- package/src/components/dock-surface.css +2 -9
- package/src/components/image-preview.tsx +3 -2
- package/src/components/list.css +5 -5
- package/src/components/list.tsx +7 -5
- package/src/components/popover.tsx +3 -2
- package/src/components/scroll-view.tsx +5 -20
- package/src/components/sticky-accordion-header.tsx +1 -1
- package/src/components/text-field.tsx +12 -4
- package/src/context/dialog.tsx +1 -0
- package/src/context/i18n.tsx +17 -14
- package/src/context/marked-base.tsx +27 -0
- package/src/context/marked-parser.tsx +3 -13
- package/src/{components → data-display/accordion}/accordion.css +5 -31
- package/src/{components → data-display/accordion}/accordion.tsx +14 -14
- package/src/{v2/components/avatar-v2.tsx → data-display/avatar/avatar.tsx} +1 -1
- package/src/{v2/components/badge-v2.css → data-display/badge/badge.css} +19 -0
- package/src/{v2/components/badge-v2.tsx → data-display/badge/badge.tsx} +6 -4
- package/src/{components → data-display/diff-changes}/diff-changes.css +22 -19
- package/src/{v2/components/diff-changes-v2.tsx → data-display/diff-changes/diff-changes.tsx} +7 -2
- package/src/{v2/components/keybind-v2.css → data-display/keybind/keybind.css} +1 -1
- package/src/{v2/components/keybind-v2.tsx → data-display/keybind/keybind.tsx} +3 -3
- package/src/{v2/components/line-comment-v2.css → data-display/line-comment/line-comment.css} +4 -4
- package/src/{v2/components/line-comment-v2.tsx → data-display/line-comment/line-comment.tsx} +17 -15
- package/src/{v2/components/project-avatar-v2.tsx → data-display/project-avatar/project-avatar.tsx} +1 -1
- package/src/{v2/components/loader-v2.tsx → feedback/loader/loader.tsx} +2 -2
- package/src/feedback/progress-circle/progress-circle.css +28 -0
- package/src/feedback/progress-circle/progress-circle.tsx +64 -0
- package/src/{v2/components/toast-v2.tsx → feedback/toast/toast.tsx} +60 -58
- package/src/{components → forms/checkbox}/checkbox.css +1 -7
- package/src/{components → forms/checkbox}/checkbox.tsx +13 -13
- package/src/{v2/components/field-v2.css → forms/field/field.css} +1 -1
- package/src/{v2/components/field-v2.tsx → forms/field/field.tsx} +9 -11
- package/src/{v2/components/radio-v2.tsx → forms/radio/radio.tsx} +30 -20
- package/src/{v2/components/select-v2.css → forms/select/select.css} +2 -8
- package/src/{v2/components/select-v2.tsx → forms/select/select.tsx} +40 -32
- package/src/{v2/components/switch-v2.css → forms/switch/switch.css} +110 -0
- package/src/forms/switch/switch.tsx +34 -0
- package/src/{v2/components/text-input-v2.css → forms/text-input/text-input.css} +3 -3
- package/src/{v2/components/text-input-v2.tsx → forms/text-input/text-input.tsx} +4 -4
- package/src/{v2/components/textarea-v2.tsx → forms/textarea/textarea.tsx} +3 -3
- package/src/hooks/create-auto-scroll.tsx +20 -0
- package/src/i18n/am.ts +7 -9
- package/src/i18n/ar.ts +7 -9
- package/src/i18n/az.ts +7 -9
- package/src/i18n/bg.ts +7 -9
- package/src/i18n/bn.ts +7 -9
- package/src/i18n/br.ts +7 -9
- package/src/i18n/bs.ts +7 -9
- package/src/i18n/ca.ts +7 -9
- package/src/i18n/cs.ts +7 -9
- package/src/i18n/da.ts +7 -9
- package/src/i18n/de.ts +1 -3
- package/src/i18n/dv.ts +7 -9
- package/src/i18n/dz.ts +5 -7
- package/src/i18n/el.ts +7 -9
- package/src/i18n/en.ts +59 -12
- package/src/i18n/es.ts +6 -8
- package/src/i18n/et.ts +7 -9
- package/src/i18n/fa.ts +7 -9
- package/src/i18n/fi.ts +7 -9
- package/src/i18n/fo.ts +7 -9
- package/src/i18n/fr.ts +6 -8
- package/src/i18n/he.ts +199 -0
- package/src/i18n/hi.ts +7 -9
- package/src/i18n/hr.ts +7 -9
- package/src/i18n/hu.ts +7 -9
- package/src/i18n/hy.ts +7 -9
- package/src/i18n/id.ts +7 -9
- package/src/i18n/is.ts +7 -9
- package/src/i18n/it.ts +7 -9
- package/src/i18n/ja.ts +7 -9
- package/src/i18n/ka.ts +7 -9
- package/src/i18n/km.ts +7 -9
- package/src/i18n/ko.ts +7 -9
- package/src/i18n/lo.ts +7 -9
- package/src/i18n/lt.ts +7 -9
- package/src/i18n/lv.ts +7 -9
- package/src/i18n/mk.ts +7 -9
- package/src/i18n/mn.ts +7 -9
- package/src/i18n/ms.ts +7 -9
- package/src/i18n/my.ts +7 -9
- package/src/i18n/ne.ts +7 -9
- package/src/i18n/nl.ts +7 -9
- package/src/i18n/no.ts +7 -9
- package/src/i18n/pa.ts +7 -9
- package/src/i18n/pl.ts +7 -9
- package/src/i18n/ro.ts +7 -9
- package/src/i18n/ru.ts +7 -9
- package/src/i18n/si.ts +7 -9
- package/src/i18n/sk.ts +7 -9
- package/src/i18n/sl.ts +7 -9
- package/src/i18n/sq.ts +7 -9
- package/src/i18n/sr.ts +7 -9
- package/src/i18n/sv.ts +7 -9
- package/src/i18n/tg.ts +7 -9
- package/src/i18n/th.ts +7 -9
- package/src/i18n/tk.ts +7 -9
- package/src/i18n/tr.ts +7 -9
- package/src/i18n/uk.ts +7 -9
- package/src/i18n/ur.ts +7 -9
- package/src/i18n/uz.ts +7 -9
- package/src/i18n/vi.ts +7 -9
- package/src/i18n/zh.ts +7 -9
- package/src/i18n/zht.ts +7 -9
- package/src/{components/icon.tsx → icons/icon/additional-icons.ts} +8 -74
- package/src/icons/icon/icon.css +3 -0
- package/src/{v2/components → icons/icon}/icon.tsx +80 -12
- package/src/{v2/components/divider-v2.tsx → layout/divider/divider.tsx} +3 -3
- package/src/{v2/components/menu-v2.css → navigation/menu/menu.css} +124 -2
- package/src/{v2/components/menu-v2.tsx → navigation/menu/menu.tsx} +96 -32
- package/src/{v2/components/segmented-control-v2.css → navigation/segmented-control/segmented-control.css} +1 -1
- package/src/{v2/components/segmented-control-v2.tsx → navigation/segmented-control/segmented-control.tsx} +9 -8
- package/src/{v2/components/tabs-v2.css → navigation/tabs/tabs-current.css} +25 -10
- package/src/{components → navigation/tabs}/tabs.css +53 -232
- package/src/navigation/tabs/tabs.tsx +194 -0
- package/src/{v2/components/dialog-v2.css → overlays/dialog/dialog.css} +3 -0
- package/src/{v2/components/dialog-v2.tsx → overlays/dialog/dialog.tsx} +11 -13
- package/src/{v2/components/tooltip-v2.css → overlays/tooltip/tooltip.css} +26 -0
- package/src/{v2/components/tooltip-v2.tsx → overlays/tooltip/tooltip.tsx} +24 -17
- package/src/styles/base.css +5 -0
- package/src/styles/index.css +4 -20
- package/src/styles/tailwind/colors.css +1 -0
- package/src/styles/tailwind/index.css +18 -1
- package/src/styles/theme.css +2 -2
- package/src/{v2/styles → styles/tokens}/colors.css +8 -8
- package/src/{v2/styles → styles/tokens}/theme.css +20 -16
- package/src/theme/context.tsx +19 -11
- package/src/theme/themes/oc-2.json +48 -19
- package/src/theme/v2/default-primitives.ts +8 -8
- package/src/theme/v2/foreground.ts +1 -0
- package/src/theme/v2/mapping.ts +5 -1
- package/src/{components → typography/text-shimmer}/text-shimmer.css +2 -1
- package/src/{components → typography/text-shimmer}/text-shimmer.tsx +1 -0
- package/src/{v2/components/wordmark-v2.tsx → typography/wordmark/wordmark.tsx} +2 -2
- package/dist/components/avatar.d.ts +0 -9
- package/dist/components/button.d.ts +0 -9
- package/dist/components/dialog.d.ts +0 -12
- package/dist/components/dropdown-menu.d.ts +0 -80
- package/dist/components/icon-button.d.ts +0 -10
- package/dist/components/keybind.d.ts +0 -6
- package/dist/components/radio-group.d.ts +0 -16
- package/dist/components/select.d.ts +0 -21
- package/dist/components/tag.d.ts +0 -5
- package/dist/components/toast.d.ts +0 -56
- package/dist/components/tooltip.d.ts +0 -17
- package/dist/v2/components/accordion-v2.d.ts +0 -26
- package/dist/v2/components/badge-v2.d.ts +0 -6
- package/dist/v2/components/button-v2.d.ts +0 -10
- package/dist/v2/components/checkbox-v2.d.ts +0 -10
- package/dist/v2/components/diff-changes-v2.d.ts +0 -11
- package/dist/v2/components/divider-v2.d.ts +0 -5
- package/dist/v2/components/icon-button-v2.d.ts +0 -11
- package/dist/v2/components/inline-input-v2.d.ts +0 -21
- package/dist/v2/components/keybind-v2.d.ts +0 -7
- package/dist/v2/components/loader-v2.d.ts +0 -3
- package/dist/v2/components/menu-v2.d.ts +0 -52
- package/dist/v2/components/progress-circle-v2.d.ts +0 -8
- package/dist/v2/components/radio-v2.d.ts +0 -16
- package/dist/v2/components/split-button-v2.d.ts +0 -5
- package/dist/v2/components/switch-v2.d.ts +0 -7
- package/dist/v2/components/tabs-v2.d.ts +0 -34
- package/dist/v2/components/text-shimmer-v2.d.ts +0 -9
- package/dist/v2/components/textarea-v2.d.ts +0 -7
- package/dist/v2/components/toast-v2.d.ts +0 -57
- package/dist/v2/components/tooltip-v2.d.ts +0 -13
- package/dist/v2/components/wordmark-v2.d.ts +0 -2
- package/src/components/avatar.css +0 -49
- package/src/components/avatar.tsx +0 -55
- package/src/components/button.css +0 -194
- package/src/components/dialog.css +0 -181
- package/src/components/dialog.tsx +0 -72
- package/src/components/diff-changes.tsx +0 -115
- package/src/components/dropdown-menu.css +0 -135
- package/src/components/dropdown-menu.tsx +0 -308
- package/src/components/icon-button.css +0 -181
- package/src/components/icon-button.tsx +0 -29
- package/src/components/icon.css +0 -39
- package/src/components/keybind.css +0 -18
- package/src/components/keybind.tsx +0 -20
- package/src/components/progress-circle.css +0 -16
- package/src/components/progress-circle.tsx +0 -64
- package/src/components/radio-group.css +0 -187
- package/src/components/radio-group.tsx +0 -83
- package/src/components/select.css +0 -201
- package/src/components/select.tsx +0 -174
- package/src/components/switch.css +0 -136
- package/src/components/switch.tsx +0 -29
- package/src/components/tabs.tsx +0 -126
- package/src/components/tag.css +0 -37
- package/src/components/tag.tsx +0 -22
- package/src/components/toast.css +0 -236
- package/src/components/toast.tsx +0 -185
- package/src/components/tooltip.css +0 -74
- package/src/components/tooltip.tsx +0 -163
- package/src/v2/components/accordion-v2.css +0 -139
- package/src/v2/components/accordion-v2.tsx +0 -86
- package/src/v2/components/button-v2.tsx +0 -35
- package/src/v2/components/checkbox-v2.css +0 -184
- package/src/v2/components/checkbox-v2.tsx +0 -65
- package/src/v2/components/diff-changes-v2.css +0 -26
- package/src/v2/components/icon-button-v2.tsx +0 -37
- package/src/v2/components/inline-input-v2.css +0 -225
- package/src/v2/components/inline-input-v2.tsx +0 -107
- package/src/v2/components/progress-circle-v2.css +0 -13
- package/src/v2/components/progress-circle-v2.tsx +0 -52
- package/src/v2/components/switch-v2.tsx +0 -28
- package/src/v2/components/tabs-v2.tsx +0 -149
- package/src/v2/components/text-shimmer-v2.css +0 -125
- package/src/v2/components/text-shimmer-v2.tsx +0 -63
- /package/dist/{components → forms/inline-input}/inline-input.d.ts +0 -0
- /package/dist/{v2/components → navigation}/tab-state-indicator.d.ts +0 -0
- /package/src/{v2/components/icon-button-v2.css → actions/icon-button/icon-button.css} +0 -0
- /package/src/{v2/components/avatar-v2.css → data-display/avatar/avatar.css} +0 -0
- /package/src/{v2/components/project-avatar-v2.css → data-display/project-avatar/project-avatar.css} +0 -0
- /package/src/{v2/components/loader-v2.css → feedback/loader/loader.css} +0 -0
- /package/src/{v2/components/toast-v2.css → feedback/toast/toast.css} +0 -0
- /package/src/{components → forms/inline-input}/inline-input.css +0 -0
- /package/src/{components → forms/inline-input}/inline-input.tsx +0 -0
- /package/src/{v2/components/radio-v2.css → forms/radio/radio.css} +0 -0
- /package/src/{v2/components/textarea-v2.css → forms/textarea/textarea.css} +0 -0
- /package/src/{v2/components/divider-v2.css → layout/divider/divider.css} +0 -0
- /package/src/{v2/components → navigation}/tab-state-indicator.tsx +0 -0
- /package/src/{v2/components/file-tree-v2.css → styles/file-tree.css} +0 -0
- /package/src/{v2/styles/tailwind.css → styles/tokens/index.css} +0 -0
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
[data-component="switch"] {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
gap: 8px;
|
|
6
|
-
cursor: default;
|
|
7
|
-
|
|
8
|
-
[data-slot="switch-input"] {
|
|
9
|
-
position: absolute;
|
|
10
|
-
width: 1px;
|
|
11
|
-
height: 1px;
|
|
12
|
-
padding: 0;
|
|
13
|
-
margin: -1px;
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
clip: rect(0, 0, 0, 0);
|
|
16
|
-
white-space: nowrap;
|
|
17
|
-
border-width: 0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
[data-slot="switch-control"] {
|
|
21
|
-
display: inline-flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
width: 28px;
|
|
24
|
-
height: 16px;
|
|
25
|
-
flex-shrink: 0;
|
|
26
|
-
border-radius: 3px;
|
|
27
|
-
border: 1px solid var(--border-weak-base);
|
|
28
|
-
background: var(--surface-base);
|
|
29
|
-
transition:
|
|
30
|
-
background-color 150ms,
|
|
31
|
-
border-color 150ms;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
[data-slot="switch-thumb"] {
|
|
35
|
-
width: 14px;
|
|
36
|
-
height: 14px;
|
|
37
|
-
box-sizing: content-box;
|
|
38
|
-
|
|
39
|
-
border-radius: 2px;
|
|
40
|
-
border: 1px solid var(--border-base);
|
|
41
|
-
background: var(--icon-invert-base);
|
|
42
|
-
|
|
43
|
-
/* shadows/shadow-xs */
|
|
44
|
-
box-shadow:
|
|
45
|
-
0 1px 2px -1px rgba(19, 16, 16, 0.04),
|
|
46
|
-
0 1px 2px 0 rgba(19, 16, 16, 0.06),
|
|
47
|
-
0 1px 3px 0 rgba(19, 16, 16, 0.08);
|
|
48
|
-
|
|
49
|
-
transform: translateX(-1px);
|
|
50
|
-
transition:
|
|
51
|
-
transform 150ms,
|
|
52
|
-
background-color 150ms;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
[data-slot="switch-label"] {
|
|
56
|
-
user-select: none;
|
|
57
|
-
color: var(--text-base);
|
|
58
|
-
font-family: var(--font-family-sans);
|
|
59
|
-
font-size: var(--font-size-small);
|
|
60
|
-
font-style: normal;
|
|
61
|
-
font-weight: var(--font-weight-regular);
|
|
62
|
-
line-height: var(--line-height-large);
|
|
63
|
-
letter-spacing: var(--letter-spacing-normal);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
[data-slot="switch-description"] {
|
|
67
|
-
color: var(--text-base);
|
|
68
|
-
font-family: var(--font-family-sans);
|
|
69
|
-
font-size: 12px;
|
|
70
|
-
font-weight: var(--font-weight-regular);
|
|
71
|
-
line-height: var(--line-height-normal);
|
|
72
|
-
letter-spacing: var(--letter-spacing-normal);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
[data-slot="switch-error"] {
|
|
76
|
-
color: var(--text-error);
|
|
77
|
-
font-family: var(--font-family-sans);
|
|
78
|
-
font-size: 12px;
|
|
79
|
-
font-weight: var(--font-weight-regular);
|
|
80
|
-
line-height: var(--line-height-normal);
|
|
81
|
-
letter-spacing: var(--letter-spacing-normal);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
&:hover:not([data-disabled], [data-readonly]) [data-slot="switch-control"] {
|
|
85
|
-
border-color: var(--border-hover);
|
|
86
|
-
background-color: var(--surface-hover);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
&:not([data-readonly]) [data-slot="switch-input"]:focus-visible ~ [data-slot="switch-control"] {
|
|
90
|
-
border-color: var(--border-focus);
|
|
91
|
-
box-shadow: var(--shadow-xs-border-focus);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&[data-checked] [data-slot="switch-control"] {
|
|
95
|
-
box-sizing: border-box;
|
|
96
|
-
border-color: var(--icon-strong-base);
|
|
97
|
-
background-color: var(--icon-strong-base);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
&[data-checked] [data-slot="switch-thumb"] {
|
|
101
|
-
border: none;
|
|
102
|
-
transform: translateX(12px);
|
|
103
|
-
background-color: var(--icon-invert-base);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
&:dir(rtl)[data-checked] [data-slot="switch-thumb"] {
|
|
107
|
-
transform: translateX(-12px);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
&[data-checked]:hover:not([data-disabled], [data-readonly]) [data-slot="switch-control"] {
|
|
111
|
-
border-color: var(--border-hover);
|
|
112
|
-
background-color: var(--surface-hover);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
&[data-disabled] {
|
|
116
|
-
cursor: not-allowed;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
&[data-disabled] [data-slot="switch-control"] {
|
|
120
|
-
border-color: var(--border-disabled);
|
|
121
|
-
background-color: var(--surface-disabled);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
&[data-disabled] [data-slot="switch-thumb"] {
|
|
125
|
-
background-color: var(--icon-disabled);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
&[data-invalid] [data-slot="switch-control"] {
|
|
129
|
-
border-color: var(--border-error);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
&[data-readonly] {
|
|
133
|
-
cursor: default;
|
|
134
|
-
pointer-events: none;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Switch as Kobalte } from "@kobalte/core/switch"
|
|
2
|
-
import { Show, splitProps } from "solid-js"
|
|
3
|
-
import type { ComponentProps, ParentProps } from "solid-js"
|
|
4
|
-
|
|
5
|
-
export interface SwitchProps extends ParentProps<ComponentProps<typeof Kobalte>> {
|
|
6
|
-
hideLabel?: boolean
|
|
7
|
-
description?: string
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function Switch(props: SwitchProps) {
|
|
11
|
-
const [local, others] = splitProps(props, ["children", "class", "hideLabel", "description"])
|
|
12
|
-
return (
|
|
13
|
-
<Kobalte {...others} class={local.class} data-component="switch">
|
|
14
|
-
<Kobalte.Input data-slot="switch-input" />
|
|
15
|
-
<Show when={local.children}>
|
|
16
|
-
<Kobalte.Label data-slot="switch-label" classList={{ "sr-only": local.hideLabel }}>
|
|
17
|
-
{local.children}
|
|
18
|
-
</Kobalte.Label>
|
|
19
|
-
</Show>
|
|
20
|
-
<Show when={local.description}>
|
|
21
|
-
<Kobalte.Description data-slot="switch-description">{local.description}</Kobalte.Description>
|
|
22
|
-
</Show>
|
|
23
|
-
<Kobalte.ErrorMessage data-slot="switch-error" />
|
|
24
|
-
<Kobalte.Control data-slot="switch-control">
|
|
25
|
-
<Kobalte.Thumb data-slot="switch-thumb" />
|
|
26
|
-
</Kobalte.Control>
|
|
27
|
-
</Kobalte>
|
|
28
|
-
)
|
|
29
|
-
}
|
package/src/components/tabs.tsx
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { Tabs as Kobalte } from "@kobalte/core/tabs"
|
|
2
|
-
import { Show, splitProps, type JSX } from "solid-js"
|
|
3
|
-
import type { ComponentProps, ParentProps, Component } from "solid-js"
|
|
4
|
-
|
|
5
|
-
export interface TabsProps extends ComponentProps<typeof Kobalte> {
|
|
6
|
-
variant?: "normal" | "alt" | "pill" | "settings"
|
|
7
|
-
orientation?: "horizontal" | "vertical"
|
|
8
|
-
}
|
|
9
|
-
export interface TabsListProps extends ComponentProps<typeof Kobalte.List> {}
|
|
10
|
-
export interface TabsTriggerProps extends ComponentProps<typeof Kobalte.Trigger> {
|
|
11
|
-
classes?: {
|
|
12
|
-
button?: string
|
|
13
|
-
}
|
|
14
|
-
hideCloseButton?: boolean
|
|
15
|
-
closeButton?: JSX.Element
|
|
16
|
-
onMiddleClick?: () => void
|
|
17
|
-
}
|
|
18
|
-
export interface TabsContentProps extends ComponentProps<typeof Kobalte.Content> {}
|
|
19
|
-
|
|
20
|
-
function TabsRoot(props: TabsProps) {
|
|
21
|
-
const [split, rest] = splitProps(props, ["class", "classList", "variant", "orientation"])
|
|
22
|
-
return (
|
|
23
|
-
<Kobalte
|
|
24
|
-
{...rest}
|
|
25
|
-
orientation={split.orientation}
|
|
26
|
-
data-component="tabs"
|
|
27
|
-
data-variant={split.variant || "normal"}
|
|
28
|
-
data-orientation={split.orientation || "horizontal"}
|
|
29
|
-
classList={{
|
|
30
|
-
...split.classList,
|
|
31
|
-
[split.class ?? ""]: !!split.class,
|
|
32
|
-
}}
|
|
33
|
-
/>
|
|
34
|
-
)
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function TabsList(props: TabsListProps) {
|
|
38
|
-
const [split, rest] = splitProps(props, ["class", "classList"])
|
|
39
|
-
return (
|
|
40
|
-
<Kobalte.List
|
|
41
|
-
{...rest}
|
|
42
|
-
data-slot="tabs-list"
|
|
43
|
-
classList={{
|
|
44
|
-
...split.classList,
|
|
45
|
-
[split.class ?? ""]: !!split.class,
|
|
46
|
-
}}
|
|
47
|
-
/>
|
|
48
|
-
)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function TabsTrigger(props: ParentProps<TabsTriggerProps>) {
|
|
52
|
-
const [split, rest] = splitProps(props, [
|
|
53
|
-
"class",
|
|
54
|
-
"classList",
|
|
55
|
-
"classes",
|
|
56
|
-
"children",
|
|
57
|
-
"closeButton",
|
|
58
|
-
"hideCloseButton",
|
|
59
|
-
"onMiddleClick",
|
|
60
|
-
])
|
|
61
|
-
return (
|
|
62
|
-
<div
|
|
63
|
-
data-slot="tabs-trigger-wrapper"
|
|
64
|
-
data-value={props.value}
|
|
65
|
-
classList={{
|
|
66
|
-
...split.classList,
|
|
67
|
-
[split.class ?? ""]: !!split.class,
|
|
68
|
-
}}
|
|
69
|
-
onMouseDown={(e) => {
|
|
70
|
-
if (e.button === 1 && split.onMiddleClick) {
|
|
71
|
-
e.preventDefault()
|
|
72
|
-
}
|
|
73
|
-
}}
|
|
74
|
-
onAuxClick={(e) => {
|
|
75
|
-
if (e.button === 1 && split.onMiddleClick) {
|
|
76
|
-
e.preventDefault()
|
|
77
|
-
split.onMiddleClick()
|
|
78
|
-
}
|
|
79
|
-
}}
|
|
80
|
-
>
|
|
81
|
-
<Kobalte.Trigger
|
|
82
|
-
{...rest}
|
|
83
|
-
dir={rest.dir ?? "auto"}
|
|
84
|
-
data-slot="tabs-trigger"
|
|
85
|
-
data-value={props.value}
|
|
86
|
-
classList={{ [split.classes?.button ?? ""]: split.classes?.button }}
|
|
87
|
-
>
|
|
88
|
-
{split.children}
|
|
89
|
-
</Kobalte.Trigger>
|
|
90
|
-
<Show when={split.closeButton}>
|
|
91
|
-
{(closeButton) => (
|
|
92
|
-
<div data-slot="tabs-trigger-close-button" data-hidden={split.hideCloseButton}>
|
|
93
|
-
{closeButton()}
|
|
94
|
-
</div>
|
|
95
|
-
)}
|
|
96
|
-
</Show>
|
|
97
|
-
</div>
|
|
98
|
-
)
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function TabsContent(props: ParentProps<TabsContentProps>) {
|
|
102
|
-
const [split, rest] = splitProps(props, ["class", "classList", "children"])
|
|
103
|
-
return (
|
|
104
|
-
<Kobalte.Content
|
|
105
|
-
{...rest}
|
|
106
|
-
data-slot="tabs-content"
|
|
107
|
-
classList={{
|
|
108
|
-
...split.classList,
|
|
109
|
-
[split.class ?? ""]: !!split.class,
|
|
110
|
-
}}
|
|
111
|
-
>
|
|
112
|
-
{split.children}
|
|
113
|
-
</Kobalte.Content>
|
|
114
|
-
)
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
const TabsSectionTitle: Component<ParentProps> = (props) => {
|
|
118
|
-
return <div data-slot="tabs-section-title">{props.children}</div>
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export const Tabs = Object.assign(TabsRoot, {
|
|
122
|
-
List: TabsList,
|
|
123
|
-
Trigger: TabsTrigger,
|
|
124
|
-
Content: TabsContent,
|
|
125
|
-
SectionTitle: TabsSectionTitle,
|
|
126
|
-
})
|
package/src/components/tag.css
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
[data-component="tag"] {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
user-select: none;
|
|
6
|
-
|
|
7
|
-
border-radius: var(--radius-xs);
|
|
8
|
-
border: 0.5px solid var(--border-weak-base);
|
|
9
|
-
background: var(--surface-raised-base);
|
|
10
|
-
color: var(--text-base);
|
|
11
|
-
|
|
12
|
-
&[data-size="normal"] {
|
|
13
|
-
height: 18px;
|
|
14
|
-
padding: 0 6px;
|
|
15
|
-
|
|
16
|
-
/* text-12-medium */
|
|
17
|
-
font-family: var(--font-family-sans);
|
|
18
|
-
font-size: var(--font-size-small);
|
|
19
|
-
font-style: normal;
|
|
20
|
-
font-weight: var(--font-weight-medium);
|
|
21
|
-
line-height: var(--line-height-large); /* 166.667% */
|
|
22
|
-
letter-spacing: var(--letter-spacing-normal);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&[data-size="large"] {
|
|
26
|
-
height: 22px;
|
|
27
|
-
padding: 0 8px;
|
|
28
|
-
|
|
29
|
-
/* text-14-medium */
|
|
30
|
-
font-family: var(--font-family-sans);
|
|
31
|
-
font-size: 14px;
|
|
32
|
-
font-style: normal;
|
|
33
|
-
font-weight: var(--font-weight-medium);
|
|
34
|
-
line-height: var(--line-height-large); /* 142.857% */
|
|
35
|
-
letter-spacing: var(--letter-spacing-normal);
|
|
36
|
-
}
|
|
37
|
-
}
|
package/src/components/tag.tsx
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type ComponentProps, splitProps } from "solid-js"
|
|
2
|
-
|
|
3
|
-
export interface TagProps extends ComponentProps<"span"> {
|
|
4
|
-
size?: "normal" | "large"
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export function Tag(props: TagProps) {
|
|
8
|
-
const [split, rest] = splitProps(props, ["size", "class", "classList", "children"])
|
|
9
|
-
return (
|
|
10
|
-
<span
|
|
11
|
-
{...rest}
|
|
12
|
-
data-component="tag"
|
|
13
|
-
data-size={split.size || "normal"}
|
|
14
|
-
classList={{
|
|
15
|
-
...split.classList,
|
|
16
|
-
[split.class ?? ""]: !!split.class,
|
|
17
|
-
}}
|
|
18
|
-
>
|
|
19
|
-
{split.children}
|
|
20
|
-
</span>
|
|
21
|
-
)
|
|
22
|
-
}
|
package/src/components/toast.css
DELETED
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
[data-component="toast-region"] {
|
|
2
|
-
position: fixed;
|
|
3
|
-
bottom: 48px;
|
|
4
|
-
inset-inline-end: 32px;
|
|
5
|
-
z-index: 1000;
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
gap: 8px;
|
|
9
|
-
max-width: min(400px, calc(100vw - 64px));
|
|
10
|
-
max-height: calc(100dvh - 96px);
|
|
11
|
-
width: 100%;
|
|
12
|
-
overflow: hidden;
|
|
13
|
-
pointer-events: none;
|
|
14
|
-
|
|
15
|
-
[data-slot="toast-list"] {
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
gap: 8px;
|
|
19
|
-
list-style: none;
|
|
20
|
-
margin: 0;
|
|
21
|
-
padding: 0;
|
|
22
|
-
max-height: 100%;
|
|
23
|
-
overflow-y: auto;
|
|
24
|
-
scrollbar-width: none;
|
|
25
|
-
|
|
26
|
-
&::-webkit-scrollbar {
|
|
27
|
-
display: none;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
[data-component="toast"] {
|
|
33
|
-
position: relative;
|
|
34
|
-
display: flex;
|
|
35
|
-
align-items: flex-start;
|
|
36
|
-
gap: 20px;
|
|
37
|
-
padding: 16px 20px;
|
|
38
|
-
max-height: min(420px, calc(100dvh - 96px));
|
|
39
|
-
overflow: hidden;
|
|
40
|
-
pointer-events: auto;
|
|
41
|
-
transition: all 150ms ease-out;
|
|
42
|
-
|
|
43
|
-
border-radius: var(--radius-lg);
|
|
44
|
-
border: 1px solid var(--border-weak-base);
|
|
45
|
-
background: var(--surface-float-base);
|
|
46
|
-
color: var(--text-invert-base);
|
|
47
|
-
box-shadow: var(--shadow-md);
|
|
48
|
-
|
|
49
|
-
[data-slot="toast-inner"] {
|
|
50
|
-
display: flex;
|
|
51
|
-
align-items: flex-start;
|
|
52
|
-
gap: 10px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&[data-opened] {
|
|
56
|
-
animation: toastPopIn 150ms ease-out;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&[data-closed] {
|
|
60
|
-
animation: toastPopOut 100ms ease-in forwards;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&[data-swipe="move"] {
|
|
64
|
-
transform: translateX(var(--kb-toast-swipe-move-x));
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&[data-swipe="cancel"] {
|
|
68
|
-
transform: translateX(0);
|
|
69
|
-
transition: transform 200ms ease-out;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&[data-swipe="end"] {
|
|
73
|
-
animation: toastSwipeOut 100ms ease-out forwards;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/* &[data-variant="success"] { */
|
|
77
|
-
/* border-color: var(--color-semantic-positive); */
|
|
78
|
-
/* } */
|
|
79
|
-
/**/
|
|
80
|
-
/* &[data-variant="error"] { */
|
|
81
|
-
/* border-color: var(--color-semantic-danger); */
|
|
82
|
-
/* } */
|
|
83
|
-
/**/
|
|
84
|
-
/* &[data-variant="loading"] { */
|
|
85
|
-
/* border-color: var(--color-semantic-info); */
|
|
86
|
-
/* } */
|
|
87
|
-
|
|
88
|
-
[data-slot="toast-icon"] {
|
|
89
|
-
flex-shrink: 0;
|
|
90
|
-
display: flex;
|
|
91
|
-
align-items: center;
|
|
92
|
-
justify-content: center;
|
|
93
|
-
|
|
94
|
-
[data-component="icon"] {
|
|
95
|
-
color: var(--text-invert-stronger);
|
|
96
|
-
/* color: var(--icon-invert-base); */
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
[data-slot="toast-content"] {
|
|
101
|
-
flex: 1;
|
|
102
|
-
display: flex;
|
|
103
|
-
flex-direction: column;
|
|
104
|
-
gap: 2px;
|
|
105
|
-
min-height: 0;
|
|
106
|
-
min-width: 0;
|
|
107
|
-
overflow-x: hidden;
|
|
108
|
-
overflow-y: auto;
|
|
109
|
-
scrollbar-width: none;
|
|
110
|
-
|
|
111
|
-
&::-webkit-scrollbar {
|
|
112
|
-
display: none;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
[data-slot="toast-title"] {
|
|
117
|
-
color: var(--text-invert-strong);
|
|
118
|
-
overflow: hidden;
|
|
119
|
-
text-overflow: ellipsis;
|
|
120
|
-
white-space: nowrap;
|
|
121
|
-
|
|
122
|
-
/* text-14-medium */
|
|
123
|
-
font-family: var(--font-family-sans);
|
|
124
|
-
font-size: 14px;
|
|
125
|
-
font-style: normal;
|
|
126
|
-
font-weight: var(--font-weight-medium);
|
|
127
|
-
line-height: var(--line-height-large); /* 142.857% */
|
|
128
|
-
letter-spacing: var(--letter-spacing-normal);
|
|
129
|
-
|
|
130
|
-
margin: 0;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
[data-slot="toast-description"] {
|
|
134
|
-
color: var(--text-invert-base);
|
|
135
|
-
text-wrap-style: pretty;
|
|
136
|
-
overflow-wrap: anywhere;
|
|
137
|
-
word-break: break-word;
|
|
138
|
-
|
|
139
|
-
/* text-14-regular */
|
|
140
|
-
font-family: var(--font-family-sans);
|
|
141
|
-
font-size: var(--font-size-base);
|
|
142
|
-
font-style: normal;
|
|
143
|
-
font-weight: var(--font-weight-regular);
|
|
144
|
-
line-height: var(--line-height-x-large); /* 171.429% */
|
|
145
|
-
letter-spacing: var(--letter-spacing-normal);
|
|
146
|
-
|
|
147
|
-
margin: 0;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
[data-slot="toast-actions"] {
|
|
151
|
-
display: flex;
|
|
152
|
-
flex-wrap: wrap;
|
|
153
|
-
gap: 16px;
|
|
154
|
-
margin-top: 8px;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
[data-slot="toast-action"] {
|
|
158
|
-
background: none;
|
|
159
|
-
border: none;
|
|
160
|
-
padding: 0;
|
|
161
|
-
cursor: pointer;
|
|
162
|
-
min-width: 0;
|
|
163
|
-
max-width: 100%;
|
|
164
|
-
overflow: hidden;
|
|
165
|
-
text-overflow: ellipsis;
|
|
166
|
-
white-space: nowrap;
|
|
167
|
-
|
|
168
|
-
color: var(--text-invert-weak);
|
|
169
|
-
font-family: var(--font-family-sans);
|
|
170
|
-
font-size: var(--font-size-base);
|
|
171
|
-
font-weight: var(--font-weight-medium);
|
|
172
|
-
line-height: var(--line-height-large);
|
|
173
|
-
letter-spacing: var(--letter-spacing-normal);
|
|
174
|
-
|
|
175
|
-
&:hover {
|
|
176
|
-
text-decoration: underline;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
&:first-child {
|
|
180
|
-
color: var(--text-invert-strong);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
[data-slot="toast-close-button"] {
|
|
185
|
-
flex-shrink: 0;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
[data-slot="toast-progress-track"] {
|
|
189
|
-
position: absolute;
|
|
190
|
-
bottom: 0;
|
|
191
|
-
left: 0;
|
|
192
|
-
right: 0;
|
|
193
|
-
height: 3px;
|
|
194
|
-
background-color: var(--surface-base);
|
|
195
|
-
border-radius: 0 0 var(--radius-lg) var(--radius-lg);
|
|
196
|
-
overflow: hidden;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
[data-slot="toast-progress-fill"] {
|
|
200
|
-
height: 100%;
|
|
201
|
-
width: var(--kb-toast-progress-fill-width);
|
|
202
|
-
background-color: var(--color-primary);
|
|
203
|
-
transition: width 250ms linear;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
@keyframes toastPopIn {
|
|
208
|
-
from {
|
|
209
|
-
opacity: 0;
|
|
210
|
-
transform: translateY(20px);
|
|
211
|
-
}
|
|
212
|
-
to {
|
|
213
|
-
opacity: 1;
|
|
214
|
-
transform: translateY(0);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
@keyframes toastPopOut {
|
|
219
|
-
from {
|
|
220
|
-
opacity: 1;
|
|
221
|
-
transform: translateY(0);
|
|
222
|
-
}
|
|
223
|
-
to {
|
|
224
|
-
opacity: 0;
|
|
225
|
-
transform: translateY(20px);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
@keyframes toastSwipeOut {
|
|
230
|
-
from {
|
|
231
|
-
transform: translateX(var(--kb-toast-swipe-end-x));
|
|
232
|
-
}
|
|
233
|
-
to {
|
|
234
|
-
transform: translateX(100%);
|
|
235
|
-
}
|
|
236
|
-
}
|