@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,8 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import { r as
|
|
2
|
+
import { i as e } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { r as t } from "./media-8yrN85VT.js";
|
|
4
|
+
import { t as n } from "./sx-BJXJ2xJK.js";
|
|
4
5
|
import { t as r } from "./renderable-DzcIj1Lo.js";
|
|
5
|
-
import { i, n as a, r as o, t as s } from "./choice-control-
|
|
6
|
+
import { i, n as a, r as o, t as s } from "./choice-control-BsWOZPc9.js";
|
|
6
7
|
import { useEffect as c, useId as l, useImperativeHandle as u, useRef as d } from "react";
|
|
7
8
|
import { vars as f } from "@jfrader/tokens/vars";
|
|
8
9
|
import { jsx as p, jsxs as m } from "@emotion/react/jsx-runtime";
|
|
@@ -35,7 +36,7 @@ var h = {
|
|
|
35
36
|
blockSize: "75%",
|
|
36
37
|
opacity: 0
|
|
37
38
|
},
|
|
38
|
-
[
|
|
39
|
+
[t]: { transitionDuration: "0s" }
|
|
39
40
|
}), v = {
|
|
40
41
|
sm: e({
|
|
41
42
|
inlineSize: h.sm,
|
|
@@ -71,16 +72,16 @@ function S({ indeterminate: e }) {
|
|
|
71
72
|
}) : /* @__PURE__ */ p("polyline", { points: "3.5 8.5 6.5 11.5 12.5 4.5" })
|
|
72
73
|
});
|
|
73
74
|
}
|
|
74
|
-
function C({ ref: e, label:
|
|
75
|
-
let
|
|
76
|
-
u(e, () =>
|
|
77
|
-
|
|
75
|
+
function C({ ref: e, label: t, description: f, indeterminate: h = !1, size: C = "md", onChange: w, onCheckedChange: T, slotProps: E, className: D, sx: O, dir: k, "aria-labelledby": A, "aria-describedby": j, ...M }) {
|
|
76
|
+
let N = d(null);
|
|
77
|
+
u(e, () => N.current, []), c(() => {
|
|
78
|
+
N.current && (N.current.indeterminate = h);
|
|
78
79
|
}, [h]);
|
|
79
|
-
let
|
|
80
|
+
let P = l(), F = `${P}-label`, I = `${P}-description`, L = r(t), R = r(f), z = [A, L && F].filter(Boolean).join(" ") || void 0, B = [j, R && I].filter(Boolean).join(" ") || void 0, V = [D, E?.root?.className].filter(Boolean).join(" ") || void 0, H = (e) => {
|
|
80
81
|
h && (e.currentTarget.indeterminate = !0), w?.(e), T?.(e.currentTarget.checked);
|
|
81
82
|
};
|
|
82
|
-
return /* @__PURE__ */ p(
|
|
83
|
-
className:
|
|
83
|
+
return /* @__PURE__ */ p(n, {
|
|
84
|
+
className: V,
|
|
84
85
|
styles: [
|
|
85
86
|
o,
|
|
86
87
|
g,
|
|
@@ -90,19 +91,20 @@ function C({ ref: e, label: n, description: f, indeterminate: h = !1, size: C =
|
|
|
90
91
|
sx: O,
|
|
91
92
|
children: (e) => /* @__PURE__ */ m("label", {
|
|
92
93
|
"data-ui": "checkbox",
|
|
94
|
+
dir: k,
|
|
93
95
|
"data-indeterminate": h || void 0,
|
|
94
96
|
className: e,
|
|
95
97
|
children: [/* @__PURE__ */ m("span", {
|
|
96
98
|
css: i,
|
|
97
99
|
children: [
|
|
98
100
|
/* @__PURE__ */ p("input", {
|
|
99
|
-
...
|
|
100
|
-
ref:
|
|
101
|
+
...M,
|
|
102
|
+
ref: N,
|
|
101
103
|
type: "checkbox",
|
|
102
|
-
"aria-labelledby":
|
|
103
|
-
"aria-describedby":
|
|
104
|
+
"aria-labelledby": z,
|
|
105
|
+
"aria-describedby": B,
|
|
104
106
|
"aria-checked": h ? "mixed" : void 0,
|
|
105
|
-
onChange:
|
|
107
|
+
onChange: H,
|
|
106
108
|
css: s
|
|
107
109
|
}),
|
|
108
110
|
/* @__PURE__ */ p("span", {
|
|
@@ -115,15 +117,15 @@ function C({ ref: e, label: n, description: f, indeterminate: h = !1, size: C =
|
|
|
115
117
|
],
|
|
116
118
|
children: /* @__PURE__ */ p(S, { indeterminate: h })
|
|
117
119
|
}),
|
|
118
|
-
|
|
119
|
-
id:
|
|
120
|
+
L && /* @__PURE__ */ p("span", {
|
|
121
|
+
id: F,
|
|
120
122
|
className: E?.label?.className,
|
|
121
123
|
css: [y[C], E?.label?.css],
|
|
122
|
-
children:
|
|
124
|
+
children: t
|
|
123
125
|
})
|
|
124
126
|
]
|
|
125
|
-
}),
|
|
126
|
-
id:
|
|
127
|
+
}), R && /* @__PURE__ */ p("span", {
|
|
128
|
+
id: I,
|
|
127
129
|
className: E?.description?.className,
|
|
128
130
|
css: [
|
|
129
131
|
b,
|
package/dist/checkbox.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Checkbox } from "./checkbox-
|
|
2
|
+
export { t as Checkbox } from "./checkbox-CClE61GV.js";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import { n
|
|
4
|
-
import { n as
|
|
2
|
+
import { a as e, i as t } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { n } from "./focus-ring-BK5W5_NY.js";
|
|
4
|
+
import { n as r, r as i } from "./media-8yrN85VT.js";
|
|
5
|
+
import { t as a } from "./sx-BJXJ2xJK.js";
|
|
5
6
|
import { n as o, r as s } from "./roving-focus-CYlo_Kf8.js";
|
|
6
7
|
import { t as c } from "./use-controlled-state-DpeVQZNR.js";
|
|
7
8
|
import { t as l } from "./renderable-DzcIj1Lo.js";
|
|
@@ -54,11 +55,12 @@ var S = [], C = Symbol("overflow"), w = {
|
|
|
54
55
|
"&[aria-pressed=\"true\"]:hover:not(:disabled)": { backgroundColor: h.color.accentSoftHover },
|
|
55
56
|
"&:disabled": {
|
|
56
57
|
opacity: .55,
|
|
57
|
-
cursor: "not-allowed"
|
|
58
|
+
cursor: "not-allowed",
|
|
59
|
+
borderStyle: "dashed"
|
|
58
60
|
},
|
|
59
|
-
"&:focus-visible":
|
|
60
|
-
[
|
|
61
|
-
[
|
|
61
|
+
"&:focus-visible": n,
|
|
62
|
+
[i]: { transitionDuration: "0s" },
|
|
63
|
+
[r]: {
|
|
62
64
|
borderColor: "CanvasText",
|
|
63
65
|
"&[aria-pressed=\"true\"]": {
|
|
64
66
|
borderColor: "Highlight",
|
|
@@ -96,15 +98,15 @@ var S = [], C = Symbol("overflow"), w = {
|
|
|
96
98
|
animationDuration: h.motion.duration.fast,
|
|
97
99
|
animationTimingFunction: h.motion.easeStandard,
|
|
98
100
|
animationFillMode: "backwards",
|
|
99
|
-
[
|
|
101
|
+
[i]: { animation: "none" }
|
|
100
102
|
}), j = t({
|
|
101
103
|
inlineSize: h.space[4],
|
|
102
104
|
blockSize: h.space[4],
|
|
103
105
|
flexShrink: 0
|
|
104
106
|
});
|
|
105
|
-
function M({ ref: e, options: t, type:
|
|
107
|
+
function M({ ref: e, options: t, type: n = "multiple", value: r, defaultValue: i, onValueChange: h, label: v, allowEmpty: b = !0, disabled: x = !1, size: O = "md", maxVisible: A, expanded: j, defaultExpanded: M = !1, onExpandedChange: le, locale: ue, moreLabel: N, lessLabel: P, slotProps: F, className: de, sx: fe, onKeyDown: pe, onBlur: me, "aria-label": he, "aria-labelledby": I, ...ge }) {
|
|
106
108
|
if (A !== void 0 && (!Number.isInteger(A) || A < 1 || !N || P === void 0)) throw Error("ChipGroup maxVisible requires a positive integer, moreLabel and lessLabel.");
|
|
107
|
-
let [L, R] = c(
|
|
109
|
+
let [L, R] = c(r, i ?? (n === "single" ? "" : S), h), [_e, ve] = c(j, M, le), z = _e ?? !1, B = typeof L == "string" ? L === "" ? S : [L] : L ?? S, [V, ye] = m(B), [be, xe] = m(z);
|
|
108
110
|
be !== z && (xe(z), z || ye(B));
|
|
109
111
|
let H = t.filter((e, t) => z || A === void 0 || t < A || B.includes(e.value) || V.includes(e.value)), U = t.filter((e, t) => A !== void 0 && t >= A && !B.includes(e.value) && (z || !V.includes(e.value))).length, W = U > 0, G = p(null), Se = p(null), K = p(null), q = p(null), J = p(!1), [Y, X] = m(null), Z = u();
|
|
110
112
|
d(e, () => G.current, []), d(F?.row?.ref, () => K.current, []);
|
|
@@ -118,7 +120,7 @@ function M({ ref: e, options: t, type: r = "multiple", value: i, defaultValue: a
|
|
|
118
120
|
(r === e.ownerDocument.body || r === t) && (n.find((e) => e.dataset.ui === "chip-group-overflow") ?? n[0])?.focus();
|
|
119
121
|
}), /* @__PURE__ */ g(ee, {
|
|
120
122
|
reducedMotion: "user",
|
|
121
|
-
children: /* @__PURE__ */ g(
|
|
123
|
+
children: /* @__PURE__ */ g(a, {
|
|
122
124
|
className: de,
|
|
123
125
|
styles: re,
|
|
124
126
|
sx: fe,
|
|
@@ -147,13 +149,13 @@ function M({ ref: e, options: t, type: r = "multiple", value: i, defaultValue: a
|
|
|
147
149
|
ref: K,
|
|
148
150
|
id: Z,
|
|
149
151
|
css: [ie, F?.row?.css],
|
|
150
|
-
children: [H.map((e,
|
|
152
|
+
children: [H.map((e, r) => {
|
|
151
153
|
let i = typeof F?.chip == "function" ? F.chip(e) : F?.chip, a = B.includes(e.value);
|
|
152
154
|
return /* @__PURE__ */ g(y.div, {
|
|
153
155
|
layout: !0,
|
|
154
156
|
transition: w,
|
|
155
|
-
css: [k, z && A !== void 0 &&
|
|
156
|
-
style: { animationDelay: `${Math.min(
|
|
157
|
+
css: [k, z && A !== void 0 && r >= A && !V.includes(e.value) && !a && oe],
|
|
158
|
+
style: { animationDelay: `${Math.min(r * ne, te)}ms` },
|
|
157
159
|
children: /* @__PURE__ */ _("button", {
|
|
158
160
|
...i,
|
|
159
161
|
type: "button",
|
|
@@ -170,9 +172,9 @@ function M({ ref: e, options: t, type: r = "multiple", value: i, defaultValue: a
|
|
|
170
172
|
onFocus: (t) => {
|
|
171
173
|
i?.onFocus?.(t), q.current = t.currentTarget, J.current = !0, X(e.value);
|
|
172
174
|
},
|
|
173
|
-
onClick: (
|
|
174
|
-
if (i?.onClick?.(
|
|
175
|
-
if (
|
|
175
|
+
onClick: (r) => {
|
|
176
|
+
if (i?.onClick?.(r), !r.defaultPrevented) {
|
|
177
|
+
if (n === "single") a ? b && R("") : R(e.value);
|
|
176
178
|
else {
|
|
177
179
|
let n = t.filter((t) => t.value === e.value ? !a : B.includes(t.value)).map((e) => e.value);
|
|
178
180
|
(n.length !== B.length || n.some((e, t) => e !== B[t])) && R(n);
|
package/dist/chip-group.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as ChipGroup } from "./chip-group-
|
|
2
|
+
export { t as ChipGroup } from "./chip-group-BZUX9KPF.js";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import { t
|
|
4
|
-
import { n
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as ee } from "./
|
|
7
|
-
import { t as
|
|
2
|
+
import { i as e } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { 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 ee } from "./use-controlled-state-DpeVQZNR.js";
|
|
7
|
+
import { t as a } from "./button-C6OV0C7J.js";
|
|
8
|
+
import { t as o } from "./copy-button-C0p_qrgf.js";
|
|
8
9
|
import { Fragment as te, useCallback as s, useEffect as c, useId as ne, useLayoutEffect as re, useRef as l, useState as ie } from "react";
|
|
9
10
|
import { vars as u } from "@jfrader/tokens/vars";
|
|
10
11
|
import { Fragment as d, jsx as f, jsxs as p } from "@emotion/react/jsx-runtime";
|
|
@@ -26,21 +27,21 @@ var m = 2, h = `calc(${u.radius.lg} - ${u.space[1]})`, ae = e({
|
|
|
26
27
|
fontFamily: u.font.sans,
|
|
27
28
|
fontSize: u.textSize.sm,
|
|
28
29
|
lineHeight: u.lineHeight.base,
|
|
29
|
-
[
|
|
30
|
+
[n]: {
|
|
30
31
|
borderColor: "CanvasText",
|
|
31
32
|
color: "CanvasText"
|
|
32
33
|
}
|
|
33
|
-
}),
|
|
34
|
+
}), oe = e({
|
|
34
35
|
display: "flex",
|
|
35
36
|
alignItems: "center",
|
|
36
37
|
gap: u.space[2],
|
|
37
38
|
minBlockSize: u.space[8],
|
|
38
39
|
paddingInlineStart: u.space[3]
|
|
39
|
-
}),
|
|
40
|
+
}), se = e({
|
|
40
41
|
minInlineSize: 0,
|
|
41
42
|
fontWeight: u.fontWeight.medium,
|
|
42
43
|
overflowWrap: "anywhere"
|
|
43
|
-
}),
|
|
44
|
+
}), ce = e({
|
|
44
45
|
flexShrink: 0,
|
|
45
46
|
maxInlineSize: "50%",
|
|
46
47
|
paddingInline: u.space[2],
|
|
@@ -50,7 +51,7 @@ var m = 2, h = `calc(${u.radius.lg} - ${u.space[1]})`, ae = e({
|
|
|
50
51
|
fontFamily: u.font.mono,
|
|
51
52
|
fontSize: u.textSize.xs,
|
|
52
53
|
overflowWrap: "anywhere"
|
|
53
|
-
}),
|
|
54
|
+
}), le = e({ marginInlineStart: "auto" }), g = e({
|
|
54
55
|
position: "relative",
|
|
55
56
|
display: "flex",
|
|
56
57
|
direction: "ltr",
|
|
@@ -68,18 +69,18 @@ var m = 2, h = `calc(${u.radius.lg} - ${u.space[1]})`, ae = e({
|
|
|
68
69
|
backgroundImage: `linear-gradient(to bottom, transparent, ${u.color.surfaceInset})`,
|
|
69
70
|
pointerEvents: "none"
|
|
70
71
|
},
|
|
71
|
-
[
|
|
72
|
+
[n]: {
|
|
72
73
|
borderColor: "CanvasText",
|
|
73
74
|
"&[data-state=\"collapsed\"]::after": { display: "none" }
|
|
74
75
|
}
|
|
75
|
-
}),
|
|
76
|
+
}), _ = e({
|
|
76
77
|
fontFamily: u.font.mono,
|
|
77
78
|
fontSize: u.textSize.sm,
|
|
78
79
|
lineHeight: u.lineHeight.relaxed,
|
|
79
80
|
fontVariantNumeric: "tabular-nums",
|
|
80
81
|
whiteSpace: "pre",
|
|
81
82
|
tabSize: m
|
|
82
|
-
}),
|
|
83
|
+
}), v = e({
|
|
83
84
|
flexShrink: 0,
|
|
84
85
|
paddingBlock: u.space[3],
|
|
85
86
|
paddingInline: u.space[3],
|
|
@@ -87,7 +88,7 @@ var m = 2, h = `calc(${u.radius.lg} - ${u.space[1]})`, ae = e({
|
|
|
87
88
|
color: u.color.textSubtle,
|
|
88
89
|
userSelect: "none",
|
|
89
90
|
borderInlineEnd: `1px solid ${u.color.border}`
|
|
90
|
-
}),
|
|
91
|
+
}), ue = e({
|
|
91
92
|
flex: "1 1 auto",
|
|
92
93
|
minInlineSize: 0,
|
|
93
94
|
margin: 0,
|
|
@@ -102,8 +103,8 @@ var m = 2, h = `calc(${u.radius.lg} - ${u.space[1]})`, ae = e({
|
|
|
102
103
|
borderStartStartRadius: 0,
|
|
103
104
|
borderEndStartRadius: 0
|
|
104
105
|
},
|
|
105
|
-
"&:focus-visible":
|
|
106
|
-
}),
|
|
106
|
+
"&:focus-visible": t
|
|
107
|
+
}), y = e({ font: "inherit" }), b = e({
|
|
107
108
|
inlineSize: "100%",
|
|
108
109
|
blockSize: "auto",
|
|
109
110
|
minBlockSize: u.space[8],
|
|
@@ -117,8 +118,8 @@ var m = 2, h = `calc(${u.radius.lg} - ${u.space[1]})`, ae = e({
|
|
|
117
118
|
transitionTimingFunction: u.motion.easeStandard
|
|
118
119
|
},
|
|
119
120
|
"&[aria-expanded=\"true\"] svg": { transform: "rotate(180deg)" },
|
|
120
|
-
[
|
|
121
|
-
}),
|
|
121
|
+
[r]: { "& svg": { transitionDuration: "0s" } }
|
|
122
|
+
}), x = /* @__PURE__ */ f("svg", {
|
|
122
123
|
viewBox: "0 0 16 16",
|
|
123
124
|
fill: "none",
|
|
124
125
|
stroke: "currentColor",
|
|
@@ -127,13 +128,13 @@ var m = 2, h = `calc(${u.radius.lg} - ${u.space[1]})`, ae = e({
|
|
|
127
128
|
strokeLinejoin: "round",
|
|
128
129
|
children: /* @__PURE__ */ f("path", { d: "M4 6l4 4 4-4" })
|
|
129
130
|
}), S = new Intl.PluralRules("en");
|
|
130
|
-
function
|
|
131
|
+
function C(e, t) {
|
|
131
132
|
return `Show all ${t} ${S.select(e) === "one" ? "line" : "lines"}`;
|
|
132
133
|
}
|
|
133
|
-
function
|
|
134
|
+
function w(e) {
|
|
134
135
|
process.env.NODE_ENV !== "production" && console.warn("CodeBlock: highlighting failed; showing plain text.", e);
|
|
135
136
|
}
|
|
136
|
-
function
|
|
137
|
+
function de(e, t) {
|
|
137
138
|
let n = t?.map((e) => e.content).join("");
|
|
138
139
|
return t === void 0 || n === void 0 || !e.startsWith(n) ? e : /* @__PURE__ */ p(d, { children: [t.map((e, t) => /* @__PURE__ */ f("span", {
|
|
139
140
|
style: {
|
|
@@ -143,150 +144,151 @@ function fe(e, t) {
|
|
|
143
144
|
children: e.content
|
|
144
145
|
}, t)), e.slice(n.length)] });
|
|
145
146
|
}
|
|
146
|
-
function
|
|
147
|
-
let
|
|
147
|
+
function T({ ref: e, code: t, filename: n, language: r, label: u = "Source code", sourceLabel: d = "Selectable source code", maxLines: m, open: h, defaultOpen: S = !1, onOpenChange: T, lineNumbers: fe = !1, locale: pe, getExpandLabel: E = C, collapseLabel: D = "Show fewer lines", copyable: O = !0, copyButtonProps: k, preRef: A, highlight: j, slotProps: M, className: N, sx: P, "aria-label": F, "aria-labelledby": I, ...L }) {
|
|
148
|
+
let R = ne(), z = `${R}-label`, B = `${R}-source`, [V, me] = ee(h, S, T), H = t.match(/[^\n]*\n|[^\n]+$/g) ?? [], U = m !== void 0 && Number.isFinite(m) && m > 0 ? Math.max(1, Math.floor(m)) : void 0, W = U !== void 0 && H.length > U, G = !W || V, K = G ? H : H.slice(0, U), q = new Intl.NumberFormat(pe), J = l(null), he = s((e) => {
|
|
148
149
|
if (e) return () => {
|
|
149
|
-
e.ownerDocument.activeElement === e && (
|
|
150
|
+
e.ownerDocument.activeElement === e && (J.current = e.ownerDocument);
|
|
150
151
|
};
|
|
151
|
-
}, []),
|
|
152
|
+
}, []), Y = l(j), [X, Z] = ie(null), Q = j !== void 0;
|
|
152
153
|
c(() => {
|
|
153
|
-
|
|
154
|
+
Y.current = j;
|
|
154
155
|
}), c(() => {
|
|
155
|
-
let e =
|
|
156
|
-
if (!e ||
|
|
157
|
-
let
|
|
156
|
+
let e = Y.current;
|
|
157
|
+
if (Z(null), !e || t === "") return;
|
|
158
|
+
let n = !0, i;
|
|
158
159
|
try {
|
|
159
|
-
|
|
160
|
-
code:
|
|
161
|
-
language:
|
|
160
|
+
i = e({
|
|
161
|
+
code: t,
|
|
162
|
+
language: r
|
|
162
163
|
});
|
|
163
164
|
} catch (e) {
|
|
164
|
-
|
|
165
|
+
w(e);
|
|
165
166
|
return;
|
|
166
167
|
}
|
|
167
|
-
return Promise.resolve(
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
168
|
+
return Promise.resolve(i).then((i) => {
|
|
169
|
+
n && Z(i ? {
|
|
170
|
+
loader: e,
|
|
171
|
+
code: t,
|
|
172
|
+
language: r,
|
|
173
|
+
lines: i
|
|
172
174
|
} : null);
|
|
173
175
|
}, (e) => {
|
|
174
|
-
|
|
176
|
+
n && w(e);
|
|
175
177
|
}), () => {
|
|
176
|
-
|
|
178
|
+
n = !1;
|
|
177
179
|
};
|
|
178
180
|
}, [
|
|
179
|
-
|
|
180
|
-
|
|
181
|
+
t,
|
|
182
|
+
r,
|
|
181
183
|
Q,
|
|
182
|
-
|
|
184
|
+
j
|
|
183
185
|
]);
|
|
184
|
-
let $ = Q &&
|
|
186
|
+
let $ = Q && X?.loader === j && X.code === t && X.language === r ? X.lines : void 0;
|
|
185
187
|
return re(() => {
|
|
186
|
-
|
|
187
|
-
}), /* @__PURE__ */ f(
|
|
188
|
-
className:
|
|
188
|
+
J.current &&= (J.current.getElementById(B)?.focus(), null);
|
|
189
|
+
}), /* @__PURE__ */ f(i, {
|
|
190
|
+
className: N,
|
|
189
191
|
styles: ae,
|
|
190
|
-
sx:
|
|
191
|
-
children: (
|
|
192
|
-
...
|
|
192
|
+
sx: P,
|
|
193
|
+
children: (i) => /* @__PURE__ */ p("section", {
|
|
194
|
+
...L,
|
|
193
195
|
ref: e,
|
|
194
196
|
"data-ui": "code-block",
|
|
195
|
-
className:
|
|
196
|
-
"aria-label":
|
|
197
|
-
"aria-labelledby":
|
|
197
|
+
className: i,
|
|
198
|
+
"aria-label": F,
|
|
199
|
+
"aria-labelledby": I ? `${I} ${z}` : F === void 0 ? z : void 0,
|
|
198
200
|
"data-highlighted": $ ? "" : void 0,
|
|
199
201
|
children: [
|
|
200
202
|
/* @__PURE__ */ p("header", {
|
|
201
203
|
"data-ui": "code-block-header",
|
|
202
|
-
className:
|
|
203
|
-
css: [
|
|
204
|
+
className: M?.header?.className,
|
|
205
|
+
css: [oe, M?.header?.css],
|
|
204
206
|
children: [
|
|
205
207
|
/* @__PURE__ */ f("span", {
|
|
206
|
-
id:
|
|
208
|
+
id: z,
|
|
207
209
|
"data-ui": "code-block-label",
|
|
208
|
-
className:
|
|
209
|
-
css: [
|
|
210
|
-
children:
|
|
210
|
+
className: M?.label?.className,
|
|
211
|
+
css: [se, M?.label?.css],
|
|
212
|
+
children: n || u
|
|
211
213
|
}),
|
|
212
|
-
|
|
214
|
+
r !== void 0 && r !== "" && /* @__PURE__ */ f("span", {
|
|
213
215
|
"data-ui": "code-block-language",
|
|
214
|
-
className:
|
|
215
|
-
css: [
|
|
216
|
-
children:
|
|
216
|
+
className: M?.language?.className,
|
|
217
|
+
css: [ce, M?.language?.css],
|
|
218
|
+
children: r
|
|
217
219
|
}),
|
|
218
|
-
|
|
220
|
+
O && /* @__PURE__ */ f(o, {
|
|
219
221
|
label: "Copy code",
|
|
220
222
|
pendingLabel: "Copying code",
|
|
221
223
|
copiedLabel: "Code copied",
|
|
222
224
|
errorLabel: "Could not copy code",
|
|
223
225
|
variant: "ghost",
|
|
224
226
|
iconOnly: !0,
|
|
225
|
-
...
|
|
226
|
-
css: [
|
|
227
|
-
text:
|
|
227
|
+
...k,
|
|
228
|
+
css: [le, k?.css],
|
|
229
|
+
text: t
|
|
228
230
|
})
|
|
229
231
|
]
|
|
230
232
|
}),
|
|
231
233
|
/* @__PURE__ */ p("div", {
|
|
232
234
|
"data-ui": "code-block-source-frame",
|
|
233
|
-
"data-state":
|
|
234
|
-
className:
|
|
235
|
-
css: [
|
|
236
|
-
children: [
|
|
235
|
+
"data-state": W ? G ? "expanded" : "collapsed" : void 0,
|
|
236
|
+
className: M?.sourceFrame?.className,
|
|
237
|
+
css: [g, M?.sourceFrame?.css],
|
|
238
|
+
children: [fe && K.length > 0 && /* @__PURE__ */ f("div", {
|
|
237
239
|
"aria-hidden": "true",
|
|
238
240
|
"data-ui": "code-block-gutter",
|
|
239
|
-
className:
|
|
241
|
+
className: M?.gutter?.className,
|
|
240
242
|
css: [
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
243
|
+
_,
|
|
244
|
+
v,
|
|
245
|
+
M?.gutter?.css
|
|
244
246
|
],
|
|
245
|
-
children:
|
|
247
|
+
children: K.map((e, t) => q.format(t + 1)).join("\n")
|
|
246
248
|
}), /* @__PURE__ */ f("pre", {
|
|
247
|
-
id:
|
|
248
|
-
ref:
|
|
249
|
+
id: B,
|
|
250
|
+
ref: A,
|
|
249
251
|
role: "group",
|
|
250
252
|
tabIndex: 0,
|
|
251
253
|
dir: "ltr",
|
|
252
254
|
"aria-label": d,
|
|
253
255
|
"data-ui": "code-block-pre",
|
|
254
|
-
className:
|
|
256
|
+
className: M?.pre?.className,
|
|
255
257
|
css: [
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
258
|
+
_,
|
|
259
|
+
ue,
|
|
260
|
+
M?.pre?.css
|
|
259
261
|
],
|
|
260
262
|
children: /* @__PURE__ */ f("code", {
|
|
261
263
|
"data-ui": "code-block-code",
|
|
262
|
-
className:
|
|
263
|
-
css: [
|
|
264
|
-
children: $ ?
|
|
264
|
+
className: M?.code?.className,
|
|
265
|
+
css: [y, M?.code?.css],
|
|
266
|
+
children: $ ? K.map((e, t) => /* @__PURE__ */ f(te, { children: de(e, $[t]) }, t)) : G ? t : K.join("")
|
|
265
267
|
})
|
|
266
268
|
})]
|
|
267
269
|
}),
|
|
268
|
-
|
|
269
|
-
ref:
|
|
270
|
+
W && /* @__PURE__ */ f(a, {
|
|
271
|
+
ref: he,
|
|
270
272
|
variant: "ghost",
|
|
271
273
|
tone: "neutral",
|
|
272
274
|
size: "sm",
|
|
273
|
-
endIcon:
|
|
274
|
-
"aria-expanded": !!
|
|
275
|
-
"aria-controls":
|
|
275
|
+
endIcon: x,
|
|
276
|
+
"aria-expanded": !!V,
|
|
277
|
+
"aria-controls": B,
|
|
276
278
|
"data-ui": "code-block-toggle",
|
|
277
|
-
className:
|
|
278
|
-
css: [
|
|
279
|
+
className: M?.toggle?.className,
|
|
280
|
+
css: [b, M?.toggle?.css],
|
|
279
281
|
render: (e) => /* @__PURE__ */ f("button", {
|
|
280
282
|
...e,
|
|
281
283
|
type: "button"
|
|
282
284
|
}),
|
|
283
|
-
onClick: () =>
|
|
284
|
-
children:
|
|
285
|
+
onClick: () => me(!V),
|
|
286
|
+
children: V ? D : E(H.length, q.format(H.length))
|
|
285
287
|
})
|
|
286
288
|
]
|
|
287
289
|
})
|
|
288
290
|
});
|
|
289
291
|
}
|
|
290
|
-
|
|
292
|
+
T.displayName = "CodeBlock";
|
|
291
293
|
//#endregion
|
|
292
|
-
export {
|
|
294
|
+
export { T as t };
|
package/dist/code-block.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as CodeBlock } from "./code-block-
|
|
2
|
+
export { t as CodeBlock } from "./code-block-CYP89_6h.js";
|