@datum-cloud/datum-ui 0.6.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/action-row-DnhBhMtt.mjs +22 -0
- package/dist/app-navigation/index.mjs +2 -2
- package/dist/{app-navigation-84ro28PU.mjs → app-navigation-rSOfo1KV.mjs} +169 -106
- package/dist/autocomplete/index.mjs +1 -1
- package/dist/autocomplete-DdbTQe6u.mjs +141 -0
- package/dist/autosearch/index.mjs +100 -92
- package/dist/avatar-stack/index.mjs +1 -1
- package/dist/{avatar-stack-oVr8tsU7.mjs → avatar-stack-CDhlA1Nm.mjs} +1 -1
- package/dist/calendar/index.mjs +1 -1
- package/dist/{calendar-DEkCw7I1.mjs → calendar-C-Hbf74r.mjs} +4 -4
- package/dist/{calendar-date-picker-CDT-8Ha8.mjs → calendar-date-picker-BaykEs6j.mjs} +324 -240
- package/dist/code-editor/index.mjs +1 -1
- package/dist/components/base/date-picker/index.d.ts +4 -0
- package/dist/components/base/date-picker/index.d.ts.map +1 -0
- package/dist/components/base/date-picker/types.d.ts +7 -0
- package/dist/components/base/date-picker/types.d.ts.map +1 -0
- package/dist/components/base/date-picker/use-date-constraints.d.ts +8 -0
- package/dist/components/base/date-picker/use-date-constraints.d.ts.map +1 -0
- package/dist/components/base/index.d.ts +3 -0
- package/dist/components/base/index.d.ts.map +1 -1
- package/dist/components/base/mobile-sheet/context.d.ts +13 -0
- package/dist/components/base/mobile-sheet/context.d.ts.map +1 -0
- package/dist/components/base/mobile-sheet/index.d.ts +3 -0
- package/dist/components/base/mobile-sheet/index.d.ts.map +1 -0
- package/dist/components/base/mobile-sheet/mobile-sheet.d.ts +14 -0
- package/dist/components/base/mobile-sheet/mobile-sheet.d.ts.map +1 -0
- package/dist/components/base/option-picker/index.d.ts +5 -0
- package/dist/components/base/option-picker/index.d.ts.map +1 -0
- package/dist/components/base/option-picker/option-list.d.ts +3 -0
- package/dist/components/base/option-picker/option-list.d.ts.map +1 -0
- package/dist/components/base/option-picker/types.d.ts +71 -0
- package/dist/components/base/option-picker/types.d.ts.map +1 -0
- package/dist/components/base/option-picker/use-option-picker.d.ts +4 -0
- package/dist/components/base/option-picker/use-option-picker.d.ts.map +1 -0
- package/dist/components/base/responsive-dropdown/index.d.ts +2 -0
- package/dist/components/base/responsive-dropdown/index.d.ts.map +1 -0
- package/dist/components/base/responsive-dropdown/responsive-dropdown.d.ts +25 -0
- package/dist/components/base/responsive-dropdown/responsive-dropdown.d.ts.map +1 -0
- package/dist/components/base/responsive-popover/index.d.ts +2 -0
- package/dist/components/base/responsive-popover/index.d.ts.map +1 -0
- package/dist/components/base/responsive-popover/responsive-popover.d.ts +46 -0
- package/dist/components/base/responsive-popover/responsive-popover.d.ts.map +1 -0
- package/dist/components/base/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/features/app-navigation/app-navigation.d.ts +5 -3
- package/dist/components/features/app-navigation/app-navigation.d.ts.map +1 -1
- package/dist/components/features/autocomplete/autocomplete.d.ts +2 -2
- package/dist/components/features/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/features/autocomplete/autocomplete.types.d.ts +7 -16
- package/dist/components/features/autocomplete/autocomplete.types.d.ts.map +1 -1
- package/dist/components/features/autocomplete/trigger.d.ts +20 -0
- package/dist/components/features/autocomplete/trigger.d.ts.map +1 -0
- package/dist/components/features/autosearch/autosearch.d.ts +1 -1
- package/dist/components/features/autosearch/autosearch.d.ts.map +1 -1
- package/dist/components/features/autosearch/autosearch.types.d.ts +4 -0
- package/dist/components/features/autosearch/autosearch.types.d.ts.map +1 -1
- package/dist/components/features/calendar-date-picker/calendar-date-picker.d.ts +3 -37
- package/dist/components/features/calendar-date-picker/calendar-date-picker.d.ts.map +1 -1
- package/dist/components/features/calendar-date-picker/calendar-header.d.ts +13 -0
- package/dist/components/features/calendar-date-picker/calendar-header.d.ts.map +1 -0
- package/dist/components/features/calendar-date-picker/calendar-presets.d.ts +9 -0
- package/dist/components/features/calendar-date-picker/calendar-presets.d.ts.map +1 -0
- package/dist/components/features/calendar-date-picker/date-trigger.d.ts +24 -0
- package/dist/components/features/calendar-date-picker/date-trigger.d.ts.map +1 -0
- package/dist/components/features/calendar-date-picker/index.d.ts +2 -1
- package/dist/components/features/calendar-date-picker/index.d.ts.map +1 -1
- package/dist/components/features/calendar-date-picker/types.d.ts +42 -0
- package/dist/components/features/calendar-date-picker/types.d.ts.map +1 -0
- package/dist/components/features/calendar-date-picker/use-calendar-date-picker.d.ts +48 -0
- package/dist/components/features/calendar-date-picker/use-calendar-date-picker.d.ts.map +1 -0
- package/dist/components/features/data-table/components/row-actions.d.ts +1 -1
- package/dist/components/features/data-table/components/row-actions.d.ts.map +1 -1
- package/dist/components/features/data-table/filters/checkbox-filter.d.ts +1 -1
- package/dist/components/features/data-table/filters/checkbox-filter.d.ts.map +1 -1
- package/dist/components/features/data-table/filters/select-filter.d.ts +1 -1
- package/dist/components/features/data-table/filters/select-filter.d.ts.map +1 -1
- package/dist/components/features/data-table/types.d.ts +11 -12
- package/dist/components/features/data-table/types.d.ts.map +1 -1
- package/dist/components/features/date-time-picker/date-time-picker.d.ts +1 -1
- package/dist/components/features/date-time-picker/date-time-picker.d.ts.map +1 -1
- package/dist/components/features/date-time-picker/types.d.ts +23 -0
- package/dist/components/features/date-time-picker/types.d.ts.map +1 -1
- package/dist/components/features/form/components/form-combobox.d.ts +7 -44
- package/dist/components/features/form/components/form-combobox.d.ts.map +1 -1
- package/dist/components/features/form/components/form-dialog.d.ts +2 -1
- package/dist/components/features/form/components/form-dialog.d.ts.map +1 -1
- package/dist/components/features/form/components/form-field.d.ts +1 -1
- package/dist/components/features/form/components/form-field.d.ts.map +1 -1
- package/dist/components/features/form/types/index.d.ts +4 -0
- package/dist/components/features/form/types/index.d.ts.map +1 -1
- package/dist/components/features/index.d.ts +2 -0
- package/dist/components/features/index.d.ts.map +1 -1
- package/dist/components/features/more-actions/action-row.d.ts +9 -0
- package/dist/components/features/more-actions/action-row.d.ts.map +1 -0
- package/dist/components/features/more-actions/index.d.ts +3 -1
- package/dist/components/features/more-actions/index.d.ts.map +1 -1
- package/dist/components/features/more-actions/more-actions.d.ts +8 -14
- package/dist/components/features/more-actions/more-actions.d.ts.map +1 -1
- package/dist/components/features/more-actions/types.d.ts +24 -0
- package/dist/components/features/more-actions/types.d.ts.map +1 -0
- package/dist/components/features/multi-select/index.d.ts +3 -0
- package/dist/components/features/multi-select/index.d.ts.map +1 -0
- package/dist/components/features/multi-select/multi-select.d.ts +147 -0
- package/dist/components/features/multi-select/multi-select.d.ts.map +1 -0
- package/dist/components/features/page-title/page-title.d.ts.map +1 -1
- package/dist/components/features/rich-text-editor/index.d.ts +4 -0
- package/dist/components/features/rich-text-editor/index.d.ts.map +1 -0
- package/dist/components/features/rich-text-editor/rich-text-content.d.ts +3 -0
- package/dist/components/features/rich-text-editor/rich-text-content.d.ts.map +1 -0
- package/dist/components/features/rich-text-editor/rich-text-editor.d.ts +28 -0
- package/dist/components/features/rich-text-editor/rich-text-editor.d.ts.map +1 -0
- package/dist/components/features/rich-text-editor/toolbar/bold-toolbar.d.ts +2 -0
- package/dist/components/features/rich-text-editor/toolbar/bold-toolbar.d.ts.map +1 -0
- package/dist/components/features/rich-text-editor/toolbar/italic-toolbar.d.ts +2 -0
- package/dist/components/features/rich-text-editor/toolbar/italic-toolbar.d.ts.map +1 -0
- package/dist/components/features/rich-text-editor/toolbar/link-toolbar.d.ts +2 -0
- package/dist/components/features/rich-text-editor/toolbar/link-toolbar.d.ts.map +1 -0
- package/dist/components/features/rich-text-editor/toolbar/strike-toolbar.d.ts +2 -0
- package/dist/components/features/rich-text-editor/toolbar/strike-toolbar.d.ts.map +1 -0
- package/dist/components/features/rich-text-editor/toolbar/toolbar-button.d.ts +17 -0
- package/dist/components/features/rich-text-editor/toolbar/toolbar-button.d.ts.map +1 -0
- package/dist/components/features/rich-text-editor/toolbar/toolbar.d.ts +6 -0
- package/dist/components/features/rich-text-editor/toolbar/toolbar.d.ts.map +1 -0
- package/dist/components/features/rich-text-editor/toolbar/underline-toolbar.d.ts +2 -0
- package/dist/components/features/rich-text-editor/toolbar/underline-toolbar.d.ts.map +1 -0
- package/dist/components/features/rich-text-editor/types.d.ts +20 -0
- package/dist/components/features/rich-text-editor/types.d.ts.map +1 -0
- package/dist/components/features/tag-input/tag-input.d.ts +12 -1
- package/dist/components/features/tag-input/tag-input.d.ts.map +1 -1
- package/dist/components/features/task-queue/core/task-queue-dropdown.d.ts.map +1 -1
- package/dist/components/features/time-picker/time-picker.d.ts +1 -17
- package/dist/components/features/time-picker/time-picker.d.ts.map +1 -1
- package/dist/components/features/time-picker/types.d.ts +20 -18
- package/dist/components/features/time-picker/types.d.ts.map +1 -1
- package/dist/components/features/time-picker/use-time-slots.d.ts +10 -0
- package/dist/components/features/time-picker/use-time-slots.d.ts.map +1 -0
- package/dist/components/features/time-range-picker/components/absolute-range-panel.d.ts.map +1 -1
- package/dist/components/features/time-range-picker/time-range-picker.d.ts.map +1 -1
- package/dist/data-table/index.mjs +60 -175
- package/dist/date-picker/index.mjs +2 -2
- package/dist/date-time-picker/index.mjs +1 -1
- package/dist/{date-time-picker-BomrW07W.mjs → date-time-picker-DKOxrhmc.mjs} +64 -49
- package/dist/dropdown/index.mjs +109 -1
- package/dist/dropzone/index.mjs +1 -1
- package/dist/empty-content/index.mjs +1 -1
- package/dist/form/adapters/conform/index.mjs +2 -2
- package/dist/form/adapters/rhf/index.mjs +2 -2
- package/dist/form/index.mjs +2 -2
- package/dist/form/stepper/index.mjs +3 -3
- package/dist/{form-B3rQ4CH9.mjs → form-CCNN9VtJ.mjs} +27 -30
- package/dist/grid/index.mjs +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.mjs +4 -3
- package/dist/hooks/use-breakpoint.d.ts +9 -0
- package/dist/hooks/use-breakpoint.d.ts.map +1 -0
- package/dist/index.mjs +49 -42
- package/dist/input-number/index.mjs +1 -1
- package/dist/loader-overlay/index.mjs +1 -1
- package/dist/map/index.mjs +1 -1
- package/dist/{map-CWIQ-eql.mjs → map-qo7bY_g_.mjs} +83 -4
- package/dist/mobile-sheet/index.mjs +2 -0
- package/dist/mobile-sheet-BxMvkzAj.mjs +61 -0
- package/dist/more-actions/index.mjs +3 -2
- package/dist/more-actions-Ca5qqd0H.mjs +49 -0
- package/dist/multi-select/index.mjs +2 -0
- package/dist/multi-select-DM_dxnSV.mjs +235 -0
- package/dist/page-title/index.mjs +1 -1
- package/dist/{page-title-ChsnpBiH.mjs → page-title-ChLiv6gB.mjs} +3 -2
- package/dist/popover/index.mjs +1 -1
- package/dist/radio-group/index.mjs +1 -1
- package/dist/responsive-dropdown/index.mjs +2 -0
- package/dist/responsive-dropdown-IFroDgKn.mjs +53 -0
- package/dist/responsive-popover/index.mjs +2 -0
- package/dist/responsive-popover-D-t9bxSN.mjs +61 -0
- package/dist/rich-text-editor/index.mjs +2 -0
- package/dist/rich-text-editor-CQH_U4T5.mjs +293 -0
- package/dist/select/index.mjs +1 -1
- package/dist/sheet/index.mjs +2 -2
- package/dist/{sheet-BzXksqYY.mjs → sheet-LhUgozvg.mjs} +1 -1
- package/dist/sidebar/index.mjs +1 -1
- package/dist/{sidebar-BnhnjvfO.mjs → sidebar-B8LQJiNI.mjs} +3 -3
- package/dist/skeleton/index.mjs +1 -1
- package/dist/{skeleton-D1MUhAVo.mjs → skeleton-D4HOEiOZ.mjs} +1 -1
- package/dist/spinner/index.mjs +1 -1
- package/dist/stepper/index.mjs +1 -1
- package/dist/styles/canela.css +23 -0
- package/dist/styles/fonts/CanelaText-Regular.ttf +0 -0
- package/dist/styles/tokens/figma-tokens.css +4 -0
- package/dist/switch/index.mjs +1 -1
- package/dist/table/index.mjs +1 -1
- package/dist/tag-input/index.mjs +1 -1
- package/dist/{tag-input-T9cUX9-G.mjs → tag-input-Bf4GMptp.mjs} +29 -14
- package/dist/task-queue/index.mjs +1 -1
- package/dist/{task-queue-dropdown-Wcbj-f0V.mjs → task-queue-dropdown-D-LncEWm.mjs} +39 -39
- package/dist/textarea/index.mjs +1 -1
- package/dist/theme/index.mjs +1 -1
- package/dist/time-picker/index.mjs +1 -1
- package/dist/time-picker-BZF5jbF6.mjs +99 -0
- package/dist/{to-api-format-Bh3c01gr.mjs → to-api-format-CgKcC9SK.mjs} +144 -119
- package/dist/toast/index.mjs +2 -2
- package/dist/{toast-DpxlFNNx.mjs → toast-DDdLgY53.mjs} +1 -1
- package/dist/tooltip/index.mjs +1 -1
- package/dist/{tooltip-Cruvl5F6.mjs → tooltip-a7NTDCWw.mjs} +74 -17
- package/dist/transfer/index.mjs +1 -1
- package/dist/{types-BZNk3q65.mjs → types-CKIe2WlV.mjs} +2 -2
- package/dist/typography/index.mjs +1 -1
- package/dist/use-breakpoint-DGcVmB3c.mjs +36 -0
- package/dist/{use-copy-to-clipboard-uNeeVHC4.mjs → use-copy-to-clipboard-D7KyLIAt.mjs} +1 -1
- package/dist/use-date-constraints-R3H4lIoT.mjs +41 -0
- package/dist/use-option-picker-BXQOfyrK.mjs +215 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.mjs +2 -1
- package/dist/utils/timezone.d.ts +19 -0
- package/dist/utils/timezone.d.ts.map +1 -0
- package/dist/utils-BwB1mIdZ.mjs +35 -0
- package/dist/visually-hidden/index.mjs +1 -1
- package/package.json +61 -6
- package/dist/autocomplete-CkYJueBL.mjs +0 -293
- package/dist/combobox/index.mjs +0 -2
- package/dist/combobox-B-C9lJeD.mjs +0 -97
- package/dist/components/features/combobox/combobox.d.ts +0 -27
- package/dist/components/features/combobox/combobox.d.ts.map +0 -1
- package/dist/components/features/combobox/index.d.ts +0 -3
- package/dist/components/features/combobox/index.d.ts.map +0 -1
- package/dist/components/features/combobox/types.d.ts +0 -84
- package/dist/components/features/combobox/types.d.ts.map +0 -1
- package/dist/dropdown-DZiAt-jS.mjs +0 -110
- package/dist/dropdown-menu-lALvDnab.mjs +0 -85
- package/dist/more-actions-ILnEZq_E.mjs +0 -52
- package/dist/time-picker-BoF7pZZ2.mjs +0 -43
- /package/dist/{adapter-context-rWveHhDd.mjs → adapter-context-NyGTDZYq.mjs} +0 -0
- /package/dist/{col-1T0Q3SlH.mjs → col-DISdGlqY.mjs} +0 -0
- /package/dist/{dropzone-ogtpQ4fy.mjs → dropzone-Bt0plEuw.mjs} +0 -0
- /package/dist/{empty-content-C63GPJ5d.mjs → empty-content-CBh5bbtJ.mjs} +0 -0
- /package/dist/{form-context-Ccxm-wqL.mjs → form-context-CeKyvO-A.mjs} +0 -0
- /package/dist/{hooks-D8r2M2U6.mjs → hooks-DQXVwbrs.mjs} +0 -0
- /package/dist/{input-number-a7uydAsw.mjs → input-number-Diu-C6d5.mjs} +0 -0
- /package/dist/{loader-overlay-BTFdkp7W.mjs → loader-overlay-C2WDla6V.mjs} +0 -0
- /package/dist/{map-leaflet-imports-CRSKA79m.mjs → map-leaflet-imports-yWwH4CHB.mjs} +0 -0
- /package/dist/{popover-FJAcbYoH.mjs → popover-JOuXJOZ2.mjs} +0 -0
- /package/dist/{radio-group-CiITR0LO.mjs → radio-group-70UjJBb5.mjs} +0 -0
- /package/dist/{select-CiLR_DiQ.mjs → select-zxwykvQn.mjs} +0 -0
- /package/dist/{sheet-Di3b-oPu.mjs → sheet-DVEToCVY.mjs} +0 -0
- /package/dist/{skeleton-BKl4mfJt.mjs → skeleton-D2xuJdE1.mjs} +0 -0
- /package/dist/{spinner-OyOf9-Yu.mjs → spinner-CgPI3DDi.mjs} +0 -0
- /package/dist/{stepper-DvIOp0hh.mjs → stepper-Beb-zbdL.mjs} +0 -0
- /package/dist/{switch-DQJQhPIQ.mjs → switch-DcSF42Kc.mjs} +0 -0
- /package/dist/{table-Cdsh-39-.mjs → table-DWGT4cqh.mjs} +0 -0
- /package/dist/{textarea-BwD-MmTV.mjs → textarea-BoChBcFz.mjs} +0 -0
- /package/dist/{themes-DG1md8FI.mjs → themes-CAiN4b6G.mjs} +0 -0
- /package/dist/{toast-BWnN5fax.mjs → toast-D5XD7goD.mjs} +0 -0
- /package/dist/{transfer-46C-rFFW.mjs → transfer-CoGPwOc6.mjs} +0 -0
- /package/dist/{typography-ClB8k55E.mjs → typography-TRKP_CLT.mjs} +0 -0
- /package/dist/{use-display-touched-I39aXEBD.mjs → use-display-touched-C-afz17j.mjs} +0 -0
- /package/dist/{visuallyhidden-BLUsJpYH.mjs → visuallyhidden-BHOPczmW.mjs} +0 -0
|
@@ -5,23 +5,22 @@ import { t as Checkbox } from "./checkbox-I5BvrMPe.mjs";
|
|
|
5
5
|
import { t as Dialog } from "./dialog-Bm2H9lrx.mjs";
|
|
6
6
|
import { t as Input } from "./input-FKGqZypx.mjs";
|
|
7
7
|
import { t as Label } from "./label-cnAhY-ej.mjs";
|
|
8
|
-
import { n as RadioGroupItem, t as RadioGroup } from "./radio-group-
|
|
9
|
-
import { i as SelectItem, l as SelectTrigger, n as SelectContent, t as Select, u as SelectValue } from "./select-
|
|
10
|
-
import { t as Tooltip } from "./tooltip-
|
|
11
|
-
import { t as Switch } from "./switch-
|
|
12
|
-
import { t as Textarea } from "./textarea-
|
|
13
|
-
import { t as Autocomplete } from "./autocomplete-
|
|
14
|
-
import { t as CalendarDatePicker } from "./calendar-date-picker-
|
|
15
|
-
import { t as toast } from "./toast-
|
|
8
|
+
import { n as RadioGroupItem, t as RadioGroup } from "./radio-group-70UjJBb5.mjs";
|
|
9
|
+
import { i as SelectItem, l as SelectTrigger, n as SelectContent, t as Select, u as SelectValue } from "./select-zxwykvQn.mjs";
|
|
10
|
+
import { t as Tooltip } from "./tooltip-a7NTDCWw.mjs";
|
|
11
|
+
import { t as Switch } from "./switch-DcSF42Kc.mjs";
|
|
12
|
+
import { t as Textarea } from "./textarea-BoChBcFz.mjs";
|
|
13
|
+
import { t as Autocomplete } from "./autocomplete-DdbTQe6u.mjs";
|
|
14
|
+
import { t as CalendarDatePicker } from "./calendar-date-picker-BaykEs6j.mjs";
|
|
15
|
+
import { t as toast } from "./toast-D5XD7goD.mjs";
|
|
16
16
|
import { Autosearch } from "./autosearch/index.mjs";
|
|
17
|
-
import { n as useFormContext$1, t as FormProvider } from "./form-context-
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import {
|
|
21
|
-
import { n as useAdapter } from "./adapter-context-rWveHhDd.mjs";
|
|
17
|
+
import { n as useFormContext$1, t as FormProvider } from "./form-context-CeKyvO-A.mjs";
|
|
18
|
+
import { t as useCopyToClipboard } from "./use-copy-to-clipboard-D7KyLIAt.mjs";
|
|
19
|
+
import { t as DateTimePicker } from "./date-time-picker-DKOxrhmc.mjs";
|
|
20
|
+
import { n as useAdapter } from "./adapter-context-NyGTDZYq.mjs";
|
|
22
21
|
import { InputWithAddons } from "./input-with-addons/index.mjs";
|
|
23
|
-
import { t as TimePicker } from "./time-picker-
|
|
24
|
-
import { t as Transfer } from "./transfer-
|
|
22
|
+
import { t as TimePicker } from "./time-picker-BZF5jbF6.mjs";
|
|
23
|
+
import { t as Transfer } from "./transfer-CoGPwOc6.mjs";
|
|
25
24
|
import { CheckIcon, CircleHelp, CopyIcon } from "lucide-react";
|
|
26
25
|
import * as React$1 from "react";
|
|
27
26
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -232,7 +231,7 @@ function FormCheckbox({ label, disabled, className }) {
|
|
|
232
231
|
FormCheckbox.displayName = "Form.Checkbox";
|
|
233
232
|
//#endregion
|
|
234
233
|
//#region src/components/features/form/components/form-combobox.tsx
|
|
235
|
-
function FormCombobox({ options, placeholder, searchPlaceholder, emptyMessage, disabled, className, triggerClassName, contentClassName, searchable = true,
|
|
234
|
+
function FormCombobox({ options, placeholder, searchPlaceholder, emptyMessage, disabled, className, triggerClassName, contentClassName, searchable = true, "data-testid": _testId, modal }) {
|
|
236
235
|
const { id, errors, disabled: fieldDisabled, fieldState } = useFieldContext$1();
|
|
237
236
|
const isDisabled = disabled ?? fieldDisabled;
|
|
238
237
|
const hasErrors = errors && errors.length > 0;
|
|
@@ -240,23 +239,20 @@ function FormCombobox({ options, placeholder, searchPlaceholder, emptyMessage, d
|
|
|
240
239
|
fieldState?.change(value ?? "");
|
|
241
240
|
fieldState?.blur();
|
|
242
241
|
}, [fieldState]);
|
|
243
|
-
return /* @__PURE__ */ jsx(
|
|
242
|
+
return /* @__PURE__ */ jsx(Autocomplete, {
|
|
244
243
|
id,
|
|
245
244
|
options,
|
|
246
245
|
value: fieldState?.value ?? "",
|
|
247
|
-
|
|
246
|
+
onValueChange: handleChange,
|
|
248
247
|
placeholder,
|
|
249
248
|
searchPlaceholder,
|
|
250
|
-
emptyMessage,
|
|
249
|
+
emptyContent: emptyMessage,
|
|
251
250
|
disabled: isDisabled,
|
|
252
|
-
searchable,
|
|
253
|
-
showDropdownArrow,
|
|
254
|
-
clearable,
|
|
251
|
+
disableSearch: !searchable,
|
|
255
252
|
modal,
|
|
256
253
|
className,
|
|
257
254
|
triggerClassName: cn(hasErrors && "border-destructive", triggerClassName),
|
|
258
|
-
contentClassName
|
|
259
|
-
"data-testid": testId
|
|
255
|
+
contentClassName
|
|
260
256
|
});
|
|
261
257
|
}
|
|
262
258
|
FormCombobox.displayName = "Form.Combobox";
|
|
@@ -497,6 +493,7 @@ FormDescription.displayName = "Form.Description";
|
|
|
497
493
|
* - Built-in header with title and description
|
|
498
494
|
* - Built-in footer with submit and cancel buttons
|
|
499
495
|
* - Auto-close on successful submission
|
|
496
|
+
* - Optional header close (X) via showHeaderClose
|
|
500
497
|
* - Prevents accidental close during submission
|
|
501
498
|
* - Supports render function pattern for form state access
|
|
502
499
|
*
|
|
@@ -540,7 +537,7 @@ FormDescription.displayName = "Form.Description";
|
|
|
540
537
|
* </Form.Dialog>
|
|
541
538
|
* ```
|
|
542
539
|
*/
|
|
543
|
-
function FormDialog({ open, onOpenChange, defaultOpen, title, description, trigger, schema, defaultValues, onSubmit, onSuccess, onError, submitText = "Submit", submitTextLoading = "Submitting...", cancelText = "Cancel", showCancel = true, submitType = "primary", loading, formComponent, telemetry, className, formClassName, children }) {
|
|
540
|
+
function FormDialog({ open, onOpenChange, defaultOpen, title, description, trigger, schema, defaultValues, onSubmit, onSuccess, onError, submitText = "Submit", submitTextLoading = "Submitting...", cancelText = "Cancel", showCancel = true, submitType = "primary", loading, formComponent, telemetry, className, formClassName, showHeaderClose = true, children }) {
|
|
544
541
|
const [internalOpen, setInternalOpen] = React$1.useState(defaultOpen ?? false);
|
|
545
542
|
const [internalIsSubmitting, setInternalIsSubmitting] = React$1.useState(false);
|
|
546
543
|
const isSubmitting = loading ?? internalIsSubmitting;
|
|
@@ -590,7 +587,7 @@ function FormDialog({ open, onOpenChange, defaultOpen, title, description, trigg
|
|
|
590
587
|
/* @__PURE__ */ jsx(Dialog.Header, {
|
|
591
588
|
title,
|
|
592
589
|
description,
|
|
593
|
-
onClose: handleCancel,
|
|
590
|
+
onClose: showHeaderClose ? handleCancel : void 0,
|
|
594
591
|
className: "border-b",
|
|
595
592
|
descriptionClassName: "text-foreground/80"
|
|
596
593
|
}),
|
|
@@ -662,7 +659,7 @@ FormError.displayName = "Form.Error";
|
|
|
662
659
|
function FieldLabel({ htmlFor, label, hasErrors, required, tooltip, className }) {
|
|
663
660
|
const [isTooltipVisible, setIsTooltipVisible] = React$1.useState(false);
|
|
664
661
|
return /* @__PURE__ */ jsxs("div", {
|
|
665
|
-
className: "relative flex w-fit items-
|
|
662
|
+
className: "relative flex w-fit items-start space-x-2",
|
|
666
663
|
children: [/* @__PURE__ */ jsxs(Label, {
|
|
667
664
|
htmlFor,
|
|
668
665
|
className: cn("text-foreground/80 gap-0 text-xs font-semibold", hasErrors && "text-destructive", className),
|
|
@@ -676,7 +673,7 @@ function FieldLabel({ htmlFor, label, hasErrors, required, tooltip, className })
|
|
|
676
673
|
open: isTooltipVisible,
|
|
677
674
|
onOpenChange: setIsTooltipVisible,
|
|
678
675
|
side: "bottom",
|
|
679
|
-
contentClassName: "max-w-xs
|
|
676
|
+
contentClassName: "w-[calc(100vw-2rem)] whitespace-normal break-words sm:w-auto sm:max-w-xs",
|
|
680
677
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
681
678
|
icon: CircleHelp,
|
|
682
679
|
className: cn("text-ring absolute top-0.5 -right-3 size-3.5 cursor-pointer transition-opacity duration-400")
|
|
@@ -704,7 +701,7 @@ function FieldLabel({ htmlFor, label, hasErrors, required, tooltip, className })
|
|
|
704
701
|
* </Form.Field>
|
|
705
702
|
* ```
|
|
706
703
|
*/
|
|
707
|
-
function FormField({ name, children, label, description, tooltip, required = false, disabled = false, className, labelClassName }) {
|
|
704
|
+
function FormField({ name, children, label, description, tooltip, required = false, disabled = false, showErrors = true, className, labelClassName }) {
|
|
708
705
|
const adapter = useAdapter();
|
|
709
706
|
const { fields, isSubmitting, form, mode, displayTouchedFields, markFieldTouched } = useFormContext$1();
|
|
710
707
|
const fieldState = adapter.useField(name);
|
|
@@ -797,7 +794,7 @@ function FormField({ name, children, label, description, tooltip, required = fal
|
|
|
797
794
|
className: "text-ring text-xs text-wrap",
|
|
798
795
|
children: description
|
|
799
796
|
}),
|
|
800
|
-
hasErrors && /* @__PURE__ */ jsx("ul", {
|
|
797
|
+
showErrors && hasErrors && /* @__PURE__ */ jsx("ul", {
|
|
801
798
|
id: errorId,
|
|
802
799
|
className: cn("text-destructive space-y-1 text-xs font-medium", errors.length > 1 && "list-disc pl-4"),
|
|
803
800
|
role: "alert",
|
package/dist/grid/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as getResponsiveValue, c as GRID_COLUMNS, d as RESPONSIVE_MAP, i as getGutter, l as GRID_PREFIX, n as Row, o as registerMediaQuery, r as RowContext, s as GRID_BREAKPOINTS, t as Col, u as RESPONSIVE_ARRAY } from "../col-
|
|
1
|
+
import { a as getResponsiveValue, c as GRID_COLUMNS, d as RESPONSIVE_MAP, i as getGutter, l as GRID_PREFIX, n as Row, o as registerMediaQuery, r as RowContext, s as GRID_BREAKPOINTS, t as Col, u as RESPONSIVE_ARRAY } from "../col-DISdGlqY.mjs";
|
|
2
2
|
export { Col, GRID_BREAKPOINTS, GRID_COLUMNS, GRID_PREFIX, RESPONSIVE_ARRAY, RESPONSIVE_MAP, Row, RowContext, getGutter, getResponsiveValue, registerMediaQuery };
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { t as
|
|
3
|
-
|
|
1
|
+
import { t as useBreakpoint } from "../use-breakpoint-DGcVmB3c.mjs";
|
|
2
|
+
import { t as useCopyToClipboard } from "../use-copy-to-clipboard-D7KyLIAt.mjs";
|
|
3
|
+
import { t as useDebounce } from "../hooks-DQXVwbrs.mjs";
|
|
4
|
+
export { useBreakpoint, useCopyToClipboard, useDebounce };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type BreakpointTier = 'mobile' | 'tablet' | 'desktop';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the current viewport breakpoint tier.
|
|
4
|
+
*
|
|
5
|
+
* Breakpoints: mobile <768px, tablet 768–1023px, desktop ≥1024px.
|
|
6
|
+
* SSR-safe: defaults to 'desktop' on server; client corrects on mount.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useBreakpoint(): BreakpointTier;
|
|
9
|
+
//# sourceMappingURL=use-breakpoint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-breakpoint.d.ts","sourceRoot":"","sources":["../../src/hooks/use-breakpoint.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAA;AAmB5D;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,cAAc,CAqB9C"}
|
package/dist/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { t as LinkButton } from "./button-fO8nazJE.mjs";
|
|
|
9
9
|
import { t as Separator } from "./separator-DXVTncCK.mjs";
|
|
10
10
|
import { i as buttonGroupVariants, n as ButtonGroupSeparator, r as ButtonGroupText, t as ButtonGroup } from "./button-group-CYPka2zz.mjs";
|
|
11
11
|
import { t as Icon } from "./icon-wrapper-DuLp3RM1.mjs";
|
|
12
|
-
import { n as CalendarDayButton, t as Calendar } from "./calendar-
|
|
12
|
+
import { n as CalendarDayButton, t as Calendar } from "./calendar-C-Hbf74r.mjs";
|
|
13
13
|
import { a as CardDescription, i as CardContent, n as CardFooter, o as CardTitle, r as CardHeader, t as Card } from "./card-DKG1Cwlj.mjs";
|
|
14
14
|
import { a as ChartTooltip, i as ChartStyle, n as ChartLegend, o as ChartTooltipContent, r as ChartLegendContent, t as ChartContainer } from "./chart-CUa21ynK.mjs";
|
|
15
15
|
import { t as Checkbox } from "./checkbox-I5BvrMPe.mjs";
|
|
@@ -21,47 +21,54 @@ import { n as HoverCardContent, r as HoverCardTrigger, t as HoverCard } from "./
|
|
|
21
21
|
import { t as Input } from "./input-FKGqZypx.mjs";
|
|
22
22
|
import { a as InputGroupText, i as InputGroupInput, n as InputGroupAddon, o as InputGroupTextarea, r as InputGroupButton, t as InputGroup } from "./input-group-DDtz-RT7.mjs";
|
|
23
23
|
import { t as Label } from "./label-cnAhY-ej.mjs";
|
|
24
|
-
import { A as useLeaflet, C as MapPolyline, D as MapTileLayer, E as MapSearchControl, O as MapTooltip, S as MapPolygon, T as MapRectangle, _ as MapLayers, a as MapDrawCircle, b as MapMarker, c as MapDrawEdit, d as MapDrawPolyline, f as MapDrawRectangle, g as MapLayerGroup, h as MapFullscreenControl, i as MapControlContainer, j as PlaceAutocomplete, k as MapZoomControl, l as MapDrawMarker, m as MapFeatureGroup, n as MapCircle, o as MapDrawControl, p as MapDrawUndo, r as MapCircleMarker, s as MapDrawDelete, t as Map, u as MapDrawPolygon, v as MapLayersControl, w as MapPopup, x as MapMarkerClusterGroup, y as MapLocateControl } from "./map-
|
|
25
|
-
import { t as Spinner } from "./spinner-
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import { t as
|
|
34
|
-
import { t as
|
|
35
|
-
import { a as
|
|
24
|
+
import { A as useLeaflet, C as MapPolyline, D as MapTileLayer, E as MapSearchControl, O as MapTooltip, S as MapPolygon, T as MapRectangle, _ as MapLayers, a as MapDrawCircle, b as MapMarker, c as MapDrawEdit, d as MapDrawPolyline, f as MapDrawRectangle, g as MapLayerGroup, h as MapFullscreenControl, i as MapControlContainer, j as PlaceAutocomplete, k as MapZoomControl, l as MapDrawMarker, m as MapFeatureGroup, n as MapCircle, o as MapDrawControl, p as MapDrawUndo, r as MapCircleMarker, s as MapDrawDelete, t as Map, u as MapDrawPolygon, v as MapLayersControl, w as MapPopup, x as MapMarkerClusterGroup, y as MapLocateControl } from "./map-qo7bY_g_.mjs";
|
|
25
|
+
import { t as Spinner } from "./spinner-CgPI3DDi.mjs";
|
|
26
|
+
import { n as InSheetContext, r as useInSheet, t as MobileSheet } from "./mobile-sheet-BxMvkzAj.mjs";
|
|
27
|
+
import { a as SheetHeader, i as SheetFooter, o as SheetTitle, r as SheetDescription, s as SheetTrigger } from "./sheet-DVEToCVY.mjs";
|
|
28
|
+
import { i as SheetOverlay, n as SheetClose, r as SheetContent, t as Sheet } from "./sheet-LhUgozvg.mjs";
|
|
29
|
+
import { i as PopoverTrigger, n as PopoverAnchor, r as PopoverContent, t as Popover } from "./popover-JOuXJOZ2.mjs";
|
|
30
|
+
import { n as RadioGroupItem, t as RadioGroup } from "./radio-group-70UjJBb5.mjs";
|
|
31
|
+
import { t as useBreakpoint } from "./use-breakpoint-DGcVmB3c.mjs";
|
|
32
|
+
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./dropdown/index.mjs";
|
|
33
|
+
import { t as ResponsiveDropdown } from "./responsive-dropdown-IFroDgKn.mjs";
|
|
34
|
+
import { t as ResponsivePopover } from "./responsive-popover-D-t9bxSN.mjs";
|
|
35
|
+
import { a as SelectLabel, c as SelectSeparator, i as SelectItem, l as SelectTrigger, n as SelectContent, o as SelectScrollDownButton, r as SelectGroup, s as SelectScrollUpButton, t as Select, u as SelectValue } from "./select-zxwykvQn.mjs";
|
|
36
|
+
import { C as SidebarTrigger, S as SidebarSeparator, _ as SidebarMenuSub, a as SidebarGroupAction, b as SidebarProvider, c as SidebarHeader, d as SidebarMenu, f as SidebarMenuAction, g as SidebarMenuSkeleton, h as SidebarMenuItem, i as SidebarGroup, l as SidebarInput, m as SidebarMenuButton, n as SidebarContent, o as SidebarGroupContent, p as SidebarMenuBadge, r as SidebarFooter, s as SidebarGroupLabel, t as Sidebar, u as SidebarInset, v as SidebarMenuSubButton, w as useSidebar, x as SidebarRail, y as SidebarMenuSubItem } from "./sidebar-B8LQJiNI.mjs";
|
|
37
|
+
import { t as Tooltip } from "./tooltip-a7NTDCWw.mjs";
|
|
38
|
+
import { t as Skeleton } from "./skeleton-D4HOEiOZ.mjs";
|
|
39
|
+
import { t as Switch } from "./switch-DcSF42Kc.mjs";
|
|
40
|
+
import { a as TableFooter, c as TableRow, i as TableCell, n as TableBody, o as TableHead, r as TableCaption, s as TableHeader, t as Table } from "./table-DWGT4cqh.mjs";
|
|
36
41
|
import { Tabs, TabsContent, TabsLinkTrigger, TabsList, TabsTrigger } from "./tabs/index.mjs";
|
|
37
|
-
import { t as Textarea } from "./textarea-
|
|
38
|
-
import { a as ListItem, c as Title, d as titleVariants, i as List, l as paragraphVariants, n as Code, o as Paragraph, r as Link, s as Text, t as Blockquote, u as textVariants } from "./typography-
|
|
39
|
-
import { t as VisuallyHidden } from "./visuallyhidden-
|
|
40
|
-
import { n as NavMenu, t as AppNavigation } from "./app-navigation-
|
|
41
|
-
import { t as LoaderOverlay } from "./loader-overlay-
|
|
42
|
-
import { t as Autocomplete } from "./autocomplete-
|
|
43
|
-
import { n as avatarStackVariants, t as AvatarStack } from "./avatar-stack-
|
|
44
|
-
import { t as CalendarDatePicker } from "./calendar-date-picker-
|
|
45
|
-
import { i as ClientOnly, n as useTheme, r as ThemeScript, t as ThemeProvider } from "./themes-
|
|
46
|
-
import { a as formatJson, c as isValidYaml, d as CodeEditor, i as CodeEditorTabs, l as jsonToYaml, n as jsonSchema, o as formatYaml, r as yamlSchema, s as isValidJson, t as createCodeEditorSchema, u as yamlToJson } from "./types-
|
|
47
|
-
import { t as toast } from "./toast-
|
|
48
|
-
import { n as Toaster, t as useToast } from "./toast-
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import { t as
|
|
52
|
-
import {
|
|
53
|
-
import { t as
|
|
54
|
-
import { n as useAdapter, t as FormAdapterProvider } from "./adapter-context-rWveHhDd.mjs";
|
|
42
|
+
import { t as Textarea } from "./textarea-BoChBcFz.mjs";
|
|
43
|
+
import { a as ListItem, c as Title, d as titleVariants, i as List, l as paragraphVariants, n as Code, o as Paragraph, r as Link, s as Text, t as Blockquote, u as textVariants } from "./typography-TRKP_CLT.mjs";
|
|
44
|
+
import { t as VisuallyHidden } from "./visuallyhidden-BHOPczmW.mjs";
|
|
45
|
+
import { n as NavMenu, t as AppNavigation } from "./app-navigation-rSOfo1KV.mjs";
|
|
46
|
+
import { t as LoaderOverlay } from "./loader-overlay-C2WDla6V.mjs";
|
|
47
|
+
import { t as Autocomplete } from "./autocomplete-DdbTQe6u.mjs";
|
|
48
|
+
import { n as avatarStackVariants, t as AvatarStack } from "./avatar-stack-CDhlA1Nm.mjs";
|
|
49
|
+
import { t as CalendarDatePicker } from "./calendar-date-picker-BaykEs6j.mjs";
|
|
50
|
+
import { i as ClientOnly, n as useTheme, r as ThemeScript, t as ThemeProvider } from "./themes-CAiN4b6G.mjs";
|
|
51
|
+
import { a as formatJson, c as isValidYaml, d as CodeEditor, i as CodeEditorTabs, l as jsonToYaml, n as jsonSchema, o as formatYaml, r as yamlSchema, s as isValidJson, t as createCodeEditorSchema, u as yamlToJson } from "./types-CKIe2WlV.mjs";
|
|
52
|
+
import { t as toast } from "./toast-D5XD7goD.mjs";
|
|
53
|
+
import { n as Toaster, t as useToast } from "./toast-DDdLgY53.mjs";
|
|
54
|
+
import { i as FileInputButton, n as DropzoneContent, r as DropzoneEmptyState, t as Dropzone } from "./dropzone-Bt0plEuw.mjs";
|
|
55
|
+
import { t as EmptyContent } from "./empty-content-CBh5bbtJ.mjs";
|
|
56
|
+
import { A as FormCheckbox, C as FormDialog, D as FormCustom, E as FormDatePicker, M as FormAutosearch, N as FormAutocomplete, O as FormCopyBox, S as FormError, T as FormDateTimePicker, _ as FormRadioGroup, a as useField, b as FormFieldArray, c as useWatchAll, d as FormTextarea, f as FormSwitch, g as FormRoot, h as FormSelectItem, i as useFieldContext, j as FormButton, k as FormCombobox, l as FormTransfer, m as FormSelect, n as useFormState, o as FormWhen, p as FormSubmit, r as useFormContext, s as useWatch, t as Form, u as FormTimePicker, v as FormRadioItem, w as FormDescription, x as FormField, y as FormInput } from "./form-CCNN9VtJ.mjs";
|
|
57
|
+
import { t as useCopyToClipboard } from "./use-copy-to-clipboard-D7KyLIAt.mjs";
|
|
58
|
+
import { n as useAdapter, t as FormAdapterProvider } from "./adapter-context-NyGTDZYq.mjs";
|
|
55
59
|
import { InputWithAddons } from "./input-with-addons/index.mjs";
|
|
56
|
-
import { a as getResponsiveValue, c as GRID_COLUMNS, d as RESPONSIVE_MAP, i as getGutter, l as GRID_PREFIX, n as Row, o as registerMediaQuery, r as RowContext, s as GRID_BREAKPOINTS, t as Col, u as RESPONSIVE_ARRAY } from "./col-
|
|
57
|
-
import { t as InputNumber } from "./input-number-
|
|
58
|
-
import { t as
|
|
60
|
+
import { a as getResponsiveValue, c as GRID_COLUMNS, d as RESPONSIVE_MAP, i as getGutter, l as GRID_PREFIX, n as Row, o as registerMediaQuery, r as RowContext, s as GRID_BREAKPOINTS, t as Col, u as RESPONSIVE_ARRAY } from "./col-DISdGlqY.mjs";
|
|
61
|
+
import { t as InputNumber } from "./input-number-Diu-C6d5.mjs";
|
|
62
|
+
import { t as ActionRow } from "./action-row-DnhBhMtt.mjs";
|
|
63
|
+
import { t as MoreActions } from "./more-actions-Ca5qqd0H.mjs";
|
|
64
|
+
import { t as MultiSelect } from "./multi-select-DM_dxnSV.mjs";
|
|
59
65
|
import { configureProgress, startProgress, stopProgress } from "./nprogress/index.mjs";
|
|
60
|
-
import { t as PageTitle } from "./page-title-
|
|
61
|
-
import { t as
|
|
62
|
-
import { t as
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import { t as
|
|
66
|
-
import "./
|
|
67
|
-
|
|
66
|
+
import { t as PageTitle } from "./page-title-ChLiv6gB.mjs";
|
|
67
|
+
import { n as useRichTextEditor, r as RichTextContent, t as RichTextEditor } from "./rich-text-editor-CQH_U4T5.mjs";
|
|
68
|
+
import { t as defineStepper } from "./stepper-Beb-zbdL.mjs";
|
|
69
|
+
import { t as TagsInput } from "./tag-input-Bf4GMptp.mjs";
|
|
70
|
+
import { _ as RedisTaskStorage, a as TaskPanelItem, b as createProjectMetadata, c as TaskPanelHeader, d as useCurrentScope, f as useTasksWithLabels, g as detectStorage, h as TaskQueue, i as TaskPanel, l as getContextLabel, m as TaskQueueProvider, n as TaskSummaryDialog, o as TaskPanelCounter, p as useTaskQueue, r as TaskQueueTrigger, s as TaskPanelActions, t as TaskQueueDropdown, u as matchesCurrentScope, v as LocalTaskStorage, x as createUserMetadata, y as createOrgMetadata } from "./task-queue-dropdown-D-LncEWm.mjs";
|
|
71
|
+
import { C as utcToLocalInputString, S as utcStringToZonedDate, _ as getBrowserTimezone, a as formatTimeRangeDisplay, b as getTimezoneOffset, c as getPresetByKey, d as TimezoneSelector, f as QuickRangesPanel, g as formatUtcForDisplay, h as formatTimezoneLabel, i as formatSingleTimeDisplay, l as getPresetByShortcut, m as createTimezoneOption, n as TimeRangePicker, o as DEFAULT_PRESETS, p as CustomRangePanel, r as formatDateForInput, s as getDefaultPreset, t as toApiTimeRange, u as getPresetRange, v as getDefaultTimezoneOptions, w as zonedDateToUtcString, x as localInputStringToUtc, y as getShortTimezoneDisplay } from "./to-api-format-CgKcC9SK.mjs";
|
|
72
|
+
import { t as useDebounce } from "./hooks-DQXVwbrs.mjs";
|
|
73
|
+
import { n as toUTCTimestampStartOfDay, t as toUTCTimestampEndOfDay } from "./utils-BwB1mIdZ.mjs";
|
|
74
|
+
export { CustomRangePanel as AbsoluteRangePanel, CustomRangePanel, ActionRow, Alert, AlertDescription, AlertTitle, AppNavigation, Autocomplete, Avatar, AvatarFallback, AvatarImage, AvatarStack, Badge, Blockquote, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDatePicker, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, ClientOnly, CloseIcon, Code, CodeEditor, CodeEditorTabs, Col, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DEFAULT_PRESETS, Dialog, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneContent, DropzoneEmptyState, EmptyContent, FileInputButton, Form, FormAdapterProvider, FormAutocomplete, FormAutosearch, FormButton, FormCheckbox, FormCombobox, FormCopyBox, FormCustom, FormDatePicker, FormDateTimePicker, FormDescription, FormDialog, FormError, FormField, FormFieldArray, FormInput, FormRadioGroup, FormRadioItem, FormRoot, FormSelect, FormSelectItem, FormSubmit, FormSwitch, FormTextarea, FormTimePicker, FormTransfer, FormWhen, GRID_BREAKPOINTS, GRID_COLUMNS, GRID_PREFIX, HoverCard, HoverCardContent, HoverCardTrigger, Icon, InSheetContext, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputNumber, InputWithAddons, Label, Link, LinkButton, List, ListItem, LoaderOverlay, LocalTaskStorage, Map, MapCircle, MapCircleMarker, MapControlContainer, MapDrawCircle, MapDrawControl, MapDrawDelete, MapDrawEdit, MapDrawMarker, MapDrawPolygon, MapDrawPolyline, MapDrawRectangle, MapDrawUndo, MapFeatureGroup, MapFullscreenControl, MapLayerGroup, MapLayers, MapLayersControl, MapLocateControl, MapMarker, MapMarkerClusterGroup, MapPolygon, MapPolyline, MapPopup, MapRectangle, MapSearchControl, MapTileLayer, MapTooltip, MapZoomControl, MobileSheet, MoreActions, MultiSelect, NavMenu, PageTitle, Paragraph, PlaceAutocomplete, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, QuickRangesPanel, RESPONSIVE_ARRAY, RESPONSIVE_MAP, RadioGroup, RadioGroupItem, RedisTaskStorage, ResponsiveDropdown, ResponsivePopover, RichTextContent, RichTextEditor, Row, RowContext, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Spinner, SpinnerIcon, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsLinkTrigger, TabsList, TabsTrigger, TagsInput, TaskPanel, TaskPanelActions, TaskPanelCounter, TaskPanelHeader, TaskPanelItem, TaskQueue, TaskQueueDropdown, TaskQueueProvider, TaskQueueTrigger, TaskSummaryDialog, Text, Textarea, ThemeProvider, ThemeScript, TimeRangePicker, TimezoneSelector, Title, Toaster, Tooltip, VisuallyHidden, avatarStackVariants, badgeVariants, buttonGroupVariants, buttonVariants, cn, configureProgress, createCodeEditorSchema, createOrgMetadata, createProjectMetadata, createTimezoneOption, createUserMetadata, defineStepper, detectStorage, formatDateForInput, formatJson, formatSingleTimeDisplay, formatTimeRangeDisplay, formatTimezoneLabel, formatUtcForDisplay, formatYaml, getBrowserTimezone, getContextLabel, getDefaultPreset, getDefaultTimezoneOptions, getGutter, getPresetByKey, getPresetByShortcut, getPresetRange, getResponsiveValue, getShortTimezoneDisplay, getTimezoneOffset, isValidJson, isValidYaml, jsonSchema, jsonToYaml, localInputStringToUtc, matchesCurrentScope, paragraphVariants, registerMediaQuery, startProgress, stopProgress, textVariants, titleVariants, toApiTimeRange, toUTCTimestampEndOfDay, toUTCTimestampStartOfDay, toast, useAdapter, useBreakpoint, useCopyToClipboard, useCurrentScope, useDebounce, useField, useFieldContext, useFormContext, useFormState, useInSheet, useLeaflet, useRichTextEditor, useSidebar, useTaskQueue, useTasksWithLabels, useTheme, useToast, useWatch, useWatchAll, utcStringToZonedDate, utcToLocalInputString, yamlSchema, yamlToJson, zonedDateToUtcString };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as InputNumber } from "../input-number-
|
|
1
|
+
import { t as InputNumber } from "../input-number-Diu-C6d5.mjs";
|
|
2
2
|
export { InputNumber };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as LoaderOverlay } from "../loader-overlay-
|
|
1
|
+
import { t as LoaderOverlay } from "../loader-overlay-C2WDla6V.mjs";
|
|
2
2
|
export { LoaderOverlay };
|
package/dist/map/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as useLeaflet, C as MapPolyline, D as MapTileLayer, E as MapSearchControl, O as MapTooltip, S as MapPolygon, T as MapRectangle, _ as MapLayers, a as MapDrawCircle, b as MapMarker, c as MapDrawEdit, d as MapDrawPolyline, f as MapDrawRectangle, g as MapLayerGroup, h as MapFullscreenControl, i as MapControlContainer, j as PlaceAutocomplete, k as MapZoomControl, l as MapDrawMarker, m as MapFeatureGroup, n as MapCircle, o as MapDrawControl, p as MapDrawUndo, r as MapCircleMarker, s as MapDrawDelete, t as Map, u as MapDrawPolygon, v as MapLayersControl, w as MapPopup, x as MapMarkerClusterGroup, y as MapLocateControl } from "../map-
|
|
1
|
+
import { A as useLeaflet, C as MapPolyline, D as MapTileLayer, E as MapSearchControl, O as MapTooltip, S as MapPolygon, T as MapRectangle, _ as MapLayers, a as MapDrawCircle, b as MapMarker, c as MapDrawEdit, d as MapDrawPolyline, f as MapDrawRectangle, g as MapLayerGroup, h as MapFullscreenControl, i as MapControlContainer, j as PlaceAutocomplete, k as MapZoomControl, l as MapDrawMarker, m as MapFeatureGroup, n as MapCircle, o as MapDrawControl, p as MapDrawUndo, r as MapCircleMarker, s as MapDrawDelete, t as Map, u as MapDrawPolygon, v as MapLayersControl, w as MapPopup, x as MapMarkerClusterGroup, y as MapLocateControl } from "../map-qo7bY_g_.mjs";
|
|
2
2
|
export { Map, MapCircle, MapCircleMarker, MapControlContainer, MapDrawCircle, MapDrawControl, MapDrawDelete, MapDrawEdit, MapDrawMarker, MapDrawPolygon, MapDrawPolyline, MapDrawRectangle, MapDrawUndo, MapFeatureGroup, MapFullscreenControl, MapLayerGroup, MapLayers, MapLayersControl, MapLocateControl, MapMarker, MapMarkerClusterGroup, MapPolygon, MapPolyline, MapPopup, MapRectangle, MapSearchControl, MapTileLayer, MapTooltip, MapZoomControl, PlaceAutocomplete, useLeaflet };
|
|
@@ -3,12 +3,12 @@ import { t as ButtonGroup } from "./button-group-CYPka2zz.mjs";
|
|
|
3
3
|
import { t as Button } from "./button-D3RrsMfQ.mjs";
|
|
4
4
|
import { i as CommandGroup, o as CommandItem, r as CommandEmpty, s as CommandList, t as Command } from "./command-DqHWukGK.mjs";
|
|
5
5
|
import { i as InputGroupInput, n as InputGroupAddon, t as InputGroup } from "./input-group-DDtz-RT7.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { CircleIcon, LayersIcon, LoaderCircleIcon, MapPinIcon, MaximizeIcon, MinimizeIcon, MinusIcon, NavigationIcon, PenLineIcon, PentagonIcon, PlusIcon, SearchIcon, SquareIcon, Trash2Icon, Undo2Icon, WaypointsIcon } from "lucide-react";
|
|
6
|
+
import { t as Spinner } from "./spinner-CgPI3DDi.mjs";
|
|
7
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon, LayersIcon, LoaderCircleIcon, MapPinIcon, MaximizeIcon, MinimizeIcon, MinusIcon, NavigationIcon, PenLineIcon, PentagonIcon, PlusIcon, SearchIcon, SquareIcon, Trash2Icon, Undo2Icon, WaypointsIcon } from "lucide-react";
|
|
9
8
|
import * as React$1 from "react";
|
|
10
9
|
import { Suspense, createContext, lazy, useContext, useEffect, useRef, useState } from "react";
|
|
11
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
12
12
|
import { renderToString } from "react-dom/server.browser";
|
|
13
13
|
//#region ../shadcn/hooks/use-theme.ts
|
|
14
14
|
/**
|
|
@@ -41,6 +41,85 @@ function useTheme() {
|
|
|
41
41
|
return { resolvedTheme };
|
|
42
42
|
}
|
|
43
43
|
//#endregion
|
|
44
|
+
//#region ../shadcn/ui/dropdown-menu.tsx
|
|
45
|
+
/**
|
|
46
|
+
* Vanilla shadcn/ui DropdownMenu Component
|
|
47
|
+
* Pure shadcn dropdown without Datum customizations
|
|
48
|
+
* For Datum-specific features (destructive MenuItem), import from @/modules/datum-ui
|
|
49
|
+
*/
|
|
50
|
+
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
51
|
+
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
52
|
+
DropdownMenuPrimitive.Group;
|
|
53
|
+
DropdownMenuPrimitive.Portal;
|
|
54
|
+
DropdownMenuPrimitive.Sub;
|
|
55
|
+
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
56
|
+
const DropdownMenuSubTrigger = React$1.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.SubTrigger, {
|
|
57
|
+
ref,
|
|
58
|
+
className: cn("focus:bg-accent data-[state=open]:bg-accent flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className),
|
|
59
|
+
...props,
|
|
60
|
+
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })]
|
|
61
|
+
}));
|
|
62
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
63
|
+
const DropdownMenuSubContent = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.SubContent, {
|
|
64
|
+
ref,
|
|
65
|
+
className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg", className),
|
|
66
|
+
...props
|
|
67
|
+
}));
|
|
68
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
69
|
+
const DropdownMenuContent = React$1.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, {
|
|
70
|
+
ref,
|
|
71
|
+
sideOffset,
|
|
72
|
+
className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md", className),
|
|
73
|
+
...props
|
|
74
|
+
}) }));
|
|
75
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
76
|
+
const DropdownMenuItem = React$1.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, {
|
|
77
|
+
ref,
|
|
78
|
+
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className),
|
|
79
|
+
...props
|
|
80
|
+
}));
|
|
81
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
82
|
+
const DropdownMenuCheckboxItem = React$1.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.CheckboxItem, {
|
|
83
|
+
ref,
|
|
84
|
+
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
|
|
85
|
+
checked,
|
|
86
|
+
...props,
|
|
87
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
88
|
+
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
89
|
+
children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "h-4 w-4" }) })
|
|
90
|
+
}), children]
|
|
91
|
+
}));
|
|
92
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
93
|
+
const DropdownMenuRadioItem = React$1.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.RadioItem, {
|
|
94
|
+
ref,
|
|
95
|
+
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
|
|
96
|
+
...props,
|
|
97
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
98
|
+
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
99
|
+
children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "h-2 w-2 fill-current" }) })
|
|
100
|
+
}), children]
|
|
101
|
+
}));
|
|
102
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
103
|
+
const DropdownMenuLabel = React$1.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, {
|
|
104
|
+
ref,
|
|
105
|
+
className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
|
|
106
|
+
...props
|
|
107
|
+
}));
|
|
108
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
109
|
+
const DropdownMenuSeparator = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, {
|
|
110
|
+
ref,
|
|
111
|
+
className: cn("bg-muted -mx-1 my-1 h-px", className),
|
|
112
|
+
...props
|
|
113
|
+
}));
|
|
114
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
115
|
+
const DropdownMenuShortcut = ({ className, ...props }) => {
|
|
116
|
+
return /* @__PURE__ */ jsx("span", {
|
|
117
|
+
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
118
|
+
...props
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
122
|
+
//#endregion
|
|
44
123
|
//#region ../shadcn/ui/place-autocomplete.tsx
|
|
45
124
|
function formatAddress(properties) {
|
|
46
125
|
const parts = [];
|
|
@@ -225,7 +304,7 @@ function PlaceAutocomplete({ debounceMs = 300, lang, limit = 5, bbox, lat, lon,
|
|
|
225
304
|
//#region ../shadcn/ui/map.tsx
|
|
226
305
|
let _useMap;
|
|
227
306
|
let _useMapEvents;
|
|
228
|
-
if (typeof window !== "undefined") import("./map-leaflet-imports-
|
|
307
|
+
if (typeof window !== "undefined") import("./map-leaflet-imports-yWwH4CHB.mjs").then((mod) => {
|
|
229
308
|
_useMap = mod.useMap;
|
|
230
309
|
_useMapEvents = mod.useMapEvents;
|
|
231
310
|
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
|
+
import { a as SheetHeader, o as SheetTitle, r as SheetDescription } from "./sheet-DVEToCVY.mjs";
|
|
3
|
+
import { r as SheetContent, t as Sheet } from "./sheet-LhUgozvg.mjs";
|
|
4
|
+
import { createContext, use } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/base/mobile-sheet/context.ts
|
|
7
|
+
/**
|
|
8
|
+
* Signals that children are rendered inside a MobileSheet. Responsive
|
|
9
|
+
* primitives (ResponsivePopover, ResponsiveDropdown) read this context
|
|
10
|
+
* and skip their own sheet branch when it is true, preventing
|
|
11
|
+
* sheet-in-sheet stacking on mobile.
|
|
12
|
+
*
|
|
13
|
+
* MobileSheet provides this automatically. Downstream consumers that
|
|
14
|
+
* build their own sheet shells can wrap sections in the provider
|
|
15
|
+
* manually to opt in to the same suppression.
|
|
16
|
+
*/
|
|
17
|
+
const InSheetContext = createContext(false);
|
|
18
|
+
function useInSheet() {
|
|
19
|
+
return use(InSheetContext);
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/components/base/mobile-sheet/mobile-sheet.tsx
|
|
23
|
+
function MobileSheet({ open, onOpenChange, title, description, children, footer, className }) {
|
|
24
|
+
return /* @__PURE__ */ jsx(Sheet, {
|
|
25
|
+
open,
|
|
26
|
+
onOpenChange,
|
|
27
|
+
children: /* @__PURE__ */ jsxs(SheetContent, {
|
|
28
|
+
side: "bottom",
|
|
29
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
30
|
+
className: cn("bg-background max-h-[80svh] gap-0 rounded-t-xl p-0", className),
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ jsxs(SheetHeader, {
|
|
33
|
+
className: "border-b px-4 py-3",
|
|
34
|
+
children: [/* @__PURE__ */ jsx(SheetTitle, {
|
|
35
|
+
className: "text-sm font-semibold",
|
|
36
|
+
children: title
|
|
37
|
+
}), description ? /* @__PURE__ */ jsx(SheetDescription, {
|
|
38
|
+
className: "text-muted-foreground text-xs",
|
|
39
|
+
children: description
|
|
40
|
+
}) : /* @__PURE__ */ jsx(SheetDescription, {
|
|
41
|
+
className: "sr-only",
|
|
42
|
+
children: title
|
|
43
|
+
})]
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ jsx("div", {
|
|
46
|
+
className: "min-h-0 flex-1 overflow-y-auto",
|
|
47
|
+
children: /* @__PURE__ */ jsx(InSheetContext, {
|
|
48
|
+
value: true,
|
|
49
|
+
children
|
|
50
|
+
})
|
|
51
|
+
}),
|
|
52
|
+
footer && /* @__PURE__ */ jsx("div", {
|
|
53
|
+
className: "border-t px-3 py-2.5",
|
|
54
|
+
children: footer
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
export { InSheetContext as n, useInSheet as r, MobileSheet as t };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
|
|
1
|
+
import { t as ActionRow } from "../action-row-DnhBhMtt.mjs";
|
|
2
|
+
import { t as MoreActions } from "../more-actions-Ca5qqd0H.mjs";
|
|
3
|
+
export { ActionRow, MoreActions };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
|
+
import { t as Button } from "./button-BllvE9Lm.mjs";
|
|
3
|
+
import { t as ResponsiveDropdown } from "./responsive-dropdown-IFroDgKn.mjs";
|
|
4
|
+
import { t as Tooltip } from "./tooltip-a7NTDCWw.mjs";
|
|
5
|
+
import { t as ActionRow } from "./action-row-DnhBhMtt.mjs";
|
|
6
|
+
import { Ellipsis } from "lucide-react";
|
|
7
|
+
import { useState } from "react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/features/more-actions/more-actions.tsx
|
|
10
|
+
function MoreActions({ row, actions, className, disabled = false, iconClassName, responsive = true, sheetTitle = "Actions" }) {
|
|
11
|
+
const [open, setOpen] = useState(false);
|
|
12
|
+
const visibleActions = actions.filter((action) => {
|
|
13
|
+
if (action.hidden === void 0) return true;
|
|
14
|
+
return typeof action.hidden === "function" ? !action.hidden(row) : !action.hidden;
|
|
15
|
+
});
|
|
16
|
+
if (visibleActions.length === 0) return null;
|
|
17
|
+
return /* @__PURE__ */ jsx(ResponsiveDropdown, {
|
|
18
|
+
open,
|
|
19
|
+
onOpenChange: setOpen,
|
|
20
|
+
trigger: /* @__PURE__ */ jsx(Button, {
|
|
21
|
+
onClick: () => setOpen(!open),
|
|
22
|
+
type: "quaternary",
|
|
23
|
+
theme: "borderless",
|
|
24
|
+
size: "icon",
|
|
25
|
+
disabled,
|
|
26
|
+
className: cn("data-[state=open]:bg-accent size-7 p-0 focus-visible:ring-0 focus-visible:ring-offset-0", className),
|
|
27
|
+
children: /* @__PURE__ */ jsx(Ellipsis, { className: cn("size-5", iconClassName) })
|
|
28
|
+
}),
|
|
29
|
+
sheetTitle,
|
|
30
|
+
align: "end",
|
|
31
|
+
responsive,
|
|
32
|
+
children: visibleActions.map((action, index) => {
|
|
33
|
+
const key = action.key ?? action.label ?? String(index);
|
|
34
|
+
const tooltipText = typeof action.tooltip === "function" ? action.tooltip(row) : action.tooltip ?? action.label;
|
|
35
|
+
const rowEl = /* @__PURE__ */ jsx(ActionRow, {
|
|
36
|
+
action,
|
|
37
|
+
data: row,
|
|
38
|
+
onSelect: () => setOpen(false)
|
|
39
|
+
}, key);
|
|
40
|
+
if (tooltipText && tooltipText !== action.label) return /* @__PURE__ */ jsx(Tooltip, {
|
|
41
|
+
message: tooltipText,
|
|
42
|
+
children: rowEl
|
|
43
|
+
}, key);
|
|
44
|
+
return /* @__PURE__ */ jsx("div", { children: rowEl }, key);
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { MoreActions as t };
|