@datum-cloud/datum-ui 0.6.0 → 0.7.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/LICENSE +21 -0
- 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-D0EBWUwJ.mjs} +48 -3
- 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 +48 -41
- 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-DRzZDNtB.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/visually-hidden/index.mjs +1 -1
- package/package.json +63 -8
- 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-BkUrNU37.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-8VGszCqj.mjs} +0 -0
- /package/dist/{visuallyhidden-BLUsJpYH.mjs → visuallyhidden-BHOPczmW.mjs} +0 -0
|
@@ -2,16 +2,16 @@ import { t as cn } from "../cn-D2KYQ917.mjs";
|
|
|
2
2
|
import { t as Badge } from "../badge-DJR33ftJ.mjs";
|
|
3
3
|
import { t as Button } from "../button-BllvE9Lm.mjs";
|
|
4
4
|
import { t as Checkbox } from "../checkbox-I5BvrMPe.mjs";
|
|
5
|
-
import { a as CommandInput, i as CommandGroup, o as CommandItem, r as CommandEmpty, s as CommandList, t as Command } from "../command-DqHWukGK.mjs";
|
|
6
5
|
import { t as Input } from "../input-FKGqZypx.mjs";
|
|
7
|
-
import { t as
|
|
8
|
-
import { i as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { t as
|
|
12
|
-
import {
|
|
13
|
-
import { t as
|
|
14
|
-
import {
|
|
6
|
+
import { t as ResponsiveDropdown } from "../responsive-dropdown-IFroDgKn.mjs";
|
|
7
|
+
import { i as SelectItem, l as SelectTrigger, n as SelectContent, t as Select, u as SelectValue } from "../select-zxwykvQn.mjs";
|
|
8
|
+
import { t as Skeleton } from "../skeleton-D4HOEiOZ.mjs";
|
|
9
|
+
import { c as TableRow, i as TableCell, n as TableBody, o as TableHead, s as TableHeader, t as Table } from "../table-DWGT4cqh.mjs";
|
|
10
|
+
import { t as Autocomplete } from "../autocomplete-DdbTQe6u.mjs";
|
|
11
|
+
import { t as CalendarDatePicker } from "../calendar-date-picker-BaykEs6j.mjs";
|
|
12
|
+
import { t as ActionRow } from "../action-row-DnhBhMtt.mjs";
|
|
13
|
+
import { t as MultiSelect } from "../multi-select-DM_dxnSV.mjs";
|
|
14
|
+
import { ArrowDown, ArrowUp, ArrowUpDown, ChevronLeft, ChevronRight, MoreHorizontal, X } from "lucide-react";
|
|
15
15
|
import { createContext, memo, use, useCallback, useContext, useEffect, useId, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
16
16
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
17
17
|
import { parseAsInteger, parseAsString, useQueryStates } from "nuqs";
|
|
@@ -1045,37 +1045,38 @@ function DataTablePagination({ pageSizes = DEFAULT_PAGE_SIZES, className }) {
|
|
|
1045
1045
|
}
|
|
1046
1046
|
//#endregion
|
|
1047
1047
|
//#region src/components/features/data-table/components/row-actions.tsx
|
|
1048
|
-
function DataTableRowActions({ row, actions, isLoading = false, className }) {
|
|
1048
|
+
function DataTableRowActions({ row, actions, isLoading = false, className, responsive = true, sheetTitle = "Actions" }) {
|
|
1049
|
+
const [open, setOpen] = useState(false);
|
|
1049
1050
|
const data = row.original;
|
|
1050
1051
|
const visibleActions = actions.filter((action) => {
|
|
1051
1052
|
if (action.hidden === void 0) return true;
|
|
1052
1053
|
return typeof action.hidden === "function" ? !action.hidden(data) : !action.hidden;
|
|
1053
1054
|
});
|
|
1054
1055
|
if (visibleActions.length === 0) return null;
|
|
1055
|
-
return /* @__PURE__ */
|
|
1056
|
-
|
|
1057
|
-
|
|
1056
|
+
return /* @__PURE__ */ jsx(ResponsiveDropdown, {
|
|
1057
|
+
open,
|
|
1058
|
+
onOpenChange: setOpen,
|
|
1059
|
+
trigger: /* @__PURE__ */ jsxs(Button, {
|
|
1058
1060
|
theme: "borderless",
|
|
1059
1061
|
size: "small",
|
|
1060
1062
|
className,
|
|
1061
1063
|
disabled: isLoading,
|
|
1062
1064
|
"data-slot": "dt-row-actions",
|
|
1065
|
+
onClick: () => setOpen(!open),
|
|
1063
1066
|
children: [/* @__PURE__ */ jsx(MoreHorizontal, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
1064
1067
|
className: "sr-only",
|
|
1065
1068
|
children: "Open menu"
|
|
1066
1069
|
})]
|
|
1067
|
-
})
|
|
1068
|
-
|
|
1070
|
+
}),
|
|
1071
|
+
sheetTitle,
|
|
1069
1072
|
align: "end",
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
})
|
|
1078
|
-
})] });
|
|
1073
|
+
responsive,
|
|
1074
|
+
children: visibleActions.map((action) => /* @__PURE__ */ jsx(ActionRow, {
|
|
1075
|
+
action,
|
|
1076
|
+
data,
|
|
1077
|
+
onSelect: () => setOpen(false)
|
|
1078
|
+
}, action.label))
|
|
1079
|
+
});
|
|
1079
1080
|
}
|
|
1080
1081
|
//#endregion
|
|
1081
1082
|
//#region src/components/features/data-table/components/search.tsx
|
|
@@ -1452,10 +1453,8 @@ function ServerProvider(props) {
|
|
|
1452
1453
|
}
|
|
1453
1454
|
//#endregion
|
|
1454
1455
|
//#region src/components/features/data-table/filters/checkbox-filter.tsx
|
|
1455
|
-
|
|
1456
|
-
function CheckboxFilter({ column, label, options, className, checkboxPopoverClassName, disabled }) {
|
|
1456
|
+
function CheckboxFilter({ column, label, options, className, disabled, responsive, sheetTitle, modal }) {
|
|
1457
1457
|
const { filters, setFilter, clearFilter, registerFilter, unregisterFilter } = useDataTableFilters();
|
|
1458
|
-
const [open, setOpen] = useState(false);
|
|
1459
1458
|
useEffect(() => {
|
|
1460
1459
|
registerFilter(column, "checkbox");
|
|
1461
1460
|
return () => unregisterFilter(column);
|
|
@@ -1464,101 +1463,22 @@ function CheckboxFilter({ column, label, options, className, checkboxPopoverClas
|
|
|
1464
1463
|
registerFilter,
|
|
1465
1464
|
unregisterFilter
|
|
1466
1465
|
]);
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
children: [/* @__PURE__ */ jsx(PopoverTrigger, {
|
|
1484
|
-
asChild: true,
|
|
1485
|
-
children: /* @__PURE__ */ jsxs(Button, {
|
|
1486
|
-
theme: "outline",
|
|
1487
|
-
disabled,
|
|
1488
|
-
className: cn("h-10 justify-between gap-1", className),
|
|
1489
|
-
"data-slot": "dt-filter",
|
|
1490
|
-
"data-testid": "dt-filter-trigger",
|
|
1491
|
-
children: [selectedValues.length > 0 ? /* @__PURE__ */ jsxs("div", {
|
|
1492
|
-
className: "flex items-center gap-1 flex-wrap",
|
|
1493
|
-
children: [visibleBadges.map((val) => {
|
|
1494
|
-
const opt = options.find((o) => o.value === val);
|
|
1495
|
-
return /* @__PURE__ */ jsxs(Badge, {
|
|
1496
|
-
type: "secondary",
|
|
1497
|
-
theme: "light",
|
|
1498
|
-
className: "text-xs px-1.5 py-0",
|
|
1499
|
-
children: [opt?.label ?? val, /* @__PURE__ */ jsx("span", {
|
|
1500
|
-
role: "button",
|
|
1501
|
-
tabIndex: 0,
|
|
1502
|
-
"aria-label": `Remove ${opt?.label ?? val}`,
|
|
1503
|
-
className: "ml-1 rounded-sm hover:bg-muted",
|
|
1504
|
-
onClick: (e) => {
|
|
1505
|
-
e.stopPropagation();
|
|
1506
|
-
removeValue(val);
|
|
1507
|
-
},
|
|
1508
|
-
onKeyDown: (e) => {
|
|
1509
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
1510
|
-
e.preventDefault();
|
|
1511
|
-
removeValue(val);
|
|
1512
|
-
}
|
|
1513
|
-
},
|
|
1514
|
-
children: /* @__PURE__ */ jsx(X, { className: "size-3" })
|
|
1515
|
-
})]
|
|
1516
|
-
}, val);
|
|
1517
|
-
}), remainingCount > 0 && /* @__PURE__ */ jsxs("span", {
|
|
1518
|
-
className: "text-xs text-muted-foreground",
|
|
1519
|
-
children: [
|
|
1520
|
-
"+",
|
|
1521
|
-
remainingCount,
|
|
1522
|
-
" ",
|
|
1523
|
-
"more"
|
|
1524
|
-
]
|
|
1525
|
-
})]
|
|
1526
|
-
}) : /* @__PURE__ */ jsx("span", { children: label }), /* @__PURE__ */ jsx(ChevronDown, { className: "size-4 opacity-50 ml-auto shrink-0" })]
|
|
1527
|
-
})
|
|
1528
|
-
}), /* @__PURE__ */ jsxs(PopoverContent, {
|
|
1529
|
-
className: cn("popover-content-width-full p-0", checkboxPopoverClassName),
|
|
1530
|
-
align: "start",
|
|
1531
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
1532
|
-
className: "flex items-center justify-between p-2 border-b",
|
|
1533
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
1534
|
-
className: "text-sm font-medium",
|
|
1535
|
-
children: label
|
|
1536
|
-
}), selectedValues.length > 0 && /* @__PURE__ */ jsx(Button, {
|
|
1537
|
-
theme: "borderless",
|
|
1538
|
-
size: "small",
|
|
1539
|
-
className: "h-auto p-1 text-xs",
|
|
1540
|
-
onClick: () => clearFilter(column),
|
|
1541
|
-
children: "Clear"
|
|
1542
|
-
})]
|
|
1543
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
1544
|
-
className: "max-h-48 overflow-y-auto p-2",
|
|
1545
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
1546
|
-
className: "flex flex-col gap-2",
|
|
1547
|
-
children: options.map((option) => /* @__PURE__ */ jsxs("div", {
|
|
1548
|
-
className: "flex items-center gap-2",
|
|
1549
|
-
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
1550
|
-
id: `${column}-${option.value}`,
|
|
1551
|
-
checked: selectedValues.includes(option.value),
|
|
1552
|
-
onCheckedChange: (checked) => handleToggle(option.value, checked === true)
|
|
1553
|
-
}), /* @__PURE__ */ jsx(Label, {
|
|
1554
|
-
htmlFor: `${column}-${option.value}`,
|
|
1555
|
-
className: "text-sm font-normal cursor-pointer",
|
|
1556
|
-
children: option.label
|
|
1557
|
-
})]
|
|
1558
|
-
}, option.value))
|
|
1559
|
-
})
|
|
1560
|
-
})]
|
|
1561
|
-
})]
|
|
1466
|
+
return /* @__PURE__ */ jsx(MultiSelect, {
|
|
1467
|
+
options,
|
|
1468
|
+
value: filters[column] ?? [],
|
|
1469
|
+
onValueChange: (next) => {
|
|
1470
|
+
if (next.length > 0) setFilter(column, next);
|
|
1471
|
+
else clearFilter(column);
|
|
1472
|
+
},
|
|
1473
|
+
placeholder: label,
|
|
1474
|
+
sheetTitle: sheetTitle ?? label,
|
|
1475
|
+
responsive,
|
|
1476
|
+
modalPopover: modal,
|
|
1477
|
+
maxCount: 2,
|
|
1478
|
+
showClearButton: true,
|
|
1479
|
+
showSelectAll: false,
|
|
1480
|
+
disabled,
|
|
1481
|
+
className
|
|
1562
1482
|
});
|
|
1563
1483
|
}
|
|
1564
1484
|
//#endregion
|
|
@@ -1605,9 +1525,8 @@ function DatePickerFilter({ column, label, className, datePickerPopoverClassName
|
|
|
1605
1525
|
}
|
|
1606
1526
|
//#endregion
|
|
1607
1527
|
//#region src/components/features/data-table/filters/select-filter.tsx
|
|
1608
|
-
function SelectFilter({ column, label, options, placeholder, searchable = true, className, selectPopoverClassName, disabled }) {
|
|
1528
|
+
function SelectFilter({ column, label, options, placeholder, searchable = true, className, selectPopoverClassName, disabled, responsive, sheetTitle, modal }) {
|
|
1609
1529
|
const { filters, setFilter, clearFilter, registerFilter, unregisterFilter } = useDataTableFilters();
|
|
1610
|
-
const [open, setOpen] = useState(false);
|
|
1611
1530
|
const value = filters[column];
|
|
1612
1531
|
useEffect(() => {
|
|
1613
1532
|
registerFilter(column, "select");
|
|
@@ -1617,57 +1536,23 @@ function SelectFilter({ column, label, options, placeholder, searchable = true,
|
|
|
1617
1536
|
registerFilter,
|
|
1618
1537
|
unregisterFilter
|
|
1619
1538
|
]);
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
1638
|
-
className: "ml-2 flex items-center gap-1",
|
|
1639
|
-
children: [value && /* @__PURE__ */ jsx("span", {
|
|
1640
|
-
role: "button",
|
|
1641
|
-
"aria-label": `Clear ${label} filter`,
|
|
1642
|
-
className: "rounded-sm opacity-70 hover:opacity-100",
|
|
1643
|
-
onClick: (e) => {
|
|
1644
|
-
e.stopPropagation();
|
|
1645
|
-
clearFilter(column);
|
|
1646
|
-
},
|
|
1647
|
-
onKeyDown: (e) => {
|
|
1648
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
1649
|
-
e.preventDefault();
|
|
1650
|
-
e.stopPropagation();
|
|
1651
|
-
clearFilter(column);
|
|
1652
|
-
}
|
|
1653
|
-
},
|
|
1654
|
-
tabIndex: 0,
|
|
1655
|
-
children: /* @__PURE__ */ jsx(X, { className: "size-3" })
|
|
1656
|
-
}), /* @__PURE__ */ jsx(ChevronDown, { className: "size-4 opacity-50" })]
|
|
1657
|
-
})]
|
|
1658
|
-
})
|
|
1659
|
-
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
1660
|
-
className: cn("popover-content-width-full p-0", selectPopoverClassName),
|
|
1661
|
-
align: "start",
|
|
1662
|
-
children: /* @__PURE__ */ jsxs(Command, { children: [searchable && /* @__PURE__ */ jsx(CommandInput, { placeholder: `Search ${label.toLowerCase()}...` }), /* @__PURE__ */ jsxs(CommandList, { children: [/* @__PURE__ */ jsx(CommandEmpty, { children: "No results found." }), /* @__PURE__ */ jsx(CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsxs(CommandItem, {
|
|
1663
|
-
value: option.value,
|
|
1664
|
-
onSelect: () => {
|
|
1665
|
-
setFilter(column, option.value);
|
|
1666
|
-
setOpen(false);
|
|
1667
|
-
},
|
|
1668
|
-
children: [/* @__PURE__ */ jsx(Check, { className: cn("mr-2 size-4", value === option.value ? "opacity-100" : "opacity-0") }), option.label]
|
|
1669
|
-
}, option.value)) })] })] })
|
|
1670
|
-
})]
|
|
1539
|
+
return /* @__PURE__ */ jsx(Autocomplete, {
|
|
1540
|
+
options,
|
|
1541
|
+
value,
|
|
1542
|
+
onValueChange: (next) => {
|
|
1543
|
+
if (next === "" || next === void 0) clearFilter(column);
|
|
1544
|
+
else setFilter(column, next);
|
|
1545
|
+
},
|
|
1546
|
+
placeholder: placeholder ?? label,
|
|
1547
|
+
searchPlaceholder: `Search ${label.toLowerCase()}...`,
|
|
1548
|
+
disableSearch: !searchable,
|
|
1549
|
+
sheetTitle: sheetTitle ?? label,
|
|
1550
|
+
responsive,
|
|
1551
|
+
modal,
|
|
1552
|
+
disabled,
|
|
1553
|
+
className,
|
|
1554
|
+
contentClassName: selectPopoverClassName,
|
|
1555
|
+
triggerClassName: "h-10"
|
|
1671
1556
|
});
|
|
1672
1557
|
}
|
|
1673
1558
|
//#endregion
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as CalendarDatePicker } from "../calendar-date-picker-
|
|
2
|
-
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-
|
|
1
|
+
import { t as CalendarDatePicker } from "../calendar-date-picker-BaykEs6j.mjs";
|
|
2
|
+
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";
|
|
3
3
|
export { CustomRangePanel as AbsoluteRangePanel, CustomRangePanel, CalendarDatePicker, DEFAULT_PRESETS, QuickRangesPanel, TimeRangePicker, TimezoneSelector, createTimezoneOption, formatDateForInput, formatSingleTimeDisplay, formatTimeRangeDisplay, formatTimezoneLabel, formatUtcForDisplay, getBrowserTimezone, getDefaultPreset, getDefaultTimezoneOptions, getPresetByKey, getPresetByShortcut, getPresetRange, getShortTimezoneDisplay, getTimezoneOffset, localInputStringToUtc, toApiTimeRange, utcStringToZonedDate, utcToLocalInputString, zonedDateToUtcString };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as DateTimePicker } from "../date-time-picker-
|
|
1
|
+
import { t as DateTimePicker } from "../date-time-picker-DKOxrhmc.mjs";
|
|
2
2
|
export { DateTimePicker };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
2
|
import { t as Button } from "./button-D3RrsMfQ.mjs";
|
|
3
|
-
import { t as Calendar$1 } from "./calendar-
|
|
4
|
-
import {
|
|
3
|
+
import { t as Calendar$1 } from "./calendar-C-Hbf74r.mjs";
|
|
4
|
+
import { t as ResponsivePopover } from "./responsive-popover-D-t9bxSN.mjs";
|
|
5
|
+
import { t as useDateConstraints } from "./use-date-constraints-R3H4lIoT.mjs";
|
|
5
6
|
import { CalendarIcon } from "lucide-react";
|
|
6
7
|
import * as React$1 from "react";
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -68,7 +69,8 @@ function utcToLocalDateTime(utcString, timezone) {
|
|
|
68
69
|
//#endregion
|
|
69
70
|
//#region src/components/features/date-time-picker/date-time-picker.tsx
|
|
70
71
|
const DEFAULT_TIMEZONE = getBrowserTimezone();
|
|
71
|
-
function DateTimePicker({ ref, value, onChange, minDate, maxDate, disabledDates, timezone = DEFAULT_TIMEZONE, showTimezoneIndicator = false, placeholder = "Select date and time", disabled = false, className, modal = false }) {
|
|
72
|
+
function DateTimePicker({ ref, value, onChange, minDate, maxDate, disabledDates, disablePast, disableFuture, timezone = DEFAULT_TIMEZONE, showTimezoneIndicator = false, placeholder = "Select date and time", disabled = false, className, modal = false, sheetTitle, sheetDescription, responsive = true }) {
|
|
73
|
+
const [open, setOpen] = React$1.useState(false);
|
|
72
74
|
const initialState = React$1.useMemo(() => {
|
|
73
75
|
if (!value) return {
|
|
74
76
|
date: void 0,
|
|
@@ -77,6 +79,12 @@ function DateTimePicker({ ref, value, onChange, minDate, maxDate, disabledDates,
|
|
|
77
79
|
return utcToLocalDateTime(value, timezone);
|
|
78
80
|
}, [value, timezone]);
|
|
79
81
|
const [state, setState] = React$1.useState(initialState);
|
|
82
|
+
const { effectiveMinDate, effectiveMaxDate, isDateDisabled: isConstraintDisabled } = useDateConstraints({
|
|
83
|
+
minDate,
|
|
84
|
+
maxDate,
|
|
85
|
+
disablePast,
|
|
86
|
+
disableFuture
|
|
87
|
+
});
|
|
80
88
|
const prevValue = React$1.useRef(value);
|
|
81
89
|
const prevTimezone = React$1.useRef(timezone);
|
|
82
90
|
React$1.useEffect(() => {
|
|
@@ -122,54 +130,61 @@ function DateTimePicker({ ref, value, onChange, minDate, maxDate, disabledDates,
|
|
|
122
130
|
return /* @__PURE__ */ jsx("div", {
|
|
123
131
|
ref,
|
|
124
132
|
className,
|
|
125
|
-
children: /* @__PURE__ */
|
|
133
|
+
children: /* @__PURE__ */ jsx(ResponsivePopover, {
|
|
134
|
+
open,
|
|
135
|
+
onOpenChange: setOpen,
|
|
136
|
+
trigger: /* @__PURE__ */ jsxs(Button, {
|
|
137
|
+
variant: "outline",
|
|
138
|
+
className: cn("w-full justify-start text-left font-normal", !state.date && "text-muted-foreground"),
|
|
139
|
+
disabled,
|
|
140
|
+
children: [
|
|
141
|
+
/* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
142
|
+
/* @__PURE__ */ jsx("span", {
|
|
143
|
+
className: "flex-1",
|
|
144
|
+
children: formatDisplayValue()
|
|
145
|
+
}),
|
|
146
|
+
showTimezoneIndicator && state.date && state.time && /* @__PURE__ */ jsx("span", {
|
|
147
|
+
className: "text-muted-foreground ml-2 text-xs",
|
|
148
|
+
children: timezone
|
|
149
|
+
})
|
|
150
|
+
]
|
|
151
|
+
}),
|
|
152
|
+
sheetTitle: sheetTitle ?? placeholder ?? "Pick date & time",
|
|
153
|
+
sheetDescription,
|
|
154
|
+
align: "start",
|
|
155
|
+
contentClassName: "w-full sm:w-auto",
|
|
126
156
|
modal,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
disabled:
|
|
155
|
-
fromDate: minDate,
|
|
156
|
-
toDate: maxDate
|
|
157
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
158
|
-
className: "mt-3",
|
|
159
|
-
children: [/* @__PURE__ */ jsx("label", {
|
|
160
|
-
className: "mb-1 block text-sm font-medium",
|
|
161
|
-
children: "Time"
|
|
162
|
-
}), /* @__PURE__ */ jsx("input", {
|
|
163
|
-
type: "time",
|
|
164
|
-
"aria-label": "Select time",
|
|
165
|
-
value: state.time,
|
|
166
|
-
onChange: handleTimeChange,
|
|
167
|
-
disabled: disabled || !state.date,
|
|
168
|
-
className: cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1", "text-sm shadow-sm transition-colors", "placeholder:text-muted-foreground", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", "disabled:cursor-not-allowed disabled:opacity-50")
|
|
169
|
-
})]
|
|
157
|
+
responsive,
|
|
158
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
159
|
+
className: "p-3",
|
|
160
|
+
children: [/* @__PURE__ */ jsx(Calendar$1, {
|
|
161
|
+
mode: "single",
|
|
162
|
+
selected: state.date,
|
|
163
|
+
onSelect: handleDateChange,
|
|
164
|
+
className: "w-full sm:w-auto",
|
|
165
|
+
disabled: (date) => {
|
|
166
|
+
if (isConstraintDisabled(date)) return true;
|
|
167
|
+
if (typeof disabledDates === "function") return disabledDates(date);
|
|
168
|
+
if (Array.isArray(disabledDates)) return disabledDates.some((d) => d.getTime() === date.getTime());
|
|
169
|
+
return false;
|
|
170
|
+
},
|
|
171
|
+
fromDate: effectiveMinDate,
|
|
172
|
+
toDate: effectiveMaxDate
|
|
173
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
174
|
+
className: "mt-3",
|
|
175
|
+
children: [/* @__PURE__ */ jsx("label", {
|
|
176
|
+
className: "mb-1 block text-sm font-medium",
|
|
177
|
+
children: "Time"
|
|
178
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
179
|
+
type: "time",
|
|
180
|
+
"aria-label": "Select time",
|
|
181
|
+
value: state.time,
|
|
182
|
+
onChange: handleTimeChange,
|
|
183
|
+
disabled: disabled || !state.date,
|
|
184
|
+
className: cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1", "text-sm shadow-sm transition-colors", "placeholder:text-muted-foreground", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", "disabled:cursor-not-allowed disabled:opacity-50")
|
|
170
185
|
})]
|
|
171
|
-
})
|
|
172
|
-
})
|
|
186
|
+
})]
|
|
187
|
+
})
|
|
173
188
|
})
|
|
174
189
|
});
|
|
175
190
|
}
|
package/dist/dropdown/index.mjs
CHANGED
|
@@ -1,2 +1,110 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as cn } from "../cn-D2KYQ917.mjs";
|
|
2
|
+
import { t as Icon } from "../icon-wrapper-DuLp3RM1.mjs";
|
|
3
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
7
|
+
//#region src/components/features/dropdown/dropdown.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Datum Dropdown Menu Component
|
|
10
|
+
* Extends shadcn DropdownMenu with:
|
|
11
|
+
* - Destructive variant for DropdownMenuItem
|
|
12
|
+
*/
|
|
13
|
+
function DropdownMenu({ ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, { ...props });
|
|
15
|
+
}
|
|
16
|
+
function DropdownMenuPortal({ ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { ...props });
|
|
18
|
+
}
|
|
19
|
+
function DropdownMenuTrigger({ ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Trigger, { ...props });
|
|
21
|
+
}
|
|
22
|
+
function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, {
|
|
24
|
+
sideOffset,
|
|
25
|
+
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 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", className),
|
|
26
|
+
...props
|
|
27
|
+
}) });
|
|
28
|
+
}
|
|
29
|
+
function DropdownMenuGroup({ ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Group, { ...props });
|
|
31
|
+
}
|
|
32
|
+
function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, {
|
|
34
|
+
"data-inset": inset,
|
|
35
|
+
"data-variant": variant,
|
|
36
|
+
className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.CheckboxItem, {
|
|
42
|
+
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
43
|
+
checked,
|
|
44
|
+
...props,
|
|
45
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
46
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
47
|
+
children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Icon, {
|
|
48
|
+
icon: CheckIcon,
|
|
49
|
+
className: "size-4"
|
|
50
|
+
}) })
|
|
51
|
+
}), children]
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function DropdownMenuRadioGroup({ ...props }) {
|
|
55
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.RadioGroup, { ...props });
|
|
56
|
+
}
|
|
57
|
+
function DropdownMenuRadioItem({ className, children, ...props }) {
|
|
58
|
+
return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.RadioItem, {
|
|
59
|
+
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
60
|
+
...props,
|
|
61
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
62
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
63
|
+
children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Icon, {
|
|
64
|
+
icon: CircleIcon,
|
|
65
|
+
className: "size-2 fill-current"
|
|
66
|
+
}) })
|
|
67
|
+
}), children]
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
71
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, {
|
|
72
|
+
"data-inset": inset,
|
|
73
|
+
className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
|
|
74
|
+
...props
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function DropdownMenuSeparator({ className, ...props }) {
|
|
78
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, {
|
|
79
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
80
|
+
...props
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function DropdownMenuShortcut({ className, ...props }) {
|
|
84
|
+
return /* @__PURE__ */ jsx("span", {
|
|
85
|
+
className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
|
|
86
|
+
...props
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function DropdownMenuSub({ ...props }) {
|
|
90
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Sub, { ...props });
|
|
91
|
+
}
|
|
92
|
+
function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
93
|
+
return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.SubTrigger, {
|
|
94
|
+
"data-inset": inset,
|
|
95
|
+
className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8", className),
|
|
96
|
+
...props,
|
|
97
|
+
children: [children, /* @__PURE__ */ jsx(Icon, {
|
|
98
|
+
icon: ChevronRightIcon,
|
|
99
|
+
className: "ml-auto size-4"
|
|
100
|
+
})]
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function DropdownMenuSubContent({ className, ...props }) {
|
|
104
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.SubContent, {
|
|
105
|
+
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),
|
|
106
|
+
...props
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
2
110
|
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
package/dist/dropzone/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as FileInputButton, n as DropzoneContent, r as DropzoneEmptyState, t as Dropzone } from "../dropzone-
|
|
1
|
+
import { i as FileInputButton, n as DropzoneContent, r as DropzoneEmptyState, t as Dropzone } from "../dropzone-Bt0plEuw.mjs";
|
|
2
2
|
export { Dropzone, DropzoneContent, DropzoneEmptyState, FileInputButton };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as EmptyContent } from "../empty-content-
|
|
1
|
+
import { t as EmptyContent } from "../empty-content-CBh5bbtJ.mjs";
|
|
2
2
|
export { EmptyContent };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as FormAdapterProvider } from "../../../adapter-context-
|
|
2
|
-
import { n as getFieldConstraints, t as useDisplayTouched } from "../../../use-display-touched-
|
|
1
|
+
import { t as FormAdapterProvider } from "../../../adapter-context-NyGTDZYq.mjs";
|
|
2
|
+
import { n as getFieldConstraints, t as useDisplayTouched } from "../../../use-display-touched-8VGszCqj.mjs";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { FormProvider, getFormProps, getInputProps, useForm, useFormMetadata, useInputControl } from "@conform-to/react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as FormAdapterProvider } from "../../../adapter-context-
|
|
2
|
-
import { n as getFieldConstraints, r as getObjectShape, t as useDisplayTouched } from "../../../use-display-touched-
|
|
1
|
+
import { t as FormAdapterProvider } from "../../../adapter-context-NyGTDZYq.mjs";
|
|
2
|
+
import { n as getFieldConstraints, r as getObjectShape, t as useDisplayTouched } from "../../../use-display-touched-8VGszCqj.mjs";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { zodResolver } from "@hookform/resolvers/zod";
|
package/dist/form/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
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-
|
|
2
|
-
import { n as useAdapter, t as FormAdapterProvider } from "../adapter-context-
|
|
1
|
+
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";
|
|
2
|
+
import { n as useAdapter, t as FormAdapterProvider } from "../adapter-context-NyGTDZYq.mjs";
|
|
3
3
|
export { 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, useAdapter, useField, useFieldContext, useFormContext, useFormState, useWatch, useWatchAll };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cn } from "../../cn-D2KYQ917.mjs";
|
|
2
2
|
import { t as Button } from "../../button-BllvE9Lm.mjs";
|
|
3
|
-
import { n as useFormContext, t as FormProvider } from "../../form-context-
|
|
4
|
-
import { n as useAdapter } from "../../adapter-context-
|
|
5
|
-
import { t as defineStepper } from "../../stepper-
|
|
3
|
+
import { n as useFormContext, t as FormProvider } from "../../form-context-CeKyvO-A.mjs";
|
|
4
|
+
import { n as useAdapter } from "../../adapter-context-NyGTDZYq.mjs";
|
|
5
|
+
import { t as defineStepper } from "../../stepper-Beb-zbdL.mjs";
|
|
6
6
|
import { CheckIcon } from "lucide-react";
|
|
7
7
|
import * as React$1 from "react";
|
|
8
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|