@burtson-labs/ui 0.14.0 → 0.15.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/LICENSES/DEPENDENCIES.txt +1 -1
- package/README.md +15 -11
- package/dist/components/accordion.d.ts +3 -3
- package/dist/components/accordion.js +13 -10
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/agent-run.d.ts +22 -0
- package/dist/components/agent-run.js +131 -0
- package/dist/components/agent-run.js.map +1 -0
- package/dist/components/alert-dialog.d.ts +12 -10
- package/dist/components/alert-dialog.js +29 -20
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.d.ts +5 -3
- package/dist/components/alert.js +11 -7
- package/dist/components/alert.js.map +1 -1
- package/dist/components/app-shell.d.ts +7 -6
- package/dist/components/app-shell.js +21 -14
- package/dist/components/app-shell.js.map +1 -1
- package/dist/components/attachment.d.ts +3 -3
- package/dist/components/attachment.js +10 -7
- package/dist/components/attachment.js.map +1 -1
- package/dist/components/audio-player.d.ts +2 -2
- package/dist/components/audio-player.js +8 -6
- package/dist/components/audio-player.js.map +1 -1
- package/dist/components/avatar-upload.d.ts +19 -0
- package/dist/components/avatar-upload.js +359 -0
- package/dist/components/avatar-upload.js.map +1 -0
- package/dist/components/avatar.d.ts +3 -3
- package/dist/components/avatar.js +10 -7
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.js +12 -10
- package/dist/components/badge.js.map +1 -1
- package/dist/components/breadcrumb.d.ts +8 -8
- package/dist/components/breadcrumb.js +24 -17
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button.d.ts +8 -1
- package/dist/components/button.js +12 -3
- package/dist/components/button.js.map +1 -1
- package/dist/components/card.d.ts +8 -8
- package/dist/components/card.js +32 -23
- package/dist/components/card.js.map +1 -1
- package/dist/components/chat-history.d.ts +1 -1
- package/dist/components/chat-history.js +10 -9
- package/dist/components/chat-history.js.map +1 -1
- package/dist/components/chat-layout.d.ts +1 -1
- package/dist/components/chat-layout.js +7 -3
- package/dist/components/chat-layout.js.map +1 -1
- package/dist/components/checkbox-card.d.ts +2 -2
- package/dist/components/checkbox-card.js +9 -7
- package/dist/components/checkbox-card.js.map +1 -1
- package/dist/components/checkbox.d.ts +23 -2
- package/dist/components/checkbox.js +48 -6
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/collapsible.d.ts +2 -2
- package/dist/components/collapsible.js +7 -5
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.d.ts +14 -4
- package/dist/components/combobox.js +18 -8
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.d.ts +68 -12
- package/dist/components/command.js +38 -25
- package/dist/components/command.js.map +1 -1
- package/dist/components/composer.d.ts +2 -2
- package/dist/components/composer.js +9 -7
- package/dist/components/composer.js.map +1 -1
- package/dist/components/connection-status.d.ts +3 -3
- package/dist/components/connection-status.js +18 -14
- package/dist/components/connection-status.js.map +1 -1
- package/dist/components/context-menu.d.ts +14 -13
- package/dist/components/context-menu.js +33 -23
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/conversation.d.ts +1 -1
- package/dist/components/conversation.js +6 -5
- package/dist/components/conversation.js.map +1 -1
- package/dist/components/copy-button.d.ts +1 -1
- package/dist/components/copy-button.js +3 -2
- package/dist/components/copy-button.js.map +1 -1
- package/dist/components/data-table.d.ts +7 -2
- package/dist/components/data-table.js +16 -42
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/dialog.d.ts +18 -9
- package/dist/components/dialog.js +38 -22
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/dropdown-menu.d.ts +14 -13
- package/dist/components/dropdown-menu.js +33 -23
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/editor-tabs.d.ts +1 -1
- package/dist/components/editor-tabs.js +6 -5
- package/dist/components/editor-tabs.js.map +1 -1
- package/dist/components/empty-state.d.ts +5 -5
- package/dist/components/empty-state.js +16 -11
- package/dist/components/empty-state.js.map +1 -1
- package/dist/components/error-summary.d.ts +21 -0
- package/dist/components/error-summary.js +62 -0
- package/dist/components/error-summary.js.map +1 -0
- package/dist/components/field.d.ts +66 -7
- package/dist/components/field.js +151 -20
- package/dist/components/field.js.map +1 -1
- package/dist/components/form-actions.d.ts +18 -0
- package/dist/components/form-actions.js +30 -0
- package/dist/components/form-actions.js.map +1 -0
- package/dist/components/icon-button.d.ts +3 -1
- package/dist/components/icon-button.js +5 -3
- package/dist/components/icon-button.js.map +1 -1
- package/dist/components/input.d.ts +42 -7
- package/dist/components/input.js +53 -10
- package/dist/components/input.js.map +1 -1
- package/dist/components/kbd.d.ts +2 -2
- package/dist/components/kbd.js +7 -5
- package/dist/components/kbd.js.map +1 -1
- package/dist/components/label.d.ts +6 -1
- package/dist/components/label.js +10 -4
- package/dist/components/label.js.map +1 -1
- package/dist/components/markdown.d.ts +4 -3
- package/dist/components/markdown.js +7 -6
- package/dist/components/markdown.js.map +1 -1
- package/dist/components/menubar.d.ts +16 -14
- package/dist/components/menubar.js +39 -27
- package/dist/components/menubar.js.map +1 -1
- package/dist/components/message-actions.d.ts +3 -3
- package/dist/components/message-actions.js +15 -12
- package/dist/components/message-actions.js.map +1 -1
- package/dist/components/message.d.ts +1 -1
- package/dist/components/message.js +5 -3
- package/dist/components/message.js.map +1 -1
- package/dist/components/mobile-nav.d.ts +1 -1
- package/dist/components/mobile-nav.js +6 -5
- package/dist/components/mobile-nav.js.map +1 -1
- package/dist/components/native-select.d.ts +16 -0
- package/dist/components/native-select.js +33 -0
- package/dist/components/native-select.js.map +1 -0
- package/dist/components/navigation-menu.d.ts +12 -11
- package/dist/components/navigation-menu.js +32 -23
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/number-input.d.ts +23 -0
- package/dist/components/number-input.js +45 -0
- package/dist/components/number-input.js.map +1 -0
- package/dist/components/onboarding-checklist.d.ts +1 -1
- package/dist/components/onboarding-checklist.js +4 -3
- package/dist/components/onboarding-checklist.js.map +1 -1
- package/dist/components/page-header.d.ts +7 -6
- package/dist/components/page-header.js +22 -15
- package/dist/components/page-header.js.map +1 -1
- package/dist/components/pagination.d.ts +1 -1
- package/dist/components/pagination.js +3 -2
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/popover.d.ts +13 -10
- package/dist/components/popover.js +23 -17
- package/dist/components/popover.js.map +1 -1
- package/dist/components/progress.d.ts +1 -1
- package/dist/components/progress.js +6 -5
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.d.ts +22 -3
- package/dist/components/radio-group.js +51 -10
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/reasoning.d.ts +3 -3
- package/dist/components/reasoning.js +9 -7
- package/dist/components/reasoning.js.map +1 -1
- package/dist/components/scroll-area.d.ts +3 -2
- package/dist/components/scroll-area.js +10 -7
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/secret-input.d.ts +3 -2
- package/dist/components/secret-input.js +6 -4
- package/dist/components/secret-input.js.map +1 -1
- package/dist/components/select.d.ts +11 -6
- package/dist/components/select.js +24 -18
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.d.ts +1 -1
- package/dist/components/separator.js +4 -3
- package/dist/components/separator.js.map +1 -1
- package/dist/components/sheet.d.ts +10 -8
- package/dist/components/sheet.js +31 -20
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/skeleton.d.ts +2 -1
- package/dist/components/skeleton.js +6 -4
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/slider.d.ts +10 -6
- package/dist/components/slider.js +15 -7
- package/dist/components/slider.js.map +1 -1
- package/dist/components/source.d.ts +2 -2
- package/dist/components/source.js +9 -7
- package/dist/components/source.js.map +1 -1
- package/dist/components/spinner.d.ts +4 -2
- package/dist/components/spinner.js +4 -3
- package/dist/components/spinner.js.map +1 -1
- package/dist/components/stat-card.d.ts +27 -2
- package/dist/components/stat-card.js +69 -9
- package/dist/components/stat-card.js.map +1 -1
- package/dist/components/status.d.ts +7 -6
- package/dist/components/status.js +11 -5
- package/dist/components/status.js.map +1 -1
- package/dist/components/steps.d.ts +1 -1
- package/dist/components/steps.js +4 -3
- package/dist/components/steps.js.map +1 -1
- package/dist/components/switch.d.ts +46 -2
- package/dist/components/switch.js +85 -8
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.d.ts +29 -12
- package/dist/components/table.js +79 -34
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.d.ts +9 -4
- package/dist/components/tabs.js +22 -13
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/textarea.d.ts +6 -1
- package/dist/components/textarea.js +3 -3
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/toast.d.ts +10 -6
- package/dist/components/toast.js +27 -18
- package/dist/components/toast.js.map +1 -1
- package/dist/components/toaster.d.ts +4 -2
- package/dist/components/toaster.js +6 -2
- package/dist/components/toaster.js.map +1 -1
- package/dist/components/tool-call.d.ts +3 -3
- package/dist/components/tool-call.js +16 -12
- package/dist/components/tool-call.js.map +1 -1
- package/dist/components/toolbar.d.ts +9 -4
- package/dist/components/toolbar.js +14 -9
- package/dist/components/toolbar.js.map +1 -1
- package/dist/components/tooltip.d.ts +3 -2
- package/dist/components/tooltip.js +7 -4
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/tour.js +2 -2
- package/dist/components/tour.js.map +1 -1
- package/dist/components/tree-view.d.ts +1 -1
- package/dist/components/tree-view.js +9 -5
- package/dist/components/tree-view.js.map +1 -1
- package/dist/components/voice-recorder.d.ts +1 -1
- package/dist/components/voice-recorder.js +4 -2
- package/dist/components/voice-recorder.js.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +19 -12
- package/dist/lib/media.d.ts +18 -0
- package/dist/lib/media.js +34 -0
- package/dist/lib/media.js.map +1 -0
- package/dist/lib/utils.d.ts +32 -0
- package/dist/lib/utils.js +33 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/mui/index.js +20 -8
- package/dist/mui/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme.css +36 -17
- package/dist/tokens.d.ts +78 -36
- package/dist/tokens.js +63 -32
- package/dist/tokens.js.map +1 -1
- package/package.json +5 -3
|
@@ -1,29 +1,70 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { cn, focusRingClasses, noOutlineClasses, touchTargetClasses } from "../lib/utils.js";
|
|
3
3
|
import { Indicator as RadioGroupIndicator, Item as RadioGroupItem$1, RadioGroup as RadioGroup$1 } from "../primitives/vendor/radix/react-radio-group/radio-group.js";
|
|
4
|
-
import "react";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/radio-group.tsx
|
|
7
|
-
function RadioGroup({ className, ...props }) {
|
|
7
|
+
var RadioGroup = React.forwardRef(function RadioGroup({ className, ...props }, ref) {
|
|
8
8
|
return /* @__PURE__ */ jsx(RadioGroup$1, {
|
|
9
|
+
ref,
|
|
9
10
|
"data-slot": "radio-group",
|
|
10
11
|
className: cn("grid gap-3", className),
|
|
11
12
|
...props
|
|
12
13
|
});
|
|
13
|
-
}
|
|
14
|
-
|
|
14
|
+
});
|
|
15
|
+
/**
|
|
16
|
+
* A 16px dot with a 44px hit area on touch screens; focus is the shared 2px
|
|
17
|
+
* outline. Chosen, it is primary in light mode and brand in dark mode (see
|
|
18
|
+
* Checkbox).
|
|
19
|
+
*/
|
|
20
|
+
var RadioGroupItem = React.forwardRef(function RadioGroupItem({ className, ...props }, ref) {
|
|
15
21
|
return /* @__PURE__ */ jsx(RadioGroupItem$1, {
|
|
22
|
+
ref,
|
|
16
23
|
"data-slot": "radio-group-item",
|
|
17
|
-
className: cn("aspect-square size-4 shrink-0 rounded-full border border-
|
|
24
|
+
className: cn("aspect-square size-4 shrink-0 rounded-full border border-input bg-surface text-primary shadow-xs transition-[border-color,box-shadow] hover:border-brand/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive data-[state=checked]:border-primary dark:text-brand dark:data-[state=checked]:border-brand", focusRingClasses, touchTargetClasses, className),
|
|
18
25
|
...props,
|
|
19
26
|
children: /* @__PURE__ */ jsx(RadioGroupIndicator, {
|
|
20
27
|
"data-slot": "radio-group-indicator",
|
|
21
28
|
className: "relative flex items-center justify-center",
|
|
22
|
-
children: /* @__PURE__ */ jsx("span", { className: "size-2 rounded-full bg-
|
|
29
|
+
children: /* @__PURE__ */ jsx("span", { className: "size-2 rounded-full bg-current" })
|
|
23
30
|
})
|
|
24
31
|
});
|
|
25
|
-
}
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* One option of a RadioGroup as a bordered card: the dot, a title and a line
|
|
35
|
+
* of help, the whole card the target (44px or taller). The chosen card takes
|
|
36
|
+
* the brand border; focus shows once, on the card. Pairs with CheckboxCard.
|
|
37
|
+
*/
|
|
38
|
+
var RadioCard = React.forwardRef(function RadioCard({ title, description, id: idProp, disabled, className, cardClassName, ...props }, ref) {
|
|
39
|
+
const auto = React.useId();
|
|
40
|
+
const id = idProp ?? auto;
|
|
41
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
42
|
+
htmlFor: id,
|
|
43
|
+
"data-slot": "radio-card",
|
|
44
|
+
className: cn("flex min-h-11 cursor-pointer items-start gap-3 rounded-md border border-border bg-surface px-3 py-2.5 transition-colors hover:border-border-strong", "has-[[data-state=checked]]:border-brand/40 has-[[data-state=checked]]:bg-brand-soft/50", "has-[:focus-visible]:border-ring has-[:focus-visible]:inset-ring-1 has-[:focus-visible]:inset-ring-ring", "has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-60 has-[:disabled]:hover:border-border", cardClassName),
|
|
45
|
+
children: [/* @__PURE__ */ jsx(RadioGroupItem, {
|
|
46
|
+
ref,
|
|
47
|
+
id,
|
|
48
|
+
disabled,
|
|
49
|
+
"aria-labelledby": `${id}-title`,
|
|
50
|
+
"aria-describedby": description ? `${id}-description` : void 0,
|
|
51
|
+
className: cn("mt-0.5 focus-visible:outline-none", noOutlineClasses, className),
|
|
52
|
+
...props
|
|
53
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
54
|
+
className: "grid min-w-0 gap-0.5",
|
|
55
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
56
|
+
id: `${id}-title`,
|
|
57
|
+
className: "text-sm leading-5 font-medium",
|
|
58
|
+
children: title
|
|
59
|
+
}), description && /* @__PURE__ */ jsx("span", {
|
|
60
|
+
id: `${id}-description`,
|
|
61
|
+
className: "text-[13px] leading-5 text-muted-foreground",
|
|
62
|
+
children: description
|
|
63
|
+
})]
|
|
64
|
+
})]
|
|
65
|
+
});
|
|
66
|
+
});
|
|
26
67
|
//#endregion
|
|
27
|
-
export { RadioGroup, RadioGroupItem };
|
|
68
|
+
export { RadioCard, RadioGroup, RadioGroupItem };
|
|
28
69
|
|
|
29
70
|
//# sourceMappingURL=radio-group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.js","names":["RadioGroupPrimitive.Root","RadioGroupPrimitive.Item","RadioGroupPrimitive.Indicator"],"sources":["../../src/components/radio-group.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../lib/utils';\nimport * as RadioGroupPrimitive from '../primitives/vendor/radix/react-radio-group';\n\
|
|
1
|
+
{"version":3,"file":"radio-group.js","names":["RadioGroupPrimitive.Root","RadioGroupPrimitive.Item","RadioGroupPrimitive.Indicator"],"sources":["../../src/components/radio-group.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn, focusRingClasses, noOutlineClasses, touchTargetClasses } from '../lib/utils';\nimport * as RadioGroupPrimitive from '../primitives/vendor/radix/react-radio-group';\n\nconst RadioGroup = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof RadioGroupPrimitive.Root>\n>(function RadioGroup({ className, ...props }, ref) {\n return (\n <RadioGroupPrimitive.Root\n ref={ref}\n data-slot=\"radio-group\"\n className={cn('grid gap-3', className)}\n {...props}\n />\n );\n});\n\n/**\n * A 16px dot with a 44px hit area on touch screens; focus is the shared 2px\n * outline. Chosen, it is primary in light mode and brand in dark mode (see\n * Checkbox).\n */\nconst RadioGroupItem = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof RadioGroupPrimitive.Item>\n>(function RadioGroupItem({ className, ...props }, ref) {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n data-slot=\"radio-group-item\"\n className={cn(\n 'aspect-square size-4 shrink-0 rounded-full border border-input bg-surface text-primary shadow-xs transition-[border-color,box-shadow] hover:border-brand/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive data-[state=checked]:border-primary dark:text-brand dark:data-[state=checked]:border-brand',\n focusRingClasses,\n touchTargetClasses,\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"relative flex items-center justify-center\"\n >\n <span className=\"size-2 rounded-full bg-current\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n});\n\nexport interface RadioCardProps extends Omit<\n React.ComponentProps<typeof RadioGroupPrimitive.Item>,\n 'title' | 'children'\n> {\n /** The option's name. */\n title: React.ReactNode;\n /** A sentence under the name: what choosing it means. */\n description?: React.ReactNode;\n /** Extra classes for the card (the label); className goes to the radio. */\n cardClassName?: string;\n}\n\n/**\n * One option of a RadioGroup as a bordered card: the dot, a title and a line\n * of help, the whole card the target (44px or taller). The chosen card takes\n * the brand border; focus shows once, on the card. Pairs with CheckboxCard.\n */\nconst RadioCard = React.forwardRef<HTMLButtonElement, RadioCardProps>(function RadioCard(\n { title, description, id: idProp, disabled, className, cardClassName, ...props },\n ref,\n) {\n const auto = React.useId();\n const id = idProp ?? auto;\n return (\n <label\n htmlFor={id}\n data-slot=\"radio-card\"\n className={cn(\n 'flex min-h-11 cursor-pointer items-start gap-3 rounded-md border border-border bg-surface px-3 py-2.5 transition-colors hover:border-border-strong',\n 'has-[[data-state=checked]]:border-brand/40 has-[[data-state=checked]]:bg-brand-soft/50',\n 'has-[:focus-visible]:border-ring has-[:focus-visible]:inset-ring-1 has-[:focus-visible]:inset-ring-ring',\n 'has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-60 has-[:disabled]:hover:border-border',\n cardClassName,\n )}\n >\n <RadioGroupItem\n ref={ref}\n id={id}\n disabled={disabled}\n aria-labelledby={`${id}-title`}\n aria-describedby={description ? `${id}-description` : undefined}\n // The card draws the focus ring; the dot keeps a system outline in forced colors.\n className={cn('mt-0.5 focus-visible:outline-none', noOutlineClasses, className)}\n {...props}\n />\n <span className=\"grid min-w-0 gap-0.5\">\n <span id={`${id}-title`} className=\"text-sm leading-5 font-medium\">\n {title}\n </span>\n {description && (\n <span id={`${id}-description`} className=\"text-[13px] leading-5 text-muted-foreground\">\n {description}\n </span>\n )}\n </span>\n </label>\n );\n});\n\nexport { RadioCard, RadioGroup, RadioGroupItem };\n"],"mappings":";;;;;;AAKA,IAAM,aAAa,MAAM,WAGvB,SAAS,WAAW,EAAE,WAAW,GAAG,SAAS,KAAK;CAClD,OACE,oBAACA,cAAD;EACO;EACL,aAAU;EACV,WAAW,GAAG,cAAc,SAAS;EACrC,GAAI;CACL,CAAA;AAEL,CAAC;;;;;;AAOD,IAAM,iBAAiB,MAAM,WAG3B,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACtD,OACE,oBAACC,kBAAD;EACO;EACL,aAAU;EACV,WAAW,GACT,0UACA,kBACA,oBACA,SACF;EACA,GAAI;EAEJ,UAAA,oBAACC,qBAAD;GACE,aAAU;GACV,WAAU;GAEV,UAAA,oBAAC,QAAD,EAAM,WAAU,iCAAkC,CAAA;EACrB,CAAA;CACP,CAAA;AAE9B,CAAC;;;;;;AAmBD,IAAM,YAAY,MAAM,WAA8C,SAAS,UAC7E,EAAE,OAAO,aAAa,IAAI,QAAQ,UAAU,WAAW,eAAe,GAAG,SACzE,KACA;CACA,MAAM,OAAO,MAAM,MAAM;CACzB,MAAM,KAAK,UAAU;CACrB,OACE,qBAAC,SAAD;EACE,SAAS;EACT,aAAU;EACV,WAAW,GACT,sJACA,0FACA,2GACA,qGACA,aACF;EATF,UAAA,CAWE,oBAAC,gBAAD;GACO;GACD;GACM;GACV,mBAAiB,GAAG,GAAG;GACvB,oBAAkB,cAAc,GAAG,GAAG,gBAAgB,KAAA;GAEtD,WAAW,GAAG,qCAAqC,kBAAkB,SAAS;GAC9E,GAAI;EACL,CAAA,GACD,qBAAC,QAAD;GAAM,WAAU;GAAhB,UAAA,CACE,oBAAC,QAAD;IAAM,IAAI,GAAG,GAAG;IAAS,WAAU;IAChC,UAAA;GACG,CAAA,GACL,eACC,oBAAC,QAAD;IAAM,IAAI,GAAG,GAAG;IAAe,WAAU;IACtC,UAAA;GACG,CAAA,CAEJ;EACD,CAAA,CAAA;;AAEX,CAAC"}
|
|
@@ -6,9 +6,9 @@ export interface ReasoningProps extends React.ComponentProps<'div'> {
|
|
|
6
6
|
defaultOpen?: boolean;
|
|
7
7
|
}
|
|
8
8
|
/** A model's reasoning, collapsed to one line ("Thought for 3s") unless opened. */
|
|
9
|
-
declare
|
|
9
|
+
declare const Reasoning: React.ForwardRefExoticComponent<Omit<ReasoningProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
/** Three pulsing dots while a reply is on its way. Still under reduced motion. */
|
|
11
|
-
declare
|
|
11
|
+
declare const StreamingIndicator: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLSpanElement> & React.HTMLAttributes<HTMLSpanElement> & {
|
|
12
12
|
label?: string;
|
|
13
|
-
}
|
|
13
|
+
}, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
14
14
|
export { Reasoning, StreamingIndicator };
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { cn, focusRingClasses } from "../lib/utils.js";
|
|
3
3
|
import { Content, Root, Trigger } from "../primitives/vendor/radix/react-collapsible/collapsible.js";
|
|
4
|
-
import "react";
|
|
4
|
+
import * as React from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import ChevronRight from "@burtson-labs/icons/react/chevron-right";
|
|
7
7
|
import Lightbulb from "@burtson-labs/icons/react/lightbulb";
|
|
8
8
|
//#region src/components/reasoning.tsx
|
|
9
9
|
/** A model's reasoning, collapsed to one line ("Thought for 3s") unless opened. */
|
|
10
|
-
function Reasoning({ streaming = false, durationMs, defaultOpen = false, children, className, ...props }) {
|
|
10
|
+
var Reasoning = React.forwardRef(function Reasoning({ streaming = false, durationMs, defaultOpen = false, children, className, ...props }, ref) {
|
|
11
11
|
const label = streaming ? "Thinking…" : durationMs !== void 0 ? `Thought for ${Math.max(1, Math.round(durationMs / 1e3))}s` : "Reasoning";
|
|
12
12
|
return /* @__PURE__ */ jsx(Root, {
|
|
13
13
|
defaultOpen,
|
|
14
14
|
children: /* @__PURE__ */ jsxs("div", {
|
|
15
|
+
ref,
|
|
15
16
|
"data-slot": "reasoning",
|
|
16
17
|
className: cn("grid gap-1.5", className),
|
|
17
18
|
...props,
|
|
18
19
|
children: [/* @__PURE__ */ jsxs(Trigger, {
|
|
19
|
-
className: "group/reasoning inline-flex w-fit items-center gap-1.5 rounded-sm text-xs text-muted-foreground
|
|
20
|
+
className: cn("group/reasoning inline-flex w-fit items-center gap-1.5 rounded-sm text-xs text-muted-foreground hover:text-foreground pointer-coarse:min-h-11", focusRingClasses),
|
|
20
21
|
children: [
|
|
21
22
|
/* @__PURE__ */ jsx(Lightbulb, {
|
|
22
23
|
className: cn("size-3.5", streaming && "animate-pulse"),
|
|
@@ -37,10 +38,11 @@ function Reasoning({ streaming = false, durationMs, defaultOpen = false, childre
|
|
|
37
38
|
})]
|
|
38
39
|
})
|
|
39
40
|
});
|
|
40
|
-
}
|
|
41
|
+
});
|
|
41
42
|
/** Three pulsing dots while a reply is on its way. Still under reduced motion. */
|
|
42
|
-
function StreamingIndicator({ className, label = "Assistant is typing", ...props }) {
|
|
43
|
+
var StreamingIndicator = React.forwardRef(function StreamingIndicator({ className, label = "Assistant is typing", ...props }, ref) {
|
|
43
44
|
return /* @__PURE__ */ jsx("span", {
|
|
45
|
+
ref,
|
|
44
46
|
"data-slot": "streaming-indicator",
|
|
45
47
|
role: "status",
|
|
46
48
|
"aria-label": label,
|
|
@@ -55,7 +57,7 @@ function StreamingIndicator({ className, label = "Assistant is typing", ...props
|
|
|
55
57
|
style: { animationDelay: `${delay}ms` }
|
|
56
58
|
}, delay))
|
|
57
59
|
});
|
|
58
|
-
}
|
|
60
|
+
});
|
|
59
61
|
//#endregion
|
|
60
62
|
export { Reasoning, StreamingIndicator };
|
|
61
63
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reasoning.js","names":["CollapsiblePrimitive.Root","CollapsiblePrimitive.Trigger","CollapsiblePrimitive.Content"],"sources":["../../src/components/reasoning.tsx"],"sourcesContent":["import ChevronRight from '@burtson-labs/icons/react/chevron-right';\nimport Lightbulb from '@burtson-labs/icons/react/lightbulb';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\nimport * as CollapsiblePrimitive from '../primitives/vendor/radix/react-collapsible';\n\nexport interface ReasoningProps extends React.ComponentProps<'div'> {\n /** True while the model is still thinking. */\n streaming?: boolean;\n durationMs?: number;\n defaultOpen?: boolean;\n}\n\n/** A model's reasoning, collapsed to one line (\"Thought for 3s\") unless opened. */\
|
|
1
|
+
{"version":3,"file":"reasoning.js","names":["CollapsiblePrimitive.Root","CollapsiblePrimitive.Trigger","CollapsiblePrimitive.Content"],"sources":["../../src/components/reasoning.tsx"],"sourcesContent":["import ChevronRight from '@burtson-labs/icons/react/chevron-right';\nimport Lightbulb from '@burtson-labs/icons/react/lightbulb';\nimport * as React from 'react';\n\nimport { cn, focusRingClasses } from '../lib/utils';\nimport * as CollapsiblePrimitive from '../primitives/vendor/radix/react-collapsible';\n\nexport interface ReasoningProps extends React.ComponentProps<'div'> {\n /** True while the model is still thinking. */\n streaming?: boolean;\n durationMs?: number;\n defaultOpen?: boolean;\n}\n\n/** A model's reasoning, collapsed to one line (\"Thought for 3s\") unless opened. */\nconst Reasoning = React.forwardRef<HTMLDivElement, ReasoningProps>(function Reasoning(\n { streaming = false, durationMs, defaultOpen = false, children, className, ...props },\n ref,\n) {\n const label = streaming\n ? 'Thinking…'\n : durationMs !== undefined\n ? `Thought for ${Math.max(1, Math.round(durationMs / 1000))}s`\n : 'Reasoning';\n return (\n <CollapsiblePrimitive.Root defaultOpen={defaultOpen}>\n <div ref={ref} data-slot=\"reasoning\" className={cn('grid gap-1.5', className)} {...props}>\n <CollapsiblePrimitive.Trigger\n className={cn(\n 'group/reasoning inline-flex w-fit items-center gap-1.5 rounded-sm text-xs text-muted-foreground hover:text-foreground pointer-coarse:min-h-11',\n focusRingClasses,\n )}\n >\n <Lightbulb className={cn('size-3.5', streaming && 'animate-pulse')} aria-hidden />\n {label}\n <ChevronRight\n aria-hidden\n className=\"size-3.5 transition-transform group-data-[state=open]/reasoning:rotate-90\"\n />\n </CollapsiblePrimitive.Trigger>\n <CollapsiblePrimitive.Content className=\"overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down\">\n <div className=\"border-l-2 border-border-strong pl-3 text-[13px] leading-6 text-muted-foreground\">\n {children}\n </div>\n </CollapsiblePrimitive.Content>\n </div>\n </CollapsiblePrimitive.Root>\n );\n});\n\n/** Three pulsing dots while a reply is on its way. Still under reduced motion. */\nconst StreamingIndicator = React.forwardRef<\n HTMLSpanElement,\n React.ComponentProps<'span'> & { label?: string }\n>(function StreamingIndicator({ className, label = 'Assistant is typing', ...props }, ref) {\n return (\n <span\n ref={ref}\n data-slot=\"streaming-indicator\"\n role=\"status\"\n aria-label={label}\n className={cn('inline-flex h-5 items-center gap-1', className)}\n {...props}\n >\n {[0, 150, 300].map((delay) => (\n <span\n key={delay}\n className=\"size-1.5 animate-bounce rounded-full bg-muted-foreground motion-reduce:animate-none\"\n style={{ animationDelay: `${delay}ms` }}\n />\n ))}\n </span>\n );\n});\n\nexport { Reasoning, StreamingIndicator };\n"],"mappings":";;;;;;;;;AAeA,IAAM,YAAY,MAAM,WAA2C,SAAS,UAC1E,EAAE,YAAY,OAAO,YAAY,cAAc,OAAO,UAAU,WAAW,GAAG,SAC9E,KACA;CACA,MAAM,QAAQ,YACV,cACA,eAAe,KAAA,IACb,eAAe,KAAK,IAAI,GAAG,KAAK,MAAM,aAAa,GAAI,CAAC,EAAE,KAC1D;CACN,OACE,oBAACA,MAAD;EAAwC;EACtC,UAAA,qBAAC,OAAD;GAAU;GAAK,aAAU;GAAY,WAAW,GAAG,gBAAgB,SAAS;GAAG,GAAI;GAAnF,UAAA,CACE,qBAACC,SAAD;IACE,WAAW,GACT,iJACA,gBACF;IAJF,UAAA;KAME,oBAAC,WAAD;MAAW,WAAW,GAAG,YAAY,aAAa,eAAe;MAAG,eAAA;KAAa,CAAA;KAChF;KACD,oBAAC,cAAD;MACE,eAAA;MACA,WAAU;KACX,CAAA;IAC2B;GAC9B,CAAA,GAAA,oBAACC,SAAD;IAA8B,WAAU;IACtC,UAAA,oBAAC,OAAD;KAAK,WAAU;KACZ;IACE,CAAA;GACuB,CAAA,CAC3B;;CACoB,CAAA;AAE/B,CAAC;;AAGD,IAAM,qBAAqB,MAAM,WAG/B,SAAS,mBAAmB,EAAE,WAAW,QAAQ,uBAAuB,GAAG,SAAS,KAAK;CACzF,OACE,oBAAC,QAAD;EACO;EACL,aAAU;EACV,MAAK;EACL,cAAY;EACZ,WAAW,GAAG,sCAAsC,SAAS;EAC7D,GAAI;EAEH,UAAA;GAAC;GAAG;GAAK;EAAG,CAAC,CAAC,KAAK,UAClB,oBAAC,QAAD;GAEE,WAAU;GACV,OAAO,EAAE,gBAAgB,GAAG,MAAM,IAAI;EACvC,GAHM,KAGN,CACF;CACG,CAAA;AAEV,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as ScrollAreaPrimitive from '../primitives/vendor/radix/react-scroll-area';
|
|
3
|
-
|
|
4
|
-
declare
|
|
3
|
+
/** The viewport joins the tab order; its focus outline is drawn inside the box, so nothing clips it. */
|
|
4
|
+
declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const ScrollBar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
6
|
export { ScrollArea, ScrollBar };
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { cn, focusRingClasses } from "../lib/utils.js";
|
|
3
3
|
import { Corner, Root, ScrollAreaScrollbar, ScrollAreaThumb, Viewport } from "../primitives/vendor/radix/react-scroll-area/scroll-area.js";
|
|
4
|
-
import "react";
|
|
4
|
+
import * as React from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/scroll-area.tsx
|
|
7
|
-
|
|
7
|
+
/** The viewport joins the tab order; its focus outline is drawn inside the box, so nothing clips it. */
|
|
8
|
+
var ScrollArea = React.forwardRef(function ScrollArea({ className, children, ...props }, ref) {
|
|
8
9
|
return /* @__PURE__ */ jsxs(Root, {
|
|
10
|
+
ref,
|
|
9
11
|
"data-slot": "scroll-area",
|
|
10
12
|
className: cn("relative", className),
|
|
11
13
|
...props,
|
|
12
14
|
children: [
|
|
13
15
|
/* @__PURE__ */ jsx(Viewport, {
|
|
14
16
|
"data-slot": "scroll-area-viewport",
|
|
15
|
-
className: "size-full rounded-[inherit] transition-[color,box-shadow]
|
|
17
|
+
className: cn("size-full rounded-[inherit] transition-[color,box-shadow]", focusRingClasses, "focus-visible:outline-offset-[-2px]"),
|
|
16
18
|
children
|
|
17
19
|
}),
|
|
18
20
|
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
19
21
|
/* @__PURE__ */ jsx(Corner, {})
|
|
20
22
|
]
|
|
21
23
|
});
|
|
22
|
-
}
|
|
23
|
-
function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
24
|
+
});
|
|
25
|
+
var ScrollBar = React.forwardRef(function ScrollBar({ className, orientation = "vertical", ...props }, ref) {
|
|
24
26
|
return /* @__PURE__ */ jsx(ScrollAreaScrollbar, {
|
|
27
|
+
ref,
|
|
25
28
|
"data-slot": "scroll-area-scrollbar",
|
|
26
29
|
orientation,
|
|
27
30
|
className: cn("flex touch-none p-px transition-colors select-none", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", className),
|
|
@@ -31,7 +34,7 @@ function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
|
31
34
|
className: "relative flex-1 rounded-full bg-border-strong"
|
|
32
35
|
})
|
|
33
36
|
});
|
|
34
|
-
}
|
|
37
|
+
});
|
|
35
38
|
//#endregion
|
|
36
39
|
export { ScrollArea, ScrollBar };
|
|
37
40
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-area.js","names":["ScrollAreaPrimitive.Root","ScrollAreaPrimitive.Viewport","ScrollAreaPrimitive.Corner","ScrollAreaPrimitive.ScrollAreaScrollbar","ScrollAreaPrimitive.ScrollAreaThumb"],"sources":["../../src/components/scroll-area.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../lib/utils';\nimport * as ScrollAreaPrimitive from '../primitives/vendor/radix/react-scroll-area';\n\
|
|
1
|
+
{"version":3,"file":"scroll-area.js","names":["ScrollAreaPrimitive.Root","ScrollAreaPrimitive.Viewport","ScrollAreaPrimitive.Corner","ScrollAreaPrimitive.ScrollAreaScrollbar","ScrollAreaPrimitive.ScrollAreaThumb"],"sources":["../../src/components/scroll-area.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn, focusRingClasses } from '../lib/utils';\nimport * as ScrollAreaPrimitive from '../primitives/vendor/radix/react-scroll-area';\n\n/** The viewport joins the tab order; its focus outline is drawn inside the box, so nothing clips it. */\nconst ScrollArea = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof ScrollAreaPrimitive.Root>\n>(function ScrollArea({ className, children, ...props }, ref) {\n return (\n <ScrollAreaPrimitive.Root\n ref={ref}\n data-slot=\"scroll-area\"\n className={cn('relative', className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className={cn(\n 'size-full rounded-[inherit] transition-[color,box-shadow]',\n focusRingClasses,\n 'focus-visible:outline-offset-[-2px]',\n )}\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n});\n\nconst ScrollBar = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(function ScrollBar({ className, orientation = 'vertical', ...props }, ref) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={cn(\n 'flex touch-none p-px transition-colors select-none',\n orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent',\n orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent',\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"relative flex-1 rounded-full bg-border-strong\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n );\n});\n\nexport { ScrollArea, ScrollBar };\n"],"mappings":";;;;;;;AAMA,IAAM,aAAa,MAAM,WAGvB,SAAS,WAAW,EAAE,WAAW,UAAU,GAAG,SAAS,KAAK;CAC5D,OACE,qBAACA,MAAD;EACO;EACL,aAAU;EACV,WAAW,GAAG,YAAY,SAAS;EACnC,GAAI;EAJN,UAAA;GAME,oBAACC,UAAD;IACE,aAAU;IACV,WAAW,GACT,6DACA,kBACA,qCACF;IAEC;GAC2B,CAAA;GAC9B,oBAAC,WAAD,CAAY,CAAA;GACZ,oBAACC,QAAD,CAA6B,CAAA;EACL;;AAE9B,CAAC;AAED,IAAM,YAAY,MAAM,WAGtB,SAAS,UAAU,EAAE,WAAW,cAAc,YAAY,GAAG,SAAS,KAAK;CAC3E,OACE,oBAACC,qBAAD;EACO;EACL,aAAU;EACG;EACb,WAAW,GACT,sDACA,gBAAgB,cAAc,8CAC9B,gBAAgB,gBAAgB,gDAChC,SACF;EACA,GAAI;EAEJ,UAAA,oBAACC,iBAAD;GACE,aAAU;GACV,WAAU;EACX,CAAA;CACsC,CAAA;AAE7C,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
import { type InputProps } from './input';
|
|
3
|
+
export interface SecretInputProps extends Omit<InputProps, 'type'> {
|
|
3
4
|
/** What is hidden, for the toggle's name ("Show API key"). */
|
|
4
5
|
revealLabel?: string;
|
|
5
6
|
}
|
|
@@ -7,5 +8,5 @@ export interface SecretInputProps extends Omit<React.ComponentProps<'input'>, 't
|
|
|
7
8
|
* Password-style input with a show/hide toggle, in monospace so keys and
|
|
8
9
|
* tokens read cleanly. The toggle is hidden while the field is disabled.
|
|
9
10
|
*/
|
|
10
|
-
declare
|
|
11
|
+
declare const SecretInput: React.ForwardRefExoticComponent<Omit<SecretInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
11
12
|
export { SecretInput };
|
|
@@ -11,16 +11,18 @@ import EyeOff from "@burtson-labs/icons/react/eye-off";
|
|
|
11
11
|
* Password-style input with a show/hide toggle, in monospace so keys and
|
|
12
12
|
* tokens read cleanly. The toggle is hidden while the field is disabled.
|
|
13
13
|
*/
|
|
14
|
-
function SecretInput({ className, revealLabel = "value", disabled, ...props }) {
|
|
14
|
+
var SecretInput = React.forwardRef(function SecretInput({ className, revealLabel = "value", disabled, width, ...props }, ref) {
|
|
15
15
|
const [revealed, setRevealed] = React.useState(false);
|
|
16
16
|
return /* @__PURE__ */ jsxs("div", {
|
|
17
17
|
"data-slot": "secret-input",
|
|
18
|
-
className: "relative",
|
|
18
|
+
className: cn("relative", width ? void 0 : "w-full"),
|
|
19
19
|
children: [/* @__PURE__ */ jsx(Input, {
|
|
20
|
+
ref,
|
|
20
21
|
type: revealed && !disabled ? "text" : "password",
|
|
21
22
|
autoComplete: "off",
|
|
22
23
|
spellCheck: false,
|
|
23
24
|
disabled,
|
|
25
|
+
width,
|
|
24
26
|
className: cn("pr-10 font-mono", className),
|
|
25
27
|
...props
|
|
26
28
|
}), !disabled && /* @__PURE__ */ jsx(IconButton, {
|
|
@@ -29,12 +31,12 @@ function SecretInput({ className, revealLabel = "value", disabled, ...props }) {
|
|
|
29
31
|
size: "icon-sm",
|
|
30
32
|
label: revealed ? `Hide ${revealLabel}` : `Show ${revealLabel}`,
|
|
31
33
|
"aria-pressed": revealed,
|
|
32
|
-
className: "absolute top-1/2 right-1 -translate-y-1/2",
|
|
34
|
+
className: "absolute top-1/2 right-1 -translate-y-1/2 pointer-coarse:min-h-8 pointer-coarse:min-w-8",
|
|
33
35
|
onClick: () => setRevealed((r) => !r),
|
|
34
36
|
children: revealed ? /* @__PURE__ */ jsx(EyeOff, { "aria-hidden": true }) : /* @__PURE__ */ jsx(Eye, { "aria-hidden": true })
|
|
35
37
|
})]
|
|
36
38
|
});
|
|
37
|
-
}
|
|
39
|
+
});
|
|
38
40
|
//#endregion
|
|
39
41
|
export { SecretInput };
|
|
40
42
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret-input.js","names":[],"sources":["../../src/components/secret-input.tsx"],"sourcesContent":["import Eye from '@burtson-labs/icons/react/eye';\nimport EyeOff from '@burtson-labs/icons/react/eye-off';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nimport { IconButton } from './icon-button';\nimport { Input } from './input';\n\nexport interface SecretInputProps extends Omit<
|
|
1
|
+
{"version":3,"file":"secret-input.js","names":[],"sources":["../../src/components/secret-input.tsx"],"sourcesContent":["import Eye from '@burtson-labs/icons/react/eye';\nimport EyeOff from '@burtson-labs/icons/react/eye-off';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nimport { IconButton } from './icon-button';\nimport { Input, type InputProps } from './input';\n\nexport interface SecretInputProps extends Omit<InputProps, 'type'> {\n /** What is hidden, for the toggle's name (\"Show API key\"). */\n revealLabel?: string;\n}\n\n/**\n * Password-style input with a show/hide toggle, in monospace so keys and\n * tokens read cleanly. The toggle is hidden while the field is disabled.\n */\nconst SecretInput = React.forwardRef<HTMLInputElement, SecretInputProps>(function SecretInput(\n { className, revealLabel = 'value', disabled, width, ...props },\n ref,\n) {\n const [revealed, setRevealed] = React.useState(false);\n return (\n <div data-slot=\"secret-input\" className={cn('relative', width ? undefined : 'w-full')}>\n <Input\n ref={ref}\n type={revealed && !disabled ? 'text' : 'password'}\n autoComplete=\"off\"\n spellCheck={false}\n disabled={disabled}\n width={width}\n className={cn('pr-10 font-mono', className)}\n {...props}\n />\n {!disabled && (\n <IconButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n label={revealed ? `Hide ${revealLabel}` : `Show ${revealLabel}`}\n aria-pressed={revealed}\n // Inside the field, so it never grows past it on touch screens.\n className=\"absolute top-1/2 right-1 -translate-y-1/2 pointer-coarse:min-h-8 pointer-coarse:min-w-8\"\n onClick={() => setRevealed((r) => !r)}\n >\n {revealed ? <EyeOff aria-hidden /> : <Eye aria-hidden />}\n </IconButton>\n )}\n </div>\n );\n});\n\nexport { SecretInput };\n"],"mappings":";;;;;;;;;;;;;AAkBA,IAAM,cAAc,MAAM,WAA+C,SAAS,YAChF,EAAE,WAAW,cAAc,SAAS,UAAU,OAAO,GAAG,SACxD,KACA;CACA,MAAM,CAAC,UAAU,eAAe,MAAM,SAAS,KAAK;CACpD,OACE,qBAAC,OAAD;EAAK,aAAU;EAAe,WAAW,GAAG,YAAY,QAAQ,KAAA,IAAY,QAAQ;EAApF,UAAA,CACE,oBAAC,OAAD;GACO;GACL,MAAM,YAAY,CAAC,WAAW,SAAS;GACvC,cAAa;GACb,YAAY;GACF;GACH;GACP,WAAW,GAAG,mBAAmB,SAAS;GAC1C,GAAI;EACL,CAAA,GACA,CAAC,YACA,oBAAC,YAAD;GACE,MAAK;GACL,SAAQ;GACR,MAAK;GACL,OAAO,WAAW,QAAQ,gBAAgB,QAAQ;GAClD,gBAAc;GAEd,WAAU;GACV,eAAe,aAAa,MAAM,CAAC,CAAC;GAEnC,UAAA,WAAW,oBAAC,QAAD,EAAQ,eAAA,KAAa,CAAA,IAAI,oBAAC,KAAD,EAAK,eAAA,KAAa,CAAA;EAC7C,CAAA,CAEX;;AAET,CAAC"}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as SelectPrimitive from '../primitives/vendor/radix/react-select';
|
|
3
|
+
import { type FieldWidth } from './input';
|
|
3
4
|
declare function Select(props: React.ComponentProps<typeof SelectPrimitive.Root>): React.JSX.Element;
|
|
4
5
|
declare function SelectGroup(props: React.ComponentProps<typeof SelectPrimitive.Group>): React.JSX.Element;
|
|
5
6
|
declare function SelectValue(props: React.ComponentProps<typeof SelectPrimitive.Value>): React.JSX.Element;
|
|
6
|
-
|
|
7
|
+
export interface SelectTriggerProps extends React.ComponentProps<typeof SelectPrimitive.Trigger> {
|
|
7
8
|
size?: 'sm' | 'default';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
declare
|
|
12
|
-
declare
|
|
9
|
+
/** How wide the trigger is from 640px up; full width on phones. Fits its content by default. */
|
|
10
|
+
width?: FieldWidth;
|
|
11
|
+
}
|
|
12
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
/** A row: 32px (44px on touch screens), 8px radius, a fill when active, a check when chosen. */
|
|
16
|
+
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
18
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../lib/utils.js";
|
|
3
|
-
import { surfaceClasses } from "./popover.js";
|
|
4
|
-
import { fieldClasses } from "./input.js";
|
|
2
|
+
import { cn, noOutlineClasses } from "../lib/utils.js";
|
|
3
|
+
import { menuLabelClasses, surfaceClasses } from "./popover.js";
|
|
4
|
+
import { fieldClasses, fieldWidthClasses } from "./input.js";
|
|
5
5
|
import { Content as SelectContent$1, Group as SelectGroup$1, Icon as SelectIcon, Item as SelectItem$1, ItemIndicator as SelectItemIndicator, ItemText as SelectItemText, Label as SelectLabel$1, Portal as SelectPortal, Root as Select$1, ScrollDownButton as SelectScrollDownButton, ScrollUpButton as SelectScrollUpButton, SelectSeparator as SelectSeparator$1, SelectTrigger as SelectTrigger$1, SelectValue as SelectValue$1, SelectViewport } from "../primitives/vendor/radix/react-select/select.js";
|
|
6
|
+
import * as React from "react";
|
|
6
7
|
import ChevronDown from "@burtson-labs/icons/react/chevron-down";
|
|
7
|
-
import "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import Check from "@burtson-labs/icons/react/check";
|
|
10
10
|
import ChevronUp from "@burtson-labs/icons/react/chevron-up";
|
|
@@ -31,23 +31,25 @@ var triggerHeight = {
|
|
|
31
31
|
default: "h-9",
|
|
32
32
|
sm: "h-8"
|
|
33
33
|
};
|
|
34
|
-
function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
34
|
+
var SelectTrigger = React.forwardRef(function SelectTrigger({ className, size = "default", width, children, ...props }, ref) {
|
|
35
35
|
return /* @__PURE__ */ jsxs(SelectTrigger$1, {
|
|
36
|
+
ref,
|
|
36
37
|
"data-slot": "select-trigger",
|
|
37
38
|
"data-size": size,
|
|
38
|
-
className: cn(fieldClasses, "flex w-fit items-center justify-between gap-2 py-2 whitespace-nowrap data-[placeholder]:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", triggerHeight[size], className),
|
|
39
|
+
className: cn(fieldClasses, "flex w-fit items-center justify-between gap-2 py-2 whitespace-nowrap data-[placeholder]:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", triggerHeight[size], width && fieldWidthClasses[width], className),
|
|
39
40
|
...props,
|
|
40
41
|
children: [children, /* @__PURE__ */ jsx(SelectIcon, {
|
|
41
42
|
asChild: true,
|
|
42
43
|
children: /* @__PURE__ */ jsx(ChevronDown, {
|
|
43
|
-
className: "size-4
|
|
44
|
+
className: "size-4 text-muted-foreground",
|
|
44
45
|
"aria-hidden": true
|
|
45
46
|
})
|
|
46
47
|
})]
|
|
47
48
|
});
|
|
48
|
-
}
|
|
49
|
-
function SelectContent({ className, children, position = "popper", ...props }) {
|
|
49
|
+
});
|
|
50
|
+
var SelectContent = React.forwardRef(function SelectContent({ className, children, position = "popper", ...props }, ref) {
|
|
50
51
|
return /* @__PURE__ */ jsx(SelectPortal, { children: /* @__PURE__ */ jsxs(SelectContent$1, {
|
|
52
|
+
ref,
|
|
51
53
|
"data-slot": "select-content",
|
|
52
54
|
className: cn(surfaceClasses, "relative max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
53
55
|
position,
|
|
@@ -73,18 +75,21 @@ function SelectContent({ className, children, position = "popper", ...props }) {
|
|
|
73
75
|
})
|
|
74
76
|
]
|
|
75
77
|
}) });
|
|
76
|
-
}
|
|
77
|
-
function SelectLabel({ className, ...props }) {
|
|
78
|
+
});
|
|
79
|
+
var SelectLabel = React.forwardRef(function SelectLabel({ className, ...props }, ref) {
|
|
78
80
|
return /* @__PURE__ */ jsx(SelectLabel$1, {
|
|
81
|
+
ref,
|
|
79
82
|
"data-slot": "select-label",
|
|
80
|
-
className: cn(
|
|
83
|
+
className: cn(menuLabelClasses, className),
|
|
81
84
|
...props
|
|
82
85
|
});
|
|
83
|
-
}
|
|
84
|
-
|
|
86
|
+
});
|
|
87
|
+
/** A row: 32px (44px on touch screens), 8px radius, a fill when active, a check when chosen. */
|
|
88
|
+
var SelectItem = React.forwardRef(function SelectItem({ className, children, ...props }, ref) {
|
|
85
89
|
return /* @__PURE__ */ jsxs(SelectItem$1, {
|
|
90
|
+
ref,
|
|
86
91
|
"data-slot": "select-item",
|
|
87
|
-
className: cn("relative flex min-h-8 w-full cursor-default items-center gap-2 rounded-sm pr-8 pl-2 text-[13px]
|
|
92
|
+
className: cn("relative flex min-h-8 w-full cursor-default items-center gap-2 rounded-sm pr-8 pl-2 text-[13px] select-none focus:bg-secondary focus:text-foreground data-[state=checked]:font-semibold data-[disabled]:pointer-events-none data-[disabled]:opacity-50 pointer-coarse:min-h-11", noOutlineClasses, "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
88
93
|
...props,
|
|
89
94
|
children: [/* @__PURE__ */ jsx("span", {
|
|
90
95
|
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
@@ -94,14 +99,15 @@ function SelectItem({ className, children, ...props }) {
|
|
|
94
99
|
}) })
|
|
95
100
|
}), /* @__PURE__ */ jsx(SelectItemText, { children })]
|
|
96
101
|
});
|
|
97
|
-
}
|
|
98
|
-
function SelectSeparator({ className, ...props }) {
|
|
102
|
+
});
|
|
103
|
+
var SelectSeparator = React.forwardRef(function SelectSeparator({ className, ...props }, ref) {
|
|
99
104
|
return /* @__PURE__ */ jsx(SelectSeparator$1, {
|
|
105
|
+
ref,
|
|
100
106
|
"data-slot": "select-separator",
|
|
101
107
|
className: cn("pointer-events-none -mx-1 my-1 h-px bg-border", className),
|
|
102
108
|
...props
|
|
103
109
|
});
|
|
104
|
-
}
|
|
110
|
+
});
|
|
105
111
|
//#endregion
|
|
106
112
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue };
|
|
107
113
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","names":["SelectPrimitive.Root","SelectPrimitive.Group","SelectPrimitive.Value","SelectPrimitive.Trigger","SelectPrimitive.Icon","SelectPrimitive.Portal","SelectPrimitive.Content","SelectPrimitive.ScrollUpButton","SelectPrimitive.Viewport","SelectPrimitive.ScrollDownButton","SelectPrimitive.Label","SelectPrimitive.Item","SelectPrimitive.ItemIndicator","SelectPrimitive.ItemText","SelectPrimitive.Separator"],"sources":["../../src/components/select.tsx"],"sourcesContent":["import Check from '@burtson-labs/icons/react/check';\nimport ChevronDown from '@burtson-labs/icons/react/chevron-down';\nimport ChevronUp from '@burtson-labs/icons/react/chevron-up';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\nimport * as SelectPrimitive from '../primitives/vendor/radix/react-select';\n\nimport { fieldClasses } from './input';\nimport { surfaceClasses } from './popover';\n\nfunction Select(props: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\nfunction SelectGroup(props: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nfunction SelectValue(props: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\n// Plain height classes, not an attribute-selector variant on data-size: that\n// selector outranks a class, so a caller's `h-11`, `max-sm:h-11` or\n// `pointer-coarse:h-11` never won against the size. (Tailwind reads comments\n// too, so the old form is not spelled out here.)\nconst triggerHeight = { default: 'h-9', sm: 'h-8' } as const;\n\
|
|
1
|
+
{"version":3,"file":"select.js","names":["SelectPrimitive.Root","SelectPrimitive.Group","SelectPrimitive.Value","SelectPrimitive.Trigger","SelectPrimitive.Icon","SelectPrimitive.Portal","SelectPrimitive.Content","SelectPrimitive.ScrollUpButton","SelectPrimitive.Viewport","SelectPrimitive.ScrollDownButton","SelectPrimitive.Label","SelectPrimitive.Item","SelectPrimitive.ItemIndicator","SelectPrimitive.ItemText","SelectPrimitive.Separator"],"sources":["../../src/components/select.tsx"],"sourcesContent":["import Check from '@burtson-labs/icons/react/check';\nimport ChevronDown from '@burtson-labs/icons/react/chevron-down';\nimport ChevronUp from '@burtson-labs/icons/react/chevron-up';\nimport * as React from 'react';\n\nimport { cn, noOutlineClasses } from '../lib/utils';\nimport * as SelectPrimitive from '../primitives/vendor/radix/react-select';\n\nimport { fieldClasses, type FieldWidth, fieldWidthClasses } from './input';\nimport { menuLabelClasses, surfaceClasses } from './popover';\n\nfunction Select(props: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\nfunction SelectGroup(props: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nfunction SelectValue(props: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\n// Plain height classes, not an attribute-selector variant on data-size: that\n// selector outranks a class, so a caller's `h-11`, `max-sm:h-11` or\n// `pointer-coarse:h-11` never won against the size. (Tailwind reads comments\n// too, so the old form is not spelled out here.)\nconst triggerHeight = { default: 'h-9', sm: 'h-8' } as const;\n\nexport interface SelectTriggerProps extends React.ComponentProps<typeof SelectPrimitive.Trigger> {\n size?: 'sm' | 'default';\n /** How wide the trigger is from 640px up; full width on phones. Fits its content by default. */\n width?: FieldWidth;\n}\n\nconst SelectTrigger = React.forwardRef<HTMLButtonElement, SelectTriggerProps>(\n function SelectTrigger({ className, size = 'default', width, children, ...props }, ref) {\n return (\n <SelectPrimitive.Trigger\n ref={ref}\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n fieldClasses,\n \"flex w-fit items-center justify-between gap-2 py-2 whitespace-nowrap data-[placeholder]:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n triggerHeight[size],\n width && fieldWidthClasses[width],\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"size-4 text-muted-foreground\" aria-hidden />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n },\n);\n\nconst SelectContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof SelectPrimitive.Content>\n>(function SelectContent({ className, children, position = 'popper', ...props }, ref) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n data-slot=\"select-content\"\n className={cn(\n surfaceClasses,\n 'relative max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className,\n )}\n position={position}\n {...props}\n >\n <SelectPrimitive.ScrollUpButton className=\"flex cursor-default items-center justify-center py-1\">\n <ChevronUp className=\"size-4\" aria-hidden />\n </SelectPrimitive.ScrollUpButton>\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectPrimitive.ScrollDownButton className=\"flex cursor-default items-center justify-center py-1\">\n <ChevronDown className=\"size-4\" aria-hidden />\n </SelectPrimitive.ScrollDownButton>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n});\n\nconst SelectLabel = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof SelectPrimitive.Label>\n>(function SelectLabel({ className, ...props }, ref) {\n return (\n <SelectPrimitive.Label\n ref={ref}\n data-slot=\"select-label\"\n className={cn(menuLabelClasses, className)}\n {...props}\n />\n );\n});\n\n/** A row: 32px (44px on touch screens), 8px radius, a fill when active, a check when chosen. */\nconst SelectItem = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof SelectPrimitive.Item>\n>(function SelectItem({ className, children, ...props }, ref) {\n return (\n <SelectPrimitive.Item\n ref={ref}\n data-slot=\"select-item\"\n className={cn(\n 'relative flex min-h-8 w-full cursor-default items-center gap-2 rounded-sm pr-8 pl-2 text-[13px] select-none focus:bg-secondary focus:text-foreground data-[state=checked]:font-semibold data-[disabled]:pointer-events-none data-[disabled]:opacity-50 pointer-coarse:min-h-11',\n noOutlineClasses,\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"size-4 text-brand\" aria-hidden />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n});\n\nconst SelectSeparator = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof SelectPrimitive.Separator>\n>(function SelectSeparator({ className, ...props }, ref) {\n return (\n <SelectPrimitive.Separator\n ref={ref}\n data-slot=\"select-separator\"\n className={cn('pointer-events-none -mx-1 my-1 h-px bg-border', className)}\n {...props}\n />\n );\n});\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"mappings":";;;;;;;;;;;AAWA,SAAS,OAAO,OAA0D;CACxE,OAAO,oBAACA,UAAD;EAAsB,aAAU;EAAS,GAAI;CAAQ,CAAA;AAC9D;AAEA,SAAS,YAAY,OAA2D;CAC9E,OAAO,oBAACC,eAAD;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;AAEA,SAAS,YAAY,OAA2D;CAC9E,OAAO,oBAACC,eAAD;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;AAMA,IAAM,gBAAgB;CAAE,SAAS;CAAO,IAAI;AAAM;AAQlD,IAAM,gBAAgB,MAAM,WAC1B,SAAS,cAAc,EAAE,WAAW,OAAO,WAAW,OAAO,UAAU,GAAG,SAAS,KAAK;CACtF,OACE,qBAACC,iBAAD;EACO;EACL,aAAU;EACV,aAAW;EACX,WAAW,GACT,cACA,oVACA,cAAc,OACd,SAAS,kBAAkB,QAC3B,SACF;EACA,GAAI;EAXN,UAAA,CAaG,UACD,oBAACC,YAAD;GAAsB,SAAA;GACpB,UAAA,oBAAC,aAAD;IAAa,WAAU;IAA+B,eAAA;GAAa,CAAA;EAC/C,CAAA,CACC;;AAE7B,CACF;AAEA,IAAM,gBAAgB,MAAM,WAG1B,SAAS,cAAc,EAAE,WAAW,UAAU,WAAW,UAAU,GAAG,SAAS,KAAK;CACpF,OACE,oBAACC,cAAD,EAAA,UACE,qBAACC,iBAAD;EACO;EACL,aAAU;EACV,WAAW,GACT,gBACA,4JACA,aAAa,YACX,mIACF,SACF;EACU;EACV,GAAI;EAXN,UAAA;GAaE,oBAACC,sBAAD;IAAgC,WAAU;IACxC,UAAA,oBAAC,WAAD;KAAW,WAAU;KAAS,eAAA;IAAa,CAAA;GACb,CAAA;GAChC,oBAACC,gBAAD;IACE,WAAW,GACT,OACA,aAAa,YACX,2FACJ;IAEC;GACuB,CAAA;GAC1B,oBAACC,wBAAD;IAAkC,WAAU;IAC1C,UAAA,oBAAC,aAAD;KAAa,WAAU;KAAS,eAAA;IAAa,CAAA;GACb,CAAA;EACX;CACH,CAAA,EAAA,CAAA;AAE5B,CAAC;AAED,IAAM,cAAc,MAAM,WAGxB,SAAS,YAAY,EAAE,WAAW,GAAG,SAAS,KAAK;CACnD,OACE,oBAACC,eAAD;EACO;EACL,aAAU;EACV,WAAW,GAAG,kBAAkB,SAAS;EACzC,GAAI;CACL,CAAA;AAEL,CAAC;;AAGD,IAAM,aAAa,MAAM,WAGvB,SAAS,WAAW,EAAE,WAAW,UAAU,GAAG,SAAS,KAAK;CAC5D,OACE,qBAACC,cAAD;EACO;EACL,aAAU;EACV,WAAW,GACT,kRACA,kBACA,qFACA,SACF;EACA,GAAI;EATN,UAAA,CAWE,oBAAC,QAAD;GAAM,WAAU;GACd,UAAA,oBAACC,qBAAD,EAAA,UACE,oBAAC,OAAD;IAAO,WAAU;IAAoB,eAAA;GAAa,CAAA,EACrB,CAAA;EAC3B,CAAA,GACN,oBAACC,gBAAD,EAA2B,SAAmC,CAAA,CAC1C;;AAE1B,CAAC;AAED,IAAM,kBAAkB,MAAM,WAG5B,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAS,KAAK;CACvD,OACE,oBAACC,mBAAD;EACO;EACL,aAAU;EACV,WAAW,GAAG,iDAAiD,SAAS;EACxE,GAAI;CACL,CAAA;AAEL,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as SeparatorPrimitive from '../primitives/vendor/radix/react-separator';
|
|
3
|
-
declare
|
|
3
|
+
declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export { Separator };
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
3
|
import { Root } from "../primitives/vendor/radix/react-separator/separator.js";
|
|
4
|
-
import "react";
|
|
4
|
+
import * as React from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/separator.tsx
|
|
7
|
-
function Separator({ className, orientation = "horizontal", decorative = true, ...props }) {
|
|
7
|
+
var Separator = React.forwardRef(function Separator({ className, orientation = "horizontal", decorative = true, ...props }, ref) {
|
|
8
8
|
return /* @__PURE__ */ jsx(Root, {
|
|
9
|
+
ref,
|
|
9
10
|
"data-slot": "separator",
|
|
10
11
|
decorative,
|
|
11
12
|
orientation,
|
|
12
13
|
className: cn("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", className),
|
|
13
14
|
...props
|
|
14
15
|
});
|
|
15
|
-
}
|
|
16
|
+
});
|
|
16
17
|
//#endregion
|
|
17
18
|
export { Separator };
|
|
18
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator.js","names":["SeparatorPrimitive.Root"],"sources":["../../src/components/separator.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../lib/utils';\nimport * as SeparatorPrimitive from '../primitives/vendor/radix/react-separator';\n\
|
|
1
|
+
{"version":3,"file":"separator.js","names":["SeparatorPrimitive.Root"],"sources":["../../src/components/separator.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../lib/utils';\nimport * as SeparatorPrimitive from '../primitives/vendor/radix/react-separator';\n\nconst Separator = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof SeparatorPrimitive.Root>\n>(function Separator({ className, orientation = 'horizontal', decorative = true, ...props }, ref) {\n return (\n <SeparatorPrimitive.Root\n ref={ref}\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',\n className,\n )}\n {...props}\n />\n );\n});\n\nexport { Separator };\n"],"mappings":";;;;;;AAKA,IAAM,YAAY,MAAM,WAGtB,SAAS,UAAU,EAAE,WAAW,cAAc,cAAc,aAAa,MAAM,GAAG,SAAS,KAAK;CAChG,OACE,oBAACA,MAAD;EACO;EACL,aAAU;EACE;EACC;EACb,WAAW,GACT,kKACA,SACF;EACA,GAAI;CACL,CAAA;AAEL,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as SheetPrimitive from '../primitives/vendor/radix/react-dialog';
|
|
3
3
|
declare function Sheet(props: React.ComponentProps<typeof SheetPrimitive.Root>): React.JSX.Element;
|
|
4
|
-
declare
|
|
5
|
-
declare
|
|
4
|
+
declare const SheetTrigger: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const SheetClose: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
6
|
declare const sideClasses: {
|
|
7
7
|
readonly right: "inset-y-0 right-0 h-full w-3/4 border-l [--bl-sheet-x:100%] sm:max-w-sm";
|
|
8
8
|
readonly left: "inset-y-0 left-0 h-full w-3/4 border-r [--bl-sheet-x:-100%] sm:max-w-sm";
|
|
9
9
|
readonly top: "inset-x-0 top-0 max-h-[85dvh] rounded-b-xl border-b pt-[env(safe-area-inset-top)] [--bl-sheet-x:0] [--bl-sheet-y:-100%]";
|
|
10
10
|
readonly bottom: "inset-x-0 bottom-0 max-h-[85dvh] rounded-t-xl border-t pb-[env(safe-area-inset-bottom)] [--bl-sheet-x:0] [--bl-sheet-y:100%]";
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
export interface SheetContentProps extends React.ComponentProps<typeof SheetPrimitive.Content> {
|
|
13
13
|
side?: keyof typeof sideClasses;
|
|
14
14
|
/**
|
|
15
15
|
* The X in the corner. Turn it off when the sheet draws its own header
|
|
@@ -22,9 +22,11 @@ declare function SheetContent({ className, children, side, handle, showCloseButt
|
|
|
22
22
|
* default for bottom sheets.
|
|
23
23
|
*/
|
|
24
24
|
handle?: boolean;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
declare
|
|
28
|
-
declare
|
|
29
|
-
declare
|
|
25
|
+
}
|
|
26
|
+
/** A panel from an edge: 16px radius on the free corners, elevation 5. */
|
|
27
|
+
declare const SheetContent: React.ForwardRefExoticComponent<Omit<SheetContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
declare const SheetHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
declare const SheetFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
declare const SheetTitle: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
31
|
+
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
30
32
|
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, };
|