@opencode-ai/ui 0.0.0-dev-202608201855 → 0.0.0-dev-17751
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/{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/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 +209 -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 +16 -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 +14 -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 +131 -13
- package/src/{v2/components/button-v2.tsx → actions/button/button.tsx} +8 -8
- package/src/actions/icon-button/icon-button.tsx +32 -0
- package/src/{v2/components/split-button-v2.css → actions/split-button/split-button.css} +1 -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 +1 -1
- 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/provider-icon.tsx +1 -1
- 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/i18n.tsx +17 -14
- package/src/{components → data-display/accordion}/accordion.css +1 -26
- 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.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.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} +38 -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.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 +0 -2
- package/src/i18n/ar.ts +0 -2
- package/src/i18n/az.ts +0 -2
- package/src/i18n/bg.ts +0 -2
- package/src/i18n/bn.ts +0 -2
- package/src/i18n/br.ts +0 -2
- package/src/i18n/bs.ts +0 -2
- package/src/i18n/ca.ts +0 -2
- package/src/i18n/cs.ts +0 -2
- package/src/i18n/da.ts +0 -2
- package/src/i18n/de.ts +0 -2
- package/src/i18n/dv.ts +0 -2
- package/src/i18n/dz.ts +0 -2
- package/src/i18n/el.ts +0 -2
- package/src/i18n/en.ts +18 -4
- package/src/i18n/es.ts +0 -2
- package/src/i18n/et.ts +0 -2
- package/src/i18n/fa.ts +0 -2
- package/src/i18n/fi.ts +0 -2
- package/src/i18n/fo.ts +0 -2
- package/src/i18n/fr.ts +0 -2
- package/src/i18n/he.ts +199 -0
- package/src/i18n/hi.ts +0 -2
- package/src/i18n/hr.ts +0 -2
- package/src/i18n/hu.ts +0 -2
- package/src/i18n/hy.ts +0 -2
- package/src/i18n/id.ts +0 -2
- package/src/i18n/is.ts +0 -2
- package/src/i18n/it.ts +0 -2
- package/src/i18n/ja.ts +0 -2
- package/src/i18n/ka.ts +0 -2
- package/src/i18n/km.ts +0 -2
- package/src/i18n/ko.ts +0 -2
- package/src/i18n/lo.ts +0 -2
- package/src/i18n/lt.ts +0 -2
- package/src/i18n/lv.ts +0 -2
- package/src/i18n/mk.ts +0 -2
- package/src/i18n/mn.ts +0 -2
- package/src/i18n/ms.ts +0 -2
- package/src/i18n/my.ts +0 -2
- package/src/i18n/ne.ts +0 -2
- package/src/i18n/nl.ts +0 -2
- package/src/i18n/no.ts +0 -2
- package/src/i18n/pa.ts +0 -2
- package/src/i18n/pl.ts +0 -2
- package/src/i18n/ro.ts +0 -2
- package/src/i18n/ru.ts +0 -2
- package/src/i18n/si.ts +0 -2
- package/src/i18n/sk.ts +0 -2
- package/src/i18n/sl.ts +0 -2
- package/src/i18n/sq.ts +0 -2
- package/src/i18n/sr.ts +0 -2
- package/src/i18n/sv.ts +0 -2
- package/src/i18n/tg.ts +0 -2
- package/src/i18n/th.ts +0 -2
- package/src/i18n/tk.ts +0 -2
- package/src/i18n/tr.ts +0 -2
- package/src/i18n/uk.ts +0 -2
- package/src/i18n/ur.ts +0 -2
- package/src/i18n/uz.ts +0 -2
- package/src/i18n/vi.ts +0 -2
- package/src/i18n/zh.ts +0 -2
- package/src/i18n/zht.ts +0 -2
- 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 +42 -9
- package/src/{v2/components/divider-v2.tsx → layout/divider/divider.tsx} +3 -3
- package/src/{v2/components/menu-v2.css → navigation/menu/menu.css} +121 -0
- package/src/{v2/components/menu-v2.tsx → navigation/menu/menu.tsx} +96 -32
- 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} +24 -9
- package/src/{components → navigation/tabs}/tabs.css +39 -229
- 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} +18 -14
- package/src/styles/index.css +4 -20
- package/src/styles/tailwind/index.css +15 -1
- package/src/{v2/styles → styles/tokens}/theme.css +0 -12
- package/src/theme/context.tsx +19 -11
- package/src/theme/themes/oc-2.json +1 -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} +1 -1
- 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/button.tsx +0 -33
- 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/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/button-v2.css → actions/button/button.css} +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/line-comment-v2.css → data-display/line-comment/line-comment.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/{v2/components/field-v2.css → forms/field/field.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/text-input-v2.css → forms/text-input/text-input.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/segmented-control-v2.css → navigation/segmented-control/segmented-control.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 → styles/tokens}/colors.css +0 -0
- /package/src/{v2/styles/tailwind.css → styles/tokens/index.css} +0 -0
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
[data-component="dropdown-menu-content"],
|
|
2
|
-
[data-component="dropdown-menu-sub-content"] {
|
|
3
|
-
min-width: 8rem;
|
|
4
|
-
overflow: hidden;
|
|
5
|
-
border-radius: var(--radius-md);
|
|
6
|
-
border: 1px solid color-mix(in oklch, var(--border-base) 50%, transparent);
|
|
7
|
-
background-clip: padding-box;
|
|
8
|
-
background-color: var(--surface-raised-stronger-non-alpha);
|
|
9
|
-
padding: 4px;
|
|
10
|
-
box-shadow: var(--shadow-md);
|
|
11
|
-
z-index: 50;
|
|
12
|
-
transform-origin: var(--kb-menu-content-transform-origin);
|
|
13
|
-
|
|
14
|
-
&:focus,
|
|
15
|
-
&:focus-visible {
|
|
16
|
-
outline: none;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&[data-closed] {
|
|
20
|
-
animation: dropdown-menu-close 0.15s ease-out;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&[data-expanded] {
|
|
24
|
-
animation: dropdown-menu-open 0.15s ease-out;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
[data-component="dropdown-menu-content"],
|
|
29
|
-
[data-component="dropdown-menu-sub-content"] {
|
|
30
|
-
[data-slot="dropdown-menu-item"],
|
|
31
|
-
[data-slot="dropdown-menu-checkbox-item"],
|
|
32
|
-
[data-slot="dropdown-menu-radio-item"],
|
|
33
|
-
[data-slot="dropdown-menu-sub-trigger"] {
|
|
34
|
-
position: relative;
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
gap: 8px;
|
|
38
|
-
padding: 4px 8px;
|
|
39
|
-
border-radius: var(--radius-sm);
|
|
40
|
-
cursor: default;
|
|
41
|
-
user-select: none;
|
|
42
|
-
outline: none;
|
|
43
|
-
|
|
44
|
-
font-family: var(--font-family-sans);
|
|
45
|
-
font-size: var(--font-size-small);
|
|
46
|
-
font-weight: var(--font-weight-medium);
|
|
47
|
-
line-height: var(--line-height-large);
|
|
48
|
-
letter-spacing: var(--letter-spacing-normal);
|
|
49
|
-
color: var(--text-strong);
|
|
50
|
-
|
|
51
|
-
&[data-highlighted] {
|
|
52
|
-
background: var(--surface-raised-base-hover);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&[data-disabled] {
|
|
56
|
-
color: var(--text-weak);
|
|
57
|
-
pointer-events: none;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
[data-slot="dropdown-menu-checkbox-item"],
|
|
62
|
-
[data-slot="dropdown-menu-radio-item"] {
|
|
63
|
-
padding-inline-end: 28px;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
[data-slot="dropdown-menu-sub-trigger"] {
|
|
67
|
-
&[data-expanded] {
|
|
68
|
-
background: var(--surface-raised-base-hover);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
[data-slot="dropdown-menu-item-indicator"] {
|
|
73
|
-
display: flex;
|
|
74
|
-
align-items: center;
|
|
75
|
-
justify-content: center;
|
|
76
|
-
width: 16px;
|
|
77
|
-
height: 16px;
|
|
78
|
-
position: absolute;
|
|
79
|
-
inset-inline-end: 8px;
|
|
80
|
-
top: 50%;
|
|
81
|
-
transform: translateY(-50%);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
[data-slot="dropdown-menu-item-label"] {
|
|
85
|
-
flex: 1;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
[data-slot="dropdown-menu-item-description"] {
|
|
89
|
-
font-size: var(--font-size-x-small);
|
|
90
|
-
color: var(--text-weak);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
[data-slot="dropdown-menu-separator"] {
|
|
94
|
-
height: 1px;
|
|
95
|
-
margin: 4px -4px;
|
|
96
|
-
border-top-color: var(--border-weak-base);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
[data-slot="dropdown-menu-group-label"] {
|
|
100
|
-
display: block;
|
|
101
|
-
padding: 4px 8px;
|
|
102
|
-
font-family: var(--font-family-sans);
|
|
103
|
-
font-size: var(--font-size-x-small);
|
|
104
|
-
font-weight: var(--font-weight-medium);
|
|
105
|
-
line-height: var(--line-height-large);
|
|
106
|
-
letter-spacing: var(--letter-spacing-normal);
|
|
107
|
-
color: var(--text-weak);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
[data-slot="dropdown-menu-arrow"] {
|
|
111
|
-
fill: var(--surface-raised-stronger-non-alpha);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
@keyframes dropdown-menu-open {
|
|
116
|
-
from {
|
|
117
|
-
opacity: 0;
|
|
118
|
-
transform: scale(0.96);
|
|
119
|
-
}
|
|
120
|
-
to {
|
|
121
|
-
opacity: 1;
|
|
122
|
-
transform: scale(1);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
@keyframes dropdown-menu-close {
|
|
127
|
-
from {
|
|
128
|
-
opacity: 1;
|
|
129
|
-
transform: scale(1);
|
|
130
|
-
}
|
|
131
|
-
to {
|
|
132
|
-
opacity: 0;
|
|
133
|
-
transform: scale(0.96);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
import { DropdownMenu as Kobalte } from "@kobalte/core/dropdown-menu"
|
|
2
|
-
import { splitProps } from "solid-js"
|
|
3
|
-
import type { ComponentProps, ParentProps } from "solid-js"
|
|
4
|
-
|
|
5
|
-
export interface DropdownMenuProps extends ComponentProps<typeof Kobalte> {}
|
|
6
|
-
export interface DropdownMenuTriggerProps extends ComponentProps<typeof Kobalte.Trigger> {}
|
|
7
|
-
export interface DropdownMenuIconProps extends ComponentProps<typeof Kobalte.Icon> {}
|
|
8
|
-
export interface DropdownMenuPortalProps extends ComponentProps<typeof Kobalte.Portal> {}
|
|
9
|
-
export interface DropdownMenuContentProps extends ComponentProps<typeof Kobalte.Content> {}
|
|
10
|
-
export interface DropdownMenuArrowProps extends ComponentProps<typeof Kobalte.Arrow> {}
|
|
11
|
-
export interface DropdownMenuSeparatorProps extends ComponentProps<typeof Kobalte.Separator> {}
|
|
12
|
-
export interface DropdownMenuGroupProps extends ComponentProps<typeof Kobalte.Group> {}
|
|
13
|
-
export interface DropdownMenuGroupLabelProps extends ComponentProps<typeof Kobalte.GroupLabel> {}
|
|
14
|
-
export interface DropdownMenuItemProps extends ComponentProps<typeof Kobalte.Item> {}
|
|
15
|
-
export interface DropdownMenuItemLabelProps extends ComponentProps<typeof Kobalte.ItemLabel> {}
|
|
16
|
-
export interface DropdownMenuItemDescriptionProps extends ComponentProps<typeof Kobalte.ItemDescription> {}
|
|
17
|
-
export interface DropdownMenuItemIndicatorProps extends ComponentProps<typeof Kobalte.ItemIndicator> {}
|
|
18
|
-
export interface DropdownMenuRadioGroupProps extends ComponentProps<typeof Kobalte.RadioGroup> {}
|
|
19
|
-
export interface DropdownMenuRadioItemProps extends ComponentProps<typeof Kobalte.RadioItem> {}
|
|
20
|
-
export interface DropdownMenuCheckboxItemProps extends ComponentProps<typeof Kobalte.CheckboxItem> {}
|
|
21
|
-
export interface DropdownMenuSubProps extends ComponentProps<typeof Kobalte.Sub> {}
|
|
22
|
-
export interface DropdownMenuSubTriggerProps extends ComponentProps<typeof Kobalte.SubTrigger> {}
|
|
23
|
-
export interface DropdownMenuSubContentProps extends ComponentProps<typeof Kobalte.SubContent> {}
|
|
24
|
-
|
|
25
|
-
function DropdownMenuRoot(props: DropdownMenuProps) {
|
|
26
|
-
return <Kobalte {...props} data-component="dropdown-menu" />
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function DropdownMenuTrigger(props: ParentProps<DropdownMenuTriggerProps>) {
|
|
30
|
-
const [local, rest] = splitProps(props, ["class", "classList", "children"])
|
|
31
|
-
return (
|
|
32
|
-
<Kobalte.Trigger
|
|
33
|
-
{...rest}
|
|
34
|
-
data-slot="dropdown-menu-trigger"
|
|
35
|
-
classList={{
|
|
36
|
-
...local.classList,
|
|
37
|
-
[local.class ?? ""]: !!local.class,
|
|
38
|
-
}}
|
|
39
|
-
>
|
|
40
|
-
{local.children}
|
|
41
|
-
</Kobalte.Trigger>
|
|
42
|
-
)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function DropdownMenuIcon(props: ParentProps<DropdownMenuIconProps>) {
|
|
46
|
-
const [local, rest] = splitProps(props, ["class", "classList", "children"])
|
|
47
|
-
return (
|
|
48
|
-
<Kobalte.Icon
|
|
49
|
-
{...rest}
|
|
50
|
-
data-slot="dropdown-menu-icon"
|
|
51
|
-
classList={{
|
|
52
|
-
...local.classList,
|
|
53
|
-
[local.class ?? ""]: !!local.class,
|
|
54
|
-
}}
|
|
55
|
-
>
|
|
56
|
-
{local.children}
|
|
57
|
-
</Kobalte.Icon>
|
|
58
|
-
)
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function DropdownMenuPortal(props: DropdownMenuPortalProps) {
|
|
62
|
-
return <Kobalte.Portal {...props} />
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function DropdownMenuContent(props: ParentProps<DropdownMenuContentProps>) {
|
|
66
|
-
const [local, rest] = splitProps(props, ["class", "classList", "children"])
|
|
67
|
-
return (
|
|
68
|
-
<Kobalte.Content
|
|
69
|
-
{...rest}
|
|
70
|
-
data-component="dropdown-menu-content"
|
|
71
|
-
classList={{
|
|
72
|
-
...local.classList,
|
|
73
|
-
[local.class ?? ""]: !!local.class,
|
|
74
|
-
}}
|
|
75
|
-
>
|
|
76
|
-
{local.children}
|
|
77
|
-
</Kobalte.Content>
|
|
78
|
-
)
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function DropdownMenuArrow(props: DropdownMenuArrowProps) {
|
|
82
|
-
const [local, rest] = splitProps(props, ["class", "classList"])
|
|
83
|
-
return (
|
|
84
|
-
<Kobalte.Arrow
|
|
85
|
-
{...rest}
|
|
86
|
-
data-slot="dropdown-menu-arrow"
|
|
87
|
-
classList={{
|
|
88
|
-
...local.classList,
|
|
89
|
-
[local.class ?? ""]: !!local.class,
|
|
90
|
-
}}
|
|
91
|
-
/>
|
|
92
|
-
)
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function DropdownMenuSeparator(props: DropdownMenuSeparatorProps) {
|
|
96
|
-
const [local, rest] = splitProps(props, ["class", "classList"])
|
|
97
|
-
return (
|
|
98
|
-
<Kobalte.Separator
|
|
99
|
-
{...rest}
|
|
100
|
-
data-slot="dropdown-menu-separator"
|
|
101
|
-
classList={{
|
|
102
|
-
...local.classList,
|
|
103
|
-
[local.class ?? ""]: !!local.class,
|
|
104
|
-
}}
|
|
105
|
-
/>
|
|
106
|
-
)
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function DropdownMenuGroup(props: ParentProps<DropdownMenuGroupProps>) {
|
|
110
|
-
const [local, rest] = splitProps(props, ["class", "classList", "children"])
|
|
111
|
-
return (
|
|
112
|
-
<Kobalte.Group
|
|
113
|
-
{...rest}
|
|
114
|
-
data-slot="dropdown-menu-group"
|
|
115
|
-
classList={{
|
|
116
|
-
...local.classList,
|
|
117
|
-
[local.class ?? ""]: !!local.class,
|
|
118
|
-
}}
|
|
119
|
-
>
|
|
120
|
-
{local.children}
|
|
121
|
-
</Kobalte.Group>
|
|
122
|
-
)
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
function DropdownMenuGroupLabel(props: ParentProps<DropdownMenuGroupLabelProps>) {
|
|
126
|
-
const [local, rest] = splitProps(props, ["class", "classList", "children"])
|
|
127
|
-
return (
|
|
128
|
-
<Kobalte.GroupLabel
|
|
129
|
-
{...rest}
|
|
130
|
-
data-slot="dropdown-menu-group-label"
|
|
131
|
-
classList={{
|
|
132
|
-
...local.classList,
|
|
133
|
-
[local.class ?? ""]: !!local.class,
|
|
134
|
-
}}
|
|
135
|
-
>
|
|
136
|
-
{local.children}
|
|
137
|
-
</Kobalte.GroupLabel>
|
|
138
|
-
)
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
function DropdownMenuItem(props: ParentProps<DropdownMenuItemProps>) {
|
|
142
|
-
const [local, rest] = splitProps(props, ["class", "classList", "children"])
|
|
143
|
-
return (
|
|
144
|
-
<Kobalte.Item
|
|
145
|
-
{...rest}
|
|
146
|
-
data-slot="dropdown-menu-item"
|
|
147
|
-
classList={{
|
|
148
|
-
...local.classList,
|
|
149
|
-
[local.class ?? ""]: !!local.class,
|
|
150
|
-
}}
|
|
151
|
-
>
|
|
152
|
-
{local.children}
|
|
153
|
-
</Kobalte.Item>
|
|
154
|
-
)
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
function DropdownMenuItemLabel(props: ParentProps<DropdownMenuItemLabelProps>) {
|
|
158
|
-
const [local, rest] = splitProps(props, ["class", "classList", "children"])
|
|
159
|
-
return (
|
|
160
|
-
<Kobalte.ItemLabel
|
|
161
|
-
{...rest}
|
|
162
|
-
data-slot="dropdown-menu-item-label"
|
|
163
|
-
classList={{
|
|
164
|
-
...local.classList,
|
|
165
|
-
[local.class ?? ""]: !!local.class,
|
|
166
|
-
}}
|
|
167
|
-
>
|
|
168
|
-
{local.children}
|
|
169
|
-
</Kobalte.ItemLabel>
|
|
170
|
-
)
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
function DropdownMenuItemDescription(props: ParentProps<DropdownMenuItemDescriptionProps>) {
|
|
174
|
-
const [local, rest] = splitProps(props, ["class", "classList", "children"])
|
|
175
|
-
return (
|
|
176
|
-
<Kobalte.ItemDescription
|
|
177
|
-
{...rest}
|
|
178
|
-
data-slot="dropdown-menu-item-description"
|
|
179
|
-
classList={{
|
|
180
|
-
...local.classList,
|
|
181
|
-
[local.class ?? ""]: !!local.class,
|
|
182
|
-
}}
|
|
183
|
-
>
|
|
184
|
-
{local.children}
|
|
185
|
-
</Kobalte.ItemDescription>
|
|
186
|
-
)
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
function DropdownMenuItemIndicator(props: ParentProps<DropdownMenuItemIndicatorProps>) {
|
|
190
|
-
const [local, rest] = splitProps(props, ["class", "classList", "children"])
|
|
191
|
-
return (
|
|
192
|
-
<Kobalte.ItemIndicator
|
|
193
|
-
{...rest}
|
|
194
|
-
data-slot="dropdown-menu-item-indicator"
|
|
195
|
-
classList={{
|
|
196
|
-
...local.classList,
|
|
197
|
-
[local.class ?? ""]: !!local.class,
|
|
198
|
-
}}
|
|
199
|
-
>
|
|
200
|
-
{local.children}
|
|
201
|
-
</Kobalte.ItemIndicator>
|
|
202
|
-
)
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
function DropdownMenuRadioGroup(props: ParentProps<DropdownMenuRadioGroupProps>) {
|
|
206
|
-
const [local, rest] = splitProps(props, ["class", "classList", "children"])
|
|
207
|
-
return (
|
|
208
|
-
<Kobalte.RadioGroup
|
|
209
|
-
{...rest}
|
|
210
|
-
data-slot="dropdown-menu-radio-group"
|
|
211
|
-
classList={{
|
|
212
|
-
...local.classList,
|
|
213
|
-
[local.class ?? ""]: !!local.class,
|
|
214
|
-
}}
|
|
215
|
-
>
|
|
216
|
-
{local.children}
|
|
217
|
-
</Kobalte.RadioGroup>
|
|
218
|
-
)
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
function DropdownMenuRadioItem(props: ParentProps<DropdownMenuRadioItemProps>) {
|
|
222
|
-
const [local, rest] = splitProps(props, ["class", "classList", "children"])
|
|
223
|
-
return (
|
|
224
|
-
<Kobalte.RadioItem
|
|
225
|
-
{...rest}
|
|
226
|
-
data-slot="dropdown-menu-radio-item"
|
|
227
|
-
classList={{
|
|
228
|
-
...local.classList,
|
|
229
|
-
[local.class ?? ""]: !!local.class,
|
|
230
|
-
}}
|
|
231
|
-
>
|
|
232
|
-
{local.children}
|
|
233
|
-
</Kobalte.RadioItem>
|
|
234
|
-
)
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
function DropdownMenuCheckboxItem(props: ParentProps<DropdownMenuCheckboxItemProps>) {
|
|
238
|
-
const [local, rest] = splitProps(props, ["class", "classList", "children"])
|
|
239
|
-
return (
|
|
240
|
-
<Kobalte.CheckboxItem
|
|
241
|
-
{...rest}
|
|
242
|
-
data-slot="dropdown-menu-checkbox-item"
|
|
243
|
-
classList={{
|
|
244
|
-
...local.classList,
|
|
245
|
-
[local.class ?? ""]: !!local.class,
|
|
246
|
-
}}
|
|
247
|
-
>
|
|
248
|
-
{local.children}
|
|
249
|
-
</Kobalte.CheckboxItem>
|
|
250
|
-
)
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
function DropdownMenuSub(props: DropdownMenuSubProps) {
|
|
254
|
-
return <Kobalte.Sub {...props} />
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
function DropdownMenuSubTrigger(props: ParentProps<DropdownMenuSubTriggerProps>) {
|
|
258
|
-
const [local, rest] = splitProps(props, ["class", "classList", "children"])
|
|
259
|
-
return (
|
|
260
|
-
<Kobalte.SubTrigger
|
|
261
|
-
{...rest}
|
|
262
|
-
data-slot="dropdown-menu-sub-trigger"
|
|
263
|
-
classList={{
|
|
264
|
-
...local.classList,
|
|
265
|
-
[local.class ?? ""]: !!local.class,
|
|
266
|
-
}}
|
|
267
|
-
>
|
|
268
|
-
{local.children}
|
|
269
|
-
</Kobalte.SubTrigger>
|
|
270
|
-
)
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
function DropdownMenuSubContent(props: ParentProps<DropdownMenuSubContentProps>) {
|
|
274
|
-
const [local, rest] = splitProps(props, ["class", "classList", "children"])
|
|
275
|
-
return (
|
|
276
|
-
<Kobalte.SubContent
|
|
277
|
-
{...rest}
|
|
278
|
-
data-component="dropdown-menu-sub-content"
|
|
279
|
-
classList={{
|
|
280
|
-
...local.classList,
|
|
281
|
-
[local.class ?? ""]: !!local.class,
|
|
282
|
-
}}
|
|
283
|
-
>
|
|
284
|
-
{local.children}
|
|
285
|
-
</Kobalte.SubContent>
|
|
286
|
-
)
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
export const DropdownMenu = Object.assign(DropdownMenuRoot, {
|
|
290
|
-
Trigger: DropdownMenuTrigger,
|
|
291
|
-
Icon: DropdownMenuIcon,
|
|
292
|
-
Portal: DropdownMenuPortal,
|
|
293
|
-
Content: DropdownMenuContent,
|
|
294
|
-
Arrow: DropdownMenuArrow,
|
|
295
|
-
Separator: DropdownMenuSeparator,
|
|
296
|
-
Group: DropdownMenuGroup,
|
|
297
|
-
GroupLabel: DropdownMenuGroupLabel,
|
|
298
|
-
Item: DropdownMenuItem,
|
|
299
|
-
ItemLabel: DropdownMenuItemLabel,
|
|
300
|
-
ItemDescription: DropdownMenuItemDescription,
|
|
301
|
-
ItemIndicator: DropdownMenuItemIndicator,
|
|
302
|
-
RadioGroup: DropdownMenuRadioGroup,
|
|
303
|
-
RadioItem: DropdownMenuRadioItem,
|
|
304
|
-
CheckboxItem: DropdownMenuCheckboxItem,
|
|
305
|
-
Sub: DropdownMenuSub,
|
|
306
|
-
SubTrigger: DropdownMenuSubTrigger,
|
|
307
|
-
SubContent: DropdownMenuSubContent,
|
|
308
|
-
})
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
[data-component="icon-button"] {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
border-radius: var(--radius-sm);
|
|
6
|
-
text-decoration: none;
|
|
7
|
-
user-select: none;
|
|
8
|
-
aspect-ratio: 1;
|
|
9
|
-
flex-shrink: 0;
|
|
10
|
-
|
|
11
|
-
&[data-variant="primary"] {
|
|
12
|
-
background-color: var(--icon-strong-base);
|
|
13
|
-
|
|
14
|
-
[data-slot="icon-svg"] {
|
|
15
|
-
/* color: var(--icon-weak-base); */
|
|
16
|
-
color: var(--icon-invert-base);
|
|
17
|
-
|
|
18
|
-
/* &:hover:not(:disabled) { */
|
|
19
|
-
/* color: var(--icon-weak-hover); */
|
|
20
|
-
/* } */
|
|
21
|
-
/* &:active:not(:disabled) { */
|
|
22
|
-
/* color: var(--icon-strong-active); */
|
|
23
|
-
/* } */
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&:hover:not(:disabled) {
|
|
27
|
-
background-color: var(--icon-strong-hover);
|
|
28
|
-
}
|
|
29
|
-
&:focus:not(:disabled) {
|
|
30
|
-
background-color: var(--icon-strong-focus);
|
|
31
|
-
}
|
|
32
|
-
&:active:not(:disabled) {
|
|
33
|
-
background-color: var(--icon-strong-active);
|
|
34
|
-
}
|
|
35
|
-
&:disabled {
|
|
36
|
-
background-color: var(--icon-strong-disabled);
|
|
37
|
-
|
|
38
|
-
[data-slot="icon-svg"] {
|
|
39
|
-
color: var(--icon-invert-base);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&[data-variant="secondary"] {
|
|
45
|
-
border: transparent;
|
|
46
|
-
background-color: var(--button-secondary-base);
|
|
47
|
-
color: var(--text-strong);
|
|
48
|
-
box-shadow: var(--shadow-xs-border-base);
|
|
49
|
-
|
|
50
|
-
&:hover:not(:disabled) {
|
|
51
|
-
background-color: var(--button-secondary-hover);
|
|
52
|
-
}
|
|
53
|
-
&:focus:not(:disabled) {
|
|
54
|
-
background-color: var(--button-secondary-base);
|
|
55
|
-
}
|
|
56
|
-
&:focus-visible:not(:active) {
|
|
57
|
-
background-color: var(--button-secondary-base);
|
|
58
|
-
box-shadow: var(--shadow-xs-border-focus);
|
|
59
|
-
}
|
|
60
|
-
&:focus-visible:active {
|
|
61
|
-
box-shadow: none;
|
|
62
|
-
}
|
|
63
|
-
&:active:not(:disabled) {
|
|
64
|
-
background-color: var(--button-secondary-base);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
[data-slot="icon-svg"] {
|
|
68
|
-
color: var(--icon-strong-base);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&:disabled {
|
|
72
|
-
background-color: var(--icon-strong-disabled);
|
|
73
|
-
color: var(--icon-invert-base);
|
|
74
|
-
cursor: not-allowed;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&[data-variant="ghost"] {
|
|
79
|
-
background-color: transparent;
|
|
80
|
-
/* color: var(--icon-base); */
|
|
81
|
-
|
|
82
|
-
[data-slot="icon-svg"] {
|
|
83
|
-
color: var(--icon-base);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
&:hover:not(:disabled) {
|
|
87
|
-
background-color: var(--surface-base-hover);
|
|
88
|
-
|
|
89
|
-
/* [data-slot="icon-svg"] { */
|
|
90
|
-
/* color: var(--icon-hover); */
|
|
91
|
-
/* } */
|
|
92
|
-
}
|
|
93
|
-
&:focus-visible:not(:disabled) {
|
|
94
|
-
background-color: var(--surface-base-hover);
|
|
95
|
-
}
|
|
96
|
-
&:active:not(:disabled) {
|
|
97
|
-
background-color: var(--surface-base-active);
|
|
98
|
-
/* [data-slot="icon-svg"] { */
|
|
99
|
-
/* color: var(--icon-active); */
|
|
100
|
-
/* } */
|
|
101
|
-
}
|
|
102
|
-
&:selected:not(:disabled) {
|
|
103
|
-
background-color: var(--surface-base-active);
|
|
104
|
-
/* [data-slot="icon-svg"] { */
|
|
105
|
-
/* color: var(--icon-selected); */
|
|
106
|
-
/* } */
|
|
107
|
-
}
|
|
108
|
-
&:disabled {
|
|
109
|
-
color: var(--icon-invert-base);
|
|
110
|
-
cursor: not-allowed;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
&[data-size="normal"] {
|
|
115
|
-
width: 24px;
|
|
116
|
-
height: 24px;
|
|
117
|
-
|
|
118
|
-
font-size: var(--font-size-small);
|
|
119
|
-
line-height: var(--line-height-large);
|
|
120
|
-
gap: calc(var(--spacing) * 0.5);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
&[data-size="small"] {
|
|
124
|
-
width: 20px;
|
|
125
|
-
height: 20px;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
&[data-size="large"] {
|
|
129
|
-
height: 32px;
|
|
130
|
-
/* padding: 0 8px 0 6px; */
|
|
131
|
-
gap: 8px;
|
|
132
|
-
|
|
133
|
-
/* text-12-medium */
|
|
134
|
-
font-family: var(--font-family-sans);
|
|
135
|
-
font-size: var(--font-size-small);
|
|
136
|
-
font-style: normal;
|
|
137
|
-
font-weight: var(--font-weight-medium);
|
|
138
|
-
line-height: var(--line-height-large); /* 166.667% */
|
|
139
|
-
letter-spacing: var(--letter-spacing-normal);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
&:focus {
|
|
143
|
-
outline: none;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
148
|
-
[data-component="icon-button"][data-icon="stop"] [data-slot="icon-svg"] rect {
|
|
149
|
-
transform-origin: center;
|
|
150
|
-
transform-box: fill-box;
|
|
151
|
-
animation: stop-pulse 1.8s ease-in-out infinite;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
@keyframes stop-pulse {
|
|
156
|
-
0%,
|
|
157
|
-
100% {
|
|
158
|
-
transform: scale(0.95);
|
|
159
|
-
}
|
|
160
|
-
50% {
|
|
161
|
-
transform: scale(1.12);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
[data-component="icon-button"].titlebar-icon {
|
|
166
|
-
width: 32px;
|
|
167
|
-
height: 24px;
|
|
168
|
-
aspect-ratio: auto;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
[data-component="icon-button"].titlebar-icon[data-variant="ghost"][aria-expanded="true"] {
|
|
172
|
-
background-color: var(--surface-raised-base-active);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
[data-component="icon-button"].titlebar-icon[data-variant="ghost"][aria-expanded="true"] [data-slot="icon-svg"] {
|
|
176
|
-
color: var(--icon-strong-base);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
[data-component="icon-button"].titlebar-icon[data-variant="ghost"][aria-expanded="true"]:hover:not(:disabled) {
|
|
180
|
-
background-color: var(--surface-raised-base-active);
|
|
181
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Button as Kobalte } from "@kobalte/core/button"
|
|
2
|
-
import { type ComponentProps, splitProps } from "solid-js"
|
|
3
|
-
import { Icon, IconProps } from "./icon"
|
|
4
|
-
|
|
5
|
-
export interface IconButtonProps extends ComponentProps<typeof Kobalte> {
|
|
6
|
-
icon: IconProps["name"]
|
|
7
|
-
size?: "small" | "normal" | "large"
|
|
8
|
-
iconSize?: IconProps["size"]
|
|
9
|
-
variant?: "primary" | "secondary" | "ghost"
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function IconButton(props: ComponentProps<"button"> & IconButtonProps) {
|
|
13
|
-
const [split, rest] = splitProps(props, ["variant", "size", "iconSize", "class", "classList"])
|
|
14
|
-
return (
|
|
15
|
-
<Kobalte
|
|
16
|
-
{...rest}
|
|
17
|
-
data-component="icon-button"
|
|
18
|
-
data-icon={props.icon}
|
|
19
|
-
data-size={split.size || "normal"}
|
|
20
|
-
data-variant={split.variant || "secondary"}
|
|
21
|
-
classList={{
|
|
22
|
-
...split.classList,
|
|
23
|
-
[split.class ?? ""]: !!split.class,
|
|
24
|
-
}}
|
|
25
|
-
>
|
|
26
|
-
<Icon name={props.icon} size={split.iconSize ?? (split.size === "large" ? "normal" : "small")} />
|
|
27
|
-
</Kobalte>
|
|
28
|
-
)
|
|
29
|
-
}
|
package/src/components/icon.css
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
[data-component="icon"] {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
flex-shrink: 0;
|
|
6
|
-
/* resize: both; */
|
|
7
|
-
aspect-ratio: 1/1;
|
|
8
|
-
color: var(--icon-base);
|
|
9
|
-
|
|
10
|
-
&[data-size="small"] {
|
|
11
|
-
width: 16px;
|
|
12
|
-
height: 16px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&[data-size="normal"] {
|
|
16
|
-
width: 20px;
|
|
17
|
-
height: 20px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&[data-size="medium"] {
|
|
21
|
-
width: 24px;
|
|
22
|
-
height: 24px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&[data-size="large"] {
|
|
26
|
-
width: 24px;
|
|
27
|
-
height: 24px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
[data-slot="icon-svg"] {
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: auto;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
:dir(rtl) [data-component="icon"][data-directional] [data-slot="icon-svg"],
|
|
37
|
-
:dir(rtl) [data-slot="menu-v2-item-chevron"] {
|
|
38
|
-
transform: scaleX(-1);
|
|
39
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
[data-component="keybind"] {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
flex-shrink: 0;
|
|
6
|
-
height: 20px;
|
|
7
|
-
padding: 0 8px;
|
|
8
|
-
border-radius: 2px;
|
|
9
|
-
background: var(--surface-base);
|
|
10
|
-
box-shadow: var(--shadow-xxs-border);
|
|
11
|
-
|
|
12
|
-
/* text-12-regular */
|
|
13
|
-
font-family: var(--font-family-sans);
|
|
14
|
-
font-size: 12px;
|
|
15
|
-
font-weight: var(--font-weight-regular);
|
|
16
|
-
line-height: 1;
|
|
17
|
-
color: var(--text-weak);
|
|
18
|
-
}
|