@atom63/ui-react 0.2.0-beta.13 → 0.2.0-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atom63-theme.js +4 -0
- package/dist/atom63-theme.js.map +1 -0
- package/dist/chunk-2GKXGY2X.js +61 -0
- package/dist/chunk-2GKXGY2X.js.map +1 -0
- package/dist/chunk-2QUN4K6Z.js +3 -0
- package/dist/chunk-2QUN4K6Z.js.map +1 -0
- package/dist/chunk-2Z2DZLD7.js +89 -0
- package/dist/chunk-2Z2DZLD7.js.map +1 -0
- package/dist/chunk-34JIIXPP.js +18 -0
- package/dist/chunk-34JIIXPP.js.map +1 -0
- package/dist/chunk-3J2LUXAG.js +3 -0
- package/dist/chunk-3J2LUXAG.js.map +1 -0
- package/dist/chunk-3R74FOXV.js +206 -0
- package/dist/chunk-3R74FOXV.js.map +1 -0
- package/dist/chunk-5CH3VMGZ.js +190 -0
- package/dist/chunk-5CH3VMGZ.js.map +1 -0
- package/dist/chunk-5GU3MTAL.js +54 -0
- package/dist/chunk-5GU3MTAL.js.map +1 -0
- package/dist/chunk-63D5JSVT.js +33 -0
- package/dist/chunk-63D5JSVT.js.map +1 -0
- package/dist/chunk-6EFUKXXN.js +85 -0
- package/dist/chunk-6EFUKXXN.js.map +1 -0
- package/dist/chunk-6RAWJDPH.js +61 -0
- package/dist/chunk-6RAWJDPH.js.map +1 -0
- package/dist/chunk-6XJCNBGH.js +128 -0
- package/dist/chunk-6XJCNBGH.js.map +1 -0
- package/dist/chunk-6YFKZ5CD.js +74 -0
- package/dist/chunk-6YFKZ5CD.js.map +1 -0
- package/dist/chunk-7JOL7SOV.js +49 -0
- package/dist/chunk-7JOL7SOV.js.map +1 -0
- package/dist/chunk-7QY24D5A.js +26 -0
- package/dist/chunk-7QY24D5A.js.map +1 -0
- package/dist/chunk-ADZSCK32.js +110 -0
- package/dist/chunk-ADZSCK32.js.map +1 -0
- package/dist/chunk-AOX2S6EH.js +352 -0
- package/dist/chunk-AOX2S6EH.js.map +1 -0
- package/dist/chunk-ASV4A4YB.js +150 -0
- package/dist/chunk-ASV4A4YB.js.map +1 -0
- package/dist/chunk-ATSXKARJ.js +10 -0
- package/dist/chunk-ATSXKARJ.js.map +1 -0
- package/dist/chunk-B5L4F5O3.js +61 -0
- package/dist/chunk-B5L4F5O3.js.map +1 -0
- package/dist/chunk-BSDSLG3L.js +218 -0
- package/dist/chunk-BSDSLG3L.js.map +1 -0
- package/dist/chunk-C3MWASGU.js +294 -0
- package/dist/chunk-C3MWASGU.js.map +1 -0
- package/dist/chunk-CAS7T4PQ.js +3 -0
- package/dist/chunk-CAS7T4PQ.js.map +1 -0
- package/dist/chunk-CFFGYLY3.js +107 -0
- package/dist/chunk-CFFGYLY3.js.map +1 -0
- package/dist/chunk-CIWJP6G7.js +79 -0
- package/dist/chunk-CIWJP6G7.js.map +1 -0
- package/dist/chunk-CJAWGKA5.js +244 -0
- package/dist/chunk-CJAWGKA5.js.map +1 -0
- package/dist/chunk-CYWNKIIJ.js +72 -0
- package/dist/chunk-CYWNKIIJ.js.map +1 -0
- package/dist/chunk-EAWOBJ24.js +59 -0
- package/dist/chunk-EAWOBJ24.js.map +1 -0
- package/dist/chunk-F52PXIER.js +350 -0
- package/dist/chunk-F52PXIER.js.map +1 -0
- package/dist/chunk-FAOZ6X2C.js +109 -0
- package/dist/chunk-FAOZ6X2C.js.map +1 -0
- package/dist/chunk-FBMTWUHX.js +56 -0
- package/dist/chunk-FBMTWUHX.js.map +1 -0
- package/dist/chunk-FPIUWNK6.js +77 -0
- package/dist/chunk-FPIUWNK6.js.map +1 -0
- package/dist/chunk-FREL2MPS.js +110 -0
- package/dist/chunk-FREL2MPS.js.map +1 -0
- package/dist/chunk-FZ6JHXQI.js +28 -0
- package/dist/chunk-FZ6JHXQI.js.map +1 -0
- package/dist/chunk-G3BUS74T.js +165 -0
- package/dist/chunk-G3BUS74T.js.map +1 -0
- package/dist/chunk-GAGAOFX3.js +70 -0
- package/dist/chunk-GAGAOFX3.js.map +1 -0
- package/dist/chunk-GRRWPMZI.js +64 -0
- package/dist/chunk-GRRWPMZI.js.map +1 -0
- package/dist/chunk-GZPV4T4I.js +16 -0
- package/dist/chunk-GZPV4T4I.js.map +1 -0
- package/dist/chunk-H2N3XFKG.js +20 -0
- package/dist/chunk-H2N3XFKG.js.map +1 -0
- package/dist/chunk-H5QTJ3FJ.js +59 -0
- package/dist/chunk-H5QTJ3FJ.js.map +1 -0
- package/dist/chunk-H7JEKEVY.js +107 -0
- package/dist/chunk-H7JEKEVY.js.map +1 -0
- package/dist/chunk-HSOEBAWM.js +65 -0
- package/dist/chunk-HSOEBAWM.js.map +1 -0
- package/dist/chunk-ICVKZEAA.js +40 -0
- package/dist/chunk-ICVKZEAA.js.map +1 -0
- package/dist/chunk-IHEBXCAF.js +168 -0
- package/dist/chunk-IHEBXCAF.js.map +1 -0
- package/dist/{chunk-WL27K6MO.js → chunk-IPU75YIQ.js} +2 -2
- package/dist/{chunk-WL27K6MO.js.map → chunk-IPU75YIQ.js.map} +1 -1
- package/dist/chunk-ITVGYZ7X.js +80 -0
- package/dist/chunk-ITVGYZ7X.js.map +1 -0
- package/dist/{chunk-ZEY2VU4O.js → chunk-IXWOWQBP.js} +4 -4
- package/dist/{chunk-ZEY2VU4O.js.map → chunk-IXWOWQBP.js.map} +1 -1
- package/dist/chunk-JRMKDIGF.js +79 -0
- package/dist/chunk-JRMKDIGF.js.map +1 -0
- package/dist/chunk-KC6GYHDU.js +284 -0
- package/dist/chunk-KC6GYHDU.js.map +1 -0
- package/dist/chunk-KJMIFN46.js +49 -0
- package/dist/chunk-KJMIFN46.js.map +1 -0
- package/dist/chunk-KQ7W3CBS.js +3 -0
- package/dist/chunk-KQ7W3CBS.js.map +1 -0
- package/dist/chunk-KX5E5UUZ.js +104 -0
- package/dist/chunk-KX5E5UUZ.js.map +1 -0
- package/dist/chunk-L5KFLZUC.js +624 -0
- package/dist/chunk-L5KFLZUC.js.map +1 -0
- package/dist/chunk-LKERWO2G.js +202 -0
- package/dist/chunk-LKERWO2G.js.map +1 -0
- package/dist/chunk-MOWXMXSH.js +163 -0
- package/dist/chunk-MOWXMXSH.js.map +1 -0
- package/dist/chunk-MRDIIUUY.js +181 -0
- package/dist/chunk-MRDIIUUY.js.map +1 -0
- package/dist/chunk-MVWCM6A5.js +196 -0
- package/dist/chunk-MVWCM6A5.js.map +1 -0
- package/dist/chunk-NBBMTH3K.js +43 -0
- package/dist/chunk-NBBMTH3K.js.map +1 -0
- package/dist/chunk-OZPC5YOP.js +17 -0
- package/dist/chunk-OZPC5YOP.js.map +1 -0
- package/dist/chunk-PAWFTQV6.js +178 -0
- package/dist/chunk-PAWFTQV6.js.map +1 -0
- package/dist/chunk-Q2BXME6U.js +75 -0
- package/dist/chunk-Q2BXME6U.js.map +1 -0
- package/dist/chunk-QCNBLY6M.js +239 -0
- package/dist/chunk-QCNBLY6M.js.map +1 -0
- package/dist/chunk-QIDU2WXD.js +105 -0
- package/dist/chunk-QIDU2WXD.js.map +1 -0
- package/dist/chunk-R2CNNKB3.js +70 -0
- package/dist/chunk-R2CNNKB3.js.map +1 -0
- package/dist/chunk-R35FHBSP.js +29 -0
- package/dist/chunk-R35FHBSP.js.map +1 -0
- package/dist/chunk-RDIGEW6P.js +18 -0
- package/dist/chunk-RDIGEW6P.js.map +1 -0
- package/dist/chunk-RI5ZROIJ.js +70 -0
- package/dist/chunk-RI5ZROIJ.js.map +1 -0
- package/dist/chunk-T7FUZUZO.js +70 -0
- package/dist/chunk-T7FUZUZO.js.map +1 -0
- package/dist/chunk-TAXYD4I4.js +208 -0
- package/dist/chunk-TAXYD4I4.js.map +1 -0
- package/dist/chunk-TBB22HVY.js +53 -0
- package/dist/chunk-TBB22HVY.js.map +1 -0
- package/dist/chunk-V4MKJPJ3.js +31 -0
- package/dist/chunk-V4MKJPJ3.js.map +1 -0
- package/dist/chunk-VNBJK2HH.js +86 -0
- package/dist/chunk-VNBJK2HH.js.map +1 -0
- package/dist/chunk-WHUL6ADM.js +39 -0
- package/dist/chunk-WHUL6ADM.js.map +1 -0
- package/dist/{chunk-UPPHQLZ2.js → chunk-WKORZULQ.js} +2 -2
- package/dist/{chunk-UPPHQLZ2.js.map → chunk-WKORZULQ.js.map} +1 -1
- package/dist/chunk-WLLPGOQ7.js +106 -0
- package/dist/chunk-WLLPGOQ7.js.map +1 -0
- package/dist/chunk-WVMYVQE2.js +72 -0
- package/dist/chunk-WVMYVQE2.js.map +1 -0
- package/dist/chunk-XEXDR2WZ.js +193 -0
- package/dist/chunk-XEXDR2WZ.js.map +1 -0
- package/dist/chunk-XHSP2SJ2.js +120 -0
- package/dist/chunk-XHSP2SJ2.js.map +1 -0
- package/dist/chunk-XLSK66GO.js +236 -0
- package/dist/chunk-XLSK66GO.js.map +1 -0
- package/dist/chunk-XUMQEMB3.js +46 -0
- package/dist/chunk-XUMQEMB3.js.map +1 -0
- package/dist/chunk-XUOJLQ75.js +174 -0
- package/dist/chunk-XUOJLQ75.js.map +1 -0
- package/dist/chunk-XZN2LZUC.js +67 -0
- package/dist/chunk-XZN2LZUC.js.map +1 -0
- package/dist/chunk-Y6WVSEIC.js +56 -0
- package/dist/chunk-Y6WVSEIC.js.map +1 -0
- package/dist/chunk-YB2OXQAI.js +43 -0
- package/dist/chunk-YB2OXQAI.js.map +1 -0
- package/dist/chunk-YCG7YMV7.js +48 -0
- package/dist/chunk-YCG7YMV7.js.map +1 -0
- package/dist/chunk-ZSP4XLPE.js +268 -0
- package/dist/chunk-ZSP4XLPE.js.map +1 -0
- package/dist/components/accordion/index.js +4 -0
- package/dist/components/accordion/index.js.map +1 -0
- package/dist/components/alert/index.js +4 -0
- package/dist/components/alert/index.js.map +1 -0
- package/dist/components/alert-dialog/index.js +6 -0
- package/dist/components/alert-dialog/index.js.map +1 -0
- package/dist/components/amount/index.js +4 -0
- package/dist/components/amount/index.js.map +1 -0
- package/dist/components/animated-check/index.js +4 -0
- package/dist/components/animated-check/index.js.map +1 -0
- package/dist/components/autocomplete/index.js +6 -0
- package/dist/components/autocomplete/index.js.map +1 -0
- package/dist/components/avatar/index.js +4 -0
- package/dist/components/avatar/index.js.map +1 -0
- package/dist/components/badge/index.js +4 -0
- package/dist/components/badge/index.js.map +1 -0
- package/dist/components/breadcrumb/index.js +4 -0
- package/dist/components/breadcrumb/index.js.map +1 -0
- package/dist/components/button/index.js +4 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/button-group/index.js +5 -0
- package/dist/components/button-group/index.js.map +1 -0
- package/dist/components/card/index.js +4 -0
- package/dist/components/card/index.js.map +1 -0
- package/dist/components/carousel/index.js +4 -0
- package/dist/components/carousel/index.js.map +1 -0
- package/dist/components/chat-composer/index.js +7 -0
- package/dist/components/chat-composer/index.js.map +1 -0
- package/dist/components/chat-message/index.js +5 -0
- package/dist/components/chat-message/index.js.map +1 -0
- package/dist/components/chat-steps/index.js +6 -0
- package/dist/components/chat-steps/index.js.map +1 -0
- package/dist/components/chat-typing-indicator/index.js +5 -0
- package/dist/components/chat-typing-indicator/index.js.map +1 -0
- package/dist/components/checkbox/index.js +4 -0
- package/dist/components/checkbox/index.js.map +1 -0
- package/dist/components/collapsible/index.js +4 -0
- package/dist/components/collapsible/index.js.map +1 -0
- package/dist/components/command/index.js +6 -0
- package/dist/components/command/index.js.map +1 -0
- package/dist/components/connected-panel/index.js +5 -0
- package/dist/components/connected-panel/index.js.map +1 -0
- package/dist/components/context-menu/index.js +5 -0
- package/dist/components/context-menu/index.js.map +1 -0
- package/dist/components/copy-button/index.js +6 -0
- package/dist/components/copy-button/index.js.map +1 -0
- package/dist/components/destination-link/index.js +4 -0
- package/dist/components/destination-link/index.js.map +1 -0
- package/dist/components/dialog/index.js +5 -0
- package/dist/components/dialog/index.js.map +1 -0
- package/dist/components/drawer/index.js +5 -0
- package/dist/components/drawer/index.js.map +1 -0
- package/dist/components/dropdown-menu/index.js +6 -0
- package/dist/components/dropdown-menu/index.js.map +1 -0
- package/dist/components/empty/index.js +7 -0
- package/dist/components/empty/index.js.map +1 -0
- package/dist/components/feedback-state/index.js +6 -0
- package/dist/components/feedback-state/index.js.map +1 -0
- package/dist/components/field/index.js +7 -0
- package/dist/components/field/index.js.map +1 -0
- package/dist/components/form/index.js +5 -0
- package/dist/components/form/index.js.map +1 -0
- package/dist/components/frame/index.js +4 -0
- package/dist/components/frame/index.js.map +1 -0
- package/dist/components/hover-card/index.js +5 -0
- package/dist/components/hover-card/index.js.map +1 -0
- package/dist/components/input/index.js +7 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/input-otp/index.js +4 -0
- package/dist/components/input-otp/index.js.map +1 -0
- package/dist/components/item/index.js +5 -0
- package/dist/components/item/index.js.map +1 -0
- package/dist/components/kbd/index.js +4 -0
- package/dist/components/kbd/index.js.map +1 -0
- package/dist/components/label/index.js +4 -0
- package/dist/components/label/index.js.map +1 -0
- package/dist/components/load-more-trigger/index.js +4 -0
- package/dist/components/load-more-trigger/index.js.map +1 -0
- package/dist/components/marquee/index.js +5 -0
- package/dist/components/marquee/index.js.map +1 -0
- package/dist/components/menubar/index.js +6 -0
- package/dist/components/menubar/index.js.map +1 -0
- package/dist/components/message/index.js +4 -0
- package/dist/components/message/index.js.map +1 -0
- package/dist/components/navigation-menu/index.js +5 -0
- package/dist/components/navigation-menu/index.js.map +1 -0
- package/dist/components/pagination/index.js +5 -0
- package/dist/components/pagination/index.js.map +1 -0
- package/dist/components/panel-setting-button/index.js +5 -0
- package/dist/components/panel-setting-button/index.js.map +1 -0
- package/dist/components/popover/index.js +5 -0
- package/dist/components/popover/index.js.map +1 -0
- package/dist/components/portal-container/index.js +3 -0
- package/dist/components/portal-container/index.js.map +1 -0
- package/dist/components/preview-card/index.js +5 -0
- package/dist/components/preview-card/index.js.map +1 -0
- package/dist/components/progress/index.js +4 -0
- package/dist/components/progress/index.js.map +1 -0
- package/dist/components/progressive-blur/index.js +4 -0
- package/dist/components/progressive-blur/index.js.map +1 -0
- package/dist/components/radio/index.js +4 -0
- package/dist/components/radio/index.js.map +1 -0
- package/dist/components/rating/index.js +5 -0
- package/dist/components/rating/index.js.map +1 -0
- package/dist/components/resizable/index.js +4 -0
- package/dist/components/resizable/index.js.map +1 -0
- package/dist/components/scroll-area/index.js +5 -0
- package/dist/components/scroll-area/index.js.map +1 -0
- package/dist/components/scrollable-list/index.js +8 -0
- package/dist/components/scrollable-list/index.js.map +1 -0
- package/dist/components/search-field/index.js +8 -0
- package/dist/components/search-field/index.js.map +1 -0
- package/dist/components/segmented-control/index.js +4 -0
- package/dist/components/segmented-control/index.js.map +1 -0
- package/dist/components/select/index.js +5 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/separator/index.js +4 -0
- package/dist/components/separator/index.js.map +1 -0
- package/dist/components/sheet/index.js +8 -0
- package/dist/components/sheet/index.js.map +1 -0
- package/dist/components/sidebar/index.js +15 -0
- package/dist/components/sidebar/index.js.map +1 -0
- package/dist/components/sidebar-nav-tree/index.js +18 -0
- package/dist/components/sidebar-nav-tree/index.js.map +1 -0
- package/dist/components/skeleton/index.js +4 -0
- package/dist/components/skeleton/index.js.map +1 -0
- package/dist/components/slider/index.js +4 -0
- package/dist/components/slider/index.js.map +1 -0
- package/dist/components/spinner/index.js +4 -0
- package/dist/components/spinner/index.js.map +1 -0
- package/dist/components/switch/index.js +4 -0
- package/dist/components/switch/index.js.map +1 -0
- package/dist/components/table/index.js +4 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/tabs/index.js +4 -0
- package/dist/components/tabs/index.js.map +1 -0
- package/dist/components/text-ticker/index.js +5 -0
- package/dist/components/text-ticker/index.js.map +1 -0
- package/dist/components/textarea/index.js +4 -0
- package/dist/components/textarea/index.js.map +1 -0
- package/dist/components/toaster/index.js +5 -0
- package/dist/components/toaster/index.js.map +1 -0
- package/dist/components/toggle/index.js +4 -0
- package/dist/components/toggle/index.js.map +1 -0
- package/dist/components/toggle-group/index.js +5 -0
- package/dist/components/toggle-group/index.js.map +1 -0
- package/dist/components/tooltip/index.js +5 -0
- package/dist/components/tooltip/index.js.map +1 -0
- package/dist/conformance/index.js +3 -0
- package/dist/conformance/index.js.map +1 -0
- package/dist/hooks/use-extract-color.js +4 -0
- package/dist/hooks/use-extract-color.js.map +1 -0
- package/dist/{index-CbgpSG4j.d.ts → index-DlcaeyJS.d.ts} +16 -193
- package/dist/index.d.ts +32 -14
- package/dist/index.js +86 -5532
- package/dist/index.js.map +1 -1
- package/dist/lib/extract-color.js +3 -0
- package/dist/lib/extract-color.js.map +1 -0
- package/dist/lib/motion.js +3 -0
- package/dist/lib/motion.js.map +1 -0
- package/dist/media/index.js +4 -4
- package/dist/media/media-lightbox/parts/index.js +3 -3
- package/dist/preview/index.d.ts +2 -2
- package/dist/preview/index.js +24 -3
- package/dist/provider.js +4 -0
- package/dist/provider.js.map +1 -0
- package/dist/theme/index.js +7 -2
- package/dist/theme/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/alert-dialog/alert-dialog.css +3 -3
- package/src/components/avatar/avatar.css +2 -2
- package/src/components/button-group/button-group.css +1 -1
- package/src/components/item/item.css +4 -4
- package/src/components/tabs/tabs.css +13 -0
- package/src/components/text-ticker/text-ticker.css +37 -4
- package/dist/chunk-IFBF2IA3.js +0 -225
- package/dist/chunk-IFBF2IA3.js.map +0 -1
- package/dist/chunk-R7IQ3IL5.js +0 -157
- package/dist/chunk-R7IQ3IL5.js.map +0 -1
- package/dist/chunk-RLF45GBS.js +0 -2846
- package/dist/chunk-RLF45GBS.js.map +0 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { cn } from './chunk-AJLHJRK6.js';
|
|
2
|
+
import { getCrossRendererContract, loadMoreTriggerContract } from '@atom63/ui-foundation';
|
|
3
|
+
import { LoaderCircle, AlertCircle, CheckCircle } from 'lucide-react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var stateTones = getCrossRendererContract("load-more-trigger").stateTones;
|
|
8
|
+
var LoadMoreTrigger = forwardRef(
|
|
9
|
+
({
|
|
10
|
+
children,
|
|
11
|
+
className,
|
|
12
|
+
exhaustedMessage = "All items loaded",
|
|
13
|
+
failedMessage = "Couldn\u2019t load more",
|
|
14
|
+
hasMore,
|
|
15
|
+
idleMessage = "Scroll down to load more",
|
|
16
|
+
isLoading,
|
|
17
|
+
loadingMessage = "Loading more...",
|
|
18
|
+
onRetry,
|
|
19
|
+
retryLabel = "Retry",
|
|
20
|
+
state,
|
|
21
|
+
variant = loadMoreTriggerContract.defaultVariant
|
|
22
|
+
}, ref) => {
|
|
23
|
+
const resolvedState = state ?? (isLoading ? "loading" : hasMore ? "idle" : "hidden");
|
|
24
|
+
const isHidden = resolvedState === "hidden";
|
|
25
|
+
if (children && !isHidden) {
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
className: cn("a63-LoadMoreTrigger", className),
|
|
30
|
+
"data-state": "custom",
|
|
31
|
+
"data-slot": "load-more-trigger",
|
|
32
|
+
"data-variant": variant,
|
|
33
|
+
ref,
|
|
34
|
+
children
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
const tone = isHidden ? void 0 : stateTones[resolvedState] ?? "neutral";
|
|
39
|
+
return /* @__PURE__ */ jsx(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
"aria-live": "polite",
|
|
43
|
+
className: cn("a63-LoadMoreTrigger", className),
|
|
44
|
+
"data-has-message": isHidden ? void 0 : "",
|
|
45
|
+
"data-state": resolvedState,
|
|
46
|
+
"data-slot": "load-more-trigger",
|
|
47
|
+
"data-tone": tone,
|
|
48
|
+
"data-variant": variant,
|
|
49
|
+
ref: isHidden ? void 0 : ref,
|
|
50
|
+
role: "status",
|
|
51
|
+
children: isHidden ? null : /* @__PURE__ */ jsxs(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
className: "a63-LoadMoreTrigger-message",
|
|
55
|
+
"data-slot": "load-more-trigger-message",
|
|
56
|
+
"data-variant": variant,
|
|
57
|
+
children: [
|
|
58
|
+
resolvedState === "loading" ? /* @__PURE__ */ jsx(
|
|
59
|
+
"span",
|
|
60
|
+
{
|
|
61
|
+
"aria-hidden": true,
|
|
62
|
+
className: "a63-LoadMoreTrigger-spinner",
|
|
63
|
+
"data-slot": "load-more-trigger-spinner",
|
|
64
|
+
children: /* @__PURE__ */ jsx(LoaderCircle, {})
|
|
65
|
+
}
|
|
66
|
+
) : null,
|
|
67
|
+
resolvedState === "failed" ? /* @__PURE__ */ jsx(
|
|
68
|
+
AlertCircle,
|
|
69
|
+
{
|
|
70
|
+
"aria-hidden": true,
|
|
71
|
+
className: "a63-LoadMoreTrigger-icon",
|
|
72
|
+
"data-slot": "load-more-trigger-icon"
|
|
73
|
+
}
|
|
74
|
+
) : null,
|
|
75
|
+
resolvedState === "exhausted" ? /* @__PURE__ */ jsx(
|
|
76
|
+
CheckCircle,
|
|
77
|
+
{
|
|
78
|
+
"aria-hidden": true,
|
|
79
|
+
className: "a63-LoadMoreTrigger-icon",
|
|
80
|
+
"data-slot": "load-more-trigger-icon"
|
|
81
|
+
}
|
|
82
|
+
) : null,
|
|
83
|
+
/* @__PURE__ */ jsx("span", { children: resolvedState === "loading" ? loadingMessage : resolvedState === "failed" ? failedMessage : resolvedState === "exhausted" ? exhaustedMessage : idleMessage }),
|
|
84
|
+
resolvedState === "failed" && onRetry ? /* @__PURE__ */ jsx(
|
|
85
|
+
"button",
|
|
86
|
+
{
|
|
87
|
+
className: "a63-LoadMoreTrigger-action",
|
|
88
|
+
"data-slot": "load-more-trigger-action",
|
|
89
|
+
onClick: onRetry,
|
|
90
|
+
type: "button",
|
|
91
|
+
children: retryLabel
|
|
92
|
+
}
|
|
93
|
+
) : null
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
LoadMoreTrigger.displayName = "LoadMoreTrigger";
|
|
102
|
+
|
|
103
|
+
export { LoadMoreTrigger };
|
|
104
|
+
//# sourceMappingURL=chunk-QIDU2WXD.js.map
|
|
105
|
+
//# sourceMappingURL=chunk-QIDU2WXD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/load-more-trigger/load-more-trigger.tsx"],"names":[],"mappings":";;;;;;AA4BA,IAAM,UAAA,GAAa,wBAAA,CAAyB,mBAAmB,CAAA,CAAE,UAAA;AAQ1D,IAAM,eAAA,GAAkB,UAAA;AAAA,EAC7B,CACE;AAAA,IACE,QAAA;AAAA,IACA,SAAA;AAAA,IACA,gBAAA,GAAmB,kBAAA;AAAA,IACnB,aAAA,GAAgB,yBAAA;AAAA,IAChB,OAAA;AAAA,IACA,WAAA,GAAc,0BAAA;AAAA,IACd,SAAA;AAAA,IACA,cAAA,GAAiB,iBAAA;AAAA,IACjB,OAAA;AAAA,IACA,UAAA,GAAa,OAAA;AAAA,IACb,KAAA;AAAA,IACA,UAAU,uBAAA,CAAwB;AAAA,KAEpC,GAAA,KACG;AACH,IAAA,MAAM,aAAA,GAAgB,KAAA,KAAU,SAAA,GAAY,SAAA,GAAY,UAAU,MAAA,GAAS,QAAA,CAAA;AAC3E,IAAA,MAAM,WAAW,aAAA,KAAkB,QAAA;AAEnC,IAAA,IAAI,QAAA,IAAY,CAAC,QAAA,EAAU;AACzB,MAAA,uBACE,GAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UACC,SAAA,EAAW,EAAA,CAAG,qBAAA,EAAuB,SAAS,CAAA;AAAA,UAC9C,YAAA,EAAW,QAAA;AAAA,UACX,WAAA,EAAU,mBAAA;AAAA,UACV,cAAA,EAAc,OAAA;AAAA,UACd,GAAA;AAAA,UAEC;AAAA;AAAA,OACH;AAAA,IAEJ;AAEA,IAAA,MAAM,IAAA,GAAO,QAAA,GAAW,MAAA,GAAa,UAAA,CAAW,aAAa,CAAA,IAAK,SAAA;AAElE,IAAA,uBACE,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,WAAA,EAAU,QAAA;AAAA,QACV,SAAA,EAAW,EAAA,CAAG,qBAAA,EAAuB,SAAS,CAAA;AAAA,QAC9C,kBAAA,EAAkB,WAAW,MAAA,GAAY,EAAA;AAAA,QACzC,YAAA,EAAY,aAAA;AAAA,QACZ,WAAA,EAAU,mBAAA;AAAA,QACV,WAAA,EAAW,IAAA;AAAA,QACX,cAAA,EAAc,OAAA;AAAA,QACd,GAAA,EAAK,WAAW,MAAA,GAAY,GAAA;AAAA,QAC5B,IAAA,EAAK,QAAA;AAAA,QAEJ,qBAAW,IAAA,mBACV,IAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,SAAA,EAAU,6BAAA;AAAA,YACV,WAAA,EAAU,2BAAA;AAAA,YACV,cAAA,EAAc,OAAA;AAAA,YAEb,QAAA,EAAA;AAAA,cAAA,aAAA,KAAkB,SAAA,mBACjB,GAAA;AAAA,gBAAC,MAAA;AAAA,gBAAA;AAAA,kBACC,aAAA,EAAW,IAAA;AAAA,kBACX,SAAA,EAAU,6BAAA;AAAA,kBACV,WAAA,EAAU,2BAAA;AAAA,kBAEV,8BAAC,YAAA,EAAA,EAAa;AAAA;AAAA,eAChB,GACE,IAAA;AAAA,cACH,kBAAkB,QAAA,mBACjB,GAAA;AAAA,gBAAC,WAAA;AAAA,gBAAA;AAAA,kBACC,aAAA,EAAW,IAAA;AAAA,kBACX,SAAA,EAAU,0BAAA;AAAA,kBACV,WAAA,EAAU;AAAA;AAAA,eACZ,GACE,IAAA;AAAA,cACH,kBAAkB,WAAA,mBACjB,GAAA;AAAA,gBAAC,WAAA;AAAA,gBAAA;AAAA,kBACC,aAAA,EAAW,IAAA;AAAA,kBACX,SAAA,EAAU,0BAAA;AAAA,kBACV,WAAA,EAAU;AAAA;AAAA,eACZ,GACE,IAAA;AAAA,8BACJ,GAAA,CAAC,MAAA,EAAA,EACE,QAAA,EAAA,aAAA,KAAkB,SAAA,GACf,cAAA,GACA,aAAA,KAAkB,QAAA,GAChB,aAAA,GACA,aAAA,KAAkB,WAAA,GAChB,gBAAA,GACA,WAAA,EACV,CAAA;AAAA,cACC,aAAA,KAAkB,YAAY,OAAA,mBAC7B,GAAA;AAAA,gBAAC,QAAA;AAAA,gBAAA;AAAA,kBACC,SAAA,EAAU,4BAAA;AAAA,kBACV,WAAA,EAAU,0BAAA;AAAA,kBACV,OAAA,EAAS,OAAA;AAAA,kBACT,IAAA,EAAK,QAAA;AAAA,kBAEJ,QAAA,EAAA;AAAA;AAAA,eACH,GACE;AAAA;AAAA;AAAA;AACN;AAAA,KAEJ;AAAA,EAEJ;AACF;AAEA,eAAA,CAAgB,WAAA,GAAc,iBAAA","file":"chunk-QIDU2WXD.js","sourcesContent":["import {\n getCrossRendererContract,\n type LoadMoreTriggerState,\n type LoadMoreTriggerVariant,\n loadMoreTriggerContract,\n} from '@atom63/ui-foundation'\nimport { AlertCircle, CheckCircle, LoaderCircle } from 'lucide-react'\nimport { forwardRef, type ReactNode } from 'react'\n\nimport { cn } from '../../lib/cn'\n\nexport type { LoadMoreTriggerState, LoadMoreTriggerVariant }\n\nexport interface LoadMoreTriggerProps {\n children?: ReactNode\n className?: string\n exhaustedMessage?: string\n failedMessage?: string\n hasMore?: boolean\n idleMessage?: string\n isLoading?: boolean\n loadingMessage?: string\n onRetry?: () => void\n retryLabel?: string\n state?: Exclude<LoadMoreTriggerState, 'custom'>\n variant?: LoadMoreTriggerVariant\n}\n\nconst stateTones = getCrossRendererContract('load-more-trigger').stateTones\n\n/* LoadMoreTrigger — a sentinel row for infinite scroll, ported from prod\n @atom63/ui. It shows only while there's more to load (or a load is in\n flight); the consumer wires an IntersectionObserver to the forwarded ref to\n fire the fetch when the row scrolls into view. The row is one live region\n that stays mounted (empty while hidden, with no ref), so a change of state\n only changes its text and screen readers announce it. */\nexport const LoadMoreTrigger = forwardRef<HTMLDivElement, LoadMoreTriggerProps>(\n (\n {\n children,\n className,\n exhaustedMessage = 'All items loaded',\n failedMessage = 'Couldn’t load more',\n hasMore,\n idleMessage = 'Scroll down to load more',\n isLoading,\n loadingMessage = 'Loading more...',\n onRetry,\n retryLabel = 'Retry',\n state,\n variant = loadMoreTriggerContract.defaultVariant,\n },\n ref\n ) => {\n const resolvedState = state ?? (isLoading ? 'loading' : hasMore ? 'idle' : 'hidden')\n const isHidden = resolvedState === 'hidden'\n\n if (children && !isHidden) {\n return (\n <div\n className={cn('a63-LoadMoreTrigger', className)}\n data-state=\"custom\"\n data-slot=\"load-more-trigger\"\n data-variant={variant}\n ref={ref}\n >\n {children}\n </div>\n )\n }\n\n const tone = isHidden ? undefined : (stateTones[resolvedState] ?? 'neutral')\n\n return (\n <div\n aria-live=\"polite\"\n className={cn('a63-LoadMoreTrigger', className)}\n data-has-message={isHidden ? undefined : ''}\n data-state={resolvedState}\n data-slot=\"load-more-trigger\"\n data-tone={tone}\n data-variant={variant}\n ref={isHidden ? undefined : ref}\n role=\"status\"\n >\n {isHidden ? null : (\n <div\n className=\"a63-LoadMoreTrigger-message\"\n data-slot=\"load-more-trigger-message\"\n data-variant={variant}\n >\n {resolvedState === 'loading' ? (\n <span\n aria-hidden\n className=\"a63-LoadMoreTrigger-spinner\"\n data-slot=\"load-more-trigger-spinner\"\n >\n <LoaderCircle />\n </span>\n ) : null}\n {resolvedState === 'failed' ? (\n <AlertCircle\n aria-hidden\n className=\"a63-LoadMoreTrigger-icon\"\n data-slot=\"load-more-trigger-icon\"\n />\n ) : null}\n {resolvedState === 'exhausted' ? (\n <CheckCircle\n aria-hidden\n className=\"a63-LoadMoreTrigger-icon\"\n data-slot=\"load-more-trigger-icon\"\n />\n ) : null}\n <span>\n {resolvedState === 'loading'\n ? loadingMessage\n : resolvedState === 'failed'\n ? failedMessage\n : resolvedState === 'exhausted'\n ? exhaustedMessage\n : idleMessage}\n </span>\n {resolvedState === 'failed' && onRetry ? (\n <button\n className=\"a63-LoadMoreTrigger-action\"\n data-slot=\"load-more-trigger-action\"\n onClick={onRetry}\n type=\"button\"\n >\n {retryLabel}\n </button>\n ) : null}\n </div>\n )}\n </div>\n )\n }\n)\n\nLoadMoreTrigger.displayName = 'LoadMoreTrigger'\n"]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { cn } from './chunk-AJLHJRK6.js';
|
|
2
|
+
import { createContext, useContext } from 'react';
|
|
3
|
+
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
4
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var ResizableOrientationContext = createContext("horizontal");
|
|
7
|
+
function ResizablePanelGroup({
|
|
8
|
+
children,
|
|
9
|
+
className,
|
|
10
|
+
direction,
|
|
11
|
+
orientation,
|
|
12
|
+
...props
|
|
13
|
+
}) {
|
|
14
|
+
const panelOrientation = orientation ?? direction ?? "horizontal";
|
|
15
|
+
return /* @__PURE__ */ jsx(ResizableOrientationContext.Provider, { value: panelOrientation, children: /* @__PURE__ */ jsx(
|
|
16
|
+
ResizablePrimitive.Group,
|
|
17
|
+
{
|
|
18
|
+
className: cn("a63-Resizable-group", className),
|
|
19
|
+
"data-panel-group-direction": panelOrientation,
|
|
20
|
+
"data-slot": "resizable-panel-group",
|
|
21
|
+
orientation: panelOrientation,
|
|
22
|
+
...props,
|
|
23
|
+
children
|
|
24
|
+
}
|
|
25
|
+
) });
|
|
26
|
+
}
|
|
27
|
+
function ResizablePanel({ ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
|
|
29
|
+
}
|
|
30
|
+
function ResizableHandle({
|
|
31
|
+
"aria-label": ariaLabel = "Resize panels",
|
|
32
|
+
variant,
|
|
33
|
+
withHandle,
|
|
34
|
+
className,
|
|
35
|
+
...props
|
|
36
|
+
}) {
|
|
37
|
+
const orientation = useContext(ResizableOrientationContext);
|
|
38
|
+
const resolvedVariant = variant ?? (withHandle ? "grip" : "line");
|
|
39
|
+
return /* @__PURE__ */ jsx(
|
|
40
|
+
ResizablePrimitive.Separator,
|
|
41
|
+
{
|
|
42
|
+
"aria-label": ariaLabel,
|
|
43
|
+
className: cn("a63-Resizable-handle", className),
|
|
44
|
+
"data-panel-group-direction": orientation,
|
|
45
|
+
"data-slot": "resizable-handle",
|
|
46
|
+
"data-variant": resolvedVariant,
|
|
47
|
+
...props,
|
|
48
|
+
children: resolvedVariant === "grip" && /* @__PURE__ */ jsx("div", { className: "a63-Resizable-handle-grip", "data-slot": "resizable-handle-grip", children: /* @__PURE__ */ jsxs(
|
|
49
|
+
"svg",
|
|
50
|
+
{
|
|
51
|
+
"aria-hidden": "true",
|
|
52
|
+
className: "a63-Resizable-handle-grip-icon",
|
|
53
|
+
fill: "currentColor",
|
|
54
|
+
height: "10",
|
|
55
|
+
viewBox: "0 0 16 16",
|
|
56
|
+
width: "10",
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "3.5", r: "1.1" }),
|
|
59
|
+
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "1.1" }),
|
|
60
|
+
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "12.5", r: "1.1" })
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
) })
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
69
|
+
//# sourceMappingURL=chunk-R2CNNKB3.js.map
|
|
70
|
+
//# sourceMappingURL=chunk-R2CNNKB3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/resizable/resizable.tsx"],"names":[],"mappings":";;;;;AAWA,IAAM,2BAAA,GAA8B,cAAoC,YAAY,CAAA;AAiB7E,SAAS,mBAAA,CAAoB;AAAA,EAClC,QAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA;AAAA,EACA,WAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAiD;AAC/C,EAAA,MAAM,gBAAA,GAAmB,eAAe,SAAA,IAAa,YAAA;AAErD,EAAA,uBACE,GAAA,CAAC,2BAAA,CAA4B,QAAA,EAA5B,EAAqC,OAAO,gBAAA,EAC3C,QAAA,kBAAA,GAAA;AAAA,IAAoB,kBAAA,CAAA,KAAA;AAAA,IAAnB;AAAA,MACC,SAAA,EAAW,EAAA,CAAG,qBAAA,EAAuB,SAAS,CAAA;AAAA,MAC9C,4BAAA,EAA4B,gBAAA;AAAA,MAC5B,WAAA,EAAU,uBAAA;AAAA,MACV,WAAA,EAAa,gBAAA;AAAA,MACZ,GAAG,KAAA;AAAA,MAEH;AAAA;AAAA,GACH,EACF,CAAA;AAEJ;AAIO,SAAS,cAAA,CAAe,EAAE,GAAG,KAAA,EAAM,EAA4C;AACpF,EAAA,2BAA2B,kBAAA,CAAA,KAAA,EAAnB,EAAyB,WAAA,EAAU,iBAAA,EAAmB,GAAG,KAAA,EAAO,CAAA;AAC1E;AASO,SAAS,eAAA,CAAgB;AAAA,EAC9B,cAAc,SAAA,GAAY,eAAA;AAAA,EAC1B,OAAA;AAAA,EACA,UAAA;AAAA,EACA,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAA6C;AAC3C,EAAA,MAAM,WAAA,GAAc,WAAW,2BAA2B,CAAA;AAC1D,EAAA,MAAM,eAAA,GAAkB,OAAA,KAAY,UAAA,GAAa,MAAA,GAAS,MAAA,CAAA;AAE1D,EAAA,uBACE,GAAA;AAAA,IAAoB,kBAAA,CAAA,SAAA;AAAA,IAAnB;AAAA,MACC,YAAA,EAAY,SAAA;AAAA,MACZ,SAAA,EAAW,EAAA,CAAG,sBAAA,EAAwB,SAAS,CAAA;AAAA,MAC/C,4BAAA,EAA4B,WAAA;AAAA,MAC5B,WAAA,EAAU,kBAAA;AAAA,MACV,cAAA,EAAc,eAAA;AAAA,MACb,GAAG,KAAA;AAAA,MAEH,8BAAoB,MAAA,oBACnB,GAAA,CAAC,SAAI,SAAA,EAAU,2BAAA,EAA4B,aAAU,uBAAA,EACnD,QAAA,kBAAA,IAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UACC,aAAA,EAAY,MAAA;AAAA,UACZ,SAAA,EAAU,gCAAA;AAAA,UACV,IAAA,EAAK,cAAA;AAAA,UACL,MAAA,EAAO,IAAA;AAAA,UACP,OAAA,EAAQ,WAAA;AAAA,UACR,KAAA,EAAM,IAAA;AAAA,UAEN,QAAA,EAAA;AAAA,4BAAA,GAAA,CAAC,YAAO,EAAA,EAAG,GAAA,EAAI,EAAA,EAAG,KAAA,EAAM,GAAE,KAAA,EAAM,CAAA;AAAA,gCAC/B,QAAA,EAAA,EAAO,EAAA,EAAG,KAAI,EAAA,EAAG,GAAA,EAAI,GAAE,KAAA,EAAM,CAAA;AAAA,gCAC7B,QAAA,EAAA,EAAO,EAAA,EAAG,KAAI,EAAA,EAAG,MAAA,EAAO,GAAE,KAAA,EAAM;AAAA;AAAA;AAAA,OACnC,EACF;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-R2CNNKB3.js","sourcesContent":["'use client'\n\nimport type { ResizableVariant } from '@atom63/ui-foundation'\nimport type * as React from 'react'\nimport { createContext, useContext } from 'react'\nimport * as ResizablePrimitive from 'react-resizable-panels'\n\nimport { cn } from '../../lib/cn'\n\nexport type ResizableOrientation = 'horizontal' | 'vertical'\n\nconst ResizableOrientationContext = createContext<ResizableOrientation>('horizontal')\n\nexport type ResizablePanelGroupProps = Omit<\n React.ComponentProps<typeof ResizablePrimitive.Group>,\n 'orientation'\n> & {\n direction?: ResizableOrientation\n orientation?: ResizableOrientation\n}\n\n/*\n * Resizable — a faithful DS port of the react-resizable-panels wrapper. The\n * group flexes (row/column by orientation), panels are pass-through, and the\n * handle is a token-styled separator, a plain line or with a grip (variant). The\n * grip chevron is an inline SVG (matching Select / DropdownMenu). Orientation is\n * carried on context so the handle can flip its layout + grip rotation.\n */\nexport function ResizablePanelGroup({\n children,\n className,\n direction,\n orientation,\n ...props\n}: ResizablePanelGroupProps): React.ReactElement {\n const panelOrientation = orientation ?? direction ?? 'horizontal'\n\n return (\n <ResizableOrientationContext.Provider value={panelOrientation}>\n <ResizablePrimitive.Group\n className={cn('a63-Resizable-group', className)}\n data-panel-group-direction={panelOrientation}\n data-slot=\"resizable-panel-group\"\n orientation={panelOrientation}\n {...props}\n >\n {children}\n </ResizablePrimitive.Group>\n </ResizableOrientationContext.Provider>\n )\n}\n\nexport type ResizablePanelProps = React.ComponentProps<typeof ResizablePrimitive.Panel>\n\nexport function ResizablePanel({ ...props }: ResizablePanelProps): React.ReactElement {\n return <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />\n}\n\nexport type ResizableHandleProps = React.ComponentProps<typeof ResizablePrimitive.Separator> & {\n /** `line` draws the separator alone; `grip` adds a grip chip. Defaults to `line`. */\n variant?: ResizableVariant\n /** @deprecated Use `variant=\"grip\"`. */\n withHandle?: boolean\n}\n\nexport function ResizableHandle({\n 'aria-label': ariaLabel = 'Resize panels',\n variant,\n withHandle,\n className,\n ...props\n}: ResizableHandleProps): React.ReactElement {\n const orientation = useContext(ResizableOrientationContext)\n const resolvedVariant = variant ?? (withHandle ? 'grip' : 'line')\n\n return (\n <ResizablePrimitive.Separator\n aria-label={ariaLabel}\n className={cn('a63-Resizable-handle', className)}\n data-panel-group-direction={orientation}\n data-slot=\"resizable-handle\"\n data-variant={resolvedVariant}\n {...props}\n >\n {resolvedVariant === 'grip' && (\n <div className=\"a63-Resizable-handle-grip\" data-slot=\"resizable-handle-grip\">\n <svg\n aria-hidden=\"true\"\n className=\"a63-Resizable-handle-grip-icon\"\n fill=\"currentColor\"\n height=\"10\"\n viewBox=\"0 0 16 16\"\n width=\"10\"\n >\n <circle cx=\"8\" cy=\"3.5\" r=\"1.1\" />\n <circle cx=\"8\" cy=\"8\" r=\"1.1\" />\n <circle cx=\"8\" cy=\"12.5\" r=\"1.1\" />\n </svg>\n </div>\n )}\n </ResizablePrimitive.Separator>\n )\n}\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { cn } from './chunk-AJLHJRK6.js';
|
|
2
|
+
import { separatorContract } from '@atom63/ui-foundation';
|
|
3
|
+
import { Separator as Separator$1 } from '@base-ui/react/separator';
|
|
4
|
+
export { Separator as SeparatorPrimitive } from '@base-ui/react/separator';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function Separator({
|
|
8
|
+
className,
|
|
9
|
+
decorative = false,
|
|
10
|
+
orientation = separatorContract.defaultOrientation,
|
|
11
|
+
variant = separatorContract.defaultVariant,
|
|
12
|
+
...props
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
Separator$1,
|
|
16
|
+
{
|
|
17
|
+
...decorative ? { "aria-hidden": true, role: "presentation" } : {},
|
|
18
|
+
className: cn("a63-Separator", className),
|
|
19
|
+
"data-slot": "separator",
|
|
20
|
+
"data-variant": variant,
|
|
21
|
+
orientation,
|
|
22
|
+
...props
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { Separator };
|
|
28
|
+
//# sourceMappingURL=chunk-R35FHBSP.js.map
|
|
29
|
+
//# sourceMappingURL=chunk-R35FHBSP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/separator/separator.tsx"],"names":["SeparatorPrimitive"],"mappings":";;;;;;AAkBO,SAAS,SAAA,CAAU;AAAA,EACxB,SAAA;AAAA,EACA,UAAA,GAAa,KAAA;AAAA,EACb,cAAc,iBAAA,CAAkB,kBAAA;AAAA,EAChC,UAAU,iBAAA,CAAkB,cAAA;AAAA,EAC5B,GAAG;AACL,CAAA,EAAuC;AACrC,EAAA,uBACE,GAAA;AAAA,IAACA,WAAA;AAAA,IAAA;AAAA,MACE,GAAI,aAAa,EAAE,aAAA,EAAe,MAAM,IAAA,EAAM,cAAA,KAAmB,EAAC;AAAA,MACnE,SAAA,EAAW,EAAA,CAAG,eAAA,EAAiB,SAAS,CAAA;AAAA,MACxC,WAAA,EAAU,WAAA;AAAA,MACV,cAAA,EAAc,OAAA;AAAA,MACd,WAAA;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ","file":"chunk-R35FHBSP.js","sourcesContent":["'use client'\n\nimport { type SeparatorVariant, separatorContract } from '@atom63/ui-foundation'\nimport { Separator as SeparatorPrimitive } from '@base-ui/react/separator'\nimport type React from 'react'\n\nimport { cn } from '../../lib/cn'\n\nexport type SeparatorProps = SeparatorPrimitive.Props & {\n /** Hide a purely visual divider from assistive technology. */\n decorative?: boolean\n /** Solid hairline (default) or a soft edge-to-edge gradient fade. */\n variant?: SeparatorVariant\n}\n\n/* A visual divider — the Base UI Separator primitive (faithful to prod\n @atom63/ui). The line color/thickness + optional gradient fade come from the\n recipe reading --a63-* tokens off orientation + variant data attributes. */\nexport function Separator({\n className,\n decorative = false,\n orientation = separatorContract.defaultOrientation,\n variant = separatorContract.defaultVariant,\n ...props\n}: SeparatorProps): React.ReactElement {\n return (\n <SeparatorPrimitive\n {...(decorative ? { 'aria-hidden': true, role: 'presentation' } : {})}\n className={cn('a63-Separator', className)}\n data-slot=\"separator\"\n data-variant={variant}\n orientation={orientation}\n {...props}\n />\n )\n}\n\nexport { SeparatorPrimitive }\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { cn } from './chunk-AJLHJRK6.js';
|
|
2
|
+
import { kbdContract } from '@atom63/ui-foundation';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function Kbd({
|
|
6
|
+
className,
|
|
7
|
+
size = kbdContract.defaultSize,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ jsx("kbd", { className: cn("a63-Kbd", className), "data-size": size, "data-slot": "kbd", ...props });
|
|
11
|
+
}
|
|
12
|
+
function KbdGroup({ className, ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx("div", { className: cn("a63-KbdGroup", className), "data-slot": "kbd-group", ...props });
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { Kbd, KbdGroup };
|
|
17
|
+
//# sourceMappingURL=chunk-RDIGEW6P.js.map
|
|
18
|
+
//# sourceMappingURL=chunk-RDIGEW6P.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/kbd/kbd.tsx"],"names":[],"mappings":";;;;AAUO,SAAS,GAAA,CAAI;AAAA,EAClB,SAAA;AAAA,EACA,OAAO,WAAA,CAAY,WAAA;AAAA,EACnB,GAAG;AACL,CAAA,EAAiC;AAC/B,EAAA,uBAAO,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,EAAA,CAAG,SAAA,EAAW,SAAS,CAAA,EAAG,WAAA,EAAW,IAAA,EAAM,WAAA,EAAU,KAAA,EAAO,GAAG,KAAA,EAAO,CAAA;AAC/F;AAEO,SAAS,QAAA,CAAS,EAAE,SAAA,EAAW,GAAG,OAAM,EAAoD;AACjG,EAAA,uBAAO,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,EAAA,CAAG,cAAA,EAAgB,SAAS,CAAA,EAAG,WAAA,EAAU,WAAA,EAAa,GAAG,KAAA,EAAO,CAAA;AACzF","file":"chunk-RDIGEW6P.js","sourcesContent":["import { type KbdSize, kbdContract } from '@atom63/ui-foundation'\nimport type * as React from 'react'\n\nimport { cn } from '../../lib/cn'\n\nexport type KbdProps = React.ComponentProps<'kbd'> & {\n size?: KbdSize\n}\n\n/* Presentational keyboard-key cap. `KbdGroup` lays out a sequence (e.g. ⌘ + K). */\nexport function Kbd({\n className,\n size = kbdContract.defaultSize,\n ...props\n}: KbdProps): React.ReactElement {\n return <kbd className={cn('a63-Kbd', className)} data-size={size} data-slot=\"kbd\" {...props} />\n}\n\nexport function KbdGroup({ className, ...props }: React.ComponentProps<'div'>): React.ReactElement {\n return <div className={cn('a63-KbdGroup', className)} data-slot=\"kbd-group\" {...props} />\n}\n"]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Separator } from './chunk-R35FHBSP.js';
|
|
2
|
+
import { cn } from './chunk-AJLHJRK6.js';
|
|
3
|
+
import { buttonGroupContract } from '@atom63/ui-foundation';
|
|
4
|
+
import { mergeProps } from '@base-ui/react/merge-props';
|
|
5
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var ButtonGroupContext = React.createContext(false);
|
|
10
|
+
function ButtonGroupProvider({
|
|
11
|
+
children
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ jsx(ButtonGroupContext.Provider, { value: true, children });
|
|
14
|
+
}
|
|
15
|
+
function useButtonGroupContext() {
|
|
16
|
+
return React.useContext(ButtonGroupContext);
|
|
17
|
+
}
|
|
18
|
+
function ButtonGroup({
|
|
19
|
+
className,
|
|
20
|
+
orientation = buttonGroupContract.defaultOrientation,
|
|
21
|
+
size = buttonGroupContract.defaultSize,
|
|
22
|
+
...props
|
|
23
|
+
}) {
|
|
24
|
+
return /* @__PURE__ */ jsx(ButtonGroupProvider, { children: /* @__PURE__ */ jsx(
|
|
25
|
+
"div",
|
|
26
|
+
{
|
|
27
|
+
className: cn("a63-ButtonGroup", className),
|
|
28
|
+
"data-orientation": orientation,
|
|
29
|
+
"data-size": size === "default" ? "md" : size,
|
|
30
|
+
"data-slot": "button-group",
|
|
31
|
+
role: "group",
|
|
32
|
+
...props
|
|
33
|
+
}
|
|
34
|
+
) });
|
|
35
|
+
}
|
|
36
|
+
function ButtonGroupText({
|
|
37
|
+
className,
|
|
38
|
+
render,
|
|
39
|
+
...props
|
|
40
|
+
}) {
|
|
41
|
+
return useRender({
|
|
42
|
+
defaultTagName: "div",
|
|
43
|
+
props: mergeProps({ className: cn("a63-ButtonGroup-text", className) }, props, {
|
|
44
|
+
"data-slot": "button-group-text"
|
|
45
|
+
}),
|
|
46
|
+
render,
|
|
47
|
+
state: {
|
|
48
|
+
slot: "button-group-text"
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function ButtonGroupSeparator({
|
|
53
|
+
className,
|
|
54
|
+
orientation = "vertical",
|
|
55
|
+
...props
|
|
56
|
+
}) {
|
|
57
|
+
return /* @__PURE__ */ jsx(
|
|
58
|
+
Separator,
|
|
59
|
+
{
|
|
60
|
+
className: cn("a63-ButtonGroup-separator", className),
|
|
61
|
+
"data-slot": "button-group-separator",
|
|
62
|
+
orientation,
|
|
63
|
+
...props
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { ButtonGroup, ButtonGroupProvider, ButtonGroupSeparator, ButtonGroupText, useButtonGroupContext };
|
|
69
|
+
//# sourceMappingURL=chunk-RI5ZROIJ.js.map
|
|
70
|
+
//# sourceMappingURL=chunk-RI5ZROIJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/button-group/button-group-context.tsx","../src/components/button-group/button-group.tsx"],"names":["jsx"],"mappings":";;;;;;;;AAOA,IAAM,kBAAA,GAA2B,oBAAc,KAAK,CAAA;AAE7C,SAAS,mBAAA,CAAoB;AAAA,EAClC;AACF,CAAA,EAEuB;AACrB,EAAA,2BAAQ,kBAAA,CAAmB,QAAA,EAAnB,EAA4B,KAAA,EAAO,MAAO,QAAA,EAAS,CAAA;AAC7D;AAEO,SAAS,qBAAA,GAAiC;AAC/C,EAAA,OAAa,iBAAW,kBAAkB,CAAA;AAC5C;ACOO,SAAS,WAAA,CAAY;AAAA,EAC1B,SAAA;AAAA,EACA,cAAc,mBAAA,CAAoB,kBAAA;AAAA,EAClC,OAAO,mBAAA,CAAoB,WAAA;AAAA,EAC3B,GAAG;AACL,CAAA,EAAyC;AACvC,EAAA,uBACEA,GAAAA,CAAC,mBAAA,EAAA,EACC,QAAA,kBAAAA,GAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA,CAAG,iBAAA,EAAmB,SAAS,CAAA;AAAA,MAC1C,kBAAA,EAAkB,WAAA;AAAA,MAClB,WAAA,EAAW,IAAA,KAAS,SAAA,GAAY,IAAA,GAAO,IAAA;AAAA,MACvC,WAAA,EAAU,cAAA;AAAA,MACV,IAAA,EAAK,OAAA;AAAA,MACJ,GAAG;AAAA;AAAA,GACN,EACF,CAAA;AAEJ;AAGO,SAAS,eAAA,CAAgB;AAAA,EAC9B,SAAA;AAAA,EACA,MAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAwD;AACtD,EAAA,OAAO,SAAA,CAAU;AAAA,IACf,cAAA,EAAgB,KAAA;AAAA,IAChB,KAAA,EAAO,WAAkB,EAAE,SAAA,EAAW,GAAG,sBAAA,EAAwB,SAAS,CAAA,EAAE,EAAG,KAAA,EAAO;AAAA,MACpF,WAAA,EAAa;AAAA,KACiB,CAAA;AAAA,IAChC,MAAA;AAAA,IACA,KAAA,EAAO;AAAA,MACL,IAAA,EAAM;AAAA;AACR,GACD,CAAA;AACH;AAKO,SAAS,oBAAA,CAAqB;AAAA,EACnC,SAAA;AAAA,EACA,WAAA,GAAc,UAAA;AAAA,EACd,GAAG;AACL,CAAA,EAAkD;AAChD,EAAA,uBACEA,GAAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA,CAAG,2BAAA,EAA6B,SAAS,CAAA;AAAA,MACpD,WAAA,EAAU,wBAAA;AAAA,MACV,WAAA;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ","file":"chunk-RI5ZROIJ.js","sourcesContent":["'use client'\n\nimport * as React from 'react'\n\n/* Marks the subtree as living inside a ButtonGroup so member controls (Button,\n Input, Select) can flatten their own radius/shadow. Faithful to prod\n @atom63/ui: a boolean context, default false. */\nconst ButtonGroupContext = React.createContext(false)\n\nexport function ButtonGroupProvider({\n children,\n}: {\n children: React.ReactNode\n}): React.ReactElement {\n return <ButtonGroupContext.Provider value={true}>{children}</ButtonGroupContext.Provider>\n}\n\nexport function useButtonGroupContext(): boolean {\n return React.useContext(ButtonGroupContext)\n}\n","'use client'\n\nimport {\n type ButtonGroupOrientation,\n type ButtonGroupSize,\n type ButtonGroupSizeAlias,\n buttonGroupContract,\n} from '@atom63/ui-foundation'\nimport { mergeProps } from '@base-ui/react/merge-props'\nimport { useRender } from '@base-ui/react/use-render'\nimport type * as React from 'react'\n\nimport { cn } from '../../lib/cn'\nimport { Separator } from '../separator'\nimport { ButtonGroupProvider } from './button-group-context'\n\nexport type ButtonGroupProps = React.ComponentProps<'div'> & {\n orientation?: ButtonGroupOrientation\n /** `'default'` is a deprecated alias of `'md'`. */\n size?: ButtonGroupSize | ButtonGroupSizeAlias\n}\n\n/* ButtonGroup — welds a run of controls (Button / Input / Select / text) into a\n joined segmented bar. Shares ToggleGroup's --a63-segment-* cell chrome\n (resting gel, selected pressed plate). Orientation + size drive the recipe;\n member controls flatten elevation via group CSS + ButtonGroup context. */\nexport function ButtonGroup({\n className,\n orientation = buttonGroupContract.defaultOrientation,\n size = buttonGroupContract.defaultSize,\n ...props\n}: ButtonGroupProps): React.ReactElement {\n return (\n <ButtonGroupProvider>\n <div\n className={cn('a63-ButtonGroup', className)}\n data-orientation={orientation}\n data-size={size === 'default' ? 'md' : size}\n data-slot=\"button-group\"\n role=\"group\"\n {...props}\n />\n </ButtonGroupProvider>\n )\n}\n\n/* A non-interactive text/label cell inside the group (e.g. a leading prefix). */\nexport function ButtonGroupText({\n className,\n render,\n ...props\n}: useRender.ComponentProps<'div'>): React.ReactElement {\n return useRender({\n defaultTagName: 'div',\n props: mergeProps<'div'>({ className: cn('a63-ButtonGroup-text', className) }, props, {\n 'data-slot': 'button-group-text',\n } as React.ComponentProps<'div'>),\n render,\n state: {\n slot: 'button-group-text',\n },\n })\n}\n\nexport type ButtonGroupSeparatorProps = React.ComponentProps<typeof Separator>\n\n/* A hairline that divides item runs within the group. */\nexport function ButtonGroupSeparator({\n className,\n orientation = 'vertical',\n ...props\n}: ButtonGroupSeparatorProps): React.ReactElement {\n return (\n <Separator\n className={cn('a63-ButtonGroup-separator', className)}\n data-slot=\"button-group-separator\"\n orientation={orientation}\n {...props}\n />\n )\n}\n"]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { cn } from './chunk-AJLHJRK6.js';
|
|
2
|
+
import { segmentedControlContract } from '@atom63/ui-foundation';
|
|
3
|
+
import { Tabs } from '@base-ui/react/tabs';
|
|
4
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function SegmentedControl({
|
|
7
|
+
animateBackplate = true,
|
|
8
|
+
className,
|
|
9
|
+
defaultValue,
|
|
10
|
+
fullWidth,
|
|
11
|
+
items,
|
|
12
|
+
onValueChange,
|
|
13
|
+
size = segmentedControlContract.defaultSize,
|
|
14
|
+
tabClassName,
|
|
15
|
+
tone = segmentedControlContract.defaultTone,
|
|
16
|
+
value,
|
|
17
|
+
variant = segmentedControlContract.defaultVariant,
|
|
18
|
+
...props
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
Tabs.Root,
|
|
22
|
+
{
|
|
23
|
+
...props,
|
|
24
|
+
className: cn("a63-SegmentedControl", className),
|
|
25
|
+
"data-backplate-animation": animateBackplate ? "on" : "off",
|
|
26
|
+
"data-full": fullWidth || void 0,
|
|
27
|
+
"data-size": size,
|
|
28
|
+
"data-slot": "segmented-control",
|
|
29
|
+
"data-tone": tone,
|
|
30
|
+
"data-variant": variant,
|
|
31
|
+
defaultValue,
|
|
32
|
+
onValueChange: (next) => {
|
|
33
|
+
if (typeof next === "string" && next !== value) {
|
|
34
|
+
onValueChange?.(next);
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
value,
|
|
38
|
+
children: /* @__PURE__ */ jsxs(Tabs.List, { className: "a63-SegmentedControl-track", "data-slot": "segmented-control-track", children: [
|
|
39
|
+
items.map((item) => /* @__PURE__ */ jsx(
|
|
40
|
+
Tabs.Tab,
|
|
41
|
+
{
|
|
42
|
+
"aria-label": item.label,
|
|
43
|
+
className: cn("a63-SegmentedControl-item", tabClassName),
|
|
44
|
+
"data-slot": "segmented-control-item",
|
|
45
|
+
disabled: item.disabled,
|
|
46
|
+
title: item.label,
|
|
47
|
+
value: item.value,
|
|
48
|
+
children: variant === "icon" ? /* @__PURE__ */ jsx("span", { className: "a63-SegmentedControl-icon", "data-slot": "segmented-control-icon", children: item.icon ?? item.label }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
49
|
+
item.icon ? /* @__PURE__ */ jsx("span", { className: "a63-SegmentedControl-icon", "data-slot": "segmented-control-icon", children: item.icon }) : null,
|
|
50
|
+
/* @__PURE__ */ jsx("span", { className: "a63-SegmentedControl-label", "data-slot": "segmented-control-label", children: item.label })
|
|
51
|
+
] })
|
|
52
|
+
},
|
|
53
|
+
item.value
|
|
54
|
+
)),
|
|
55
|
+
/* @__PURE__ */ jsx(
|
|
56
|
+
Tabs.Indicator,
|
|
57
|
+
{
|
|
58
|
+
className: "a63-SegmentedControl-indicator",
|
|
59
|
+
"data-backplate-animation": animateBackplate ? "on" : "off",
|
|
60
|
+
"data-slot": "segmented-control-indicator"
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
] })
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { SegmentedControl };
|
|
69
|
+
//# sourceMappingURL=chunk-T7FUZUZO.js.map
|
|
70
|
+
//# sourceMappingURL=chunk-T7FUZUZO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/segmented-control/segmented-control.tsx"],"names":[],"mappings":";;;;;AAkDO,SAAS,gBAAA,CAAiB;AAAA,EAC/B,gBAAA,GAAmB,IAAA;AAAA,EACnB,SAAA;AAAA,EACA,YAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA;AAAA,EACA,aAAA;AAAA,EACA,OAAO,wBAAA,CAAyB,WAAA;AAAA,EAChC,YAAA;AAAA,EACA,OAAO,wBAAA,CAAyB,WAAA;AAAA,EAChC,KAAA;AAAA,EACA,UAAU,wBAAA,CAAyB,cAAA;AAAA,EACnC,GAAG;AACL,CAAA,EAA8C;AAC5C,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA,CAAK,IAAA;AAAA,IAAL;AAAA,MACE,GAAG,KAAA;AAAA,MACJ,SAAA,EAAW,EAAA,CAAG,sBAAA,EAAwB,SAAS,CAAA;AAAA,MAC/C,0BAAA,EAA0B,mBAAmB,IAAA,GAAO,KAAA;AAAA,MACpD,aAAW,SAAA,IAAa,MAAA;AAAA,MACxB,WAAA,EAAW,IAAA;AAAA,MACX,WAAA,EAAU,mBAAA;AAAA,MACV,WAAA,EAAW,IAAA;AAAA,MACX,cAAA,EAAc,OAAA;AAAA,MACd,YAAA;AAAA,MACA,eAAe,CAAA,IAAA,KAAQ;AACrB,QAAA,IAAI,OAAO,IAAA,KAAS,QAAA,IAAY,IAAA,KAAS,KAAA,EAAO;AAC9C,UAAA,aAAA,GAAgB,IAAI,CAAA;AAAA,QACtB;AAAA,MACF,CAAA;AAAA,MACA,KAAA;AAAA,MAEA,+BAAC,IAAA,CAAK,IAAA,EAAL,EAAU,SAAA,EAAU,4BAAA,EAA6B,aAAU,yBAAA,EACzD,QAAA,EAAA;AAAA,QAAA,KAAA,CAAM,IAAI,CAAA,IAAA,qBACT,GAAA;AAAA,UAAC,IAAA,CAAK,GAAA;AAAA,UAAL;AAAA,YACC,cAAY,IAAA,CAAK,KAAA;AAAA,YACjB,SAAA,EAAW,EAAA,CAAG,2BAAA,EAA6B,YAAY,CAAA;AAAA,YACvD,WAAA,EAAU,wBAAA;AAAA,YACV,UAAU,IAAA,CAAK,QAAA;AAAA,YAEf,OAAO,IAAA,CAAK,KAAA;AAAA,YACZ,OAAO,IAAA,CAAK,KAAA;AAAA,YAEX,QAAA,EAAA,OAAA,KAAY,MAAA,mBACX,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,2BAAA,EAA4B,WAAA,EAAU,wBAAA,EACnD,QAAA,EAAA,IAAA,CAAK,IAAA,IAAQ,IAAA,CAAK,KAAA,EACrB,oBAEA,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,cAAA,IAAA,CAAK,IAAA,uBACH,MAAA,EAAA,EAAK,SAAA,EAAU,6BAA4B,WAAA,EAAU,wBAAA,EACnD,QAAA,EAAA,IAAA,CAAK,IAAA,EACR,CAAA,GACE,IAAA;AAAA,kCACH,MAAA,EAAA,EAAK,SAAA,EAAU,8BAA6B,WAAA,EAAU,yBAAA,EACpD,eAAK,KAAA,EACR;AAAA,aAAA,EACF;AAAA,WAAA;AAAA,UAlBG,IAAA,CAAK;AAAA,SAqBb,CAAA;AAAA,wBACD,GAAA;AAAA,UAAC,IAAA,CAAK,SAAA;AAAA,UAAL;AAAA,YACC,SAAA,EAAU,gCAAA;AAAA,YACV,0BAAA,EAA0B,mBAAmB,IAAA,GAAO,KAAA;AAAA,YACpD,WAAA,EAAU;AAAA;AAAA;AACZ,OAAA,EACF;AAAA;AAAA,GACF;AAEJ","file":"chunk-T7FUZUZO.js","sourcesContent":["'use client'\n\nimport {\n type SegmentedControlSize,\n type SegmentedControlTone,\n type SegmentedControlVariant,\n segmentedControlContract,\n} from '@atom63/ui-foundation'\nimport { Tabs } from '@base-ui/react/tabs'\nimport type * as React from 'react'\n\nimport { cn } from '../../lib/cn'\n\nexport interface SegmentedControlItem {\n disabled?: boolean\n icon?: React.ReactNode\n label: string\n value: string\n}\n\nexport interface SegmentedControlProps extends Omit<\n Tabs.Root.Props,\n 'children' | 'className' | 'defaultValue' | 'onValueChange' | 'orientation' | 'value'\n> {\n /** Animate the sliding indicator between segments (default true). */\n animateBackplate?: boolean\n className?: string\n /** The initially selected segment when the control is uncontrolled. */\n defaultValue?: string\n /** Stretch the track to fill its container with equal-width segments. */\n fullWidth?: boolean\n items: SegmentedControlItem[]\n onValueChange?: (value: string) => void\n ref?: React.Ref<HTMLDivElement>\n size?: SegmentedControlSize\n /** Per-segment class escape hatch merged onto every tab. */\n tabClassName?: string\n tone?: SegmentedControlTone\n /** The selected segment. Leave it out, with `defaultValue`, for an\n * uncontrolled control. */\n value?: string\n variant?: SegmentedControlVariant\n}\n\n/*\n * SegmentedControl — a single-select segmented track with a sliding indicator\n * (Base UI Tabs). Track/pill/text read the segment contract (--a63-segment-*)\n * with muted-track / overlay-pill fallbacks so light mode keeps contrast. `tone`\n * mirrors the Toggle axis (neutral | accent).\n */\nexport function SegmentedControl({\n animateBackplate = true,\n className,\n defaultValue,\n fullWidth,\n items,\n onValueChange,\n size = segmentedControlContract.defaultSize,\n tabClassName,\n tone = segmentedControlContract.defaultTone,\n value,\n variant = segmentedControlContract.defaultVariant,\n ...props\n}: SegmentedControlProps): React.ReactElement {\n return (\n <Tabs.Root\n {...props}\n className={cn('a63-SegmentedControl', className)}\n data-backplate-animation={animateBackplate ? 'on' : 'off'}\n data-full={fullWidth || undefined}\n data-size={size}\n data-slot=\"segmented-control\"\n data-tone={tone}\n data-variant={variant}\n defaultValue={defaultValue}\n onValueChange={next => {\n if (typeof next === 'string' && next !== value) {\n onValueChange?.(next)\n }\n }}\n value={value}\n >\n <Tabs.List className=\"a63-SegmentedControl-track\" data-slot=\"segmented-control-track\">\n {items.map(item => (\n <Tabs.Tab\n aria-label={item.label}\n className={cn('a63-SegmentedControl-item', tabClassName)}\n data-slot=\"segmented-control-item\"\n disabled={item.disabled}\n key={item.value}\n title={item.label}\n value={item.value}\n >\n {variant === 'icon' ? (\n <span className=\"a63-SegmentedControl-icon\" data-slot=\"segmented-control-icon\">\n {item.icon ?? item.label}\n </span>\n ) : (\n <>\n {item.icon ? (\n <span className=\"a63-SegmentedControl-icon\" data-slot=\"segmented-control-icon\">\n {item.icon}\n </span>\n ) : null}\n <span className=\"a63-SegmentedControl-label\" data-slot=\"segmented-control-label\">\n {item.label}\n </span>\n </>\n )}\n </Tabs.Tab>\n ))}\n <Tabs.Indicator\n className=\"a63-SegmentedControl-indicator\"\n data-backplate-animation={animateBackplate ? 'on' : 'off'}\n data-slot=\"segmented-control-indicator\"\n />\n </Tabs.List>\n </Tabs.Root>\n )\n}\n"]}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { usePortalContainer } from './chunk-WKORZULQ.js';
|
|
2
|
+
import { cn } from './chunk-AJLHJRK6.js';
|
|
3
|
+
import { Drawer as Drawer$1 } from '@base-ui/react/drawer';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { isValidElement, cloneElement } from 'react';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var DrawerContext = React.createContext({
|
|
9
|
+
direction: "bottom",
|
|
10
|
+
modal: true
|
|
11
|
+
});
|
|
12
|
+
function composeDrawerSlot(render, children) {
|
|
13
|
+
if (render && children && isValidElement(render)) {
|
|
14
|
+
return cloneElement(render, void 0, children);
|
|
15
|
+
}
|
|
16
|
+
return render ?? children;
|
|
17
|
+
}
|
|
18
|
+
function resolveTriggerRender(asChild, render, children) {
|
|
19
|
+
if (render) {
|
|
20
|
+
const composedRender = composeDrawerSlot(render, children);
|
|
21
|
+
return {
|
|
22
|
+
render: isValidElement(composedRender) ? composedRender : render,
|
|
23
|
+
children: void 0
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
if (asChild && isValidElement(children)) {
|
|
27
|
+
return { render: children, children: void 0 };
|
|
28
|
+
}
|
|
29
|
+
return { render: void 0, children };
|
|
30
|
+
}
|
|
31
|
+
function swipeDirectionForDirection(direction) {
|
|
32
|
+
switch (direction) {
|
|
33
|
+
case "top":
|
|
34
|
+
return "up";
|
|
35
|
+
case "bottom":
|
|
36
|
+
return "down";
|
|
37
|
+
case "left":
|
|
38
|
+
return "left";
|
|
39
|
+
case "right":
|
|
40
|
+
return "right";
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function Drawer({
|
|
44
|
+
direction = "bottom",
|
|
45
|
+
swipeDirection,
|
|
46
|
+
children,
|
|
47
|
+
...props
|
|
48
|
+
}) {
|
|
49
|
+
return /* @__PURE__ */ jsx(DrawerContext.Provider, { value: { direction, modal: props.modal !== false }, children: /* @__PURE__ */ jsx(
|
|
50
|
+
Drawer$1.Root,
|
|
51
|
+
{
|
|
52
|
+
"data-slot": "drawer",
|
|
53
|
+
swipeDirection: swipeDirection ?? swipeDirectionForDirection(direction),
|
|
54
|
+
...props,
|
|
55
|
+
children
|
|
56
|
+
}
|
|
57
|
+
) });
|
|
58
|
+
}
|
|
59
|
+
function DrawerTrigger({
|
|
60
|
+
asChild,
|
|
61
|
+
render,
|
|
62
|
+
children,
|
|
63
|
+
...props
|
|
64
|
+
}) {
|
|
65
|
+
const slot = resolveTriggerRender(asChild, render, children);
|
|
66
|
+
return /* @__PURE__ */ jsx(Drawer$1.Trigger, { "data-slot": "drawer-trigger", render: slot.render, ...props, children: slot.children });
|
|
67
|
+
}
|
|
68
|
+
function DrawerPortal(props) {
|
|
69
|
+
const { container, ...portalProps } = props;
|
|
70
|
+
const contextPortalContainer = usePortalContainer();
|
|
71
|
+
return /* @__PURE__ */ jsx(
|
|
72
|
+
Drawer$1.Portal,
|
|
73
|
+
{
|
|
74
|
+
container: container ?? contextPortalContainer,
|
|
75
|
+
"data-slot": "drawer-portal",
|
|
76
|
+
...portalProps
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
function DrawerClose({
|
|
81
|
+
asChild,
|
|
82
|
+
render,
|
|
83
|
+
children,
|
|
84
|
+
...props
|
|
85
|
+
}) {
|
|
86
|
+
const slot = resolveTriggerRender(asChild, render, children);
|
|
87
|
+
return /* @__PURE__ */ jsx(Drawer$1.Close, { "data-slot": "drawer-close", render: slot.render, ...props, children: slot.children });
|
|
88
|
+
}
|
|
89
|
+
function DrawerOverlay({
|
|
90
|
+
className,
|
|
91
|
+
...props
|
|
92
|
+
}) {
|
|
93
|
+
return /* @__PURE__ */ jsx(
|
|
94
|
+
Drawer$1.Backdrop,
|
|
95
|
+
{
|
|
96
|
+
className: cn("a63-Drawer-overlay", className),
|
|
97
|
+
"data-slot": "drawer-overlay",
|
|
98
|
+
...props
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
function DrawerContent({
|
|
103
|
+
className,
|
|
104
|
+
children,
|
|
105
|
+
contentProps,
|
|
106
|
+
portalProps,
|
|
107
|
+
viewportProps,
|
|
108
|
+
...props
|
|
109
|
+
}) {
|
|
110
|
+
const { direction, modal } = React.useContext(DrawerContext);
|
|
111
|
+
return /* @__PURE__ */ jsxs(DrawerPortal, { ...portalProps, children: [
|
|
112
|
+
modal ? /* @__PURE__ */ jsx(DrawerOverlay, {}) : null,
|
|
113
|
+
/* @__PURE__ */ jsx(
|
|
114
|
+
Drawer$1.Viewport,
|
|
115
|
+
{
|
|
116
|
+
...viewportProps,
|
|
117
|
+
className: cn("a63-Drawer-viewport", viewportProps?.className),
|
|
118
|
+
"data-modal": modal ? void 0 : "false",
|
|
119
|
+
"data-side": direction,
|
|
120
|
+
"data-slot": "drawer-viewport",
|
|
121
|
+
children: /* @__PURE__ */ jsx(
|
|
122
|
+
Drawer$1.Popup,
|
|
123
|
+
{
|
|
124
|
+
className: cn("a63-Drawer-content", className),
|
|
125
|
+
"data-side": direction,
|
|
126
|
+
"data-slot": "drawer-content",
|
|
127
|
+
...props,
|
|
128
|
+
children: /* @__PURE__ */ jsxs(
|
|
129
|
+
Drawer$1.Content,
|
|
130
|
+
{
|
|
131
|
+
...contentProps,
|
|
132
|
+
className: cn("a63-Drawer-contentInner", contentProps?.className),
|
|
133
|
+
"data-slot": "drawer-content-inner",
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ jsx(DrawerHandle, {}),
|
|
136
|
+
children
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
)
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
] });
|
|
145
|
+
}
|
|
146
|
+
function DrawerHandle({
|
|
147
|
+
className,
|
|
148
|
+
...props
|
|
149
|
+
}) {
|
|
150
|
+
return /* @__PURE__ */ jsx("div", { className: cn("a63-Drawer-handle", className), "data-slot": "drawer-handle", ...props });
|
|
151
|
+
}
|
|
152
|
+
function DrawerHeader({
|
|
153
|
+
className,
|
|
154
|
+
...props
|
|
155
|
+
}) {
|
|
156
|
+
return /* @__PURE__ */ jsx("div", { className: cn("a63-Drawer-header", className), "data-slot": "drawer-header", ...props });
|
|
157
|
+
}
|
|
158
|
+
function DrawerFooter({
|
|
159
|
+
className,
|
|
160
|
+
variant = "default",
|
|
161
|
+
...props
|
|
162
|
+
}) {
|
|
163
|
+
return /* @__PURE__ */ jsx(
|
|
164
|
+
"div",
|
|
165
|
+
{
|
|
166
|
+
className: cn("a63-Drawer-footer", className),
|
|
167
|
+
"data-slot": "drawer-footer",
|
|
168
|
+
"data-variant": variant,
|
|
169
|
+
...props
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
function DrawerBody({
|
|
174
|
+
className,
|
|
175
|
+
...props
|
|
176
|
+
}) {
|
|
177
|
+
return /* @__PURE__ */ jsx("div", { className: cn("a63-Drawer-body", className), "data-slot": "drawer-body", ...props });
|
|
178
|
+
}
|
|
179
|
+
function DrawerTitle({
|
|
180
|
+
className,
|
|
181
|
+
...props
|
|
182
|
+
}) {
|
|
183
|
+
return /* @__PURE__ */ jsx(
|
|
184
|
+
Drawer$1.Title,
|
|
185
|
+
{
|
|
186
|
+
className: cn("a63-Drawer-title", className),
|
|
187
|
+
"data-slot": "drawer-title",
|
|
188
|
+
...props
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
function DrawerDescription({
|
|
193
|
+
className,
|
|
194
|
+
...props
|
|
195
|
+
}) {
|
|
196
|
+
return /* @__PURE__ */ jsx(
|
|
197
|
+
Drawer$1.Description,
|
|
198
|
+
{
|
|
199
|
+
className: cn("a63-Drawer-description", className),
|
|
200
|
+
"data-slot": "drawer-description",
|
|
201
|
+
...props
|
|
202
|
+
}
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export { Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHandle, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
|
|
207
|
+
//# sourceMappingURL=chunk-TAXYD4I4.js.map
|
|
208
|
+
//# sourceMappingURL=chunk-TAXYD4I4.js.map
|