@jfrader/ui 0.5.0 → 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-D6myONB9.js +206 -0
- 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-B58xempt.js → announcement-bar-B5J33QUh.js} +132 -131
- package/dist/announcement-bar.js +1 -1
- package/dist/avatar-B6idYC59.js +146 -0
- package/dist/{avatar-group-DOQQuV51.js → avatar-group-DvP8mAE-.js} +10 -9
- package/dist/avatar-group.js +1 -1
- package/dist/avatar.js +1 -1
- package/dist/badge-CfhTcA-Z.js +120 -0
- 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-DPJBFkie.js → bottom-sheet-BFQKO0Wo.js} +287 -268
- package/dist/bottom-sheet.js +1 -1
- package/dist/{breadcrumbs-Cfw_hgt2.js → breadcrumbs-CG3akw-b.js} +28 -20
- package/dist/breadcrumbs.js +1 -1
- package/dist/{button-C92uYFJW.js → button-C6OV0C7J.js} +21 -20
- 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-lTH4Foke.js +475 -0
- package/dist/carousel.js +1 -1
- package/dist/chat-thread-DVa17BRC.js +864 -0
- package/dist/chat-thread.js +2 -0
- package/dist/{checkbox-cFquiSdy.js → checkbox-CClE61GV.js} +23 -21
- package/dist/checkbox.js +1 -1
- package/dist/{chip-group-DTQd_M-G.js → chip-group-BZUX9KPF.js} +19 -17
- package/dist/chip-group.js +1 -1
- package/dist/{choice-control-5kJkLXgv.js → choice-control-BsWOZPc9.js} +1 -1
- package/dist/{code-block-ahnRi-g8.js → code-block-CYP89_6h.js} +99 -97
- package/dist/code-block.js +1 -1
- package/dist/{combobox-Bhzvu9ma.js → combobox-D2Oc-co7.js} +131 -125
- 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 +2 -0
- package/dist/{container-BOaSptJa.js → container-BxtwJSSD.js} +3 -2
- package/dist/container.js +1 -1
- package/dist/context-menu-I4i0LRpm.js +371 -0
- package/dist/context-menu.js +2 -0
- package/dist/{copy-button-ByiA6D3R.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-5zKSSuFF.js → date-picker-D-bn-iHs.js} +15 -14
- 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-DYoJf0I_.js → divider-zOJzkcHh.js} +23 -21
- 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-C-qJcZ14.js → expandable-card-W97vjix9.js} +59 -51
- package/dist/expandable-card.js +1 -1
- package/dist/expanding-search-Bb2_YfNx.js +239 -0
- package/dist/expanding-search.js +2 -0
- package/dist/{field-anatomy-COVdNpf5.js → field-anatomy-BDIP42MI.js} +2 -1
- package/dist/file-dropzone-Bi5ikRIz.js +458 -0
- package/dist/file-dropzone.js +1 -1
- package/dist/{filter-toolbar-D5KEKTSe.js → filter-toolbar-QRnC4S_H.js} +36 -33
- 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-B-nrCIy2.js → hover-card-DN1EAlQA.js} +26 -25
- package/dist/hover-card.js +1 -1
- package/dist/{icon-wrapper-stN8sD7R.js → icon-wrapper-C-zMD0uL.js} +1 -1
- package/dist/{image-compare-ciuhPtQZ.js → image-compare-Ln2UUqTU.js} +20 -19
- package/dist/image-compare.js +1 -1
- package/dist/index.js +98 -78
- 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-BcySQfjZ.js → json-viewer-Dro3WrjS.js} +34 -29
- 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-BjjAbJCf.js +600 -0
- package/dist/mention-input.js +1 -1
- package/dist/menu-CVzpsyXn.js +312 -0
- package/dist/menu.js +1 -1
- package/dist/{metric-card-Bh9K4fZs.js → metric-card-BnFssTXj.js} +12 -11
- package/dist/metric-card.js +1 -1
- package/dist/{multi-select-Pce_IYnz.js → multi-select-B3puEVo0.js} +78 -69
- package/dist/multi-select.js +1 -1
- package/dist/{navigation-sP5fiuQS.js → navigation-C_JD43gA.js} +56 -49
- 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-layer-SeUyyEPD.js → overlay-layer-qEbpEtb8.js} +16 -2
- package/dist/overlay-motion-Cr77ihn2.js +90 -0
- package/dist/{overlay-portal-C4JZFq2M.js → overlay-portal-C9igMHnC.js} +1 -1
- package/dist/{pagination-DmXZ8E85.js → pagination-Dkh4bJQh.js} +31 -29
- 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-Dd7pog19.js +59 -0
- package/dist/pill.js +1 -1
- package/dist/popover-CUMOcMtj.js +126 -0
- package/dist/popover.js +1 -1
- package/dist/presence-spring-4zwtUDQN.js +12 -0
- package/dist/{progress-CbOWBUdA.js → progress-Bcuz3Ob4.js} +12 -11
- package/dist/progress.js +1 -1
- package/dist/{radio-cards-D2QZENI_.js → radio-cards-FkAhESb5.js} +65 -63
- package/dist/radio-cards.js +1 -1
- package/dist/{radio-group-E6mMRgo7.js → radio-group-DItMf2YM.js} +32 -28
- package/dist/radio-group.js +1 -1
- package/dist/{resizable-panels-BhjUVXZZ.js → resizable-panels-61h9hA3B.js} +16 -14
- 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-IxF0IJXm.js → search-field-CbsajaZb.js} +94 -93
- package/dist/search-field.js +1 -1
- package/dist/{segmented-control-yO1K1nbi.js → segmented-control-DCh-4ca-.js} +28 -26
- package/dist/segmented-control.js +1 -1
- package/dist/{select-n_H52W1Z.js → select-SrcQqZjo.js} +29 -27
- 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-khL2yhQI.js +646 -0
- 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-tirqlLY2.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-Cb3EHs64.js → split-button-Bu41f2AY.js} +88 -93
- 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-DiZC57-3.js → swipe-actions-1H5UOZKE.js} +29 -26
- package/dist/swipe-actions.js +1 -1
- package/dist/switch-79-hkQqg.js +146 -0
- package/dist/switch.js +1 -1
- package/dist/sx-BJXJ2xJK.js +23 -0
- package/dist/tabs-Bb5-noYE.js +211 -0
- 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-C8TWG-tY.js → text-field-D0VP7b4P.js} +18 -16
- package/dist/text-field.js +1 -1
- package/dist/{textarea-BrW0XcG_.js → textarea-D1YwEPmn.js} +21 -19
- 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-CP42mVDb.js +167 -0
- package/dist/theme-switch.js +2 -0
- package/dist/thread-parts-DfZNz70v.js +683 -0
- package/dist/{time-picker-Db8D49cP.js → time-picker-Tnd-JBLC.js} +39 -32
- package/dist/time-picker.js +1 -1
- package/dist/{timeline-k3nURuCP.js → timeline-DaldDMX7.js} +28 -21
- package/dist/timeline.js +1 -1
- package/dist/{toast-BHxI32ZA.js → toast-CSAbl5yK.js} +107 -87
- package/dist/{toast-stack-DqrAzdg5.js → toast-stack-BCR4Cu7V.js} +25 -10
- package/dist/toast-stack.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/{toggle-group-fcjzpifI.js → toggle-group-C7ye1v4s.js} +24 -23
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip-IajLwdUb.js +129 -0
- package/dist/tooltip.js +1 -1
- package/dist/{tree-view-C2liIxqy.js → tree-view-CoW4oJIZ.js} +18 -13
- 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/checkbox/checkbox.d.ts +1 -1
- package/dist/types/components/command-palette/command-palette.d.ts +1 -1
- package/dist/types/components/comment-thread/comment-thread.d.ts +118 -0
- package/dist/types/components/comment-thread/index.d.ts +1 -0
- package/dist/types/components/context-menu/context-menu.d.ts +55 -0
- package/dist/types/components/context-menu/index.d.ts +2 -0
- package/dist/types/components/date-range-picker/date-range-picker.d.ts +1 -1
- package/dist/types/components/drawer/drawer.d.ts +7 -1
- package/dist/types/components/expanding-search/expanding-search.d.ts +22 -0
- package/dist/types/components/expanding-search/index.d.ts +1 -0
- 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 +74 -7
- 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/pagination/pagination.d.ts +1 -1
- 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/radio-cards/radio-cards.d.ts +1 -1
- package/dist/types/components/radio-group/radio-group.d.ts +1 -1
- 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/slider/slider-style.d.ts +14 -0
- package/dist/types/components/slider/slider.d.ts +2 -10
- package/dist/types/components/slider/use-slider-interaction.d.ts +79 -0
- package/dist/types/components/split-button/split-button.d.ts +2 -2
- 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/tabs/tabs.d.ts +1 -1
- package/dist/types/components/text-field/text-field.d.ts +1 -1
- package/dist/types/components/textarea/textarea.d.ts +1 -1
- 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/theme-switch/index.d.ts +1 -0
- package/dist/types/components/theme-switch/theme-switch.d.ts +33 -0
- package/dist/types/components/thread/thread-core.d.ts +96 -0
- package/dist/types/components/thread/thread-parts.d.ts +119 -0
- package/dist/types/components/tooltip/tooltip.d.ts +9 -2
- 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 +18 -0
- package/dist/types/overlay/exit-motion.d.ts +24 -0
- package/dist/types/overlay/overlay-layer.d.ts +20 -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/overlay/use-overlay-floating.d.ts +9 -2
- 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-overlay-floating-DvJifLpF.js → use-overlay-floating-Bx2jBKAA.js} +8 -6
- 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 +88 -2
- package/dist/accordion-xCI_u0BV.js +0 -198
- package/dist/avatar-BahDVO9t.js +0 -132
- package/dist/badge-B_sLygxU.js +0 -108
- package/dist/calendar-B3Svu0X2.js +0 -447
- package/dist/card-D-aI2QHx.js +0 -158
- package/dist/carousel-IvPqN-oM.js +0 -472
- package/dist/command-palette-BQ5LleGb.js +0 -384
- package/dist/date-range-picker-B5uFWsm-.js +0 -562
- package/dist/dialog-ciiv9H2b.js +0 -218
- package/dist/drawer-DsASTiP-.js +0 -553
- package/dist/file-dropzone-pR4v7owg.js +0 -457
- package/dist/mention-input-BcQKX2EJ.js +0 -599
- package/dist/menu-xwOOUtWP.js +0 -275
- package/dist/pill-DO2gHzMb.js +0 -56
- package/dist/popover-QHcEvf9c.js +0 -119
- package/dist/signature-pad-q2SAsrdD.js +0 -640
- package/dist/slider-t0B5cecO.js +0 -477
- package/dist/switch-qwv8jQnR.js +0 -142
- package/dist/sx-Dx9JUKp5.js +0 -23
- package/dist/tabs-CAVJndX1.js +0 -203
- package/dist/theme-root-BbTBuLMQ.js +0 -46
- package/dist/theme-scope-t7nAKc2c.js +0 -27
- package/dist/tooltip-CkeiW9C1.js +0 -113
- package/dist/use-native-dialog-DWpIUVO1.js +0 -84
|
@@ -0,0 +1,458 @@
|
|
|
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 { t as a } from "./use-latest-callback-cj1OOQL6.js";
|
|
7
|
+
import { t as ee } from "./use-controlled-state-DpeVQZNR.js";
|
|
8
|
+
import { t as te } from "./visually-hidden-DgVO3NaB.js";
|
|
9
|
+
import { t as o } from "./renderable-DzcIj1Lo.js";
|
|
10
|
+
import { t as ne } from "./button-C6OV0C7J.js";
|
|
11
|
+
import { t as re } from "./progress-Bcuz3Ob4.js";
|
|
12
|
+
import { useEffect as s, useId as ie, useRef as c, useState as l } from "react";
|
|
13
|
+
import { vars as u } from "@jfrader/tokens/vars";
|
|
14
|
+
import { createElement as ae } from "@emotion/react";
|
|
15
|
+
import { jsx as d, jsxs as f } from "@emotion/react/jsx-runtime";
|
|
16
|
+
import { useMergeRefs as p } from "@floating-ui/react";
|
|
17
|
+
//#region src/components/file-dropzone/file-dropzone.tsx
|
|
18
|
+
var oe = e({
|
|
19
|
+
label: "file-dropzone",
|
|
20
|
+
display: "grid",
|
|
21
|
+
gap: u.space[3],
|
|
22
|
+
minInlineSize: 0,
|
|
23
|
+
color: u.color.text,
|
|
24
|
+
fontFamily: u.font.sans,
|
|
25
|
+
fontSize: u.textSize.sm,
|
|
26
|
+
lineHeight: u.lineHeight.base
|
|
27
|
+
}), se = e({
|
|
28
|
+
position: "relative",
|
|
29
|
+
display: "grid",
|
|
30
|
+
border: `1px dashed ${u.color.borderControl}`,
|
|
31
|
+
borderRadius: u.radius.lg,
|
|
32
|
+
backgroundColor: u.color.surface,
|
|
33
|
+
cursor: "pointer",
|
|
34
|
+
transitionProperty: "background-color, border-color",
|
|
35
|
+
transitionDuration: u.motion.duration.fast,
|
|
36
|
+
transitionTimingFunction: u.motion.easeStandard,
|
|
37
|
+
"&:has(input:focus-visible)": t,
|
|
38
|
+
"&[data-dragging=\"true\"]": {
|
|
39
|
+
borderStyle: "solid",
|
|
40
|
+
backgroundColor: u.color.surfaceHover
|
|
41
|
+
},
|
|
42
|
+
[r]: { transitionDuration: "0s" },
|
|
43
|
+
[n]: { borderColor: "ButtonText" }
|
|
44
|
+
}), ce = e({
|
|
45
|
+
display: "grid",
|
|
46
|
+
justifyItems: "center",
|
|
47
|
+
gap: u.space[3],
|
|
48
|
+
textAlign: "center"
|
|
49
|
+
}), le = e({ cursor: "not-allowed" }), ue = {
|
|
50
|
+
sm: e({ padding: u.space[4] }),
|
|
51
|
+
md: e({ padding: u.space[6] }),
|
|
52
|
+
lg: e({ padding: u.space[8] })
|
|
53
|
+
}, de = {
|
|
54
|
+
sm: e({
|
|
55
|
+
paddingInline: u.space[4],
|
|
56
|
+
paddingBlockEnd: u.space[4]
|
|
57
|
+
}),
|
|
58
|
+
md: e({
|
|
59
|
+
paddingInline: u.space[6],
|
|
60
|
+
paddingBlockEnd: u.space[6]
|
|
61
|
+
}),
|
|
62
|
+
lg: e({
|
|
63
|
+
paddingInline: u.space[8],
|
|
64
|
+
paddingBlockEnd: u.space[8]
|
|
65
|
+
})
|
|
66
|
+
}, fe = e({
|
|
67
|
+
display: "inline-flex",
|
|
68
|
+
alignItems: "center",
|
|
69
|
+
minBlockSize: u.space[8],
|
|
70
|
+
paddingInline: u.space[3],
|
|
71
|
+
border: `1px solid ${u.color.borderControl}`,
|
|
72
|
+
borderRadius: u.radius.md,
|
|
73
|
+
fontWeight: u.fontWeight.medium,
|
|
74
|
+
overflowWrap: "anywhere"
|
|
75
|
+
}), pe = e({
|
|
76
|
+
position: "absolute",
|
|
77
|
+
opacity: 0,
|
|
78
|
+
inlineSize: "1px",
|
|
79
|
+
blockSize: "1px"
|
|
80
|
+
}), m = e({ color: u.color.textMuted }), me = e({
|
|
81
|
+
display: "grid",
|
|
82
|
+
gap: u.space[2],
|
|
83
|
+
margin: 0,
|
|
84
|
+
padding: 0,
|
|
85
|
+
listStyle: "none",
|
|
86
|
+
inlineSize: "100%",
|
|
87
|
+
textAlign: "start"
|
|
88
|
+
}), he = e({
|
|
89
|
+
display: "flex",
|
|
90
|
+
flexWrap: "wrap",
|
|
91
|
+
alignItems: "center",
|
|
92
|
+
gap: u.space[3],
|
|
93
|
+
padding: u.space[3],
|
|
94
|
+
border: `1px solid ${u.color.borderControl}`,
|
|
95
|
+
borderRadius: u.radius.md,
|
|
96
|
+
backgroundColor: u.color.surfaceRaised,
|
|
97
|
+
cursor: "default"
|
|
98
|
+
}), ge = e({
|
|
99
|
+
flex: "1 1 10rem",
|
|
100
|
+
minInlineSize: 0,
|
|
101
|
+
display: "grid",
|
|
102
|
+
gap: u.space[2],
|
|
103
|
+
overflowWrap: "anywhere"
|
|
104
|
+
}), _e = e({
|
|
105
|
+
inlineSize: u.space[12],
|
|
106
|
+
blockSize: u.space[12],
|
|
107
|
+
objectFit: "cover",
|
|
108
|
+
borderRadius: u.radius.sm
|
|
109
|
+
}), ve = e({
|
|
110
|
+
display: "flex",
|
|
111
|
+
flexWrap: "wrap",
|
|
112
|
+
gap: u.space[2]
|
|
113
|
+
}), ye = e({
|
|
114
|
+
whiteSpace: "normal",
|
|
115
|
+
overflowWrap: "anywhere",
|
|
116
|
+
minBlockSize: u.space[8],
|
|
117
|
+
blockSize: "auto",
|
|
118
|
+
paddingBlock: u.space[2],
|
|
119
|
+
maxInlineSize: "100%"
|
|
120
|
+
}), be = e({
|
|
121
|
+
color: u.color.dangerText,
|
|
122
|
+
overflowWrap: "anywhere"
|
|
123
|
+
}), xe = e({ "& > [data-ui=\"progress-indicator\"]": { transitionDuration: "0s" } }), Se = "label, [data-file-row], a, button, input, select, textarea, [role=\"button\"]", Ce = [], we = 5, Te = 100, h = 1e3, g = [
|
|
124
|
+
"byte",
|
|
125
|
+
"kilobyte",
|
|
126
|
+
"megabyte",
|
|
127
|
+
"gigabyte"
|
|
128
|
+
], Ee = (e, t) => e.length === t.length && e.every((e, n) => e.id === t[n]?.id && e.file === t[n]?.file), _ = (e) => Array.from(e.types).includes("Files"), De = (e, t) => e.name === t.name && e.size === t.size && e.lastModified === t.lastModified;
|
|
129
|
+
function Oe(e, t) {
|
|
130
|
+
let n = t?.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean) ?? [];
|
|
131
|
+
return !n.length || n.some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t) : !!e.type && (t.endsWith("/*") ? e.type.toLowerCase().startsWith(t.slice(0, -1)) : e.type.toLowerCase() === t));
|
|
132
|
+
}
|
|
133
|
+
function ke(e, t) {
|
|
134
|
+
let n = e > 0 ? Math.min(Math.floor(Math.log(e) / Math.log(h)), g.length - 1) : 0;
|
|
135
|
+
return new Intl.NumberFormat(t, {
|
|
136
|
+
style: "unit",
|
|
137
|
+
unit: g[Math.max(0, n)],
|
|
138
|
+
unitDisplay: "short",
|
|
139
|
+
maximumFractionDigits: 1
|
|
140
|
+
}).format(e / h ** Math.max(0, n));
|
|
141
|
+
}
|
|
142
|
+
function v({ ref: e, value: t, defaultValue: n = Ce, onValueChange: r, onReject: u, accept: h, multiple: g = !0, maxFiles: v = we, maxSize: y, validate: Ae, onUpload: b, listPlacement: x = "below", compactAt: S, label: C, description: w, note: je, dropLabel: T, error: E, messages: D, locale: Me, disabled: O = !1, readOnly: k = !1, required: Ne = !1, size: Pe = "md", paste: Fe = !0, renderFileIcon: Ie, name: Le, inputRef: Re, slotProps: A, className: ze, sx: Be, onDragEnter: Ve, onDragOver: He, onDragLeave: Ue, onDrop: We, onPaste: Ge, ...Ke }) {
|
|
143
|
+
let j = ie(), qe = c(n), [M = Ce, Je, Ye] = ee(t, qe.current, r), N = c(null), P = c(null), Xe = p([P, e]), Ze = p([N, Re]), F = c(/* @__PURE__ */ new Map()), I = c(/* @__PURE__ */ new Map()), L = c(/* @__PURE__ */ new Map()), R = c(null), [, Qe] = l(0), z = () => Qe((e) => e + 1), [B, V] = l(!1), H = c(0), [U, $e] = l([]), [et, W] = l(""), [tt, nt] = l(/* @__PURE__ */ new Set()), G = O || k, K = o(C) && C !== "", rt = o(w), q = o(je), J = o(E) || U.length > 0, Y = A?.input, it = Y?.id ?? `${j}-input`, at = [
|
|
144
|
+
Y?.["aria-describedby"],
|
|
145
|
+
rt && `${j}-description`,
|
|
146
|
+
q && `${j}-note`,
|
|
147
|
+
J && `${j}-error`
|
|
148
|
+
].filter(Boolean).join(" ") || void 0, ot = [Y?.["aria-labelledby"], K && `${j}-label`].filter(Boolean).join(" ") || void 0, st = J ? !0 : Y?.["aria-invalid"], X = (e) => {
|
|
149
|
+
Ee(M, e) || Je(e);
|
|
150
|
+
}, ct = Number.isInteger(v) && v > 0 ? v : we, Z = a((e) => {
|
|
151
|
+
if (!e.file || !b) return;
|
|
152
|
+
F.current.get(e.id)?.controller.abort();
|
|
153
|
+
let t = {
|
|
154
|
+
file: e.file,
|
|
155
|
+
controller: new AbortController(),
|
|
156
|
+
status: "uploading"
|
|
157
|
+
};
|
|
158
|
+
F.current.set(e.id, t), z();
|
|
159
|
+
let n = () => !t.controller.signal.aborted && F.current.get(e.id) === t, r = (e) => {
|
|
160
|
+
n() && t.status === "uploading" && Number.isFinite(e) && (t.progress = Math.max(t.progress ?? 0, Math.min(Te, Math.max(0, e))), z());
|
|
161
|
+
};
|
|
162
|
+
Promise.resolve().then(() => {
|
|
163
|
+
if (n()) return b(e, {
|
|
164
|
+
signal: t.controller.signal,
|
|
165
|
+
onProgress: r
|
|
166
|
+
});
|
|
167
|
+
}).then(() => {
|
|
168
|
+
n() && (t.status = "uploaded", W(D.status("uploaded", e.name)), z());
|
|
169
|
+
}, (r) => {
|
|
170
|
+
n() && (r instanceof Error && r.name === "AbortError" ? (t.status = "idle", z()) : (t.status = "failed", t.error = r instanceof Error && r.message.trim() ? r.message : D.uploadError, W(D.status("failed", e.name)), z()));
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
s(() => {
|
|
174
|
+
let e = !1, t = 0;
|
|
175
|
+
for (let [t, n] of F.current) M.some((e) => e.id === t && e.file === n.file) || (n.controller.abort(), F.current.delete(t), e = !0);
|
|
176
|
+
for (let [t, n] of L.current) M.some((e) => e.id === t && e.file === n.file && e.preview === void 0) || (URL.revokeObjectURL(n.url), L.current.delete(t), e = !0);
|
|
177
|
+
for (let n of M) {
|
|
178
|
+
let r = I.current.get(n.id);
|
|
179
|
+
r && r.file === n.file && (I.current.delete(n.id), n.file?.type.startsWith("image/") && n.preview === void 0 && !L.current.has(n.id) && (L.current.set(n.id, {
|
|
180
|
+
file: n.file,
|
|
181
|
+
url: URL.createObjectURL(n.file)
|
|
182
|
+
}), e = !0), t++, Z(n));
|
|
183
|
+
}
|
|
184
|
+
t && W(D.added(t));
|
|
185
|
+
let n = R.current;
|
|
186
|
+
n && !M.some((e) => e.id === n.item.id && e.file === n.item.file) && (R.current = null, W(D.removed(n.item.name)), n.active && (P.current?.ownerDocument.activeElement === n.active || P.current?.ownerDocument.activeElement === P.current?.ownerDocument.body) && ((P.current?.querySelectorAll("[data-file-row]")?.[Math.min(n.index, M.length - 1)])?.querySelector("[data-action=\"remove\"]") ?? N.current)?.focus()), e && z();
|
|
187
|
+
}, [
|
|
188
|
+
M,
|
|
189
|
+
D,
|
|
190
|
+
Z
|
|
191
|
+
]), s(() => () => {
|
|
192
|
+
for (let e of F.current.values()) e.controller.abort();
|
|
193
|
+
F.current.clear();
|
|
194
|
+
for (let e of L.current.values()) URL.revokeObjectURL(e.url);
|
|
195
|
+
L.current.clear(), I.current.clear();
|
|
196
|
+
}, []);
|
|
197
|
+
let lt = a(() => {
|
|
198
|
+
I.current.clear(), $e([]), W(""), t === void 0 ? Ye() : X(qe.current);
|
|
199
|
+
});
|
|
200
|
+
s(() => {
|
|
201
|
+
let e = N.current?.form, t = (e) => {
|
|
202
|
+
queueMicrotask(() => {
|
|
203
|
+
e.defaultPrevented || lt();
|
|
204
|
+
});
|
|
205
|
+
};
|
|
206
|
+
return e?.addEventListener("reset", t), () => e?.removeEventListener("reset", t);
|
|
207
|
+
}, [lt]);
|
|
208
|
+
function Q(e) {
|
|
209
|
+
if (G) return;
|
|
210
|
+
let t = [], n = [], r = g ? M : M.filter((e) => !e.file);
|
|
211
|
+
for (let i of e) {
|
|
212
|
+
let e, a = null;
|
|
213
|
+
Oe(i, h) ? y !== void 0 && Number.isFinite(y) && y >= 0 && i.size > y ? e = "size" : (a = Ae?.(i) ?? null, a !== null && (e = "custom")) : e = "type", (e || !M.some((e) => e.file && De(e.file, i)) && !n.some((e) => De(e, i))) && (!e && (r.length + n.length >= ct || !g && n.length >= 1) && (e = "count"), e ? t.push({
|
|
214
|
+
file: i,
|
|
215
|
+
code: e,
|
|
216
|
+
message: e === "custom" ? a : D.rejection(e, i)
|
|
217
|
+
}) : n.push(i));
|
|
218
|
+
}
|
|
219
|
+
if ($e(t), t.length && u?.(t), !n.length) return;
|
|
220
|
+
let i = n.map((e) => ({
|
|
221
|
+
id: crypto.randomUUID(),
|
|
222
|
+
file: e,
|
|
223
|
+
name: e.name,
|
|
224
|
+
size: e.size
|
|
225
|
+
}));
|
|
226
|
+
I.current.clear();
|
|
227
|
+
for (let e of i) I.current.set(e.id, e);
|
|
228
|
+
X([...r, ...i]);
|
|
229
|
+
}
|
|
230
|
+
function ut(e, t) {
|
|
231
|
+
if (G) return;
|
|
232
|
+
let n = P.current?.querySelectorAll("[data-file-row]")[t], r = P.current?.ownerDocument.activeElement ?? null;
|
|
233
|
+
R.current = {
|
|
234
|
+
item: e,
|
|
235
|
+
index: t,
|
|
236
|
+
active: n?.contains(r) ? r : null
|
|
237
|
+
}, X(M.filter((t) => t.id !== e.id));
|
|
238
|
+
}
|
|
239
|
+
function dt(e, t, n) {
|
|
240
|
+
if (!G && e.target instanceof HTMLButtonElement && ((e.key === "Delete" || e.key === "Backspace") && (e.preventDefault(), ut(t, n)), e.key === "ArrowUp" || e.key === "ArrowDown")) {
|
|
241
|
+
e.preventDefault();
|
|
242
|
+
let t = n + (e.key === "ArrowUp" ? -1 : 1), r = P.current?.querySelectorAll("[data-file-row]")[t], i = e.target.dataset.action;
|
|
243
|
+
(r?.querySelector(`[data-action="${i}"]`) ?? r?.querySelector("[data-action=\"remove\"]"))?.focus();
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
let ft = M.length > 0 && /* @__PURE__ */ d("ul", {
|
|
247
|
+
...A?.list,
|
|
248
|
+
"aria-label": A?.list?.["aria-label"] ?? D.files,
|
|
249
|
+
css: [
|
|
250
|
+
me,
|
|
251
|
+
x === "inside" && de[Pe],
|
|
252
|
+
A?.list?.css
|
|
253
|
+
],
|
|
254
|
+
children: M.map((e, t) => {
|
|
255
|
+
let n = F.current.get(e.id), r = n?.status ?? (e.uploaded ? "uploaded" : "idle"), i = e.preview ?? L.current.get(e.id)?.url, a = Ie?.(e);
|
|
256
|
+
return /* @__PURE__ */ ae("li", {
|
|
257
|
+
...A?.item,
|
|
258
|
+
key: e.id,
|
|
259
|
+
"data-file-row": !0,
|
|
260
|
+
"data-state": r,
|
|
261
|
+
onKeyDown: (n) => {
|
|
262
|
+
A?.item?.onKeyDown?.(n), n.defaultPrevented || dt(n, e, t);
|
|
263
|
+
},
|
|
264
|
+
css: [he, A?.item?.css]
|
|
265
|
+
}, i && !tt.has(i) ? /* @__PURE__ */ d("img", {
|
|
266
|
+
...A?.preview,
|
|
267
|
+
src: i,
|
|
268
|
+
alt: "",
|
|
269
|
+
css: [_e, A?.preview?.css],
|
|
270
|
+
onError: (e) => {
|
|
271
|
+
A?.preview?.onError?.(e), nt((e) => /* @__PURE__ */ new Set([...e, i]));
|
|
272
|
+
}
|
|
273
|
+
}) : o(a) && /* @__PURE__ */ d("span", {
|
|
274
|
+
"aria-hidden": !0,
|
|
275
|
+
children: a
|
|
276
|
+
}), /* @__PURE__ */ f("div", {
|
|
277
|
+
css: ge,
|
|
278
|
+
children: [
|
|
279
|
+
/* @__PURE__ */ d("bdi", { children: e.name }),
|
|
280
|
+
/* @__PURE__ */ d("span", {
|
|
281
|
+
css: m,
|
|
282
|
+
children: ke(e.size, Me)
|
|
283
|
+
}),
|
|
284
|
+
/* @__PURE__ */ d("span", { children: D.status(r, e.name) }),
|
|
285
|
+
r === "uploading" && /* @__PURE__ */ d(re, {
|
|
286
|
+
...A?.progress,
|
|
287
|
+
value: n?.progress,
|
|
288
|
+
"aria-label": A?.progress?.["aria-label"] ?? e.name,
|
|
289
|
+
getValueLabel: (e) => new Intl.NumberFormat(Me, { style: "percent" }).format(e / Te),
|
|
290
|
+
css: [xe, A?.progress?.css]
|
|
291
|
+
}),
|
|
292
|
+
n?.error && /* @__PURE__ */ d("span", {
|
|
293
|
+
css: be,
|
|
294
|
+
children: n.error
|
|
295
|
+
})
|
|
296
|
+
]
|
|
297
|
+
}), /* @__PURE__ */ f("div", {
|
|
298
|
+
css: ve,
|
|
299
|
+
children: [r === "failed" && e.file && b && /* @__PURE__ */ d(ne, {
|
|
300
|
+
...A?.action,
|
|
301
|
+
css: [ye, A?.action?.css],
|
|
302
|
+
variant: "outline",
|
|
303
|
+
size: "sm",
|
|
304
|
+
disabled: O,
|
|
305
|
+
"aria-disabled": k || A?.action?.["aria-disabled"],
|
|
306
|
+
"data-action": "retry",
|
|
307
|
+
"aria-label": A?.action?.["aria-label"] ?? D.retry(e.name),
|
|
308
|
+
onClick: (t) => {
|
|
309
|
+
A?.action?.onClick?.(t), !t.defaultPrevented && !G && (Z(e), t.currentTarget.parentElement?.querySelector("[data-action=\"remove\"]")?.focus());
|
|
310
|
+
},
|
|
311
|
+
children: D.retry(e.name)
|
|
312
|
+
}), /* @__PURE__ */ d(ne, {
|
|
313
|
+
...A?.action,
|
|
314
|
+
css: [ye, A?.action?.css],
|
|
315
|
+
variant: "outline",
|
|
316
|
+
size: "sm",
|
|
317
|
+
disabled: O,
|
|
318
|
+
"aria-disabled": k || A?.action?.["aria-disabled"],
|
|
319
|
+
"data-action": "remove",
|
|
320
|
+
"aria-label": A?.action?.["aria-label"] ?? D.remove(e.name),
|
|
321
|
+
onClick: (n) => {
|
|
322
|
+
A?.action?.onClick?.(n), n.defaultPrevented || ut(e, t);
|
|
323
|
+
},
|
|
324
|
+
children: D.remove(e.name)
|
|
325
|
+
})]
|
|
326
|
+
}));
|
|
327
|
+
})
|
|
328
|
+
}), $ = S !== void 0 && S > 0 && M.length >= S && !B;
|
|
329
|
+
return /* @__PURE__ */ d(i, {
|
|
330
|
+
className: [A?.root?.className, ze].filter(Boolean).join(" "),
|
|
331
|
+
styles: [oe, A?.root?.css],
|
|
332
|
+
sx: Be,
|
|
333
|
+
children: (e) => /* @__PURE__ */ f("div", {
|
|
334
|
+
...A?.root,
|
|
335
|
+
...Ke,
|
|
336
|
+
ref: Xe,
|
|
337
|
+
className: e,
|
|
338
|
+
"data-ui": "file-dropzone",
|
|
339
|
+
"data-state": B ? "dragging" : M.length ? "selected" : "empty",
|
|
340
|
+
"aria-disabled": G || Ke["aria-disabled"] || A?.root?.["aria-disabled"],
|
|
341
|
+
onDragEnter: (e) => {
|
|
342
|
+
A?.root?.onDragEnter?.(e), Ve?.(e), !e.defaultPrevented && !G && _(e.dataTransfer) && (e.preventDefault(), H.current++, V(!0));
|
|
343
|
+
},
|
|
344
|
+
onDragOver: (e) => {
|
|
345
|
+
A?.root?.onDragOver?.(e), He?.(e), !e.defaultPrevented && !G && _(e.dataTransfer) && (e.preventDefault(), e.dataTransfer.dropEffect = "copy");
|
|
346
|
+
},
|
|
347
|
+
onDragLeave: (e) => {
|
|
348
|
+
A?.root?.onDragLeave?.(e), Ue?.(e), !e.defaultPrevented && _(e.dataTransfer) && (H.current = Math.max(0, H.current - 1), H.current || V(!1));
|
|
349
|
+
},
|
|
350
|
+
onDrop: (e) => {
|
|
351
|
+
A?.root?.onDrop?.(e), We?.(e), H.current = 0, V(!1), !e.defaultPrevented && _(e.dataTransfer) && (e.preventDefault(), Q(Array.from(e.dataTransfer.files)));
|
|
352
|
+
},
|
|
353
|
+
onPaste: (e) => {
|
|
354
|
+
A?.root?.onPaste?.(e), Ge?.(e);
|
|
355
|
+
let t = e.target;
|
|
356
|
+
!e.defaultPrevented && Fe && !G && P.current?.contains(P.current.ownerDocument.activeElement) && !t.closest("input, textarea, [contenteditable]:not([contenteditable=\"false\"])") && e.clipboardData.files.length && (e.preventDefault(), Q(Array.from(e.clipboardData.files)));
|
|
357
|
+
},
|
|
358
|
+
children: [
|
|
359
|
+
/* @__PURE__ */ f("div", {
|
|
360
|
+
...A?.target,
|
|
361
|
+
"data-dragging": B,
|
|
362
|
+
"data-compact": $,
|
|
363
|
+
css: [
|
|
364
|
+
se,
|
|
365
|
+
G && le,
|
|
366
|
+
A?.target?.css
|
|
367
|
+
],
|
|
368
|
+
onClick: (e) => {
|
|
369
|
+
A?.target?.onClick?.(e);
|
|
370
|
+
let t = e.target.closest(Se);
|
|
371
|
+
!e.defaultPrevented && !G && !e.currentTarget.contains(t) && N.current?.click();
|
|
372
|
+
},
|
|
373
|
+
children: [/* @__PURE__ */ f("label", {
|
|
374
|
+
...A?.label,
|
|
375
|
+
htmlFor: it,
|
|
376
|
+
css: [
|
|
377
|
+
ce,
|
|
378
|
+
ue[Pe],
|
|
379
|
+
A?.label?.css
|
|
380
|
+
],
|
|
381
|
+
children: [
|
|
382
|
+
/* @__PURE__ */ d("input", {
|
|
383
|
+
...Y,
|
|
384
|
+
ref: Ze,
|
|
385
|
+
id: it,
|
|
386
|
+
type: "file",
|
|
387
|
+
name: Le,
|
|
388
|
+
accept: h,
|
|
389
|
+
multiple: g,
|
|
390
|
+
required: Ne,
|
|
391
|
+
disabled: O,
|
|
392
|
+
"aria-disabled": k || Y?.["aria-disabled"],
|
|
393
|
+
"aria-labelledby": ot,
|
|
394
|
+
"aria-label": Y?.["aria-label"] ?? (!K && !Y?.["aria-labelledby"] ? D.browse : void 0),
|
|
395
|
+
"aria-describedby": at,
|
|
396
|
+
"aria-invalid": st,
|
|
397
|
+
css: [pe, Y?.css],
|
|
398
|
+
onClick: (e) => {
|
|
399
|
+
Y?.onClick?.(e), G && e.preventDefault();
|
|
400
|
+
},
|
|
401
|
+
onChange: (e) => {
|
|
402
|
+
Y?.onChange?.(e), e.defaultPrevented || Q(Array.from(e.currentTarget.files ?? [])), e.currentTarget.value = "";
|
|
403
|
+
}
|
|
404
|
+
}),
|
|
405
|
+
K && /* @__PURE__ */ d("span", {
|
|
406
|
+
id: `${j}-label`,
|
|
407
|
+
children: C
|
|
408
|
+
}),
|
|
409
|
+
rt && /* @__PURE__ */ d("div", {
|
|
410
|
+
...A?.description,
|
|
411
|
+
id: `${j}-description`,
|
|
412
|
+
css: [$ ? te : m, A?.description?.css],
|
|
413
|
+
children: w
|
|
414
|
+
}),
|
|
415
|
+
B && o(T) && /* @__PURE__ */ d("div", { children: T }),
|
|
416
|
+
$ && /* @__PURE__ */ d("span", { children: D.count(M.length) }),
|
|
417
|
+
/* @__PURE__ */ d("span", {
|
|
418
|
+
...A?.browse,
|
|
419
|
+
"aria-hidden": !0,
|
|
420
|
+
css: [fe, A?.browse?.css],
|
|
421
|
+
children: D.browse
|
|
422
|
+
}),
|
|
423
|
+
q && /* @__PURE__ */ d("div", {
|
|
424
|
+
...A?.note,
|
|
425
|
+
id: `${j}-note`,
|
|
426
|
+
css: [m, A?.note?.css],
|
|
427
|
+
children: je
|
|
428
|
+
})
|
|
429
|
+
]
|
|
430
|
+
}), x === "inside" && ft]
|
|
431
|
+
}),
|
|
432
|
+
J && /* @__PURE__ */ f("div", {
|
|
433
|
+
...A?.error,
|
|
434
|
+
id: `${j}-error`,
|
|
435
|
+
role: "alert",
|
|
436
|
+
css: [be, A?.error?.css],
|
|
437
|
+
children: [o(E) && E, U.length > 0 && /* @__PURE__ */ d("ul", { children: U.map((e, t) => /* @__PURE__ */ f("li", { children: [
|
|
438
|
+
/* @__PURE__ */ d("bdi", { children: e.file.name }),
|
|
439
|
+
": ",
|
|
440
|
+
e.message
|
|
441
|
+
] }, t)) })]
|
|
442
|
+
}),
|
|
443
|
+
x === "below" && ft,
|
|
444
|
+
/* @__PURE__ */ d("div", {
|
|
445
|
+
...A?.status,
|
|
446
|
+
role: "status",
|
|
447
|
+
"aria-live": "polite",
|
|
448
|
+
"aria-atomic": "true",
|
|
449
|
+
css: [te, A?.status?.css],
|
|
450
|
+
children: B && o(T) ? T : et
|
|
451
|
+
})
|
|
452
|
+
]
|
|
453
|
+
})
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
v.displayName = "FileDropzone";
|
|
457
|
+
//#endregion
|
|
458
|
+
export { v as t };
|
package/dist/file-dropzone.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as FileDropzone } from "./file-dropzone-
|
|
2
|
+
export { t as FileDropzone } from "./file-dropzone-Bi5ikRIz.js";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import { n } from "./focus-ring-BK5W5_NY.js";
|
|
4
|
-
import { n
|
|
2
|
+
import { i as e } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { n as t } from "./focus-ring-BK5W5_NY.js";
|
|
4
|
+
import { n } from "./media-8yrN85VT.js";
|
|
5
|
+
import { t as r } from "./sx-BJXJ2xJK.js";
|
|
5
6
|
import { t as i } from "./use-controlled-state-DpeVQZNR.js";
|
|
6
7
|
import { t as a } from "./renderable-DzcIj1Lo.js";
|
|
7
|
-
import { t as o } from "./button-
|
|
8
|
+
import { t as o } from "./button-C6OV0C7J.js";
|
|
8
9
|
import { createContext as s, useContext as c, useLayoutEffect as l, useMemo as u, useRef as d } from "react";
|
|
9
10
|
import { vars as f } from "@jfrader/tokens/vars";
|
|
10
11
|
import { jsx as p, jsxs as m } from "@emotion/react/jsx-runtime";
|
|
@@ -58,8 +59,8 @@ var T = e({
|
|
|
58
59
|
color: f.color.text,
|
|
59
60
|
fontFamily: f.font.sans,
|
|
60
61
|
fontSize: f.textSize.sm,
|
|
61
|
-
"&:focus":
|
|
62
|
-
[
|
|
62
|
+
"&:focus": t,
|
|
63
|
+
[n]: {
|
|
63
64
|
borderColor: "CanvasText",
|
|
64
65
|
backgroundColor: "Canvas",
|
|
65
66
|
color: "CanvasText"
|
|
@@ -79,14 +80,16 @@ var T = e({
|
|
|
79
80
|
borderRadius: f.radius.full,
|
|
80
81
|
backgroundColor: f.color.surfaceHover,
|
|
81
82
|
color: f.color.text,
|
|
82
|
-
[
|
|
83
|
+
[n]: {
|
|
83
84
|
borderColor: "CanvasText",
|
|
84
85
|
backgroundColor: "Canvas",
|
|
85
86
|
color: "CanvasText"
|
|
86
87
|
}
|
|
87
88
|
}), k = e({
|
|
88
89
|
minInlineSize: 0,
|
|
89
|
-
|
|
90
|
+
overflow: "hidden",
|
|
91
|
+
textOverflow: "ellipsis",
|
|
92
|
+
whiteSpace: "nowrap"
|
|
90
93
|
}), A = e({ color: f.color.textMuted }), j = e({ fontWeight: f.fontWeight.medium }), M = e({
|
|
91
94
|
flexShrink: 0,
|
|
92
95
|
minInlineSize: f.space[8],
|
|
@@ -95,7 +98,7 @@ var T = e({
|
|
|
95
98
|
padding: 0,
|
|
96
99
|
borderRadius: f.radius.full,
|
|
97
100
|
color: f.color.text,
|
|
98
|
-
[
|
|
101
|
+
[n]: { borderColor: "ButtonText" }
|
|
99
102
|
}), N = e({
|
|
100
103
|
alignSelf: "flex-start",
|
|
101
104
|
maxInlineSize: "100%",
|
|
@@ -105,7 +108,7 @@ var T = e({
|
|
|
105
108
|
whiteSpace: "normal",
|
|
106
109
|
overflowWrap: "anywhere",
|
|
107
110
|
borderColor: f.color.borderControl,
|
|
108
|
-
[
|
|
111
|
+
[n]: { borderColor: "ButtonText" }
|
|
109
112
|
}), P = e({
|
|
110
113
|
margin: 0,
|
|
111
114
|
minInlineSize: 0,
|
|
@@ -114,8 +117,8 @@ var T = e({
|
|
|
114
117
|
fontSize: f.textSize.sm,
|
|
115
118
|
lineHeight: f.lineHeight.base
|
|
116
119
|
});
|
|
117
|
-
function F({ ref: e, value:
|
|
118
|
-
let [O = g, k] = i(
|
|
120
|
+
function F({ ref: e, value: t, defaultValue: n = g, onValueChange: a, disabled: o = !1, label: s = "Filters", messages: c, className: f, sx: m, children: y, "aria-label": b, "aria-labelledby": w, tabIndex: T = -1, ...D }) {
|
|
121
|
+
let [O = g, k] = i(t, n, a), A = u(() => x(O), [O]), j = d(null), M = h([j, e]), N = d(null), P = u(() => ({
|
|
119
122
|
...v,
|
|
120
123
|
...c
|
|
121
124
|
}), [c]), F = u(() => {
|
|
@@ -164,7 +167,7 @@ function F({ ref: e, value: n, defaultValue: r = g, onValueChange: a, disabled:
|
|
|
164
167
|
(a ?? o ?? t).focus();
|
|
165
168
|
}, [A]), /* @__PURE__ */ p(C.Provider, {
|
|
166
169
|
value: F,
|
|
167
|
-
children: /* @__PURE__ */ p(
|
|
170
|
+
children: /* @__PURE__ */ p(r, {
|
|
168
171
|
className: f,
|
|
169
172
|
styles: E,
|
|
170
173
|
sx: m,
|
|
@@ -184,12 +187,12 @@ function F({ ref: e, value: n, defaultValue: r = g, onValueChange: a, disabled:
|
|
|
184
187
|
});
|
|
185
188
|
}
|
|
186
189
|
F.displayName = "FilterToolbar";
|
|
187
|
-
function I({ children: e, className:
|
|
190
|
+
function I({ children: e, className: t, sx: n, ...i }) {
|
|
188
191
|
let { value: a, disabled: o, onValueChange: s } = w("Controls");
|
|
189
|
-
return /* @__PURE__ */ p(
|
|
190
|
-
className:
|
|
192
|
+
return /* @__PURE__ */ p(r, {
|
|
193
|
+
className: t,
|
|
191
194
|
styles: T,
|
|
192
|
-
sx:
|
|
195
|
+
sx: n,
|
|
193
196
|
children: (t) => /* @__PURE__ */ p("div", {
|
|
194
197
|
...i,
|
|
195
198
|
"data-ui": "filter-toolbar-controls",
|
|
@@ -203,29 +206,29 @@ function I({ children: e, className: n, sx: r, ...i }) {
|
|
|
203
206
|
});
|
|
204
207
|
}
|
|
205
208
|
I.displayName = "FilterToolbar.Controls";
|
|
206
|
-
function L({ empty: e, slotProps:
|
|
209
|
+
function L({ empty: e, slotProps: t, className: n, sx: i, ...s }) {
|
|
207
210
|
let { value: c, disabled: l, messages: u, remove: d } = w("ActiveFilters");
|
|
208
|
-
return /* @__PURE__ */ p(
|
|
209
|
-
className:
|
|
211
|
+
return /* @__PURE__ */ p(r, {
|
|
212
|
+
className: n,
|
|
210
213
|
styles: T,
|
|
211
214
|
sx: i,
|
|
212
|
-
children: (
|
|
215
|
+
children: (n) => /* @__PURE__ */ p("div", {
|
|
213
216
|
...s,
|
|
214
217
|
"data-ui": "filter-toolbar-active-filters",
|
|
215
|
-
className:
|
|
218
|
+
className: n,
|
|
216
219
|
children: c.length > 0 ? /* @__PURE__ */ p("ul", {
|
|
217
|
-
className:
|
|
220
|
+
className: t?.list?.className,
|
|
218
221
|
css: [
|
|
219
222
|
T,
|
|
220
223
|
D,
|
|
221
|
-
|
|
224
|
+
t?.list?.css
|
|
222
225
|
],
|
|
223
226
|
children: c.map((e) => /* @__PURE__ */ m("li", {
|
|
224
|
-
className:
|
|
225
|
-
css: [O,
|
|
227
|
+
className: t?.chip?.className,
|
|
228
|
+
css: [O, t?.chip?.css],
|
|
226
229
|
children: [/* @__PURE__ */ m("span", {
|
|
227
|
-
className:
|
|
228
|
-
css: [k,
|
|
230
|
+
className: t?.label?.className,
|
|
231
|
+
css: [k, t?.label?.css],
|
|
229
232
|
children: [/* @__PURE__ */ m("span", {
|
|
230
233
|
css: A,
|
|
231
234
|
children: [e.label, ": "]
|
|
@@ -240,8 +243,8 @@ function L({ empty: e, slotProps: n, className: r, sx: i, ...s }) {
|
|
|
240
243
|
"aria-label": u.remove(e),
|
|
241
244
|
"data-ui": "filter-toolbar-remove",
|
|
242
245
|
"data-filter-id": e.id,
|
|
243
|
-
className:
|
|
244
|
-
css: [M,
|
|
246
|
+
className: t?.remove?.className,
|
|
247
|
+
css: [M, t?.remove?.css],
|
|
245
248
|
onClick: (t) => d(e, t.currentTarget),
|
|
246
249
|
render: (e) => /* @__PURE__ */ p("button", {
|
|
247
250
|
...e,
|
|
@@ -282,10 +285,10 @@ function R({ children: e, onClick: t, disabled: n = !1, css: r, ...i }) {
|
|
|
282
285
|
});
|
|
283
286
|
}
|
|
284
287
|
R.displayName = "FilterToolbar.Clear";
|
|
285
|
-
function z({ count: e, locale:
|
|
288
|
+
function z({ count: e, locale: t, formatCount: n = b, loading: i = !1, loadingLabel: a = "Loading results", unknownLabel: o = "Results unavailable", className: s, sx: c, ...l }) {
|
|
286
289
|
w("ResultCount");
|
|
287
|
-
let u = e !== null && Number.isFinite(e) && Number.isInteger(e) && e >= 0 ?
|
|
288
|
-
return /* @__PURE__ */ p(
|
|
290
|
+
let u = e !== null && Number.isFinite(e) && Number.isInteger(e) && e >= 0 ? n(e, new Intl.NumberFormat(t).format(e)) : o;
|
|
291
|
+
return /* @__PURE__ */ p(r, {
|
|
289
292
|
className: s,
|
|
290
293
|
styles: P,
|
|
291
294
|
sx: c,
|
package/dist/filter-toolbar.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as FilterToolbar } from "./filter-toolbar-
|
|
2
|
+
export { t as FilterToolbar } from "./filter-toolbar-QRnC4S_H.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { t as e } from "./sx-
|
|
3
|
-
import { t } from "./layout-style-
|
|
2
|
+
import { t as e } from "./sx-BJXJ2xJK.js";
|
|
3
|
+
import { t } from "./layout-style-BE0gSqrH.js";
|
|
4
4
|
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
5
5
|
//#region src/components/flex/flex.tsx
|
|
6
6
|
function r({ ref: r, direction: i, wrap: a, inline: o, align: s, justify: c, gap: l, className: u, sx: d, ...f }) {
|
package/dist/flex.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Flex } from "./flex-
|
|
2
|
+
export { t as Flex } from "./flex-CS7eMRcK.js";
|