@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
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import { t
|
|
4
|
-
import { t as
|
|
5
|
-
import { n as
|
|
2
|
+
import { i as e } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { t } from "./disclosure-caret-C5T3fcl6.js";
|
|
4
|
+
import { t as n } from "./focus-ring-BK5W5_NY.js";
|
|
5
|
+
import { n as r, r as i } from "./media-8yrN85VT.js";
|
|
6
|
+
import { t as a } from "./sx-BJXJ2xJK.js";
|
|
6
7
|
import { t as o } from "./use-controlled-state-DpeVQZNR.js";
|
|
7
8
|
import { t as s } from "./renderable-DzcIj1Lo.js";
|
|
8
|
-
import { n as c } from "./surface-
|
|
9
|
+
import { n as c } from "./surface-C69kwSuk.js";
|
|
9
10
|
import { createContext as l, useContext as u, useEffect as d, useId as f, useLayoutEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
10
11
|
import { vars as _ } from "@jfrader/tokens/vars";
|
|
11
12
|
import { jsx as v, jsxs as y } from "@emotion/react/jsx-runtime";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { MotionConfig as b, animate as x, useMotionValue as S, useReducedMotion as C } from "motion/react";
|
|
14
|
+
import { base as w } from "@jfrader/tokens";
|
|
15
|
+
import { useMergeRefs as T } from "@floating-ui/react";
|
|
15
16
|
//#region src/components/expandable-card/expandable-card.tsx
|
|
16
17
|
var E = l(null);
|
|
17
18
|
function D(e) {
|
|
@@ -25,7 +26,7 @@ var O = {
|
|
|
25
26
|
damping: 40,
|
|
26
27
|
mass: 1
|
|
27
28
|
}, k = {
|
|
28
|
-
duration: Number.parseFloat(
|
|
29
|
+
duration: Number.parseFloat(w.motion.duration.fast) / 1e3,
|
|
29
30
|
ease: [
|
|
30
31
|
.2,
|
|
31
32
|
.6,
|
|
@@ -68,13 +69,13 @@ var O = {
|
|
|
68
69
|
overflowWrap: "anywhere"
|
|
69
70
|
},
|
|
70
71
|
"&::after": {
|
|
71
|
-
...
|
|
72
|
+
...t,
|
|
72
73
|
gridColumn: 2,
|
|
73
74
|
gridRow: "1 / span 2"
|
|
74
75
|
},
|
|
75
76
|
"&[aria-expanded=\"true\"]::after": { transform: "rotate(90deg)" },
|
|
76
77
|
"&[aria-expanded=\"true\"]:dir(rtl)::after": { transform: "rotate(-90deg)" },
|
|
77
|
-
"&:focus-visible":
|
|
78
|
+
"&:focus-visible": n,
|
|
78
79
|
"&:hover:not(:disabled)": { backgroundColor: _.color.surfaceHover },
|
|
79
80
|
"&:disabled": {
|
|
80
81
|
cursor: "not-allowed",
|
|
@@ -84,8 +85,15 @@ var O = {
|
|
|
84
85
|
minBlockSize: _.space[12],
|
|
85
86
|
padding: _.space[3]
|
|
86
87
|
},
|
|
87
|
-
[
|
|
88
|
-
[
|
|
88
|
+
[i]: { "&::after": { transitionDuration: "0s" } },
|
|
89
|
+
[r]: {
|
|
90
|
+
"&:focus-visible": { outlineColor: "Highlight" },
|
|
91
|
+
"&::after": {
|
|
92
|
+
forcedColorAdjust: "none",
|
|
93
|
+
borderInlineStartColor: "ButtonText"
|
|
94
|
+
},
|
|
95
|
+
"&:disabled::after": { borderInlineStartColor: "GrayText" }
|
|
96
|
+
}
|
|
89
97
|
}), P = e({
|
|
90
98
|
fontSize: _.textSize.md,
|
|
91
99
|
fontWeight: _.fontWeight.medium
|
|
@@ -115,8 +123,8 @@ function R(e) {
|
|
|
115
123
|
function z(...e) {
|
|
116
124
|
return e.filter(Boolean).join(" ") || void 0;
|
|
117
125
|
}
|
|
118
|
-
function B({ ref: e, open:
|
|
119
|
-
let [k, M] = o(n, r
|
|
126
|
+
function B({ ref: e, open: t, defaultOpen: n = !1, onOpenChange: r, collapsedInlineSize: i, expandedInlineSize: s, size: c = "md", disabled: l = !1, headingLevel: u = 3, className: d, sx: _, onKeyDown: y, children: w, ...D }) {
|
|
127
|
+
let [k, M] = o(t, n, r), N = !!k, P = f(), F = h(null), I = h(null), L = h(null), z = T([I, e]), [B, V] = g(!1), [H, U] = g(!1), [W, G] = g(), [K, ee] = g(0), q = C(), J = S(0), Y = h(!1), X = R(i), Z = R(s) ?? X, Q = W === void 0 ? void 0 : Math.min(W, (N ? Z : X) ?? W), $ = W === void 0 ? void 0 : Math.max(0, Math.min(W, Z ?? W) - K);
|
|
120
128
|
p(() => {
|
|
121
129
|
let e = L.current;
|
|
122
130
|
if (!e) return;
|
|
@@ -136,7 +144,7 @@ function B({ ref: e, open: n, defaultOpen: r = !1, onOpenChange: i, collapsedInl
|
|
|
136
144
|
let t = (t) => {
|
|
137
145
|
e.style.inlineSize = `${t}px`;
|
|
138
146
|
}, n = J.on("change", t);
|
|
139
|
-
return !Y.current || q ? (J.jump(Q), t(Q), Y.current = !0) :
|
|
147
|
+
return !Y.current || q ? (J.jump(Q), t(Q), Y.current = !0) : x(J, Q, O), () => {
|
|
140
148
|
n(), J.stop();
|
|
141
149
|
};
|
|
142
150
|
}, [
|
|
@@ -169,14 +177,14 @@ function B({ ref: e, open: n, defaultOpen: r = !1, onOpenChange: i, collapsedInl
|
|
|
169
177
|
H,
|
|
170
178
|
$
|
|
171
179
|
]);
|
|
172
|
-
return /* @__PURE__ */ v(
|
|
180
|
+
return /* @__PURE__ */ v(b, {
|
|
173
181
|
reducedMotion: "user",
|
|
174
182
|
children: /* @__PURE__ */ v(E.Provider, {
|
|
175
183
|
value: te,
|
|
176
184
|
children: /* @__PURE__ */ v("div", {
|
|
177
185
|
ref: L,
|
|
178
186
|
css: j,
|
|
179
|
-
children: /* @__PURE__ */ v(
|
|
187
|
+
children: /* @__PURE__ */ v(a, {
|
|
180
188
|
className: d,
|
|
181
189
|
styles: A,
|
|
182
190
|
sx: _,
|
|
@@ -192,7 +200,7 @@ function B({ ref: e, open: n, defaultOpen: r = !1, onOpenChange: i, collapsedInl
|
|
|
192
200
|
let t = e.target, n = t.closest("dialog, [role=\"dialog\"], [role=\"menu\"], [role=\"listbox\"]");
|
|
193
201
|
t.closest("[data-ui=\"expandable-card\"]") !== e.currentTarget || n && e.currentTarget.contains(n) || (e.preventDefault(), M(!1));
|
|
194
202
|
},
|
|
195
|
-
children:
|
|
203
|
+
children: w
|
|
196
204
|
})
|
|
197
205
|
})
|
|
198
206
|
})
|
|
@@ -200,15 +208,15 @@ function B({ ref: e, open: n, defaultOpen: r = !1, onOpenChange: i, collapsedInl
|
|
|
200
208
|
});
|
|
201
209
|
}
|
|
202
210
|
B.displayName = "ExpandableCard";
|
|
203
|
-
function V({ ref: e, className:
|
|
204
|
-
let l = D("Trigger"), u =
|
|
211
|
+
function V({ ref: e, className: t, sx: n, onClick: r, disabled: i, "aria-labelledby": o, "aria-describedby": s, ...c }) {
|
|
212
|
+
let l = D("Trigger"), u = T([l.triggerRef, e]), d = `h${l.headingLevel}`;
|
|
205
213
|
return /* @__PURE__ */ v(d, {
|
|
206
214
|
css: M,
|
|
207
215
|
"aria-labelledby": l.triggerId,
|
|
208
|
-
children: /* @__PURE__ */ v(
|
|
209
|
-
className:
|
|
216
|
+
children: /* @__PURE__ */ v(a, {
|
|
217
|
+
className: t,
|
|
210
218
|
styles: N,
|
|
211
|
-
sx:
|
|
219
|
+
sx: n,
|
|
212
220
|
children: (e) => /* @__PURE__ */ v("button", {
|
|
213
221
|
...c,
|
|
214
222
|
ref: u,
|
|
@@ -216,62 +224,62 @@ function V({ ref: e, className: n, sx: r, onClick: i, disabled: a, "aria-labelle
|
|
|
216
224
|
id: l.triggerId,
|
|
217
225
|
"data-ui": "expandable-card-trigger",
|
|
218
226
|
className: e,
|
|
219
|
-
disabled: l.disabled ||
|
|
227
|
+
disabled: l.disabled || i,
|
|
220
228
|
"aria-expanded": l.open,
|
|
221
229
|
"aria-controls": l.panelId,
|
|
222
230
|
"aria-labelledby": z(o, l.hasTitle && l.titleId, l.hasDescription && l.descriptionId),
|
|
223
231
|
"aria-describedby": z(s),
|
|
224
232
|
onClick: (e) => {
|
|
225
|
-
|
|
233
|
+
r?.(e), e.defaultPrevented || l.request(!l.open);
|
|
226
234
|
}
|
|
227
235
|
})
|
|
228
236
|
})
|
|
229
237
|
});
|
|
230
238
|
}
|
|
231
239
|
V.displayName = "ExpandableCard.Trigger";
|
|
232
|
-
function H({ ref: e, className:
|
|
233
|
-
let { titleId: o, setHasTitle: c } = D("Title"), l = s(
|
|
234
|
-
return d(() => (c(l), () => c(!1)), [l, c]), l ? /* @__PURE__ */ v(
|
|
235
|
-
className:
|
|
240
|
+
function H({ ref: e, className: t, sx: n, children: r, ...i }) {
|
|
241
|
+
let { titleId: o, setHasTitle: c } = D("Title"), l = s(r);
|
|
242
|
+
return d(() => (c(l), () => c(!1)), [l, c]), l ? /* @__PURE__ */ v(a, {
|
|
243
|
+
className: t,
|
|
236
244
|
styles: P,
|
|
237
|
-
sx:
|
|
245
|
+
sx: n,
|
|
238
246
|
children: (t) => /* @__PURE__ */ v("span", {
|
|
239
|
-
...
|
|
247
|
+
...i,
|
|
240
248
|
ref: e,
|
|
241
249
|
id: o,
|
|
242
250
|
className: t,
|
|
243
251
|
"data-ui": "expandable-card-title",
|
|
244
|
-
children:
|
|
252
|
+
children: r
|
|
245
253
|
})
|
|
246
254
|
}) : null;
|
|
247
255
|
}
|
|
248
256
|
H.displayName = "ExpandableCard.Title";
|
|
249
|
-
function U({ ref: e, className:
|
|
250
|
-
let { descriptionId: o, setHasDescription: c } = D("Description"), l = s(
|
|
251
|
-
return d(() => (c(l), () => c(!1)), [l, c]), l ? /* @__PURE__ */ v(
|
|
252
|
-
className:
|
|
257
|
+
function U({ ref: e, className: t, sx: n, children: r, ...i }) {
|
|
258
|
+
let { descriptionId: o, setHasDescription: c } = D("Description"), l = s(r);
|
|
259
|
+
return d(() => (c(l), () => c(!1)), [l, c]), l ? /* @__PURE__ */ v(a, {
|
|
260
|
+
className: t,
|
|
253
261
|
styles: F,
|
|
254
|
-
sx:
|
|
262
|
+
sx: n,
|
|
255
263
|
children: (t) => /* @__PURE__ */ y("span", {
|
|
256
|
-
...
|
|
264
|
+
...i,
|
|
257
265
|
ref: e,
|
|
258
266
|
id: o,
|
|
259
267
|
className: t,
|
|
260
268
|
"data-ui": "expandable-card-description",
|
|
261
|
-
children: [" ",
|
|
269
|
+
children: [" ", r]
|
|
262
270
|
})
|
|
263
271
|
}) : null;
|
|
264
272
|
}
|
|
265
273
|
U.displayName = "ExpandableCard.Description";
|
|
266
|
-
function W({ ref: e, className:
|
|
267
|
-
let c = D("Content"), l = h(null), u = h(null), d =
|
|
274
|
+
function W({ ref: e, className: t, sx: n, children: r, "aria-labelledby": i, "aria-describedby": o, ...s }) {
|
|
275
|
+
let c = D("Content"), l = h(null), u = h(null), d = T([l, e]), f = S(0), m = S(+!!c.open), g = C(), _ = h(!1);
|
|
268
276
|
return p(() => {
|
|
269
277
|
let e = l.current, t = u.current;
|
|
270
278
|
if (!e || !t) return;
|
|
271
279
|
let n = 0, r = !1;
|
|
272
280
|
if (!c.open && e.contains(e.ownerDocument.activeElement) && c.triggerRef.current?.focus(), e.inert = !c.open, e.hidden = !c.open && !_.current, c.expandedWidth === void 0) return;
|
|
273
281
|
let i = (t) => {
|
|
274
|
-
e.style.blockSize = `${t}px`, c.open && t > 0 && m.get() === 0 && !m.isAnimating() &&
|
|
282
|
+
e.style.blockSize = `${t}px`, c.open && t > 0 && m.get() === 0 && !m.isAnimating() && x(m, 1, k);
|
|
275
283
|
}, a = f.on("change", i), o = m.on("change", (t) => {
|
|
276
284
|
e.style.opacity = String(t);
|
|
277
285
|
}), s = () => {
|
|
@@ -280,13 +288,13 @@ function W({ ref: e, className: n, sx: r, children: i, "aria-labelledby": a, "ar
|
|
|
280
288
|
let s = () => {
|
|
281
289
|
!r && a === n && !c.open && (e.hidden = !0);
|
|
282
290
|
};
|
|
283
|
-
!_.current || g ? (m.jump(+!!c.open), e.style.opacity = String(m.get()), f.jump(o), i(o), s(), _.current = !0) : c.open ? (f.get() > 0 &&
|
|
291
|
+
!_.current || g ? (m.jump(+!!c.open), e.style.opacity = String(m.get()), f.jump(o), i(o), s(), _.current = !0) : c.open ? (f.get() > 0 && x(m, 1, k), x(f, o, {
|
|
284
292
|
...O,
|
|
285
293
|
onComplete: s
|
|
286
|
-
})) :
|
|
294
|
+
})) : x(m, 0, {
|
|
287
295
|
...k,
|
|
288
296
|
onComplete: () => {
|
|
289
|
-
!r && a === n &&
|
|
297
|
+
!r && a === n && x(f, o, {
|
|
290
298
|
...O,
|
|
291
299
|
onComplete: s
|
|
292
300
|
});
|
|
@@ -305,10 +313,10 @@ function W({ ref: e, className: n, sx: r, children: i, "aria-labelledby": a, "ar
|
|
|
305
313
|
f,
|
|
306
314
|
m,
|
|
307
315
|
g
|
|
308
|
-
]), /* @__PURE__ */ v(
|
|
309
|
-
className:
|
|
316
|
+
]), /* @__PURE__ */ v(a, {
|
|
317
|
+
className: t,
|
|
310
318
|
styles: I,
|
|
311
|
-
sx:
|
|
319
|
+
sx: n,
|
|
312
320
|
children: (e) => /* @__PURE__ */ v("div", {
|
|
313
321
|
...s,
|
|
314
322
|
ref: d,
|
|
@@ -318,13 +326,13 @@ function W({ ref: e, className: n, sx: r, children: i, "aria-labelledby": a, "ar
|
|
|
318
326
|
"data-ui": "expandable-card-content",
|
|
319
327
|
hidden: !c.open,
|
|
320
328
|
"aria-hidden": !c.open || void 0,
|
|
321
|
-
"aria-labelledby": z(
|
|
329
|
+
"aria-labelledby": z(i, c.hasTitle ? c.titleId : c.triggerId),
|
|
322
330
|
"aria-describedby": z(o, c.hasDescription && c.descriptionId),
|
|
323
331
|
children: /* @__PURE__ */ v("div", {
|
|
324
332
|
ref: u,
|
|
325
333
|
css: L,
|
|
326
334
|
style: { inlineSize: c.expandedWidth },
|
|
327
|
-
children:
|
|
335
|
+
children: r
|
|
328
336
|
})
|
|
329
337
|
})
|
|
330
338
|
});
|
package/dist/expandable-card.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as ExpandableCard } from "./expandable-card-
|
|
2
|
+
export { t as ExpandableCard } from "./expandable-card-W97vjix9.js";
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { i as e } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { n as t } from "./media-8yrN85VT.js";
|
|
4
|
+
import { t as n } from "./sx-BJXJ2xJK.js";
|
|
5
|
+
import { t as r } from "./use-controlled-state-DpeVQZNR.js";
|
|
6
|
+
import { t as i } from "./renderable-DzcIj1Lo.js";
|
|
7
|
+
import { t as a } from "./button-C6OV0C7J.js";
|
|
8
|
+
import { t as o } from "./search-field-CbsajaZb.js";
|
|
9
|
+
import { useId as ee, useLayoutEffect as s, useRef as c, useState as te } from "react";
|
|
10
|
+
import { vars as l } from "@jfrader/tokens/vars";
|
|
11
|
+
import { jsx as u, jsxs as d } from "@emotion/react/jsx-runtime";
|
|
12
|
+
import { animate as f, useMotionValue as p } from "motion/react";
|
|
13
|
+
import { base as m } from "@jfrader/tokens";
|
|
14
|
+
import { useMergeRefs as h } from "@floating-ui/react";
|
|
15
|
+
//#region src/components/expanding-search/expanding-search.tsx
|
|
16
|
+
var g = {
|
|
17
|
+
type: "spring",
|
|
18
|
+
visualDuration: Number.parseFloat(m.motion.duration.slow) / 1e3,
|
|
19
|
+
bounce: 0
|
|
20
|
+
}, ne = "(prefers-reduced-motion: reduce)", re = e({
|
|
21
|
+
position: "relative",
|
|
22
|
+
inlineSize: "100%",
|
|
23
|
+
minInlineSize: 0,
|
|
24
|
+
minBlockSize: "var(--expanding-search-size)",
|
|
25
|
+
pointerEvents: "none"
|
|
26
|
+
}), ie = {
|
|
27
|
+
sm: e({ "--expanding-search-size": l.space[8] }),
|
|
28
|
+
md: e({ "--expanding-search-size": l.space[10] }),
|
|
29
|
+
lg: e({ "--expanding-search-size": l.space[12] })
|
|
30
|
+
}, _ = e({
|
|
31
|
+
position: "relative",
|
|
32
|
+
marginInlineStart: "auto",
|
|
33
|
+
inlineSize: "var(--expanding-search-size)",
|
|
34
|
+
"--expanding-search-radius": l.radius.full,
|
|
35
|
+
minInlineSize: 0,
|
|
36
|
+
maxInlineSize: "100%",
|
|
37
|
+
pointerEvents: "auto",
|
|
38
|
+
overflow: "clip",
|
|
39
|
+
overflowClipMargin: l.space[1],
|
|
40
|
+
"&[data-state=\"open\"]": {
|
|
41
|
+
inlineSize: "var(--expanding-search-width)",
|
|
42
|
+
"--expanding-search-radius": l.radius.sm
|
|
43
|
+
},
|
|
44
|
+
"&[data-anchor=\"start\"]": {
|
|
45
|
+
marginInlineStart: 0,
|
|
46
|
+
marginInlineEnd: "auto"
|
|
47
|
+
}
|
|
48
|
+
}), v = e({
|
|
49
|
+
position: "absolute",
|
|
50
|
+
insetBlockStart: 0,
|
|
51
|
+
insetInline: 0
|
|
52
|
+
}), ae = e({
|
|
53
|
+
position: "absolute",
|
|
54
|
+
inlineSize: "var(--expanding-search-width)",
|
|
55
|
+
maxInlineSize: "100%",
|
|
56
|
+
blockSize: "var(--expanding-search-size)",
|
|
57
|
+
borderStartStartRadius: l.radius.sm,
|
|
58
|
+
visibility: "hidden",
|
|
59
|
+
pointerEvents: "none"
|
|
60
|
+
}), oe = e({
|
|
61
|
+
inlineSize: "100%",
|
|
62
|
+
paddingInline: 0,
|
|
63
|
+
borderRadius: "var(--expanding-search-radius)",
|
|
64
|
+
borderColor: l.color.borderControl,
|
|
65
|
+
backgroundColor: l.color.surfaceRaised,
|
|
66
|
+
[t]: {
|
|
67
|
+
borderColor: "ButtonText",
|
|
68
|
+
color: "ButtonText"
|
|
69
|
+
}
|
|
70
|
+
}), se = e({
|
|
71
|
+
borderRadius: "var(--expanding-search-radius)",
|
|
72
|
+
overflow: "clip"
|
|
73
|
+
}), ce = e({
|
|
74
|
+
display: "flex",
|
|
75
|
+
inlineSize: l.space[4],
|
|
76
|
+
blockSize: l.space[4],
|
|
77
|
+
"& > svg": {
|
|
78
|
+
inlineSize: "100%",
|
|
79
|
+
blockSize: "100%"
|
|
80
|
+
}
|
|
81
|
+
}), y = /* @__PURE__ */ d("svg", {
|
|
82
|
+
viewBox: "0 0 24 24",
|
|
83
|
+
fill: "none",
|
|
84
|
+
stroke: "currentColor",
|
|
85
|
+
strokeWidth: "2",
|
|
86
|
+
children: [/* @__PURE__ */ u("circle", {
|
|
87
|
+
cx: "10.5",
|
|
88
|
+
cy: "10.5",
|
|
89
|
+
r: "6.5"
|
|
90
|
+
}), /* @__PURE__ */ u("path", { d: "m16 16 5 5" })]
|
|
91
|
+
}), le = (e, t) => e?.expanded === t.expanded && e.size === t.size && e.radius === t.radius;
|
|
92
|
+
function b({ ref: e, inputRef: t, triggerLabel: m, open: b, defaultOpen: ue = !1, onOpenChange: x, anchor: S = "end", expandedWidth: C = `calc(${l.space[12]} * 8)`, size: w = "md", disabled: T, value: de, defaultValue: fe, onValueChange: pe, label: E, description: D, error: O, clearable: k, messages: A, searchIcon: j = y, clearIcon: M, slotProps: N, inputProps: P, className: F, sx: I, dir: L, style: R, onKeyDown: z, onBlur: B, ...me }) {
|
|
93
|
+
let [V = !1, H] = r(b, ue, x), U = c(null), W = c(null), G = c(null), K = c(null), q = c(null), he = h([U, e]), ge = h([G, t]), J = ee(), Y = c(null), [X, _e] = te(), Z = p(0), Q = p(0), $ = c(void 0);
|
|
94
|
+
s(() => {
|
|
95
|
+
let e = U.current, t = q.current;
|
|
96
|
+
if (!e || !t) return;
|
|
97
|
+
let n = () => {
|
|
98
|
+
let e = t.getBoundingClientRect(), n = {
|
|
99
|
+
expanded: e.width,
|
|
100
|
+
size: e.height,
|
|
101
|
+
radius: Number.parseFloat(getComputedStyle(t).borderStartStartRadius)
|
|
102
|
+
};
|
|
103
|
+
_e((e) => le(e, n) ? e : n);
|
|
104
|
+
};
|
|
105
|
+
n();
|
|
106
|
+
let r = e.ownerDocument.defaultView?.ResizeObserver;
|
|
107
|
+
if (!r) return;
|
|
108
|
+
let i = new r(n);
|
|
109
|
+
return i.observe(e), i.observe(t), () => i.disconnect();
|
|
110
|
+
}, [C]), s(() => {
|
|
111
|
+
let e = W.current;
|
|
112
|
+
if (!e || !X) return;
|
|
113
|
+
let t = V ? {
|
|
114
|
+
width: X.expanded,
|
|
115
|
+
radius: X.radius
|
|
116
|
+
} : {
|
|
117
|
+
width: X.size,
|
|
118
|
+
radius: X.size / 2
|
|
119
|
+
}, n = () => {
|
|
120
|
+
e.style.inlineSize = `${Z.get()}px`, e.style.setProperty("--expanding-search-radius", `${Q.get()}px`);
|
|
121
|
+
}, r = () => {
|
|
122
|
+
Z.jump(t.width), Q.jump(t.radius), n();
|
|
123
|
+
}, i = [Z.on("change", n), Q.on("change", n)], a = e.ownerDocument.defaultView?.matchMedia(ne);
|
|
124
|
+
$.current === void 0 || $.current === V || a?.matches ? r() : (f(Z, t.width, g), f(Q, t.radius, g)), $.current = V;
|
|
125
|
+
let o = () => {
|
|
126
|
+
a?.matches && r();
|
|
127
|
+
};
|
|
128
|
+
return a?.addEventListener("change", o), () => {
|
|
129
|
+
i.forEach((e) => e()), a?.removeEventListener("change", o), Z.stop(), Q.stop();
|
|
130
|
+
};
|
|
131
|
+
}, [
|
|
132
|
+
V,
|
|
133
|
+
X,
|
|
134
|
+
Z,
|
|
135
|
+
Q
|
|
136
|
+
]), s(() => {
|
|
137
|
+
let e = U.current;
|
|
138
|
+
if (!e) return;
|
|
139
|
+
let t = e.ownerDocument.activeElement;
|
|
140
|
+
V && Y.current === "input" ? (Y.current = null, (e.contains(t) || t === e.ownerDocument.body) && G.current?.focus()) : !V && Y.current === "trigger" && (Y.current = null, (e.contains(t) || t === e.ownerDocument.body) && K.current?.focus());
|
|
141
|
+
}, [V]);
|
|
142
|
+
let ve = P?.["aria-label"] ?? (!i(E) || E === "" ? m : void 0);
|
|
143
|
+
return /* @__PURE__ */ u(n, {
|
|
144
|
+
className: F,
|
|
145
|
+
styles: [re, ie[w]],
|
|
146
|
+
sx: I,
|
|
147
|
+
children: (e) => /* @__PURE__ */ d("div", {
|
|
148
|
+
...me,
|
|
149
|
+
ref: he,
|
|
150
|
+
className: e,
|
|
151
|
+
dir: L,
|
|
152
|
+
"data-ui": "expanding-search",
|
|
153
|
+
"data-state": V ? "open" : "closed",
|
|
154
|
+
style: {
|
|
155
|
+
"--expanding-search-width": C,
|
|
156
|
+
...R
|
|
157
|
+
},
|
|
158
|
+
onKeyDown: (e) => {
|
|
159
|
+
z?.(e), !(e.defaultPrevented || !V || T || e.key !== "Escape" || e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229) && (e.preventDefault(), Y.current = "trigger", H(!1));
|
|
160
|
+
},
|
|
161
|
+
onBlur: (e) => {
|
|
162
|
+
if (B?.(e), e.defaultPrevented || !V) return;
|
|
163
|
+
let t = e.currentTarget, n = e.relatedTarget;
|
|
164
|
+
n && !t.contains(n) ? (Y.current = null, H(!1)) : n || queueMicrotask(() => {
|
|
165
|
+
t.isConnected && t.ownerDocument.hasFocus() && !t.contains(t.ownerDocument.activeElement) && (Y.current = null, H(!1));
|
|
166
|
+
});
|
|
167
|
+
},
|
|
168
|
+
children: [/* @__PURE__ */ u("span", {
|
|
169
|
+
ref: q,
|
|
170
|
+
"aria-hidden": !0,
|
|
171
|
+
css: ae
|
|
172
|
+
}), /* @__PURE__ */ d("div", {
|
|
173
|
+
ref: W,
|
|
174
|
+
css: _,
|
|
175
|
+
"data-anchor": S,
|
|
176
|
+
"data-state": V ? "open" : "closed",
|
|
177
|
+
children: [/* @__PURE__ */ u("div", {
|
|
178
|
+
hidden: V,
|
|
179
|
+
inert: V,
|
|
180
|
+
css: v,
|
|
181
|
+
children: /* @__PURE__ */ u(a, {
|
|
182
|
+
ref: K,
|
|
183
|
+
size: w,
|
|
184
|
+
variant: "outline",
|
|
185
|
+
disabled: T,
|
|
186
|
+
"aria-label": m,
|
|
187
|
+
"aria-expanded": V,
|
|
188
|
+
"aria-controls": J,
|
|
189
|
+
css: oe,
|
|
190
|
+
onClick: () => {
|
|
191
|
+
Y.current = "input", H(!0);
|
|
192
|
+
},
|
|
193
|
+
children: /* @__PURE__ */ u("span", {
|
|
194
|
+
"aria-hidden": !0,
|
|
195
|
+
css: ce,
|
|
196
|
+
children: j
|
|
197
|
+
})
|
|
198
|
+
})
|
|
199
|
+
}), /* @__PURE__ */ u("div", {
|
|
200
|
+
id: J,
|
|
201
|
+
"aria-hidden": !V || void 0,
|
|
202
|
+
inert: !V,
|
|
203
|
+
style: { visibility: V ? "visible" : "hidden" },
|
|
204
|
+
children: /* @__PURE__ */ u(o, {
|
|
205
|
+
...P,
|
|
206
|
+
ref: ge,
|
|
207
|
+
size: w,
|
|
208
|
+
dir: L,
|
|
209
|
+
disabled: T,
|
|
210
|
+
value: de,
|
|
211
|
+
defaultValue: fe,
|
|
212
|
+
onValueChange: pe,
|
|
213
|
+
label: E,
|
|
214
|
+
description: D,
|
|
215
|
+
error: O,
|
|
216
|
+
clearable: k,
|
|
217
|
+
messages: A,
|
|
218
|
+
searchIcon: j,
|
|
219
|
+
clearIcon: M,
|
|
220
|
+
"aria-label": ve,
|
|
221
|
+
slotProps: {
|
|
222
|
+
...N,
|
|
223
|
+
shell: {
|
|
224
|
+
...N?.shell,
|
|
225
|
+
css: [se, N?.shell?.css]
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
onKeyDown: (e) => {
|
|
229
|
+
P?.onKeyDown?.(e), !(e.defaultPrevented || T || e.key !== "Escape" || e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229) && (e.preventDefault(), Y.current = "trigger", H(!1));
|
|
230
|
+
}
|
|
231
|
+
})
|
|
232
|
+
})]
|
|
233
|
+
})]
|
|
234
|
+
})
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
b.displayName = "ExpandingSearch";
|
|
238
|
+
//#endregion
|
|
239
|
+
export { b as t };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { i as e } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { t } from "./sx-BJXJ2xJK.js";
|
|
3
4
|
import { t as n } from "./renderable-DzcIj1Lo.js";
|
|
4
5
|
import { useId as r } from "react";
|
|
5
6
|
import { vars as i } from "@jfrader/tokens/vars";
|