@datum-cloud/datum-ui 0.8.1 → 0.10.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/dist/{adapter-context-NyGTDZYq.mjs → adapter-context-DemTWhel.mjs} +3 -3
- package/dist/alert/index.mjs +1 -1
- package/dist/{alert-BDj6od5I.mjs → alert-Cz56SqdN.mjs} +2 -2
- package/dist/app-navigation/index.mjs +2 -2
- package/dist/{app-navigation-rSOfo1KV.mjs → app-navigation-CG0A8Qjz.mjs} +12 -6
- package/dist/autocomplete/index.mjs +1 -1
- package/dist/{autocomplete-DdbTQe6u.mjs → autocomplete-ChuPNldi.mjs} +6 -6
- package/dist/autosearch/index.mjs +12 -12
- package/dist/avatar-stack/index.mjs +1 -1
- package/dist/{avatar-stack-CDhlA1Nm.mjs → avatar-stack-WqoQ3l06.mjs} +1 -1
- package/dist/{button-D3RrsMfQ.mjs → button-Rw1xI-k9.mjs} +2 -2
- package/dist/calendar/index.mjs +1 -1
- package/dist/calendar-D_DriVHT.mjs +77 -0
- package/dist/{calendar-C-Hbf74r.mjs → calendar-Dwvq3Vu_.mjs} +6 -6
- package/dist/calendar-date-picker-CchHKodM.mjs +52 -0
- package/dist/chart/index.mjs +1 -1
- package/dist/{chart-CUa21ynK.mjs → chart-DgcOwkOh.mjs} +5 -5
- package/dist/code-editor/index.mjs +1 -1
- package/dist/{col-DISdGlqY.mjs → col-Q6yazFwL.mjs} +2 -1
- package/dist/components/base/button/button.d.ts.map +1 -1
- package/dist/components/features/app-navigation/app-navigation.d.ts +5 -1
- package/dist/components/features/app-navigation/app-navigation.d.ts.map +1 -1
- package/dist/components/features/app-navigation/nav-menu.d.ts +4 -1
- package/dist/components/features/app-navigation/nav-menu.d.ts.map +1 -1
- package/dist/components/features/calendar-date-picker/calendar-date-picker.d.ts +6 -5
- package/dist/components/features/calendar-date-picker/calendar-date-picker.d.ts.map +1 -1
- package/dist/components/features/calendar-date-picker/types.d.ts +19 -0
- package/dist/components/features/calendar-date-picker/types.d.ts.map +1 -1
- package/dist/components/features/code-editor/code-editor.d.ts +1 -1
- package/dist/components/features/code-editor/code-editor.d.ts.map +1 -1
- package/dist/components/features/code-editor/index.d.ts +1 -1
- package/dist/components/features/code-editor/index.d.ts.map +1 -1
- package/dist/components/features/code-editor/types.d.ts +25 -2
- package/dist/components/features/code-editor/types.d.ts.map +1 -1
- package/dist/components/features/data-table/core/client-provider.d.ts.map +1 -1
- package/dist/components/features/date-time-picker/date-time-picker.d.ts +12 -4
- 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 +9 -0
- package/dist/components/features/date-time-picker/types.d.ts.map +1 -1
- package/dist/components/features/grid/components/col.d.ts +1 -1
- package/dist/components/features/grid/components/col.d.ts.map +1 -1
- package/dist/components/features/grid/components/row.d.ts +1 -1
- package/dist/components/features/grid/components/row.d.ts.map +1 -1
- package/dist/components/features/index.d.ts +1 -0
- package/dist/components/features/index.d.ts.map +1 -1
- package/dist/components/features/logo/index.d.ts +7 -0
- package/dist/components/features/logo/index.d.ts.map +1 -0
- package/dist/components/features/logo/logo-flat.d.ts +28 -0
- package/dist/components/features/logo/logo-flat.d.ts.map +1 -0
- package/dist/components/features/logo/logo-icon.d.ts +27 -0
- package/dist/components/features/logo/logo-icon.d.ts.map +1 -0
- package/dist/components/features/logo/logo-stacked.d.ts +24 -0
- package/dist/components/features/logo/logo-stacked.d.ts.map +1 -0
- package/dist/components/features/logo/logo-text.d.ts +27 -0
- package/dist/components/features/logo/logo-text.d.ts.map +1 -0
- package/dist/components/features/logo/logo.d.ts +24 -0
- package/dist/components/features/logo/logo.d.ts.map +1 -0
- package/dist/components/features/logo/logo.styles.d.ts +28 -0
- package/dist/components/features/logo/logo.styles.d.ts.map +1 -0
- package/dist/components/features/logo/themed/index.d.ts +2 -0
- package/dist/components/features/logo/themed/index.d.ts.map +1 -0
- package/dist/components/features/logo/themed/logo-themed.d.ts +54 -0
- package/dist/components/features/logo/themed/logo-themed.d.ts.map +1 -0
- package/dist/components/features/picker/components/calendar.d.ts +14 -0
- package/dist/components/features/picker/components/calendar.d.ts.map +1 -0
- package/dist/components/features/picker/components/content.d.ts +18 -0
- package/dist/components/features/picker/components/content.d.ts.map +1 -0
- package/dist/components/features/picker/components/context.d.ts +57 -0
- package/dist/components/features/picker/components/context.d.ts.map +1 -0
- package/dist/components/features/picker/components/footer.d.ts +35 -0
- package/dist/components/features/picker/components/footer.d.ts.map +1 -0
- package/dist/components/features/picker/components/index.d.ts +36 -0
- package/dist/components/features/picker/components/index.d.ts.map +1 -0
- package/dist/components/features/picker/components/presets.d.ts +9 -0
- package/dist/components/features/picker/components/presets.d.ts.map +1 -0
- package/dist/components/features/picker/components/root.d.ts +40 -0
- package/dist/components/features/picker/components/root.d.ts.map +1 -0
- package/dist/components/features/picker/components/time-input-field.d.ts +13 -0
- package/dist/components/features/picker/components/time-input-field.d.ts.map +1 -0
- package/dist/components/features/picker/components/time-input.d.ts +13 -0
- package/dist/components/features/picker/components/time-input.d.ts.map +1 -0
- package/dist/components/features/picker/components/timezone-indicator.d.ts +14 -0
- package/dist/components/features/picker/components/timezone-indicator.d.ts.map +1 -0
- package/dist/components/features/picker/components/timezone-select.d.ts +16 -0
- package/dist/components/features/picker/components/timezone-select.d.ts.map +1 -0
- package/dist/components/features/picker/components/trigger.d.ts +23 -0
- package/dist/components/features/picker/components/trigger.d.ts.map +1 -0
- package/dist/components/features/picker/hooks/index.d.ts +5 -0
- package/dist/components/features/picker/hooks/index.d.ts.map +1 -0
- package/dist/components/features/picker/hooks/use-keyboard-shortcuts.d.ts +25 -0
- package/dist/components/features/picker/hooks/use-keyboard-shortcuts.d.ts.map +1 -0
- package/dist/components/features/picker/hooks/use-picker-state.d.ts +51 -0
- package/dist/components/features/picker/hooks/use-picker-state.d.ts.map +1 -0
- package/dist/components/features/picker/hooks/use-presets.d.ts +24 -0
- package/dist/components/features/picker/hooks/use-presets.d.ts.map +1 -0
- package/dist/components/features/picker/hooks/use-time-slots.d.ts +21 -0
- package/dist/components/features/picker/hooks/use-time-slots.d.ts.map +1 -0
- package/dist/components/features/picker/index.d.ts +8 -0
- package/dist/components/features/picker/index.d.ts.map +1 -0
- package/dist/components/features/picker/internal/use-deprecation-warning.d.ts +9 -0
- package/dist/components/features/picker/internal/use-deprecation-warning.d.ts.map +1 -0
- package/dist/components/features/picker/presets/defaults.d.ts +16 -0
- package/dist/components/features/picker/presets/defaults.d.ts.map +1 -0
- package/dist/components/features/picker/presets/index.d.ts +2 -0
- package/dist/components/features/picker/presets/index.d.ts.map +1 -0
- package/dist/components/features/picker/types.d.ts +70 -0
- package/dist/components/features/picker/types.d.ts.map +1 -0
- package/dist/components/features/picker/utils/commit.d.ts +16 -0
- package/dist/components/features/picker/utils/commit.d.ts.map +1 -0
- package/dist/components/features/picker/utils/compare.d.ts +12 -0
- package/dist/components/features/picker/utils/compare.d.ts.map +1 -0
- package/dist/components/features/picker/utils/format-value.d.ts +25 -0
- package/dist/components/features/picker/utils/format-value.d.ts.map +1 -0
- package/dist/components/features/picker/utils/format.d.ts +38 -0
- package/dist/components/features/picker/utils/format.d.ts.map +1 -0
- package/dist/components/features/picker/utils/index.d.ts +7 -0
- package/dist/components/features/picker/utils/index.d.ts.map +1 -0
- package/dist/components/features/picker/utils/range.d.ts +26 -0
- package/dist/components/features/picker/utils/range.d.ts.map +1 -0
- package/dist/components/features/picker/utils/timezone.d.ts +38 -0
- package/dist/components/features/picker/utils/timezone.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/date-picker.d.ts +10 -0
- package/dist/components/features/picker/wrappers/date-picker.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/date-range-picker.d.ts +16 -0
- package/dist/components/features/picker/wrappers/date-range-picker.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/date-range-time-picker.d.ts +16 -0
- package/dist/components/features/picker/wrappers/date-range-time-picker.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/date-time-picker.d.ts +20 -0
- package/dist/components/features/picker/wrappers/date-time-picker.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/date-time-range-picker.d.ts +16 -0
- package/dist/components/features/picker/wrappers/date-time-range-picker.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/index.d.ts +16 -0
- package/dist/components/features/picker/wrappers/index.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/internal/default-footer.d.ts +7 -0
- package/dist/components/features/picker/wrappers/internal/default-footer.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/time-picker.d.ts +14 -0
- package/dist/components/features/picker/wrappers/time-picker.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/time-range-picker.d.ts +16 -0
- package/dist/components/features/picker/wrappers/time-range-picker.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/types.d.ts +118 -0
- package/dist/components/features/picker/wrappers/types.d.ts.map +1 -0
- package/dist/components/features/tag-input/tag-input.d.ts +1 -1
- package/dist/components/features/tag-input/tag-input.d.ts.map +1 -1
- package/dist/components/features/time-picker/time-picker.d.ts +5 -0
- package/dist/components/features/time-picker/time-picker.d.ts.map +1 -1
- package/dist/components/features/time-picker/types.d.ts +5 -0
- package/dist/components/features/time-picker/types.d.ts.map +1 -1
- package/dist/components/features/time-range-picker/index.d.ts +5 -0
- package/dist/components/features/time-range-picker/index.d.ts.map +1 -1
- package/dist/components/features/time-range-picker/time-range-picker.d.ts +19 -14
- package/dist/components/features/time-range-picker/time-range-picker.d.ts.map +1 -1
- package/dist/components/features/time-range-picker/types.d.ts +20 -0
- package/dist/components/features/time-range-picker/types.d.ts.map +1 -1
- package/dist/data-table/index.mjs +22 -15
- package/dist/date-picker/index.mjs +2 -2
- package/dist/date-range-picker-DNZh06zo.mjs +77 -0
- package/dist/date-time-picker/index.mjs +1 -1
- package/dist/date-time-picker-BiobghTJ.mjs +43 -0
- package/dist/date-time-picker-C0fF7s_e.mjs +109 -0
- package/dist/date-time-range-picker-BAsH_Wv9.mjs +82 -0
- package/dist/default-footer-DbpemJVl.mjs +1037 -0
- package/dist/dropzone/index.mjs +1 -1
- package/dist/{dropzone-Bt0plEuw.mjs → dropzone-DXH0xHso.mjs} +1 -1
- package/dist/empty-content/index.mjs +1 -1
- package/dist/form/adapters/conform/index.mjs +19 -19
- package/dist/form/adapters/rhf/index.mjs +18 -18
- package/dist/form/index.mjs +2 -2
- package/dist/form/stepper/index.mjs +25 -23
- package/dist/{form-CCNN9VtJ.mjs → form-DvgKb4s4.mjs} +49 -42
- package/dist/{form-context-CeKyvO-A.mjs → form-context-0usxTumz.mjs} +3 -3
- package/dist/grid/index.mjs +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/index.mjs +44 -42
- package/dist/input-group/index.mjs +1 -1
- package/dist/{input-group-DDtz-RT7.mjs → input-group-CeMsDhOk.mjs} +1 -1
- package/dist/input-number/index.mjs +1 -1
- package/dist/{input-number-Diu-C6d5.mjs → input-number-BU4nno8J.mjs} +1 -1
- package/dist/loader-overlay/index.mjs +1 -1
- package/dist/logo/index.mjs +3 -0
- package/dist/logo/themed/index.mjs +106 -0
- package/dist/logo-BQVyMDDx.mjs +23 -0
- package/dist/logo-text-BW31T2dS.mjs +227 -0
- package/dist/map/index.mjs +1 -1
- package/dist/{map-qo7bY_g_.mjs → map-t6n7VaX1.mjs} +24 -27
- package/dist/more-actions/index.mjs +2 -2
- package/dist/{more-actions-Ca5qqd0H.mjs → more-actions-Bp0b_jek.mjs} +2 -2
- package/dist/multi-select/index.mjs +1 -1
- package/dist/{multi-select-DM_dxnSV.mjs → multi-select-7jly2Hcd.mjs} +6 -6
- package/dist/page-title/index.mjs +1 -1
- package/dist/picker/index.mjs +273 -0
- package/dist/rich-text-editor/index.mjs +1 -1
- package/dist/{rich-text-editor-CQH_U4T5.mjs → rich-text-editor-Ddqx_EiO.mjs} +1 -1
- package/dist/select/index.mjs +1 -1
- package/dist/select-By1ZqPgr.mjs +94 -0
- package/dist/select-Ck0szhAH.mjs +73 -0
- package/dist/sidebar/index.mjs +1 -1
- package/dist/{sidebar-B8LQJiNI.mjs → sidebar-CUnFkH7o.mjs} +32 -32
- package/dist/skeleton/index.mjs +1 -1
- package/dist/{skeleton-D4HOEiOZ.mjs → skeleton-CxAhQT6T.mjs} +1 -1
- package/dist/stepper/index.mjs +1 -1
- package/dist/{stepper-Beb-zbdL.mjs → stepper-BMC_QbJK.mjs} +7 -7
- package/dist/styles/root.css +4 -2
- package/dist/styles/shadcn/shadcn.css +212 -213
- 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-Bf4GMptp.mjs → tag-input-CV1JbKTm.mjs} +1 -1
- package/dist/task-queue/index.mjs +1 -1
- package/dist/{task-queue-dropdown-D-LncEWm.mjs → task-queue-dropdown-J1FuQOSr.mjs} +3 -3
- package/dist/textarea/index.mjs +1 -1
- package/dist/theme/index.mjs +1 -1
- package/dist/{themes-CAiN4b6G.mjs → themes-08-znmBI.mjs} +16 -16
- package/dist/time-input-9LdNL0Us.mjs +196 -0
- package/dist/time-picker/index.mjs +1 -1
- package/dist/time-picker-B-vpUClR.mjs +45 -0
- package/dist/time-picker-C840fLl6.mjs +49 -0
- package/dist/timezone-indicator-COoeMKKs.mjs +27 -0
- package/dist/{to-api-format-CgKcC9SK.mjs → to-api-format-CmXTvYka.mjs} +58 -243
- package/dist/toast/index.mjs +2 -2
- package/dist/{toast-DDdLgY53.mjs → toast-Bd5Kk7BB.mjs} +1 -1
- package/dist/tooltip/index.mjs +1 -1
- package/dist/transfer/index.mjs +1 -1
- package/dist/{transfer-CoGPwOc6.mjs → transfer-CuJGL420.mjs} +6 -6
- package/dist/{types-CKIe2WlV.mjs → types-DvMIxilw.mjs} +9 -3
- package/dist/typography/index.mjs +1 -1
- package/dist/{typography-TRKP_CLT.mjs → typography-CBwfg-vz.mjs} +5 -5
- package/dist/{use-copy-to-clipboard-D7KyLIAt.mjs → use-copy-to-clipboard-ZHDvfV3W.mjs} +1 -1
- package/dist/use-deprecation-warning-Dy_DOyLu.mjs +20 -0
- package/dist/{use-display-touched-C-afz17j.mjs → use-display-touched-CiY6ajpy.mjs} +5 -5
- package/dist/{use-option-picker-BXQOfyrK.mjs → use-option-picker-DV5O68eV.mjs} +1 -1
- package/dist/utils/index.mjs +1 -1
- package/dist/visually-hidden/index.mjs +1 -1
- package/package.json +40 -25
- package/dist/calendar-date-picker-BaykEs6j.mjs +0 -749
- package/dist/date-time-picker-DKOxrhmc.mjs +0 -193
- package/dist/select-zxwykvQn.mjs +0 -163
- package/dist/time-picker-BZF5jbF6.mjs +0 -99
- package/dist/use-date-constraints-R3H4lIoT.mjs +0 -41
- /package/dist/{action-row-DnhBhMtt.mjs → action-row-DXw4UnHU.mjs} +0 -0
- /package/dist/{empty-content-CBh5bbtJ.mjs → empty-content-DTk_lwnh.mjs} +0 -0
- /package/dist/{hooks-DQXVwbrs.mjs → hooks-BPxgIHKV.mjs} +0 -0
- /package/dist/{loader-overlay-C2WDla6V.mjs → loader-overlay-B3YEoOFJ.mjs} +0 -0
- /package/dist/{map-leaflet-imports-yWwH4CHB.mjs → map-leaflet-imports-C8l0RTTP.mjs} +0 -0
- /package/dist/{page-title-ChLiv6gB.mjs → page-title-CGW3f4qH.mjs} +0 -0
- /package/dist/{skeleton-D2xuJdE1.mjs → skeleton-B1NOdZGM.mjs} +0 -0
- /package/dist/{switch-DcSF42Kc.mjs → switch-BcQaR1Bp.mjs} +0 -0
- /package/dist/{table-DWGT4cqh.mjs → table-ouGk4Vxe.mjs} +0 -0
- /package/dist/{textarea-BoChBcFz.mjs → textarea-q-k7DYwi.mjs} +0 -0
- /package/dist/{toast-D5XD7goD.mjs → toast-BWol1pyV.mjs} +0 -0
- /package/dist/{tooltip-a7NTDCWw.mjs → tooltip-CHuzXR_O.mjs} +0 -0
- /package/dist/{utils-BwB1mIdZ.mjs → utils-C07H7h7q.mjs} +0 -0
- /package/dist/{visuallyhidden-BHOPczmW.mjs → visuallyhidden-CoIJOJ9z.mjs} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as cn } from "./utils-C8KwMfT_.mjs";
|
|
2
2
|
import { t as ButtonGroup } from "./button-group-CYPka2zz.mjs";
|
|
3
|
-
import { t as Button } from "./button-
|
|
3
|
+
import { t as Button } from "./button-Rw1xI-k9.mjs";
|
|
4
4
|
import { i as CommandGroup, o as CommandItem, r as CommandEmpty, s as CommandList, t as Command } from "./command-DqHWukGK.mjs";
|
|
5
|
-
import { i as InputGroupInput, n as InputGroupAddon, t as InputGroup } from "./input-group-
|
|
5
|
+
import { i as InputGroupInput, n as InputGroupAddon, t as InputGroup } from "./input-group-CeMsDhOk.mjs";
|
|
6
6
|
import { t as Spinner } from "./spinner-CgPI3DDi.mjs";
|
|
7
7
|
import { CheckIcon, ChevronRightIcon, CircleIcon, LayersIcon, LoaderCircleIcon, MapPinIcon, MaximizeIcon, MinimizeIcon, MinusIcon, NavigationIcon, PenLineIcon, PentagonIcon, PlusIcon, SearchIcon, SquareIcon, Trash2Icon, Undo2Icon, WaypointsIcon } from "lucide-react";
|
|
8
|
-
import * as React
|
|
8
|
+
import * as React from "react";
|
|
9
9
|
import { Suspense, createContext, lazy, useContext, useEffect, useRef, useState } from "react";
|
|
10
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
@@ -17,8 +17,8 @@ import { renderToString } from "react-dom/server.browser";
|
|
|
17
17
|
* or falls back to prefers-color-scheme media query.
|
|
18
18
|
*/
|
|
19
19
|
function useTheme() {
|
|
20
|
-
const [resolvedTheme, setResolvedTheme] = React
|
|
21
|
-
React
|
|
20
|
+
const [resolvedTheme, setResolvedTheme] = React.useState("light");
|
|
21
|
+
React.useEffect(() => {
|
|
22
22
|
const detect = () => {
|
|
23
23
|
if (document.documentElement.classList.contains("dark")) return "dark";
|
|
24
24
|
if (window.matchMedia("(prefers-color-scheme: dark)").matches) return "dark";
|
|
@@ -49,37 +49,34 @@ function useTheme() {
|
|
|
49
49
|
*/
|
|
50
50
|
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
51
51
|
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
52
|
-
DropdownMenuPrimitive.Group;
|
|
53
|
-
DropdownMenuPrimitive.Portal;
|
|
54
|
-
DropdownMenuPrimitive.Sub;
|
|
55
52
|
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
56
|
-
const DropdownMenuSubTrigger = React
|
|
53
|
+
const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.SubTrigger, {
|
|
57
54
|
ref,
|
|
58
55
|
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
56
|
...props,
|
|
60
57
|
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })]
|
|
61
58
|
}));
|
|
62
59
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
63
|
-
const DropdownMenuSubContent = React
|
|
60
|
+
const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.SubContent, {
|
|
64
61
|
ref,
|
|
65
62
|
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
63
|
...props
|
|
67
64
|
}));
|
|
68
65
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
69
|
-
const DropdownMenuContent = React
|
|
66
|
+
const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, {
|
|
70
67
|
ref,
|
|
71
68
|
sideOffset,
|
|
72
69
|
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
70
|
...props
|
|
74
71
|
}) }));
|
|
75
72
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
76
|
-
const DropdownMenuItem = React
|
|
73
|
+
const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, {
|
|
77
74
|
ref,
|
|
78
75
|
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
76
|
...props
|
|
80
77
|
}));
|
|
81
78
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
82
|
-
const DropdownMenuCheckboxItem = React
|
|
79
|
+
const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.CheckboxItem, {
|
|
83
80
|
ref,
|
|
84
81
|
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
82
|
checked,
|
|
@@ -90,7 +87,7 @@ const DropdownMenuCheckboxItem = React$1.forwardRef(({ className, children, chec
|
|
|
90
87
|
}), children]
|
|
91
88
|
}));
|
|
92
89
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
93
|
-
const DropdownMenuRadioItem = React
|
|
90
|
+
const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.RadioItem, {
|
|
94
91
|
ref,
|
|
95
92
|
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
93
|
...props,
|
|
@@ -100,13 +97,13 @@ const DropdownMenuRadioItem = React$1.forwardRef(({ className, children, ...prop
|
|
|
100
97
|
}), children]
|
|
101
98
|
}));
|
|
102
99
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
103
|
-
const DropdownMenuLabel = React
|
|
100
|
+
const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, {
|
|
104
101
|
ref,
|
|
105
102
|
className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
|
|
106
103
|
...props
|
|
107
104
|
}));
|
|
108
105
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
109
|
-
const DropdownMenuSeparator = React
|
|
106
|
+
const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, {
|
|
110
107
|
ref,
|
|
111
108
|
className: cn("bg-muted -mx-1 my-1 h-px", className),
|
|
112
109
|
...props
|
|
@@ -147,20 +144,20 @@ function buildSearchUrl({ query, bbox, lang, lat, limit, locationBiasScale, lon,
|
|
|
147
144
|
return String(url);
|
|
148
145
|
}
|
|
149
146
|
function useDebounce(value, delay = 300) {
|
|
150
|
-
const [debouncedValue, setDebouncedValue] = React
|
|
151
|
-
React
|
|
147
|
+
const [debouncedValue, setDebouncedValue] = React.useState(value);
|
|
148
|
+
React.useEffect(() => {
|
|
152
149
|
const timer = setTimeout(() => setDebouncedValue(value), delay);
|
|
153
150
|
return () => clearTimeout(timer);
|
|
154
151
|
}, [value, delay]);
|
|
155
152
|
return debouncedValue;
|
|
156
153
|
}
|
|
157
154
|
function usePlaceSearch({ debounceMs, query, ...props }) {
|
|
158
|
-
const [results, setResults] = React
|
|
159
|
-
const [isLoading, setIsLoading] = React
|
|
160
|
-
const [error, setError] = React
|
|
161
|
-
const [hasSearched, setHasSearched] = React
|
|
155
|
+
const [results, setResults] = React.useState([]);
|
|
156
|
+
const [isLoading, setIsLoading] = React.useState(false);
|
|
157
|
+
const [error, setError] = React.useState(null);
|
|
158
|
+
const [hasSearched, setHasSearched] = React.useState(false);
|
|
162
159
|
const debouncedQuery = useDebounce(query, debounceMs);
|
|
163
|
-
React
|
|
160
|
+
React.useEffect(() => {
|
|
164
161
|
if (!debouncedQuery.trim()) {
|
|
165
162
|
setResults([]);
|
|
166
163
|
setIsLoading(false);
|
|
@@ -216,8 +213,8 @@ function usePlaceSearch({ debounceMs, query, ...props }) {
|
|
|
216
213
|
};
|
|
217
214
|
}
|
|
218
215
|
function PlaceAutocomplete({ debounceMs = 300, lang, limit = 5, bbox, lat, lon, zoom, locationBiasScale, className, value: controlledValue, defaultValue = "", onChange: controlledOnChange, onPlaceSelect, onResultsChange, ...props }) {
|
|
219
|
-
const [internalValue, setInternalValue] = React
|
|
220
|
-
const [searchQuery, setSearchQuery] = React
|
|
216
|
+
const [internalValue, setInternalValue] = React.useState(defaultValue);
|
|
217
|
+
const [searchQuery, setSearchQuery] = React.useState("");
|
|
221
218
|
const isControlled = controlledValue !== void 0;
|
|
222
219
|
const displayValue = isControlled ? controlledValue : internalValue;
|
|
223
220
|
const { results, isLoading, error, hasSearched } = usePlaceSearch({
|
|
@@ -231,7 +228,7 @@ function PlaceAutocomplete({ debounceMs = 300, lang, limit = 5, bbox, lat, lon,
|
|
|
231
228
|
zoom,
|
|
232
229
|
locationBiasScale
|
|
233
230
|
});
|
|
234
|
-
React
|
|
231
|
+
React.useEffect(() => {
|
|
235
232
|
onResultsChange?.(results);
|
|
236
233
|
}, [results, onResultsChange]);
|
|
237
234
|
const hasNoResults = hasSearched && !isLoading && !error && results.length === 0;
|
|
@@ -304,7 +301,7 @@ function PlaceAutocomplete({ debounceMs = 300, lang, limit = 5, bbox, lat, lon,
|
|
|
304
301
|
//#region ../shadcn/ui/map.tsx
|
|
305
302
|
let _useMap;
|
|
306
303
|
let _useMapEvents;
|
|
307
|
-
if (typeof window !== "undefined") import("./map-leaflet-imports-
|
|
304
|
+
if (typeof window !== "undefined") import("./map-leaflet-imports-C8l0RTTP.mjs").then((mod) => {
|
|
308
305
|
_useMap = mod.useMap;
|
|
309
306
|
_useMapEvents = mod.useMapEvents;
|
|
310
307
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as ActionRow } from "../action-row-
|
|
2
|
-
import { t as MoreActions } from "../more-actions-
|
|
1
|
+
import { t as ActionRow } from "../action-row-DXw4UnHU.mjs";
|
|
2
|
+
import { t as MoreActions } from "../more-actions-Bp0b_jek.mjs";
|
|
3
3
|
export { ActionRow, MoreActions };
|
|
@@ -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
3
|
import { t as ResponsiveDropdown } from "./responsive-dropdown-IFroDgKn.mjs";
|
|
4
|
-
import { t as Tooltip } from "./tooltip-
|
|
5
|
-
import { t as ActionRow } from "./action-row-
|
|
4
|
+
import { t as Tooltip } from "./tooltip-CHuzXR_O.mjs";
|
|
5
|
+
import { t as ActionRow } from "./action-row-DXw4UnHU.mjs";
|
|
6
6
|
import { Ellipsis } from "lucide-react";
|
|
7
7
|
import { useState } from "react";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as MultiSelect } from "../multi-select-
|
|
1
|
+
import { t as MultiSelect } from "../multi-select-7jly2Hcd.mjs";
|
|
2
2
|
export { MultiSelect };
|
|
@@ -2,11 +2,11 @@ import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
|
2
2
|
import { t as Badge } from "./badge-DJR33ftJ.mjs";
|
|
3
3
|
import { t as Separator } from "./separator-DXVTncCK.mjs";
|
|
4
4
|
import { t as ResponsivePopover } from "./responsive-popover-D-t9bxSN.mjs";
|
|
5
|
-
import { t as LoaderOverlay } from "./loader-overlay-
|
|
6
|
-
import { n as OptionList, t as useOptionPicker } from "./use-option-picker-
|
|
5
|
+
import { t as LoaderOverlay } from "./loader-overlay-B3YEoOFJ.mjs";
|
|
6
|
+
import { n as OptionList, t as useOptionPicker } from "./use-option-picker-DV5O68eV.mjs";
|
|
7
7
|
import { cva } from "class-variance-authority";
|
|
8
8
|
import { CheckIcon, ChevronDown, WandSparkles, XCircle, XIcon } from "lucide-react";
|
|
9
|
-
import * as React
|
|
9
|
+
import * as React from "react";
|
|
10
10
|
import { useEffect } from "react";
|
|
11
11
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region src/components/features/multi-select/multi-select.tsx
|
|
@@ -25,9 +25,9 @@ const multiSelectVariants = cva("flex items-center gap-1 rounded-md border px-2
|
|
|
25
25
|
});
|
|
26
26
|
const EMPTY_ARRAY = [];
|
|
27
27
|
function MultiSelect({ options, onValueChange, variant, defaultValue = EMPTY_ARRAY, value, placeholder = "Select options", animation = 0, maxCount = 3, modalPopover = false, className, boxClassName, actions, onBadgeClick, badgeClassName, clickableBadges = false, showCloseButton = true, showClearButton = true, showSelectAll = false, disabled = false, id, name, isLoading = false, emptyContent = "No results found.", responsive = true, sheetTitle }) {
|
|
28
|
-
const [isPopoverOpen, setIsPopoverOpen] = React
|
|
29
|
-
const [isAnimating, setIsAnimating] = React
|
|
30
|
-
const [internalValues, setInternalValues] = React
|
|
28
|
+
const [isPopoverOpen, setIsPopoverOpen] = React.useState(false);
|
|
29
|
+
const [isAnimating, setIsAnimating] = React.useState(false);
|
|
30
|
+
const [internalValues, setInternalValues] = React.useState(defaultValue);
|
|
31
31
|
useEffect(() => {
|
|
32
32
|
if (value === void 0 && defaultValue) setInternalValues(defaultValue);
|
|
33
33
|
}, [defaultValue]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as PageTitle } from "../page-title-
|
|
1
|
+
import { t as PageTitle } from "../page-title-CGW3f4qH.mjs";
|
|
2
2
|
export { PageTitle };
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { t as cn } from "../cn-D2KYQ917.mjs";
|
|
2
|
+
import { i as SelectItem, l as SelectTrigger, n as SelectContent, t as Select, u as SelectValue } from "../select-By1ZqPgr.mjs";
|
|
3
|
+
import { A as zonedDateToIso, C as PickerContext, D as getBrowserTimezone, E as formatTimezoneLabel, F as isDateBearingMode, I as isRangeMode, L as isTimeBearingMode, M as DATE_BEARING_MODES, N as RANGE_MODES, O as getTimezoneOffset, P as TIME_BEARING_MODES, S as PickerContent, T as formatInTimezone, _ as formatTimeLabel, a as PickerFooter, b as resolveCommit, c as PickerTrigger, d as DATETIME_PRESETS, f as DATE_PRESETS, g as dateToYYYYMMDD, i as PickerClear, j as ALLOWED_STEPS, k as isoToZonedDate, l as Picker$1, m as usePickerState, n as PickerApply, o as PickerReset, p as getDefaultPresets, r as PickerCancel, s as formatPickerValue, t as DefaultFooter, u as usePresets, v as isValidTimeString, w as usePickerContext, x as useKeyboardShortcuts, y as parseTimeString } from "../default-footer-DbpemJVl.mjs";
|
|
4
|
+
import { t as PickerCalendar } from "../calendar-D_DriVHT.mjs";
|
|
5
|
+
import { n as PickerPresets, t as DateRangePicker } from "../date-range-picker-DNZh06zo.mjs";
|
|
6
|
+
import { n as useTimeSlots, t as PickerTimeInput } from "../time-input-9LdNL0Us.mjs";
|
|
7
|
+
import { t as DateTimePicker } from "../date-time-picker-C0fF7s_e.mjs";
|
|
8
|
+
import { t as PickerTimezoneIndicator } from "../timezone-indicator-COoeMKKs.mjs";
|
|
9
|
+
import { t as TimePicker } from "../time-picker-B-vpUClR.mjs";
|
|
10
|
+
import { t as DateTimeRangePicker } from "../date-time-range-picker-BAsH_Wv9.mjs";
|
|
11
|
+
import { Clock, Globe } from "lucide-react";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { differenceInCalendarDays } from "date-fns";
|
|
14
|
+
//#region src/components/features/picker/components/timezone-select.tsx
|
|
15
|
+
function PickerTimezoneSelect({ options, onChange, className, placeholder = "Select timezone" }) {
|
|
16
|
+
const { mode, timezone } = usePickerContext();
|
|
17
|
+
if (!isTimeBearingMode(mode)) return null;
|
|
18
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
19
|
+
"data-slot": "picker-tz-select",
|
|
20
|
+
className: cn("flex items-center gap-2 px-3 py-2", className),
|
|
21
|
+
children: [/* @__PURE__ */ jsx(Globe, { className: "text-muted-foreground size-4 shrink-0" }), /* @__PURE__ */ jsxs(Select, {
|
|
22
|
+
value: timezone,
|
|
23
|
+
onValueChange: onChange,
|
|
24
|
+
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
25
|
+
className: "hover:bg-accent h-8 min-w-[180px] border-0 bg-transparent px-2 text-xs shadow-none",
|
|
26
|
+
children: /* @__PURE__ */ jsx(SelectValue, { placeholder })
|
|
27
|
+
}), /* @__PURE__ */ jsx(SelectContent, { children: options.map((opt) => /* @__PURE__ */ jsx(SelectItem, {
|
|
28
|
+
value: opt.value,
|
|
29
|
+
className: "text-xs",
|
|
30
|
+
children: opt.label
|
|
31
|
+
}, opt.value)) })]
|
|
32
|
+
})]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
PickerTimezoneSelect.displayName = "Picker.TimezoneSelect";
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/components/features/picker/components/index.ts
|
|
38
|
+
const Picker = Object.assign(Picker$1, {
|
|
39
|
+
Trigger: PickerTrigger,
|
|
40
|
+
Content: PickerContent,
|
|
41
|
+
Calendar: PickerCalendar,
|
|
42
|
+
TimeInput: PickerTimeInput,
|
|
43
|
+
Presets: PickerPresets,
|
|
44
|
+
Footer: PickerFooter,
|
|
45
|
+
Apply: PickerApply,
|
|
46
|
+
Reset: PickerReset,
|
|
47
|
+
Cancel: PickerCancel,
|
|
48
|
+
Clear: PickerClear,
|
|
49
|
+
TimezoneIndicator: PickerTimezoneIndicator,
|
|
50
|
+
TimezoneSelect: PickerTimezoneSelect
|
|
51
|
+
});
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/components/features/picker/utils/compare.ts
|
|
54
|
+
/** Strict equality of two nullable Date references by millisecond value. */
|
|
55
|
+
function isSameDate(a, b) {
|
|
56
|
+
if (a === b) return true;
|
|
57
|
+
if (a === null || b === null) return false;
|
|
58
|
+
return a.getTime() === b.getTime();
|
|
59
|
+
}
|
|
60
|
+
/** Equality of two nullable date ranges. Compares from, to (by ms), and preset. */
|
|
61
|
+
function isSameDateRange(a, b) {
|
|
62
|
+
if (a === b) return true;
|
|
63
|
+
if (a === null || b === null) return false;
|
|
64
|
+
return a.from.getTime() === b.from.getTime() && a.to.getTime() === b.to.getTime() && a.preset === b.preset;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Equality of two nullable string ranges. Used for time-of-day, time-range,
|
|
68
|
+
* and datetime-range value shapes (all structurally identical).
|
|
69
|
+
* Compares from, to, and optional preset.
|
|
70
|
+
*/
|
|
71
|
+
function isSameStringRange(a, b) {
|
|
72
|
+
if (a === b) return true;
|
|
73
|
+
if (a === null || b === null) return false;
|
|
74
|
+
return a.from === b.from && a.to === b.to && a.preset === b.preset;
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region src/components/features/picker/utils/range.ts
|
|
78
|
+
/**
|
|
79
|
+
* Number of calendar days between two dates. Always non-negative.
|
|
80
|
+
*
|
|
81
|
+
* Uses calendar-day boundaries (not 24-hour windows), so a range from
|
|
82
|
+
* 23:59 today to 00:00 tomorrow counts as 1 day, not 0.
|
|
83
|
+
*/
|
|
84
|
+
function getDaysDifference(from, to) {
|
|
85
|
+
return Math.abs(differenceInCalendarDays(to, from));
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Validate a range against a maximum span (inclusive).
|
|
89
|
+
*
|
|
90
|
+
* - Returns `true` when `maxRange` is undefined.
|
|
91
|
+
* - Returns `true` when the range spans at most `maxRange` days.
|
|
92
|
+
*/
|
|
93
|
+
function isRangeValid(from, to, maxRange) {
|
|
94
|
+
if (maxRange === void 0) return true;
|
|
95
|
+
return getDaysDifference(from, to) <= maxRange;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Clamp a range to fit within `maxRange` days.
|
|
99
|
+
*
|
|
100
|
+
* If the range already fits, returns the original `{from, to}`.
|
|
101
|
+
* Otherwise, holds `from` and clamps `to` forward to exactly `maxRange`
|
|
102
|
+
* days after `from`.
|
|
103
|
+
*/
|
|
104
|
+
function clampRange(from, to, maxRange) {
|
|
105
|
+
if (isRangeValid(from, to, maxRange)) return {
|
|
106
|
+
from,
|
|
107
|
+
to
|
|
108
|
+
};
|
|
109
|
+
return {
|
|
110
|
+
from,
|
|
111
|
+
to: new Date(from.getTime() + maxRange * 24 * 60 * 60 * 1e3)
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region src/components/features/picker/wrappers/date-picker.tsx
|
|
116
|
+
function DatePicker({ value, onChange, placeholder = "Pick a date", clearable = true, responsive = true, sheetTitle = "Pick a date", numberOfMonths = 1, triggerLabel, icon, disabled, className, triggerClassName, popoverClassName, id, sheetDescription, modal, commit, disablePast, disableFuture, minDate, maxDate, dateFormat }) {
|
|
117
|
+
return /* @__PURE__ */ jsx(Picker$1.Root, {
|
|
118
|
+
mode: "date",
|
|
119
|
+
value,
|
|
120
|
+
onChange,
|
|
121
|
+
commit,
|
|
122
|
+
responsive,
|
|
123
|
+
presets: [],
|
|
124
|
+
disablePast,
|
|
125
|
+
disableFuture,
|
|
126
|
+
minDate,
|
|
127
|
+
maxDate,
|
|
128
|
+
children: /* @__PURE__ */ jsx(PickerContent, {
|
|
129
|
+
trigger: /* @__PURE__ */ jsx(PickerTrigger, {
|
|
130
|
+
placeholder,
|
|
131
|
+
clearable,
|
|
132
|
+
disabled,
|
|
133
|
+
className,
|
|
134
|
+
triggerClassName,
|
|
135
|
+
id,
|
|
136
|
+
icon,
|
|
137
|
+
children: (v) => triggerLabel ? triggerLabel(v) : formatPickerValue(v, "date", { dateFormat })
|
|
138
|
+
}),
|
|
139
|
+
sheetTitle,
|
|
140
|
+
sheetDescription,
|
|
141
|
+
modal,
|
|
142
|
+
contentClassName: popoverClassName,
|
|
143
|
+
footer: /* @__PURE__ */ jsx(DefaultFooter, {}),
|
|
144
|
+
children: /* @__PURE__ */ jsx(PickerCalendar, {
|
|
145
|
+
numberOfMonths,
|
|
146
|
+
minDate,
|
|
147
|
+
maxDate,
|
|
148
|
+
disablePast,
|
|
149
|
+
disableFuture
|
|
150
|
+
})
|
|
151
|
+
})
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
DatePicker.displayName = "DatePicker";
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region src/components/features/picker/wrappers/date-range-time-picker.tsx
|
|
157
|
+
function DateRangeTimePicker({ value, onChange, placeholder = "Pick a date range with time", clearable = true, responsive = true, sheetTitle = "Pick a date range with time", timezone, step = 15, hourCycle, numberOfMonths = 2, hideTimezone = false, triggerLabel, icon, disabled, className, triggerClassName, popoverClassName, id, sheetDescription, modal, disablePast, disableFuture, minDate, maxDate, presets, excludePresets, dateFormat, timeFormat }) {
|
|
158
|
+
return /* @__PURE__ */ jsx(Picker$1.Root, {
|
|
159
|
+
mode: "date-range-time",
|
|
160
|
+
value,
|
|
161
|
+
onChange,
|
|
162
|
+
responsive,
|
|
163
|
+
timezone,
|
|
164
|
+
step,
|
|
165
|
+
hourCycle,
|
|
166
|
+
hideTimezone,
|
|
167
|
+
presets,
|
|
168
|
+
excludePresets,
|
|
169
|
+
disablePast,
|
|
170
|
+
disableFuture,
|
|
171
|
+
minDate,
|
|
172
|
+
maxDate,
|
|
173
|
+
children: /* @__PURE__ */ jsx(PickerContent, {
|
|
174
|
+
trigger: /* @__PURE__ */ jsx(PickerTrigger, {
|
|
175
|
+
placeholder,
|
|
176
|
+
clearable,
|
|
177
|
+
disabled,
|
|
178
|
+
className,
|
|
179
|
+
triggerClassName,
|
|
180
|
+
id,
|
|
181
|
+
icon,
|
|
182
|
+
children: (v) => triggerLabel ? triggerLabel(v) : formatPickerValue(v, "date-range-time", {
|
|
183
|
+
timezone,
|
|
184
|
+
hourCycle,
|
|
185
|
+
dateFormat,
|
|
186
|
+
timeFormat
|
|
187
|
+
})
|
|
188
|
+
}),
|
|
189
|
+
sheetTitle,
|
|
190
|
+
sheetDescription,
|
|
191
|
+
modal,
|
|
192
|
+
contentClassName: popoverClassName,
|
|
193
|
+
footer: /* @__PURE__ */ jsx(DefaultFooter, {}),
|
|
194
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
195
|
+
className: "flex flex-col md:flex-row",
|
|
196
|
+
children: [/* @__PURE__ */ jsx(PickerPresets, {}), /* @__PURE__ */ jsxs("div", {
|
|
197
|
+
className: "flex flex-col",
|
|
198
|
+
children: [
|
|
199
|
+
/* @__PURE__ */ jsx(PickerCalendar, {
|
|
200
|
+
numberOfMonths,
|
|
201
|
+
minDate,
|
|
202
|
+
maxDate,
|
|
203
|
+
disablePast,
|
|
204
|
+
disableFuture
|
|
205
|
+
}),
|
|
206
|
+
/* @__PURE__ */ jsxs("div", {
|
|
207
|
+
className: "border-t p-3",
|
|
208
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
209
|
+
className: "text-muted-foreground mb-1 text-xs",
|
|
210
|
+
children: "Time of day"
|
|
211
|
+
}), /* @__PURE__ */ jsx(PickerTimeInput, { target: "embedded-from" })]
|
|
212
|
+
}),
|
|
213
|
+
/* @__PURE__ */ jsx(PickerTimezoneIndicator, {})
|
|
214
|
+
]
|
|
215
|
+
})]
|
|
216
|
+
})
|
|
217
|
+
})
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
DateRangeTimePicker.displayName = "DateRangeTimePicker";
|
|
221
|
+
//#endregion
|
|
222
|
+
//#region src/components/features/picker/wrappers/time-range-picker.tsx
|
|
223
|
+
const DEFAULT_TIME_ICON = /* @__PURE__ */ jsx(Clock, { className: "text-muted-foreground size-4 shrink-0" });
|
|
224
|
+
function TimeRangePicker({ value, onChange, placeholder = "Pick a time range", clearable = true, responsive = true, sheetTitle = "Pick a time range", step = 15, hourCycle, timeFormat, triggerLabel, icon, disabled, className, triggerClassName, popoverClassName, id, sheetDescription, modal, commit }) {
|
|
225
|
+
return /* @__PURE__ */ jsx(Picker$1.Root, {
|
|
226
|
+
mode: "time-range",
|
|
227
|
+
value,
|
|
228
|
+
onChange,
|
|
229
|
+
commit,
|
|
230
|
+
responsive,
|
|
231
|
+
step,
|
|
232
|
+
hourCycle,
|
|
233
|
+
children: /* @__PURE__ */ jsx(PickerContent, {
|
|
234
|
+
trigger: /* @__PURE__ */ jsx(PickerTrigger, {
|
|
235
|
+
placeholder,
|
|
236
|
+
clearable,
|
|
237
|
+
disabled,
|
|
238
|
+
className,
|
|
239
|
+
triggerClassName,
|
|
240
|
+
id,
|
|
241
|
+
icon: icon ?? DEFAULT_TIME_ICON,
|
|
242
|
+
children: (v) => triggerLabel ? triggerLabel(v) : formatPickerValue(v, "time-range", {
|
|
243
|
+
hourCycle,
|
|
244
|
+
timeFormat
|
|
245
|
+
})
|
|
246
|
+
}),
|
|
247
|
+
sheetTitle,
|
|
248
|
+
sheetDescription,
|
|
249
|
+
modal,
|
|
250
|
+
contentClassName: popoverClassName,
|
|
251
|
+
footer: /* @__PURE__ */ jsx(DefaultFooter, {}),
|
|
252
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
253
|
+
className: "flex gap-2 p-3",
|
|
254
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
255
|
+
className: "flex-1",
|
|
256
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
257
|
+
className: "text-muted-foreground mb-1 text-xs",
|
|
258
|
+
children: "From"
|
|
259
|
+
}), /* @__PURE__ */ jsx(PickerTimeInput, { target: "range-from" })]
|
|
260
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
261
|
+
className: "flex-1",
|
|
262
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
263
|
+
className: "text-muted-foreground mb-1 text-xs",
|
|
264
|
+
children: "To"
|
|
265
|
+
}), /* @__PURE__ */ jsx(PickerTimeInput, { target: "range-to" })]
|
|
266
|
+
})]
|
|
267
|
+
})
|
|
268
|
+
})
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
TimeRangePicker.displayName = "TimeRangePicker";
|
|
272
|
+
//#endregion
|
|
273
|
+
export { ALLOWED_STEPS, DATETIME_PRESETS, DATE_BEARING_MODES, DATE_PRESETS, DatePicker, DateRangePicker, DateRangeTimePicker, DateTimePicker, DateTimeRangePicker, Picker, PickerApply, PickerCalendar, PickerCancel, PickerClear, PickerContent, PickerContext, PickerFooter, PickerPresets, PickerReset, PickerTimeInput, PickerTimezoneIndicator, PickerTimezoneSelect, PickerTrigger, RANGE_MODES, TIME_BEARING_MODES, TimePicker, TimeRangePicker, clampRange, dateToYYYYMMDD, formatInTimezone, formatPickerValue, formatTimeLabel, formatTimezoneLabel, getBrowserTimezone, getDaysDifference, getDefaultPresets, getTimezoneOffset, isDateBearingMode, isRangeMode, isRangeValid, isSameDate, isSameDateRange, isSameStringRange, isTimeBearingMode, isValidTimeString, isoToZonedDate, parseTimeString, resolveCommit, useKeyboardShortcuts, usePickerContext, usePickerState, usePresets, useTimeSlots, zonedDateToIso };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as useRichTextEditor, r as RichTextContent, t as RichTextEditor } from "../rich-text-editor-
|
|
1
|
+
import { n as useRichTextEditor, r as RichTextContent, t as RichTextEditor } from "../rich-text-editor-Ddqx_EiO.mjs";
|
|
2
2
|
export { RichTextContent, RichTextEditor, useRichTextEditor };
|
|
@@ -3,7 +3,7 @@ import { t as Button } from "./button-BllvE9Lm.mjs";
|
|
|
3
3
|
import { t as Icon } from "./icon-wrapper-DuLp3RM1.mjs";
|
|
4
4
|
import { t as Input } from "./input-FKGqZypx.mjs";
|
|
5
5
|
import { t as ResponsivePopover } from "./responsive-popover-D-t9bxSN.mjs";
|
|
6
|
-
import { t as Tooltip } from "./tooltip-
|
|
6
|
+
import { t as Tooltip } from "./tooltip-CHuzXR_O.mjs";
|
|
7
7
|
import { BoldIcon, ItalicIcon, LinkIcon, StrikethroughIcon, UnderlineIcon, UnlinkIcon } from "lucide-react";
|
|
8
8
|
import { createContext, use, useCallback, useState } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
package/dist/select/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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-
|
|
1
|
+
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-Ck0szhAH.mjs";
|
|
2
2
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { t as cn } from "./utils-C8KwMfT_.mjs";
|
|
2
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
6
|
+
//#region ../shadcn/ui/select.tsx
|
|
7
|
+
const Select = ({ ...props }) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Root, {
|
|
9
|
+
"data-slot": "select",
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
const SelectGroup = ({ ...props }) => {
|
|
14
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Group, {
|
|
15
|
+
"data-slot": "select-group",
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const SelectValue = ({ ...props }) => {
|
|
20
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Value, {
|
|
21
|
+
"data-slot": "select-value",
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
const SelectTrigger = ({ className, children, ...props }) => {
|
|
26
|
+
return /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, {
|
|
27
|
+
"data-slot": "select-trigger",
|
|
28
|
+
className: cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive rounded-md border bg-transparent py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "flex h-auto min-h-10 w-full items-center justify-between px-3 text-sm font-medium", className),
|
|
29
|
+
...props,
|
|
30
|
+
children: [children, /* @__PURE__ */ jsx(SelectPrimitive.Icon, {
|
|
31
|
+
asChild: true,
|
|
32
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" })
|
|
33
|
+
})]
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
const SelectContent = ({ className, children, position = "popper", ...props }) => {
|
|
37
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(SelectPrimitive.Content, {
|
|
38
|
+
"data-slot": "select-content",
|
|
39
|
+
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 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", "w-[var(--radix-select-trigger-width)]", className),
|
|
40
|
+
position,
|
|
41
|
+
...props,
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
44
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Viewport, {
|
|
45
|
+
className: cn("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
|
|
46
|
+
children
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
49
|
+
]
|
|
50
|
+
}) });
|
|
51
|
+
};
|
|
52
|
+
const SelectLabel = ({ className, ...props }) => {
|
|
53
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Label, {
|
|
54
|
+
"data-slot": "select-label",
|
|
55
|
+
className: cn("px-2 py-1.5 text-sm font-medium", className),
|
|
56
|
+
...props
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
const SelectItem = ({ className, children, ...props }) => {
|
|
60
|
+
return /* @__PURE__ */ jsxs(SelectPrimitive.Item, {
|
|
61
|
+
"data-slot": "select-item",
|
|
62
|
+
className: cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
63
|
+
...props,
|
|
64
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
65
|
+
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
66
|
+
children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
|
|
67
|
+
}), /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })]
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
const SelectSeparator = ({ className, ...props }) => {
|
|
71
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Separator, {
|
|
72
|
+
"data-slot": "select-separator",
|
|
73
|
+
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
74
|
+
...props
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
const SelectScrollUpButton = ({ className, ...props }) => {
|
|
78
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.ScrollUpButton, {
|
|
79
|
+
"data-slot": "select-scroll-up-button",
|
|
80
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
81
|
+
...props,
|
|
82
|
+
children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
const SelectScrollDownButton = ({ className, ...props }) => {
|
|
86
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.ScrollDownButton, {
|
|
87
|
+
"data-slot": "select-scroll-down-button",
|
|
88
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
89
|
+
...props,
|
|
90
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
//#endregion
|
|
94
|
+
export { SelectLabel as a, SelectSeparator as c, SelectItem as i, SelectTrigger as l, SelectContent as n, SelectScrollDownButton as o, SelectGroup as r, SelectScrollUpButton as s, Select as t, SelectValue as u };
|