@stagewise/ui 0.1.0 → 0.2.0
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/README.md +9 -3
- package/package.json +9 -15
- package/src/components/ui/accordion.tsx +13 -15
- package/src/components/ui/alert-dialog.tsx +38 -38
- package/src/components/ui/alert.tsx +22 -22
- package/src/components/ui/aspect-ratio.tsx +6 -6
- package/src/components/ui/avatar.tsx +30 -30
- package/src/components/ui/badge.tsx +24 -22
- package/src/components/ui/breadcrumb.tsx +34 -37
- package/src/components/ui/bubble.tsx +48 -48
- package/src/components/ui/button-group.tsx +24 -24
- package/src/components/ui/button.tsx +24 -24
- package/src/components/ui/calendar.tsx +94 -81
- package/src/components/ui/card.tsx +30 -30
- package/src/components/ui/carousel.tsx +95 -92
- package/src/components/ui/chart.tsx +110 -110
- package/src/components/ui/checkbox.tsx +9 -10
- package/src/components/ui/collapsible.tsx +5 -5
- package/src/components/ui/combobox.tsx +51 -44
- package/src/components/ui/command.tsx +173 -190
- package/src/components/ui/context-menu.tsx +60 -50
- package/src/components/ui/dialog.tsx +33 -34
- package/src/components/ui/direction.tsx +1 -1
- package/src/components/ui/drawer.tsx +61 -61
- package/src/components/ui/dropdown-menu.tsx +54 -50
- package/src/components/ui/empty.tsx +30 -30
- package/src/components/ui/field.tsx +64 -64
- package/src/components/ui/hover-card.tsx +12 -12
- package/src/components/ui/input-group.tsx +54 -54
- package/src/components/ui/input-otp.tsx +24 -25
- package/src/components/ui/input.tsx +8 -8
- package/src/components/ui/item.tsx +64 -64
- package/src/components/ui/kbd.tsx +8 -8
- package/src/components/ui/klex-logo-combo.tsx +69 -0
- package/src/components/ui/klex-logo-text.tsx +70 -0
- package/src/components/ui/klex-logo.tsx +146 -0
- package/src/components/ui/label.tsx +8 -8
- package/src/components/ui/marker.tsx +25 -25
- package/src/components/ui/menubar.tsx +54 -50
- package/src/components/ui/message-scroller.tsx +130 -0
- package/src/components/ui/message.tsx +27 -27
- package/src/components/ui/native-select.tsx +22 -18
- package/src/components/ui/navigation-menu.tsx +37 -34
- package/src/components/ui/pagination.tsx +34 -31
- package/src/components/ui/popover.tsx +19 -19
- package/src/components/ui/progress.tsx +16 -16
- package/src/components/ui/questionnaire.tsx +72 -69
- package/src/components/ui/radio-group.tsx +9 -9
- package/src/components/ui/resizable.tsx +19 -12
- package/src/components/ui/scroll-area.tsx +10 -10
- package/src/components/ui/select.tsx +39 -34
- package/src/components/ui/separator.tsx +7 -7
- package/src/components/ui/sheet.tsx +31 -32
- package/src/components/ui/sidebar.tsx +244 -232
- package/src/components/ui/skeleton.tsx +5 -5
- package/src/components/ui/slider.tsx +11 -7
- package/src/components/ui/spinner.tsx +15 -6
- package/src/components/ui/stagewise-logo-combo.tsx +43 -0
- package/src/components/ui/stagewise-logo-text.tsx +30 -0
- package/src/components/ui/stagewise-logo.tsx +42 -0
- package/src/components/ui/switch.tsx +9 -9
- package/src/components/ui/table.tsx +31 -31
- package/src/components/ui/tabs.tsx +37 -26
- package/src/components/ui/textarea.tsx +7 -7
- package/src/components/ui/toast.tsx +70 -70
- package/src/components/ui/toggle-group.tsx +26 -26
- package/src/components/ui/toggle.tsx +15 -15
- package/src/components/ui/tooltip.tsx +13 -13
- package/src/hooks/use-mobile.ts +13 -11
- package/src/icons/custom/ui-outline-18/IconKlexOutline18.tsx +39 -0
- package/src/icons/custom/ui-outline-18/IconLaptop.tsx +35 -0
- package/src/icons/custom/ui-outline-18/IconSignOut.tsx +33 -0
- package/src/icons/custom/ui-outline-18/index.ts +4 -1
- package/src/icons/index.ts +42 -20
- package/src/icons/nucleo/social-media/IconMicrosoftEntraId.tsx +56 -0
- package/src/icons/nucleo/social-media/index.ts +1 -0
- package/src/icons/nucleo/ui-outline-18/IconArrowDownOutline18.tsx +4 -3
- package/src/icons/nucleo/ui-outline-18/IconArrowTurnRightOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconArrowUpOutline18.tsx +35 -0
- package/src/icons/nucleo/ui-outline-18/IconChartPieOutline18.tsx +4 -3
- package/src/icons/nucleo/ui-outline-18/IconChevronMaximizeDiagonal2Outline18.tsx +33 -0
- package/src/icons/nucleo/ui-outline-18/IconChevronUpOutline18.tsx +4 -3
- package/src/icons/nucleo/ui-outline-18/IconEmptyOutline18.tsx +41 -0
- package/src/icons/nucleo/ui-outline-18/IconEyeOffOutline18.tsx +18 -0
- package/src/icons/nucleo/ui-outline-18/IconLinkBrokenOutline18.tsx +66 -0
- package/src/icons/nucleo/ui-outline-18/IconLock18Outline.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconMinusOutline18.tsx +4 -3
- package/src/icons/nucleo/ui-outline-18/IconMsgs2Outline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconPanelLeftOutline18.tsx +4 -3
- package/src/icons/nucleo/ui-outline-18/IconSidebarLeft2HideOutline18.tsx +63 -0
- package/src/icons/nucleo/ui-outline-18/IconSidebarRight2HideOutline18.tsx +63 -0
- package/src/icons/nucleo/ui-outline-18/index.ts +11 -1
- package/src/icons/provider/IconAnthropic.tsx +15 -0
- package/src/icons/provider/IconCodex.tsx +18 -0
- package/src/icons/provider/IconDiscord.tsx +17 -0
- package/src/icons/provider/IconGemini.tsx +152 -0
- package/src/icons/provider/IconLinear.tsx +9 -0
- package/src/icons/provider/IconOpenAI.tsx +15 -0
- package/src/icons/provider/IconOpenRouter.tsx +24 -0
- package/src/icons/provider/IconSlack.tsx +24 -0
- package/src/icons/provider/IconTelegram.tsx +29 -0
- package/src/icons/provider/IconWhatsapp.tsx +14 -0
- package/src/icons/provider/LICENSE +21 -0
- package/src/icons/provider/index.ts +10 -0
- package/src/index.ts +68 -61
- package/src/lib/utils.ts +3 -3
- package/src/styles/bridge.css +7 -3
- package/src/styles/derived-utilities.css +129 -50
- package/src/styles/index.css +17 -2
- package/src/styles/palette.css +266 -105
- package/src/styles/scroll-fade.css +116 -0
- package/src/styles/tailwind-tokens.css +3 -0
- package/src/styles/theme.css +57 -43
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { Combobox as ComboboxPrimitive } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Combobox as ComboboxPrimitive } from '@base-ui/react';
|
|
3
3
|
|
|
4
|
-
import { cn } from
|
|
5
|
-
import { Button } from
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
import { Button } from './button';
|
|
6
6
|
import {
|
|
7
7
|
InputGroup,
|
|
8
8
|
InputGroupAddon,
|
|
9
9
|
InputGroupButton,
|
|
10
10
|
InputGroupInput,
|
|
11
|
-
} from
|
|
12
|
-
import {
|
|
11
|
+
} from './input-group';
|
|
12
|
+
import {
|
|
13
|
+
IconChevronDownOutline18,
|
|
14
|
+
IconXmarkOutline18,
|
|
15
|
+
IconCheckOutline18,
|
|
16
|
+
} from '../../icons';
|
|
13
17
|
|
|
14
|
-
const Combobox = ComboboxPrimitive.Root
|
|
18
|
+
const Combobox = ComboboxPrimitive.Root;
|
|
15
19
|
|
|
16
20
|
function ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {
|
|
17
|
-
return <ComboboxPrimitive.Value data-slot="combobox-value" {...props}
|
|
21
|
+
return <ComboboxPrimitive.Value data-slot="combobox-value" {...props} />;
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
function ComboboxTrigger({
|
|
@@ -31,7 +35,7 @@ function ComboboxTrigger({
|
|
|
31
35
|
{children}
|
|
32
36
|
<IconChevronDownOutline18 className="pointer-events-none size-4 text-muted-foreground" />
|
|
33
37
|
</ComboboxPrimitive.Trigger>
|
|
34
|
-
)
|
|
38
|
+
);
|
|
35
39
|
}
|
|
36
40
|
|
|
37
41
|
function ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {
|
|
@@ -44,7 +48,7 @@ function ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {
|
|
|
44
48
|
>
|
|
45
49
|
<IconXmarkOutline18 className="pointer-events-none" />
|
|
46
50
|
</ComboboxPrimitive.Clear>
|
|
47
|
-
)
|
|
51
|
+
);
|
|
48
52
|
}
|
|
49
53
|
|
|
50
54
|
function ComboboxInput({
|
|
@@ -55,11 +59,11 @@ function ComboboxInput({
|
|
|
55
59
|
showClear = false,
|
|
56
60
|
...props
|
|
57
61
|
}: ComboboxPrimitive.Input.Props & {
|
|
58
|
-
showTrigger?: boolean
|
|
59
|
-
showClear?: boolean
|
|
62
|
+
showTrigger?: boolean;
|
|
63
|
+
showClear?: boolean;
|
|
60
64
|
}) {
|
|
61
65
|
return (
|
|
62
|
-
<InputGroup className={cn(
|
|
66
|
+
<InputGroup className={cn('w-auto', className)}>
|
|
63
67
|
<ComboboxPrimitive.Input
|
|
64
68
|
render={<InputGroupInput disabled={disabled} />}
|
|
65
69
|
{...props}
|
|
@@ -79,21 +83,21 @@ function ComboboxInput({
|
|
|
79
83
|
</InputGroupAddon>
|
|
80
84
|
{children}
|
|
81
85
|
</InputGroup>
|
|
82
|
-
)
|
|
86
|
+
);
|
|
83
87
|
}
|
|
84
88
|
|
|
85
89
|
function ComboboxContent({
|
|
86
90
|
className,
|
|
87
|
-
side =
|
|
91
|
+
side = 'bottom',
|
|
88
92
|
sideOffset = 6,
|
|
89
|
-
align =
|
|
93
|
+
align = 'start',
|
|
90
94
|
alignOffset = 0,
|
|
91
95
|
anchor,
|
|
92
96
|
...props
|
|
93
97
|
}: ComboboxPrimitive.Popup.Props &
|
|
94
98
|
Pick<
|
|
95
99
|
ComboboxPrimitive.Positioner.Props,
|
|
96
|
-
|
|
100
|
+
'side' | 'align' | 'sideOffset' | 'alignOffset' | 'anchor'
|
|
97
101
|
>) {
|
|
98
102
|
return (
|
|
99
103
|
<ComboboxPrimitive.Portal>
|
|
@@ -108,12 +112,15 @@ function ComboboxContent({
|
|
|
108
112
|
<ComboboxPrimitive.Popup
|
|
109
113
|
data-slot="combobox-content"
|
|
110
114
|
data-chips={!!anchor}
|
|
111
|
-
className={cn(
|
|
115
|
+
className={cn(
|
|
116
|
+
'group/combobox-content max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg text-popover-foreground shadow-md ring-1 ring-foreground/10 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative bg-popover **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!',
|
|
117
|
+
className,
|
|
118
|
+
)}
|
|
112
119
|
{...props}
|
|
113
120
|
/>
|
|
114
121
|
</ComboboxPrimitive.Positioner>
|
|
115
122
|
</ComboboxPrimitive.Portal>
|
|
116
|
-
)
|
|
123
|
+
);
|
|
117
124
|
}
|
|
118
125
|
|
|
119
126
|
function ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {
|
|
@@ -121,12 +128,12 @@ function ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {
|
|
|
121
128
|
<ComboboxPrimitive.List
|
|
122
129
|
data-slot="combobox-list"
|
|
123
130
|
className={cn(
|
|
124
|
-
|
|
125
|
-
className
|
|
131
|
+
'no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0',
|
|
132
|
+
className,
|
|
126
133
|
)}
|
|
127
134
|
{...props}
|
|
128
135
|
/>
|
|
129
|
-
)
|
|
136
|
+
);
|
|
130
137
|
}
|
|
131
138
|
|
|
132
139
|
function ComboboxItem({
|
|
@@ -139,7 +146,7 @@ function ComboboxItem({
|
|
|
139
146
|
data-slot="combobox-item"
|
|
140
147
|
className={cn(
|
|
141
148
|
"relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
142
|
-
className
|
|
149
|
+
className,
|
|
143
150
|
)}
|
|
144
151
|
{...props}
|
|
145
152
|
>
|
|
@@ -152,7 +159,7 @@ function ComboboxItem({
|
|
|
152
159
|
<IconCheckOutline18 className="pointer-events-none" />
|
|
153
160
|
</ComboboxPrimitive.ItemIndicator>
|
|
154
161
|
</ComboboxPrimitive.Item>
|
|
155
|
-
)
|
|
162
|
+
);
|
|
156
163
|
}
|
|
157
164
|
|
|
158
165
|
function ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {
|
|
@@ -162,7 +169,7 @@ function ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {
|
|
|
162
169
|
className={cn(className)}
|
|
163
170
|
{...props}
|
|
164
171
|
/>
|
|
165
|
-
)
|
|
172
|
+
);
|
|
166
173
|
}
|
|
167
174
|
|
|
168
175
|
function ComboboxLabel({
|
|
@@ -172,16 +179,16 @@ function ComboboxLabel({
|
|
|
172
179
|
return (
|
|
173
180
|
<ComboboxPrimitive.GroupLabel
|
|
174
181
|
data-slot="combobox-label"
|
|
175
|
-
className={cn(
|
|
182
|
+
className={cn('px-2 py-1.5 text-xs text-muted-foreground', className)}
|
|
176
183
|
{...props}
|
|
177
184
|
/>
|
|
178
|
-
)
|
|
185
|
+
);
|
|
179
186
|
}
|
|
180
187
|
|
|
181
188
|
function ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {
|
|
182
189
|
return (
|
|
183
190
|
<ComboboxPrimitive.Collection data-slot="combobox-collection" {...props} />
|
|
184
|
-
)
|
|
191
|
+
);
|
|
185
192
|
}
|
|
186
193
|
|
|
187
194
|
function ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {
|
|
@@ -189,12 +196,12 @@ function ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {
|
|
|
189
196
|
<ComboboxPrimitive.Empty
|
|
190
197
|
data-slot="combobox-empty"
|
|
191
198
|
className={cn(
|
|
192
|
-
|
|
193
|
-
className
|
|
199
|
+
'hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex',
|
|
200
|
+
className,
|
|
194
201
|
)}
|
|
195
202
|
{...props}
|
|
196
203
|
/>
|
|
197
|
-
)
|
|
204
|
+
);
|
|
198
205
|
}
|
|
199
206
|
|
|
200
207
|
function ComboboxSeparator({
|
|
@@ -204,10 +211,10 @@ function ComboboxSeparator({
|
|
|
204
211
|
return (
|
|
205
212
|
<ComboboxPrimitive.Separator
|
|
206
213
|
data-slot="combobox-separator"
|
|
207
|
-
className={cn(
|
|
214
|
+
className={cn('-mx-1 my-1 h-px bg-border', className)}
|
|
208
215
|
{...props}
|
|
209
216
|
/>
|
|
210
|
-
)
|
|
217
|
+
);
|
|
211
218
|
}
|
|
212
219
|
|
|
213
220
|
function ComboboxChips({
|
|
@@ -219,12 +226,12 @@ function ComboboxChips({
|
|
|
219
226
|
<ComboboxPrimitive.Chips
|
|
220
227
|
data-slot="combobox-chips"
|
|
221
228
|
className={cn(
|
|
222
|
-
|
|
223
|
-
className
|
|
229
|
+
'flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-derived-strong bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40',
|
|
230
|
+
className,
|
|
224
231
|
)}
|
|
225
232
|
{...props}
|
|
226
233
|
/>
|
|
227
|
-
)
|
|
234
|
+
);
|
|
228
235
|
}
|
|
229
236
|
|
|
230
237
|
function ComboboxChip({
|
|
@@ -233,14 +240,14 @@ function ComboboxChip({
|
|
|
233
240
|
showRemove = true,
|
|
234
241
|
...props
|
|
235
242
|
}: ComboboxPrimitive.Chip.Props & {
|
|
236
|
-
showRemove?: boolean
|
|
243
|
+
showRemove?: boolean;
|
|
237
244
|
}) {
|
|
238
245
|
return (
|
|
239
246
|
<ComboboxPrimitive.Chip
|
|
240
247
|
data-slot="combobox-chip"
|
|
241
248
|
className={cn(
|
|
242
|
-
|
|
243
|
-
className
|
|
249
|
+
'flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0',
|
|
250
|
+
className,
|
|
244
251
|
)}
|
|
245
252
|
{...props}
|
|
246
253
|
>
|
|
@@ -255,7 +262,7 @@ function ComboboxChip({
|
|
|
255
262
|
</ComboboxPrimitive.ChipRemove>
|
|
256
263
|
)}
|
|
257
264
|
</ComboboxPrimitive.Chip>
|
|
258
|
-
)
|
|
265
|
+
);
|
|
259
266
|
}
|
|
260
267
|
|
|
261
268
|
function ComboboxChipsInput({
|
|
@@ -265,14 +272,14 @@ function ComboboxChipsInput({
|
|
|
265
272
|
return (
|
|
266
273
|
<ComboboxPrimitive.Input
|
|
267
274
|
data-slot="combobox-chip-input"
|
|
268
|
-
className={cn(
|
|
275
|
+
className={cn('min-w-16 flex-1 outline-none', className)}
|
|
269
276
|
{...props}
|
|
270
277
|
/>
|
|
271
|
-
)
|
|
278
|
+
);
|
|
272
279
|
}
|
|
273
280
|
|
|
274
281
|
function useComboboxAnchor() {
|
|
275
|
-
return React.useRef<HTMLDivElement | null>(null)
|
|
282
|
+
return React.useRef<HTMLDivElement | null>(null);
|
|
276
283
|
}
|
|
277
284
|
|
|
278
285
|
export {
|
|
@@ -292,4 +299,4 @@ export {
|
|
|
292
299
|
ComboboxTrigger,
|
|
293
300
|
ComboboxValue,
|
|
294
301
|
useComboboxAnchor,
|
|
295
|
-
}
|
|
302
|
+
};
|