@jfrader/ui 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -1
- package/dist/{accordion-DLul6vIl.js → accordion-D6myONB9.js} +36 -35
- package/dist/accordion.js +1 -1
- package/dist/activity-rings-Uszvwqdl.js +528 -0
- package/dist/activity-rings.js +2 -0
- package/dist/{alert-DS_einpy.js → alert-Bhj-qSMs.js} +15 -14
- package/dist/alert.js +1 -1
- package/dist/{announcement-bar-Dlbq5-9D.js → announcement-bar-B5J33QUh.js} +132 -131
- package/dist/announcement-bar.js +1 -1
- package/dist/{avatar-CaGJHy1N.js → avatar-B6idYC59.js} +11 -10
- package/dist/{avatar-group-M1opAQEG.js → avatar-group-DvP8mAE-.js} +10 -9
- package/dist/avatar-group.js +1 -1
- package/dist/avatar.js +1 -1
- package/dist/{badge-CjM5Agqk.js → badge-CfhTcA-Z.js} +10 -9
- package/dist/badge.js +1 -1
- package/dist/billing-toggle-CgC7yxxo.js +349 -0
- package/dist/billing-toggle.js +2 -0
- package/dist/{bottom-sheet-DjZOPq4k.js → bottom-sheet-BFQKO0Wo.js} +282 -264
- package/dist/bottom-sheet.js +1 -1
- package/dist/{breadcrumbs-BDK_LiwH.js → breadcrumbs-CG3akw-b.js} +19 -18
- package/dist/breadcrumbs.js +1 -1
- package/dist/{button-NLY0h6EJ.js → button-C6OV0C7J.js} +14 -13
- package/dist/button-group-B9wP2ddS.js +611 -0
- package/dist/button-group.js +2 -0
- package/dist/button.js +1 -1
- package/dist/calendar-Bg6D2sul.js +377 -0
- package/dist/calendar.js +1 -1
- package/dist/calendar.utils-azmB4Ej7.js +79 -0
- package/dist/card-C008OQCp.js +164 -0
- package/dist/card.js +1 -1
- package/dist/{carousel-B7OrvD6J.js → carousel-lTH4Foke.js} +13 -12
- package/dist/carousel.js +1 -1
- package/dist/chat-thread-DVa17BRC.js +864 -0
- package/dist/chat-thread.js +2 -0
- package/dist/{checkbox-DKSzExj2.js → checkbox-CClE61GV.js} +9 -8
- package/dist/checkbox.js +1 -1
- package/dist/{chip-group-DjQ0_6Y9.js → chip-group-BZUX9KPF.js} +17 -16
- package/dist/chip-group.js +1 -1
- package/dist/{choice-control-5kJkLXgv.js → choice-control-BsWOZPc9.js} +1 -1
- package/dist/{code-block-B5we2lZa.js → code-block-CYP89_6h.js} +35 -34
- package/dist/code-block.js +1 -1
- package/dist/{combobox-DFFqOBCi.js → combobox-D2Oc-co7.js} +21 -20
- package/dist/combobox.js +1 -1
- package/dist/command-palette-BrT1n9bb.js +394 -0
- package/dist/command-palette.js +1 -1
- package/dist/comment-thread-BnUHxviq.js +772 -0
- package/dist/comment-thread.js +1 -1
- package/dist/{container-BOaSptJa.js → container-BxtwJSSD.js} +3 -2
- package/dist/container.js +1 -1
- package/dist/{context-menu-__1c2Dk9.js → context-menu-I4i0LRpm.js} +52 -51
- package/dist/context-menu.js +1 -1
- package/dist/{copy-button-DCSLcYS-.js → copy-button-C0p_qrgf.js} +4 -4
- package/dist/copy-button.js +1 -1
- package/dist/{countdown-Dp_TD1VP.js → countdown-EcpV6rXy.js} +18 -17
- package/dist/countdown.js +1 -1
- package/dist/css-BYJhdGh-.js +2 -0
- package/dist/{date-picker-BiPN7yeK.js → date-picker-D-bn-iHs.js} +14 -13
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker-rXcZsI1Y.js +589 -0
- package/dist/date-range-picker.js +1 -1
- package/dist/dialog-CR1xdkrC.js +222 -0
- package/dist/dialog.js +1 -1
- package/dist/{divider-Cp7aNbhM.js → divider-zOJzkcHh.js} +7 -6
- package/dist/divider.js +1 -1
- package/dist/drawer-CceaEhCr.js +590 -0
- package/dist/drawer.js +1 -1
- package/dist/{empty-state-CDgrjPPf.js → empty-state-DO0ApylK.js} +2 -1
- package/dist/empty-state.js +1 -1
- package/dist/{expandable-card-rUATve0o.js → expandable-card-W97vjix9.js} +52 -51
- package/dist/expandable-card.js +1 -1
- package/dist/{expanding-search-BxOwtdwt.js → expanding-search-Bb2_YfNx.js} +16 -15
- package/dist/expanding-search.js +1 -1
- package/dist/{field-anatomy-COVdNpf5.js → field-anatomy-BDIP42MI.js} +2 -1
- package/dist/{file-dropzone-BuXm3Tea.js → file-dropzone-Bi5ikRIz.js} +14 -13
- package/dist/file-dropzone.js +1 -1
- package/dist/{filter-toolbar-Cy5Hqur-.js → filter-toolbar-QRnC4S_H.js} +33 -32
- package/dist/filter-toolbar.js +1 -1
- package/dist/{flex-Dh-_J5-U.js → flex-CS7eMRcK.js} +2 -2
- package/dist/flex.js +1 -1
- package/dist/{hold-to-confirm-DjB2EVjM.js → hold-to-confirm-CVBA0wNT.js} +18 -17
- package/dist/hold-to-confirm.js +1 -1
- package/dist/{hover-card-CoMJKg1g.js → hover-card-DN1EAlQA.js} +20 -19
- package/dist/hover-card.js +1 -1
- package/dist/{icon-wrapper-stN8sD7R.js → icon-wrapper-C-zMD0uL.js} +1 -1
- package/dist/{image-compare-BxY8Ykzt.js → image-compare-Ln2UUqTU.js} +20 -19
- package/dist/image-compare.js +1 -1
- package/dist/index.js +98 -83
- package/dist/{inline-edit-C0eeml65.js → inline-edit-D-pR2RPC.js} +22 -21
- package/dist/inline-edit.js +1 -1
- package/dist/{input-control-DmMuAuPS.js → input-control-B6HVBgwl.js} +1 -1
- package/dist/{json-viewer-DgWqyU75.js → json-viewer-Dro3WrjS.js} +31 -30
- package/dist/json-viewer.js +1 -1
- package/dist/{kbd-C3ACoMoE.js → kbd-BI_9qzYr.js} +2 -1
- package/dist/kbd.js +1 -1
- package/dist/keycap-keyboard-Cdx-OAS1.js +311 -0
- package/dist/keycap-keyboard.js +2 -0
- package/dist/{layout-style-Cbd1Vilw.js → layout-style-BE0gSqrH.js} +1 -1
- package/dist/lightbox-gallery-D0YaSTut.js +777 -0
- package/dist/lightbox-gallery.js +2 -0
- package/dist/link-unfurl-CReyIjyy.js +695 -0
- package/dist/link-unfurl.js +2 -0
- package/dist/{listbox-style-WX-RASp1.js → listbox-style-DNOxAulu.js} +1 -1
- package/dist/{loading-ring-B8-30Dl1.js → loading-ring-D0lGrK8z.js} +1 -1
- package/dist/locale-switcher-CZF7XNYG.js +295 -0
- package/dist/locale-switcher.js +2 -0
- package/dist/{mention-input-sq61si9L.js → mention-input-BjjAbJCf.js} +6 -6
- package/dist/mention-input.js +1 -1
- package/dist/{menu-DDKgmK2F.js → menu-CVzpsyXn.js} +113 -96
- package/dist/menu.js +1 -1
- package/dist/{metric-card--lVTz5Wn.js → metric-card-BnFssTXj.js} +12 -11
- package/dist/metric-card.js +1 -1
- package/dist/{multi-select-DG1BCFX7.js → multi-select-B3puEVo0.js} +67 -66
- package/dist/multi-select.js +1 -1
- package/dist/{navigation-CC26JDr-.js → navigation-C_JD43gA.js} +41 -40
- package/dist/navigation.js +1 -1
- package/dist/next.js +65 -0
- package/dist/now-playing-DjVm1Phm.js +439 -0
- package/dist/now-playing.js +2 -0
- package/dist/overlay-motion-Cr77ihn2.js +90 -0
- package/dist/{overlay-portal-C4JZFq2M.js → overlay-portal-C9igMHnC.js} +1 -1
- package/dist/{pagination-BfkeWbmP.js → pagination-Dkh4bJQh.js} +10 -9
- package/dist/pagination.js +1 -1
- package/dist/{password-field-03pWRkuY.js → password-field-Da58GP1g.js} +4 -4
- package/dist/password-field.js +1 -1
- package/dist/photo-grid-Dtl17D74.js +830 -0
- package/dist/photo-grid.js +2 -0
- package/dist/{pill-BaS-uIbn.js → pill-Dd7pog19.js} +10 -9
- package/dist/pill.js +1 -1
- package/dist/{popover-CErIw2q3.js → popover-CUMOcMtj.js} +5 -4
- package/dist/popover.js +1 -1
- package/dist/presence-spring-4zwtUDQN.js +12 -0
- package/dist/{progress-DAQkfhPd.js → progress-Bcuz3Ob4.js} +11 -10
- package/dist/progress.js +1 -1
- package/dist/{radio-cards-Cu9cBssN.js → radio-cards-FkAhESb5.js} +35 -34
- package/dist/radio-cards.js +1 -1
- package/dist/{radio-group-TIK0-iPX.js → radio-group-DItMf2YM.js} +18 -17
- package/dist/radio-group.js +1 -1
- package/dist/{resizable-panels-DUpQEpwG.js → resizable-panels-61h9hA3B.js} +13 -12
- package/dist/resizable-panels.js +1 -1
- package/dist/{scroll-area-CcZyiSOQ.js → scroll-area-B8KkCPOM.js} +16 -15
- package/dist/scroll-area.js +1 -1
- package/dist/{search-field-DMvho0KQ.js → search-field-CbsajaZb.js} +93 -92
- package/dist/search-field.js +1 -1
- package/dist/{segmented-control-8ZUGnsZm.js → segmented-control-DCh-4ca-.js} +26 -25
- package/dist/segmented-control.js +1 -1
- package/dist/{select-D5rhJ8gi.js → select-SrcQqZjo.js} +27 -26
- package/dist/select.js +1 -1
- package/dist/sheet-stack-DYX1SGSB.js +820 -0
- package/dist/sheet-stack.js +2 -0
- package/dist/shortcut-recorder-VgTQdjjn.js +688 -0
- package/dist/shortcut-recorder.js +2 -0
- package/dist/{signature-pad-_bTeguN9.js → signature-pad-khL2yhQI.js} +15 -14
- package/dist/signature-pad.js +1 -1
- package/dist/{skeleton-XQQDkCHd.js → skeleton-LJsQsveI.js} +9 -8
- package/dist/skeleton.js +1 -1
- package/dist/slider-DjAnGmlC.js +535 -0
- package/dist/slider.js +1 -1
- package/dist/{sortable-data-table-CYKT_Ng7.js → sortable-data-table-Bpitup_d.js} +29 -28
- package/dist/sortable-data-table.js +1 -1
- package/dist/{spinner-DtxvDPdM.js → spinner-CvzajSg9.js} +11 -10
- package/dist/spinner.js +1 -1
- package/dist/{split-button-BCw4zZom.js → split-button-Bu41f2AY.js} +20 -19
- package/dist/split-button.js +1 -1
- package/dist/{stack-DC3IbtWk.js → stack-Bac4sJeI.js} +2 -2
- package/dist/stack.js +1 -1
- package/dist/{stepper-CruHbXxX.js → stepper-C8Ncavbr.js} +22 -21
- package/dist/stepper.js +1 -1
- package/dist/stretch-refresh-OrnTEj7P.js +349 -0
- package/dist/stretch-refresh.js +2 -0
- package/dist/{surface-DZ4d-2aL.js → surface-C69kwSuk.js} +13 -3
- package/dist/{swipe-actions-CBuJREU1.js → swipe-actions-1H5UOZKE.js} +26 -25
- package/dist/swipe-actions.js +1 -1
- package/dist/{switch-C1WrKrf-.js → switch-79-hkQqg.js} +15 -14
- package/dist/switch.js +1 -1
- package/dist/sx-BJXJ2xJK.js +23 -0
- package/dist/{tabs-XluwRjgg.js → tabs-Bb5-noYE.js} +43 -42
- package/dist/tabs.js +1 -1
- package/dist/{tag-input-DSRCyrX2.js → tag-input-BQaueKEb.js} +5 -5
- package/dist/tag-input.js +1 -1
- package/dist/{text-field-hU72iSVS.js → text-field-D0VP7b4P.js} +3 -3
- package/dist/text-field.js +1 -1
- package/dist/{textarea-3k4Y0QQ3.js → textarea-D1YwEPmn.js} +3 -3
- package/dist/textarea.js +1 -1
- package/dist/theme-provider-BvcY-iJu.js +20 -0
- package/dist/theme-root-BrYVcTzt.js +163 -0
- package/dist/theme-root.js +1 -1
- package/dist/theme-scope-DGWy4H0C.js +62 -0
- package/dist/{theme-switch-C505TtU8.js → theme-switch-CP42mVDb.js} +12 -11
- package/dist/theme-switch.js +1 -1
- package/dist/thread-parts-DfZNz70v.js +683 -0
- package/dist/{time-picker-CPlhW0tr.js → time-picker-Tnd-JBLC.js} +16 -15
- package/dist/time-picker.js +1 -1
- package/dist/{timeline-B0uAAVfT.js → timeline-DaldDMX7.js} +22 -21
- package/dist/timeline.js +1 -1
- package/dist/{toast-B7wo3sX1.js → toast-CSAbl5yK.js} +12 -11
- package/dist/{toast-stack-B40VpS4M.js → toast-stack-BCR4Cu7V.js} +10 -9
- package/dist/toast-stack.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/{toggle-group-B2fpFZwV.js → toggle-group-C7ye1v4s.js} +23 -22
- package/dist/toggle-group.js +1 -1
- package/dist/{tooltip-BvgVTCTN.js → tooltip-IajLwdUb.js} +48 -39
- package/dist/tooltip.js +1 -1
- package/dist/{tree-view-j8qLqkb_.js → tree-view-CoW4oJIZ.js} +15 -14
- package/dist/tree-view.js +1 -1
- package/dist/{trigger-style-B1KVC8O1.js → trigger-style-CtOrdPk4.js} +1 -1
- package/dist/types/components/activity-rings/activity-rings.d.ts +115 -0
- package/dist/types/components/activity-rings/index.d.ts +2 -0
- package/dist/types/components/billing-toggle/billing-toggle.d.ts +57 -0
- package/dist/types/components/billing-toggle/index.d.ts +2 -0
- package/dist/types/components/button-group/button-group.d.ts +72 -0
- package/dist/types/components/button-group/index.d.ts +2 -0
- package/dist/types/components/card/card.d.ts +4 -1
- package/dist/types/components/chat-thread/chat-thread.d.ts +130 -0
- package/dist/types/components/chat-thread/index.d.ts +2 -0
- package/dist/types/components/comment-thread/comment-thread.d.ts +3 -3
- package/dist/types/components/drawer/drawer.d.ts +7 -1
- package/dist/types/components/keycap-keyboard/index.d.ts +2 -0
- package/dist/types/components/keycap-keyboard/keycap-keyboard.d.ts +32 -0
- package/dist/types/components/lightbox-gallery/index.d.ts +2 -0
- package/dist/types/components/lightbox-gallery/lightbox-gallery.d.ts +74 -0
- package/dist/types/components/link-unfurl/index.d.ts +2 -0
- package/dist/types/components/link-unfurl/link-unfurl.d.ts +94 -0
- package/dist/types/components/locale-switcher/index.d.ts +2 -0
- package/dist/types/components/locale-switcher/locale-switcher.d.ts +58 -0
- package/dist/types/components/menu/menu.d.ts +29 -5
- package/dist/types/components/next/emotion-registry.d.ts +16 -0
- package/dist/types/components/next/index.d.ts +2 -0
- package/dist/types/components/next/registry.d.ts +21 -0
- package/dist/types/components/now-playing/index.d.ts +1 -0
- package/dist/types/components/now-playing/now-playing.d.ts +88 -0
- package/dist/types/components/photo-grid/index.d.ts +2 -0
- package/dist/types/components/photo-grid/photo-grid.d.ts +82 -0
- package/dist/types/components/sheet-stack/index.d.ts +2 -0
- package/dist/types/components/sheet-stack/sheet-stack.d.ts +78 -0
- package/dist/types/components/shortcut-recorder/index.d.ts +2 -0
- package/dist/types/components/shortcut-recorder/shortcut-recorder.d.ts +117 -0
- package/dist/types/components/stretch-refresh/index.d.ts +1 -0
- package/dist/types/components/stretch-refresh/stretch-refresh.d.ts +49 -0
- package/dist/types/components/theme-root/index.d.ts +1 -0
- package/dist/types/components/theme-root/theme-root.d.ts +9 -1
- package/dist/types/components/{comment-thread → thread}/thread-parts.d.ts +7 -2
- package/dist/types/components/tooltip/tooltip.d.ts +8 -1
- package/dist/types/components/usage-meter/usage-meter.d.ts +2 -12
- package/dist/types/components/usage-meter/usage-model.d.ts +30 -0
- package/dist/types/components/user-menu/index.d.ts +2 -0
- package/dist/types/components/user-menu/user-menu.d.ts +119 -0
- package/dist/types/index.d.ts +14 -1
- package/dist/types/overlay/exit-motion.d.ts +24 -0
- package/dist/types/overlay/presence-spring.d.ts +12 -0
- package/dist/types/overlay/use-native-dialog.d.ts +10 -1
- package/dist/types/styling/create-theme.d.ts +24 -0
- package/dist/types/styling/css.d.ts +1 -1
- package/dist/types/styling/overlay-motion.d.ts +95 -0
- package/dist/types/styling/surface.d.ts +7 -0
- package/dist/types/styling/theme-scope.d.ts +29 -3
- package/dist/types/styling/theme.d.ts +5 -0
- package/dist/{usage-meter-qyQ3rYVv.js → usage-meter-CYvlB6l3.js} +165 -175
- package/dist/usage-meter.js +1 -1
- package/dist/usage-model-C0fS47w4.js +32 -0
- package/dist/use-native-dialog-FB0p7lkg.js +93 -0
- package/dist/use-scroll-lock-40gXwwAy.js +23 -0
- package/dist/user-menu-DzELTg1x.js +757 -0
- package/dist/user-menu.js +2 -0
- package/dist/{visually-hidden-BJdvqqvn.js → visually-hidden-DgVO3NaB.js} +1 -1
- package/package.json +72 -6
- package/dist/calendar-BzJdv_SZ.js +0 -449
- package/dist/card-Ca4KQKYQ.js +0 -154
- package/dist/command-palette-BmQu2w4H.js +0 -391
- package/dist/comment-thread-ASaXDcGo.js +0 -1410
- package/dist/date-range-picker-DQpUeKqV.js +0 -570
- package/dist/dialog-BX1zYMs-.js +0 -219
- package/dist/drawer-DsASTiP-.js +0 -553
- package/dist/elastic-slider-BG6K019r.js +0 -395
- package/dist/elastic-slider.js +0 -2
- package/dist/slider-DVG6-Awh.js +0 -308
- package/dist/sx-Dx9JUKp5.js +0 -23
- package/dist/theme-root-Bs1U3uPA.js +0 -46
- package/dist/theme-scope-t7nAKc2c.js +0 -27
- package/dist/types/components/elastic-slider/elastic-slider.d.ts +0 -53
- package/dist/types/components/elastic-slider/index.d.ts +0 -1
- package/dist/use-native-dialog-DWpIUVO1.js +0 -84
- package/dist/use-slider-interaction-ChL-208h.js +0 -234
- /package/dist/types/components/{comment-thread → thread}/thread-core.d.ts +0 -0
|
@@ -0,0 +1,589 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { i as e } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { n as t } from "./focus-ring-BK5W5_NY.js";
|
|
4
|
+
import { n, r } from "./media-8yrN85VT.js";
|
|
5
|
+
import { t as i } from "./sx-BJXJ2xJK.js";
|
|
6
|
+
import { n as ee } from "./roving-focus-CYlo_Kf8.js";
|
|
7
|
+
import { t as te } from "./use-controlled-state-DpeVQZNR.js";
|
|
8
|
+
import { c as ne, f as a, g as o, i as s, l as c, o as l, p as u, s as d, t as f, u as p, v as m } from "./calendar.utils-azmB4Ej7.js";
|
|
9
|
+
import { t as h } from "./renderable-DzcIj1Lo.js";
|
|
10
|
+
import { t as g } from "./button-C6OV0C7J.js";
|
|
11
|
+
import { n as _ } from "./surface-C69kwSuk.js";
|
|
12
|
+
import { a as v, i as y } from "./overlay-layer-qEbpEtb8.js";
|
|
13
|
+
import { t as b } from "./overlay-portal-C9igMHnC.js";
|
|
14
|
+
import { t as x } from "./use-overlay-floating-Bx2jBKAA.js";
|
|
15
|
+
import { t as S } from "./calendar-Bg6D2sul.js";
|
|
16
|
+
import { a as C, l as re } from "./overlay-motion-Cr77ihn2.js";
|
|
17
|
+
import { createContext as w, useCallback as ie, useContext as T, useEffect as ae, useId as oe, useLayoutEffect as E, useMemo as D, useRef as O, useState as k } from "react";
|
|
18
|
+
import { vars as A } from "@jfrader/tokens/vars";
|
|
19
|
+
import { Fragment as j, jsx as M, jsxs as N } from "@emotion/react/jsx-runtime";
|
|
20
|
+
import { FloatingFocusManager as se, useClick as P, useInteractions as F, useMergeRefs as ce, useRole as I } from "@floating-ui/react";
|
|
21
|
+
//#region src/components/date-range-picker/date-range-picker.tsx
|
|
22
|
+
var L = "bottom-start", le = 712, R = 864e5, ue = /* @__PURE__ */ new Set(["Enter", "ArrowDown"]), z = " ", B = "[data-ui=\"calendar-day\"]", V = `${B}[tabindex="0"]`, H = {
|
|
23
|
+
itemSelector: "[data-ui=\"date-range-picker-preset\"]:not([aria-disabled=\"true\"])",
|
|
24
|
+
ownerSelector: "[data-ui=\"date-range-picker-presets\"]"
|
|
25
|
+
}, de = [], fe = {
|
|
26
|
+
...f,
|
|
27
|
+
dateStyle: "medium"
|
|
28
|
+
}, U = w(null);
|
|
29
|
+
function W(e) {
|
|
30
|
+
let t = T(U);
|
|
31
|
+
if (!t) throw Error(`DateRangePicker.${e} must be rendered inside <DateRangePicker>.`);
|
|
32
|
+
return t;
|
|
33
|
+
}
|
|
34
|
+
var G = (e) => e != null && p(e.start) && p(e.end) && e.start <= e.end, pe = (e, t, n) => G(e) && a(e.start, t, n) && a(e.end, t, n), me = (e, t) => e === t || e !== null && t !== null && e.start === t.start && e.end === t.end, he = (e, t) => e <= t ? {
|
|
35
|
+
start: e,
|
|
36
|
+
end: t
|
|
37
|
+
} : {
|
|
38
|
+
start: t,
|
|
39
|
+
end: e
|
|
40
|
+
}, ge = ({ start: e, end: t }) => Math.round((l(t).getTime() - l(e).getTime()) / R) + 1;
|
|
41
|
+
function _e() {
|
|
42
|
+
let e = /* @__PURE__ */ new Date();
|
|
43
|
+
return u(d(e.getFullYear(), e.getMonth(), e.getDate()));
|
|
44
|
+
}
|
|
45
|
+
var ve = (e, { start: t, end: n }) => e.formatRange(l(t), l(n)), K = (e) => {
|
|
46
|
+
let t = e?.querySelector(V) ?? null;
|
|
47
|
+
return t?.focus({ preventScroll: !0 }), t;
|
|
48
|
+
}, q = e({
|
|
49
|
+
appearance: "none",
|
|
50
|
+
display: "inline-flex",
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
gap: A.space[2],
|
|
53
|
+
boxSizing: "border-box",
|
|
54
|
+
maxInlineSize: "100%",
|
|
55
|
+
border: `1px solid ${A.color.borderControl}`,
|
|
56
|
+
borderRadius: A.radius.md,
|
|
57
|
+
backgroundColor: A.color.surfaceRaised,
|
|
58
|
+
font: "inherit",
|
|
59
|
+
fontWeight: A.fontWeight.medium,
|
|
60
|
+
color: A.color.text,
|
|
61
|
+
textAlign: "start",
|
|
62
|
+
cursor: "pointer",
|
|
63
|
+
transitionProperty: "background-color, border-color",
|
|
64
|
+
transitionDuration: A.motion.duration.fast,
|
|
65
|
+
transitionTimingFunction: A.motion.easeStandard,
|
|
66
|
+
"&:hover:not(:disabled)": { backgroundColor: A.color.surfaceHover },
|
|
67
|
+
"&:focus-visible": { ...t },
|
|
68
|
+
"&[aria-invalid=\"true\"]:not(:focus-visible)": { borderColor: A.color.dangerText },
|
|
69
|
+
"&:disabled": {
|
|
70
|
+
opacity: .55,
|
|
71
|
+
cursor: "not-allowed"
|
|
72
|
+
},
|
|
73
|
+
[r]: { transitionDuration: "0s" }
|
|
74
|
+
}), J = {
|
|
75
|
+
sm: e({
|
|
76
|
+
minBlockSize: A.space[8],
|
|
77
|
+
paddingInline: A.space[3],
|
|
78
|
+
fontSize: A.textSize.sm
|
|
79
|
+
}),
|
|
80
|
+
md: e({
|
|
81
|
+
minBlockSize: A.space[10],
|
|
82
|
+
paddingInline: A.space[4],
|
|
83
|
+
fontSize: A.textSize.sm
|
|
84
|
+
}),
|
|
85
|
+
lg: e({
|
|
86
|
+
minBlockSize: A.space[12],
|
|
87
|
+
paddingInline: A.space[4],
|
|
88
|
+
fontSize: A.textSize.md
|
|
89
|
+
})
|
|
90
|
+
}, Y = e({
|
|
91
|
+
display: "inline-flex",
|
|
92
|
+
flexShrink: 0,
|
|
93
|
+
color: A.color.textMuted,
|
|
94
|
+
"& > svg": {
|
|
95
|
+
inlineSize: "1em",
|
|
96
|
+
blockSize: "1em"
|
|
97
|
+
}
|
|
98
|
+
}), X = e({ color: A.color.textMuted }), Z = e({
|
|
99
|
+
display: "block",
|
|
100
|
+
marginBlockStart: A.space[2],
|
|
101
|
+
fontSize: A.textSize.xs,
|
|
102
|
+
color: A.color.dangerText
|
|
103
|
+
}), ye = e({
|
|
104
|
+
..._,
|
|
105
|
+
display: "grid",
|
|
106
|
+
gap: A.space[4],
|
|
107
|
+
borderRadius: A.radius.lg,
|
|
108
|
+
boxShadow: A.shadow.overlay,
|
|
109
|
+
padding: A.space[4],
|
|
110
|
+
overflow: "auto",
|
|
111
|
+
...C,
|
|
112
|
+
"&[data-layout=\"rail\"]": { gridTemplateColumns: "auto 1fr" },
|
|
113
|
+
[n]: { border: "1px solid CanvasText" }
|
|
114
|
+
}), be = e({
|
|
115
|
+
display: "flex",
|
|
116
|
+
gap: A.space[2],
|
|
117
|
+
"[data-layout=\"row\"] > &": {
|
|
118
|
+
overflowX: "auto",
|
|
119
|
+
paddingBlock: A.space[1]
|
|
120
|
+
},
|
|
121
|
+
"[data-layout=\"rail\"] > &": {
|
|
122
|
+
flexDirection: "column",
|
|
123
|
+
gridRow: "1 / span 2",
|
|
124
|
+
paddingInlineEnd: A.space[4],
|
|
125
|
+
borderInlineEnd: `1px solid ${A.color.border}`
|
|
126
|
+
}
|
|
127
|
+
}), xe = e({
|
|
128
|
+
appearance: "none",
|
|
129
|
+
flexShrink: 0,
|
|
130
|
+
minBlockSize: A.space[8],
|
|
131
|
+
paddingInline: A.space[3],
|
|
132
|
+
border: "1px solid transparent",
|
|
133
|
+
borderRadius: A.radius.md,
|
|
134
|
+
backgroundColor: "transparent",
|
|
135
|
+
font: "inherit",
|
|
136
|
+
fontSize: A.textSize.sm,
|
|
137
|
+
color: A.color.text,
|
|
138
|
+
textAlign: "start",
|
|
139
|
+
whiteSpace: "nowrap",
|
|
140
|
+
cursor: "pointer",
|
|
141
|
+
transitionProperty: "background-color, border-color",
|
|
142
|
+
transitionDuration: A.motion.duration.fast,
|
|
143
|
+
transitionTimingFunction: A.motion.easeStandard,
|
|
144
|
+
"&:hover:not([aria-disabled=\"true\"])": { backgroundColor: A.color.surfaceHover },
|
|
145
|
+
"&[aria-pressed=\"true\"]": {
|
|
146
|
+
backgroundColor: A.color.accentSoft,
|
|
147
|
+
borderColor: A.color.accentBorder
|
|
148
|
+
},
|
|
149
|
+
"&[aria-disabled=\"true\"]": {
|
|
150
|
+
opacity: .55,
|
|
151
|
+
cursor: "not-allowed"
|
|
152
|
+
},
|
|
153
|
+
"&:focus-visible": { ...t },
|
|
154
|
+
[r]: { transitionDuration: "0s" },
|
|
155
|
+
[n]: { "&[aria-pressed=\"true\"]": { borderColor: "Highlight" } }
|
|
156
|
+
}), Se = e({
|
|
157
|
+
display: "flex",
|
|
158
|
+
flexWrap: "wrap",
|
|
159
|
+
alignItems: "flex-start",
|
|
160
|
+
gap: A.space[6]
|
|
161
|
+
}), Ce = e({
|
|
162
|
+
display: "flex",
|
|
163
|
+
flexWrap: "wrap",
|
|
164
|
+
alignItems: "center",
|
|
165
|
+
justifyContent: "space-between",
|
|
166
|
+
gap: A.space[3],
|
|
167
|
+
"[data-layout=\"rail\"] > &": { gridColumn: 2 }
|
|
168
|
+
}), we = e({
|
|
169
|
+
fontSize: A.textSize.sm,
|
|
170
|
+
color: A.color.textMuted
|
|
171
|
+
}), Te = e({
|
|
172
|
+
display: "flex",
|
|
173
|
+
gap: A.space[2],
|
|
174
|
+
marginInlineStart: "auto"
|
|
175
|
+
});
|
|
176
|
+
function Ee({ nodeId: e, value: t, defaultValue: n, onValueChange: r, open: i, defaultOpen: ee = !1, onOpenChange: a, min: o, max: s, locale: c, firstDayOfWeek: l, today: u, months: d = "auto", boundary: m, presets: h = de, disabled: g = !1, readOnly: _ = !1, required: y = !1, startName: b, endName: S, messages: C, children: re }) {
|
|
177
|
+
let [w = null, ie, T] = te(t, n ?? null, r), [oe = !1, E] = te(i, ee, a), A = oe && !g, [j, N] = k(null), [se, ce] = k(null), le = O(null), R = O(!1), ue = O(null), z = D(() => new Intl.DateTimeFormat(c ?? ne(), f).resolvedOptions().locale, [c]), B = D(() => new Intl.DateTimeFormat(z, fe), [z]), V = G(w) ? w : null, H = p(o) ? o : void 0, W = p(s) ? s : void 0, he = w !== null && V === null || H !== void 0 && W !== void 0 && H > W, ge = p(u) ? u : _e(), { refs: K, floatingStyles: q, context: J } = x({
|
|
178
|
+
open: A,
|
|
179
|
+
placement: L,
|
|
180
|
+
nodeId: e,
|
|
181
|
+
boundary: m,
|
|
182
|
+
onAvailableSize: (e) => ce((t) => t?.width === e.width && t.height === e.height ? t : e),
|
|
183
|
+
onOpenChange: (e, t, n) => {
|
|
184
|
+
if (g && e) return;
|
|
185
|
+
let r = ue.current;
|
|
186
|
+
ue.current = n === "outside-press" && t?.target instanceof Element ? t.target : null;
|
|
187
|
+
let i = n === "focus-out" && t instanceof FocusEvent ? t.relatedTarget : null;
|
|
188
|
+
r && i instanceof Node && i.contains(r) || (e || (R.current = n === "escape-key"), E(e));
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
ae(() => {
|
|
192
|
+
!A && R.current && (R.current = !1, K.domReference.current?.focus());
|
|
193
|
+
}, [A, K]);
|
|
194
|
+
let Y = P(J, {
|
|
195
|
+
enabled: !g,
|
|
196
|
+
keyboardHandlers: !1
|
|
197
|
+
}), X = v(J, "container"), Z = I(J, { role: "dialog" }), { getReferenceProps: ye, getFloatingProps: be } = F([
|
|
198
|
+
Y,
|
|
199
|
+
...X,
|
|
200
|
+
Z
|
|
201
|
+
]), xe = D(() => V ? ve(B, V) : void 0, [B, V]), Se = D(() => {
|
|
202
|
+
let e = (e) => {
|
|
203
|
+
me(e, w) || ie(e);
|
|
204
|
+
};
|
|
205
|
+
return {
|
|
206
|
+
open: A,
|
|
207
|
+
disabled: g,
|
|
208
|
+
readOnly: _,
|
|
209
|
+
required: y,
|
|
210
|
+
invalid: he,
|
|
211
|
+
value: V,
|
|
212
|
+
startName: b,
|
|
213
|
+
endName: S,
|
|
214
|
+
displayValue: xe,
|
|
215
|
+
min: H,
|
|
216
|
+
max: W,
|
|
217
|
+
locale: z,
|
|
218
|
+
firstDayOfWeek: l,
|
|
219
|
+
today: ge,
|
|
220
|
+
months: d,
|
|
221
|
+
presets: h,
|
|
222
|
+
messages: C,
|
|
223
|
+
availableSize: se,
|
|
224
|
+
triggerLabelling: j,
|
|
225
|
+
contentRef: le,
|
|
226
|
+
refs: K,
|
|
227
|
+
floatingContext: J,
|
|
228
|
+
floatingStyles: q,
|
|
229
|
+
getReferenceProps: ye,
|
|
230
|
+
getFloatingProps: be,
|
|
231
|
+
requestOpen: () => {
|
|
232
|
+
g || E(!0);
|
|
233
|
+
},
|
|
234
|
+
apply: (t) => {
|
|
235
|
+
g || _ || !pe(t, H, W) || (e(t), R.current = !0, E(!1));
|
|
236
|
+
},
|
|
237
|
+
cancel: () => {
|
|
238
|
+
R.current = !0, E(!1);
|
|
239
|
+
},
|
|
240
|
+
resetValue: () => {
|
|
241
|
+
t === void 0 ? T() : e(n ?? null);
|
|
242
|
+
},
|
|
243
|
+
setTriggerLabelling: N
|
|
244
|
+
};
|
|
245
|
+
}, [
|
|
246
|
+
A,
|
|
247
|
+
g,
|
|
248
|
+
_,
|
|
249
|
+
y,
|
|
250
|
+
he,
|
|
251
|
+
w,
|
|
252
|
+
V,
|
|
253
|
+
b,
|
|
254
|
+
S,
|
|
255
|
+
xe,
|
|
256
|
+
H,
|
|
257
|
+
W,
|
|
258
|
+
z,
|
|
259
|
+
l,
|
|
260
|
+
ge,
|
|
261
|
+
d,
|
|
262
|
+
h,
|
|
263
|
+
C,
|
|
264
|
+
se,
|
|
265
|
+
j,
|
|
266
|
+
K,
|
|
267
|
+
J,
|
|
268
|
+
q,
|
|
269
|
+
ye,
|
|
270
|
+
be,
|
|
271
|
+
ie,
|
|
272
|
+
E,
|
|
273
|
+
T,
|
|
274
|
+
t,
|
|
275
|
+
n
|
|
276
|
+
]);
|
|
277
|
+
return /* @__PURE__ */ M(U.Provider, {
|
|
278
|
+
value: Se,
|
|
279
|
+
children: re
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
function De(e) {
|
|
283
|
+
return /* @__PURE__ */ M(y, { children: (t) => /* @__PURE__ */ M(Ee, {
|
|
284
|
+
...e,
|
|
285
|
+
nodeId: t
|
|
286
|
+
}) });
|
|
287
|
+
}
|
|
288
|
+
De.displayName = "DateRangePicker";
|
|
289
|
+
function Oe({ ref: e, id: t, form: n, size: r = "md", icon: ee, placeholder: te, className: ne, sx: a, onKeyDown: o, onKeyUp: s, "aria-label": c, "aria-labelledby": l, "aria-describedby": u, "aria-invalid": d, ...f }) {
|
|
290
|
+
let { open: p, disabled: m, readOnly: g, required: _, invalid: v, displayValue: y, value: b, startName: x, endName: S, messages: C, contentRef: re, refs: w, getReferenceProps: ie, requestOpen: T, resetValue: D, setTriggerLabelling: k } = W("Trigger"), A = O(null), se = ce([
|
|
291
|
+
w.setReference,
|
|
292
|
+
e,
|
|
293
|
+
A
|
|
294
|
+
]), P = oe(), F = t ?? P, I = `${F}-value`, L = `${F}-required`, le = `${F}-error`, R = _ && h(C.required), B = v || d, V = (B === !0 || B === "true") && h(C.error);
|
|
295
|
+
E(() => (k(l === void 0 ? c === void 0 ? null : { label: c } : { labelledBy: l }), () => k(null)), [
|
|
296
|
+
l,
|
|
297
|
+
c,
|
|
298
|
+
k
|
|
299
|
+
]);
|
|
300
|
+
let H = O(D);
|
|
301
|
+
ae(() => {
|
|
302
|
+
H.current = D;
|
|
303
|
+
}), ae(() => {
|
|
304
|
+
let e = A.current?.form;
|
|
305
|
+
if (!e) return;
|
|
306
|
+
let t = () => H.current();
|
|
307
|
+
return e.addEventListener("reset", t), () => e.removeEventListener("reset", t);
|
|
308
|
+
}, [n]);
|
|
309
|
+
let de = l ?? (c === void 0 ? void 0 : F), fe = de === void 0 ? void 0 : [
|
|
310
|
+
de,
|
|
311
|
+
I,
|
|
312
|
+
R ? L : void 0
|
|
313
|
+
].filter(Boolean).join(" "), U = [u, V ? le : void 0].filter(Boolean).join(" ") || void 0, G = () => {
|
|
314
|
+
m || (p ? K(re.current) : T());
|
|
315
|
+
}, pe = (e) => {
|
|
316
|
+
o?.(e), !(e.defaultPrevented || m) && (e.key === z ? e.preventDefault() : ue.has(e.key) && (e.preventDefault(), G()));
|
|
317
|
+
}, me = (e) => {
|
|
318
|
+
s?.(e), !(e.defaultPrevented || m || e.key !== z) && G();
|
|
319
|
+
};
|
|
320
|
+
return /* @__PURE__ */ N(j, { children: [
|
|
321
|
+
/* @__PURE__ */ M(i, {
|
|
322
|
+
className: ne,
|
|
323
|
+
styles: [q, J[r]],
|
|
324
|
+
sx: a,
|
|
325
|
+
children: (e) => /* @__PURE__ */ N("button", {
|
|
326
|
+
type: "button",
|
|
327
|
+
...ie({
|
|
328
|
+
...f,
|
|
329
|
+
onKeyDown: pe,
|
|
330
|
+
onKeyUp: me
|
|
331
|
+
}),
|
|
332
|
+
ref: se,
|
|
333
|
+
id: F,
|
|
334
|
+
form: n,
|
|
335
|
+
disabled: m,
|
|
336
|
+
"aria-label": c,
|
|
337
|
+
"aria-labelledby": fe,
|
|
338
|
+
"aria-describedby": U,
|
|
339
|
+
"aria-invalid": B,
|
|
340
|
+
"data-ui": "date-range-picker",
|
|
341
|
+
"data-state": p ? "open" : "closed",
|
|
342
|
+
"data-size": r,
|
|
343
|
+
"data-readonly": g || void 0,
|
|
344
|
+
"data-required": _ || void 0,
|
|
345
|
+
className: e,
|
|
346
|
+
children: [
|
|
347
|
+
h(ee) && /* @__PURE__ */ M("span", {
|
|
348
|
+
"aria-hidden": "true",
|
|
349
|
+
css: Y,
|
|
350
|
+
children: ee
|
|
351
|
+
}),
|
|
352
|
+
y === void 0 ? /* @__PURE__ */ M("span", {
|
|
353
|
+
id: I,
|
|
354
|
+
"data-placeholder": "",
|
|
355
|
+
css: X,
|
|
356
|
+
children: te
|
|
357
|
+
}) : /* @__PURE__ */ M("span", {
|
|
358
|
+
id: I,
|
|
359
|
+
children: y
|
|
360
|
+
}),
|
|
361
|
+
R && /* @__PURE__ */ M("span", {
|
|
362
|
+
id: L,
|
|
363
|
+
hidden: !0,
|
|
364
|
+
children: C.required
|
|
365
|
+
})
|
|
366
|
+
]
|
|
367
|
+
})
|
|
368
|
+
}),
|
|
369
|
+
V && /* @__PURE__ */ M("span", {
|
|
370
|
+
id: le,
|
|
371
|
+
role: "alert",
|
|
372
|
+
"data-ui": "date-range-picker-error",
|
|
373
|
+
css: Z,
|
|
374
|
+
children: C.error
|
|
375
|
+
}),
|
|
376
|
+
x !== void 0 && /* @__PURE__ */ M("input", {
|
|
377
|
+
type: "hidden",
|
|
378
|
+
form: n,
|
|
379
|
+
name: x,
|
|
380
|
+
value: b?.start ?? "",
|
|
381
|
+
disabled: m
|
|
382
|
+
}),
|
|
383
|
+
S !== void 0 && /* @__PURE__ */ M("input", {
|
|
384
|
+
type: "hidden",
|
|
385
|
+
form: n,
|
|
386
|
+
name: S,
|
|
387
|
+
value: b?.end ?? "",
|
|
388
|
+
disabled: m
|
|
389
|
+
})
|
|
390
|
+
] });
|
|
391
|
+
}
|
|
392
|
+
Oe.displayName = "DateRangePicker.Trigger";
|
|
393
|
+
function Q(e) {
|
|
394
|
+
let { open: t } = W("Content"), n = re(t), [r, i] = k({
|
|
395
|
+
open: t,
|
|
396
|
+
count: 0
|
|
397
|
+
});
|
|
398
|
+
return r.open !== t && i({
|
|
399
|
+
open: t,
|
|
400
|
+
count: r.count + +!!t
|
|
401
|
+
}), n.present ? /* @__PURE__ */ M(ke, {
|
|
402
|
+
...e,
|
|
403
|
+
presenceRef: n.ref,
|
|
404
|
+
closing: n.closing
|
|
405
|
+
}, r.count) : null;
|
|
406
|
+
}
|
|
407
|
+
Q.displayName = "DateRangePicker.Content";
|
|
408
|
+
function ke({ ref: e, presenceRef: t, closing: n, dir: r, style: te, className: ne, sx: l, slotProps: u, "aria-label": d, "aria-labelledby": f, "aria-describedby": p, ...h }) {
|
|
409
|
+
let { readOnly: _, value: v, min: y, max: x, locale: C, firstDayOfWeek: re, today: w, months: T, presets: A, messages: j, availableSize: P, triggerLabelling: F, contentRef: I, refs: L, floatingContext: R, floatingStyles: ue, getFloatingProps: z, apply: V, cancel: de } = W("Content"), U = oe(), G = D(() => new Intl.DateTimeFormat(C, fe), [C]), _e = D(() => new Intl.NumberFormat(C), [C]), q = (e) => e != null && a(e, y, x), J = y === void 0 || x === void 0 || y <= x ? q(v?.start) ? v.start : s(x !== void 0 && w > x ? c(o(x)) : w, y, x) : null, [Y, X] = k(v), [Z, Ee] = k(!1), [De, Oe] = k(v);
|
|
410
|
+
me(De, v) || (Oe(v), X(v), Ee(!1));
|
|
411
|
+
let [Q, ke] = k(J), [Ae, je] = k(null), [Me, Ne] = k(null), Pe = O(null), Fe = P?.width ?? L.domReference.current?.ownerDocument.documentElement.clientWidth ?? 0, $ = T === "auto" ? Fe >= le ? 2 : 1 : T, [Ie, Le] = k(o(J ?? s(w, y, void 0))), Re = Array.from({ length: $ }, (e, t) => m(Ie, t)), ze = Re[Re.length - 1] ?? Ie, Be = (e) => o(e) >= Ie && o(e) <= ze, Ve = (e, t = $) => {
|
|
412
|
+
let n = o(e);
|
|
413
|
+
n < Ie ? Le(n) : n > m(Ie, t - 1) && Le(m(n, 1 - t));
|
|
414
|
+
}, [He, Ue] = k($);
|
|
415
|
+
He !== $ && (Ue($), Q !== null && Ve(Q, $));
|
|
416
|
+
let We = [
|
|
417
|
+
Q,
|
|
418
|
+
Y?.start,
|
|
419
|
+
w
|
|
420
|
+
].find((e) => q(e) && Be(e)) ?? Re.map((e) => s(c(e), y, x)).find((e) => Be(e) && q(e)) ?? null, Ge = Ae ?? Q, Ke = Z && Y && q(Ge) ? he(Y.start, Ge) : null, qe = Ke ?? Y;
|
|
421
|
+
ae(() => {
|
|
422
|
+
let e = Pe.current;
|
|
423
|
+
if (e === null) return;
|
|
424
|
+
Pe.current = null;
|
|
425
|
+
let t = I.current?.querySelector(`${B}[data-date="${e}"]`);
|
|
426
|
+
t && t.ownerDocument.activeElement !== t && t.focus();
|
|
427
|
+
});
|
|
428
|
+
let Je = (e) => {
|
|
429
|
+
ke(e), je(null), Ve(e);
|
|
430
|
+
let t = I.current?.ownerDocument.activeElement;
|
|
431
|
+
Pe.current = t instanceof HTMLElement && t.dataset.date === e ? null : e;
|
|
432
|
+
}, Ye = (e) => {
|
|
433
|
+
_ || (Z && Y ? (X(he(Y.start, e)), Ee(!1)) : (X({
|
|
434
|
+
start: e,
|
|
435
|
+
end: e
|
|
436
|
+
}), Ee(!0)));
|
|
437
|
+
}, Xe = (e) => {
|
|
438
|
+
let t = e.target.closest(B);
|
|
439
|
+
je(t && !t.disabled ? t.dataset.date ?? null : null);
|
|
440
|
+
}, Ze = A.map((e) => {
|
|
441
|
+
let t = e.range(w);
|
|
442
|
+
return {
|
|
443
|
+
preset: e,
|
|
444
|
+
range: t,
|
|
445
|
+
enabled: !_ && pe(t, y, x)
|
|
446
|
+
};
|
|
447
|
+
}), Qe = Ze.find((e) => e.enabled && e.preset.id === Me) ?? Ze.find((e) => e.enabled), $e = (e) => {
|
|
448
|
+
X(e), Ee(!1), ke(e.start), Ve(e.start);
|
|
449
|
+
}, et = O(null), tt = ie((e) => {
|
|
450
|
+
I.current = e, e && !et.current && (et.current = K(e));
|
|
451
|
+
}, [I]), nt = ce([
|
|
452
|
+
L.setFloating,
|
|
453
|
+
e,
|
|
454
|
+
tt,
|
|
455
|
+
t
|
|
456
|
+
]), rt = R.elements.domReference, [it, at] = k();
|
|
457
|
+
E(() => {
|
|
458
|
+
at(rt?.ownerDocument.defaultView?.getComputedStyle(rt).direction);
|
|
459
|
+
}, [rt]);
|
|
460
|
+
let ot = f !== void 0 || d !== void 0 ? {
|
|
461
|
+
"aria-labelledby": f,
|
|
462
|
+
"aria-label": d
|
|
463
|
+
} : F?.labelledBy === void 0 ? { "aria-label": F?.label } : { "aria-labelledby": F.labelledBy }, st = $ === 2 && Ze.length > 0 ? "rail" : "row", ct = !_ && pe(Y, y, x);
|
|
464
|
+
return /* @__PURE__ */ M(b, { children: /* @__PURE__ */ M(se, {
|
|
465
|
+
context: R,
|
|
466
|
+
modal: !1,
|
|
467
|
+
initialFocus: et,
|
|
468
|
+
returnFocus: !1,
|
|
469
|
+
children: /* @__PURE__ */ M(i, {
|
|
470
|
+
className: ne,
|
|
471
|
+
styles: ye,
|
|
472
|
+
sx: l,
|
|
473
|
+
children: (e) => /* @__PURE__ */ N("div", {
|
|
474
|
+
...z({
|
|
475
|
+
...ot,
|
|
476
|
+
"aria-describedby": [p, U].filter(Boolean).join(" "),
|
|
477
|
+
...h
|
|
478
|
+
}),
|
|
479
|
+
ref: nt,
|
|
480
|
+
dir: r ?? it,
|
|
481
|
+
"data-ui": "date-range-picker-content",
|
|
482
|
+
"data-layout": st,
|
|
483
|
+
"data-side": R.placement.split("-")[0],
|
|
484
|
+
"data-state": n ? "closing" : "open",
|
|
485
|
+
inert: n,
|
|
486
|
+
"aria-hidden": n || void 0,
|
|
487
|
+
style: {
|
|
488
|
+
...te,
|
|
489
|
+
...ue,
|
|
490
|
+
...P && {
|
|
491
|
+
maxInlineSize: P.width,
|
|
492
|
+
maxBlockSize: P.height
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
className: e,
|
|
496
|
+
children: [
|
|
497
|
+
Ze.length > 0 && /* @__PURE__ */ M("div", {
|
|
498
|
+
role: "group",
|
|
499
|
+
"aria-label": j.presets,
|
|
500
|
+
"data-ui": "date-range-picker-presets",
|
|
501
|
+
className: u?.presets?.className,
|
|
502
|
+
css: [be, u?.presets?.css],
|
|
503
|
+
onKeyDown: (e) => ee(e, e.currentTarget, st === "rail" ? "vertical" : "horizontal", H),
|
|
504
|
+
children: Ze.map(({ preset: e, range: t, enabled: n }) => /* @__PURE__ */ M("button", {
|
|
505
|
+
type: "button",
|
|
506
|
+
"data-ui": "date-range-picker-preset",
|
|
507
|
+
"aria-disabled": !n || void 0,
|
|
508
|
+
"aria-pressed": n && me(t, Y) && !Z,
|
|
509
|
+
tabIndex: e === Qe?.preset ? 0 : -1,
|
|
510
|
+
onFocus: () => Ne(e.id),
|
|
511
|
+
onClick: () => {
|
|
512
|
+
n && $e(t);
|
|
513
|
+
},
|
|
514
|
+
css: xe,
|
|
515
|
+
children: e.label
|
|
516
|
+
}, e.id))
|
|
517
|
+
}),
|
|
518
|
+
/* @__PURE__ */ M("div", {
|
|
519
|
+
"data-ui": "date-range-picker-calendars",
|
|
520
|
+
className: u?.calendars?.className,
|
|
521
|
+
css: [Se, u?.calendars?.css],
|
|
522
|
+
children: Re.map((e, t) => /* @__PURE__ */ N(S, {
|
|
523
|
+
visibleMonth: e,
|
|
524
|
+
onVisibleMonthChange: (e) => Le(m(e, -t)),
|
|
525
|
+
min: y,
|
|
526
|
+
max: x,
|
|
527
|
+
locale: C,
|
|
528
|
+
firstDayOfWeek: re,
|
|
529
|
+
today: w,
|
|
530
|
+
selectionRange: Y,
|
|
531
|
+
previewRange: Ke,
|
|
532
|
+
tabStopDate: We !== null && o(We) === e ? We : null,
|
|
533
|
+
onDayActivate: Ye,
|
|
534
|
+
onFocusedDateChange: Je,
|
|
535
|
+
rangeLabels: {
|
|
536
|
+
start: j.start,
|
|
537
|
+
end: j.end
|
|
538
|
+
},
|
|
539
|
+
children: [/* @__PURE__ */ M(S.Header, {}), /* @__PURE__ */ M(S.Grid, {
|
|
540
|
+
onPointerMove: Xe,
|
|
541
|
+
onPointerLeave: () => je(null)
|
|
542
|
+
})]
|
|
543
|
+
}, t))
|
|
544
|
+
}),
|
|
545
|
+
/* @__PURE__ */ N("div", {
|
|
546
|
+
"data-ui": "date-range-picker-footer",
|
|
547
|
+
css: Ce,
|
|
548
|
+
children: [/* @__PURE__ */ M("span", {
|
|
549
|
+
id: U,
|
|
550
|
+
role: "status",
|
|
551
|
+
"data-ui": "date-range-picker-summary",
|
|
552
|
+
className: u?.summary?.className,
|
|
553
|
+
css: [we, u?.summary?.css],
|
|
554
|
+
children: qe ? j.summary({
|
|
555
|
+
range: ve(G, qe),
|
|
556
|
+
days: ge(qe),
|
|
557
|
+
formattedDays: _e.format(ge(qe))
|
|
558
|
+
}) : j.empty
|
|
559
|
+
}), /* @__PURE__ */ N("div", {
|
|
560
|
+
"data-ui": "date-range-picker-actions",
|
|
561
|
+
className: u?.actions?.className,
|
|
562
|
+
css: [Te, u?.actions?.css],
|
|
563
|
+
children: [/* @__PURE__ */ M(g, {
|
|
564
|
+
variant: "ghost",
|
|
565
|
+
size: "sm",
|
|
566
|
+
onClick: de,
|
|
567
|
+
children: j.cancel
|
|
568
|
+
}), /* @__PURE__ */ M(g, {
|
|
569
|
+
tone: "accent",
|
|
570
|
+
size: "sm",
|
|
571
|
+
disabled: !ct,
|
|
572
|
+
onClick: () => {
|
|
573
|
+
ct && V(Y);
|
|
574
|
+
},
|
|
575
|
+
children: j.apply
|
|
576
|
+
})]
|
|
577
|
+
})]
|
|
578
|
+
})
|
|
579
|
+
]
|
|
580
|
+
})
|
|
581
|
+
})
|
|
582
|
+
}) });
|
|
583
|
+
}
|
|
584
|
+
var Ae = Object.assign(De, {
|
|
585
|
+
Trigger: Oe,
|
|
586
|
+
Content: Q
|
|
587
|
+
});
|
|
588
|
+
//#endregion
|
|
589
|
+
export { Ae as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as DateRangePicker } from "./date-range-picker-
|
|
2
|
+
export { t as DateRangePicker } from "./date-range-picker-rXcZsI1Y.js";
|