@datum-cloud/datum-ui 3.7.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{action-row-DTvs91_3.mjs → action-row-BEzE9x37.mjs} +2 -3
- package/dist/{adapter-context-h0jCVqGO.mjs → adapter-context-XT749tyT.mjs} +1 -2
- package/dist/alert/index.mjs +1 -2
- package/dist/{alert-SAPwee1h.mjs → alert-CVckvox4.mjs} +2 -3
- package/dist/app-navigation/index.mjs +2 -2
- package/dist/{app-navigation-BB_NLEWv.mjs → app-navigation-DyNZwlSG.mjs} +14 -20
- package/dist/assistant/index.mjs +57 -63
- package/dist/autocomplete/index.mjs +1 -2
- package/dist/{autocomplete-BxtzndxZ.mjs → autocomplete-D0zAcT78.mjs} +6 -8
- package/dist/autosearch/index.mjs +8 -10
- package/dist/avatar/index.mjs +2 -3
- package/dist/avatar-stack/index.mjs +1 -2
- package/dist/{avatar-stack-BUcsjhA6.mjs → avatar-stack-2ow672bR.mjs} +3 -4
- package/dist/badge/index.mjs +181 -1
- package/dist/breadcrumb/index.mjs +1 -2
- package/dist/{breadcrumb-DmdhC8bE.mjs → breadcrumb-D97jAZ2N.mjs} +2 -3
- package/dist/button/index.mjs +2 -2
- package/dist/{button-CsdF61EI.mjs → button-C57mkFkS.mjs} +2 -3
- package/dist/{button-DoMqfQLu.mjs → button-Cn4KagBO.mjs} +4 -6
- package/dist/{button-CDPui_Ov.mjs → button-IK-Lnu_9.mjs} +3 -4
- package/dist/button-group/index.mjs +1 -2
- package/dist/{button-group-DFrTH4L8.mjs → button-group-C3GKo-0p.mjs} +3 -4
- package/dist/calendar/index.mjs +4 -5
- package/dist/{calendar-date-picker-DPvVAW2I.mjs → calendar-date-picker-CknZM6a2.mjs} +3 -4
- package/dist/card/index.mjs +1 -2
- package/dist/{card-save-bar-BZzNnKYj.mjs → card-save-bar-Te8jf-ie.mjs} +5 -8
- package/dist/chart/index.mjs +1 -2
- package/dist/{chart-EgzTS28l.mjs → chart-BsGsx2jb.mjs} +2 -3
- package/dist/checkbox/index.mjs +1 -2
- package/dist/checkbox-BAo5sbHk.mjs +84 -0
- package/dist/{close.icon-DdXKQ4m0.mjs → close.icon-BCPmH4nN.mjs} +2 -3
- package/dist/code-editor/index.mjs +1 -2
- package/dist/{col-BYGWTB4j.mjs → col-CYHIfPJq.mjs} +5 -9
- package/dist/collapsible/index.mjs +1 -7
- package/dist/collapsible-B-KP3JZ-.mjs +104 -0
- package/dist/command/index.mjs +1 -2
- package/dist/{command-C0aGIYnQ.mjs → command-B0be-zU5.mjs} +3 -4
- package/dist/components/base/checkbox/checkbox.d.ts +11 -3
- package/dist/components/base/collapsible/collapsible.d.ts +28 -0
- package/dist/components/base/collapsible/index.d.ts +1 -1
- package/dist/components/base/radio-group/radio-group.d.ts +11 -5
- package/dist/components/base/spinner/index.d.ts +1 -1
- package/dist/components/base/spinner/spinner.d.ts +11 -0
- package/dist/components/base/switch/switch.d.ts +6 -1
- package/dist/components/base/typography/typography.d.ts +1 -1
- package/dist/components/features/_shared/copy-state-icon.d.ts +12 -0
- package/dist/components/features/_shared/index.d.ts +2 -0
- package/dist/components/features/_shared/motion-chip.d.ts +293 -0
- package/dist/components/features/assistant/components/message/plan-card.d.ts +1 -1
- package/dist/components/icons/spinner.icon.d.ts +17 -3
- package/dist/copy-state-icon-DMvXXsZm.mjs +61 -0
- package/dist/data-table/index.mjs +1 -2
- package/dist/{data-table-CJiQQ6TM.mjs → data-table-CpBwO8Ea.mjs} +39 -66
- package/dist/date-picker/index.mjs +3 -3
- package/dist/date-time/index.mjs +1 -2
- package/dist/{date-time-lZdefM4H.mjs → date-time-BBRVM9qb.mjs} +4 -6
- package/dist/date-time-picker/index.mjs +1 -2
- package/dist/{date-time-picker-CricsXgF.mjs → date-time-picker-Bc41Ixrs.mjs} +3 -4
- package/dist/{date-time-range-picker-DM4AIvQ1.mjs → date-time-range-picker-yy1Acntn.mjs} +36 -59
- package/dist/dialog/index.mjs +1 -2
- package/dist/{dialog-Gu70fban.mjs → dialog-C8RXIQYm.mjs} +4 -5
- package/dist/{dialog-CmkrpaYy.mjs → dialog-D6sDXaH6.mjs} +2 -3
- package/dist/dropdown/index.mjs +1 -2
- package/dist/{dropdown-Xvduih96.mjs → dropdown-DR9j3Ni_.mjs} +3 -4
- package/dist/{dropdown-menu-b8zY5Cs6.mjs → dropdown-menu-CjgTr8Ab.mjs} +2 -3
- package/dist/dropzone/index.mjs +1 -2
- package/dist/{dropzone-ihksfjN2.mjs → dropzone-qKYfSe7o.mjs} +6 -8
- package/dist/empty-content/index.mjs +1 -2
- package/dist/{empty-content-CmuVcU0P.mjs → empty-content-CTMHak36.mjs} +8 -13
- package/dist/form/adapters/conform/index.mjs +4 -6
- package/dist/form/adapters/rhf/index.mjs +6 -9
- package/dist/form/index.mjs +2 -2
- package/dist/form/stepper/index.mjs +11 -16
- package/dist/{form-D4R6C609.mjs → form-DTaVgDSV.mjs} +64 -89
- package/dist/{form-context-DzB2a-dw.mjs → form-context-BRzt53M5.mjs} +1 -2
- package/dist/grid/index.mjs +1 -2
- package/dist/grouped-table/index.mjs +1 -2
- package/dist/{grouped-table-fHguJz9W.mjs → grouped-table-Dl6DclbV.mjs} +17 -25
- package/dist/hooks/index.mjs +4 -4
- package/dist/{hooks-CwZ6hyI1.mjs → hooks-WVJbyhCz.mjs} +1 -2
- package/dist/hover-card/index.mjs +1 -2
- package/dist/{hover-card-BNOE5vT5.mjs → hover-card-DSt1lZGg.mjs} +3 -5
- package/dist/{icon-wrapper-DKfJlJd0.mjs → icon-wrapper-CIk2th6R.mjs} +1 -2
- package/dist/icons/index.mjs +3 -3
- package/dist/index.mjs +80 -80
- package/dist/input/index.mjs +1 -2
- package/dist/{input-j4tbmYYz.mjs → input-DsT5qkJn.mjs} +3 -4
- package/dist/{input-DR-XbgpD.mjs → input-Wl1K48ca.mjs} +2 -3
- package/dist/input-group/index.mjs +1 -2
- package/dist/{input-group-DieA8aBt.mjs → input-group-CCzvJIZM.mjs} +5 -6
- package/dist/input-number/index.mjs +1 -2
- package/dist/{input-number-TXmW-X9o.mjs → input-number-DF-bfIo8.mjs} +5 -6
- package/dist/input-with-addons/index.mjs +2 -3
- package/dist/label/index.mjs +1 -2
- package/dist/{label-Bk6FXsju.mjs → label-BR1V3Imy.mjs} +3 -5
- package/dist/{layers-DWYdrGmC.mjs → layers-DLUbkJtt.mjs} +26 -27
- package/dist/loader-overlay/index.mjs +1 -2
- package/dist/{loader-overlay-DD94azZX.mjs → loader-overlay-DP0pvHuG.mjs} +3 -4
- package/dist/logo/index.mjs +2 -2
- package/dist/logo/themed/index.mjs +3 -4
- package/dist/{logo-C3FxD7jb.mjs → logo-CkzKra6H.mjs} +2 -3
- package/dist/{logo-text-Dpm5O6Kg.mjs → logo-text-B54YiEte.mjs} +6 -11
- package/dist/logs/fixtures/index.mjs +2 -4
- package/dist/logs/index.mjs +68 -87
- package/dist/map/index.mjs +1 -2
- package/dist/{map-leaflet-imports-S3kx8Q-S.mjs → map-leaflet-imports-Xdz9Xiaf.mjs} +1 -2
- package/dist/mobile-sheet/index.mjs +1 -2
- package/dist/{mobile-sheet-9TootJGg.mjs → mobile-sheet-1995HYY_.mjs} +6 -9
- package/dist/more-actions/index.mjs +2 -2
- package/dist/{more-actions-C3DYWO0a.mjs → more-actions-BlSOVwa8.mjs} +6 -7
- package/dist/{motion-DvGRWdsm.mjs → motion-DOrRbLmy.mjs} +1 -2
- package/dist/motion-chip-BczV7spP.mjs +52 -0
- package/dist/multi-select/index.mjs +1 -2
- package/dist/{multi-select-CF0Yq5yf.mjs → multi-select-C2cBrqXl.mjs} +61 -57
- package/dist/nprogress/index.mjs +1 -2
- package/dist/page-title/index.mjs +1 -2
- package/dist/{page-title-ipRWEOeM.mjs → page-title-Djl3LvPT.mjs} +2 -3
- package/dist/picker/index.mjs +2 -2
- package/dist/{picker-BoKXW6_s.mjs → picker-DC3GErYg.mjs} +14 -25
- package/dist/popover/index.mjs +1 -2
- package/dist/{popover-X82NwhX9.mjs → popover-7YxyP_W0.mjs} +3 -5
- package/dist/radio-group/index.mjs +1 -2
- package/dist/radio-group-Boxi2hm0.mjs +83 -0
- package/dist/responsive-dropdown/index.mjs +1 -2
- package/dist/{responsive-dropdown-C_KKgLbH.mjs → responsive-dropdown-DsWgpE_i.mjs} +5 -6
- package/dist/responsive-popover/index.mjs +1 -2
- package/dist/{responsive-popover-8VcjBM2d.mjs → responsive-popover-DJYd8lOK.mjs} +5 -6
- package/dist/rich-text-content/index.mjs +1 -2
- package/dist/{rich-text-content-DNonBD39.mjs → rich-text-content-BiIIowBU.mjs} +2 -3
- package/dist/rich-text-editor/index.mjs +2 -2
- package/dist/{rich-text-editor-CP1YyxMR.mjs → rich-text-editor-BUz06s-b.mjs} +14 -22
- package/dist/select/index.mjs +1 -2
- package/dist/{select-D4pk9e2d.mjs → select-DemYhwnG.mjs} +3 -4
- package/dist/{select-daE2Nn0Z.mjs → select-jgK6wyXj.mjs} +2 -3
- package/dist/separator/index.mjs +1 -2
- package/dist/{separator-vbPD_WFQ.mjs → separator-DNiiN2BN.mjs} +2 -3
- package/dist/settings-nav/index.mjs +1 -2
- package/dist/{settings-nav-Hf3GrCGv.mjs → settings-nav-CCZdPD-x.mjs} +2 -3
- package/dist/sheet/index.mjs +2 -2
- package/dist/{sheet-DHn6C_rs.mjs → sheet-DEpEJ_Rk.mjs} +4 -5
- package/dist/{sheet-DXCZyMHI.mjs → sheet-DYPtVIb2.mjs} +2 -3
- package/dist/sidebar/index.mjs +1 -2
- package/dist/{sidebar-sbqOOFii.mjs → sidebar-DWnxQWQ8.mjs} +13 -18
- package/dist/skeleton/index.mjs +3 -4
- package/dist/{skeleton-DFExK4GX.mjs → skeleton-CDPoo7-M.mjs} +2 -3
- package/dist/spinner/index.mjs +1 -2
- package/dist/spinner-DSlDJdWl.mjs +23 -0
- package/dist/spinner.icon-BiUnMAxw.mjs +104 -0
- package/dist/stepper/index.mjs +1 -2
- package/dist/{stepper-dNvkipop.mjs → stepper-ZipxpzWY.mjs} +10 -11
- package/dist/switch/index.mjs +1 -2
- package/dist/switch-IduVwiPZ.mjs +114 -0
- package/dist/table/index.mjs +2 -3
- package/dist/tabs/index.mjs +3 -4
- package/dist/tag-input/index.mjs +1 -2
- package/dist/{tag-input-c9OvWTSe.mjs → tag-input-a3ktkGrH.mjs} +46 -43
- package/dist/task-queue/index.mjs +1 -2
- package/dist/{task-queue-dropdown-CHPP5WIm.mjs → task-queue-dropdown-DuCAAybs.mjs} +39 -59
- package/dist/textarea/index.mjs +1 -2
- package/dist/{textarea-DiSGxCBO.mjs → textarea-CvhdK6JY.mjs} +3 -4
- package/dist/{textarea-CCxpXJdh.mjs → textarea-D36SE4ki.mjs} +2 -3
- package/dist/theme/index.mjs +1 -2
- package/dist/{themes-Ba2bajuF.mjs → themes-BoxnQbbu.mjs} +8 -10
- package/dist/time-picker/index.mjs +1 -2
- package/dist/{time-picker-DQlc2gKW.mjs → time-picker-B_am4eAK.mjs} +3 -4
- package/dist/{to-api-format-QuJ81vQ9.mjs → to-api-format-DyImCzCn.mjs} +15 -23
- package/dist/toast/index.mjs +2 -2
- package/dist/{toast-BUPlDkN3.mjs → toast-CizxCEcK.mjs} +4 -6
- package/dist/tooltip/index.mjs +1 -2
- package/dist/{tooltip-DhbN1BDK.mjs → tooltip-OIySjJWW.mjs} +3 -5
- package/dist/transfer/index.mjs +1 -2
- package/dist/{transfer-DsshYgIk.mjs → transfer-DGUeAQUL.mjs} +8 -14
- package/dist/{types-agDpVXBG.mjs → types-ChINrR8H.mjs} +7 -11
- package/dist/typography/index.mjs +1 -2
- package/dist/{typography-B1bpHKmV.mjs → typography-XFfN6PGD.mjs} +2 -3
- package/dist/{use-breakpoint-CwiUJSmk.mjs → use-breakpoint-zY_JYINK.mjs} +1 -2
- package/dist/{use-controllable-state-Dna7u3r9.mjs → use-controllable-state-DLeVgbAb.mjs} +1 -2
- package/dist/{use-copy-to-clipboard-DZDq_85T.mjs → use-copy-to-clipboard-CWKWHLxI.mjs} +1 -2
- package/dist/{use-debounced-search-input-yu_F0QBt.mjs → use-debounced-search-input-B4u28iLx.mjs} +1 -2
- package/dist/{use-deprecation-warning-DXrGc0jX.mjs → use-deprecation-warning-BS1V4IS5.mjs} +1 -2
- package/dist/{use-display-touched-CMEEv7aT.mjs → use-display-touched-BSq0Ninl.mjs} +3 -5
- package/dist/{use-option-picker-s2bUYwXC.mjs → use-option-picker-DXY2SNnT.mjs} +6 -9
- package/dist/{use-toast-Bpq0yJIT.mjs → use-toast-CZAZeS95.mjs} +3 -5
- package/dist/utils/index.mjs +3 -3
- package/dist/{utils-CA4QEIJ8.mjs → utils-CPJ5MCfd.mjs} +1 -2
- package/dist/{utils-Bu32wN-x.mjs → utils-CTIuhCOs.mjs} +1 -2
- package/dist/visually-hidden/index.mjs +1 -2
- package/dist/{visuallyhidden-D7L_qs8b.mjs → visuallyhidden-Mg4OsZ-l.mjs} +1 -2
- package/dist/{zod-helpers-YEhVo2S-.mjs → zod-helpers-JcfFVJJd.mjs} +1 -2
- package/package.json +20 -23
- package/dist/badge-DOZUr5DV.mjs +0 -183
- package/dist/checkbox-C6P12fio.mjs +0 -30
- package/dist/radio-group-LduBVTnh.mjs +0 -45
- package/dist/spinner-C5Xv-i2C.mjs +0 -14
- package/dist/spinner.icon-BYUMQ8H-.mjs +0 -48
- package/dist/switch-BaR-Vna4.mjs +0 -34
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { t as cn } from "./utils-
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as Icon } from "./icon-wrapper-
|
|
4
|
-
import { t as
|
|
1
|
+
import { t as cn } from "./utils-CTIuhCOs.mjs";
|
|
2
|
+
import { t as Input } from "./input-DsT5qkJn.mjs";
|
|
3
|
+
import { t as Icon } from "./icon-wrapper-CIk2th6R.mjs";
|
|
4
|
+
import { n as useChipMotion, t as MotionBadge } from "./motion-chip-BczV7spP.mjs";
|
|
5
5
|
import { X } from "lucide-react";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { AnimatePresence } from "motion/react";
|
|
8
9
|
import { z } from "zod";
|
|
9
|
-
|
|
10
|
+
// src/components/features/tag-input/parse.ts
|
|
10
11
|
/**
|
|
11
12
|
* Used for identifying split characters when pasting.
|
|
12
13
|
* Splits on: newlines, tabs, semicolons, commas, and pipes.
|
|
@@ -87,45 +88,50 @@ function processPastedValues(rawValues, existing, { normalizer, validator, maxIt
|
|
|
87
88
|
exceededMax
|
|
88
89
|
};
|
|
89
90
|
}
|
|
90
|
-
|
|
91
|
-
//#region src/components/features/tag-input/tag-input-field.tsx
|
|
91
|
+
// src/components/features/tag-input/tag-input-field.tsx
|
|
92
92
|
/**
|
|
93
93
|
* Presentational layer for {@link TagsInput}: renders the tag chips and the
|
|
94
94
|
* text input, wiring them to the handlers produced by `useTagsInput`.
|
|
95
95
|
*/
|
|
96
96
|
function TagInputField({ value, placeholder, input }) {
|
|
97
97
|
const { inputValue, activeIndex, setActiveIndex, disableInput, disableButton, removeValue, handleKeyDown, handlePaste, handleBlur, handleSelect, handleChange, mousePreventDefault } = input;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
type: "
|
|
109
|
-
"
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
"
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
98
|
+
const chipMotion = useChipMotion();
|
|
99
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(AnimatePresence, {
|
|
100
|
+
initial: false,
|
|
101
|
+
mode: "popLayout",
|
|
102
|
+
children: value.map((item, index) => /* @__PURE__ */ jsxs(MotionBadge, {
|
|
103
|
+
...chipMotion,
|
|
104
|
+
tabIndex: activeIndex !== -1 ? 0 : activeIndex,
|
|
105
|
+
"aria-disabled": disableButton,
|
|
106
|
+
"data-active": activeIndex === index,
|
|
107
|
+
className: cn("data-[active='true']:ring-muted-foreground relative flex items-center gap-1 truncate rounded px-1 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 data-[active='true']:ring-2"),
|
|
108
|
+
type: "secondary",
|
|
109
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
110
|
+
className: "text-xs",
|
|
111
|
+
children: item
|
|
112
|
+
}), /* @__PURE__ */ jsxs("button", {
|
|
113
|
+
type: "button",
|
|
114
|
+
"aria-label": `Remove ${item} option`,
|
|
115
|
+
"aria-roledescription": "button to remove option",
|
|
116
|
+
disabled: disableButton,
|
|
117
|
+
onMouseDown: mousePreventDefault,
|
|
118
|
+
onClick: () => removeValue(item),
|
|
119
|
+
className: "disabled:cursor-not-allowed",
|
|
120
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
121
|
+
className: "sr-only",
|
|
122
|
+
children: [
|
|
123
|
+
"Remove",
|
|
124
|
+
item,
|
|
125
|
+
" ",
|
|
126
|
+
"option"
|
|
127
|
+
]
|
|
128
|
+
}), /* @__PURE__ */ jsx(Icon, {
|
|
129
|
+
icon: X,
|
|
130
|
+
className: "hover:stroke-destructive h-4 w-4"
|
|
131
|
+
})]
|
|
126
132
|
})]
|
|
127
|
-
})
|
|
128
|
-
}
|
|
133
|
+
}, item))
|
|
134
|
+
}), /* @__PURE__ */ jsx(Input, {
|
|
129
135
|
tabIndex: 0,
|
|
130
136
|
"aria-label": "input tag",
|
|
131
137
|
disabled: disableInput,
|
|
@@ -142,8 +148,7 @@ function TagInputField({ value, placeholder, input }) {
|
|
|
142
148
|
})] });
|
|
143
149
|
}
|
|
144
150
|
TagInputField.displayName = "TagInputField";
|
|
145
|
-
|
|
146
|
-
//#region src/components/features/tag-input/use-tags-input.ts
|
|
151
|
+
// src/components/features/tag-input/use-tags-input.ts
|
|
147
152
|
/** How long a transient paste error stays visible before clearing (ms). */
|
|
148
153
|
const TRANSIENT_ERROR_MS = 3e3;
|
|
149
154
|
/**
|
|
@@ -368,8 +373,7 @@ function useTagsInput({ value, onValueChange, maxItems, minItems, delimiters = D
|
|
|
368
373
|
mousePreventDefault
|
|
369
374
|
};
|
|
370
375
|
}
|
|
371
|
-
|
|
372
|
-
//#region src/components/features/tag-input/tag-input.tsx
|
|
376
|
+
// src/components/features/tag-input/tag-input.tsx
|
|
373
377
|
const TagInputContext = React.createContext(null);
|
|
374
378
|
function TagsInput({ ref, value, onValueChange, placeholder, maxItems, minItems, className, dir, delimiters = DEFAULT_DELIMITERS, normalizer, validator, onValidationError, error, showValidationErrors = true, name, key, ...props }) {
|
|
375
379
|
const input = useTagsInput({
|
|
@@ -411,7 +415,7 @@ function TagsInput({ ref, value, onValueChange, placeholder, maxItems, minItems,
|
|
|
411
415
|
...props,
|
|
412
416
|
ref,
|
|
413
417
|
dir,
|
|
414
|
-
className: cn("border-input-border bg-input-background/50 text-input-foreground flex min-h-10 flex-wrap items-center gap-1 overflow-hidden rounded-lg border px-3 py-2 transition-
|
|
418
|
+
className: cn("border-input-border bg-input-background/50 text-input-foreground relative flex min-h-10 flex-wrap items-center gap-1 overflow-hidden rounded-lg border px-3 py-2 transition-[border-color,box-shadow]", activeIndex === -1 ? "focus-within:border-input-focus-border focus-within:shadow-(--input-focus-shadow) focus-within:ring-0 focus-within:ring-offset-0 focus-within:outline-hidden" : "focus-within:ring-0 focus-within:ring-offset-0 focus-within:outline-hidden", className),
|
|
415
419
|
suppressHydrationWarning: true,
|
|
416
420
|
children: [(showValidationErrors && validationError || error) && /* @__PURE__ */ jsx("div", {
|
|
417
421
|
className: "mb-1 w-full text-sm text-red-500",
|
|
@@ -433,5 +437,4 @@ function TagsInput({ ref, value, onValueChange, placeholder, maxItems, minItems,
|
|
|
433
437
|
});
|
|
434
438
|
}
|
|
435
439
|
TagsInput.displayName = "TagsInput";
|
|
436
|
-
//#endregion
|
|
437
440
|
export { TagsInput as t };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { LocalTaskStorage, RedisTaskStorage, TaskPanel, TaskPanelActions, TaskPanelCounter, TaskPanelHeader, TaskPanelItem, TaskQueue, TaskQueueDropdown, TaskQueueProvider, TaskQueueTrigger, TaskSummaryDialog, createOrgMetadata, createProjectMetadata, createUserMetadata, detectStorage, getContextLabel, matchesCurrentScope, useCurrentScope, useTaskQueue, useTasksWithLabels };
|
|
1
|
+
export { v as LocalTaskStorage, _ as RedisTaskStorage, i as TaskPanel, s as TaskPanelActions, o as TaskPanelCounter, c as TaskPanelHeader, a as TaskPanelItem, h as TaskQueue, t as TaskQueueDropdown, m as TaskQueueProvider, r as TaskQueueTrigger, n as TaskSummaryDialog, y as createOrgMetadata, b as createProjectMetadata, x as createUserMetadata, g as detectStorage, l as getContextLabel, u as matchesCurrentScope, d as useCurrentScope, p as useTaskQueue, f as useTasksWithLabels } from "../task-queue-dropdown-DuCAAybs.mjs";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { t as cn } from "./utils-
|
|
2
|
-
import {
|
|
3
|
-
import { t as SpinnerIcon } from "./spinner.icon-
|
|
4
|
-
import { t as Button } from "./button-
|
|
5
|
-
import { t as Icon } from "./icon-wrapper-
|
|
6
|
-
import { t as Dialog } from "./dialog-
|
|
7
|
-
import { t as ResponsiveDropdown } from "./responsive-dropdown-
|
|
8
|
-
import { a as TooltipTrigger, n as Tooltip, r as TooltipContent, t as Tooltip$1 } from "./tooltip-
|
|
1
|
+
import { t as cn } from "./utils-CTIuhCOs.mjs";
|
|
2
|
+
import { Badge } from "./badge/index.mjs";
|
|
3
|
+
import { t as SpinnerIcon } from "./spinner.icon-BiUnMAxw.mjs";
|
|
4
|
+
import { t as Button } from "./button-Cn4KagBO.mjs";
|
|
5
|
+
import { t as Icon } from "./icon-wrapper-CIk2th6R.mjs";
|
|
6
|
+
import { t as Dialog } from "./dialog-C8RXIQYm.mjs";
|
|
7
|
+
import { t as ResponsiveDropdown } from "./responsive-dropdown-DsWgpE_i.mjs";
|
|
8
|
+
import { a as TooltipTrigger, n as Tooltip, r as TooltipContent, t as Tooltip$1 } from "./tooltip-OIySjJWW.mjs";
|
|
9
9
|
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "./table/index.mjs";
|
|
10
10
|
import { Ban, CheckCircle2, CircleAlert, CircleCheck, CornerDownRightIcon, FileIcon, ListTodo, X, XCircle } from "lucide-react";
|
|
11
11
|
import { createContext, use, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
12
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { formatDistanceToNowStrict } from "date-fns";
|
|
14
|
-
|
|
14
|
+
// src/components/features/task-queue/engine/executor.ts
|
|
15
15
|
/**
|
|
16
16
|
* Shallow-clone a task into an engine-local working copy.
|
|
17
17
|
*
|
|
@@ -123,8 +123,7 @@ async function executeTask(inputTask, processor, callbacks) {
|
|
|
123
123
|
result: task.result
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
|
|
127
|
-
//#region src/components/features/task-queue/constants.ts
|
|
126
|
+
// src/components/features/task-queue/constants.ts
|
|
128
127
|
const TASK_QUEUE_DEFAULTS = {
|
|
129
128
|
concurrency: 3,
|
|
130
129
|
errorStrategy: "continue",
|
|
@@ -132,8 +131,7 @@ const TASK_QUEUE_DEFAULTS = {
|
|
|
132
131
|
retryable: true
|
|
133
132
|
};
|
|
134
133
|
const TASK_STORAGE_KEY = "datum-task-queue";
|
|
135
|
-
|
|
136
|
-
//#region src/components/features/task-queue/utils/index.ts
|
|
134
|
+
// src/components/features/task-queue/utils/index.ts
|
|
137
135
|
/**
|
|
138
136
|
* Check if code is running in a browser environment.
|
|
139
137
|
* Used for SSR safety in storage and other browser-dependent code.
|
|
@@ -195,8 +193,7 @@ function createUserMetadata(extra) {
|
|
|
195
193
|
...extra
|
|
196
194
|
};
|
|
197
195
|
}
|
|
198
|
-
|
|
199
|
-
//#region src/components/features/task-queue/engine/storage/serialize.ts
|
|
196
|
+
// src/components/features/task-queue/engine/storage/serialize.ts
|
|
200
197
|
/**
|
|
201
198
|
* Strip a task down to its JSON-serializable fields before persisting.
|
|
202
199
|
*
|
|
@@ -211,8 +208,7 @@ function toSerializableTask(task) {
|
|
|
211
208
|
const { _processor, icon, completionActions, ...rest } = task;
|
|
212
209
|
return rest;
|
|
213
210
|
}
|
|
214
|
-
|
|
215
|
-
//#region src/components/features/task-queue/engine/storage/local-storage.ts
|
|
211
|
+
// src/components/features/task-queue/engine/storage/local-storage.ts
|
|
216
212
|
var LocalTaskStorage = class {
|
|
217
213
|
key;
|
|
218
214
|
constructor(key = TASK_STORAGE_KEY) {
|
|
@@ -271,8 +267,7 @@ var LocalTaskStorage = class {
|
|
|
271
267
|
}
|
|
272
268
|
}
|
|
273
269
|
};
|
|
274
|
-
|
|
275
|
-
//#region src/components/features/task-queue/engine/storage/memory-storage.ts
|
|
270
|
+
// src/components/features/task-queue/engine/storage/memory-storage.ts
|
|
276
271
|
/**
|
|
277
272
|
* In-memory task storage.
|
|
278
273
|
*
|
|
@@ -299,8 +294,7 @@ var MemoryTaskStorage = class {
|
|
|
299
294
|
this.tasks.clear();
|
|
300
295
|
}
|
|
301
296
|
};
|
|
302
|
-
|
|
303
|
-
//#region src/components/features/task-queue/engine/storage/redis-storage.ts
|
|
297
|
+
// src/components/features/task-queue/engine/storage/redis-storage.ts
|
|
304
298
|
const DEFAULT_TTL = 604800;
|
|
305
299
|
function hasSetex(client) {
|
|
306
300
|
return "setex" in client && typeof client.setex === "function";
|
|
@@ -400,8 +394,7 @@ var RedisTaskStorage = class {
|
|
|
400
394
|
});
|
|
401
395
|
}
|
|
402
396
|
};
|
|
403
|
-
|
|
404
|
-
//#region src/components/features/task-queue/engine/storage/detect-storage.ts
|
|
397
|
+
// src/components/features/task-queue/engine/storage/detect-storage.ts
|
|
405
398
|
/**
|
|
406
399
|
* Auto-detects and returns the appropriate storage backend.
|
|
407
400
|
*
|
|
@@ -419,8 +412,7 @@ function detectStorage(options = {}) {
|
|
|
419
412
|
if (redisClient && redisClient.status === "ready") return new RedisTaskStorage(redisClient, storageKey);
|
|
420
413
|
return new LocalTaskStorage(storageKey);
|
|
421
414
|
}
|
|
422
|
-
|
|
423
|
-
//#region src/components/features/task-queue/engine/summary-store.ts
|
|
415
|
+
// src/components/features/task-queue/engine/summary-store.ts
|
|
424
416
|
/**
|
|
425
417
|
* Holds the summary-dialog UI state that is intentionally decoupled from the
|
|
426
418
|
* task-scheduling engine. Keeping this separate from {@link TaskQueue} means the
|
|
@@ -449,8 +441,7 @@ var SummaryStore = class {
|
|
|
449
441
|
return this.globalRenderContent;
|
|
450
442
|
}
|
|
451
443
|
};
|
|
452
|
-
|
|
453
|
-
//#region src/components/features/task-queue/engine/queue.ts
|
|
444
|
+
// src/components/features/task-queue/engine/queue.ts
|
|
454
445
|
const DEFAULT_TIMEOUT_MS = 3e5;
|
|
455
446
|
const HEARTBEAT_INTERVAL_MS = 5e3;
|
|
456
447
|
const HEARTBEAT_STALE_MS = 2e4;
|
|
@@ -1001,8 +992,7 @@ var TaskQueue = class {
|
|
|
1001
992
|
this.runtimes.delete(taskId);
|
|
1002
993
|
}
|
|
1003
994
|
};
|
|
1004
|
-
|
|
1005
|
-
//#region src/components/features/task-queue/provider/task-queue-provider.tsx
|
|
995
|
+
// src/components/features/task-queue/provider/task-queue-provider.tsx
|
|
1006
996
|
const TaskQueueContext = createContext(null);
|
|
1007
997
|
function TaskQueueProvider({ children, config }) {
|
|
1008
998
|
const queueRef = useRef(null);
|
|
@@ -1032,8 +1022,7 @@ function TaskQueueProvider({ children, config }) {
|
|
|
1032
1022
|
children
|
|
1033
1023
|
});
|
|
1034
1024
|
}
|
|
1035
|
-
|
|
1036
|
-
//#region src/components/features/task-queue/hooks/use-task-queue.ts
|
|
1025
|
+
// src/components/features/task-queue/hooks/use-task-queue.ts
|
|
1037
1026
|
const EMPTY_TASKS = [];
|
|
1038
1027
|
function useTaskQueue(options) {
|
|
1039
1028
|
const context = use(TaskQueueContext);
|
|
@@ -1063,8 +1052,7 @@ function useTaskQueue(options) {
|
|
|
1063
1052
|
summaryRenderContent
|
|
1064
1053
|
]);
|
|
1065
1054
|
}
|
|
1066
|
-
|
|
1067
|
-
//#region src/components/features/task-queue/hooks/use-task-scope.ts
|
|
1055
|
+
// src/components/features/task-queue/hooks/use-task-scope.ts
|
|
1068
1056
|
/**
|
|
1069
1057
|
* Detect the current scope from URL params.
|
|
1070
1058
|
* Returns project scope if projectId is present, org scope if only orgId, otherwise global.
|
|
@@ -1129,8 +1117,7 @@ function useTasksWithLabels(tasks, params) {
|
|
|
1129
1117
|
}, [tasks, currentScope])
|
|
1130
1118
|
};
|
|
1131
1119
|
}
|
|
1132
|
-
|
|
1133
|
-
//#region src/components/features/task-queue/core/task-panel-header.tsx
|
|
1120
|
+
// src/components/features/task-queue/core/task-panel-header.tsx
|
|
1134
1121
|
function TaskPanelHeader() {
|
|
1135
1122
|
return /* @__PURE__ */ jsx("div", {
|
|
1136
1123
|
className: "border-border flex items-center border-b px-4 py-3",
|
|
@@ -1140,8 +1127,7 @@ function TaskPanelHeader() {
|
|
|
1140
1127
|
})
|
|
1141
1128
|
});
|
|
1142
1129
|
}
|
|
1143
|
-
|
|
1144
|
-
//#region src/components/features/task-queue/core/task-panel-actions.tsx
|
|
1130
|
+
// src/components/features/task-queue/core/task-panel-actions.tsx
|
|
1145
1131
|
function TaskPanelActions({ task }) {
|
|
1146
1132
|
const { showSummary } = useTaskQueue();
|
|
1147
1133
|
const actions = resolveActions(task);
|
|
@@ -1210,23 +1196,23 @@ function resolveActions(task) {
|
|
|
1210
1196
|
}
|
|
1211
1197
|
return task.completionActions;
|
|
1212
1198
|
}
|
|
1213
|
-
|
|
1214
|
-
//#region src/components/features/task-queue/core/task-panel-counter.tsx
|
|
1199
|
+
// src/components/features/task-queue/core/task-panel-counter.tsx
|
|
1215
1200
|
function TaskPanelCounter({ total, completed, failed = 0, status }) {
|
|
1216
1201
|
const hasBatch = total != null;
|
|
1217
1202
|
const parts = [];
|
|
1218
1203
|
if (status === "completed") parts.push({ text: "Completed" });
|
|
1219
|
-
else if (status === "failed")
|
|
1220
|
-
if (
|
|
1221
|
-
|
|
1222
|
-
|
|
1204
|
+
else if (status === "failed") {
|
|
1205
|
+
if (hasBatch) {
|
|
1206
|
+
if (completed > 0) parts.push({ text: `${completed} completed` });
|
|
1207
|
+
parts.push({
|
|
1208
|
+
text: `${failed} failed`,
|
|
1209
|
+
destructive: true
|
|
1210
|
+
});
|
|
1211
|
+
} else parts.push({
|
|
1212
|
+
text: "Failed",
|
|
1223
1213
|
destructive: true
|
|
1224
1214
|
});
|
|
1225
|
-
} else
|
|
1226
|
-
text: "Failed",
|
|
1227
|
-
destructive: true
|
|
1228
|
-
});
|
|
1229
|
-
else if (status === "cancelled") {
|
|
1215
|
+
} else if (status === "cancelled") {
|
|
1230
1216
|
parts.push({ text: "Cancelled" });
|
|
1231
1217
|
if (hasBatch && completed > 0) parts.push({ text: `${completed} completed` });
|
|
1232
1218
|
} else if (hasBatch) {
|
|
@@ -1245,8 +1231,7 @@ function TaskPanelCounter({ total, completed, failed = 0, status }) {
|
|
|
1245
1231
|
})] }, i))
|
|
1246
1232
|
});
|
|
1247
1233
|
}
|
|
1248
|
-
|
|
1249
|
-
//#region src/components/features/task-queue/core/task-panel-item.tsx
|
|
1234
|
+
// src/components/features/task-queue/core/task-panel-item.tsx
|
|
1250
1235
|
function TaskPanelItem({ task, contextLabel, onCancel }) {
|
|
1251
1236
|
const hasBatch = task.total != null;
|
|
1252
1237
|
const isTerminal = task.status === "completed" || task.status === "failed" || task.status === "cancelled";
|
|
@@ -1379,8 +1364,7 @@ function TaskStatusAction({ task, onCancel }) {
|
|
|
1379
1364
|
children: formatCompletedAt(task.completedAt)
|
|
1380
1365
|
});
|
|
1381
1366
|
}
|
|
1382
|
-
|
|
1383
|
-
//#region src/components/features/task-queue/core/task-panel.tsx
|
|
1367
|
+
// src/components/features/task-queue/core/task-panel.tsx
|
|
1384
1368
|
/**
|
|
1385
1369
|
* @deprecated Use TaskQueueDropdown instead — renders as a header-anchored dropdown.
|
|
1386
1370
|
* TaskPanel is kept for backward compatibility but is no longer used in the main layout.
|
|
@@ -1400,8 +1384,7 @@ function TaskPanel() {
|
|
|
1400
1384
|
})]
|
|
1401
1385
|
});
|
|
1402
1386
|
}
|
|
1403
|
-
|
|
1404
|
-
//#region src/components/features/task-queue/core/task-queue-trigger.tsx
|
|
1387
|
+
// src/components/features/task-queue/core/task-queue-trigger.tsx
|
|
1405
1388
|
function TaskQueueTrigger({ ref, tasks, ...props }) {
|
|
1406
1389
|
const runningCount = tasks.filter((t) => t.status === "running").length;
|
|
1407
1390
|
const activeCount = runningCount + tasks.filter((t) => t.status === "pending").length;
|
|
@@ -1453,8 +1436,7 @@ function TaskQueueTrigger({ ref, tasks, ...props }) {
|
|
|
1453
1436
|
})
|
|
1454
1437
|
});
|
|
1455
1438
|
}
|
|
1456
|
-
|
|
1457
|
-
//#region src/components/features/task-queue/core/task-summary-dialog.tsx
|
|
1439
|
+
// src/components/features/task-queue/core/task-summary-dialog.tsx
|
|
1458
1440
|
function getStatusConfig(status) {
|
|
1459
1441
|
switch (status) {
|
|
1460
1442
|
case "success": return {
|
|
@@ -1573,8 +1555,7 @@ function TaskSummaryDialog(props) {
|
|
|
1573
1555
|
})
|
|
1574
1556
|
});
|
|
1575
1557
|
}
|
|
1576
|
-
|
|
1577
|
-
//#region src/components/features/task-queue/core/task-queue-dropdown.tsx
|
|
1558
|
+
// src/components/features/task-queue/core/task-queue-dropdown.tsx
|
|
1578
1559
|
const autoOpenedForIds = /* @__PURE__ */ new Set();
|
|
1579
1560
|
function TaskQueueDropdown() {
|
|
1580
1561
|
const { tasks, cancel, dismissAll, activeSummary, closeSummary, summaryRenderContent } = useTaskQueue();
|
|
@@ -1637,5 +1618,4 @@ function TaskQueueDropdown() {
|
|
|
1637
1618
|
renderContent: activeSummary.renderContent ?? summaryRenderContent
|
|
1638
1619
|
})] });
|
|
1639
1620
|
}
|
|
1640
|
-
//#endregion
|
|
1641
1621
|
export { RedisTaskStorage as _, TaskPanelItem as a, createProjectMetadata as b, TaskPanelHeader as c, useCurrentScope as d, useTasksWithLabels as f, detectStorage as g, TaskQueue as h, TaskPanel as i, getContextLabel as l, TaskQueueProvider as m, TaskSummaryDialog as n, TaskPanelCounter as o, useTaskQueue as p, TaskQueueTrigger as r, TaskPanelActions as s, TaskQueueDropdown as t, matchesCurrentScope as u, LocalTaskStorage as v, createUserMetadata as x, createOrgMetadata as y };
|
package/dist/textarea/index.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { Textarea };
|
|
1
|
+
export { t as Textarea } from "../textarea-CvhdK6JY.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { t as
|
|
1
|
+
import { t as Textarea$1 } from "./textarea-D36SE4ki.mjs";
|
|
2
|
+
import { t as cn } from "./utils-CTIuhCOs.mjs";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/components/base/textarea/textarea.tsx
|
|
6
6
|
function Textarea({ ref, className, ...props }) {
|
|
7
7
|
return /* @__PURE__ */ jsx(Textarea$1, {
|
|
8
8
|
ref,
|
|
@@ -11,5 +11,4 @@ function Textarea({ ref, className, ...props }) {
|
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
Textarea.displayName = "Textarea";
|
|
14
|
-
//#endregion
|
|
15
14
|
export { Textarea as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as cn } from "./utils-
|
|
1
|
+
import { t as cn } from "./utils-CTIuhCOs.mjs";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// ../shadcn/ui/textarea.tsx
|
|
5
5
|
function Textarea({ className, ...props }) {
|
|
6
6
|
return /* @__PURE__ */ jsx("textarea", {
|
|
7
7
|
"data-slot": "textarea",
|
|
@@ -9,5 +9,4 @@ function Textarea({ className, ...props }) {
|
|
|
9
9
|
...props
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
//#endregion
|
|
13
12
|
export { Textarea as t };
|
package/dist/theme/index.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { ClientOnly, ThemeProvider, ThemeScript, useTheme };
|
|
1
|
+
export { i as ClientOnly, t as ThemeProvider, r as ThemeScript, n as useTheme } from "../themes-BoxnQbbu.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/components/themes/client-only.tsx
|
|
4
4
|
function ClientOnly({ children, fallback = null }) {
|
|
5
5
|
const [hasMounted, setHasMounted] = React.useState(false);
|
|
6
6
|
React.useEffect(() => {
|
|
@@ -9,8 +9,7 @@ function ClientOnly({ children, fallback = null }) {
|
|
|
9
9
|
if (!hasMounted) return /* @__PURE__ */ jsx(Fragment$1, { children: fallback });
|
|
10
10
|
return /* @__PURE__ */ jsx(Fragment$1, { children });
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
//#region src/components/themes/script.ts
|
|
12
|
+
// src/components/themes/script.ts
|
|
14
13
|
function script(attribute, storageKey, defaultTheme, forcedTheme, themes, value, enableSystem, enableColorScheme) {
|
|
15
14
|
if (typeof window === "undefined") return;
|
|
16
15
|
const el = document.documentElement;
|
|
@@ -40,8 +39,7 @@ function script(attribute, storageKey, defaultTheme, forcedTheme, themes, value,
|
|
|
40
39
|
updateDOM(enableSystem && themeName === "system" ? getSystemTheme() : themeName);
|
|
41
40
|
} catch {}
|
|
42
41
|
}
|
|
43
|
-
|
|
44
|
-
//#region src/components/themes/theme-script.tsx
|
|
42
|
+
// src/components/themes/theme-script.tsx
|
|
45
43
|
const ThemeScript = React.memo(({ forcedTheme, storageKey = "theme", attribute = "data-theme", enableSystem = true, enableColorScheme = true, defaultTheme = enableSystem ? "system" : "light", value, themes = ["light", "dark"], nonce, scriptProps }) => {
|
|
46
44
|
const scriptArgs = JSON.stringify([
|
|
47
45
|
attribute,
|
|
@@ -60,8 +58,7 @@ const ThemeScript = React.memo(({ forcedTheme, storageKey = "theme", attribute =
|
|
|
60
58
|
dangerouslySetInnerHTML: { __html: `(${script.toString()})(${scriptArgs})` }
|
|
61
59
|
});
|
|
62
60
|
});
|
|
63
|
-
|
|
64
|
-
//#region src/components/themes/theme.provider.tsx
|
|
61
|
+
// src/components/themes/theme.provider.tsx
|
|
65
62
|
const colorSchemes = ["light", "dark"];
|
|
66
63
|
const MEDIA = "(prefers-color-scheme: dark)";
|
|
67
64
|
const isServer = typeof window === "undefined";
|
|
@@ -99,8 +96,10 @@ function ThemeImpl({ forcedTheme, disableTransitionOnChange = false, enableSyste
|
|
|
99
96
|
if (attr === "class") {
|
|
100
97
|
d.classList.remove(...attrs.flatMap((a) => a.split(" ")));
|
|
101
98
|
if (name) d.classList.add(...name.split(" "));
|
|
102
|
-
} else if (attr.startsWith("data-"))
|
|
103
|
-
|
|
99
|
+
} else if (attr.startsWith("data-")) {
|
|
100
|
+
if (name) d.setAttribute(attr, name);
|
|
101
|
+
else d.removeAttribute(attr);
|
|
102
|
+
}
|
|
104
103
|
};
|
|
105
104
|
if (Array.isArray(attribute)) attribute.forEach(handleAttribute);
|
|
106
105
|
else handleAttribute(attribute);
|
|
@@ -227,5 +226,4 @@ function getSystemTheme(e) {
|
|
|
227
226
|
if (!e) e = window.matchMedia(MEDIA);
|
|
228
227
|
return e.matches ? "dark" : "light";
|
|
229
228
|
}
|
|
230
|
-
//#endregion
|
|
231
229
|
export { ClientOnly as i, useTheme as n, ThemeScript as r, ThemeProvider as t };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { TimePicker };
|
|
1
|
+
export { t as TimePicker } from "../time-picker-B_am4eAK.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as useDeprecationWarning } from "./use-deprecation-warning-
|
|
2
|
-
import { n as TimePicker$1 } from "./picker-
|
|
1
|
+
import { t as useDeprecationWarning } from "./use-deprecation-warning-BS1V4IS5.mjs";
|
|
2
|
+
import { n as TimePicker$1 } from "./picker-DC3GErYg.mjs";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/components/features/time-picker/time-picker.tsx
|
|
5
5
|
const STEP_VALUES = [
|
|
6
6
|
1,
|
|
7
7
|
5,
|
|
@@ -45,5 +45,4 @@ function TimePicker({ value, onChange, min, max, step, placeholder, disabled, cl
|
|
|
45
45
|
})] });
|
|
46
46
|
}
|
|
47
47
|
TimePicker.displayName = "TimePicker";
|
|
48
|
-
//#endregion
|
|
49
48
|
export { TimePicker as t };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { t as cn } from "./utils-
|
|
2
|
-
import { t as Button } from "./button-
|
|
1
|
+
import { t as cn } from "./utils-CTIuhCOs.mjs";
|
|
2
|
+
import { t as Button } from "./button-Cn4KagBO.mjs";
|
|
3
3
|
import { Calendar } from "./calendar/index.mjs";
|
|
4
|
-
import { t as Input } from "./input-
|
|
5
|
-
import { t as ResponsivePopover } from "./responsive-popover-
|
|
6
|
-
import { i as SelectItem, l as SelectTrigger, n as SelectContent, t as Select, u as SelectValue } from "./select-
|
|
7
|
-
import { F as zonedDateToIso, M as getBrowserTimezone, N as getTimezoneOffset, P as isoToZonedDate, U as endOfDayInTz, W as startOfDayInTz, j as formatTimezoneLabel, t as DateTimeRangePicker } from "./date-time-range-picker-
|
|
8
|
-
import { t as useDeprecationWarning } from "./use-deprecation-warning-
|
|
4
|
+
import { t as Input } from "./input-DsT5qkJn.mjs";
|
|
5
|
+
import { t as ResponsivePopover } from "./responsive-popover-DJYd8lOK.mjs";
|
|
6
|
+
import { i as SelectItem, l as SelectTrigger, n as SelectContent, t as Select, u as SelectValue } from "./select-DemYhwnG.mjs";
|
|
7
|
+
import { F as zonedDateToIso, M as getBrowserTimezone, N as getTimezoneOffset, P as isoToZonedDate, U as endOfDayInTz, W as startOfDayInTz, j as formatTimezoneLabel, t as DateTimeRangePicker } from "./date-time-range-picker-yy1Acntn.mjs";
|
|
8
|
+
import { t as useDeprecationWarning } from "./use-deprecation-warning-BS1V4IS5.mjs";
|
|
9
9
|
import { CalendarIcon, Globe } from "lucide-react";
|
|
10
10
|
import { useCallback, useEffect, useId, useRef, useState } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { fromZonedTime, toZonedTime } from "date-fns-tz";
|
|
13
13
|
import { endOfDay, format, isSameDay, isSameYear, parse, startOfDay, subDays, subHours, subMinutes } from "date-fns";
|
|
14
|
-
|
|
14
|
+
// src/components/features/time-range-picker/utils/timezone.ts
|
|
15
15
|
/**
|
|
16
16
|
* Create a TimezoneOption from a timezone string
|
|
17
17
|
*/
|
|
@@ -86,8 +86,7 @@ function formatUtcForDisplay(utcString, timezone, formatString = "MMM d, yyyy HH
|
|
|
86
86
|
const zonedDate = utcStringToZonedDate(utcString, timezone);
|
|
87
87
|
return format(zonedDate, formatString);
|
|
88
88
|
}
|
|
89
|
-
|
|
90
|
-
//#region src/components/features/time-range-picker/components/absolute-range-panel.tsx
|
|
89
|
+
// src/components/features/time-range-picker/components/absolute-range-panel.tsx
|
|
91
90
|
/**
|
|
92
91
|
* Parse a zoned date into separate date and time parts
|
|
93
92
|
*/
|
|
@@ -351,8 +350,7 @@ function CustomRangePanel({ fromUtc, toUtc, timezone, onRangeChange, disableFutu
|
|
|
351
350
|
})]
|
|
352
351
|
});
|
|
353
352
|
}
|
|
354
|
-
|
|
355
|
-
//#region src/components/features/time-range-picker/components/quick-ranges-panel.tsx
|
|
353
|
+
// src/components/features/time-range-picker/components/quick-ranges-panel.tsx
|
|
356
354
|
function QuickRangesPanel({ presets, value, onPresetSelect, className }) {
|
|
357
355
|
const selectedPreset = value?.type === "preset" ? value.preset : void 0;
|
|
358
356
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -377,8 +375,7 @@ function QuickRangesPanel({ presets, value, onPresetSelect, className }) {
|
|
|
377
375
|
})]
|
|
378
376
|
});
|
|
379
377
|
}
|
|
380
|
-
|
|
381
|
-
//#region src/components/features/time-range-picker/components/timezone-selector.tsx
|
|
378
|
+
// src/components/features/time-range-picker/components/timezone-selector.tsx
|
|
382
379
|
function TimezoneSelector({ value, onChange, options, className }) {
|
|
383
380
|
const selectedOption = options.find((opt) => opt.value === value);
|
|
384
381
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -400,8 +397,7 @@ function TimezoneSelector({ value, onChange, options, className }) {
|
|
|
400
397
|
})]
|
|
401
398
|
});
|
|
402
399
|
}
|
|
403
|
-
|
|
404
|
-
//#region src/components/features/time-range-picker/presets.ts
|
|
400
|
+
// src/components/features/time-range-picker/presets.ts
|
|
405
401
|
/**
|
|
406
402
|
* Default time range presets with timezone-aware range calculation
|
|
407
403
|
* Note: All presets use "now" as end time to avoid future timestamps
|
|
@@ -523,8 +519,7 @@ function getPresetRange(preset, timezone) {
|
|
|
523
519
|
to: range.to.toISOString()
|
|
524
520
|
};
|
|
525
521
|
}
|
|
526
|
-
|
|
527
|
-
//#region src/components/features/time-range-picker/time-range-picker.tsx
|
|
522
|
+
// src/components/features/time-range-picker/time-range-picker.tsx
|
|
528
523
|
/**
|
|
529
524
|
* @deprecated Use `DateTimeRangePicker` from `@datum-cloud/datum-ui/picker`
|
|
530
525
|
* (or `TimeRangePicker` for time-of-day-only ranges). This adapter shim ships
|
|
@@ -572,8 +567,7 @@ function TimeRangePicker({ value, onChange, onClear: _onClear, timezone, presets
|
|
|
572
567
|
});
|
|
573
568
|
}
|
|
574
569
|
TimeRangePicker.displayName = "TimeRangePicker";
|
|
575
|
-
|
|
576
|
-
//#region src/components/features/time-range-picker/utils/format-display.ts
|
|
570
|
+
// src/components/features/time-range-picker/utils/format-display.ts
|
|
577
571
|
/**
|
|
578
572
|
* Format a TimeRangeValue for display in the trigger button
|
|
579
573
|
* Always shows the actual date/time range, not preset labels
|
|
@@ -615,8 +609,7 @@ function formatSingleTimeDisplay(utcString, timezone) {
|
|
|
615
609
|
function formatDateForInput(date) {
|
|
616
610
|
return format(date, "yyyy-MM-dd'T'HH:mm");
|
|
617
611
|
}
|
|
618
|
-
|
|
619
|
-
//#region src/components/features/time-range-picker/utils/to-api-format.ts
|
|
612
|
+
// src/components/features/time-range-picker/utils/to-api-format.ts
|
|
620
613
|
/**
|
|
621
614
|
* Convert a TimeRangeValue to API format (startTime/endTime)
|
|
622
615
|
*
|
|
@@ -656,5 +649,4 @@ function toApiTimeRange(value, timezone, presets = DEFAULT_PRESETS) {
|
|
|
656
649
|
endTime: range.to
|
|
657
650
|
};
|
|
658
651
|
}
|
|
659
|
-
//#endregion
|
|
660
652
|
export { getShortTimezoneDisplay as _, TimeRangePicker as a, utcToLocalInputString as b, getPresetByKey as c, TimezoneSelector as d, QuickRangesPanel as f, getDefaultTimezoneOptions as g, formatUtcForDisplay as h, formatTimeRangeDisplay as i, getPresetByShortcut as l, createTimezoneOption as m, formatDateForInput as n, DEFAULT_PRESETS as o, CustomRangePanel as p, formatSingleTimeDisplay as r, getDefaultPreset as s, toApiTimeRange as t, getPresetRange as u, localInputStringToUtc as v, zonedDateToUtcString as x, utcStringToZonedDate as y };
|
package/dist/toast/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as toast } from "../toast-
|
|
2
|
-
import { n as Toaster, t as useToast } from "../use-toast-
|
|
1
|
+
import { t as toast } from "../toast-CizxCEcK.mjs";
|
|
2
|
+
import { n as Toaster, t as useToast } from "../use-toast-CZAZeS95.mjs";
|
|
3
3
|
export { Toaster, toast, useToast };
|