@adea-ai/ui 0.84.0 → 0.87.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 +90 -1
- package/dist/NOTICE +60 -0
- package/dist/components/composites/action-button/action-button.d.ts.map +1 -1
- package/dist/components/composites/action-button/action-button.js +2 -2
- package/dist/components/composites/action-button/action-button.js.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser-group.d.ts +20 -0
- package/dist/components/composites/catalog-browser/catalog-browser-group.d.ts.map +1 -0
- package/dist/components/composites/catalog-browser/catalog-browser-group.js +195 -0
- package/dist/components/composites/catalog-browser/catalog-browser-group.js.map +1 -0
- package/dist/components/composites/catalog-browser/catalog-browser.d.ts +3 -0
- package/dist/components/composites/catalog-browser/catalog-browser.d.ts.map +1 -0
- package/dist/components/composites/catalog-browser/catalog-browser.js +378 -0
- package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -0
- package/dist/components/composites/catalog-browser/catalog-detail.d.ts +21 -0
- package/dist/components/composites/catalog-browser/catalog-detail.d.ts.map +1 -0
- package/dist/components/composites/catalog-browser/catalog-detail.js +92 -0
- package/dist/components/composites/catalog-browser/catalog-detail.js.map +1 -0
- package/dist/components/composites/catalog-browser/catalog-types.d.ts +78 -0
- package/dist/components/composites/catalog-browser/catalog-types.d.ts.map +1 -0
- package/dist/components/composites/catalog-browser/index.d.ts +4 -0
- package/dist/components/composites/catalog-browser/index.d.ts.map +1 -0
- package/dist/components/composites/catalog-browser/index.js +3 -0
- package/dist/components/composites/list-row/list-row.d.ts +6 -3
- package/dist/components/composites/list-row/list-row.d.ts.map +1 -1
- package/dist/components/composites/list-row/list-row.js +69 -7
- package/dist/components/composites/list-row/list-row.js.map +1 -1
- package/dist/components/composites/settings/settings.d.ts +9 -11
- package/dist/components/composites/settings/settings.d.ts.map +1 -1
- package/dist/components/composites/settings/settings.js +48 -33
- package/dist/components/composites/settings/settings.js.map +1 -1
- package/dist/components/conversation/message-composer.js +1 -1
- package/dist/components/conversation/scroll-follow.d.ts.map +1 -1
- package/dist/components/conversation/scroll-follow.js +95 -15
- package/dist/components/conversation/scroll-follow.js.map +1 -1
- package/dist/components/layout/app-shell/index.d.ts +1 -0
- package/dist/components/layout/app-shell/index.d.ts.map +1 -1
- package/dist/components/layout/app-shell/index.js +2 -1
- package/dist/components/layout/app-shell/skip-link.d.ts +11 -0
- package/dist/components/layout/app-shell/skip-link.d.ts.map +1 -0
- package/dist/components/layout/app-shell/skip-link.js +44 -0
- package/dist/components/layout/app-shell/skip-link.js.map +1 -0
- package/dist/components/layout/floating-preview/floating-preview.d.ts +12 -0
- package/dist/components/layout/floating-preview/floating-preview.d.ts.map +1 -0
- package/dist/components/layout/floating-preview/floating-preview.js +283 -0
- package/dist/components/layout/floating-preview/floating-preview.js.map +1 -0
- package/dist/components/layout/floating-preview/index.d.ts +3 -0
- package/dist/components/layout/floating-preview/index.d.ts.map +1 -0
- package/dist/components/layout/floating-preview/index.js +3 -0
- package/dist/components/layout/floating-preview/model.d.ts +74 -0
- package/dist/components/layout/floating-preview/model.d.ts.map +1 -0
- package/dist/components/layout/floating-preview/model.js +146 -0
- package/dist/components/layout/floating-preview/model.js.map +1 -0
- package/dist/components/theme/index.d.ts +1 -0
- package/dist/components/theme/index.d.ts.map +1 -1
- package/dist/components/theme/index.js +2 -1
- package/dist/components/theme/theme-mode-toggle.d.ts +10 -0
- package/dist/components/theme/theme-mode-toggle.d.ts.map +1 -0
- package/dist/components/theme/theme-mode-toggle.js +82 -0
- package/dist/components/theme/theme-mode-toggle.js.map +1 -0
- package/dist/components/ui/checkbox/checkbox.d.ts +2 -0
- package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox/checkbox.js +24 -3
- package/dist/components/ui/checkbox/checkbox.js.map +1 -1
- package/dist/components/ui/combobox/combobox.d.ts.map +1 -1
- package/dist/components/ui/combobox/combobox.js +41 -4
- package/dist/components/ui/combobox/combobox.js.map +1 -1
- package/dist/components/ui/combobox/index.d.ts +1 -0
- package/dist/components/ui/combobox/index.d.ts.map +1 -1
- package/dist/components/ui/combobox/index.js +2 -1
- package/dist/components/ui/combobox/value-combobox.d.ts +19 -0
- package/dist/components/ui/combobox/value-combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox/value-combobox.js +42 -0
- package/dist/components/ui/combobox/value-combobox.js.map +1 -0
- package/dist/components/ui/empty/empty-state.d.ts +15 -0
- package/dist/components/ui/empty/empty-state.d.ts.map +1 -0
- package/dist/components/ui/empty/empty-state.js +96 -0
- package/dist/components/ui/empty/empty-state.js.map +1 -0
- package/dist/components/ui/empty/index.d.ts +1 -0
- package/dist/components/ui/empty/index.d.ts.map +1 -1
- package/dist/components/ui/empty/index.js +2 -1
- package/dist/components/ui/entity-icon/entity-icon.d.ts +4 -1
- package/dist/components/ui/entity-icon/entity-icon.d.ts.map +1 -1
- package/dist/components/ui/entity-icon/entity-icon.js +37 -13
- package/dist/components/ui/entity-icon/entity-icon.js.map +1 -1
- package/dist/components/ui/field/field.d.ts +36 -13
- package/dist/components/ui/field/field.d.ts.map +1 -1
- package/dist/components/ui/field/field.js +146 -24
- package/dist/components/ui/field/field.js.map +1 -1
- package/dist/components/ui/field/index.d.ts +3 -1
- package/dist/components/ui/field/index.d.ts.map +1 -1
- package/dist/components/ui/field/index.js +3 -2
- package/dist/components/ui/field/number-field.d.ts +19 -0
- package/dist/components/ui/field/number-field.d.ts.map +1 -0
- package/dist/components/ui/field/number-field.js +76 -0
- package/dist/components/ui/field/number-field.js.map +1 -0
- package/dist/components/ui/input/index.d.ts +1 -0
- package/dist/components/ui/input/index.d.ts.map +1 -1
- package/dist/components/ui/input/index.js +2 -1
- package/dist/components/ui/input/input-control.d.ts +11 -0
- package/dist/components/ui/input/input-control.d.ts.map +1 -0
- package/dist/components/ui/input/input-control.js +24 -0
- package/dist/components/ui/input/input-control.js.map +1 -0
- package/dist/components/ui/input/input.d.ts.map +1 -1
- package/dist/components/ui/input/input.js +56 -28
- package/dist/components/ui/input/input.js.map +1 -1
- package/dist/components/ui/input-group/index.d.ts +1 -0
- package/dist/components/ui/input-group/index.d.ts.map +1 -1
- package/dist/components/ui/input-group/index.js +2 -1
- package/dist/components/ui/input-group/input-group.d.ts.map +1 -1
- package/dist/components/ui/input-group/input-group.js +42 -5
- package/dist/components/ui/input-group/input-group.js.map +1 -1
- package/dist/components/ui/input-group/secret-input-group.d.ts +11 -0
- package/dist/components/ui/input-group/secret-input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group/secret-input-group.js +67 -0
- package/dist/components/ui/input-group/secret-input-group.js.map +1 -0
- package/dist/components/ui/native-select/native-select.d.ts.map +1 -1
- package/dist/components/ui/native-select/native-select.js +39 -4
- package/dist/components/ui/native-select/native-select.js.map +1 -1
- package/dist/components/ui/progress/progress.d.ts.map +1 -1
- package/dist/components/ui/progress/progress.js +30 -18
- package/dist/components/ui/progress/progress.js.map +1 -1
- package/dist/components/ui/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group/radio-group.js +41 -4
- package/dist/components/ui/radio-group/radio-group.js.map +1 -1
- package/dist/components/ui/switch/switch.d.ts +2 -0
- package/dist/components/ui/switch/switch.d.ts.map +1 -1
- package/dist/components/ui/switch/switch.js +24 -3
- package/dist/components/ui/switch/switch.js.map +1 -1
- package/dist/components/ui/tabs/tabs.js +1 -1
- package/dist/components/ui/tabs/tabs.js.map +1 -1
- package/dist/components/ui/text-link/index.d.ts +2 -0
- package/dist/components/ui/text-link/index.d.ts.map +1 -0
- package/dist/components/ui/text-link/index.js +2 -0
- package/dist/components/ui/text-link/text-link.d.ts +9 -0
- package/dist/components/ui/text-link/text-link.d.ts.map +1 -0
- package/dist/components/ui/text-link/text-link.js +30 -0
- package/dist/components/ui/text-link/text-link.js.map +1 -0
- package/dist/components/ui/textarea/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea/textarea.js +41 -4
- package/dist/components/ui/textarea/textarea.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -8
- package/dist/lib/clipboard.d.ts +3 -0
- package/dist/lib/clipboard.d.ts.map +1 -0
- package/dist/lib/clipboard.js +35 -0
- package/dist/lib/clipboard.js.map +1 -0
- package/dist/lib/download.d.ts +3 -0
- package/dist/lib/download.d.ts.map +1 -0
- package/dist/lib/download.js +31 -0
- package/dist/lib/download.js.map +1 -0
- package/dist/lib/form-field.d.ts +37 -0
- package/dist/lib/form-field.d.ts.map +1 -0
- package/dist/lib/form-field.js +47 -0
- package/dist/lib/form-field.js.map +1 -0
- package/dist/r/app-shell.json +5 -0
- package/dist/r/catalog-browser.json +47 -0
- package/dist/r/combobox.json +5 -0
- package/dist/r/empty.json +10 -1
- package/dist/r/field.json +7 -0
- package/dist/r/floating-preview.json +30 -0
- package/dist/r/input-group.json +6 -0
- package/dist/r/input.json +5 -0
- package/dist/r/lib.json +15 -0
- package/dist/r/list-row.json +1 -0
- package/dist/r/registry.json +159 -1
- package/dist/r/src/components/composites/action-button/action-button.tsx +5 -1
- package/dist/r/src/components/composites/catalog-browser/catalog-browser-group.tsx +148 -0
- package/dist/r/src/components/composites/catalog-browser/catalog-browser.tsx +258 -0
- package/dist/r/src/components/composites/catalog-browser/catalog-detail.tsx +64 -0
- package/dist/r/src/components/composites/catalog-browser/catalog-types.ts +83 -0
- package/dist/r/src/components/composites/catalog-browser/index.ts +10 -0
- package/dist/r/src/components/composites/list-row/list-row.tsx +81 -8
- package/dist/r/src/components/composites/settings/settings.tsx +67 -37
- package/dist/r/src/components/conversation/scroll-follow.ts +109 -15
- package/dist/r/src/components/layout/app-shell/index.ts +1 -0
- package/dist/r/src/components/layout/app-shell/skip-link.tsx +35 -0
- package/dist/r/src/components/layout/floating-preview/floating-preview.tsx +260 -0
- package/dist/r/src/components/layout/floating-preview/index.ts +2 -0
- package/dist/r/src/components/layout/floating-preview/model.ts +285 -0
- package/dist/r/src/components/theme/index.ts +1 -0
- package/dist/r/src/components/theme/theme-mode-toggle.tsx +56 -0
- package/dist/r/src/components/ui/checkbox/checkbox.tsx +20 -3
- package/dist/r/src/components/ui/combobox/combobox.tsx +24 -1
- package/dist/r/src/components/ui/combobox/index.ts +1 -0
- package/dist/r/src/components/ui/combobox/value-combobox.tsx +38 -0
- package/dist/r/src/components/ui/empty/empty-state.tsx +71 -0
- package/dist/r/src/components/ui/empty/index.ts +1 -0
- package/dist/r/src/components/ui/entity-icon/entity-icon.tsx +33 -2
- package/dist/r/src/components/ui/field/field.tsx +102 -5
- package/dist/r/src/components/ui/field/index.ts +5 -0
- package/dist/r/src/components/ui/field/number-field.tsx +71 -0
- package/dist/r/src/components/ui/input/index.ts +1 -0
- package/dist/r/src/components/ui/input/input-control.tsx +38 -0
- package/dist/r/src/components/ui/input/input.tsx +32 -20
- package/dist/r/src/components/ui/input-group/index.ts +1 -0
- package/dist/r/src/components/ui/input-group/input-group.tsx +25 -2
- package/dist/r/src/components/ui/input-group/secret-input-group.tsx +58 -0
- package/dist/r/src/components/ui/native-select/native-select.tsx +27 -1
- package/dist/r/src/components/ui/progress/progress.tsx +12 -8
- package/dist/r/src/components/ui/radio-group/radio-group.tsx +30 -2
- package/dist/r/src/components/ui/switch/switch.tsx +20 -3
- package/dist/r/src/components/ui/tabs/tabs.tsx +1 -1
- package/dist/r/src/components/ui/text-link/index.ts +2 -0
- package/dist/r/src/components/ui/text-link/text-link.tsx +28 -0
- package/dist/r/src/components/ui/textarea/textarea.tsx +24 -1
- package/dist/r/src/lib/clipboard.ts +41 -0
- package/dist/r/src/lib/download.ts +29 -0
- package/dist/r/src/lib/form-field.ts +93 -0
- package/dist/r/text-link.json +22 -0
- package/dist/r/theming.json +6 -0
- package/package.json +1 -1
- package/registry.json +159 -1
- package/src/components/composites/action-button/action-button.tsx +5 -1
- package/src/components/composites/catalog-browser/catalog-browser-group.tsx +148 -0
- package/src/components/composites/catalog-browser/catalog-browser.tsx +258 -0
- package/src/components/composites/catalog-browser/catalog-detail.tsx +64 -0
- package/src/components/composites/catalog-browser/catalog-types.ts +83 -0
- package/src/components/composites/catalog-browser/index.ts +10 -0
- package/src/components/composites/list-row/list-row.tsx +81 -8
- package/src/components/composites/settings/settings.tsx +67 -37
- package/src/components/conversation/scroll-follow.ts +109 -15
- package/src/components/layout/app-shell/index.ts +1 -0
- package/src/components/layout/app-shell/skip-link.tsx +35 -0
- package/src/components/layout/floating-preview/floating-preview.tsx +260 -0
- package/src/components/layout/floating-preview/index.ts +2 -0
- package/src/components/layout/floating-preview/model.ts +285 -0
- package/src/components/theme/index.ts +1 -0
- package/src/components/theme/theme-mode-toggle.tsx +56 -0
- package/src/components/ui/checkbox/checkbox.tsx +20 -3
- package/src/components/ui/combobox/combobox.tsx +24 -1
- package/src/components/ui/combobox/index.ts +1 -0
- package/src/components/ui/combobox/value-combobox.tsx +38 -0
- package/src/components/ui/empty/empty-state.tsx +71 -0
- package/src/components/ui/empty/index.ts +1 -0
- package/src/components/ui/entity-icon/entity-icon.tsx +33 -2
- package/src/components/ui/field/field.tsx +102 -5
- package/src/components/ui/field/index.ts +5 -0
- package/src/components/ui/field/number-field.tsx +71 -0
- package/src/components/ui/input/index.ts +1 -0
- package/src/components/ui/input/input-control.tsx +38 -0
- package/src/components/ui/input/input.tsx +32 -20
- package/src/components/ui/input-group/index.ts +1 -0
- package/src/components/ui/input-group/input-group.tsx +25 -2
- package/src/components/ui/input-group/secret-input-group.tsx +58 -0
- package/src/components/ui/native-select/native-select.tsx +27 -1
- package/src/components/ui/progress/progress.tsx +12 -8
- package/src/components/ui/radio-group/radio-group.tsx +30 -2
- package/src/components/ui/switch/switch.tsx +20 -3
- package/src/components/ui/tabs/tabs.tsx +1 -1
- package/src/components/ui/text-link/index.ts +2 -0
- package/src/components/ui/text-link/text-link.tsx +28 -0
- package/src/components/ui/textarea/textarea.tsx +24 -1
- package/src/index.ts +4 -0
- package/src/lib/clipboard.ts +41 -0
- package/src/lib/download.ts +29 -0
- package/src/lib/form-field.ts +93 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.js","names":["Switch","KobalteSwitch","ComponentProps","JSX","splitProps","cn","SwitchProps","Omit","controlClass","thumbClass","labelClass","descriptionClass","label","Element","description","children","props","local","rest","_$createComponent","_$mergeProps","title","class","Input","aria-label","aria-labelledby","aria-describedby","aria-invalid","aria-busy","Control","Thumb","_$memo","_el$","_tmpl$","_$insert","_c$","Label","_c$2","Description","SwitchLabel","SwitchDescription","Switch","_$createComponent","KobalteSwitch","_$mergeProps","_$memo"],"sources":["../../../../src/components/ui/switch/switch.tsx"],"sourcesContent":["import { Switch as KobalteSwitch } from '@kobalte/core/switch'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Switch.\n *\n * For a setting that takes effect the moment it is flipped. The distinction\n * from Checkbox is behaviour, not looks: a switch applies immediately and\n * belongs in a settings row, while a checkbox is a value the user is still\n * composing and is applied when a form is submitted. A switch inside an unsaved\n * form is the mistake this split exists to prevent.\n *\n * `Switch.Input` renders a real hidden checkbox, so the control is\n * form-native, keyboard-operable, and its `aria-checked` follows the state the\n * user sees.\n */\nexport type SwitchProps = Omit<ComponentProps<typeof KobalteSwitch>, 'children'> & {\n controlClass?: string\n thumbClass?: string\n labelClass?: string\n descriptionClass?: string\n label?: JSX.Element\n description?: JSX.Element\n /**\n * Replaces the control and label. Omit it to get the default control beside\n * `label` and `description`; supply it to compose the parts yourself.\n */\n children?: JSX.Element\n}\n\nexport function Switch(props: SwitchProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'controlClass',\n 'thumbClass',\n 'labelClass',\n 'descriptionClass',\n 'children',\n 'label',\n 'description',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-busy',\n 'title',\n ])\n\n return (\n <KobalteSwitch\n title={local.title}\n class={cn('group/switch flex items-center gap-2.5', local.class)}\n {...rest}\n >\n {/* The name belongs on the input; see Checkbox for why. */}\n <KobalteSwitch.Input\n aria-label={local['aria-label']}\n aria-labelledby={local['aria-labelledby']}\n aria-describedby={local['aria-describedby']}\n aria-invalid={local['aria-invalid']}\n aria-busy={local['aria-busy']}\n title={local.title}\n />\n <KobalteSwitch.Control\n class={cn(\n 'bg-input inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent',\n 'transition-colors ease-out outline-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'data-[checked]:bg-primary',\n 'data-[invalid]:border-destructive',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n local.controlClass\n )}\n >\n <KobalteSwitch.Thumb\n class={cn(\n 'bg-background pointer-events-none block size-4 rounded-full shadow-xs',\n 'transition-transform ease-out',\n 'data-[checked]:translate-x-4',\n local.thumbClass\n )}\n />\n </KobalteSwitch.Control>\n {local.children ??\n (local.label || local.description ? (\n <div class=\"grid gap-0.5\">\n {local.label ? (\n <KobalteSwitch.Label class={cn('text-sm leading-none font-medium', local.labelClass)}>\n {local.label}\n </KobalteSwitch.Label>\n ) : null}\n {local.description ? (\n <KobalteSwitch.Description\n class={cn('text-muted-foreground text-sm', local.descriptionClass)}\n >\n {local.description}\n </KobalteSwitch.Description>\n ) : null}\n </div>\n ) : null)}\n </KobalteSwitch>\n )\n}\n\n/**\n * The switch's own label. Valid only inside a `<Switch>`: it is Kobalte's label\n * for that root's control, and outside one there is nothing to associate with.\n * A label drawn *beside* a switch — a settings row with the control trailing —\n * is plain text, and the switch takes an `aria-label` instead.\n */\nexport function SwitchLabel(props: ComponentProps<typeof KobalteSwitch.Label>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteSwitch.Label class={cn('text-sm leading-none font-medium', local.class)} {...rest} />\n )\n}\n\nexport function SwitchDescription(props: ComponentProps<typeof KobalteSwitch.Description>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteSwitch.Description class={cn('text-muted-foreground text-sm', local.class)} {...rest} />\n )\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"switch.js","names":["Switch","KobalteSwitch","ComponentProps","JSX","splitProps","useFormFieldControl","cn","SwitchProps","Omit","inputId","controlClass","thumbClass","labelClass","descriptionClass","label","Element","description","children","props","local","rest","field","id","_$createComponent","_$mergeProps","undefined","title","class","Input","aria-label","aria-labelledby","aria-describedby","aria-invalid","aria-errormessage","aria-busy","Control","Thumb","_$memo","_el$","_tmpl$","_$insert","_c$","Label","_c$2","Description","SwitchLabel","SwitchDescription","Switch","_$createComponent","KobalteSwitch","_$mergeProps","_$memo"],"sources":["../../../../src/components/ui/switch/switch.tsx"],"sourcesContent":["import { Switch as KobalteSwitch } from '@kobalte/core/switch'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { useFormFieldControl } from '#lib/form-field'\nimport { cn } from '#lib/utils'\n\n/**\n * Switch.\n *\n * For a setting that takes effect the moment it is flipped. The distinction\n * from Checkbox is behaviour, not looks: a switch applies immediately and\n * belongs in a settings row, while a checkbox is a value the user is still\n * composing and is applied when a form is submitted. A switch inside an unsaved\n * form is the mistake this split exists to prevent.\n *\n * `Switch.Input` renders a real hidden checkbox, so the control is\n * form-native, keyboard-operable, and its `aria-checked` follows the state the\n * user sees.\n */\nexport type SwitchProps = Omit<ComponentProps<typeof KobalteSwitch>, 'children'> & {\n /** ID for the hidden native switch input; useful with an external label. */\n inputId?: string\n controlClass?: string\n thumbClass?: string\n labelClass?: string\n descriptionClass?: string\n label?: JSX.Element\n description?: JSX.Element\n /**\n * Replaces the control and label. Omit it to get the default control beside\n * `label` and `description`; supply it to compose the parts yourself.\n */\n children?: JSX.Element\n}\n\nexport function Switch(props: SwitchProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'controlClass',\n 'thumbClass',\n 'labelClass',\n 'descriptionClass',\n 'children',\n 'label',\n 'description',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-errormessage',\n 'aria-busy',\n 'id',\n 'inputId',\n 'title',\n ])\n const field = useFormFieldControl('control', {\n id: local.inputId ?? local.id,\n 'aria-label': local['aria-label'],\n 'aria-labelledby': local['aria-labelledby'],\n 'aria-describedby': local['aria-describedby'],\n 'aria-invalid': local['aria-invalid'],\n 'aria-errormessage': local['aria-errormessage'],\n })\n\n return (\n <KobalteSwitch\n id={field ? undefined : local.id}\n title={local.title}\n class={cn('group/switch flex items-center gap-2.5', local.class)}\n {...rest}\n >\n {/* The name belongs on the input; see Checkbox for why. */}\n <KobalteSwitch.Input\n id={field?.id ?? local.inputId}\n aria-label={local['aria-label']}\n aria-labelledby={field?.['aria-labelledby'] ?? local['aria-labelledby']}\n aria-describedby={field?.['aria-describedby'] ?? local['aria-describedby']}\n aria-invalid={field?.['aria-invalid'] ?? local['aria-invalid']}\n aria-errormessage={field?.['aria-errormessage'] ?? local['aria-errormessage']}\n aria-busy={local['aria-busy']}\n title={local.title}\n />\n <KobalteSwitch.Control\n class={cn(\n 'bg-input inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent',\n 'transition-colors ease-out outline-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'data-[checked]:bg-primary',\n 'data-[invalid]:border-destructive',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n local.controlClass\n )}\n >\n <KobalteSwitch.Thumb\n class={cn(\n 'bg-background pointer-events-none block size-4 rounded-full shadow-xs',\n 'transition-transform ease-out',\n 'data-[checked]:translate-x-4',\n local.thumbClass\n )}\n />\n </KobalteSwitch.Control>\n {local.children ??\n (local.label || local.description ? (\n <div class=\"grid gap-0.5\">\n {local.label ? (\n <KobalteSwitch.Label class={cn('text-sm leading-none font-medium', local.labelClass)}>\n {local.label}\n </KobalteSwitch.Label>\n ) : null}\n {local.description ? (\n <KobalteSwitch.Description\n class={cn('text-muted-foreground text-sm', local.descriptionClass)}\n >\n {local.description}\n </KobalteSwitch.Description>\n ) : null}\n </div>\n ) : null)}\n </KobalteSwitch>\n )\n}\n\n/**\n * The switch's own label. Valid only inside a `<Switch>`: it is Kobalte's label\n * for that root's control, and outside one there is nothing to associate with.\n * A label drawn *beside* a switch — a settings row with the control trailing —\n * is plain text, and the switch takes an `aria-label` instead.\n */\nexport function SwitchLabel(props: ComponentProps<typeof KobalteSwitch.Label>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteSwitch.Label class={cn('text-sm leading-none font-medium', local.class)} {...rest} />\n )\n}\n\nexport function SwitchDescription(props: ComponentProps<typeof KobalteSwitch.Description>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteSwitch.Description class={cn('text-muted-foreground text-sm', local.class)} {...rest} />\n )\n}\n"],"mappings":";;;;;;;AAmCA,SAAgBA,SAAOkB,OAAoB;CACzC,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAO,CACR;CACD,MAAMG,QAAQhB,oBAAoB,WAAW;EAC3CiB,IAAIH,MAAMV,WAAWU,MAAMG;EAC3B,cAAcH,MAAM;EACpB,mBAAmBA,MAAM;EACzB,oBAAoBA,MAAM;EAC1B,gBAAgBA,MAAM;EACtB,qBAAqBA,MAAM;CAC7B,CAAC;CAED,OAAAI,gBACGtB,QAAauB,WAAA;EAAA,IACZF,KAAE;GAAA,OAAED,QAAQI,KAAAA,IAAYN,MAAMG;EAAE;EAAA,IAChCI,QAAK;GAAA,OAAEP,MAAMO;EAAK;EAAA,KAAA,WAAA;GAAA,OACXpB,GAAG,0CAA0Ca,MAAMQ,KAAK;EAAC;CAAA,GAC5DP,MAAI,EAAA,IAAAH,WAAA;EAAA,OAAA;GAAAM,gBAGPtB,OAAc2B,OAAK;IAAA,IAClBN,KAAE;KAAA,OAAED,OAAOC,MAAMH,MAAMV;IAAO;IAAA,KAAA,gBAAA;KAAA,OAClBU,MAAM;I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A,OAEjEE,MAAMH;MAAW;KAAA,CAAA,IAElB;IAAI,EAAA,CAAA,GAAA,IAAA;IAAA,OAAAsB;GAAA,EAAA,CAAA,IAER,KAAK;EAAA;CAAA,EAAA,CAAA,CAAA;AAGjB;;;;;;;AAQA,SAAgBO,YAAY3B,OAAmD;CAC7E,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAK,gBACGtB,OAAcyC,OAAKlB,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQlB,GAAG,oCAAoCa,MAAMQ,KAAK;CAAC,EAAA,GAAMP,IAAI,CAAA;AAE7F;AAEA,SAAgB0B,kBAAkB5B,OAAyD;CACzF,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAK,gBACGtB,OAAc2C,aAAWpB,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQlB,GAAG,iCAAiCa,MAAMQ,KAAK;CAAC,EAAA,GAAMP,IAAI,CAAA;AAEhG"}
|
|
@@ -28,7 +28,7 @@ function TabsList(props) {
|
|
|
28
28
|
function TabsTrigger(props) {
|
|
29
29
|
const [local, rest] = splitProps(props, ["class", "appearance"]);
|
|
30
30
|
return createComponent(Tabs.Trigger, mergeProps({ get ["class"]() {
|
|
31
|
-
return cn("inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap text-sm font-medium", "transition-colors ease-out outline-none select-none", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle", "disabled:pointer-events-none disabled:opacity-50", "text-
|
|
31
|
+
return cn("inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap text-sm font-medium", "transition-colors ease-out outline-none select-none", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle", "disabled:pointer-events-none disabled:opacity-50", "text-foreground", "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4", local.appearance === "segmented" ? "h-control-sm rounded-md px-control-sm data-[selected]:bg-card data-[selected]:shadow-xs" : "h-control-md -mb-px rounded-none border-b-2 border-transparent px-2 pb-2 data-[selected]:border-primary", local.class);
|
|
32
32
|
} }, rest));
|
|
33
33
|
}
|
|
34
34
|
function TabsContent(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","names":["Tabs","KobalteTabs","ComponentProps","splitProps","cn","props","local","rest","_$createComponent","_$mergeProps","class","TabsListProps","List","appearance","TabsList","TabsTriggerProps","Trigger","TabsTrigger","TabsContent","Content","Tabs","_$createComponent","KobalteTabs","_$mergeProps"],"sources":["../../../../src/components/ui/tabs/tabs.tsx"],"sourcesContent":["import { Tabs as KobalteTabs } from '@kobalte/core/tabs'\nimport type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Tabs.\n *\n * For switching between sibling views of the *same* subject — a file's code,\n * diff and history. Not for moving between pages: a tab is expected to keep\n * its panel and its scroll position, which a route does not.\n *\n * `appearance=\"segmented\"` gives the joined bar KiroCrew uses inside a pane\n * where a full-width underline would collide with the panel's own header rule.\n */\nexport function Tabs(props: ComponentProps<typeof KobalteTabs>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteTabs\n class={cn('flex flex-col gap-2 data-[orientation=vertical]:flex-row', local.class)}\n {...rest}\n />\n )\n}\n\nexport type TabsListProps = ComponentProps<typeof KobalteTabs.List> & {\n appearance?: 'underline' | 'segmented'\n}\n\nexport function TabsList(props: TabsListProps) {\n const [local, rest] = splitProps(props, ['class', 'appearance'])\n\n return (\n <KobalteTabs.List\n class={cn(\n 'inline-flex w-fit shrink-0 items-center justify-center',\n local.appearance === 'segmented'\n ? 'gap-0.5 rounded-lg bg-surface-hover p-0.5'\n : 'gap-1 rounded-none border-b border-border',\n 'data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport type TabsTriggerProps = ComponentProps<typeof KobalteTabs.Trigger> & {\n appearance?: 'underline' | 'segmented'\n}\n\nexport function TabsTrigger(props: TabsTriggerProps) {\n const [local, rest] = splitProps(props, ['class', 'appearance'])\n\n return (\n <KobalteTabs.Trigger\n class={cn(\n 'inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap text-sm font-medium',\n 'transition-colors ease-out outline-none select-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'disabled:pointer-events-none disabled:opacity-50',\n 'text-
|
|
1
|
+
{"version":3,"file":"tabs.js","names":["Tabs","KobalteTabs","ComponentProps","splitProps","cn","props","local","rest","_$createComponent","_$mergeProps","class","TabsListProps","List","appearance","TabsList","TabsTriggerProps","Trigger","TabsTrigger","TabsContent","Content","Tabs","_$createComponent","KobalteTabs","_$mergeProps"],"sources":["../../../../src/components/ui/tabs/tabs.tsx"],"sourcesContent":["import { Tabs as KobalteTabs } from '@kobalte/core/tabs'\nimport type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Tabs.\n *\n * For switching between sibling views of the *same* subject — a file's code,\n * diff and history. Not for moving between pages: a tab is expected to keep\n * its panel and its scroll position, which a route does not.\n *\n * `appearance=\"segmented\"` gives the joined bar KiroCrew uses inside a pane\n * where a full-width underline would collide with the panel's own header rule.\n */\nexport function Tabs(props: ComponentProps<typeof KobalteTabs>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteTabs\n class={cn('flex flex-col gap-2 data-[orientation=vertical]:flex-row', local.class)}\n {...rest}\n />\n )\n}\n\nexport type TabsListProps = ComponentProps<typeof KobalteTabs.List> & {\n appearance?: 'underline' | 'segmented'\n}\n\nexport function TabsList(props: TabsListProps) {\n const [local, rest] = splitProps(props, ['class', 'appearance'])\n\n return (\n <KobalteTabs.List\n class={cn(\n 'inline-flex w-fit shrink-0 items-center justify-center',\n local.appearance === 'segmented'\n ? 'gap-0.5 rounded-lg bg-surface-hover p-0.5'\n : 'gap-1 rounded-none border-b border-border',\n 'data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport type TabsTriggerProps = ComponentProps<typeof KobalteTabs.Trigger> & {\n appearance?: 'underline' | 'segmented'\n}\n\nexport function TabsTrigger(props: TabsTriggerProps) {\n const [local, rest] = splitProps(props, ['class', 'appearance'])\n\n return (\n <KobalteTabs.Trigger\n class={cn(\n 'inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap text-sm font-medium',\n 'transition-colors ease-out outline-none select-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'disabled:pointer-events-none disabled:opacity-50',\n 'text-foreground',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4',\n local.appearance === 'segmented'\n ? 'h-control-sm rounded-md px-control-sm data-[selected]:bg-card data-[selected]:shadow-xs'\n : 'h-control-md -mb-px rounded-none border-b-2 border-transparent px-2 pb-2 data-[selected]:border-primary',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function TabsContent(props: ComponentProps<typeof KobalteTabs.Content>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteTabs.Content class={cn('flex-1 outline-none', local.class)} {...rest} />\n}\n"],"mappings":";;;;;;;;;;;;;;;AAeA,SAAgBA,OAAKK,OAA2C;CAC9D,MAAM,CAACC,OAAOC,QAAQJ,WAAWE,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBACGP,MAAWQ,WAAA,EAAA,KAAA,WAAA;EAAA,OACHL,GAAG,4DAA4DE,MAAMI,KAAK;CAAC,EAAA,GAC9EH,IAAI,CAAA;AAGd;AAMA,SAAgBO,SAAST,OAAsB;CAC7C,MAAM,CAACC,OAAOC,QAAQJ,WAAWE,OAAO,CAAC,SAAS,YAAY,CAAC;CAE/D,OAAAG,gBACGP,KAAYW,MAAIH,WAAA,EAAA,KAAA,WAAA;EAAA,OACRL,GACL,0DACAE,MAAMO,eAAe,cACjB,8CACA,6CACJ,kFACAP,MAAMI,KACR;CAAC,EAAA,GACGH,IAAI,CAAA;AAGd;AAMA,SAAgBU,YAAYZ,OAAyB;CACnD,MAAM,CAACC,OAAOC,QAAQJ,WAAWE,OAAO,CAAC,SAAS,YAAY,CAAC;CAE/D,OAAAG,gBACGP,KAAYe,SAAOP,WAAA,EAAA,KAAA,WAAA;EAAA,OACXL,GACL,kGACA,uDACA,oFACA,oDACA,mBACA,+DACAE,MAAMO,eAAe,cACjB,4FACA,2GACJP,MAAMI,KACR;CAAC,EAAA,GACGH,IAAI,CAAA;AAGd;AAEA,SAAgBW,YAAYb,OAAmD;CAC7E,MAAM,CAACC,OAAOC,QAAQJ,WAAWE,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBAAQP,KAAYkB,SAAOV,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQL,GAAG,uBAAuBE,MAAMI,KAAK;CAAC,EAAA,GAAMH,IAAI,CAAA;AACrF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/text-link/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentProps } from 'solid-js';
|
|
2
|
+
/**
|
|
3
|
+
* TextLink.
|
|
4
|
+
*
|
|
5
|
+
* An inline, underlined link for prose and content navigation. Use ActionButton
|
|
6
|
+
* or ListRow when the link is a compact action or a row-sized target.
|
|
7
|
+
*/
|
|
8
|
+
export declare function TextLink(props: ComponentProps<'a'>): import("solid-js").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=text-link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-link.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/text-link/text-link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAI9C;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC,GAAG,CAAC,kCAiBlD"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { cn } from "../../../lib/utils.js";
|
|
2
|
+
import { mergeProps, spread, template } from "solid-js/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
//#region src/components/ui/text-link/text-link.tsx
|
|
5
|
+
var _tmpl$ = /*#__PURE__*/ template(`<a data-slot=textlink>`);
|
|
6
|
+
/**
|
|
7
|
+
* TextLink.
|
|
8
|
+
*
|
|
9
|
+
* An inline, underlined link for prose and content navigation. Use ActionButton
|
|
10
|
+
* or ListRow when the link is a compact action or a row-sized target.
|
|
11
|
+
*/
|
|
12
|
+
function TextLink(props) {
|
|
13
|
+
const [local, rest] = splitProps(props, ["class", "tabIndex"]);
|
|
14
|
+
return (() => {
|
|
15
|
+
var _el$ = _tmpl$();
|
|
16
|
+
spread(_el$, mergeProps({
|
|
17
|
+
get ["class"]() {
|
|
18
|
+
return cn("rounded-sm text-foreground underline decoration-primary underline-offset-4", "transition-colors ease-out hover:decoration-foreground outline-none", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle", "motion-reduce:transition-none", local.class);
|
|
19
|
+
},
|
|
20
|
+
get tabIndex() {
|
|
21
|
+
return local.tabIndex ?? 0;
|
|
22
|
+
}
|
|
23
|
+
}, rest), false, false);
|
|
24
|
+
return _el$;
|
|
25
|
+
})();
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { TextLink };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=text-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-link.js","names":["ComponentProps","splitProps","cn","TextLink","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","tabIndex","_$mergeProps"],"sources":["../../../../src/components/ui/text-link/text-link.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * TextLink.\n *\n * An inline, underlined link for prose and content navigation. Use ActionButton\n * or ListRow when the link is a compact action or a row-sized target.\n */\nexport function TextLink(props: ComponentProps<'a'>) {\n const [local, rest] = splitProps(props, ['class', 'tabIndex'])\n\n return (\n <a\n data-slot=\"textlink\"\n class={cn(\n 'rounded-sm text-foreground underline decoration-primary underline-offset-4',\n 'transition-colors ease-out hover:decoration-foreground outline-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'motion-reduce:transition-none',\n local.class\n )}\n tabIndex={local.tabIndex ?? 0}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;AAUA,SAAgBG,SAASC,OAA4B;CACnD,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,SAAS,UAAU,CAAC;CAE7D,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA;GAAA,KAAA,WAAA;IAAA,OAGWR,GACL,8EACA,uEACA,oFACA,iCACAG,MAAMM,KACR;GAAC;GAAA,IACDC,WAAQ;IAAA,OAAEP,MAAMO,YAAY;GAAC;EAAA,GACzBN,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/textarea/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/textarea/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAK9C;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC,UAAU,CAAC,kCA0CzD"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cn } from "../../../lib/utils.js";
|
|
2
|
+
import { useFormFieldControl } from "../../../lib/form-field.js";
|
|
2
3
|
import { mergeProps, spread, template } from "solid-js/web";
|
|
3
4
|
import { splitProps } from "solid-js";
|
|
4
5
|
//#region src/components/ui/textarea/textarea.tsx
|
|
@@ -15,12 +16,48 @@ var _tmpl$ = /*#__PURE__*/ template(`<textarea data-slot=textarea>`);
|
|
|
15
16
|
* remains the fallback so an unsupported engine still gets a usable height.
|
|
16
17
|
*/
|
|
17
18
|
function Textarea(props) {
|
|
18
|
-
const [local, rest] = splitProps(props, [
|
|
19
|
+
const [local, rest] = splitProps(props, [
|
|
20
|
+
"class",
|
|
21
|
+
"id",
|
|
22
|
+
"aria-label",
|
|
23
|
+
"aria-labelledby",
|
|
24
|
+
"aria-describedby",
|
|
25
|
+
"aria-invalid",
|
|
26
|
+
"aria-errormessage"
|
|
27
|
+
]);
|
|
28
|
+
const field = useFormFieldControl("control", {
|
|
29
|
+
id: local.id,
|
|
30
|
+
"aria-label": local["aria-label"],
|
|
31
|
+
"aria-labelledby": local["aria-labelledby"],
|
|
32
|
+
"aria-describedby": local["aria-describedby"],
|
|
33
|
+
"aria-invalid": local["aria-invalid"],
|
|
34
|
+
"aria-errormessage": local["aria-errormessage"]
|
|
35
|
+
});
|
|
19
36
|
return (() => {
|
|
20
37
|
var _el$ = _tmpl$();
|
|
21
|
-
spread(_el$, mergeProps({
|
|
22
|
-
|
|
23
|
-
|
|
38
|
+
spread(_el$, mergeProps({
|
|
39
|
+
get id() {
|
|
40
|
+
return field?.id ?? local.id;
|
|
41
|
+
},
|
|
42
|
+
get ["aria-label"]() {
|
|
43
|
+
return local["aria-label"];
|
|
44
|
+
},
|
|
45
|
+
get ["aria-labelledby"]() {
|
|
46
|
+
return field?.["aria-labelledby"] ?? local["aria-labelledby"];
|
|
47
|
+
},
|
|
48
|
+
get ["aria-describedby"]() {
|
|
49
|
+
return field?.["aria-describedby"] ?? local["aria-describedby"];
|
|
50
|
+
},
|
|
51
|
+
get ["aria-invalid"]() {
|
|
52
|
+
return field?.["aria-invalid"] ?? local["aria-invalid"];
|
|
53
|
+
},
|
|
54
|
+
get ["aria-errormessage"]() {
|
|
55
|
+
return field?.["aria-errormessage"] ?? local["aria-errormessage"];
|
|
56
|
+
},
|
|
57
|
+
get ["class"]() {
|
|
58
|
+
return cn("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-control-md py-2 text-sm", "transition-[color,box-shadow,border-color] ease-out outline-none", "placeholder:text-muted-foreground", "selection:bg-primary selection:text-primary-foreground", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle", "aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle", "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", "resize-y", local.class);
|
|
59
|
+
}
|
|
60
|
+
}, rest), false, false);
|
|
24
61
|
return _el$;
|
|
25
62
|
})();
|
|
26
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.js","names":["ComponentProps","splitProps","cn","Textarea","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","_$mergeProps"],"sources":["../../../../src/components/ui/textarea/textarea.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Textarea.\n *\n * Shares the Input's border, focus and invalid treatment exactly — the two are\n * the same control at different aspect ratios, and a form that mixes them must\n * not show a seam between them.\n *\n * `field-sizing: content` lets the element grow with its content where the\n * engine supports it, which is the behaviour a chat composer wants; `rows`\n * remains the fallback so an unsupported engine still gets a usable height.\n */\nexport function Textarea(props: ComponentProps<'textarea'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <textarea\n data-slot=\"textarea\"\n class={cn(\n 'flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-control-md py-2 text-sm',\n 'transition-[color,box-shadow,border-color] ease-out outline-none',\n 'placeholder:text-muted-foreground',\n 'selection:bg-primary selection:text-primary-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',\n 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n 'resize-y',\n local.class\n )}\n {...rest}\n />\n )\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"textarea.js","names":["ComponentProps","splitProps","useFormFieldControl","cn","Textarea","props","local","rest","field","id","_el$","_tmpl$","_$spread","_$mergeProps","aria-label","aria-labelledby","aria-describedby","aria-invalid","aria-errormessage","class","_$mergeProps"],"sources":["../../../../src/components/ui/textarea/textarea.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { useFormFieldControl } from '#lib/form-field'\nimport { cn } from '#lib/utils'\n\n/**\n * Textarea.\n *\n * Shares the Input's border, focus and invalid treatment exactly — the two are\n * the same control at different aspect ratios, and a form that mixes them must\n * not show a seam between them.\n *\n * `field-sizing: content` lets the element grow with its content where the\n * engine supports it, which is the behaviour a chat composer wants; `rows`\n * remains the fallback so an unsupported engine still gets a usable height.\n */\nexport function Textarea(props: ComponentProps<'textarea'>) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'id',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-errormessage',\n ])\n const field = useFormFieldControl('control', {\n id: local.id,\n 'aria-label': local['aria-label'],\n 'aria-labelledby': local['aria-labelledby'],\n 'aria-describedby': local['aria-describedby'],\n 'aria-invalid': local['aria-invalid'],\n 'aria-errormessage': local['aria-errormessage'],\n })\n\n return (\n <textarea\n data-slot=\"textarea\"\n id={field?.id ?? local.id}\n aria-label={local['aria-label']}\n aria-labelledby={field?.['aria-labelledby'] ?? local['aria-labelledby']}\n aria-describedby={field?.['aria-describedby'] ?? local['aria-describedby']}\n aria-invalid={field?.['aria-invalid'] ?? local['aria-invalid']}\n aria-errormessage={field?.['aria-errormessage'] ?? local['aria-errormessage']}\n class={cn(\n 'flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-control-md py-2 text-sm',\n 'transition-[color,box-shadow,border-color] ease-out outline-none',\n 'placeholder:text-muted-foreground',\n 'selection:bg-primary selection:text-primary-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',\n 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n 'resize-y',\n local.class\n )}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAgBA,SAAgBI,SAASC,OAAmC;CAC1D,MAAM,CAACC,OAAOC,QAAQN,WAAWI,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;CAAmB,CACpB;CACD,MAAMG,QAAQN,oBAAoB,WAAW;EAC3CO,IAAIH,MAAMG;EACV,cAAcH,MAAM;EACpB,mBAAmBA,MAAM;EACzB,oBAAoBA,MAAM;EAC1B,gBAAgBA,MAAM;EACtB,qBAAqBA,MAAM;CAC7B,CAAC;CAED,cAAA;EAAA,IAAAI,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA;GAAA,IAGIJ,KAAE;IAAA,OAAED,OAAOC,MAAMH,MAAMG;GAAE;GAAA,KAAA,gBAAA;IAAA,OACbH,MAAM;GAAa;GAAA,KAAA,qBAAA;IAAA,OACdE,QAAQ,sBAAsBF,MAAM;GAAkB;GAAA,KAAA,sBAAA;IAAA,OACrDE,QAAQ,uBAAuBF,MAAM;GAAmB;GAAA,KAAA,kBAAA;IAAA,OAC5DE,QAAQ,mBAAmBF,MAAM;GAAe;GAAA,KAAA,uBAAA;IAAA,OAC3CE,QAAQ,wBAAwBF,MAAM;GAAoB;GAAA,KAAA,WAAA;IAAA,OACtEH,GACL,sHACA,oEACA,qCACA,0DACA,oFACA,4FACA,gFACA,YACAG,MAAMa,KACR;GAAC;EAAA,GACGZ,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAG;CAAA,EAAA,CAAA;AAGd"}
|
package/dist/index.d.ts
CHANGED
|
@@ -67,12 +67,14 @@ export * from './components/ui/switch';
|
|
|
67
67
|
export * from './components/ui/table';
|
|
68
68
|
export * from './components/ui/tabs';
|
|
69
69
|
export * from './components/ui/textarea';
|
|
70
|
+
export * from './components/ui/text-link';
|
|
70
71
|
export * from './components/ui/toast';
|
|
71
72
|
export * from './components/ui/toggle';
|
|
72
73
|
export * from './components/ui/toggle-group';
|
|
73
74
|
export * from './components/ui/tooltip';
|
|
74
75
|
export * from './components/motion';
|
|
75
76
|
export * from './components/layout/split-layout';
|
|
77
|
+
export * from './components/layout/floating-preview';
|
|
76
78
|
export * from './components/layout/orbit-layout';
|
|
77
79
|
export * from './components/layout/virtual-window';
|
|
78
80
|
export * from './components/layout/app-shell';
|
|
@@ -86,6 +88,7 @@ export * from './components/conversation';
|
|
|
86
88
|
export * from './components/theme';
|
|
87
89
|
export * from './components/composites/account-menu';
|
|
88
90
|
export * from './components/composites/action-button';
|
|
91
|
+
export * from './components/composites/catalog-browser';
|
|
89
92
|
export * from './components/composites/list-row';
|
|
90
93
|
export * from './components/composites/settings';
|
|
91
94
|
export * from './components/composites/stat';
|
|
@@ -96,6 +99,7 @@ export { cn } from './lib/utils';
|
|
|
96
99
|
export { controlInteractive, controlSize, controlSizeIcon, controlSizes, cva, surfaceInteractive, type ControlSize, type VariantProps, } from './lib/variants';
|
|
97
100
|
export { builtinThemes, contrastRatio, defaultDarkThemeId, defaultLightThemeId, themeById, themeCssVariables, themeFamilies, themesForAppearance, validateTheme, validateThemeRegistry, type ThemeAppearance, type ThemeColors, type ThemeEditorPalette, type ThemeFinding, type ThemeProvenance, type ThemeTerminalPalette, type ThemeVariant, } from './lib/themes';
|
|
98
101
|
export { keyedRows, type KeyedRow } from './lib/keyed-rows';
|
|
102
|
+
export { writeClipboardText } from './lib/clipboard';
|
|
99
103
|
export { formatBytes, formatReleaseDate, plainTextFromMarkdown } from './lib/version-notes';
|
|
100
104
|
export { accentPresets, allTokens, colorTokens, densityTokens, designTokens, elevationTokens, fontOptions, motionTokens, radiusTokens, typographyTokens, undocumentedTokenAliases, zIndexTokens, type AccentPreset, type FontOption, type TokenDefinition, type TokenKind, } from './lib/tokens';
|
|
101
105
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uBAA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e,EACpB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,YAAY,GAClB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3F,OAAO,EACL,aAAa,EACb,SAAS,EACT,WAAW,EACX,aAAa,EACb,YAAY,EACZ,eAAe,EACf,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,wBAAwB,EACxB,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,SAAS,GACf,MAAM,cAAc,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -16,6 +16,7 @@ import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader,
|
|
|
16
16
|
import { Checkbox, CheckboxDescription, CheckboxLabel } from "./components/ui/checkbox/checkbox.js";
|
|
17
17
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./components/ui/collapsible/collapsible.js";
|
|
18
18
|
import { Combobox, ComboboxClear, ComboboxContent, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxSection, ComboboxTrigger } from "./components/ui/combobox/combobox.js";
|
|
19
|
+
import { ValueCombobox } from "./components/ui/combobox/value-combobox.js";
|
|
19
20
|
import { CodeBlock, InlineCode, TALL_CODE_BLOCK_PX } from "./components/ui/code-block/code-block.js";
|
|
20
21
|
import { Dialog, DialogClose, DialogCloseButton, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./components/ui/dialog/dialog.js";
|
|
21
22
|
import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut } from "./components/ui/command/command.js";
|
|
@@ -26,14 +27,21 @@ import { Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerDescription
|
|
|
26
27
|
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./components/ui/dropdown-menu/dropdown-menu.js";
|
|
27
28
|
import { EntityIcon, entityIconVariants, monogram } from "./components/ui/entity-icon/entity-icon.js";
|
|
28
29
|
import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "./components/ui/empty/empty.js";
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
30
|
+
import { Spinner } from "./components/ui/spinner/spinner.js";
|
|
31
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./components/ui/tooltip/tooltip.js";
|
|
32
|
+
import { ActionButton } from "./components/composites/action-button/action-button.js";
|
|
33
|
+
import { EmptyState } from "./components/ui/empty/empty-state.js";
|
|
34
|
+
import { Label } from "./components/ui/label/label.js";
|
|
35
|
+
import { Field, FieldDescription, FieldError, FieldGroup, FieldInput, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTextArea, FormField } from "./components/ui/field/field.js";
|
|
36
|
+
import { InputControl } from "./components/ui/input/input-control.js";
|
|
31
37
|
import { Input } from "./components/ui/input/input.js";
|
|
38
|
+
import { NumberField } from "./components/ui/field/number-field.js";
|
|
39
|
+
import { HoverCard, HoverCardContent, HoverCardTrigger } from "./components/ui/hover-card/hover-card.js";
|
|
32
40
|
import { Item, ItemDescription, ItemEmpty, ItemGroup, ItemGroupEntry, ItemTitle, itemVariants } from "./components/ui/item/item.js";
|
|
33
41
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText } from "./components/ui/input-group/input-group.js";
|
|
42
|
+
import { SecretInputGroup } from "./components/ui/input-group/secret-input-group.js";
|
|
34
43
|
import { InputOtp, InputOtpCaret } from "./components/ui/input-otp/input-otp.js";
|
|
35
44
|
import { Kbd, KbdGroup } from "./components/ui/kbd/kbd.js";
|
|
36
|
-
import { Label } from "./components/ui/label/label.js";
|
|
37
45
|
import { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger } from "./components/ui/menubar/menubar.js";
|
|
38
46
|
import { ModalDialog } from "./components/ui/modal-dialog/modal-dialog.js";
|
|
39
47
|
import { NavigationMenu, NavigationMenuContent, NavigationMenuGroup, NavigationMenuGroupLabel, NavigationMenuItem, NavigationMenuMenu, NavigationMenuSeparator, NavigationMenuTrigger, NavigationMenuViewport } from "./components/ui/navigation-menu/navigation-menu.js";
|
|
@@ -48,13 +56,12 @@ import { NativeSelect } from "./components/ui/native-select/native-select.js";
|
|
|
48
56
|
import { Sheet, SheetBody, SheetCloseButton, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, sheetVariants } from "./components/ui/sheet/sheet.js";
|
|
49
57
|
import { Skeleton } from "./components/ui/skeleton/skeleton.js";
|
|
50
58
|
import { Slider } from "./components/ui/slider/slider.js";
|
|
51
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./components/ui/tooltip/tooltip.js";
|
|
52
59
|
import { StatusChip, StatusList, statusDotVariants } from "./components/ui/status-chip/status-chip.js";
|
|
53
|
-
import { Spinner } from "./components/ui/spinner/spinner.js";
|
|
54
60
|
import { Switch, SwitchDescription, SwitchLabel } from "./components/ui/switch/switch.js";
|
|
55
61
|
import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableNumericCell, TableRow } from "./components/ui/table/table.js";
|
|
56
62
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./components/ui/tabs/tabs.js";
|
|
57
63
|
import { Textarea } from "./components/ui/textarea/textarea.js";
|
|
64
|
+
import { TextLink } from "./components/ui/text-link/text-link.js";
|
|
58
65
|
import { Toaster, toast, toaster } from "./components/ui/toast/toast.js";
|
|
59
66
|
import { Toggle, toggleVariants } from "./components/ui/toggle/toggle.js";
|
|
60
67
|
import { ToggleGroup, ToggleGroupItem } from "./components/ui/toggle-group/toggle-group.js";
|
|
@@ -63,9 +70,12 @@ import { Motion } from "./components/motion/index.js";
|
|
|
63
70
|
import { MAX_LAYOUT_DEPTH, MAX_LAYOUT_LEAVES, MAX_SPLIT_RATIO, MIN_SPLIT_RATIO, closePane, countLeaves, createLayoutState, focusPane, layoutDepth, listLeaves, movePane, neighborLeaf, normalizeLayout, resizeSplit, splitPane, swapPanes, undoClosePane } from "./components/layout/split-layout/model.js";
|
|
64
71
|
import { computeLayoutFrames } from "./components/layout/split-layout/geometry.js";
|
|
65
72
|
import { SplitLayout } from "./components/layout/split-layout/split-layout.js";
|
|
73
|
+
import { FLOATING_PREVIEW_CORNER_RADIUS, FLOATING_PREVIEW_EDGE_GAP, NO_FLOATING_PREVIEW_OBSTACLES, NO_PREVIEW_MINI_PLAYER_OBSTACLES, PREVIEW_MINI_PLAYER_CORNER_RADIUS, PREVIEW_MINI_PLAYER_EDGE_GAP, clampFloatingPreviewPosition, clampPreviewMiniPlayerPosition, resizeFloatingPreview, resizePreviewMiniPlayer, resolveFloatingPreviewFrame, resolvePreviewMiniPlayerFrame } from "./components/layout/floating-preview/model.js";
|
|
74
|
+
import { FloatingPreview } from "./components/layout/floating-preview/floating-preview.js";
|
|
66
75
|
import { OrbitItem, OrbitLayout } from "./components/layout/orbit-layout/orbit-layout.js";
|
|
67
76
|
import { VirtualWindow } from "./components/layout/virtual-window/virtual-window.js";
|
|
68
77
|
import { AppShell, AppShellBody, AppShellContent, AppShellMain } from "./components/layout/app-shell/app-shell.js";
|
|
78
|
+
import { SkipLink } from "./components/layout/app-shell/skip-link.js";
|
|
69
79
|
import { Page, PageHeader, PageHeaderActions, PageHeaderContent, PageHeaderDescription, PageHeaderTitle, PageSection } from "./components/layout/page/page.js";
|
|
70
80
|
import { Panel, PanelActions, PanelBody, PanelCard, PanelDescription, PanelFooter, PanelHeader, PanelPlaceholder, PanelTitle, PanelToolbar } from "./components/layout/panel/panel.js";
|
|
71
81
|
import { useSideRail } from "./components/layout/side-rail/side-rail-context.js";
|
|
@@ -89,8 +99,11 @@ import { ThemePicker, ThemePreview, ThemeSwatch } from "./components/theme/theme
|
|
|
89
99
|
import { ThemeProvider, defaultThemeSelection, inlineScriptLiteral, resolvedDensity, themeScript, useTheme } from "./components/theme/theme-provider.js";
|
|
90
100
|
import { AppearancePanel } from "./components/theme/appearance-panel.js";
|
|
91
101
|
import { ThemeToggle } from "./components/theme/theme-toggle.js";
|
|
102
|
+
import { ThemeModeToggle } from "./components/theme/theme-mode-toggle.js";
|
|
92
103
|
import { AccountMenu } from "./components/composites/account-menu/account-menu.js";
|
|
93
|
-
import {
|
|
104
|
+
import { keyedRows } from "./lib/keyed-rows.js";
|
|
105
|
+
import { CatalogBrowser } from "./components/composites/catalog-browser/catalog-browser.js";
|
|
106
|
+
import { CatalogDetail, CatalogDetailSection } from "./components/composites/catalog-browser/catalog-detail.js";
|
|
94
107
|
import { ListGroup, ListRow } from "./components/composites/list-row/list-row.js";
|
|
95
108
|
import { SettingsField, SettingsPage, SettingsRow, SettingsSection } from "./components/composites/settings/settings.js";
|
|
96
109
|
import { PropertyList, PropertyRow, PropertyTerm, PropertyValue, Stat, StatGroup } from "./components/composites/stat/stat.js";
|
|
@@ -99,5 +112,5 @@ import { AppearanceEditor, AppearancePopover } from "./components/composites/app
|
|
|
99
112
|
import { formatBytes, formatReleaseDate, plainTextFromMarkdown } from "./lib/version-notes.js";
|
|
100
113
|
import { UpdateDialog } from "./components/composites/update-dialog/update-dialog.js";
|
|
101
114
|
import { WorkspaceMark } from "./components/composites/workspace-mark/workspace-mark.js";
|
|
102
|
-
import {
|
|
103
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountMenu, ActionButton, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppShell, AppShellBody, AppShellContent, AppShellMain, AppearanceEditor, AppearancePanel, AppearancePopover, AspectRatio, AttachmentCard, Avatar, AvatarFallback, AvatarImage, Badge, Board, BoardCardBody, BoardCardTitle, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator, BusySendButton, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CalendarSurface, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatComposer, Checkbox, CheckboxDescription, CheckboxLabel, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxClear, ComboboxContent, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxSection, ComboboxTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut, ComposerAttachmentButton, ComposerHint, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ConversationAvatar, ConversationSurface, DatePicker, DetailPanel, DetailPanelBody, DetailPanelField, DetailPanelHeader, DetailPanelSection, Dialog, DialogClose, DialogCloseButton, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffBlock, DiffSummary, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, EntityIcon, Field, FieldDescription, FieldError, FieldInput, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTextArea, HoverCard, HoverCardContent, HoverCardTrigger, InlineCode, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputOtp, InputOtpCaret, Item, ItemDescription, ItemEmpty, ItemGroup, ItemGroupEntry, ItemTitle, Kbd, KbdGroup, Label, ListGroup, ListRow, MAX_LAYOUT_DEPTH, MAX_LAYOUT_LEAVES, MAX_SPLIT_RATIO, MIN_SPLIT_RATIO, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MessageBody, MessageComposer, MessageDayDivider, MessageGroup, MessageRow, ModalDialog, Motion, NativeSelect, NavigationMenu, NavigationMenuContent, NavigationMenuGroup, NavigationMenuGroupLabel, NavigationMenuItem, NavigationMenuMenu, NavigationMenuSeparator, NavigationMenuTrigger, NavigationMenuViewport, OrbitItem, OrbitLayout, PASTE_THRESHOLD_CHARS, PASTE_THRESHOLD_LINES, PASTE_TOKEN_REGEX, Page, PageHeader, PageHeaderActions, PageHeaderContent, PageHeaderDescription, PageHeaderTitle, PageSection, Pagination, PaginationEllipsis, PaginationItem, PaginationNext, PaginationPrevious, PalettePreview, Panel, PanelActions, PanelBody, PanelCard, PanelDescription, PanelFooter, PanelHeader, PanelPlaceholder, PanelTitle, PanelToolbar, Popover, PopoverAnchor, PopoverCloseButton, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger, Presence, Progress, PropertyList, PropertyRow, PropertyTerm, PropertyValue, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, Select, SelectChevronsUpDown, SelectContent, SelectItem, SelectLabel, SelectSection, SelectTrigger, SelectValue, Separator, SettingsField, SettingsPage, SettingsRow, SettingsSection, Sheet, SheetBody, SheetCloseButton, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SideRail, SideRailButton, SideRailContent, SideRailFooter, SideRailHeader, SideRailItem, SideRailSection, SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavResizeHandle, SidebarNavSection, SidebarNavTitle, Skeleton, Slider, Spinner, SplitLayout, Stat, StatGroup, StatusBar, StatusBarItem, StatusBarSpacer, StatusChip, StatusList, Switch, SwitchDescription, SwitchLabel, TALL_CODE_BLOCK_PX, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableNumericCell, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeMiniature, ThemeMiniatureSplit, ThemePicker, ThemePreview, ThemeProvider, ThemeSwatch, ThemeToggle, ThreadPanel, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBar, TopBarBreadcrumb, TopBarPill, TopBarSearch, TopBarSection, TopBarTitle, TranscriptComposition, UpdateDialog, VirtualWindow, WorkspaceMark, accentPresets, alertVariants, allTokens, badgeVariants, boardCardTitleVariants, builtinThemes, buttonVariants, closePane, cn, colorTokens, computeLayoutFrames, contrastRatio, controlInteractive, controlSize, controlSizeIcon, controlSizes, countLeaves, countLines, createLayoutState, cva, defaultDarkThemeId, defaultLightThemeId, defaultThemeSelection, densityTokens, designTokens, diffLineVariants, diffStats, diffTargetPath, elevationTokens, entityIconVariants, expandAll, findTokenRanges, focusPane, fontOptions, formatBytes, formatReleaseDate, formatToken, initialsFrom, inlineScriptLiteral, isPasteBlock, itemVariants, keyedRows, layoutDepth, listLeaves, monogram, motionTokens, movePane, neighborLeaf, nextSeq, normalizeLayout, parseDiff, plainTextFromMarkdown, pruneBlocks, radiusTokens, recollapsePastes, remapCarriedBlocks, resizeSplit, resolvedDensity, sheetVariants, shouldCollapse, sidebarNavItemClass, sidebarNavItemStateClass, splitPane, statusDotVariants, stripTrailingBlankLines, surfaceInteractive, swapPanes, themeById, themeCssVariables, themeFamilies, themeScript, themesForAppearance, toast, toaster, toggleVariants, tokenRangeAt, transcriptDisclosureKey, typographyTokens, undoClosePane, undocumentedTokenAliases, useSideRail, useTheme, validateTheme, validateThemeRegistry, zIndexTokens };
|
|
115
|
+
import { writeClipboardText } from "./lib/clipboard.js";
|
|
116
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountMenu, ActionButton, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppShell, AppShellBody, AppShellContent, AppShellMain, AppearanceEditor, AppearancePanel, AppearancePopover, AspectRatio, AttachmentCard, Avatar, AvatarFallback, AvatarImage, Badge, Board, BoardCardBody, BoardCardTitle, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator, BusySendButton, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CalendarSurface, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CatalogBrowser, CatalogDetail, CatalogDetailSection, ChatComposer, Checkbox, CheckboxDescription, CheckboxLabel, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxClear, ComboboxContent, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxSection, ComboboxTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut, ComposerAttachmentButton, ComposerHint, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ConversationAvatar, ConversationSurface, DatePicker, DetailPanel, DetailPanelBody, DetailPanelField, DetailPanelHeader, DetailPanelSection, Dialog, DialogClose, DialogCloseButton, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffBlock, DiffSummary, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, EmptyTitle, EntityIcon, FLOATING_PREVIEW_CORNER_RADIUS, FLOATING_PREVIEW_EDGE_GAP, Field, FieldDescription, FieldError, FieldGroup, FieldInput, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTextArea, FloatingPreview, FormField, HoverCard, HoverCardContent, HoverCardTrigger, InlineCode, Input, InputControl, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputOtp, InputOtpCaret, Item, ItemDescription, ItemEmpty, ItemGroup, ItemGroupEntry, ItemTitle, Kbd, KbdGroup, Label, ListGroup, ListRow, MAX_LAYOUT_DEPTH, MAX_LAYOUT_LEAVES, MAX_SPLIT_RATIO, MIN_SPLIT_RATIO, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MessageBody, MessageComposer, MessageDayDivider, MessageGroup, MessageRow, ModalDialog, Motion, NO_FLOATING_PREVIEW_OBSTACLES, NO_PREVIEW_MINI_PLAYER_OBSTACLES, NativeSelect, NavigationMenu, NavigationMenuContent, NavigationMenuGroup, NavigationMenuGroupLabel, NavigationMenuItem, NavigationMenuMenu, NavigationMenuSeparator, NavigationMenuTrigger, NavigationMenuViewport, NumberField, OrbitItem, OrbitLayout, PASTE_THRESHOLD_CHARS, PASTE_THRESHOLD_LINES, PASTE_TOKEN_REGEX, PREVIEW_MINI_PLAYER_CORNER_RADIUS, PREVIEW_MINI_PLAYER_EDGE_GAP, Page, PageHeader, PageHeaderActions, PageHeaderContent, PageHeaderDescription, PageHeaderTitle, PageSection, Pagination, PaginationEllipsis, PaginationItem, PaginationNext, PaginationPrevious, PalettePreview, Panel, PanelActions, PanelBody, PanelCard, PanelDescription, PanelFooter, PanelHeader, PanelPlaceholder, PanelTitle, PanelToolbar, Popover, PopoverAnchor, PopoverCloseButton, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger, Presence, Progress, PropertyList, PropertyRow, PropertyTerm, PropertyValue, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, SecretInputGroup, Select, SelectChevronsUpDown, SelectContent, SelectItem, SelectLabel, SelectSection, SelectTrigger, SelectValue, Separator, SettingsField, SettingsPage, SettingsRow, SettingsSection, Sheet, SheetBody, SheetCloseButton, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SideRail, SideRailButton, SideRailContent, SideRailFooter, SideRailHeader, SideRailItem, SideRailSection, SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavResizeHandle, SidebarNavSection, SidebarNavTitle, Skeleton, SkipLink, Slider, Spinner, SplitLayout, Stat, StatGroup, StatusBar, StatusBarItem, StatusBarSpacer, StatusChip, StatusList, Switch, SwitchDescription, SwitchLabel, TALL_CODE_BLOCK_PX, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableNumericCell, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TextLink, Textarea, ThemeMiniature, ThemeMiniatureSplit, ThemeModeToggle, ThemePicker, ThemePreview, ThemeProvider, ThemeSwatch, ThemeToggle, ThreadPanel, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBar, TopBarBreadcrumb, TopBarPill, TopBarSearch, TopBarSection, TopBarTitle, TranscriptComposition, UpdateDialog, ValueCombobox, VirtualWindow, WorkspaceMark, accentPresets, alertVariants, allTokens, badgeVariants, boardCardTitleVariants, builtinThemes, buttonVariants, clampFloatingPreviewPosition, clampPreviewMiniPlayerPosition, closePane, cn, colorTokens, computeLayoutFrames, contrastRatio, controlInteractive, controlSize, controlSizeIcon, controlSizes, countLeaves, countLines, createLayoutState, cva, defaultDarkThemeId, defaultLightThemeId, defaultThemeSelection, densityTokens, designTokens, diffLineVariants, diffStats, diffTargetPath, elevationTokens, entityIconVariants, expandAll, findTokenRanges, focusPane, fontOptions, formatBytes, formatReleaseDate, formatToken, initialsFrom, inlineScriptLiteral, isPasteBlock, itemVariants, keyedRows, layoutDepth, listLeaves, monogram, motionTokens, movePane, neighborLeaf, nextSeq, normalizeLayout, parseDiff, plainTextFromMarkdown, pruneBlocks, radiusTokens, recollapsePastes, remapCarriedBlocks, resizeFloatingPreview, resizePreviewMiniPlayer, resizeSplit, resolveFloatingPreviewFrame, resolvePreviewMiniPlayerFrame, resolvedDensity, sheetVariants, shouldCollapse, sidebarNavItemClass, sidebarNavItemStateClass, splitPane, statusDotVariants, stripTrailingBlankLines, surfaceInteractive, swapPanes, themeById, themeCssVariables, themeFamilies, themeScript, themesForAppearance, toast, toaster, toggleVariants, tokenRangeAt, transcriptDisclosureKey, typographyTokens, undoClosePane, undocumentedTokenAliases, useSideRail, useTheme, validateTheme, validateThemeRegistry, writeClipboardText, zIndexTokens };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../src/lib/clipboard.ts"],"names":[],"mappings":"AAEA,iFAAiF;AACjF,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqCrE"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//#region src/lib/clipboard.ts
|
|
2
|
+
var CLIPBOARD_UNAVAILABLE = "Clipboard is unavailable in this WebView";
|
|
3
|
+
/** Writes text with the async Clipboard API, falling back for older WebViews. */
|
|
4
|
+
async function writeClipboardText(value) {
|
|
5
|
+
if (typeof navigator !== "undefined" && typeof navigator.clipboard?.writeText === "function") {
|
|
6
|
+
await navigator.clipboard.writeText(value);
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
if (typeof document === "undefined" || !document.body) throw new Error(CLIPBOARD_UNAVAILABLE);
|
|
10
|
+
const previousFocus = document.activeElement;
|
|
11
|
+
const textarea = document.createElement("textarea");
|
|
12
|
+
textarea.value = value;
|
|
13
|
+
textarea.setAttribute("readonly", "");
|
|
14
|
+
textarea.setAttribute("aria-hidden", "true");
|
|
15
|
+
textarea.tabIndex = -1;
|
|
16
|
+
textarea.style.position = "fixed";
|
|
17
|
+
textarea.style.opacity = "0";
|
|
18
|
+
document.body.appendChild(textarea);
|
|
19
|
+
let copied = false;
|
|
20
|
+
try {
|
|
21
|
+
textarea.focus({ preventScroll: true });
|
|
22
|
+
textarea.select();
|
|
23
|
+
copied = typeof document.execCommand === "function" && document.execCommand("copy");
|
|
24
|
+
} finally {
|
|
25
|
+
textarea.remove();
|
|
26
|
+
if (previousFocus instanceof HTMLElement && previousFocus.isConnected) try {
|
|
27
|
+
previousFocus.focus({ preventScroll: true });
|
|
28
|
+
} catch {}
|
|
29
|
+
}
|
|
30
|
+
if (!copied) throw new Error(CLIPBOARD_UNAVAILABLE);
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { writeClipboardText };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=clipboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboard.js","names":[],"sources":["../../src/lib/clipboard.ts"],"sourcesContent":["const CLIPBOARD_UNAVAILABLE = 'Clipboard is unavailable in this WebView'\n\n/** Writes text with the async Clipboard API, falling back for older WebViews. */\nexport async function writeClipboardText(value: string): Promise<void> {\n if (typeof navigator !== 'undefined' && typeof navigator.clipboard?.writeText === 'function') {\n await navigator.clipboard.writeText(value)\n return\n }\n\n if (typeof document === 'undefined' || !document.body) {\n throw new Error(CLIPBOARD_UNAVAILABLE)\n }\n\n const previousFocus = document.activeElement\n const textarea = document.createElement('textarea')\n textarea.value = value\n textarea.setAttribute('readonly', '')\n textarea.setAttribute('aria-hidden', 'true')\n textarea.tabIndex = -1\n textarea.style.position = 'fixed'\n textarea.style.opacity = '0'\n document.body.appendChild(textarea)\n\n let copied = false\n try {\n textarea.focus({ preventScroll: true })\n textarea.select()\n copied = typeof document.execCommand === 'function' && document.execCommand('copy')\n } finally {\n textarea.remove()\n if (previousFocus instanceof HTMLElement && previousFocus.isConnected) {\n try {\n previousFocus.focus({ preventScroll: true })\n } catch {\n // A host may revoke focus during the copy; preserve the clipboard outcome.\n }\n }\n }\n\n if (!copied) throw new Error(CLIPBOARD_UNAVAILABLE)\n}\n"],"mappings":";AAAA,IAAM,wBAAwB;;AAG9B,eAAsB,mBAAmB,OAA8B;CACrE,IAAI,OAAO,cAAc,eAAe,OAAO,UAAU,WAAW,cAAc,YAAY;EAC5F,MAAM,UAAU,UAAU,UAAU,KAAK;EACzC;CACF;CAEA,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,MAC/C,MAAM,IAAI,MAAM,qBAAqB;CAGvC,MAAM,gBAAgB,SAAS;CAC/B,MAAM,WAAW,SAAS,cAAc,UAAU;CAClD,SAAS,QAAQ;CACjB,SAAS,aAAa,YAAY,EAAE;CACpC,SAAS,aAAa,eAAe,MAAM;CAC3C,SAAS,WAAW;CACpB,SAAS,MAAM,WAAW;CAC1B,SAAS,MAAM,UAAU;CACzB,SAAS,KAAK,YAAY,QAAQ;CAElC,IAAI,SAAS;CACb,IAAI;EACF,SAAS,MAAM,EAAE,eAAe,KAAK,CAAC;EACtC,SAAS,OAAO;EAChB,SAAS,OAAO,SAAS,gBAAgB,cAAc,SAAS,YAAY,MAAM;CACpF,UAAU;EACR,SAAS,OAAO;EAChB,IAAI,yBAAyB,eAAe,cAAc,aACxD,IAAI;GACF,cAAc,MAAM,EAAE,eAAe,KAAK,CAAC;EAC7C,QAAQ,CAER;CAEJ;CAEA,IAAI,CAAC,QAAQ,MAAM,IAAI,MAAM,qBAAqB;AACpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../src/lib/download.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CA2B/D"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region src/lib/download.ts
|
|
2
|
+
/** Download a Blob through a temporary, non-focusable anchor. */
|
|
3
|
+
function downloadBlob(blob, filename) {
|
|
4
|
+
const objectUrl = URL.createObjectURL(blob);
|
|
5
|
+
const previousFocus = document.activeElement;
|
|
6
|
+
let anchor;
|
|
7
|
+
try {
|
|
8
|
+
anchor = document.createElement("a");
|
|
9
|
+
anchor.href = objectUrl;
|
|
10
|
+
anchor.download = filename;
|
|
11
|
+
anchor.hidden = true;
|
|
12
|
+
anchor.tabIndex = -1;
|
|
13
|
+
anchor.setAttribute("aria-hidden", "true");
|
|
14
|
+
document.body.append(anchor);
|
|
15
|
+
anchor.click();
|
|
16
|
+
} finally {
|
|
17
|
+
try {
|
|
18
|
+
anchor?.remove();
|
|
19
|
+
} finally {
|
|
20
|
+
try {
|
|
21
|
+
if (previousFocus?.isConnected && document.activeElement !== previousFocus) previousFocus.focus({ preventScroll: true });
|
|
22
|
+
} finally {
|
|
23
|
+
setTimeout(() => URL.revokeObjectURL(objectUrl), 0);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { downloadBlob };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=download.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"download.js","names":[],"sources":["../../src/lib/download.ts"],"sourcesContent":["/** Download a Blob through a temporary, non-focusable anchor. */\nexport function downloadBlob(blob: Blob, filename: string): void {\n const objectUrl = URL.createObjectURL(blob)\n const previousFocus = document.activeElement as HTMLElement | null\n let anchor: HTMLAnchorElement | undefined\n\n try {\n anchor = document.createElement('a')\n anchor.href = objectUrl\n anchor.download = filename\n anchor.hidden = true\n anchor.tabIndex = -1\n anchor.setAttribute('aria-hidden', 'true')\n document.body.append(anchor)\n anchor.click()\n } finally {\n try {\n anchor?.remove()\n } finally {\n try {\n if (previousFocus?.isConnected && document.activeElement !== previousFocus) {\n previousFocus.focus({ preventScroll: true })\n }\n } finally {\n setTimeout(() => URL.revokeObjectURL(objectUrl), 0)\n }\n }\n }\n}\n"],"mappings":";;AACA,SAAgB,aAAa,MAAY,UAAwB;CAC/D,MAAM,YAAY,IAAI,gBAAgB,IAAI;CAC1C,MAAM,gBAAgB,SAAS;CAC/B,IAAI;CAEJ,IAAI;EACF,SAAS,SAAS,cAAc,GAAG;EACnC,OAAO,OAAO;EACd,OAAO,WAAW;EAClB,OAAO,SAAS;EAChB,OAAO,WAAW;EAClB,OAAO,aAAa,eAAe,MAAM;EACzC,SAAS,KAAK,OAAO,MAAM;EAC3B,OAAO,MAAM;CACf,UAAU;EACR,IAAI;GACF,QAAQ,OAAO;EACjB,UAAU;GACR,IAAI;IACF,IAAI,eAAe,eAAe,SAAS,kBAAkB,eAC3D,cAAc,MAAM,EAAE,eAAe,KAAK,CAAC;GAE/C,UAAU;IACR,iBAAiB,IAAI,gBAAgB,SAAS,GAAG,CAAC;GACpD;EACF;CACF;AACF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ComponentProps } from 'solid-js';
|
|
2
|
+
export type FormFieldControlKind = 'control' | 'group';
|
|
3
|
+
export type FormFieldContextValue = {
|
|
4
|
+
group: () => boolean;
|
|
5
|
+
labelId: string;
|
|
6
|
+
controlId: () => string;
|
|
7
|
+
registerControlId: (requestedId?: string) => string | undefined;
|
|
8
|
+
describedBy: () => string | undefined;
|
|
9
|
+
errorId: () => string | undefined;
|
|
10
|
+
invalid: () => boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const FormFieldContext: import("solid-js").Context<FormFieldContextValue | undefined>;
|
|
13
|
+
export declare function createFormFieldContext(props: {
|
|
14
|
+
controlId?: string;
|
|
15
|
+
defaultControlId: string;
|
|
16
|
+
labelId: string;
|
|
17
|
+
descriptionId?: string;
|
|
18
|
+
errorId?: string;
|
|
19
|
+
hint: () => string | undefined;
|
|
20
|
+
error: () => string | undefined;
|
|
21
|
+
group: () => boolean;
|
|
22
|
+
}): FormFieldContextValue;
|
|
23
|
+
export declare function useFormFieldControl(kind: FormFieldControlKind, props?: {
|
|
24
|
+
id?: string;
|
|
25
|
+
'aria-label'?: string;
|
|
26
|
+
'aria-labelledby'?: string;
|
|
27
|
+
'aria-describedby'?: string;
|
|
28
|
+
'aria-invalid'?: ComponentProps<'input'>['aria-invalid'];
|
|
29
|
+
'aria-errormessage'?: string;
|
|
30
|
+
}): {
|
|
31
|
+
id: string | undefined;
|
|
32
|
+
'aria-labelledby': string | undefined;
|
|
33
|
+
readonly 'aria-describedby': string | undefined;
|
|
34
|
+
readonly 'aria-invalid': boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
35
|
+
readonly 'aria-errormessage': string | undefined;
|
|
36
|
+
} | null;
|
|
37
|
+
//# sourceMappingURL=form-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-field.d.ts","sourceRoot":"","sources":["../../src/lib/form-field.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG9C,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,OAAO,CAAA;AAEtD,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,OAAO,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,MAAM,CAAA;IACvB,iBAAiB,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAA;IAC/D,WAAW,EAAE,MAAM,MAAM,GAAG,SAAS,CAAA;IACrC,OAAO,EAAE,MAAM,MAAM,GAAG,SAAS,CAAA;IACjC,OAAO,EAAE,MAAM,OAAO,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,gBAAgB,+DAAyC,CAAA;AAStE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,MAAM,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,MAAM,GAAG,SAAS,CAAA;IAC9B,KAAK,EAAE,MAAM,MAAM,GAAG,SAAS,CAAA;IAC/B,KAAK,EAAE,MAAM,OAAO,CAAA;CACrB,GAAG,qBAAqB,CAsBxB;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,oBAAoB,EAC1B,KAAK,GAAE;IACL,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,cAAc,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,CAAA;IACxD,mBAAmB,CAAC,EAAE,MAAM,CAAA;CACxB;;;;;;SA0BP"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { createContext, createSignal, useContext } from "solid-js";
|
|
2
|
+
//#region src/lib/form-field.ts
|
|
3
|
+
var FormFieldContext = createContext();
|
|
4
|
+
function mergeIds(...values) {
|
|
5
|
+
return [...new Set(values.flatMap((value) => value?.split(/\s+/).filter(Boolean) ?? []))].join(" ") || void 0;
|
|
6
|
+
}
|
|
7
|
+
function createFormFieldContext(props) {
|
|
8
|
+
const [controlId, setControlId] = createSignal(props.controlId ?? props.defaultControlId);
|
|
9
|
+
return {
|
|
10
|
+
group: props.group,
|
|
11
|
+
labelId: props.labelId,
|
|
12
|
+
controlId,
|
|
13
|
+
registerControlId(requestedId) {
|
|
14
|
+
if (props.group() && !requestedId) return void 0;
|
|
15
|
+
if (requestedId) {
|
|
16
|
+
setControlId(requestedId);
|
|
17
|
+
return requestedId;
|
|
18
|
+
}
|
|
19
|
+
return props.group() ? void 0 : controlId();
|
|
20
|
+
},
|
|
21
|
+
describedBy: () => [props.hint() ? props.descriptionId : void 0, props.error() ? props.errorId : void 0].filter((id) => Boolean(id)).join(" ") || void 0,
|
|
22
|
+
errorId: () => props.error() ? props.errorId : void 0,
|
|
23
|
+
invalid: () => Boolean(props.error())
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function useFormFieldControl(kind, props = {}) {
|
|
27
|
+
const field = useContext(FormFieldContext);
|
|
28
|
+
if (!field) return null;
|
|
29
|
+
const groupedDescendant = field.group() && kind !== "group";
|
|
30
|
+
return {
|
|
31
|
+
id: groupedDescendant ? props.id : field.registerControlId(props.id),
|
|
32
|
+
"aria-labelledby": props["aria-label"] || props["aria-labelledby"] ? props["aria-labelledby"] : groupedDescendant ? void 0 : field.labelId,
|
|
33
|
+
get "aria-describedby"() {
|
|
34
|
+
return mergeIds(props["aria-describedby"], field.describedBy());
|
|
35
|
+
},
|
|
36
|
+
get "aria-invalid"() {
|
|
37
|
+
return props["aria-invalid"] ?? (field.invalid() || void 0);
|
|
38
|
+
},
|
|
39
|
+
get "aria-errormessage"() {
|
|
40
|
+
return props["aria-errormessage"] ?? field.errorId();
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { FormFieldContext, createFormFieldContext, useFormFieldControl };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=form-field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-field.js","names":[],"sources":["../../src/lib/form-field.ts"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { createContext, createSignal, useContext } from 'solid-js'\n\nexport type FormFieldControlKind = 'control' | 'group'\n\nexport type FormFieldContextValue = {\n group: () => boolean\n labelId: string\n controlId: () => string\n registerControlId: (requestedId?: string) => string | undefined\n describedBy: () => string | undefined\n errorId: () => string | undefined\n invalid: () => boolean\n}\n\nexport const FormFieldContext = createContext<FormFieldContextValue>()\n\nfunction mergeIds(...values: Array<string | undefined>) {\n return (\n [...new Set(values.flatMap((value) => value?.split(/\\s+/).filter(Boolean) ?? []))].join(' ') ||\n undefined\n )\n}\n\nexport function createFormFieldContext(props: {\n controlId?: string\n defaultControlId: string\n labelId: string\n descriptionId?: string\n errorId?: string\n hint: () => string | undefined\n error: () => string | undefined\n group: () => boolean\n}): FormFieldContextValue {\n const [controlId, setControlId] = createSignal(props.controlId ?? props.defaultControlId)\n\n return {\n group: props.group,\n labelId: props.labelId,\n controlId,\n registerControlId(requestedId) {\n if (props.group() && !requestedId) return undefined\n if (requestedId) {\n setControlId(requestedId)\n return requestedId\n }\n return props.group() ? undefined : controlId()\n },\n describedBy: () =>\n [props.hint() ? props.descriptionId : undefined, props.error() ? props.errorId : undefined]\n .filter((id): id is string => Boolean(id))\n .join(' ') || undefined,\n errorId: () => (props.error() ? props.errorId : undefined),\n invalid: () => Boolean(props.error()),\n }\n}\n\nexport function useFormFieldControl(\n kind: FormFieldControlKind,\n props: {\n id?: string\n 'aria-label'?: string\n 'aria-labelledby'?: string\n 'aria-describedby'?: string\n 'aria-invalid'?: ComponentProps<'input'>['aria-invalid']\n 'aria-errormessage'?: string\n } = {}\n) {\n const field = useContext(FormFieldContext)\n if (!field) return null\n\n const groupedDescendant = field.group() && kind !== 'group'\n const id = groupedDescendant ? props.id : field.registerControlId(props.id)\n const labelledBy =\n props['aria-label'] || props['aria-labelledby']\n ? props['aria-labelledby']\n : groupedDescendant\n ? undefined\n : field.labelId\n return {\n id,\n 'aria-labelledby': labelledBy,\n get 'aria-describedby'() {\n return mergeIds(props['aria-describedby'], field.describedBy())\n },\n get 'aria-invalid'() {\n return props['aria-invalid'] ?? (field.invalid() || undefined)\n },\n get 'aria-errormessage'() {\n return props['aria-errormessage'] ?? field.errorId()\n },\n }\n}\n"],"mappings":";;AAeA,IAAa,mBAAmB,cAAqC;AAErE,SAAS,SAAS,GAAG,QAAmC;CACtD,OACE,CAAC,GAAG,IAAI,IAAI,OAAO,SAAS,UAAU,OAAO,MAAM,KAAK,CAAC,CAAC,OAAO,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,KAC3F,KAAA;AAEJ;AAEA,SAAgB,uBAAuB,OASb;CACxB,MAAM,CAAC,WAAW,gBAAgB,aAAa,MAAM,aAAa,MAAM,gBAAgB;CAExF,OAAO;EACL,OAAO,MAAM;EACb,SAAS,MAAM;EACf;EACA,kBAAkB,aAAa;GAC7B,IAAI,MAAM,MAAM,KAAK,CAAC,aAAa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