@manafishrov/ui 1.2.10 → 1.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Theme.js +3 -3
- package/dist/_virtual/calendar-month.js +3 -3
- package/dist/_virtual/check-circle.js +3 -3
- package/dist/_virtual/check.js +3 -3
- package/dist/_virtual/chevron-left.js +3 -3
- package/dist/_virtual/chevron-right.js +3 -3
- package/dist/_virtual/close.js +3 -3
- package/dist/_virtual/error.js +3 -3
- package/dist/_virtual/expand-less.js +3 -3
- package/dist/_virtual/expand-more.js +3 -3
- package/dist/_virtual/info.js +3 -3
- package/dist/_virtual/more-horiz.js +3 -3
- package/dist/_virtual/progress-activity.js +3 -3
- package/dist/_virtual/search.js +3 -3
- package/dist/_virtual/side-navigation.js +3 -3
- package/dist/_virtual/visibility-off.js +3 -3
- package/dist/_virtual/visibility.js +3 -3
- package/dist/_virtual/warning.js +3 -3
- package/dist/components/Accordion.js +3 -3
- package/dist/components/AlertDialog.js +5 -5
- package/dist/components/AspectRatio.js +3 -3
- package/dist/components/Avatar.js +5 -5
- package/dist/components/Badge.js +3 -3
- package/dist/components/Breadcrumb.js +8 -8
- package/dist/components/Button.js +5 -5
- package/dist/components/Card.js +9 -9
- package/dist/components/Carousel.js +8 -8
- package/dist/components/Combobox.js +4 -4
- package/dist/components/Combobox.js.map +1 -1
- package/dist/components/DatePicker.js +5 -5
- package/dist/components/DatePicker.js.map +1 -1
- package/dist/components/Dialog.js +4 -4
- package/dist/components/Empty.js +8 -8
- package/dist/components/Field.js +8 -8
- package/dist/components/Field.js.map +1 -1
- package/dist/components/InputGroup.js +7 -7
- package/dist/components/Item.js +11 -11
- package/dist/components/Kbd.js +4 -4
- package/dist/components/Menu.js +3 -3
- package/dist/components/MenuCombobox.js +1 -1
- package/dist/components/MenuComboboxList.js +1 -1
- package/dist/components/NumberInput.js +5 -5
- package/dist/components/NumberInput.js.map +1 -1
- package/dist/components/Pagination.js +5 -5
- package/dist/components/PasswordInput.js +1 -1
- package/dist/components/PasswordInput.js.map +1 -1
- package/dist/components/PinInput.js +5 -5
- package/dist/components/PinInput.js.map +1 -1
- package/dist/components/Popover.js +3 -3
- package/dist/components/Progress.js +2 -2
- package/dist/components/Progress.js.map +1 -1
- package/dist/components/RadioGroup.js +2 -2
- package/dist/components/RadioGroup.js.map +1 -1
- package/dist/components/Select.js +2 -2
- package/dist/components/Select.js.map +1 -1
- package/dist/components/Separator.js +3 -3
- package/dist/components/Sheet.js +1 -1
- package/dist/components/Skeleton.js +3 -3
- package/dist/components/Slider.js +29 -29
- package/dist/components/Slider.js.map +1 -1
- package/dist/components/Spinner.js +4 -4
- package/dist/components/Table.js +10 -10
- package/dist/components/TagsInput.js +1 -1
- package/dist/components/TagsInput.js.map +1 -1
- package/dist/components/TextInput.js +4 -4
- package/dist/components/TextInput.js.map +1 -1
- package/dist/components/Typography.js +1 -1
- package/dist/components/form/ComboboxField.js +1 -1
- package/dist/components/form/SliderField.js +16 -18
- package/dist/components/form/SliderField.js.map +1 -1
- package/dist/components/sidebar/SidebarDesktop.js +10 -10
- package/dist/components/sidebar/SidebarDesktop.js.map +1 -1
- package/dist/components/sidebar/SidebarMenu.js +11 -11
- package/dist/components/sidebar/SidebarMobile.js +1 -1
- package/dist/components/sidebar/SidebarProvider.js +4 -4
- package/dist/components/sidebar/SidebarSubComponents.js +11 -11
- package/dist/components/toaster/Toaster.js +4 -4
- package/dist/index.js +16 -16
- package/dist/node_modules/.bun/@ark-ui_solid@5.34.1_2e1854f049906f04/node_modules/@ark-ui/solid/dist/chunk/ZMQW6EBL.js +4 -4
- package/dist/node_modules/.bun/{@floating-ui_core@1.7.4 → @floating-ui_core@1.7.5}/node_modules/@floating-ui/core/dist/floating-ui.core.js +171 -171
- package/dist/node_modules/.bun/@floating-ui_core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
- package/dist/node_modules/.bun/@floating-ui_dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +404 -0
- package/dist/node_modules/.bun/@floating-ui_dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/dist/node_modules/.bun/@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +137 -0
- package/dist/node_modules/.bun/@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
- package/dist/node_modules/.bun/@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +129 -0
- package/dist/node_modules/.bun/@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
- package/dist/node_modules/.bun/@internationalized_date@3.11.0/node_modules/@internationalized/date/dist/CalendarDate.js +1 -1
- package/dist/node_modules/.bun/{@swc_helpers@0.5.18 → @swc_helpers@0.5.19}/node_modules/@swc/helpers/esm/_check_private_redeclaration.js.map +1 -1
- package/dist/node_modules/.bun/{@swc_helpers@0.5.18 → @swc_helpers@0.5.19}/node_modules/@swc/helpers/esm/_class_private_field_init.js.map +1 -1
- package/dist/node_modules/.bun/@zag-js_angle-slider@1.35.3/node_modules/@zag-js/angle-slider/dist/angle-slider.connect.js +1 -1
- package/dist/node_modules/.bun/@zag-js_checkbox@1.35.3/node_modules/@zag-js/checkbox/dist/checkbox.connect.js +3 -3
- package/dist/node_modules/.bun/@zag-js_combobox@1.35.3/node_modules/@zag-js/combobox/dist/combobox.connect.js +3 -3
- package/dist/node_modules/.bun/@zag-js_combobox@1.35.3/node_modules/@zag-js/combobox/dist/combobox.machine.js +7 -7
- package/dist/node_modules/.bun/@zag-js_date-picker@1.35.3_ee33ebb1f804619f/node_modules/@zag-js/date-picker/dist/date-picker.connect.js +10 -10
- package/dist/node_modules/.bun/@zag-js_date-picker@1.35.3_ee33ebb1f804619f/node_modules/@zag-js/date-picker/dist/date-picker.machine.js +20 -20
- package/dist/node_modules/.bun/@zag-js_dismissable@1.35.3/node_modules/@zag-js/dismissable/dist/dismissable-layer.js +1 -1
- package/dist/node_modules/.bun/@zag-js_dom-query@1.35.3/node_modules/@zag-js/dom-query/dist/press.js +3 -3
- package/dist/node_modules/.bun/@zag-js_hover-card@1.35.3/node_modules/@zag-js/hover-card/dist/hover-card.machine.js +1 -1
- package/dist/node_modules/.bun/@zag-js_menu@1.35.3/node_modules/@zag-js/menu/dist/menu.dom.js +4 -4
- package/dist/node_modules/.bun/@zag-js_menu@1.35.3/node_modules/@zag-js/menu/dist/menu.machine.js +5 -5
- package/dist/node_modules/.bun/@zag-js_navigation-menu@1.35.3/node_modules/@zag-js/navigation-menu/dist/navigation-menu.connect.js +1 -1
- package/dist/node_modules/.bun/@zag-js_navigation-menu@1.35.3/node_modules/@zag-js/navigation-menu/dist/navigation-menu.machine.js +12 -12
- package/dist/node_modules/.bun/@zag-js_number-input@1.35.3/node_modules/@zag-js/number-input/dist/number-input.connect.js +1 -1
- package/dist/node_modules/.bun/@zag-js_number-input@1.35.3/node_modules/@zag-js/number-input/dist/number-input.machine.js +23 -23
- package/dist/node_modules/.bun/@zag-js_pin-input@1.35.3/node_modules/@zag-js/pin-input/dist/pin-input.machine.js +4 -4
- package/dist/node_modules/.bun/@zag-js_popper@1.35.3/node_modules/@zag-js/popper/dist/get-placement.js +5 -5
- package/dist/node_modules/.bun/@zag-js_radio-group@1.35.3/node_modules/@zag-js/radio-group/dist/radio-group.connect.js +3 -3
- package/dist/node_modules/.bun/@zag-js_remove-scroll@1.35.3/node_modules/@zag-js/remove-scroll/dist/index.js +4 -4
- package/dist/node_modules/.bun/@zag-js_select@1.35.3/node_modules/@zag-js/select/dist/select.connect.js +1 -1
- package/dist/node_modules/.bun/@zag-js_select@1.35.3/node_modules/@zag-js/select/dist/select.machine.js +2 -2
- package/dist/node_modules/.bun/@zag-js_slider@1.35.3/node_modules/@zag-js/slider/dist/slider.dom.js +4 -4
- package/dist/node_modules/.bun/@zag-js_slider@1.35.3/node_modules/@zag-js/slider/dist/slider.machine.js +18 -18
- package/dist/node_modules/.bun/@zag-js_solid@1.35.3_2e1854f049906f04/node_modules/@zag-js/solid/dist/machine.js +1 -1
- package/dist/node_modules/.bun/@zag-js_switch@1.35.3/node_modules/@zag-js/switch/dist/switch.connect.js +1 -1
- package/dist/node_modules/.bun/@zag-js_tabs@1.35.3/node_modules/@zag-js/tabs/dist/tabs.dom.js +4 -4
- package/dist/node_modules/.bun/@zag-js_tabs@1.35.3/node_modules/@zag-js/tabs/dist/tabs.machine.js +11 -11
- package/dist/node_modules/.bun/@zag-js_tags-input@1.35.3/node_modules/@zag-js/tags-input/dist/tags-input.connect.js +4 -4
- package/dist/node_modules/.bun/@zag-js_tags-input@1.35.3/node_modules/@zag-js/tags-input/dist/tags-input.dom.js +1 -1
- package/dist/node_modules/.bun/@zag-js_tags-input@1.35.3/node_modules/@zag-js/tags-input/dist/tags-input.machine.js +4 -4
- package/dist/node_modules/.bun/@zag-js_toast@1.35.3/node_modules/@zag-js/toast/dist/toast-group.machine.js +4 -4
- package/dist/node_modules/.bun/@zag-js_tree-view@1.35.3/node_modules/@zag-js/tree-view/dist/tree-view.machine.js +7 -7
- package/package.json +1 -1
- package/src/components/Combobox.tsx +1 -1
- package/src/components/DatePicker.tsx +1 -1
- package/src/components/Field.tsx +6 -6
- package/src/components/NumberInput.tsx +1 -1
- package/src/components/PasswordInput.tsx +1 -1
- package/src/components/PinInput.tsx +1 -1
- package/src/components/Progress.tsx +2 -2
- package/src/components/RadioGroup.tsx +4 -4
- package/src/components/Select.tsx +1 -1
- package/src/components/Slider.tsx +8 -8
- package/src/components/TagsInput.tsx +1 -1
- package/src/components/TextInput.tsx +1 -1
- package/src/components/form/SliderField.tsx +3 -1
- package/src/components/sidebar/SidebarDesktop.tsx +0 -1
- package/dist/node_modules/.bun/@floating-ui_core@1.7.4/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +0 -1
- package/dist/node_modules/.bun/@floating-ui_dom@1.7.5/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -403
- package/dist/node_modules/.bun/@floating-ui_dom@1.7.5/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +0 -1
- package/dist/node_modules/.bun/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -137
- package/dist/node_modules/.bun/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +0 -1
- package/dist/node_modules/.bun/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -131
- package/dist/node_modules/.bun/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +0 -1
- /package/dist/node_modules/.bun/{@swc_helpers@0.5.18 → @swc_helpers@0.5.19}/node_modules/@swc/helpers/esm/_check_private_redeclaration.js +0 -0
- /package/dist/node_modules/.bun/{@swc_helpers@0.5.18 → @swc_helpers@0.5.19}/node_modules/@swc/helpers/esm/_class_private_field_init.js +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createComponent as r, mergeProps as a,
|
|
1
|
+
import { createComponent as r, mergeProps as a, spread as c, template as d } from "solid-js/web";
|
|
2
2
|
import { combobox_exports as s } from "../node_modules/.bun/@ark-ui_solid@5.34.1_2e1854f049906f04/node_modules/@ark-ui/solid/dist/chunk/TGBMUR4Z.js";
|
|
3
3
|
import { splitProps as n } from "solid-js";
|
|
4
4
|
import { cn as l } from "../node_modules/.bun/tailwind-variants@3.2.2_7ac958b541464b98/node_modules/tailwind-variants/dist/index.js";
|
|
5
5
|
import u from "../_virtual/check.js";
|
|
6
6
|
import b from "../_virtual/close.js";
|
|
7
7
|
import m from "../_virtual/expand-more.js";
|
|
8
|
-
var g = /* @__PURE__ */
|
|
8
|
+
var g = /* @__PURE__ */ d("<div data-slot=combobox-empty>");
|
|
9
9
|
const w = s.Context, I = (e) => {
|
|
10
10
|
const [t, o] = n(e, ["class"]);
|
|
11
11
|
return r(s.Root, a({
|
|
@@ -25,7 +25,7 @@ const w = s.Context, I = (e) => {
|
|
|
25
25
|
const [t, o] = n(e, ["class"]);
|
|
26
26
|
return r(s.Label, a({
|
|
27
27
|
get class() {
|
|
28
|
-
return l("mb-1 gap-2 text-sm font-medium flex items-center leading-none select-none group-data-disabled:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", t.class);
|
|
28
|
+
return l("mb-1.5 gap-2 text-sm font-medium flex items-center leading-none select-none group-data-disabled:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", t.class);
|
|
29
29
|
}
|
|
30
30
|
}, o));
|
|
31
31
|
}, k = (e) => {
|
|
@@ -134,7 +134,7 @@ const w = s.Context, I = (e) => {
|
|
|
134
134
|
const [t, o] = n(e, ["class"]);
|
|
135
135
|
return (() => {
|
|
136
136
|
var i = g();
|
|
137
|
-
return
|
|
137
|
+
return c(i, a({
|
|
138
138
|
get class() {
|
|
139
139
|
return l("py-2 text-sm hidden w-full justify-center text-center text-muted-foreground group-data-empty/combobox-content:flex", t.class);
|
|
140
140
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.js","sources":["../../src/components/Combobox.tsx"],"sourcesContent":["import { Combobox as ComboboxPrimitive, type CollectionItem } from '@ark-ui/solid/combobox';\nimport { type Component, type ComponentProps, type JSXElement, splitProps } from 'solid-js';\nimport { cn } from 'tailwind-variants';\nimport CheckIcon from '~icons/material-symbols/check';\nimport CloseIcon from '~icons/material-symbols/close';\nimport ExpandMoreIcon from '~icons/material-symbols/expand-more';\n\nexport const ComboboxContext = ComboboxPrimitive.Context;\n\nexport const Combobox = <TItem extends CollectionItem>(\n props: ComboboxPrimitive.RootProps<TItem> & { class?: string },\n): JSXElement => {\n const [local, others] = splitProps(props, ['class']);\n return <ComboboxPrimitive.Root class={cn('flex w-full flex-col', local.class)} {...others} />;\n};\n\nexport const ComboboxList: Component<ComboboxPrimitive.ListProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <ComboboxPrimitive.List\n data-slot='combobox-list'\n class={cn('p-1 max-h-[min(var(--available-height),300px)] overflow-y-auto', local.class)}\n {...others}\n />\n );\n};\n\nexport const ComboboxLabel: Component<ComboboxPrimitive.LabelProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <ComboboxPrimitive.Label\n class={cn(\n 'mb-1 gap-2 text-sm font-medium flex items-center leading-none select-none group-data-disabled:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const ComboboxControl: Component<ComboboxPrimitive.ControlProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n\n return (\n <ComboboxPrimitive.Control\n data-slot='combobox-control'\n class={cn(\n 'group min-h-10 py-1.5 pr-2 pl-2.5 text-sm [&_svg:not([class*=\"size-\"])]:size-4 gap-1 shadow-sm flex w-full flex-wrap items-center rounded-lg border border-input bg-transparent transition-colors outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n 'has-focus-visible:border-ring has-focus-visible:ring-[3px] has-focus-visible:ring-ring/50',\n 'data-[invalid=true]:border-destructive data-[invalid=true]:ring-[3px] data-[invalid=true]:ring-destructive/20 dark:data-[invalid=true]:ring-destructive/40',\n 'data-[disabled=true]:bg-input/50 data-[disabled=true]:opacity-50 dark:data-[disabled=true]:bg-input/80',\n 'data-[readonly=true]:cursor-default data-[readonly=true]:has-focus-visible:border-input data-[readonly=true]:has-focus-visible:ring-0',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const ComboboxInput: Component<ComboboxPrimitive.InputProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n\n return (\n <ComboboxPrimitive.Input\n data-slot='combobox-input'\n class={cn(\n 'min-w-16 flex-1 bg-transparent outline-none placeholder:text-muted-foreground focus-visible:ring-0',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const ComboboxTrigger: Component<ComboboxPrimitive.TriggerProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <ComboboxPrimitive.Trigger\n data-slot='combobox-trigger'\n class={cn('text-muted-foreground transition-colors hover:text-foreground', local.class)}\n {...others}\n >\n {local.children ?? <ExpandMoreIcon class='size-4' />}\n </ComboboxPrimitive.Trigger>\n );\n};\nexport const ComboboxClearTrigger: Component<ComboboxPrimitive.ClearTriggerProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children', 'tabIndex']);\n return (\n <ComboboxPrimitive.ClearTrigger\n data-slot='combobox-clear'\n class={cn(\n 'p-0.5 rounded-[4px] text-muted-foreground transition-colors hover:text-foreground focus-visible:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none',\n local.class,\n )}\n {...others}\n tabIndex={local.tabIndex ?? 0}\n >\n {local.children ?? <CloseIcon class='size-3.5' />}\n </ComboboxPrimitive.ClearTrigger>\n );\n};\n\nexport const ComboboxPositioner: Component<ComboboxPrimitive.PositionerProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <ComboboxPrimitive.Positioner class={cn('isolate z-50', local.class)} {...others} />;\n};\n\nexport const ComboboxContent: Component<ComboboxPrimitive.ContentProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <ComboboxPrimitive.Content\n data-slot='combobox-content'\n class={cn(\n 'min-w-36 shadow-md relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const ComboboxItem: Component<ComboboxPrimitive.ItemProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <ComboboxPrimitive.Item\n data-slot='combobox-item'\n class={cn(\n \"gap-1.5 py-1 pr-8 pl-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:gap-2 relative flex w-full cursor-default items-center rounded-md outline-hidden select-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center\",\n local.class,\n )}\n {...others}\n >\n <ComboboxPrimitive.ItemText class='gap-2 flex flex-1 shrink-0 whitespace-nowrap'>\n {local.children}\n </ComboboxPrimitive.ItemText>\n <ComboboxPrimitive.ItemIndicator class='right-2 size-4 pointer-events-none absolute flex items-center justify-center'>\n <CheckIcon class='pointer-events-none' />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n );\n};\n\nexport const ComboboxItemGroup: Component<ComboboxPrimitive.ItemGroupProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <ComboboxPrimitive.ItemGroup\n data-slot='combobox-group'\n class={cn('scroll-my-1', local.class)}\n {...others}\n />\n );\n};\n\nexport const ComboboxItemGroupLabel: Component<ComboboxPrimitive.ItemGroupLabelProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <ComboboxPrimitive.ItemGroupLabel\n data-slot='combobox-label'\n class={cn('px-1.5 py-1 text-xs text-muted-foreground', local.class)}\n {...others}\n />\n );\n};\n\nexport const ComboboxEmpty: Component<ComponentProps<'div'>> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <div\n data-slot='combobox-empty'\n class={cn(\n 'py-2 text-sm hidden w-full justify-center text-center text-muted-foreground group-data-empty/combobox-content:flex',\n local.class,\n )}\n {...others}\n />\n );\n};\n"],"names":["ComboboxContext","ComboboxPrimitive","Context","Combobox","props","local","others","splitProps","_$createComponent","Root","_$mergeProps","cn","class","ComboboxList","List","ComboboxLabel","Label","ComboboxControl","Control","ComboboxInput","Input","ComboboxTrigger","Trigger","children","ExpandMoreIcon","ComboboxClearTrigger","ClearTrigger","tabIndex","CloseIcon","ComboboxPositioner","Positioner","ComboboxContent","Content","ComboboxItem","Item","ItemText","ItemIndicator","CheckIcon","ComboboxItemGroup","ItemGroup","ComboboxItemGroupLabel","ItemGroupLabel","ComboboxEmpty","_el$","_tmpl$","_$spread"],"mappings":";;;;;;;;AAOO,MAAMA,IAAkBC,EAAkBC,SAEpCC,IAAW,CACtBC,MACe;AACf,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,SAAAI,EAAQP,EAAkBQ,MAAIC,EAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aAAQC,EAAG,wBAAwBN,EAAMO,KAAK;AAAA,IAAC;AAAA,EAAA,GAAMN,CAAM,CAAA;AAC3F,GAEaO,IAAwDT,CAAAA,MAAU;AAC7E,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,SAAAI,EACGP,EAAkBa,MAAIJ,EAAA;AAAA,IAAA,aAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aAEdC,EAAG,kEAAkEN,EAAMO,KAAK;AAAA,IAAC;AAAA,EAAA,GACpFN,CAAM,CAAA;AAGhB,GAEaS,IAA0DX,CAAAA,MAAU;AAC/E,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,SAAAI,EACGP,EAAkBe,OAAKN,EAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aACfC,EACL,qNACAN,EAAMO,KACR;AAAA,IAAC;AAAA,EAAA,GACGN,CAAM,CAAA;AAGhB,GAEaW,IAA8Db,CAAAA,MAAU;AACn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OAAA;AAAA,QAAA,IAAAb,WAAA;AAAA,iBAAAf,EAC7B6B,GAAS;AAAA,YAAA,OAAA;AAAA,UAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA,CAAA;AAIlB,GAEaC,IAAkElC,CAAAA,MAAU;AACvF,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,SAAAI,EACGP,EAAkBsC,WAAS7B,EAAA;AAAA,IAAA,aAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aAEnBC,EAAG,eAAeN,EAAMO,KAAK;AAAA,IAAC;AAAA,EAAA,GACjCN,CAAM,CAAA;AAGhB,GAEakC,IAA4EpC,CAAAA,MAAU;AACjG,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,SAAAI,EACGP,EAAkBwC,gBAAc/B,EAAA;AAAA,IAAA,aAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aAExBC,EAAG,6CAA6CN,EAAMO,KAAK;AAAA,IAAC;AAAA,EAAA,GAC/DN,CAAM,CAAA;AAGhB,GAEaoC,IAAmDtC,CAAAA,MAAU;AACxE,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,UAAA,MAAA;AAAA,QAAAuC,IAAAC,EAAAA;AAAAC,WAAAA,EAAAF,GAAAjC,EAAA;AAAA,MAAA,IAAA,QAAA;AAAA,eAGWC,EACL,sHACAN,EAAMO,KACR;AAAA,MAAC;AAAA,IAAA,GACGN,CAAM,GAAA,IAAA,EAAA,GAAAqC;AAAAA,EAAA,GAAA;AAGhB;"}
|
|
1
|
+
{"version":3,"file":"Combobox.js","sources":["../../src/components/Combobox.tsx"],"sourcesContent":["import { Combobox as ComboboxPrimitive, type CollectionItem } from '@ark-ui/solid/combobox';\nimport { type Component, type ComponentProps, type JSXElement, splitProps } from 'solid-js';\nimport { cn } from 'tailwind-variants';\nimport CheckIcon from '~icons/material-symbols/check';\nimport CloseIcon from '~icons/material-symbols/close';\nimport ExpandMoreIcon from '~icons/material-symbols/expand-more';\n\nexport const ComboboxContext = ComboboxPrimitive.Context;\n\nexport const Combobox = <TItem extends CollectionItem>(\n props: ComboboxPrimitive.RootProps<TItem> & { class?: string },\n): JSXElement => {\n const [local, others] = splitProps(props, ['class']);\n return <ComboboxPrimitive.Root class={cn('flex w-full flex-col', local.class)} {...others} />;\n};\n\nexport const ComboboxList: Component<ComboboxPrimitive.ListProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <ComboboxPrimitive.List\n data-slot='combobox-list'\n class={cn('p-1 max-h-[min(var(--available-height),300px)] overflow-y-auto', local.class)}\n {...others}\n />\n );\n};\n\nexport const ComboboxLabel: Component<ComboboxPrimitive.LabelProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <ComboboxPrimitive.Label\n class={cn(\n 'mb-1.5 gap-2 text-sm font-medium flex items-center leading-none select-none group-data-disabled:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const ComboboxControl: Component<ComboboxPrimitive.ControlProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n\n return (\n <ComboboxPrimitive.Control\n data-slot='combobox-control'\n class={cn(\n 'group min-h-10 py-1.5 pr-2 pl-2.5 text-sm [&_svg:not([class*=\"size-\"])]:size-4 gap-1 shadow-sm flex w-full flex-wrap items-center rounded-lg border border-input bg-transparent transition-colors outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n 'has-focus-visible:border-ring has-focus-visible:ring-[3px] has-focus-visible:ring-ring/50',\n 'data-[invalid=true]:border-destructive data-[invalid=true]:ring-[3px] data-[invalid=true]:ring-destructive/20 dark:data-[invalid=true]:ring-destructive/40',\n 'data-[disabled=true]:bg-input/50 data-[disabled=true]:opacity-50 dark:data-[disabled=true]:bg-input/80',\n 'data-[readonly=true]:cursor-default data-[readonly=true]:has-focus-visible:border-input data-[readonly=true]:has-focus-visible:ring-0',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const ComboboxInput: Component<ComboboxPrimitive.InputProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n\n return (\n <ComboboxPrimitive.Input\n data-slot='combobox-input'\n class={cn(\n 'min-w-16 flex-1 bg-transparent outline-none placeholder:text-muted-foreground focus-visible:ring-0',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const ComboboxTrigger: Component<ComboboxPrimitive.TriggerProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <ComboboxPrimitive.Trigger\n data-slot='combobox-trigger'\n class={cn('text-muted-foreground transition-colors hover:text-foreground', local.class)}\n {...others}\n >\n {local.children ?? <ExpandMoreIcon class='size-4' />}\n </ComboboxPrimitive.Trigger>\n );\n};\nexport const ComboboxClearTrigger: Component<ComboboxPrimitive.ClearTriggerProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children', 'tabIndex']);\n return (\n <ComboboxPrimitive.ClearTrigger\n data-slot='combobox-clear'\n class={cn(\n 'p-0.5 rounded-[4px] text-muted-foreground transition-colors hover:text-foreground focus-visible:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none',\n local.class,\n )}\n {...others}\n tabIndex={local.tabIndex ?? 0}\n >\n {local.children ?? <CloseIcon class='size-3.5' />}\n </ComboboxPrimitive.ClearTrigger>\n );\n};\n\nexport const ComboboxPositioner: Component<ComboboxPrimitive.PositionerProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <ComboboxPrimitive.Positioner class={cn('isolate z-50', local.class)} {...others} />;\n};\n\nexport const ComboboxContent: Component<ComboboxPrimitive.ContentProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <ComboboxPrimitive.Content\n data-slot='combobox-content'\n class={cn(\n 'min-w-36 shadow-md relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const ComboboxItem: Component<ComboboxPrimitive.ItemProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <ComboboxPrimitive.Item\n data-slot='combobox-item'\n class={cn(\n \"gap-1.5 py-1 pr-8 pl-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:gap-2 relative flex w-full cursor-default items-center rounded-md outline-hidden select-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center\",\n local.class,\n )}\n {...others}\n >\n <ComboboxPrimitive.ItemText class='gap-2 flex flex-1 shrink-0 whitespace-nowrap'>\n {local.children}\n </ComboboxPrimitive.ItemText>\n <ComboboxPrimitive.ItemIndicator class='right-2 size-4 pointer-events-none absolute flex items-center justify-center'>\n <CheckIcon class='pointer-events-none' />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n );\n};\n\nexport const ComboboxItemGroup: Component<ComboboxPrimitive.ItemGroupProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <ComboboxPrimitive.ItemGroup\n data-slot='combobox-group'\n class={cn('scroll-my-1', local.class)}\n {...others}\n />\n );\n};\n\nexport const ComboboxItemGroupLabel: Component<ComboboxPrimitive.ItemGroupLabelProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <ComboboxPrimitive.ItemGroupLabel\n data-slot='combobox-label'\n class={cn('px-1.5 py-1 text-xs text-muted-foreground', local.class)}\n {...others}\n />\n );\n};\n\nexport const ComboboxEmpty: Component<ComponentProps<'div'>> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <div\n data-slot='combobox-empty'\n class={cn(\n 'py-2 text-sm hidden w-full justify-center text-center text-muted-foreground group-data-empty/combobox-content:flex',\n local.class,\n )}\n {...others}\n />\n );\n};\n"],"names":["ComboboxContext","ComboboxPrimitive","Context","Combobox","props","local","others","splitProps","_$createComponent","Root","_$mergeProps","cn","class","ComboboxList","List","ComboboxLabel","Label","ComboboxControl","Control","ComboboxInput","Input","ComboboxTrigger","Trigger","children","ExpandMoreIcon","ComboboxClearTrigger","ClearTrigger","tabIndex","CloseIcon","ComboboxPositioner","Positioner","ComboboxContent","Content","ComboboxItem","Item","ItemText","ItemIndicator","CheckIcon","ComboboxItemGroup","ItemGroup","ComboboxItemGroupLabel","ItemGroupLabel","ComboboxEmpty","_el$","_tmpl$","_$spread"],"mappings":";;;;;;;;AAOO,MAAMA,IAAkBC,EAAkBC,SAEpCC,IAAW,CACtBC,MACe;AACf,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,SAAAI,EAAQP,EAAkBQ,MAAIC,EAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aAAQC,EAAG,wBAAwBN,EAAMO,KAAK;AAAA,IAAC;AAAA,EAAA,GAAMN,CAAM,CAAA;AAC3F,GAEaO,IAAwDT,CAAAA,MAAU;AAC7E,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,SAAAI,EACGP,EAAkBa,MAAIJ,EAAA;AAAA,IAAA,aAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aAEdC,EAAG,kEAAkEN,EAAMO,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A,EAAAF,GAAAjC,EAAA;AAAA,MAAA,IAAA,QAAA;AAAA,eAGWC,EACL,sHACAN,EAAMO,KACR;AAAA,MAAC;AAAA,IAAA,GACGN,CAAM,GAAA,IAAA,EAAA,GAAAqC;AAAAA,EAAA,GAAA;AAGhB;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createComponent as e, mergeProps as s,
|
|
1
|
+
import { createComponent as e, mergeProps as s, spread as v, insert as P, template as k } from "solid-js/web";
|
|
2
2
|
import { date_picker_exports as n } from "../node_modules/.bun/@ark-ui_solid@5.34.1_2e1854f049906f04/node_modules/@ark-ui/solid/dist/chunk/4V5X4XYS.js";
|
|
3
3
|
import { splitProps as o, For as c } from "solid-js";
|
|
4
4
|
import { cn as l } from "../node_modules/.bun/tailwind-variants@3.2.2_7ac958b541464b98/node_modules/tailwind-variants/dist/index.js";
|
|
@@ -6,7 +6,7 @@ import y from "../_virtual/calendar-month.js";
|
|
|
6
6
|
import D from "../_virtual/chevron-left.js";
|
|
7
7
|
import T from "../_virtual/chevron-right.js";
|
|
8
8
|
import { buttonVariants as i } from "./Button.js";
|
|
9
|
-
var C = /* @__PURE__ */
|
|
9
|
+
var C = /* @__PURE__ */ k("<button>");
|
|
10
10
|
const z = (r) => {
|
|
11
11
|
const [t, a] = o(r, ["class"]);
|
|
12
12
|
return e(n.Root, s({
|
|
@@ -60,7 +60,7 @@ const z = (r) => {
|
|
|
60
60
|
const [t, a] = o(r, ["class"]);
|
|
61
61
|
return e(n.Label, s({
|
|
62
62
|
get class() {
|
|
63
|
-
return l("mb-1 gap-2 text-sm font-medium flex items-center leading-none select-none group-data-disabled:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", t.class);
|
|
63
|
+
return l("mb-1.5 gap-2 text-sm font-medium flex items-center leading-none select-none group-data-disabled:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", t.class);
|
|
64
64
|
}
|
|
65
65
|
}, a));
|
|
66
66
|
}, Q = (r) => {
|
|
@@ -157,13 +157,13 @@ const z = (r) => {
|
|
|
157
157
|
return [e(L, {}), e(R, {
|
|
158
158
|
asChild: (w) => (() => {
|
|
159
159
|
var g = C();
|
|
160
|
-
return
|
|
160
|
+
return v(g, s({
|
|
161
161
|
get class() {
|
|
162
162
|
return l(i({
|
|
163
163
|
variant: "ghost"
|
|
164
164
|
}), "h-7 px-2 py-1 text-sm font-medium");
|
|
165
165
|
}
|
|
166
|
-
}, w), !1, !0),
|
|
166
|
+
}, w), !1, !0), P(g, e(V, {})), g;
|
|
167
167
|
})()
|
|
168
168
|
}), e(M, {})];
|
|
169
169
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.js","sources":["../../src/components/DatePicker.tsx"],"sourcesContent":["import { DatePicker as DatePickerPrimitive } from '@ark-ui/solid/date-picker';\nimport { type Component, For, splitProps } from 'solid-js';\nimport { cn } from 'tailwind-variants';\nimport CalendarMonthIcon from '~icons/material-symbols/calendar-month';\nimport ChevronLeftIcon from '~icons/material-symbols/chevron-left';\nimport ChevronRightIcon from '~icons/material-symbols/chevron-right';\n\nimport { buttonVariants } from '@/components/Button';\nexport const DatePicker: Component<DatePickerPrimitive.RootProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <DatePickerPrimitive.Root class={cn('flex w-full flex-col', local.class)} {...others} />;\n};\nexport const DatePickerContext = DatePickerPrimitive.Context,\n DatePickerRangeText = DatePickerPrimitive.RangeText,\n DatePickerView = DatePickerPrimitive.View,\n DatePickerViewTrigger = DatePickerPrimitive.ViewTrigger;\nexport const DatePickerTable: Component<DatePickerPrimitive.TableProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <DatePickerPrimitive.Table\n class={cn('space-y-1 w-full border-collapse', local.class)}\n {...others}\n />\n );\n};\nexport const DatePickerTableBody: Component<DatePickerPrimitive.TableBodyProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <DatePickerPrimitive.TableBody class={cn('', local.class)} {...others} />;\n};\nexport const DatePickerTableCell: Component<DatePickerPrimitive.TableCellProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <DatePickerPrimitive.TableCell\n class={cn(\n 'text-sm p-0 relative text-center focus-within:relative focus-within:z-20 [&:has([data-selected])]:bg-accent first:[&:has([data-selected])]:rounded-l-md last:[&:has([data-selected])]:rounded-r-md',\n local.class,\n )}\n {...others}\n />\n );\n};\nexport const DatePickerTableHead: Component<DatePickerPrimitive.TableHeadProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <DatePickerPrimitive.TableHead class={cn('', local.class)} {...others} />;\n};\nexport const DatePickerTableHeader: Component<DatePickerPrimitive.TableHeaderProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <DatePickerPrimitive.TableHeader\n class={cn('w-9 font-normal rounded-md text-[0.8rem] text-muted-foreground', local.class)}\n {...others}\n />\n );\n};\nexport const DatePickerTableRow: Component<DatePickerPrimitive.TableRowProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <DatePickerPrimitive.TableRow class={cn('mt-2 flex w-full', local.class)} {...others} />;\n};\nexport const DatePickerLabel: Component<DatePickerPrimitive.LabelProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <DatePickerPrimitive.Label\n class={cn(\n 'mb-1 gap-2 text-sm font-medium flex items-center leading-none select-none group-data-disabled:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n local.class,\n )}\n {...others}\n />\n );\n};\nexport const DatePickerControl: Component<DatePickerPrimitive.ControlProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <DatePickerPrimitive.Control class={cn('gap-2 flex flex-row', local.class)} {...others} />;\n};\nexport const DatePickerInput: Component<DatePickerPrimitive.InputProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <DatePickerPrimitive.Input\n class={cn(\n 'h-9 px-3 py-2 text-sm file:text-sm file:font-medium shadow-sm flex w-full rounded-lg border border-input bg-background transition-colors file:border-0 file:bg-transparent placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50',\n local.class,\n )}\n {...others}\n />\n );\n};\nexport const DatePickerTrigger: Component<DatePickerPrimitive.TriggerProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <DatePickerPrimitive.Trigger\n class={cn(\n buttonVariants({ variant: 'outline', size: 'icon' }),\n 'size-9 p-0 font-normal',\n local.class,\n )}\n {...others}\n >\n {local.children ?? <CalendarMonthIcon class='size-4' />}\n </DatePickerPrimitive.Trigger>\n );\n};\nexport const DatePickerPositioner: Component<DatePickerPrimitive.PositionerProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <DatePickerPrimitive.Positioner class={cn('isolate z-50', local.class)} {...others} />;\n};\nexport const DatePickerContent: Component<DatePickerPrimitive.ContentProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <DatePickerPrimitive.Content\n class={cn(\n 'w-72 p-3 shadow-md rounded-lg bg-popover text-popover-foreground ring-1 ring-foreground/10 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',\n local.class,\n )}\n {...others}\n />\n );\n};\nexport const DatePickerPrevTrigger: Component<DatePickerPrimitive.PrevTriggerProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <DatePickerPrimitive.PrevTrigger\n class={cn(\n buttonVariants({ variant: 'outline' }),\n 'size-7 p-0 left-1 absolute bg-transparent opacity-50 hover:opacity-100',\n local.class,\n )}\n {...others}\n >\n {local.children ?? <ChevronLeftIcon class='size-4' />}\n </DatePickerPrimitive.PrevTrigger>\n );\n};\nexport const DatePickerNextTrigger: Component<DatePickerPrimitive.NextTriggerProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <DatePickerPrimitive.NextTrigger\n class={cn(\n buttonVariants({ variant: 'outline' }),\n 'size-7 p-0 right-1 absolute bg-transparent opacity-50 hover:opacity-100',\n local.class,\n )}\n {...others}\n >\n {local.children ?? <ChevronRightIcon class='size-4' />}\n </DatePickerPrimitive.NextTrigger>\n );\n};\nexport const DatePickerTableCellTrigger: Component<DatePickerPrimitive.TableCellTriggerProps> = (\n props,\n) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <DatePickerPrimitive.TableCellTrigger\n class={cn(\n buttonVariants({ variant: 'ghost' }),\n 'size-9 p-0 font-normal data-selected:opacity-100',\n 'data-today:bg-accent data-today:text-accent-foreground',\n 'data-selected:bg-primary data-selected:text-primary-foreground data-selected:hover:bg-primary data-selected:hover:text-primary-foreground data-selected:focus:bg-primary data-selected:focus:text-primary-foreground',\n 'data-disabled:text-muted-foreground data-[disabled=true]:opacity-50',\n 'data-outside-range:text-muted-foreground data-outside-range:opacity-50',\n 'data-in-range:rounded-none data-in-range:bg-accent data-in-range:text-accent-foreground',\n 'data-range-end:rounded-r-md data-range-start:rounded-l-md',\n local.class,\n )}\n {...others}\n />\n );\n};\nexport const DatePickerViewControl: Component<DatePickerPrimitive.ViewControlProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <DatePickerPrimitive.ViewControl\n class={cn('pt-1 mb-4 px-8 relative flex items-center justify-center', local.class)}\n {...others}\n >\n <DatePickerPrevTrigger />\n <DatePickerViewTrigger\n asChild={(triggerProps) => (\n <button\n class={cn(buttonVariants({ variant: 'ghost' }), 'h-7 px-2 py-1 text-sm font-medium')}\n {...triggerProps()}\n >\n <DatePickerRangeText />\n </button>\n )}\n />\n <DatePickerNextTrigger />\n </DatePickerPrimitive.ViewControl>\n );\n};\nexport const DatePickerDayView: Component = () => (\n <DatePickerView view='day'>\n <DatePickerViewControl />\n <DatePickerTable>\n <DatePickerTableHead>\n <DatePickerTableRow>\n <DatePickerContext>\n {(api) => (\n <For each={api().weekDays}>\n {(weekDay) => (\n <DatePickerTableHeader aria-label={weekDay.narrow}>\n {weekDay.short}\n </DatePickerTableHeader>\n )}\n </For>\n )}\n </DatePickerContext>\n </DatePickerTableRow>\n </DatePickerTableHead>\n <DatePickerTableBody>\n <DatePickerContext>\n {(api) => (\n <For each={api().weeks}>\n {(week) => (\n <DatePickerTableRow>\n <For each={week}>\n {(day) => (\n <DatePickerTableCell value={day}>\n <DatePickerTableCellTrigger>{day.day}</DatePickerTableCellTrigger>\n </DatePickerTableCell>\n )}\n </For>\n </DatePickerTableRow>\n )}\n </For>\n )}\n </DatePickerContext>\n </DatePickerTableBody>\n </DatePickerTable>\n </DatePickerView>\n);\nexport const DatePickerMonthView: Component = () => (\n <DatePickerView view='month'>\n <DatePickerViewControl />\n <DatePickerTable>\n <DatePickerTableBody>\n <DatePickerContext>\n {(api) => (\n <For each={api().getMonthsGrid({ columns: 4, format: 'short' })}>\n {(months) => (\n <DatePickerTableRow class='gap-2 w-full'>\n <For each={months}>\n {(month) => (\n <DatePickerTableCell value={month.value} class='flex-1'>\n <DatePickerTableCellTrigger class='w-full'>\n {month.label}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n )}\n </For>\n </DatePickerTableRow>\n )}\n </For>\n )}\n </DatePickerContext>\n </DatePickerTableBody>\n </DatePickerTable>\n </DatePickerView>\n);\nexport const DatePickerYearView: Component = () => (\n <DatePickerView view='year'>\n <DatePickerViewControl />\n <DatePickerTable>\n <DatePickerTableBody>\n <DatePickerContext>\n {(api) => (\n <For each={api().getYearsGrid({ columns: 4 })}>\n {(years) => (\n <DatePickerTableRow class='gap-2 w-full'>\n <For each={years}>\n {(year) => (\n <DatePickerTableCell value={year.value} class='flex-1'>\n <DatePickerTableCellTrigger class='w-full'>\n {year.label}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n )}\n </For>\n </DatePickerTableRow>\n )}\n </For>\n )}\n </DatePickerContext>\n </DatePickerTableBody>\n </DatePickerTable>\n </DatePickerView>\n);\nexport const DatePickerViews: Component = () => [\n <DatePickerDayView />,\n <DatePickerMonthView />,\n <DatePickerYearView />,\n];\nexport const Calendar: Component<DatePickerPrimitive.RootProps> = (props) => (\n <DatePicker {...props} inline unmountOnExit={false}>\n <DatePickerContent class='border-none shadow-none ring-0'>\n <DatePickerViews />\n </DatePickerContent>\n </DatePicker>\n);\n"],"names":["DatePicker","props","local","others","splitProps","_$createComponent","DatePickerPrimitive","Root","_$mergeProps","cn","class","DatePickerContext","Context","DatePickerRangeText","RangeText","DatePickerView","View","DatePickerViewTrigger","ViewTrigger","DatePickerTable","Table","DatePickerTableBody","TableBody","DatePickerTableCell","TableCell","DatePickerTableHead","TableHead","DatePickerTableHeader","TableHeader","DatePickerTableRow","TableRow","DatePickerLabel","Label","DatePickerControl","Control","DatePickerInput","Input","DatePickerTrigger","Trigger","buttonVariants","variant","size","children","CalendarMonthIcon","DatePickerPositioner","Positioner","DatePickerContent","Content","DatePickerPrevTrigger","PrevTrigger","ChevronLeftIcon","DatePickerNextTrigger","NextTrigger","ChevronRightIcon","DatePickerTableCellTrigger","TableCellTrigger","DatePickerViewControl","ViewControl","asChild","triggerProps","_el$","_tmpl$","_$spread","_$insert","DatePickerDayView","view","api","For","each","weekDays","weekDay","narrow","short","weeks","week","day","value","DatePickerMonthView","getMonthsGrid","columns","format","months","month","label","DatePickerYearView","getYearsGrid","years","year","DatePickerViews","Calendar","inline","unmountOnExit"],"mappings":";;;;;;;;;AAQO,MAAMA,IAAwDC,CAAAA,MAAU;AAC7E,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,SAAAI,EAAQC,EAAoBC,MAAIC,EAAA;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AArC,UACzC4C,CAAAA,MAAKjF,EACJwB,GAAkB;AAAA,kBAAA,OAAA;AAAA,kBAAA,IAAAa,WAAA;AAAA,2BAAArC,EAChB8D,GAAG;AAAA,sBAACC,MAAMkB;AAAAA,sBAAK5C,UACZ6C,CAAAA,MAAIlF,EACHkB,GAAmB;AAAA,wBAAA,IAACqD,QAAK;AAAA,iCAAEW,EAAKX;AAAAA,wBAAK;AAAA,wBAAA,OAAA;AAAA,wBAAA,IAAAlC,WAAA;AAAA,iCAAArC,EACnCiD,GAA0B;AAAA,4BAAA,OAAA;AAAA,4BAAA,IAAAZ,WAAA;AAAA,qCACxB6C,EAAKJ;AAAAA,4BAAK;AAAA,0BAAA,CAAA;AAAA,wBAAA;AAAA,sBAAA,CAAA;AAAA,oBAAA,CAGhB;AAAA,kBAAA;AAAA,gBAAA,CAAA;AAAA,cAAA,CAGN;AAAA,YAAA,CAEJ;AAAA,UAAA;AAAA,QAAA,CAAA;AAAA,MAAA;AAAA,IAAA,CAAA,CAAA;AAAA,EAAA;AAAA,CAAA,GAMEK,IAA6BA,MAAM,CAAAnF,EAC7C2D,GAAiB,CAAA,CAAA,GAAA3D,EACjBwE,QAAmBxE,EACnB+E,GAAkB,CAAA,CAAA,CAAA,GAERK,IAAsDxF,CAAAA,MAAKI,EACrEL,GAAUQ,EAAKP,GAAK;AAAA,EAAEyF,QAAM;AAAA,EAACC,eAAe;AAAA,EAAK,IAAAjD,WAAA;AAAA,WAAArC,EAC/CyC,GAAiB;AAAA,MAAA,OAAA;AAAA,MAAA,IAAAJ,WAAA;AAAA,eAAArC,EACfmF,GAAe,EAAA;AAAA,MAAA;AAAA,IAAA,CAAA;AAAA,EAAA;AAAA,CAAA,CAAA;"}
|
|
1
|
+
{"version":3,"file":"DatePicker.js","sources":["../../src/components/DatePicker.tsx"],"sourcesContent":["import { DatePicker as DatePickerPrimitive } from '@ark-ui/solid/date-picker';\nimport { type Component, For, splitProps } from 'solid-js';\nimport { cn } from 'tailwind-variants';\nimport CalendarMonthIcon from '~icons/material-symbols/calendar-month';\nimport ChevronLeftIcon from '~icons/material-symbols/chevron-left';\nimport ChevronRightIcon from '~icons/material-symbols/chevron-right';\n\nimport { buttonVariants } from '@/components/Button';\nexport const DatePicker: Component<DatePickerPrimitive.RootProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <DatePickerPrimitive.Root class={cn('flex w-full flex-col', local.class)} {...others} />;\n};\nexport const DatePickerContext = DatePickerPrimitive.Context,\n DatePickerRangeText = DatePickerPrimitive.RangeText,\n DatePickerView = DatePickerPrimitive.View,\n DatePickerViewTrigger = DatePickerPrimitive.ViewTrigger;\nexport const DatePickerTable: Component<DatePickerPrimitive.TableProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <DatePickerPrimitive.Table\n class={cn('space-y-1 w-full border-collapse', local.class)}\n {...others}\n />\n );\n};\nexport const DatePickerTableBody: Component<DatePickerPrimitive.TableBodyProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <DatePickerPrimitive.TableBody class={cn('', local.class)} {...others} />;\n};\nexport const DatePickerTableCell: Component<DatePickerPrimitive.TableCellProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <DatePickerPrimitive.TableCell\n class={cn(\n 'text-sm p-0 relative text-center focus-within:relative focus-within:z-20 [&:has([data-selected])]:bg-accent first:[&:has([data-selected])]:rounded-l-md last:[&:has([data-selected])]:rounded-r-md',\n local.class,\n )}\n {...others}\n />\n );\n};\nexport const DatePickerTableHead: Component<DatePickerPrimitive.TableHeadProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <DatePickerPrimitive.TableHead class={cn('', local.class)} {...others} />;\n};\nexport const DatePickerTableHeader: Component<DatePickerPrimitive.TableHeaderProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <DatePickerPrimitive.TableHeader\n class={cn('w-9 font-normal rounded-md text-[0.8rem] text-muted-foreground', local.class)}\n {...others}\n />\n );\n};\nexport const DatePickerTableRow: Component<DatePickerPrimitive.TableRowProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <DatePickerPrimitive.TableRow class={cn('mt-2 flex w-full', local.class)} {...others} />;\n};\nexport const DatePickerLabel: Component<DatePickerPrimitive.LabelProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <DatePickerPrimitive.Label\n class={cn(\n 'mb-1.5 gap-2 text-sm font-medium flex items-center leading-none select-none group-data-disabled:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n local.class,\n )}\n {...others}\n />\n );\n};\nexport const DatePickerControl: Component<DatePickerPrimitive.ControlProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <DatePickerPrimitive.Control class={cn('gap-2 flex flex-row', local.class)} {...others} />;\n};\nexport const DatePickerInput: Component<DatePickerPrimitive.InputProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <DatePickerPrimitive.Input\n class={cn(\n 'h-9 px-3 py-2 text-sm file:text-sm file:font-medium shadow-sm flex w-full rounded-lg border border-input bg-background transition-colors file:border-0 file:bg-transparent placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50',\n local.class,\n )}\n {...others}\n />\n );\n};\nexport const DatePickerTrigger: Component<DatePickerPrimitive.TriggerProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <DatePickerPrimitive.Trigger\n class={cn(\n buttonVariants({ variant: 'outline', size: 'icon' }),\n 'size-9 p-0 font-normal',\n local.class,\n )}\n {...others}\n >\n {local.children ?? <CalendarMonthIcon class='size-4' />}\n </DatePickerPrimitive.Trigger>\n );\n};\nexport const DatePickerPositioner: Component<DatePickerPrimitive.PositionerProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return <DatePickerPrimitive.Positioner class={cn('isolate z-50', local.class)} {...others} />;\n};\nexport const DatePickerContent: Component<DatePickerPrimitive.ContentProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <DatePickerPrimitive.Content\n class={cn(\n 'w-72 p-3 shadow-md rounded-lg bg-popover text-popover-foreground ring-1 ring-foreground/10 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',\n local.class,\n )}\n {...others}\n />\n );\n};\nexport const DatePickerPrevTrigger: Component<DatePickerPrimitive.PrevTriggerProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <DatePickerPrimitive.PrevTrigger\n class={cn(\n buttonVariants({ variant: 'outline' }),\n 'size-7 p-0 left-1 absolute bg-transparent opacity-50 hover:opacity-100',\n local.class,\n )}\n {...others}\n >\n {local.children ?? <ChevronLeftIcon class='size-4' />}\n </DatePickerPrimitive.PrevTrigger>\n );\n};\nexport const DatePickerNextTrigger: Component<DatePickerPrimitive.NextTriggerProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <DatePickerPrimitive.NextTrigger\n class={cn(\n buttonVariants({ variant: 'outline' }),\n 'size-7 p-0 right-1 absolute bg-transparent opacity-50 hover:opacity-100',\n local.class,\n )}\n {...others}\n >\n {local.children ?? <ChevronRightIcon class='size-4' />}\n </DatePickerPrimitive.NextTrigger>\n );\n};\nexport const DatePickerTableCellTrigger: Component<DatePickerPrimitive.TableCellTriggerProps> = (\n props,\n) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <DatePickerPrimitive.TableCellTrigger\n class={cn(\n buttonVariants({ variant: 'ghost' }),\n 'size-9 p-0 font-normal data-selected:opacity-100',\n 'data-today:bg-accent data-today:text-accent-foreground',\n 'data-selected:bg-primary data-selected:text-primary-foreground data-selected:hover:bg-primary data-selected:hover:text-primary-foreground data-selected:focus:bg-primary data-selected:focus:text-primary-foreground',\n 'data-disabled:text-muted-foreground data-[disabled=true]:opacity-50',\n 'data-outside-range:text-muted-foreground data-outside-range:opacity-50',\n 'data-in-range:rounded-none data-in-range:bg-accent data-in-range:text-accent-foreground',\n 'data-range-end:rounded-r-md data-range-start:rounded-l-md',\n local.class,\n )}\n {...others}\n />\n );\n};\nexport const DatePickerViewControl: Component<DatePickerPrimitive.ViewControlProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <DatePickerPrimitive.ViewControl\n class={cn('pt-1 mb-4 px-8 relative flex items-center justify-center', local.class)}\n {...others}\n >\n <DatePickerPrevTrigger />\n <DatePickerViewTrigger\n asChild={(triggerProps) => (\n <button\n class={cn(buttonVariants({ variant: 'ghost' }), 'h-7 px-2 py-1 text-sm font-medium')}\n {...triggerProps()}\n >\n <DatePickerRangeText />\n </button>\n )}\n />\n <DatePickerNextTrigger />\n </DatePickerPrimitive.ViewControl>\n );\n};\nexport const DatePickerDayView: Component = () => (\n <DatePickerView view='day'>\n <DatePickerViewControl />\n <DatePickerTable>\n <DatePickerTableHead>\n <DatePickerTableRow>\n <DatePickerContext>\n {(api) => (\n <For each={api().weekDays}>\n {(weekDay) => (\n <DatePickerTableHeader aria-label={weekDay.narrow}>\n {weekDay.short}\n </DatePickerTableHeader>\n )}\n </For>\n )}\n </DatePickerContext>\n </DatePickerTableRow>\n </DatePickerTableHead>\n <DatePickerTableBody>\n <DatePickerContext>\n {(api) => (\n <For each={api().weeks}>\n {(week) => (\n <DatePickerTableRow>\n <For each={week}>\n {(day) => (\n <DatePickerTableCell value={day}>\n <DatePickerTableCellTrigger>{day.day}</DatePickerTableCellTrigger>\n </DatePickerTableCell>\n )}\n </For>\n </DatePickerTableRow>\n )}\n </For>\n )}\n </DatePickerContext>\n </DatePickerTableBody>\n </DatePickerTable>\n </DatePickerView>\n);\nexport const DatePickerMonthView: Component = () => (\n <DatePickerView view='month'>\n <DatePickerViewControl />\n <DatePickerTable>\n <DatePickerTableBody>\n <DatePickerContext>\n {(api) => (\n <For each={api().getMonthsGrid({ columns: 4, format: 'short' })}>\n {(months) => (\n <DatePickerTableRow class='gap-2 w-full'>\n <For each={months}>\n {(month) => (\n <DatePickerTableCell value={month.value} class='flex-1'>\n <DatePickerTableCellTrigger class='w-full'>\n {month.label}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n )}\n </For>\n </DatePickerTableRow>\n )}\n </For>\n )}\n </DatePickerContext>\n </DatePickerTableBody>\n </DatePickerTable>\n </DatePickerView>\n);\nexport const DatePickerYearView: Component = () => (\n <DatePickerView view='year'>\n <DatePickerViewControl />\n <DatePickerTable>\n <DatePickerTableBody>\n <DatePickerContext>\n {(api) => (\n <For each={api().getYearsGrid({ columns: 4 })}>\n {(years) => (\n <DatePickerTableRow class='gap-2 w-full'>\n <For each={years}>\n {(year) => (\n <DatePickerTableCell value={year.value} class='flex-1'>\n <DatePickerTableCellTrigger class='w-full'>\n {year.label}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n )}\n </For>\n </DatePickerTableRow>\n )}\n </For>\n )}\n </DatePickerContext>\n </DatePickerTableBody>\n </DatePickerTable>\n </DatePickerView>\n);\nexport const DatePickerViews: Component = () => [\n <DatePickerDayView />,\n <DatePickerMonthView />,\n <DatePickerYearView />,\n];\nexport const Calendar: Component<DatePickerPrimitive.RootProps> = (props) => (\n <DatePicker {...props} inline unmountOnExit={false}>\n <DatePickerContent class='border-none shadow-none ring-0'>\n <DatePickerViews />\n </DatePickerContent>\n </DatePicker>\n);\n"],"names":["DatePicker","props","local","others","splitProps","_$createComponent","DatePickerPrimitive","Root","_$mergeProps","cn","class","DatePickerContext","Context","DatePickerRangeText","RangeText","DatePickerView","View","DatePickerViewTrigger","ViewTrigger","DatePickerTable","Table","DatePickerTableBody","TableBody","DatePickerTableCell","TableCell","DatePickerTableHead","TableHead","DatePickerTableHeader","TableHeader","DatePickerTableRow","TableRow","DatePickerLabel","Label","DatePickerControl","Control","DatePickerInput","Input","DatePickerTrigger","Trigger","buttonVariants","variant","size","children","CalendarMonthIcon","DatePickerPositioner","Positioner","DatePickerContent","Content","DatePickerPrevTrigger","PrevTrigger","ChevronLeftIcon","DatePickerNextTrigger","NextTrigger","ChevronRightIcon","DatePickerTableCellTrigger","TableCellTrigger","DatePickerViewControl","ViewControl","asChild","triggerProps","_el$","_tmpl$","_$spread","_$insert","DatePickerDayView","view","api","For","each","weekDays","weekDay","narrow","short","weeks","week","day","value","DatePickerMonthView","getMonthsGrid","columns","format","months","month","label","DatePickerYearView","getYearsGrid","years","year","DatePickerViews","Calendar","inline","unmountOnExit"],"mappings":";;;;;;;;;AAQO,MAAMA,IAAwDC,CAAAA,MAAU;AAC7E,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,SAAAI,EAAQC,EAAoBC,MAAIC,EAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aAAQC,EAAG,wBAAwBP,EAAMQ,KAAK;AAAA,IAAC;AAAA,EAAA,GAAMP,CAAM,CAAA;AAC7F,GACaQ,IAAoBL,EAAoBM,SACnDC,IAAsBP,EAAoBQ,WAC1CC,IAAiBT,EAAoBU,MACrCC,IAAwBX,EAAoBY,aACjCC,IAA8DlB,CAAAA,MAAU;AACnF,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,SAAAI,EACGC,EAAoBc,OAAKZ,EAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aACjBC,EAAG,oCAAoCP,EAAMQ,KAAK;AAAA,IAAC;AAAA,EAAA,GACtDP,CAAM,CAAA;AAGhB,GACakB,IAAsEpB,CAAAA,MAAU;AAC3F,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,SAAAI,EAAQC,EAAoBgB,WAASd,EAAA;AAA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CAAA;AAAA,EAAA;AAAA,CAAA,GAMEK,IAA6BA,MAAM,CAAAnF,EAC7C2D,GAAiB,CAAA,CAAA,GAAA3D,EACjBwE,QAAmBxE,EACnB+E,GAAkB,CAAA,CAAA,CAAA,GAERK,IAAsDxF,CAAAA,MAAKI,EACrEL,GAAUQ,EAAKP,GAAK;AAAA,EAAEyF,QAAM;AAAA,EAACC,eAAe;AAAA,EAAK,IAAAjD,WAAA;AAAA,WAAArC,EAC/CyC,GAAiB;AAAA,MAAA,OAAA;AAAA,MAAA,IAAAJ,WAAA;AAAA,eAAArC,EACfmF,GAAe,EAAA;AAAA,MAAA;AAAA,IAAA,CAAA;AAAA,EAAA;AAAA,CAAA,CAAA;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createComponent as s, mergeProps as r,
|
|
1
|
+
import { createComponent as s, mergeProps as r, spread as c, template as d } from "solid-js/web";
|
|
2
2
|
import { dialog_exports as a } from "../node_modules/.bun/@ark-ui_solid@5.34.1_2e1854f049906f04/node_modules/@ark-ui/solid/dist/chunk/GOIBDXMD.js";
|
|
3
3
|
import { splitProps as l } from "solid-js";
|
|
4
4
|
import { cn as n } from "../node_modules/.bun/tailwind-variants@3.2.2_7ac958b541464b98/node_modules/tailwind-variants/dist/index.js";
|
|
5
5
|
import g from "../_virtual/close.js";
|
|
6
6
|
import { Button as u } from "./Button.js";
|
|
7
7
|
import { ui_common_close as m } from "../paraglide/messages/ui_common_close.js";
|
|
8
|
-
var p = /* @__PURE__ */
|
|
8
|
+
var p = /* @__PURE__ */ d("<div data-slot=dialog-header>"), f = /* @__PURE__ */ d("<div data-slot=dialog-footer>");
|
|
9
9
|
const _ = a.Root, w = a.Trigger, z = a.Context, k = a.CloseTrigger, y = (t) => {
|
|
10
10
|
const [e, o] = l(t, ["class"]);
|
|
11
11
|
return s(a.Backdrop, r({
|
|
@@ -54,7 +54,7 @@ const _ = a.Root, w = a.Trigger, z = a.Context, k = a.CloseTrigger, y = (t) => {
|
|
|
54
54
|
const [e, o] = l(t, ["class"]);
|
|
55
55
|
return (() => {
|
|
56
56
|
var i = p();
|
|
57
|
-
return
|
|
57
|
+
return c(i, r({
|
|
58
58
|
get class() {
|
|
59
59
|
return n("gap-2 flex flex-col", e.class);
|
|
60
60
|
}
|
|
@@ -64,7 +64,7 @@ const _ = a.Root, w = a.Trigger, z = a.Context, k = a.CloseTrigger, y = (t) => {
|
|
|
64
64
|
const [e, o] = l(t, ["class"]);
|
|
65
65
|
return (() => {
|
|
66
66
|
var i = f();
|
|
67
|
-
return
|
|
67
|
+
return c(i, r({
|
|
68
68
|
get class() {
|
|
69
69
|
return n("-mx-4 -mb-4 gap-2 p-4 sm:flex-row sm:justify-end flex flex-col-reverse rounded-b-xl border-t bg-muted/50", e.class);
|
|
70
70
|
}
|
package/dist/components/Empty.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { spread as r, mergeProps as l, template as n } from "solid-js/web";
|
|
2
2
|
import { tv as i, cn as c } from "../node_modules/.bun/tailwind-variants@3.2.2_7ac958b541464b98/node_modules/tailwind-variants/dist/index.js";
|
|
3
3
|
import { splitProps as o } from "solid-js";
|
|
4
|
-
var m = /* @__PURE__ */
|
|
4
|
+
var m = /* @__PURE__ */ n("<div data-slot=empty>"), d = /* @__PURE__ */ n("<div data-slot=empty-header>"), f = /* @__PURE__ */ n("<div data-slot=empty-icon>"), p = /* @__PURE__ */ n("<div data-slot=empty-title>"), u = /* @__PURE__ */ n("<p data-slot=empty-description>"), v = /* @__PURE__ */ n("<div data-slot=empty-content>");
|
|
5
5
|
const h = (s) => {
|
|
6
6
|
const [e, a] = o(s, ["class"]);
|
|
7
7
|
return (() => {
|
|
8
8
|
var t = m();
|
|
9
|
-
return
|
|
9
|
+
return r(t, l({
|
|
10
10
|
get class() {
|
|
11
11
|
return c("gap-4 p-6 min-w-0 flex w-full flex-1 flex-col items-center justify-center rounded-lg border border-dashed text-center text-balance", e.class);
|
|
12
12
|
}
|
|
@@ -16,7 +16,7 @@ const h = (s) => {
|
|
|
16
16
|
const [e, a] = o(s, ["class"]);
|
|
17
17
|
return (() => {
|
|
18
18
|
var t = d();
|
|
19
|
-
return
|
|
19
|
+
return r(t, l({
|
|
20
20
|
get class() {
|
|
21
21
|
return c("gap-2 max-w-sm flex flex-col items-center", e.class);
|
|
22
22
|
}
|
|
@@ -37,7 +37,7 @@ const h = (s) => {
|
|
|
37
37
|
const [e, a] = o(s, ["class", "variant"]);
|
|
38
38
|
return (() => {
|
|
39
39
|
var t = f();
|
|
40
|
-
return
|
|
40
|
+
return r(t, l({
|
|
41
41
|
get "data-variant"() {
|
|
42
42
|
return e.variant ?? "default";
|
|
43
43
|
},
|
|
@@ -53,7 +53,7 @@ const h = (s) => {
|
|
|
53
53
|
const [e, a] = o(s, ["class"]);
|
|
54
54
|
return (() => {
|
|
55
55
|
var t = p();
|
|
56
|
-
return
|
|
56
|
+
return r(t, l({
|
|
57
57
|
get class() {
|
|
58
58
|
return c("text-sm font-medium tracking-tight", e.class);
|
|
59
59
|
}
|
|
@@ -63,7 +63,7 @@ const h = (s) => {
|
|
|
63
63
|
const [e, a] = o(s, ["class"]);
|
|
64
64
|
return (() => {
|
|
65
65
|
var t = u();
|
|
66
|
-
return
|
|
66
|
+
return r(t, l({
|
|
67
67
|
get class() {
|
|
68
68
|
return c("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", e.class);
|
|
69
69
|
}
|
|
@@ -73,7 +73,7 @@ const h = (s) => {
|
|
|
73
73
|
const [e, a] = o(s, ["class"]);
|
|
74
74
|
return (() => {
|
|
75
75
|
var t = v();
|
|
76
|
-
return
|
|
76
|
+
return r(t, l({
|
|
77
77
|
get class() {
|
|
78
78
|
return c("gap-2.5 text-sm max-w-sm min-w-0 flex w-full flex-col items-center text-balance", e.class);
|
|
79
79
|
}
|
package/dist/components/Field.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createComponent as l, mergeProps as n,
|
|
1
|
+
import { createComponent as l, mergeProps as n, spread as b, insert as g, template as u } from "solid-js/web";
|
|
2
2
|
import { field_exports as s } from "../node_modules/.bun/@ark-ui_solid@5.34.1_2e1854f049906f04/node_modules/@ark-ui/solid/dist/chunk/PPH4D7AF.js";
|
|
3
3
|
import { fieldset_exports as h } from "../node_modules/.bun/@ark-ui_solid@5.34.1_2e1854f049906f04/node_modules/@ark-ui/solid/dist/chunk/AIK4SKXT.js";
|
|
4
4
|
import { useFieldset as ee } from "../node_modules/.bun/@ark-ui_solid@5.34.1_2e1854f049906f04/node_modules/@ark-ui/solid/dist/chunk/AIK4SKXT.js";
|
|
5
|
-
import { splitProps as i,
|
|
5
|
+
import { splitProps as i, createMemo as v, Show as p, For as x } from "solid-js";
|
|
6
6
|
import { tv as y, cn as o } from "../node_modules/.bun/tailwind-variants@3.2.2_7ac958b541464b98/node_modules/tailwind-variants/dist/index.js";
|
|
7
7
|
import { Separator as k } from "./Separator.js";
|
|
8
|
-
var w = /* @__PURE__ */ u("<div data-slot=field-group>"), _ = /* @__PURE__ */ u("<div data-slot=field-content>"), F = /* @__PURE__ */ u("<div data-slot=field-label>"), $ = /* @__PURE__ */ u('<span class="px-2 relative mx-auto block w-fit bg-background text-muted-foreground"data-slot=field-separator-content>'), S = /* @__PURE__ */ u("<div data-slot=field-separator>"), T = /* @__PURE__ */ u('<div class="mt-[3px] min-h-[0.875rem] flex
|
|
8
|
+
var w = /* @__PURE__ */ u("<div data-slot=field-group>"), _ = /* @__PURE__ */ u("<div data-slot=field-content>"), F = /* @__PURE__ */ u("<div data-slot=field-label>"), $ = /* @__PURE__ */ u('<span class="px-2 relative mx-auto block w-fit bg-background text-muted-foreground"data-slot=field-separator-content>'), S = /* @__PURE__ */ u("<div data-slot=field-separator>"), T = /* @__PURE__ */ u('<div class="mt-[3px] flex min-h-[0.875rem] flex-col justify-start">'), C = /* @__PURE__ */ u('<ul class="ml-4 gap-1 flex list-disc flex-col">'), I = /* @__PURE__ */ u("<li>");
|
|
9
9
|
const V = s.Context, B = (t) => {
|
|
10
10
|
const [e, r] = i(t, ["class", "children"]);
|
|
11
11
|
return l(h.Root, n({
|
|
@@ -26,7 +26,7 @@ const V = s.Context, B = (t) => {
|
|
|
26
26
|
return e.variant ?? "legend";
|
|
27
27
|
},
|
|
28
28
|
get class() {
|
|
29
|
-
return o("mb-1 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base", e.class);
|
|
29
|
+
return o("mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base", e.class);
|
|
30
30
|
}
|
|
31
31
|
}, r, {
|
|
32
32
|
get children() {
|
|
@@ -80,7 +80,7 @@ const V = s.Context, B = (t) => {
|
|
|
80
80
|
var a = _();
|
|
81
81
|
return b(a, n({
|
|
82
82
|
get class() {
|
|
83
|
-
return o("
|
|
83
|
+
return o("group/field-content leading-snug relative flex flex-1 flex-col", e.class);
|
|
84
84
|
}
|
|
85
85
|
}, r), !1, !1), a;
|
|
86
86
|
})();
|
|
@@ -127,7 +127,7 @@ const V = s.Context, B = (t) => {
|
|
|
127
127
|
return l(s.Label, n({
|
|
128
128
|
"data-slot": "field-label",
|
|
129
129
|
get class() {
|
|
130
|
-
return o("group-data-[orientation=vertical]/field:mb-1", "gap-2 text-sm font-medium flex items-center leading-none select-none group-data-disabled:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", "*:data-[slot=field]:p-2.5 group/field-label peer/field-label leading-snug flex w-fit group-data-disabled/field:opacity-50 has-data-[slot=field]:rounded-lg has-data-[slot=field]:border has-[[data-state=checked]]:border-primary/30 has-[[data-state=checked]]:bg-primary/5 dark:has-[[data-state=checked]]:border-primary/20 dark:has-[[data-state=checked]]:bg-primary/10", "has-data-[slot=field]:w-full has-data-[slot=field]:flex-col", e.class);
|
|
130
|
+
return o("group-data-[orientation=vertical]/field:mb-1.5", "gap-2 text-sm font-medium flex items-center leading-none select-none group-data-disabled:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", "*:data-[slot=field]:p-2.5 group/field-label peer/field-label leading-snug flex w-fit group-data-disabled/field:opacity-50 has-data-[slot=field]:rounded-lg has-data-[slot=field]:border has-[[data-state=checked]]:border-primary/30 has-[[data-state=checked]]:bg-primary/5 dark:has-[[data-state=checked]]:border-primary/20 dark:has-[[data-state=checked]]:bg-primary/10", "has-data-[slot=field]:w-full has-data-[slot=field]:flex-col", e.class);
|
|
131
131
|
}
|
|
132
132
|
}, r, {
|
|
133
133
|
get children() {
|
|
@@ -140,7 +140,7 @@ const V = s.Context, B = (t) => {
|
|
|
140
140
|
var a = F();
|
|
141
141
|
return b(a, n({
|
|
142
142
|
get class() {
|
|
143
|
-
return o("group-data-[orientation=vertical]/field:mb-1", "gap-2 text-sm font-medium leading-snug flex w-fit items-center group-data-disabled/field:opacity-50", e.class);
|
|
143
|
+
return o("group-data-[orientation=vertical]/field:mb-1.5", "gap-2 text-sm font-medium leading-snug flex w-fit items-center group-data-disabled/field:opacity-50", e.class);
|
|
144
144
|
}
|
|
145
145
|
}, r), !1, !0), g(a, () => e.children), a;
|
|
146
146
|
})();
|
|
@@ -196,7 +196,7 @@ const V = s.Context, B = (t) => {
|
|
|
196
196
|
return g(d, l(s.ErrorText, n({
|
|
197
197
|
"data-slot": "field-error",
|
|
198
198
|
get class() {
|
|
199
|
-
return o("text-[0.8rem] leading-[0.875rem]
|
|
199
|
+
return o("font-medium text-[0.8rem] leading-[0.875rem] text-destructive", e.class);
|
|
200
200
|
}
|
|
201
201
|
}, r, {
|
|
202
202
|
get children() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.js","sources":["../../src/components/Field.tsx"],"sourcesContent":["import { Field as PrimitiveField } from '@ark-ui/solid/field';\nimport { Fieldset as PrimitiveFieldset } from '@ark-ui/solid/fieldset';\nimport {\n type Component,\n type ComponentProps,\n createMemo,\n For,\n type JSXElement,\n Show,\n splitProps,\n} from 'solid-js';\nimport { type VariantProps, tv, cn } from 'tailwind-variants';\n\nimport { Separator } from '@/components/Separator';\n\nexport { useFieldset } from '@ark-ui/solid/fieldset';\nexport const FieldContext = PrimitiveField.Context;\n\nexport const FieldSet: Component<PrimitiveFieldset.RootProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <PrimitiveFieldset.Root\n data-slot='field-set'\n class={cn(\n 'gap-4 has-data-[slot=checkbox-group]:gap-3 has-data-[slot=radio-group]:gap-3 flex flex-col',\n local.class,\n )}\n {...others}\n >\n {local.children}\n </PrimitiveFieldset.Root>\n );\n};\n\nexport type FieldLegendProps = PrimitiveFieldset.LegendProps & {\n variant?: 'legend' | 'label';\n};\n\nexport const FieldLegend: Component<FieldLegendProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'variant', 'children']);\n return (\n <PrimitiveFieldset.Legend\n data-slot='field-legend'\n data-variant={local.variant ?? 'legend'}\n class={cn(\n 'mb-1 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base',\n local.class,\n )}\n {...others}\n >\n {local.children}\n </PrimitiveFieldset.Legend>\n );\n};\n\nexport const FieldGroup: Component<ComponentProps<'div'>> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <div\n data-slot='field-group'\n class={cn(\n 'gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4 group/field-group @container/field-group flex w-full flex-col',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const fieldVariants = tv({\n base: 'group/field flex w-full transition-colors data-[invalid=true]:text-destructive',\n variants: {\n orientation: {\n vertical: 'flex-col [&>*]:w-full [&>.sr-only]:w-auto',\n horizontal:\n 'gap-4 flex-row items-center has-data-[slot=field-content]:items-start [&>[data-slot=field-label]]:flex-auto has-data-[slot=field-content]:[&>[role=checkbox],[role=radio]]:mt-px',\n responsive:\n '@md/field-group:gap-4 @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-data-[slot=field-content]:items-start @md/field-group:has-data-[slot=field-content]:[&>[role=checkbox],[role=radio]]:mt-px flex-col [&>*]:w-full [&>.sr-only]:w-auto',\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n});\n\nexport type FieldProps = PrimitiveField.RootProps & VariantProps<typeof fieldVariants>;\n\nexport const Field: Component<FieldProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'orientation', 'children']);\n return (\n <PrimitiveField.Root\n role='group'\n data-slot='field'\n data-orientation={local.orientation ?? 'vertical'}\n class={fieldVariants({ orientation: local.orientation, class: local.class })}\n {...others}\n >\n {local.children}\n </PrimitiveField.Root>\n );\n};\n\nexport const FieldContent: Component<ComponentProps<'div'>> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <div\n data-slot='field-content'\n class={cn('relative group/field-content leading-snug flex flex-1 flex-col', local.class)}\n {...others}\n />\n );\n};\nexport const FieldInput: Component<PrimitiveField.InputProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <PrimitiveField.Input\n data-slot='field-input'\n class={cn(\n 'min-w-0 text-base md:text-sm h-8 px-2.5 py-1 flex w-full rounded-lg border border-input bg-transparent transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 data-[invalid=true]:border-destructive data-[invalid=true]:ring-[3px] data-[invalid=true]:ring-destructive/20 data-[readonly=true]:cursor-default data-[readonly=true]:focus-visible:border-input data-[readonly=true]:focus-visible:ring-0 dark:bg-input/30 dark:disabled:bg-input/80 dark:data-[invalid=true]:border-destructive/50 dark:data-[invalid=true]:ring-destructive/40',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const FieldTextarea: Component<PrimitiveField.TextareaProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <PrimitiveField.Textarea\n data-slot='field-textarea'\n class={cn(\n 'min-w-0 text-base md:text-sm px-2.5 py-2 flex min-h-[80px] w-full rounded-lg border border-input bg-transparent transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 data-[invalid=true]:border-destructive data-[invalid=true]:ring-[3px] data-[invalid=true]:ring-destructive/20 data-[readonly=true]:cursor-default data-[readonly=true]:focus-visible:border-input data-[readonly=true]:focus-visible:ring-0 dark:bg-input/30 dark:disabled:bg-input/80 dark:data-[invalid=true]:border-destructive/50 dark:data-[invalid=true]:ring-destructive/40',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const FieldSelect: Component<PrimitiveField.SelectProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <PrimitiveField.Select\n data-slot='field-select'\n class={cn(\n 'min-w-0 text-base md:text-sm h-8 px-2.5 py-1 flex w-full rounded-lg border border-input bg-transparent transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 data-[invalid=true]:border-destructive data-[invalid=true]:ring-[3px] data-[invalid=true]:ring-destructive/20 data-[readonly=true]:cursor-default data-[readonly=true]:focus-visible:border-input data-[readonly=true]:focus-visible:ring-0 dark:bg-input/30 dark:disabled:bg-input/80 dark:data-[invalid=true]:border-destructive/50 dark:data-[invalid=true]:ring-destructive/40',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const FieldRequiredIndicator: Component<PrimitiveField.RequiredIndicatorProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'fallback', 'children']);\n return (\n <PrimitiveField.RequiredIndicator\n fallback={local.fallback ?? '*'}\n class={cn('text-sm font-medium leading-none text-destructive', local.class)}\n {...others}\n >\n {local.children}\n </PrimitiveField.RequiredIndicator>\n );\n};\n\nexport const FieldLabel: Component<PrimitiveField.LabelProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <PrimitiveField.Label\n data-slot='field-label'\n class={cn(\n 'group-data-[orientation=vertical]/field:mb-1',\n 'gap-2 text-sm font-medium flex items-center leading-none select-none group-data-disabled:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n '*:data-[slot=field]:p-2.5 group/field-label peer/field-label leading-snug flex w-fit group-data-disabled/field:opacity-50 has-data-[slot=field]:rounded-lg has-data-[slot=field]:border has-[[data-state=checked]]:border-primary/30 has-[[data-state=checked]]:bg-primary/5 dark:has-[[data-state=checked]]:border-primary/20 dark:has-[[data-state=checked]]:bg-primary/10',\n 'has-data-[slot=field]:w-full has-data-[slot=field]:flex-col',\n local.class,\n )}\n {...others}\n >\n {local.children}\n </PrimitiveField.Label>\n );\n};\n\nexport const FieldTitle: Component<ComponentProps<'div'>> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <div\n data-slot='field-label'\n class={cn(\n 'group-data-[orientation=vertical]/field:mb-1',\n 'gap-2 text-sm font-medium leading-snug flex w-fit items-center group-data-disabled/field:opacity-50',\n local.class,\n )}\n {...others}\n >\n {local.children}\n </div>\n );\n};\n\nexport const FieldDescription: Component<PrimitiveField.HelperTextProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <PrimitiveField.HelperText\n data-slot='field-description'\n class={cn(\n 'text-sm [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal text-left text-muted-foreground group-has-data-[orientation=horizontal]/field:text-balance',\n '[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary',\n local.class,\n )}\n {...others}\n >\n {local.children}\n </PrimitiveField.HelperText>\n );\n};\n\nexport type FieldSeparatorProps = ComponentProps<'div'> & {\n children?: JSXElement;\n};\n\nexport const FieldSeparator: Component<FieldSeparatorProps> = (props) => {\n const [local, others] = splitProps(props, ['children', 'class']);\n return (\n <div\n data-slot='field-separator'\n data-content={Boolean(local.children)}\n class={cn(\n '-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative',\n local.class,\n )}\n {...others}\n >\n <Separator class='inset-0 absolute top-1/2' />\n <Show when={local.children}>\n <span\n class='px-2 relative mx-auto block w-fit bg-background text-muted-foreground'\n data-slot='field-separator-content'\n >\n {local.children}\n </span>\n </Show>\n </div>\n );\n};\n\nexport type FieldErrorProps = PrimitiveField.ErrorTextProps & {\n errors?: ({ message?: string } | string | undefined)[];\n};\n\nexport const FieldError: Component<FieldErrorProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children', 'errors']);\n\n const uniqueErrors = createMemo(() => {\n const { errors } = local;\n if (!errors || errors.length === 0) {\n return [];\n }\n\n const messages: string[] = [];\n for (const error of errors) {\n if (typeof error === 'string') {\n messages.push(error);\n } else if (error && typeof error === 'object' && typeof error.message === 'string') {\n messages.push(error.message);\n }\n }\n\n return [...new Set(messages)];\n });\n\n return (\n <div class='mt-[3px] min-h-[0.875rem] flex flex-col justify-start'>\n <PrimitiveField.ErrorText\n data-slot='field-error'\n class={cn('text-[0.8rem] leading-[0.875rem] font-medium text-destructive', local.class)}\n {...others}\n >\n <Show\n when={local.children}\n fallback={\n <Show when={uniqueErrors().length > 0}>\n <Show when={uniqueErrors().length > 1} fallback={uniqueErrors().at(0)}>\n <ul class='ml-4 gap-1 flex list-disc flex-col'>\n <For each={uniqueErrors()}>{(error) => <li>{error}</li>}</For>\n </ul>\n </Show>\n </Show>\n }\n >\n {local.children}\n </Show>\n </PrimitiveField.ErrorText>\n </div>\n );\n};\n"],"names":["FieldContext","PrimitiveField","Context","FieldSet","props","local","others","splitProps","_$createComponent","PrimitiveFieldset","Root","_$mergeProps","cn","class","children","FieldLegend","Legend","variant","FieldGroup","_el$","_tmpl$","_$spread","fieldVariants","tv","base","variants","orientation","vertical","horizontal","responsive","defaultVariants","Field","role","FieldContent","_el$2","_tmpl$2","FieldInput","Input","FieldTextarea","Textarea","FieldSelect","Select","FieldRequiredIndicator","RequiredIndicator","fallback","FieldLabel","Label","FieldTitle","_el$3","_tmpl$3","_$insert","FieldDescription","HelperText","FieldSeparator","_el$4","_tmpl$5","Boolean","Separator","Show","when","_el$5","_tmpl$4","FieldError","uniqueErrors","createMemo","errors","length","messages","error","push","message","Set","_el$6","_tmpl$6","ErrorText","at","_el$7","_tmpl$7","For","each","_el$8","_tmpl$8"],"mappings":";;;;;;;;AAgBO,MAAMA,IAAeC,EAAeC,SAE9BC,IAAoDC,CAAAA,MAAU;AACzE,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,SAAS,UAAU,CAAC;AAC/D,SAAAI,EACGC,EAAkBC,MAAIC,EAAA;AAAA,IAAA,aAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aAEdC,EACL,8FACAP,EAAMQ,KACR;AAAA,IAAC;AAAA,EAAA,GACGP,GAAM;AAAA,IAAA,IAAAQ,WAAA;AAAA,aAETT,EAAMS;AAAAA,IAAQ;AAAA,EAAA,CAAA,CAAA;AAGrB,GAMaC,IAA4CX,CAAAA,MAAU;AACjE,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,SAAS,WAAW,UAAU,CAAC;AAC1E,SAAAI,EACGC,EAAkBO,QAAML,EAAA;AAAA,IAAA,aAAA;AAAA,IAAA,IAAA,iBAAA;AAAA,aAETN,EAAMY,WAAW;AAAA,IAAQ;AAAA,IAAA,IAAA,QAAA;AAAA,aAChCL,EACL,iFACAP,EAAMQ,KACR;AAAA,IAAC;AAAA,EAAA,GACGP,GAAM;AAAA,IAAA,IAAAQ,WAAA;AAAA,aAETT,EAAMS;AAAAA,IAAQ;AAAA,EAAA,CAAA,CAAA;AAGrB,GAEaI,IAAgDd,CAAAA,MAAU;AACrE,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,UAAA,MAAA;AAAA,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A,GAAA;AAKzB;"}
|
|
1
|
+
{"version":3,"file":"Field.js","sources":["../../src/components/Field.tsx"],"sourcesContent":["import { Field as PrimitiveField } from '@ark-ui/solid/field';\nimport { Fieldset as PrimitiveFieldset } from '@ark-ui/solid/fieldset';\nimport {\n type Component,\n type ComponentProps,\n createMemo,\n For,\n type JSXElement,\n Show,\n splitProps,\n} from 'solid-js';\nimport { type VariantProps, tv, cn } from 'tailwind-variants';\n\nimport { Separator } from '@/components/Separator';\n\nexport { useFieldset } from '@ark-ui/solid/fieldset';\nexport const FieldContext = PrimitiveField.Context;\n\nexport const FieldSet: Component<PrimitiveFieldset.RootProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <PrimitiveFieldset.Root\n data-slot='field-set'\n class={cn(\n 'gap-4 has-data-[slot=checkbox-group]:gap-3 has-data-[slot=radio-group]:gap-3 flex flex-col',\n local.class,\n )}\n {...others}\n >\n {local.children}\n </PrimitiveFieldset.Root>\n );\n};\n\nexport type FieldLegendProps = PrimitiveFieldset.LegendProps & {\n variant?: 'legend' | 'label';\n};\n\nexport const FieldLegend: Component<FieldLegendProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'variant', 'children']);\n return (\n <PrimitiveFieldset.Legend\n data-slot='field-legend'\n data-variant={local.variant ?? 'legend'}\n class={cn(\n 'mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base',\n local.class,\n )}\n {...others}\n >\n {local.children}\n </PrimitiveFieldset.Legend>\n );\n};\n\nexport const FieldGroup: Component<ComponentProps<'div'>> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <div\n data-slot='field-group'\n class={cn(\n 'gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4 group/field-group @container/field-group flex w-full flex-col',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const fieldVariants = tv({\n base: 'group/field flex w-full transition-colors data-[invalid=true]:text-destructive',\n variants: {\n orientation: {\n vertical: 'flex-col [&>*]:w-full [&>.sr-only]:w-auto',\n horizontal:\n 'gap-4 flex-row items-center has-data-[slot=field-content]:items-start [&>[data-slot=field-label]]:flex-auto has-data-[slot=field-content]:[&>[role=checkbox],[role=radio]]:mt-px',\n responsive:\n '@md/field-group:gap-4 @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-data-[slot=field-content]:items-start @md/field-group:has-data-[slot=field-content]:[&>[role=checkbox],[role=radio]]:mt-px flex-col [&>*]:w-full [&>.sr-only]:w-auto',\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n});\n\nexport type FieldProps = PrimitiveField.RootProps & VariantProps<typeof fieldVariants>;\n\nexport const Field: Component<FieldProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'orientation', 'children']);\n return (\n <PrimitiveField.Root\n role='group'\n data-slot='field'\n data-orientation={local.orientation ?? 'vertical'}\n class={fieldVariants({ orientation: local.orientation, class: local.class })}\n {...others}\n >\n {local.children}\n </PrimitiveField.Root>\n );\n};\n\nexport const FieldContent: Component<ComponentProps<'div'>> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <div\n data-slot='field-content'\n class={cn('group/field-content leading-snug relative flex flex-1 flex-col', local.class)}\n {...others}\n />\n );\n};\nexport const FieldInput: Component<PrimitiveField.InputProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <PrimitiveField.Input\n data-slot='field-input'\n class={cn(\n 'min-w-0 text-base md:text-sm h-8 px-2.5 py-1 flex w-full rounded-lg border border-input bg-transparent transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 data-[invalid=true]:border-destructive data-[invalid=true]:ring-[3px] data-[invalid=true]:ring-destructive/20 data-[readonly=true]:cursor-default data-[readonly=true]:focus-visible:border-input data-[readonly=true]:focus-visible:ring-0 dark:bg-input/30 dark:disabled:bg-input/80 dark:data-[invalid=true]:border-destructive/50 dark:data-[invalid=true]:ring-destructive/40',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const FieldTextarea: Component<PrimitiveField.TextareaProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <PrimitiveField.Textarea\n data-slot='field-textarea'\n class={cn(\n 'min-w-0 text-base md:text-sm px-2.5 py-2 flex min-h-[80px] w-full rounded-lg border border-input bg-transparent transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 data-[invalid=true]:border-destructive data-[invalid=true]:ring-[3px] data-[invalid=true]:ring-destructive/20 data-[readonly=true]:cursor-default data-[readonly=true]:focus-visible:border-input data-[readonly=true]:focus-visible:ring-0 dark:bg-input/30 dark:disabled:bg-input/80 dark:data-[invalid=true]:border-destructive/50 dark:data-[invalid=true]:ring-destructive/40',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const FieldSelect: Component<PrimitiveField.SelectProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <PrimitiveField.Select\n data-slot='field-select'\n class={cn(\n 'min-w-0 text-base md:text-sm h-8 px-2.5 py-1 flex w-full rounded-lg border border-input bg-transparent transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 data-[invalid=true]:border-destructive data-[invalid=true]:ring-[3px] data-[invalid=true]:ring-destructive/20 data-[readonly=true]:cursor-default data-[readonly=true]:focus-visible:border-input data-[readonly=true]:focus-visible:ring-0 dark:bg-input/30 dark:disabled:bg-input/80 dark:data-[invalid=true]:border-destructive/50 dark:data-[invalid=true]:ring-destructive/40',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const FieldRequiredIndicator: Component<PrimitiveField.RequiredIndicatorProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'fallback', 'children']);\n return (\n <PrimitiveField.RequiredIndicator\n fallback={local.fallback ?? '*'}\n class={cn('text-sm font-medium leading-none text-destructive', local.class)}\n {...others}\n >\n {local.children}\n </PrimitiveField.RequiredIndicator>\n );\n};\n\nexport const FieldLabel: Component<PrimitiveField.LabelProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <PrimitiveField.Label\n data-slot='field-label'\n class={cn(\n 'group-data-[orientation=vertical]/field:mb-1.5',\n 'gap-2 text-sm font-medium flex items-center leading-none select-none group-data-disabled:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n '*:data-[slot=field]:p-2.5 group/field-label peer/field-label leading-snug flex w-fit group-data-disabled/field:opacity-50 has-data-[slot=field]:rounded-lg has-data-[slot=field]:border has-[[data-state=checked]]:border-primary/30 has-[[data-state=checked]]:bg-primary/5 dark:has-[[data-state=checked]]:border-primary/20 dark:has-[[data-state=checked]]:bg-primary/10',\n 'has-data-[slot=field]:w-full has-data-[slot=field]:flex-col',\n local.class,\n )}\n {...others}\n >\n {local.children}\n </PrimitiveField.Label>\n );\n};\n\nexport const FieldTitle: Component<ComponentProps<'div'>> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <div\n data-slot='field-label'\n class={cn(\n 'group-data-[orientation=vertical]/field:mb-1.5',\n 'gap-2 text-sm font-medium leading-snug flex w-fit items-center group-data-disabled/field:opacity-50',\n local.class,\n )}\n {...others}\n >\n {local.children}\n </div>\n );\n};\n\nexport const FieldDescription: Component<PrimitiveField.HelperTextProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children']);\n return (\n <PrimitiveField.HelperText\n data-slot='field-description'\n class={cn(\n 'text-sm [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal text-left text-muted-foreground group-has-data-[orientation=horizontal]/field:text-balance',\n '[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary',\n local.class,\n )}\n {...others}\n >\n {local.children}\n </PrimitiveField.HelperText>\n );\n};\n\nexport type FieldSeparatorProps = ComponentProps<'div'> & {\n children?: JSXElement;\n};\n\nexport const FieldSeparator: Component<FieldSeparatorProps> = (props) => {\n const [local, others] = splitProps(props, ['children', 'class']);\n return (\n <div\n data-slot='field-separator'\n data-content={Boolean(local.children)}\n class={cn(\n '-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative',\n local.class,\n )}\n {...others}\n >\n <Separator class='inset-0 absolute top-1/2' />\n <Show when={local.children}>\n <span\n class='px-2 relative mx-auto block w-fit bg-background text-muted-foreground'\n data-slot='field-separator-content'\n >\n {local.children}\n </span>\n </Show>\n </div>\n );\n};\n\nexport type FieldErrorProps = PrimitiveField.ErrorTextProps & {\n errors?: ({ message?: string } | string | undefined)[];\n};\n\nexport const FieldError: Component<FieldErrorProps> = (props) => {\n const [local, others] = splitProps(props, ['class', 'children', 'errors']);\n\n const uniqueErrors = createMemo(() => {\n const { errors } = local;\n if (!errors || errors.length === 0) {\n return [];\n }\n\n const messages: string[] = [];\n for (const error of errors) {\n if (typeof error === 'string') {\n messages.push(error);\n } else if (error && typeof error === 'object' && typeof error.message === 'string') {\n messages.push(error.message);\n }\n }\n\n return [...new Set(messages)];\n });\n\n return (\n <div class='mt-[3px] flex min-h-[0.875rem] flex-col justify-start'>\n <PrimitiveField.ErrorText\n data-slot='field-error'\n class={cn('font-medium text-[0.8rem] leading-[0.875rem] text-destructive', local.class)}\n {...others}\n >\n <Show\n when={local.children}\n fallback={\n <Show when={uniqueErrors().length > 0}>\n <Show when={uniqueErrors().length > 1} fallback={uniqueErrors().at(0)}>\n <ul class='ml-4 gap-1 flex list-disc flex-col'>\n <For each={uniqueErrors()}>{(error) => <li>{error}</li>}</For>\n </ul>\n </Show>\n </Show>\n }\n >\n {local.children}\n </Show>\n </PrimitiveField.ErrorText>\n </div>\n );\n};\n"],"names":["FieldContext","PrimitiveField","Context","FieldSet","props","local","others","splitProps","_$createComponent","PrimitiveFieldset","Root","_$mergeProps","cn","class","children","FieldLegend","Legend","variant","FieldGroup","_el$","_tmpl$","_$spread","fieldVariants","tv","base","variants","orientation","vertical","horizontal","responsive","defaultVariants","Field","role","FieldContent","_el$2","_tmpl$2","FieldInput","Input","FieldTextarea","Textarea","FieldSelect","Select","FieldRequiredIndicator","RequiredIndicator","fallback","FieldLabel","Label","FieldTitle","_el$3","_tmpl$3","_$insert","FieldDescription","HelperText","FieldSeparator","_el$4","_tmpl$5","Boolean","Separator","Show","when","_el$5","_tmpl$4","FieldError","uniqueErrors","createMemo","errors","length","messages","error","push","message","Set","_el$6","_tmpl$6","ErrorText","at","_el$7","_tmpl$7","For","each","_el$8","_tmpl$8"],"mappings":";;;;;;;;AAgBO,MAAMA,IAAeC,EAAeC,SAE9BC,IAAoDC,CAAAA,MAAU;AACzE,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,SAAS,UAAU,CAAC;AAC/D,SAAAI,EACGC,EAAkBC,MAAIC,EAAA;AAAA,IAAA,aAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aAEdC,EACL,8FACAP,EAAMQ,KACR;AAAA,IAAC;AAAA,EAAA,GACGP,GAAM;AAAA,IAAA,IAAAQ,WAAA;AAAA,aAETT,EAAMS;AAAAA,IAAQ;AAAA,EAAA,CAAA,CAAA;AAGrB,GAMaC,IAA4CX,CAAAA,MAAU;AACjE,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,SAAS,WAAW,UAAU,CAAC;AAC1E,SAAAI,EACGC,EAAkBO,QAAML,EAAA;AAAA,IAAA,aAAA;AAAA,IAAA,IAAA,iBAAA;AAAA,aAETN,EAAMY,WAAW;AAAA,IAAQ;AAAA,IAAA,IAAA,QAAA;AAAA,aAChCL,EACL,mFACAP,EAAMQ,KACR;AAAA,IAAC;AAAA,EAAA,GACGP,GAAM;AA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kBAAA;AAAA,gBAAA,CAAA;AAAA,cAAA;AAAA,YAAA,CAAA;AAAA,UAAA;AAAA,UAAA,IAAA9D,WAAA;AAAA,mBAM9DT,EAAMS;AAAAA,UAAQ;AAAA,QAAA,CAAA;AAAA,MAAA;AAAA,IAAA,CAAA,CAAA,CAAA,GAAA0D;AAAAA,EAAA,GAAA;AAKzB;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { delegateEvents as g,
|
|
1
|
+
import { delegateEvents as g, spread as o, mergeProps as s, createComponent as b, template as l } from "solid-js/web";
|
|
2
2
|
import { splitProps as n } from "solid-js";
|
|
3
3
|
import { tv as c, cn as d } from "../node_modules/.bun/tailwind-variants@3.2.2_7ac958b541464b98/node_modules/tailwind-variants/dist/index.js";
|
|
4
4
|
import { Button as f } from "./Button.js";
|
|
5
|
-
var m = /* @__PURE__ */
|
|
5
|
+
var m = /* @__PURE__ */ l("<div data-slot=input-group role=group>"), h = /* @__PURE__ */ l("<div role=group data-slot=input-group-addon>"), x = /* @__PURE__ */ l("<span>"), v = /* @__PURE__ */ l("<input data-slot=input-group-control>"), k = /* @__PURE__ */ l("<textarea data-slot=input-group-control>");
|
|
6
6
|
const I = (e) => {
|
|
7
7
|
const [t, r] = n(e, ["class"]);
|
|
8
8
|
return (() => {
|
|
9
9
|
var a = m();
|
|
10
|
-
return
|
|
10
|
+
return o(a, s({
|
|
11
11
|
get class() {
|
|
12
12
|
return d("group/input-group min-w-0 h-8 relative flex w-full items-center rounded-lg border border-input transition-colors outline-none dark:bg-input/30", "has-focus-visible:border-ring has-focus-visible:ring-[3px] has-focus-visible:ring-ring/50", "has-data-[invalid=true]:border-destructive has-data-[invalid=true]:ring-[3px] has-data-[invalid=true]:ring-destructive/20 dark:has-data-[invalid=true]:ring-destructive/40", "has-disabled:bg-input/50 has-disabled:opacity-50 dark:has-disabled:bg-input/80", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col", "has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=inline-end]]:[&>input]:pr-1.5", "has-[>[data-align=inline-start]]:[&>input]:pl-1.5", "has-[>textarea]:h-auto", t.class);
|
|
13
13
|
}
|
|
@@ -39,7 +39,7 @@ const I = (e) => {
|
|
|
39
39
|
p && p.focus();
|
|
40
40
|
}
|
|
41
41
|
typeof t.onClick == "function" && t.onClick(i);
|
|
42
|
-
},
|
|
42
|
+
}, o(a, s({
|
|
43
43
|
get "data-align"() {
|
|
44
44
|
return t.align ?? "inline-start";
|
|
45
45
|
},
|
|
@@ -84,7 +84,7 @@ const I = (e) => {
|
|
|
84
84
|
const [t, r] = n(e, ["class"]);
|
|
85
85
|
return (() => {
|
|
86
86
|
var a = x();
|
|
87
|
-
return
|
|
87
|
+
return o(a, s({
|
|
88
88
|
get class() {
|
|
89
89
|
return d('gap-2 text-sm [&_svg:not([class*="size-"])]:size-4 flex items-center text-muted-foreground [&_svg]:pointer-events-none', t.class);
|
|
90
90
|
}
|
|
@@ -94,7 +94,7 @@ const I = (e) => {
|
|
|
94
94
|
const [t, r] = n(e, ["class"]);
|
|
95
95
|
return (() => {
|
|
96
96
|
var a = v();
|
|
97
|
-
return
|
|
97
|
+
return o(a, s({
|
|
98
98
|
get class() {
|
|
99
99
|
return d("min-w-0 text-base md:text-sm flex w-full bg-transparent transition-colors outline-none placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 data-[readonly=true]:cursor-default", "flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", t.class);
|
|
100
100
|
}
|
|
@@ -104,7 +104,7 @@ const I = (e) => {
|
|
|
104
104
|
const [t, r] = n(e, ["class"]);
|
|
105
105
|
return (() => {
|
|
106
106
|
var a = k();
|
|
107
|
-
return
|
|
107
|
+
return o(a, s({
|
|
108
108
|
get class() {
|
|
109
109
|
return d("min-h-16 text-base md:text-sm flex field-sizing-content w-full bg-transparent transition-colors outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 data-[readonly=true]:cursor-default", "py-2 flex-1 resize-none rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", t.class);
|
|
110
110
|
}
|