@kushagradhawan/kookie-ui 0.3.21 → 0.3.23
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/components.css +264 -329
- package/dist/cjs/components/_internal/base-button.d.ts.map +1 -1
- package/dist/cjs/components/_internal/base-button.js +1 -1
- package/dist/cjs/components/_internal/base-button.js.map +4 -4
- package/dist/cjs/components/_internal/dropdown-menu-drill-down.js +1 -1
- package/dist/cjs/components/_internal/dropdown-menu-drill-down.js.map +3 -3
- package/dist/cjs/components/_internal/shell-bottom.js +1 -1
- package/dist/cjs/components/_internal/shell-bottom.js.map +4 -4
- package/dist/cjs/components/_internal/shell-handles.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-handles.js +1 -1
- package/dist/cjs/components/_internal/shell-handles.js.map +3 -3
- package/dist/cjs/components/_internal/shell-inspector.js +1 -1
- package/dist/cjs/components/_internal/shell-inspector.js.map +4 -4
- package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js.map +4 -4
- package/dist/cjs/components/accordion.d.ts.map +1 -1
- package/dist/cjs/components/accordion.js +1 -1
- package/dist/cjs/components/accordion.js.map +4 -4
- package/dist/cjs/components/alert-dialog.d.ts.map +1 -1
- package/dist/cjs/components/alert-dialog.js +1 -1
- package/dist/cjs/components/alert-dialog.js.map +4 -4
- package/dist/cjs/components/avatar.js +1 -1
- package/dist/cjs/components/avatar.js.map +4 -4
- package/dist/cjs/components/badge.d.ts.map +1 -1
- package/dist/cjs/components/badge.js +1 -1
- package/dist/cjs/components/badge.js.map +4 -4
- package/dist/cjs/components/blockquote.js +1 -1
- package/dist/cjs/components/blockquote.js.map +4 -4
- package/dist/cjs/components/box.js +1 -1
- package/dist/cjs/components/box.js.map +4 -4
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +4 -4
- package/dist/cjs/components/callout.js +1 -1
- package/dist/cjs/components/callout.js.map +4 -4
- package/dist/cjs/components/card.js +1 -1
- package/dist/cjs/components/card.js.map +4 -4
- package/dist/cjs/components/chatbar.js +2 -2
- package/dist/cjs/components/chatbar.js.map +4 -4
- package/dist/cjs/components/checkbox-cards.js +1 -1
- package/dist/cjs/components/checkbox-cards.js.map +4 -4
- package/dist/cjs/components/checkbox-group.js +1 -1
- package/dist/cjs/components/checkbox-group.js.map +4 -4
- package/dist/cjs/components/checkbox.js +1 -1
- package/dist/cjs/components/checkbox.js.map +4 -4
- package/dist/cjs/components/code.js +1 -1
- package/dist/cjs/components/code.js.map +4 -4
- package/dist/cjs/components/combobox.js +1 -1
- package/dist/cjs/components/combobox.js.map +4 -4
- package/dist/cjs/components/container.js +1 -1
- package/dist/cjs/components/container.js.map +4 -4
- package/dist/cjs/components/context-menu.d.ts.map +1 -1
- package/dist/cjs/components/context-menu.js +1 -1
- package/dist/cjs/components/context-menu.js.map +4 -4
- package/dist/cjs/components/data-list.js +1 -1
- package/dist/cjs/components/data-list.js.map +4 -4
- package/dist/cjs/components/dialog.d.ts.map +1 -1
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +4 -4
- package/dist/cjs/components/dropdown-menu.d.ts.map +1 -1
- package/dist/cjs/components/dropdown-menu.js +1 -1
- package/dist/cjs/components/dropdown-menu.js.map +4 -4
- package/dist/cjs/components/em.js +1 -1
- package/dist/cjs/components/em.js.map +4 -4
- package/dist/cjs/components/flex.js +1 -1
- package/dist/cjs/components/flex.js.map +4 -4
- package/dist/cjs/components/grid.js +1 -1
- package/dist/cjs/components/grid.js.map +4 -4
- package/dist/cjs/components/heading.js +1 -1
- package/dist/cjs/components/heading.js.map +4 -4
- package/dist/cjs/components/hover-card.js +1 -1
- package/dist/cjs/components/hover-card.js.map +4 -4
- package/dist/cjs/components/icon-button.js +2 -2
- package/dist/cjs/components/icon-button.js.map +4 -4
- package/dist/cjs/components/image.js +1 -1
- package/dist/cjs/components/image.js.map +4 -4
- package/dist/cjs/components/index.js +5 -5
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/components/inset.js +1 -1
- package/dist/cjs/components/inset.js.map +4 -4
- package/dist/cjs/components/kbd.js +1 -1
- package/dist/cjs/components/kbd.js.map +4 -4
- package/dist/cjs/components/link.js +1 -1
- package/dist/cjs/components/link.js.map +4 -4
- package/dist/cjs/components/navbar.js +1 -1
- package/dist/cjs/components/navbar.js.map +4 -4
- package/dist/cjs/components/popover.js +1 -1
- package/dist/cjs/components/popover.js.map +4 -4
- package/dist/cjs/components/progress.js +1 -1
- package/dist/cjs/components/progress.js.map +4 -4
- package/dist/cjs/components/quote.js +1 -1
- package/dist/cjs/components/quote.js.map +4 -4
- package/dist/cjs/components/radio-cards.js +1 -1
- package/dist/cjs/components/radio-cards.js.map +4 -4
- package/dist/cjs/components/radio-group.js +1 -1
- package/dist/cjs/components/radio-group.js.map +4 -4
- package/dist/cjs/components/radio.js +1 -1
- package/dist/cjs/components/radio.js.map +4 -4
- package/dist/cjs/components/schemas/base-button.schema.d.ts +2 -2
- package/dist/cjs/components/schemas/button.schema.d.ts +2 -2
- package/dist/cjs/components/schemas/icon-button.schema.d.ts +4 -4
- package/dist/cjs/components/schemas/shell.schema.d.ts +2 -2
- package/dist/cjs/components/schemas/toggle-button.schema.d.ts +6 -6
- package/dist/cjs/components/schemas/toggle-icon-button.schema.d.ts +8 -8
- package/dist/cjs/components/scroll-area.js +1 -1
- package/dist/cjs/components/scroll-area.js.map +4 -4
- package/dist/cjs/components/section.js +1 -1
- package/dist/cjs/components/section.js.map +4 -4
- package/dist/cjs/components/segmented-control.js +1 -1
- package/dist/cjs/components/segmented-control.js.map +4 -4
- package/dist/cjs/components/select.js +1 -1
- package/dist/cjs/components/select.js.map +4 -4
- package/dist/cjs/components/separator.js +1 -1
- package/dist/cjs/components/separator.js.map +4 -4
- package/dist/cjs/components/sheet.d.ts.map +1 -1
- package/dist/cjs/components/sheet.js +1 -1
- package/dist/cjs/components/sheet.js.map +4 -4
- package/dist/cjs/components/shell.d.ts.map +1 -1
- package/dist/cjs/components/shell.js +1 -1
- package/dist/cjs/components/shell.js.map +4 -4
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +4 -4
- package/dist/cjs/components/skeleton.js +1 -1
- package/dist/cjs/components/skeleton.js.map +4 -4
- package/dist/cjs/components/slider.js +1 -1
- package/dist/cjs/components/slider.js.map +4 -4
- package/dist/cjs/components/spinner.js +1 -1
- package/dist/cjs/components/spinner.js.map +4 -4
- package/dist/cjs/components/strong.js +1 -1
- package/dist/cjs/components/strong.js.map +4 -4
- package/dist/cjs/components/switch.js +1 -1
- package/dist/cjs/components/switch.js.map +4 -4
- package/dist/cjs/components/tab-nav.js +1 -1
- package/dist/cjs/components/tab-nav.js.map +4 -4
- package/dist/cjs/components/table.js +1 -1
- package/dist/cjs/components/table.js.map +4 -4
- package/dist/cjs/components/tabs.js +1 -1
- package/dist/cjs/components/tabs.js.map +4 -4
- package/dist/cjs/components/text-area.js +1 -1
- package/dist/cjs/components/text-area.js.map +4 -4
- package/dist/cjs/components/text-field.js +2 -2
- package/dist/cjs/components/text-field.js.map +4 -4
- package/dist/cjs/components/text.js +1 -1
- package/dist/cjs/components/text.js.map +4 -4
- package/dist/cjs/components/theme-panel.js +3 -3
- package/dist/cjs/components/theme-panel.js.map +4 -4
- package/dist/cjs/components/theme.d.ts.map +1 -1
- package/dist/cjs/components/theme.js +1 -1
- package/dist/cjs/components/theme.js.map +4 -4
- package/dist/cjs/components/toggle-button.js +2 -2
- package/dist/cjs/components/toggle-button.js.map +4 -4
- package/dist/cjs/components/toggle-icon-button.js +3 -3
- package/dist/cjs/components/toggle-icon-button.js.map +4 -4
- package/dist/cjs/components/toolbar.js +1 -1
- package/dist/cjs/components/toolbar.js.map +4 -4
- package/dist/cjs/components/tooltip.js +1 -1
- package/dist/cjs/components/tooltip.js.map +4 -4
- package/dist/cjs/components/user-card.js +1 -1
- package/dist/cjs/components/user-card.js.map +4 -4
- package/dist/cjs/helpers/compile-prop-defs.d.ts +49 -0
- package/dist/cjs/helpers/compile-prop-defs.d.ts.map +1 -0
- package/dist/cjs/helpers/compile-prop-defs.js +2 -0
- package/dist/cjs/helpers/compile-prop-defs.js.map +7 -0
- package/dist/cjs/helpers/extract-props.d.ts.map +1 -1
- package/dist/cjs/helpers/extract-props.js +1 -1
- package/dist/cjs/helpers/extract-props.js.map +4 -4
- package/dist/cjs/helpers/get-margin-styles.d.ts.map +1 -1
- package/dist/cjs/helpers/get-margin-styles.js +1 -1
- package/dist/cjs/helpers/get-margin-styles.js.map +3 -3
- package/dist/cjs/helpers/get-responsive-styles.d.ts +5 -2
- package/dist/cjs/helpers/get-responsive-styles.d.ts.map +1 -1
- package/dist/cjs/helpers/get-responsive-styles.js +1 -1
- package/dist/cjs/helpers/get-responsive-styles.js.map +3 -3
- package/dist/cjs/helpers/index.js +2 -2
- package/dist/cjs/helpers/index.js.map +4 -4
- package/dist/cjs/helpers/use-deprecation-warning.d.ts +10 -0
- package/dist/cjs/helpers/use-deprecation-warning.d.ts.map +1 -0
- package/dist/cjs/helpers/use-deprecation-warning.js +2 -0
- package/dist/cjs/helpers/use-deprecation-warning.js.map +7 -0
- package/dist/cjs/hooks/index.js +2 -2
- package/dist/cjs/hooks/index.js.map +3 -3
- package/dist/cjs/hooks/use-body-pointer-events-cleanup.d.ts.map +1 -1
- package/dist/cjs/hooks/use-body-pointer-events-cleanup.js +1 -1
- package/dist/cjs/hooks/use-body-pointer-events-cleanup.js.map +3 -3
- package/dist/cjs/hooks/use-breakpoint.d.ts +7 -3
- package/dist/cjs/hooks/use-breakpoint.d.ts.map +1 -1
- package/dist/cjs/hooks/use-breakpoint.js +1 -1
- package/dist/cjs/hooks/use-breakpoint.js.map +3 -3
- package/dist/cjs/hooks/use-prop-synced-state.d.ts +14 -0
- package/dist/cjs/hooks/use-prop-synced-state.d.ts.map +1 -0
- package/dist/cjs/hooks/use-prop-synced-state.js +2 -0
- package/dist/cjs/hooks/use-prop-synced-state.js.map +7 -0
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/{chunk-RQ2ZPMHJ.js → chunk-22HGLMPQ.js} +2 -2
- package/dist/esm/{chunk-WYA4IRU6.js → chunk-25WZA7ZU.js} +2 -2
- package/dist/esm/chunk-2UPAYDKR.js +2 -0
- package/dist/esm/chunk-2UPAYDKR.js.map +7 -0
- package/dist/esm/{chunk-XHQGMOXV.js → chunk-36ZQVP7F.js} +2 -2
- package/dist/esm/{chunk-K3R4AH3E.js → chunk-3MWWP4MW.js} +2 -2
- package/dist/esm/{chunk-HQ35PM4O.js → chunk-43A5GUSI.js} +2 -2
- package/dist/esm/{chunk-Z5DQ6FSA.js → chunk-4AQTUBVP.js} +2 -2
- package/dist/esm/{chunk-25U7DENY.js → chunk-4BBOHEF4.js} +2 -2
- package/dist/esm/chunk-4CKDU6FY.js +2 -0
- package/dist/esm/chunk-4CKDU6FY.js.map +7 -0
- package/dist/esm/{chunk-ZSEFZM5H.js → chunk-4IY2PR6N.js} +2 -2
- package/dist/esm/{chunk-QLIELX4I.js → chunk-4ME6O27S.js} +2 -2
- package/dist/esm/chunk-4XJY6FIK.js +2 -0
- package/dist/esm/chunk-4XJY6FIK.js.map +7 -0
- package/dist/esm/{chunk-JQOFJNCV.js → chunk-4YFJWXL2.js} +2 -2
- package/dist/esm/{chunk-DNI4QRXQ.js → chunk-5IBGFL6O.js} +2 -2
- package/dist/esm/chunk-5TXQLK4G.js +2 -0
- package/dist/esm/chunk-5TXQLK4G.js.map +7 -0
- package/dist/esm/{chunk-IPJUHVM6.js → chunk-666GX7O5.js} +2 -2
- package/dist/esm/chunk-6FLLFCBU.js +2 -0
- package/dist/esm/chunk-6FLLFCBU.js.map +7 -0
- package/dist/esm/{chunk-DJBPM5QK.js → chunk-7FC7HF76.js} +2 -2
- package/dist/esm/{chunk-SVLY6B5F.js → chunk-7QDTSBJF.js} +2 -2
- package/dist/esm/chunk-AX5S56DS.js +2 -0
- package/dist/esm/chunk-AX5S56DS.js.map +7 -0
- package/dist/esm/{chunk-DK5MHD6I.js → chunk-B24BDVG2.js} +2 -2
- package/dist/esm/{chunk-WZCZHCVE.js → chunk-BJYUPIXO.js} +2 -2
- package/dist/esm/{chunk-BJTJUIYJ.js → chunk-CRWYCLTE.js} +2 -2
- package/dist/esm/{chunk-OHJVFZMH.js → chunk-CSKZZOI2.js} +2 -2
- package/dist/esm/chunk-D5N627TH.js +2 -0
- package/dist/esm/chunk-D5N627TH.js.map +7 -0
- package/dist/esm/{chunk-ADYTQCZX.js → chunk-D6B7IMZU.js} +2 -2
- package/dist/esm/chunk-DL2O3GKG.js +2 -0
- package/dist/esm/chunk-DL2O3GKG.js.map +7 -0
- package/dist/esm/{chunk-USGTBZ43.js → chunk-E67CIG6A.js} +2 -2
- package/dist/esm/{chunk-42HFGCHX.js → chunk-ETMLMDW4.js} +2 -2
- package/dist/esm/{chunk-7CBAHIVG.js → chunk-F2HYQ3ZR.js} +2 -2
- package/dist/esm/{chunk-YUZPSUJE.js → chunk-F7IYL2VW.js} +2 -2
- package/dist/esm/{chunk-FVCWNSRU.js → chunk-FHOCUZDR.js} +2 -2
- package/dist/esm/{chunk-7MURQ6CR.js → chunk-FLFAXVFB.js} +2 -2
- package/dist/esm/{chunk-APRBRAOT.js → chunk-FOEZLQTW.js} +2 -2
- package/dist/esm/{chunk-WNSPLWRV.js → chunk-GJSGKE7B.js} +2 -2
- package/dist/esm/{chunk-OGOOZLUD.js → chunk-GLERJXVS.js} +2 -2
- package/dist/esm/{chunk-6VGPTAHM.js → chunk-GWXVETMF.js} +2 -2
- package/dist/esm/{chunk-ES7MK2MM.js → chunk-GYBLXQ4R.js} +2 -2
- package/dist/esm/{chunk-4OBMRJHC.js → chunk-H7ST535H.js} +2 -2
- package/dist/esm/{chunk-QLZ5XAW6.js → chunk-HF5WY5YE.js} +2 -2
- package/dist/esm/chunk-ICIGZ3N7.js +2 -0
- package/dist/esm/chunk-ICIGZ3N7.js.map +7 -0
- package/dist/esm/{chunk-RDP4UQ42.js → chunk-IEWCQU2S.js} +2 -2
- package/dist/esm/{chunk-XLOHPURR.js → chunk-IHK3H2OM.js} +2 -2
- package/dist/esm/{chunk-3F6I7YOR.js → chunk-JDGJSNWT.js} +2 -2
- package/dist/esm/chunk-JQQIPEGY.js +2 -0
- package/dist/esm/chunk-JQQIPEGY.js.map +7 -0
- package/dist/esm/chunk-JR2YOGII.js +2 -0
- package/dist/esm/chunk-JR2YOGII.js.map +7 -0
- package/dist/esm/chunk-JUY7CBSL.js +2 -0
- package/dist/esm/chunk-JUY7CBSL.js.map +7 -0
- package/dist/esm/{chunk-VF5TRT3H.js → chunk-KKM6T5P7.js} +2 -2
- package/dist/esm/{chunk-ZHYOJNWV.js → chunk-LKAK5GXF.js} +2 -2
- package/dist/esm/chunk-LOGJJF4I.js +2 -0
- package/dist/esm/chunk-LOGJJF4I.js.map +7 -0
- package/dist/esm/{chunk-JCYI4NTV.js → chunk-MBCBP73P.js} +2 -2
- package/dist/esm/{chunk-UYNYUR7O.js → chunk-MBE2YSBU.js} +2 -2
- package/dist/esm/chunk-MHANZINI.js +2 -0
- package/dist/esm/chunk-MHANZINI.js.map +7 -0
- package/dist/esm/chunk-MRECKC4D.js +2 -0
- package/dist/esm/chunk-MRECKC4D.js.map +7 -0
- package/dist/esm/{chunk-H2G446JG.js → chunk-NMKPFUNP.js} +2 -2
- package/dist/esm/{chunk-4N5JU7XQ.js → chunk-O3CDWEZA.js} +2 -2
- package/dist/esm/{chunk-TEULZKBM.js → chunk-OGXZHAQL.js} +2 -2
- package/dist/esm/{chunk-2AEELIG6.js → chunk-OWAUCLRT.js} +2 -2
- package/dist/esm/{chunk-7CXVHFMQ.js → chunk-P7HYVJSU.js} +2 -2
- package/dist/esm/{chunk-4532RT2B.js → chunk-P7IAHW4V.js} +2 -2
- package/dist/esm/{chunk-M3ZYJANH.js → chunk-PQZXQ4ST.js} +2 -2
- package/dist/esm/{chunk-SGU4HUHF.js → chunk-PTLFMWCN.js} +2 -2
- package/dist/esm/chunk-S2HA3W3V.js +2 -0
- package/dist/esm/chunk-S2HA3W3V.js.map +7 -0
- package/dist/esm/{chunk-E6IWYD3U.js → chunk-S5C5YRBS.js} +2 -2
- package/dist/esm/{chunk-A24PYRVV.js → chunk-SO67YEVQ.js} +2 -2
- package/dist/esm/chunk-TLWTUKKL.js +2 -0
- package/dist/esm/chunk-TLWTUKKL.js.map +7 -0
- package/dist/esm/{chunk-HACQF6F4.js → chunk-TOOSHJOA.js} +2 -2
- package/dist/esm/{chunk-QOWA5LK5.js → chunk-U2X2CAW4.js} +2 -2
- package/dist/esm/{chunk-U7AASKZI.js → chunk-UVCH7QKO.js} +2 -2
- package/dist/esm/{chunk-GWYFT3EI.js → chunk-VLO7NXSP.js} +2 -2
- package/dist/esm/{chunk-DXI5P5O4.js → chunk-VX6ARMWP.js} +2 -2
- package/dist/esm/chunk-WAURCNAS.js +2 -0
- package/dist/esm/chunk-WAURCNAS.js.map +7 -0
- package/dist/esm/{chunk-EJWAAFCI.js → chunk-WO43WW3A.js} +2 -2
- package/dist/esm/{chunk-GLC4QJBF.js → chunk-WTYNFBFV.js} +2 -2
- package/dist/esm/{chunk-6FAICIYS.js → chunk-XMRIRFM7.js} +2 -2
- package/dist/esm/chunk-YV2KYHGR.js +2 -0
- package/dist/esm/chunk-YV2KYHGR.js.map +7 -0
- package/dist/esm/{chunk-UIEUZLZZ.js → chunk-ZY6SQWHT.js} +2 -2
- package/dist/esm/components/_internal/base-button.d.ts.map +1 -1
- package/dist/esm/components/_internal/base-button.js +1 -1
- package/dist/esm/components/_internal/dropdown-menu-drill-down.js +1 -1
- package/dist/esm/components/_internal/shell-bottom.js +1 -1
- package/dist/esm/components/_internal/shell-handles.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-handles.js +1 -1
- package/dist/esm/components/_internal/shell-inspector.js +1 -1
- package/dist/esm/components/_internal/shell-sidebar.js +1 -1
- package/dist/esm/components/accordion.d.ts.map +1 -1
- package/dist/esm/components/accordion.js +1 -1
- package/dist/esm/components/alert-dialog.d.ts.map +1 -1
- package/dist/esm/components/alert-dialog.js +1 -1
- package/dist/esm/components/avatar.js +1 -1
- package/dist/esm/components/badge.d.ts.map +1 -1
- package/dist/esm/components/badge.js +1 -1
- package/dist/esm/components/blockquote.js +1 -1
- package/dist/esm/components/box.js +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/callout.js +1 -1
- package/dist/esm/components/card.js +1 -1
- package/dist/esm/components/chatbar.js +1 -1
- package/dist/esm/components/checkbox-cards.js +1 -1
- package/dist/esm/components/checkbox-group.js +1 -1
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/code.js +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/container.js +1 -1
- package/dist/esm/components/context-menu.d.ts.map +1 -1
- package/dist/esm/components/context-menu.js +1 -1
- package/dist/esm/components/data-list.js +1 -1
- package/dist/esm/components/dialog.d.ts.map +1 -1
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dropdown-menu.d.ts.map +1 -1
- package/dist/esm/components/dropdown-menu.js +1 -1
- package/dist/esm/components/em.js +1 -1
- package/dist/esm/components/flex.js +1 -1
- package/dist/esm/components/grid.js +1 -1
- package/dist/esm/components/heading.js +1 -1
- package/dist/esm/components/hover-card.js +1 -1
- package/dist/esm/components/icon-button.js +1 -1
- package/dist/esm/components/image.js +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/inset.js +1 -1
- package/dist/esm/components/kbd.js +1 -1
- package/dist/esm/components/link.js +1 -1
- package/dist/esm/components/navbar.js +1 -1
- package/dist/esm/components/popover.js +1 -1
- package/dist/esm/components/progress.js +1 -1
- package/dist/esm/components/quote.js +1 -1
- package/dist/esm/components/radio-cards.js +1 -1
- package/dist/esm/components/radio-group.js +1 -1
- package/dist/esm/components/radio.js +1 -1
- package/dist/esm/components/schemas/base-button.schema.d.ts +2 -2
- package/dist/esm/components/schemas/button.schema.d.ts +2 -2
- package/dist/esm/components/schemas/icon-button.schema.d.ts +4 -4
- package/dist/esm/components/schemas/shell.schema.d.ts +2 -2
- package/dist/esm/components/schemas/toggle-button.schema.d.ts +6 -6
- package/dist/esm/components/schemas/toggle-icon-button.schema.d.ts +8 -8
- package/dist/esm/components/scroll-area.js +1 -1
- package/dist/esm/components/section.js +1 -1
- package/dist/esm/components/segmented-control.js +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/separator.js +1 -1
- package/dist/esm/components/sheet.d.ts.map +1 -1
- package/dist/esm/components/sheet.js +1 -1
- package/dist/esm/components/shell.d.ts.map +1 -1
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/skeleton.js +1 -1
- package/dist/esm/components/slider.js +1 -1
- package/dist/esm/components/spinner.js +1 -1
- package/dist/esm/components/strong.js +1 -1
- package/dist/esm/components/switch.js +1 -1
- package/dist/esm/components/tab-nav.js +1 -1
- package/dist/esm/components/table.js +1 -1
- package/dist/esm/components/tabs.js +1 -1
- package/dist/esm/components/text-area.js +1 -1
- package/dist/esm/components/text-field.js +1 -1
- package/dist/esm/components/text.js +1 -1
- package/dist/esm/components/theme-panel.js +1 -1
- package/dist/esm/components/theme.d.ts.map +1 -1
- package/dist/esm/components/theme.js +1 -1
- package/dist/esm/components/toggle-button.js +1 -1
- package/dist/esm/components/toggle-icon-button.js +1 -1
- package/dist/esm/components/toolbar.js +1 -1
- package/dist/esm/components/tooltip.js +1 -1
- package/dist/esm/components/user-card.js +1 -1
- package/dist/esm/helpers/compile-prop-defs.d.ts +49 -0
- package/dist/esm/helpers/compile-prop-defs.d.ts.map +1 -0
- package/dist/esm/helpers/compile-prop-defs.js +2 -0
- package/dist/esm/helpers/compile-prop-defs.js.map +7 -0
- package/dist/esm/helpers/extract-props.d.ts.map +1 -1
- package/dist/esm/helpers/extract-props.js +1 -1
- package/dist/esm/helpers/get-margin-styles.d.ts.map +1 -1
- package/dist/esm/helpers/get-margin-styles.js +1 -1
- package/dist/esm/helpers/get-responsive-styles.d.ts +5 -2
- package/dist/esm/helpers/get-responsive-styles.d.ts.map +1 -1
- package/dist/esm/helpers/get-responsive-styles.js +1 -1
- package/dist/esm/helpers/index.js +1 -1
- package/dist/esm/helpers/use-deprecation-warning.d.ts +10 -0
- package/dist/esm/helpers/use-deprecation-warning.d.ts.map +1 -0
- package/dist/esm/helpers/use-deprecation-warning.js +2 -0
- package/dist/esm/helpers/use-deprecation-warning.js.map +7 -0
- package/dist/esm/hooks/index.js +1 -1
- package/dist/esm/hooks/use-body-pointer-events-cleanup.d.ts.map +1 -1
- package/dist/esm/hooks/use-body-pointer-events-cleanup.js +1 -1
- package/dist/esm/hooks/use-breakpoint.d.ts +7 -3
- package/dist/esm/hooks/use-breakpoint.d.ts.map +1 -1
- package/dist/esm/hooks/use-breakpoint.js +1 -1
- package/dist/esm/hooks/use-prop-synced-state.d.ts +14 -0
- package/dist/esm/hooks/use-prop-synced-state.d.ts.map +1 -0
- package/dist/esm/hooks/use-prop-synced-state.js +2 -0
- package/dist/esm/hooks/use-prop-synced-state.js.map +7 -0
- package/dist/esm/index.js +1 -1
- package/package.json +2 -1
- package/schemas/base-button.json +0 -1
- package/schemas/button.json +0 -1
- package/schemas/icon-button.json +0 -1
- package/schemas/index.json +0 -6
- package/schemas/toggle-button.json +0 -1
- package/schemas/toggle-icon-button.json +0 -1
- package/src/components/_internal/base-button.css +2 -2
- package/src/components/_internal/base-button.tsx +3 -58
- package/src/components/_internal/base-card.css +19 -4
- package/src/components/_internal/base-checkbox.css +2 -2
- package/src/components/_internal/base-dialog.css +7 -13
- package/src/components/_internal/base-menu.css +7 -0
- package/src/components/_internal/base-radio.css +2 -2
- package/src/components/_internal/base-sidebar.css +7 -0
- package/src/components/_internal/base-tab-list.css +2 -2
- package/src/components/_internal/shell-handles.tsx +27 -0
- package/src/components/accordion.css +6 -6
- package/src/components/accordion.tsx +2 -8
- package/src/components/alert-dialog.tsx +22 -20
- package/src/components/avatar.css +2 -2
- package/src/components/badge.css +2 -2
- package/src/components/badge.tsx +2 -8
- package/src/components/callout.css +2 -2
- package/src/components/chatbar.css +1 -1
- package/src/components/context-menu.tsx +2 -8
- package/src/components/dialog.tsx +46 -72
- package/src/components/dropdown-menu.tsx +2 -8
- package/src/components/popover.css +7 -0
- package/src/components/progress.css +21 -8
- package/src/components/segmented-control.css +2 -2
- package/src/components/select.css +9 -2
- package/src/components/sheet.tsx +31 -28
- package/src/components/shell.css +106 -69
- package/src/components/shell.tsx +168 -97
- package/src/components/slider.css +2 -2
- package/src/components/switch.css +2 -2
- package/src/components/table.css +7 -0
- package/src/components/text-area.css +2 -2
- package/src/components/text-field.css +2 -2
- package/src/components/theme.tsx +35 -34
- package/src/helpers/compile-prop-defs.ts +121 -0
- package/src/helpers/extract-props.ts +104 -83
- package/src/helpers/get-margin-styles.ts +38 -71
- package/src/helpers/get-responsive-styles.ts +37 -38
- package/src/helpers/use-deprecation-warning.ts +26 -0
- package/src/hooks/use-body-pointer-events-cleanup.ts +36 -6
- package/src/hooks/use-breakpoint.ts +94 -53
- package/src/hooks/use-prop-synced-state.ts +24 -0
- package/src/styles/tokens/blur.css +28 -0
- package/src/styles/tokens/color.css +3 -3
- package/src/styles/tokens/constants.css +11 -0
- package/styles.css +280 -332
- package/tokens/base.css +13 -3
- package/tokens.css +16 -3
- package/dist/esm/chunk-2SS3FA3N.js +0 -2
- package/dist/esm/chunk-2SS3FA3N.js.map +0 -7
- package/dist/esm/chunk-5U2Q23K3.js +0 -2
- package/dist/esm/chunk-5U2Q23K3.js.map +0 -7
- package/dist/esm/chunk-6ELPYR73.js +0 -2
- package/dist/esm/chunk-6ELPYR73.js.map +0 -7
- package/dist/esm/chunk-DZ4H2KTP.js +0 -2
- package/dist/esm/chunk-DZ4H2KTP.js.map +0 -7
- package/dist/esm/chunk-H4MMVAGQ.js +0 -2
- package/dist/esm/chunk-H4MMVAGQ.js.map +0 -7
- package/dist/esm/chunk-HURTSXRY.js +0 -2
- package/dist/esm/chunk-HURTSXRY.js.map +0 -7
- package/dist/esm/chunk-ITRVKLYU.js +0 -2
- package/dist/esm/chunk-ITRVKLYU.js.map +0 -7
- package/dist/esm/chunk-KCAFSCOV.js +0 -2
- package/dist/esm/chunk-KCAFSCOV.js.map +0 -7
- package/dist/esm/chunk-KMPBTEZH.js +0 -2
- package/dist/esm/chunk-KMPBTEZH.js.map +0 -7
- package/dist/esm/chunk-LN5SP46K.js +0 -2
- package/dist/esm/chunk-LN5SP46K.js.map +0 -7
- package/dist/esm/chunk-Q73Y5O5P.js +0 -2
- package/dist/esm/chunk-Q73Y5O5P.js.map +0 -7
- package/dist/esm/chunk-RMBS6CAO.js +0 -2
- package/dist/esm/chunk-RMBS6CAO.js.map +0 -7
- package/dist/esm/chunk-UUX42HBM.js +0 -2
- package/dist/esm/chunk-UUX42HBM.js.map +0 -7
- package/dist/esm/chunk-X7BD5FLE.js +0 -2
- package/dist/esm/chunk-X7BD5FLE.js.map +0 -7
- package/dist/esm/chunk-YEA646GM.js +0 -2
- package/dist/esm/chunk-YEA646GM.js.map +0 -7
- package/dist/esm/chunk-ZMEXIPWM.js +0 -2
- package/dist/esm/chunk-ZMEXIPWM.js.map +0 -7
- /package/dist/esm/{chunk-RQ2ZPMHJ.js.map → chunk-22HGLMPQ.js.map} +0 -0
- /package/dist/esm/{chunk-WYA4IRU6.js.map → chunk-25WZA7ZU.js.map} +0 -0
- /package/dist/esm/{chunk-XHQGMOXV.js.map → chunk-36ZQVP7F.js.map} +0 -0
- /package/dist/esm/{chunk-K3R4AH3E.js.map → chunk-3MWWP4MW.js.map} +0 -0
- /package/dist/esm/{chunk-HQ35PM4O.js.map → chunk-43A5GUSI.js.map} +0 -0
- /package/dist/esm/{chunk-Z5DQ6FSA.js.map → chunk-4AQTUBVP.js.map} +0 -0
- /package/dist/esm/{chunk-25U7DENY.js.map → chunk-4BBOHEF4.js.map} +0 -0
- /package/dist/esm/{chunk-ZSEFZM5H.js.map → chunk-4IY2PR6N.js.map} +0 -0
- /package/dist/esm/{chunk-QLIELX4I.js.map → chunk-4ME6O27S.js.map} +0 -0
- /package/dist/esm/{chunk-JQOFJNCV.js.map → chunk-4YFJWXL2.js.map} +0 -0
- /package/dist/esm/{chunk-DNI4QRXQ.js.map → chunk-5IBGFL6O.js.map} +0 -0
- /package/dist/esm/{chunk-IPJUHVM6.js.map → chunk-666GX7O5.js.map} +0 -0
- /package/dist/esm/{chunk-DJBPM5QK.js.map → chunk-7FC7HF76.js.map} +0 -0
- /package/dist/esm/{chunk-SVLY6B5F.js.map → chunk-7QDTSBJF.js.map} +0 -0
- /package/dist/esm/{chunk-DK5MHD6I.js.map → chunk-B24BDVG2.js.map} +0 -0
- /package/dist/esm/{chunk-WZCZHCVE.js.map → chunk-BJYUPIXO.js.map} +0 -0
- /package/dist/esm/{chunk-BJTJUIYJ.js.map → chunk-CRWYCLTE.js.map} +0 -0
- /package/dist/esm/{chunk-OHJVFZMH.js.map → chunk-CSKZZOI2.js.map} +0 -0
- /package/dist/esm/{chunk-ADYTQCZX.js.map → chunk-D6B7IMZU.js.map} +0 -0
- /package/dist/esm/{chunk-USGTBZ43.js.map → chunk-E67CIG6A.js.map} +0 -0
- /package/dist/esm/{chunk-42HFGCHX.js.map → chunk-ETMLMDW4.js.map} +0 -0
- /package/dist/esm/{chunk-7CBAHIVG.js.map → chunk-F2HYQ3ZR.js.map} +0 -0
- /package/dist/esm/{chunk-YUZPSUJE.js.map → chunk-F7IYL2VW.js.map} +0 -0
- /package/dist/esm/{chunk-FVCWNSRU.js.map → chunk-FHOCUZDR.js.map} +0 -0
- /package/dist/esm/{chunk-7MURQ6CR.js.map → chunk-FLFAXVFB.js.map} +0 -0
- /package/dist/esm/{chunk-APRBRAOT.js.map → chunk-FOEZLQTW.js.map} +0 -0
- /package/dist/esm/{chunk-WNSPLWRV.js.map → chunk-GJSGKE7B.js.map} +0 -0
- /package/dist/esm/{chunk-OGOOZLUD.js.map → chunk-GLERJXVS.js.map} +0 -0
- /package/dist/esm/{chunk-6VGPTAHM.js.map → chunk-GWXVETMF.js.map} +0 -0
- /package/dist/esm/{chunk-ES7MK2MM.js.map → chunk-GYBLXQ4R.js.map} +0 -0
- /package/dist/esm/{chunk-4OBMRJHC.js.map → chunk-H7ST535H.js.map} +0 -0
- /package/dist/esm/{chunk-QLZ5XAW6.js.map → chunk-HF5WY5YE.js.map} +0 -0
- /package/dist/esm/{chunk-RDP4UQ42.js.map → chunk-IEWCQU2S.js.map} +0 -0
- /package/dist/esm/{chunk-XLOHPURR.js.map → chunk-IHK3H2OM.js.map} +0 -0
- /package/dist/esm/{chunk-3F6I7YOR.js.map → chunk-JDGJSNWT.js.map} +0 -0
- /package/dist/esm/{chunk-VF5TRT3H.js.map → chunk-KKM6T5P7.js.map} +0 -0
- /package/dist/esm/{chunk-ZHYOJNWV.js.map → chunk-LKAK5GXF.js.map} +0 -0
- /package/dist/esm/{chunk-JCYI4NTV.js.map → chunk-MBCBP73P.js.map} +0 -0
- /package/dist/esm/{chunk-UYNYUR7O.js.map → chunk-MBE2YSBU.js.map} +0 -0
- /package/dist/esm/{chunk-H2G446JG.js.map → chunk-NMKPFUNP.js.map} +0 -0
- /package/dist/esm/{chunk-4N5JU7XQ.js.map → chunk-O3CDWEZA.js.map} +0 -0
- /package/dist/esm/{chunk-TEULZKBM.js.map → chunk-OGXZHAQL.js.map} +0 -0
- /package/dist/esm/{chunk-2AEELIG6.js.map → chunk-OWAUCLRT.js.map} +0 -0
- /package/dist/esm/{chunk-7CXVHFMQ.js.map → chunk-P7HYVJSU.js.map} +0 -0
- /package/dist/esm/{chunk-4532RT2B.js.map → chunk-P7IAHW4V.js.map} +0 -0
- /package/dist/esm/{chunk-M3ZYJANH.js.map → chunk-PQZXQ4ST.js.map} +0 -0
- /package/dist/esm/{chunk-SGU4HUHF.js.map → chunk-PTLFMWCN.js.map} +0 -0
- /package/dist/esm/{chunk-E6IWYD3U.js.map → chunk-S5C5YRBS.js.map} +0 -0
- /package/dist/esm/{chunk-A24PYRVV.js.map → chunk-SO67YEVQ.js.map} +0 -0
- /package/dist/esm/{chunk-HACQF6F4.js.map → chunk-TOOSHJOA.js.map} +0 -0
- /package/dist/esm/{chunk-QOWA5LK5.js.map → chunk-U2X2CAW4.js.map} +0 -0
- /package/dist/esm/{chunk-U7AASKZI.js.map → chunk-UVCH7QKO.js.map} +0 -0
- /package/dist/esm/{chunk-GWYFT3EI.js.map → chunk-VLO7NXSP.js.map} +0 -0
- /package/dist/esm/{chunk-DXI5P5O4.js.map → chunk-VX6ARMWP.js.map} +0 -0
- /package/dist/esm/{chunk-EJWAAFCI.js.map → chunk-WO43WW3A.js.map} +0 -0
- /package/dist/esm/{chunk-GLC4QJBF.js.map → chunk-WTYNFBFV.js.map} +0 -0
- /package/dist/esm/{chunk-6FAICIYS.js.map → chunk-XMRIRFM7.js.map} +0 -0
- /package/dist/esm/{chunk-UIEUZLZZ.js.map → chunk-ZY6SQWHT.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var X=Object.create;var
|
|
1
|
+
"use strict";var X=Object.create;var D=Object.defineProperty;var Z=Object.getOwnPropertyDescriptor;var ee=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,se=Object.prototype.hasOwnProperty;var oe=(t,e)=>{for(var s in e)D(t,s,{get:e[s],enumerable:!0})},j=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of ee(e))!se.call(t,p)&&p!==s&&D(t,p,{get:()=>e[p],enumerable:!(r=Z(e,p))||r.enumerable});return t};var R=(t,e,s)=>(s=t!=null?X(te(t)):{},j(e||!t||!t.__esModule?D(s,"default",{value:t,enumerable:!0}):s,t)),re=t=>j(D({},"__esModule",{value:!0}),t);var Ne={};oe(Ne,{Item:()=>_,Label:()=>J,Root:()=>Y,Value:()=>Q});module.exports=re(Ne);var g=R(require("classnames")),m=R(require("react"));var P=R(require("react")),B=require("radix-ui");var W=R(require("classnames"));var ne=[],pe=new Set;function ie(t){let e=Object.assign({},...t),s=[],r=[],p=new Set;for(let a in e){let n=e[a],f=n.values??ne,i={key:a,type:n.type,default:n.default,hasDefault:n.default!==void 0,responsive:"responsive"in n,className:n.className,customProperties:n.customProperties,parseValue:n.parseValue,values:f,valueSet:f.length>0?new Set(f):pe,enumValueSet:n.type==="enum"?new Set([n.default,...f]):void 0};n.className?(s.push(i),p.add(a)):(i.hasDefault||n.type==="enum")&&r.push(i)}return{styling:s,passthrough:r,stylingKeys:p}}var ae={children:new WeakMap};function k(t){let e=ae;for(let s=0;s<t.length;s++){let r=t[s],p=e.children.get(r);p===void 0&&(p={children:new WeakMap},e.children.set(r,p)),e=p}return e.compiled??(e.compiled=ie(t))}var fe=["initial","xs","sm","md","lg","xl"],N=new Set(fe);function S(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var le=new Set(["initial","xs","sm","md","lg","xl"]);function c(t){if(typeof t!="object"||t===null)return!1;for(let e in t)if(le.has(e))return!0;return!1}function v(t,e,s){return e!==void 0?e.has(s):t.includes(s)}function E({className:t,customProperties:e,...s}){let r=C({allowArbitraryValues:!0,className:t,...s}),p=me({customProperties:e,...s});return[r,p]}function C({allowArbitraryValues:t,value:e,className:s,propValues:r,propValueSet:p,parseValue:a=n=>n}){if(e){if(typeof e=="string")return v(r,p,e)?O(s,e,a):t?s:void 0;if(c(e)){let n=e,f=[];for(let i in n){if(!S(n,i)||!N.has(i))continue;let o=n[i];if(o!==void 0){if(v(r,p,o)){let l=O(s,o,a),u=i==="initial"?l:`${i}:${l}`;f.push(u)}else if(t){let l=i==="initial"?s:`${i}:${s}`;f.push(l)}}}return f.length>0?f.join(" "):""}if(t)return s}}function O(t,e,s){let r=t?"-":"",p=s(e),a=p?.startsWith("-"),n=a?"-":"",f=a?p?.substring(1):p;return`${n}${t}${r}${f}`}function me({customProperties:t,value:e,propValues:s,propValueSet:r,parseValue:p=a=>a}){if(!e||typeof e=="string"&&v(s,r,e))return;let a;if(typeof e=="string"){let n=p(e);a={};for(let f of t)a[f]=n;return a}if(c(e)){let n=e;for(let f in n){if(!S(n,f)||!N.has(f))continue;let i=n[f];if(i===void 0||v(s,r,i))continue;let o=p(i);a??(a={});for(let l of t){let u=f==="initial"?l:`${l}-${f}`;a[u]=o}}}return a??{}}function L(...t){let e;for(let s of t)s&&(e===void 0&&(e={}),Object.assign(e,s));return e}function ue(t,e){let s=t.initial,r=!1;return e.hasDefault&&s===void 0&&(s=e.default,r=!0),e.enumValueSet!==void 0&&!e.enumValueSet.has(s)&&(s=e.default,r=!0),r?{...t,initial:s}:t}function y(t,...e){let{styling:s,passthrough:r,stylingKeys:p}=k(e),a={};for(let i in t)p.has(i)||(a[i]=t[i]);for(let i=0;i<r.length;i++){let o=r[i],l=a[o.key];if(l===void 0){o.hasDefault&&(a[o.key]=o.default);continue}o.enumValueSet!==void 0&&!o.enumValueSet.has(l)&&!c(l)&&(a[o.key]=o.default)}let n,f=[];for(let i=0;i<s.length;i++){let o=s[i],l=t[o.key];if(l===void 0&&o.hasDefault&&(l=o.default),o.enumValueSet!==void 0&&!o.enumValueSet.has(l)&&!c(l)&&(l=o.default),!!l){if(c(l)){if(!o.responsive)continue;l=ue(l,o)}if(o.type==="enum"){let u=C({allowArbitraryValues:!1,value:l,className:o.className,propValues:o.values,propValueSet:o.valueSet,parseValue:o.parseValue});u&&f.push(u);continue}if(o.type==="string"||o.type==="enum | string"){let[u,w]=E({className:o.className,customProperties:o.customProperties,propValues:o.type==="string"?[]:o.values,propValueSet:o.type==="string"?void 0:o.valueSet,parseValue:o.parseValue,value:l});w&&(n=L(n,w)),u&&f.push(u);continue}if(o.type==="boolean"){f.push(o.className);continue}}}return a.className=(0,W.default)(f.length>0?f.join(" "):void 0,t.className),a.style=L(n,t.style),a}var d=["0","1","2","3","4","5","6","7","8","9","10","11","12","-1","-2","-3","-4","-5","-6","-7","-8","-9","-10","-11","-12"],b={m:{type:"enum | string",values:d,responsive:!0,className:"rt-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:d,responsive:!0,className:"rt-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:d,responsive:!0,className:"rt-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:d,responsive:!0,className:"rt-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:d,responsive:!0,className:"rt-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:d,responsive:!0,className:"rt-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:d,responsive:!0,className:"rt-r-ml",customProperties:["--ml"]}};var G={asChild:{type:"boolean"}};var ce=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"];var h={color:{type:"enum",values:ce,default:void 0}};var x={highContrast:{type:"boolean",className:"rt-high-contrast",default:void 0}};var de=["normal","start","end","both"],T={trim:{type:"enum",className:"rt-r-lt",values:de,responsive:!0}};var Pe=["left","center","right"],I={align:{type:"enum",className:"rt-r-ta",values:Pe,responsive:!0}};var ye=["wrap","nowrap","pretty","balance"],$={wrap:{type:"enum",className:"rt-r-tw",values:ye,responsive:!0}};var M={truncate:{type:"boolean",className:"rt-truncate"}};var ge=["sans","mono","serif"],z={font:{type:"enum",className:"rt-r-ff",values:ge}};var De=["thin","extralight","light","regular","medium","semibold","bold","extrabold"],A={weight:{type:"enum",className:"rt-r-weight",values:De,responsive:!0}};var Re=["span","div","label","p"],ve=["0","1","2","3","4","5","6","7","8","9","10","11","12"],K={as:{type:"enum",values:Re,default:"span"},...G,size:{type:"enum",className:"rt-r-size",values:ve,responsive:!0},...z,...A,...I,...T,...M,...$,...h,...x};var be={...K,...b},V=P.memo(P.forwardRef((t,e)=>{let{children:s,className:r,asChild:p,as:a="span",color:n,...f}=y(t,be),i=r?`rt-Text ${r}`:"rt-Text";return p?P.createElement(B.Slot.Root,{"data-accent-color":n,...f,ref:e,className:i},s):P.createElement(a,{"data-accent-color":n,...f,ref:e,className:i},s)}));V.displayName="Text";var U={width:{type:"string",className:"rt-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"rt-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"rt-r-max-w",customProperties:["--max-width"],responsive:!0}};var he=["start","center","end","baseline","stretch"],xe=["horizontal","vertical"],Te=["1","2","3"],q={orientation:{type:"enum",className:"rt-r-orientation",values:xe,default:"horizontal",responsive:!0},size:{type:"enum",className:"rt-r-size",values:Te,default:"2",responsive:!0},trim:{...T.trim,className:"rt-r-trim"}},F={align:{type:"enum",className:"rt-r-ai",values:he,responsive:!0}},H={...U,...h,...x};var Y=m.forwardRef((t,e)=>{let{className:s,...r}=y(t,q,b);return m.createElement(V,{asChild:!0},m.createElement("dl",{...r,ref:e,className:(0,g.default)("rt-DataListRoot",s)}))});Y.displayName="DataList.Root";var _=m.forwardRef((t,e)=>{let{className:s,...r}=y(t,F);return m.createElement("div",{...r,ref:e,className:(0,g.default)("rt-DataListItem",s)})});_.displayName="DataList.Item";var J=m.forwardRef((t,e)=>{let{className:s,color:r,...p}=y(t,H);return m.createElement("dt",{...p,"data-accent-color":r,ref:e,className:(0,g.default)("rt-DataListLabel",s)})});J.displayName="DataList.Label";var Q=m.forwardRef(({children:t,className:e,...s},r)=>m.createElement("dd",{...s,ref:r,className:(0,g.default)(e,"rt-DataListValue")},t));Q.displayName="DataList.Value";
|
|
2
2
|
//# sourceMappingURL=data-list.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/data-list.tsx", "../../../src/components/text.tsx", "../../../src/helpers/extract-props.ts", "../../../src/props/prop-def.ts", "../../../src/helpers/has-own-property.ts", "../../../src/helpers/is-responsive-object.ts", "../../../src/helpers/get-responsive-styles.ts", "../../../src/helpers/merge-styles.ts", "../../../src/props/margin.props.ts", "../../../src/props/as-child.prop.ts", "../../../src/props/color.prop.ts", "../../../src/props/high-contrast.prop.ts", "../../../src/props/leading-trim.prop.ts", "../../../src/props/text-align.prop.ts", "../../../src/props/text-wrap.prop.ts", "../../../src/props/truncate.prop.ts", "../../../src/props/font-family.prop.ts", "../../../src/props/weight.prop.ts", "../../../src/components/text.props.tsx", "../../../src/props/width.props.ts", "../../../src/components/data-list.props.tsx"],
|
|
4
|
-
"sourcesContent": ["import classNames from 'classnames';\nimport * as React from 'react';\n\nimport { Text } from './text.js';\nimport {\n dataListRootPropDefs,\n dataListItemPropDefs,\n dataListLabelPropDefs,\n} from './data-list.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype DataListRootElement = HTMLDListElement;\ntype DataListRootOwnProps = GetPropDefTypes<typeof dataListRootPropDefs>;\ninterface DataListRootProps\n extends ComponentPropsWithout<'dl', RemovedProps>,\n MarginProps,\n DataListRootOwnProps {}\nconst DataListRoot = React.forwardRef<DataListRootElement, DataListRootProps>(\n (props, forwardedRef) => {\n const { className, ...dataListProps } = extractProps(\n props,\n dataListRootPropDefs,\n marginPropDefs\n );\n return (\n <Text asChild>\n <dl\n {...dataListProps}\n ref={forwardedRef}\n className={classNames('rt-DataListRoot', className)}\n />\n </Text>\n );\n }\n);\nDataListRoot.displayName = 'DataList.Root';\n\ntype DataListItemElement = HTMLDivElement;\ntype DataListItemOwnProps = GetPropDefTypes<typeof dataListItemPropDefs>;\ninterface DataListItemProps\n extends ComponentPropsWithout<'div', RemovedProps>,\n DataListItemOwnProps {}\nconst DataListItem = React.forwardRef<DataListItemElement, DataListItemProps>(\n (props, forwardedRef) => {\n const { className, ...itemProps } = extractProps(props, dataListItemPropDefs);\n return (\n <div {...itemProps} ref={forwardedRef} className={classNames('rt-DataListItem', className)} />\n );\n }\n);\nDataListItem.displayName = 'DataList.Item';\n\ntype DataListLabelElement = React.ElementRef<'dt'>;\ntype DataListLabelOwnProps = GetPropDefTypes<typeof dataListLabelPropDefs>;\ninterface DataListLabelProps\n extends ComponentPropsWithout<'dt', RemovedProps>,\n DataListLabelOwnProps {}\nconst DataListLabel = React.forwardRef<DataListLabelElement, DataListLabelProps>(\n (props, forwardedRef) => {\n const { className, color, ...labelProps } = extractProps(props, dataListLabelPropDefs);\n return (\n <dt\n {...labelProps}\n data-accent-color={color}\n ref={forwardedRef}\n className={classNames('rt-DataListLabel', className)}\n />\n );\n }\n);\nDataListLabel.displayName = 'DataList.Label';\n\ntype DataListValueElement = React.ElementRef<'dd'>;\ninterface DataListValueProps extends ComponentPropsWithout<'dd', RemovedProps> {}\nconst DataListValue = React.forwardRef<DataListValueElement, DataListValueProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <dd {...props} ref={forwardedRef} className={classNames(className, 'rt-DataListValue')}>\n {children}\n </dd>\n )\n);\nDataListValue.displayName = 'DataList.Value';\n\nexport {\n DataListRoot as Root,\n DataListItem as Item,\n DataListLabel as Label,\n DataListValue as Value,\n};\nexport type {\n DataListRootProps as RootProps,\n DataListItemProps as ItemProps,\n DataListLabelProps as LabelProps,\n DataListValueProps as ValueProps,\n};\n", "import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { textPropDefs } from './text.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype TextElement = React.ElementRef<'span'>;\ntype TextOwnProps = GetPropDefTypes<typeof textPropDefs>;\ninterface CommonTextProps extends MarginProps, TextOwnProps {}\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>;\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>;\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\nconst mergedPropDefs = { ...textPropDefs, ...marginPropDefs };\n\nconst Text = React.memo(\n React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'span',\n color,\n ...textProps\n } = extractProps(props, mergedPropDefs);\n\n const combinedClassName = className ? `rt-Text ${className}` : 'rt-Text';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...textProps}\n ref={forwardedRef}\n className={combinedClassName}\n >\n {children}\n </Slot.Root>\n );\n }\n\n return (\n <Tag\n data-accent-color={color}\n {...(textProps as React.HTMLAttributes<HTMLElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nText.displayName = 'Text';\n\nexport { Text };\nexport type { TextProps };\n", "import classNames from 'classnames';\n\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef>\n ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T]\n : never;\n\nfunction mergePropDefs<T extends Record<string, PropDef>[]>(...args: T): Record<string, PropDef> {\n return Object.assign({}, ...args);\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<\n P extends { className?: string; style?: React.CSSProperties; [key: string]: any },\n T extends Record<string, PropDef>[]\n>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n let className: string | undefined;\n let style: ReturnType<typeof mergeStyles>;\n const extractedProps = { ...props };\n const allPropDefs = mergePropDefs(...propDefs);\n\n for (const key in allPropDefs) {\n let value = extractedProps[key];\n const propDef = allPropDefs[key];\n\n // Apply prop def defaults\n if (propDef.default !== undefined && value === undefined) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.type === 'enum') {\n const values = [propDef.default, ...propDef.values];\n\n if (!values.includes(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n }\n\n // Apply the value with defaults\n (extractedProps as Record<string, any>)[key] = value;\n\n if ('className' in propDef && propDef.className) {\n delete extractedProps[key];\n\n const isResponsivePropDef = 'responsive' in propDef;\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!value || (isResponsiveObject(value) && !isResponsivePropDef)) {\n continue;\n }\n\n if (isResponsiveObject(value)) {\n // Apply prop def defaults to the `initial` breakpoint\n if (propDef.default !== undefined && value.initial === undefined) {\n value.initial = propDef.default;\n }\n\n // Apply the default value to the `initial` breakpoint when it is not a valid enum value\n if (propDef.type === 'enum') {\n const values = [propDef.default, ...propDef.values];\n\n if (!values.includes(value.initial)) {\n value.initial = propDef.default;\n }\n }\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className,\n propValues: propDef.values,\n parseValue: propDef.parseValue,\n });\n\n className = classNames(className, propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const propDefValues = propDef.type === 'string' ? [] : propDef.values;\n\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className,\n customProperties: propDef.customProperties,\n propValues: propDefValues,\n parseValue: propDef.parseValue,\n value,\n });\n\n style = mergeStyles(style, propCustomProperties);\n className = classNames(className, propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean' && value) {\n // TODO handle responsive boolean props\n className = classNames(className, propDef.className);\n continue;\n }\n }\n }\n\n extractedProps.className = classNames(className, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps;\n}\n\nexport { extractProps };\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({\n allowArbitraryValues,\n value,\n className,\n propValues,\n parseValue = (value) => value,\n}: GetResponsiveClassNamesOptions): string | undefined {\n const classNames: string[] = [];\n\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string' && propValues.includes(value)) {\n return getBaseClassName(className, value, parseValue);\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (propValues.includes(value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.join(' ');\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(\n className: string,\n value: string,\n parseValue: (value: string) => string | undefined\n): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({\n customProperties,\n value,\n propValues,\n parseValue = (value) => value,\n}: GetResponsiveCustomPropertiesOptions) {\n let styles: Record<string, string | undefined> = {};\n\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && propValues.includes(value))) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n styles = Object.fromEntries(customProperties.map((prop) => [prop, value]));\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (propValues.includes(value)) {\n continue;\n }\n\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = value;\n }\n }\n }\n\n for (const key in styles) {\n const value = styles[key];\n if (value !== undefined) {\n styles[key] = parseValue(value);\n }\n }\n\n return styles;\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\n// prettier-ignore\nconst marginValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '-1', '-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9', '-10', '-11', '-12'] as const;\n\nconst marginPropDefs = {\n /**\n * Sets the CSS **margin** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * m=\"4\"\n * m=\"100px\"\n * m={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin\n */\n m: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-m',\n customProperties: ['--m'],\n },\n /**\n * Sets the CSS **margin-left** and **margin-right** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mx=\"4\"\n * mx=\"100px\"\n * mx={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mx: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mx',\n customProperties: ['--ml', '--mr'],\n },\n /**\n * Sets the CSS **margin-top** and **margin-bottom** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * my=\"4\"\n * my=\"100px\"\n * my={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n my: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-my',\n customProperties: ['--mt', '--mb'],\n },\n /**\n * Sets the CSS **margin-top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mt=\"4\"\n * mt=\"100px\"\n * mt={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n */\n mt: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mt',\n customProperties: ['--mt'],\n },\n /**\n * Sets the CSS **margin-right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mr=\"4\"\n * mr=\"100px\"\n * mr={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mr: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mr',\n customProperties: ['--mr'],\n },\n /**\n * Sets the CSS **margin-bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mb=\"4\"\n * mb=\"100px\"\n * mb={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n mb: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mb',\n customProperties: ['--mb'],\n },\n /**\n * Sets the CSS **margin-left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * ml=\"4\"\n * ml=\"100px\"\n * ml={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n */\n ml: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-ml',\n customProperties: ['--ml'],\n },\n} satisfies {\n m: PropDef<(typeof marginValues)[number]>;\n mx: PropDef<(typeof marginValues)[number]>;\n my: PropDef<(typeof marginValues)[number]>;\n mt: PropDef<(typeof marginValues)[number]>;\n mr: PropDef<(typeof marginValues)[number]>;\n mb: PropDef<(typeof marginValues)[number]>;\n ml: PropDef<(typeof marginValues)[number]>;\n};\n\ntype MarginProps = GetPropDefTypes<typeof marginPropDefs>;\n\nexport { marginPropDefs };\nexport type { MarginProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Defines accent color for descendant text components\u00A0with `highContrast={true}`.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst highContrastPropDef = {\n highContrast: {\n type: 'boolean',\n className: 'rt-high-contrast',\n default: undefined,\n },\n} satisfies {\n highContrast: PropDef<boolean>;\n};\n\nexport { highContrastPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst leadingTrimValues = ['normal', 'start', 'end', 'both'] as const;\n\nconst leadingTrimPropDef = {\n trim: {\n type: 'enum',\n className: 'rt-r-lt',\n values: leadingTrimValues,\n responsive: true,\n },\n} satisfies {\n trim: PropDef<(typeof leadingTrimValues)[number]>;\n};\n\nexport { leadingTrimPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textAlignValues = ['left', 'center', 'right'] as const;\n\nconst textAlignPropDef = {\n align: {\n type: 'enum',\n className: 'rt-r-ta',\n values: textAlignValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof textAlignValues)[number]>;\n};\n\nexport { textAlignPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textWrapValues = ['wrap', 'nowrap', 'pretty', 'balance'] as const;\n\nconst textWrapPropDef = {\n wrap: {\n type: 'enum',\n className: 'rt-r-tw',\n values: textWrapValues,\n responsive: true,\n },\n} satisfies {\n wrap: PropDef<(typeof textWrapValues)[number]>;\n};\n\nexport { textWrapPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst truncatePropDef = {\n truncate: {\n type: 'boolean',\n className: 'rt-truncate',\n },\n} satisfies {\n truncate: PropDef<boolean>;\n};\n\nexport { truncatePropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst fontFamilyPropDef = {\n font: {\n type: 'enum',\n className: 'rt-r-ff',\n values: fontFamilies,\n },\n} satisfies {\n font: PropDef<(typeof fontFamilies)[number]>;\n};\n\nexport { fontFamilyPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst weights = ['thin', 'extralight', 'light', 'regular', 'medium', 'semibold', 'bold', 'extrabold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'rt-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['span', 'div', 'label', 'p'] as const;\nconst sizes = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst textPropDefs = {\n as: { type: 'enum', values: as, default: 'span' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { textPropDefs };\n", "import type { GetPropDefTypes, PropDef } from './prop-def.js';\n\nconst widthPropDefs = {\n /**\n * Sets the CSS **width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * width=\"100px\"\n * width={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/width\n */\n width: {\n type: 'string',\n className: 'rt-r-w',\n customProperties: ['--width'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minWidth=\"100px\"\n * minWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-width\n */\n minWidth: {\n type: 'string',\n className: 'rt-r-min-w',\n customProperties: ['--min-width'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxWidth=\"100px\"\n * maxWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-width\n */\n maxWidth: {\n type: 'string',\n className: 'rt-r-max-w',\n customProperties: ['--max-width'],\n responsive: true,\n },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\ntype WidthProps = GetPropDefTypes<typeof widthPropDefs>;\n\nexport { widthPropDefs };\nexport type { WidthProps };\n", "import { colorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst alignValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\nconst orientationValues = ['horizontal', 'vertical'] as const;\nconst sizes = ['1', '2', '3'] as const;\n\nconst dataListRootPropDefs = {\n orientation: {\n type: 'enum',\n className: 'rt-r-orientation',\n values: orientationValues,\n default: 'horizontal',\n responsive: true,\n },\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n default: '2',\n responsive: true,\n },\n trim: {\n ...leadingTrimPropDef.trim,\n className: 'rt-r-trim', // Custom trim styles due to grid layout\n },\n} satisfies {\n orientation: PropDef<(typeof orientationValues)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n trim: typeof leadingTrimPropDef.trim;\n};\n\nconst dataListItemPropDefs = {\n align: {\n type: 'enum',\n className: 'rt-r-ai',\n values: alignValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof alignValues)[number]>;\n};\n\nconst dataListLabelPropDefs = {\n ...widthPropDefs,\n ...colorPropDef,\n ...highContrastPropDef,\n};\n\nexport { dataListRootPropDefs, dataListItemPropDefs, dataListLabelPropDefs };\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["data_list_exports", "__export", "DataListItem", "DataListLabel", "DataListRoot", "DataListValue", "__toCommonJS", "import_classnames", "React", "React", "import_radix_ui", "import_classnames", "breakpoints", "breakpointSet", "hasOwnProperty", "obj", "key", "breakpointSet", "isResponsiveObject", "obj", "key", "
|
|
3
|
+
"sources": ["../../../src/components/data-list.tsx", "../../../src/components/text.tsx", "../../../src/helpers/extract-props.ts", "../../../src/helpers/compile-prop-defs.ts", "../../../src/props/prop-def.ts", "../../../src/helpers/has-own-property.ts", "../../../src/helpers/is-responsive-object.ts", "../../../src/helpers/get-responsive-styles.ts", "../../../src/helpers/merge-styles.ts", "../../../src/props/margin.props.ts", "../../../src/props/as-child.prop.ts", "../../../src/props/color.prop.ts", "../../../src/props/high-contrast.prop.ts", "../../../src/props/leading-trim.prop.ts", "../../../src/props/text-align.prop.ts", "../../../src/props/text-wrap.prop.ts", "../../../src/props/truncate.prop.ts", "../../../src/props/font-family.prop.ts", "../../../src/props/weight.prop.ts", "../../../src/components/text.props.tsx", "../../../src/props/width.props.ts", "../../../src/components/data-list.props.tsx"],
|
|
4
|
+
"sourcesContent": ["import classNames from 'classnames';\nimport * as React from 'react';\n\nimport { Text } from './text.js';\nimport {\n dataListRootPropDefs,\n dataListItemPropDefs,\n dataListLabelPropDefs,\n} from './data-list.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype DataListRootElement = HTMLDListElement;\ntype DataListRootOwnProps = GetPropDefTypes<typeof dataListRootPropDefs>;\ninterface DataListRootProps\n extends ComponentPropsWithout<'dl', RemovedProps>,\n MarginProps,\n DataListRootOwnProps {}\nconst DataListRoot = React.forwardRef<DataListRootElement, DataListRootProps>(\n (props, forwardedRef) => {\n const { className, ...dataListProps } = extractProps(\n props,\n dataListRootPropDefs,\n marginPropDefs\n );\n return (\n <Text asChild>\n <dl\n {...dataListProps}\n ref={forwardedRef}\n className={classNames('rt-DataListRoot', className)}\n />\n </Text>\n );\n }\n);\nDataListRoot.displayName = 'DataList.Root';\n\ntype DataListItemElement = HTMLDivElement;\ntype DataListItemOwnProps = GetPropDefTypes<typeof dataListItemPropDefs>;\ninterface DataListItemProps\n extends ComponentPropsWithout<'div', RemovedProps>,\n DataListItemOwnProps {}\nconst DataListItem = React.forwardRef<DataListItemElement, DataListItemProps>(\n (props, forwardedRef) => {\n const { className, ...itemProps } = extractProps(props, dataListItemPropDefs);\n return (\n <div {...itemProps} ref={forwardedRef} className={classNames('rt-DataListItem', className)} />\n );\n }\n);\nDataListItem.displayName = 'DataList.Item';\n\ntype DataListLabelElement = React.ElementRef<'dt'>;\ntype DataListLabelOwnProps = GetPropDefTypes<typeof dataListLabelPropDefs>;\ninterface DataListLabelProps\n extends ComponentPropsWithout<'dt', RemovedProps>,\n DataListLabelOwnProps {}\nconst DataListLabel = React.forwardRef<DataListLabelElement, DataListLabelProps>(\n (props, forwardedRef) => {\n const { className, color, ...labelProps } = extractProps(props, dataListLabelPropDefs);\n return (\n <dt\n {...labelProps}\n data-accent-color={color}\n ref={forwardedRef}\n className={classNames('rt-DataListLabel', className)}\n />\n );\n }\n);\nDataListLabel.displayName = 'DataList.Label';\n\ntype DataListValueElement = React.ElementRef<'dd'>;\ninterface DataListValueProps extends ComponentPropsWithout<'dd', RemovedProps> {}\nconst DataListValue = React.forwardRef<DataListValueElement, DataListValueProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <dd {...props} ref={forwardedRef} className={classNames(className, 'rt-DataListValue')}>\n {children}\n </dd>\n )\n);\nDataListValue.displayName = 'DataList.Value';\n\nexport {\n DataListRoot as Root,\n DataListItem as Item,\n DataListLabel as Label,\n DataListValue as Value,\n};\nexport type {\n DataListRootProps as RootProps,\n DataListItemProps as ItemProps,\n DataListLabelProps as LabelProps,\n DataListValueProps as ValueProps,\n};\n", "import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { textPropDefs } from './text.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype TextElement = React.ElementRef<'span'>;\ntype TextOwnProps = GetPropDefTypes<typeof textPropDefs>;\ninterface CommonTextProps extends MarginProps, TextOwnProps {}\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>;\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>;\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\nconst mergedPropDefs = { ...textPropDefs, ...marginPropDefs };\n\nconst Text = React.memo(\n React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'span',\n color,\n ...textProps\n } = extractProps(props, mergedPropDefs);\n\n const combinedClassName = className ? `rt-Text ${className}` : 'rt-Text';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...textProps}\n ref={forwardedRef}\n className={combinedClassName}\n >\n {children}\n </Slot.Root>\n );\n }\n\n return (\n <Tag\n data-accent-color={color}\n {...(textProps as React.HTMLAttributes<HTMLElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nText.displayName = 'Text';\n\nexport { Text };\nexport type { TextProps };\n", "import classNames from 'classnames';\n\nimport { getCompiledPropDefs } from './compile-prop-defs.js';\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type { CompiledPropDef } from './compile-prop-defs.js';\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef> ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T] : never;\n\ntype ResponsiveValue = Record<string, string | undefined>;\n\n/**\n * Fills in the `initial` breakpoint of a responsive value from the prop def's\n * default, and coerces an invalid `initial` enum value back to that default.\n *\n * Returns the value untouched when nothing needs changing, and a copy otherwise\n * \u2014 callers routinely hoist responsive objects to module scope, so mutating the\n * caller's object would corrupt it for every later render.\n */\nfunction normalizeResponsiveValue(value: ResponsiveValue, propDef: CompiledPropDef) {\n let initial = value.initial;\n let changed = false;\n\n if (propDef.hasDefault && initial === undefined) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(initial)) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n return changed ? { ...value, initial } : value;\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<P extends { className?: string; style?: React.CSSProperties; [key: string]: any }, T extends Record<string, PropDef>[]>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n const { styling, passthrough, stylingKeys } = getCompiledPropDefs(propDefs);\n\n // Copy the props that survive to the element rather than spreading and then\n // deleting the styling keys. Deleting off a spread demotes the object to\n // dictionary mode in V8, and this object is on the render path of every\n // component in the library.\n const extractedProps: Record<string, any> = {};\n for (const key in props) {\n if (stylingKeys.has(key)) continue;\n extractedProps[key] = props[key];\n }\n\n for (let i = 0; i < passthrough.length; i++) {\n const propDef = passthrough[i];\n const value = extractedProps[propDef.key];\n\n if (value === undefined) {\n if (propDef.hasDefault) extractedProps[propDef.key] = propDef.default;\n continue;\n }\n\n // Fall back to the default when the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n extractedProps[propDef.key] = propDef.default;\n }\n }\n\n let style: ReturnType<typeof mergeStyles>;\n const classes: string[] = [];\n\n for (let i = 0; i < styling.length; i++) {\n const propDef = styling[i];\n let value = props[propDef.key];\n\n // Apply prop def defaults\n if (value === undefined && propDef.hasDefault) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n\n if (!value) continue;\n\n if (isResponsiveObject(value)) {\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!propDef.responsive) continue;\n value = normalizeResponsiveValue(value, propDef);\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className!,\n propValues: propDef.values,\n propValueSet: propDef.valueSet,\n parseValue: propDef.parseValue,\n });\n\n if (propClassName) classes.push(propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className!,\n customProperties: propDef.customProperties!,\n // `string` prop defs have no enum values, so every value is arbitrary\n propValues: propDef.type === 'string' ? [] : propDef.values,\n propValueSet: propDef.type === 'string' ? undefined : propDef.valueSet,\n parseValue: propDef.parseValue,\n value,\n });\n\n if (propCustomProperties) style = mergeStyles(style, propCustomProperties);\n if (propClassNames) classes.push(propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean') {\n // TODO handle responsive boolean props\n classes.push(propDef.className!);\n continue;\n }\n }\n\n extractedProps.className = classNames(classes.length > 0 ? classes.join(' ') : undefined, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps as ReturnType<typeof extractProps<P, T>>;\n}\n\nexport { extractProps };\n", "import type { PropDef } from '../props/prop-def.js';\n\n/**\n * A prop def pre-processed into the exact shape `extractProps` needs at render\n * time. Everything that can be derived from the static prop def \u2014 enum\n * membership sets, whether the def is responsive, whether it carries a default\n * \u2014 is computed once here instead of on every render.\n */\ninterface CompiledPropDef {\n key: string;\n type: PropDef['type'];\n default: unknown;\n hasDefault: boolean;\n responsive: boolean;\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n /** The prop def's own enum values, kept for the responsive class name helpers. */\n values: readonly string[];\n /** O(1) membership for `values`. */\n valueSet: ReadonlySet<string>;\n /**\n * `values` plus the default, used to coerce invalid enum values back to the\n * default. Only present for `type: 'enum'` \u2014 `'enum | string'` props accept\n * arbitrary strings and must not be coerced.\n */\n enumValueSet?: ReadonlySet<unknown>;\n}\n\ninterface CompiledPropDefs {\n /** Defs that contribute a class name and/or custom properties. */\n styling: CompiledPropDef[];\n /**\n * Defs that pass through to the element but still need a default applied or\n * an invalid enum value coerced. Defs that can do neither are omitted\n * entirely \u2014 they are already correct as passed.\n */\n passthrough: CompiledPropDef[];\n /** Keys consumed by `styling`, so they can be skipped when copying props. */\n stylingKeys: ReadonlySet<string>;\n}\n\nconst EMPTY_VALUES: readonly string[] = [];\nconst EMPTY_SET: ReadonlySet<string> = new Set();\n\nfunction compile(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n const merged: Record<string, PropDef> = Object.assign({}, ...propDefs);\n const styling: CompiledPropDef[] = [];\n const passthrough: CompiledPropDef[] = [];\n const stylingKeys = new Set<string>();\n\n for (const key in merged) {\n // The PropDef union is narrowed per-field below; reading the optional\n // members off the union directly is what the runtime actually needs.\n const def = merged[key] as PropDef & {\n default?: unknown;\n values?: readonly string[];\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n responsive?: true;\n };\n\n const values = def.values ?? EMPTY_VALUES;\n const compiled: CompiledPropDef = {\n key,\n type: def.type,\n default: def.default,\n hasDefault: def.default !== undefined,\n responsive: 'responsive' in def,\n className: def.className,\n customProperties: def.customProperties,\n parseValue: def.parseValue,\n values,\n valueSet: values.length > 0 ? new Set(values) : EMPTY_SET,\n enumValueSet: def.type === 'enum' ? new Set<unknown>([def.default, ...values]) : undefined,\n };\n\n if (def.className) {\n styling.push(compiled);\n stylingKeys.add(key);\n } else if (compiled.hasDefault || def.type === 'enum') {\n // Anything else is copied through untouched, so there is nothing to do.\n passthrough.push(compiled);\n }\n }\n\n return { styling, passthrough, stylingKeys };\n}\n\ninterface CacheNode {\n children: WeakMap<object, CacheNode>;\n compiled?: CompiledPropDefs;\n}\n\nconst cacheRoot: CacheNode = { children: new WeakMap() };\n\n/**\n * Compiles a set of prop defs, memoized on the identity of the prop def objects\n * themselves. Components always pass the same module-level constants, so after\n * the first render of a given component this is a couple of WeakMap lookups\n * instead of merging 50-odd prop defs into a fresh object.\n */\nfunction getCompiledPropDefs(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n let node = cacheRoot;\n\n for (let i = 0; i < propDefs.length; i++) {\n const propDef = propDefs[i];\n let child = node.children.get(propDef);\n if (child === undefined) {\n child = { children: new WeakMap() };\n node.children.set(propDef, child);\n }\n node = child;\n }\n\n return (node.compiled ??= compile(propDefs));\n}\n\nexport { getCompiledPropDefs };\nexport type { CompiledPropDef, CompiledPropDefs };\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\n/**\n * Membership test against a prop def's enum values. Callers that already hold a\n * compiled prop def pass `propValueSet` for an O(1) lookup; the handful of call\n * sites that build options inline fall back to scanning the array.\n */\nfunction includesValue(propValues: string[] | readonly string[], propValueSet: ReadonlySet<string> | undefined, value: string): boolean {\n return propValueSet !== undefined ? propValueSet.has(value) : propValues.includes(value);\n}\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({ allowArbitraryValues, value, className, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveClassNamesOptions): string | undefined {\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n if (includesValue(propValues, propValueSet, value)) {\n return getBaseClassName(className, value, parseValue);\n }\n return allowArbitraryValues ? className : undefined;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n const classNames: string[] = [];\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (includesValue(propValues, propValueSet, value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.length > 0 ? classNames.join(' ') : '';\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(className: string, value: string, parseValue: (value: string) => string | undefined): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({ customProperties, value, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveCustomPropertiesOptions) {\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && includesValue(propValues, propValueSet, value))) {\n return undefined;\n }\n\n let styles: Record<string, string | undefined> | undefined;\n\n if (typeof value === 'string') {\n const parsed = parseValue(value);\n styles = {};\n for (const customProperty of customProperties) {\n styles[customProperty] = parsed;\n }\n return styles;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (value === undefined || includesValue(propValues, propValueSet, value)) {\n continue;\n }\n\n const parsed = parseValue(value);\n styles ??= {};\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = parsed;\n }\n }\n }\n\n return styles ?? {};\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\n// prettier-ignore\nconst marginValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '-1', '-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9', '-10', '-11', '-12'] as const;\n\nconst marginPropDefs = {\n /**\n * Sets the CSS **margin** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * m=\"4\"\n * m=\"100px\"\n * m={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin\n */\n m: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-m',\n customProperties: ['--m'],\n },\n /**\n * Sets the CSS **margin-left** and **margin-right** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mx=\"4\"\n * mx=\"100px\"\n * mx={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mx: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mx',\n customProperties: ['--ml', '--mr'],\n },\n /**\n * Sets the CSS **margin-top** and **margin-bottom** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * my=\"4\"\n * my=\"100px\"\n * my={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n my: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-my',\n customProperties: ['--mt', '--mb'],\n },\n /**\n * Sets the CSS **margin-top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mt=\"4\"\n * mt=\"100px\"\n * mt={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n */\n mt: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mt',\n customProperties: ['--mt'],\n },\n /**\n * Sets the CSS **margin-right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mr=\"4\"\n * mr=\"100px\"\n * mr={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mr: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mr',\n customProperties: ['--mr'],\n },\n /**\n * Sets the CSS **margin-bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mb=\"4\"\n * mb=\"100px\"\n * mb={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n mb: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mb',\n customProperties: ['--mb'],\n },\n /**\n * Sets the CSS **margin-left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * ml=\"4\"\n * ml=\"100px\"\n * ml={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n */\n ml: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-ml',\n customProperties: ['--ml'],\n },\n} satisfies {\n m: PropDef<(typeof marginValues)[number]>;\n mx: PropDef<(typeof marginValues)[number]>;\n my: PropDef<(typeof marginValues)[number]>;\n mt: PropDef<(typeof marginValues)[number]>;\n mr: PropDef<(typeof marginValues)[number]>;\n mb: PropDef<(typeof marginValues)[number]>;\n ml: PropDef<(typeof marginValues)[number]>;\n};\n\ntype MarginProps = GetPropDefTypes<typeof marginPropDefs>;\n\nexport { marginPropDefs };\nexport type { MarginProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Defines accent color for descendant text components\u00A0with `highContrast={true}`.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst highContrastPropDef = {\n highContrast: {\n type: 'boolean',\n className: 'rt-high-contrast',\n default: undefined,\n },\n} satisfies {\n highContrast: PropDef<boolean>;\n};\n\nexport { highContrastPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst leadingTrimValues = ['normal', 'start', 'end', 'both'] as const;\n\nconst leadingTrimPropDef = {\n trim: {\n type: 'enum',\n className: 'rt-r-lt',\n values: leadingTrimValues,\n responsive: true,\n },\n} satisfies {\n trim: PropDef<(typeof leadingTrimValues)[number]>;\n};\n\nexport { leadingTrimPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textAlignValues = ['left', 'center', 'right'] as const;\n\nconst textAlignPropDef = {\n align: {\n type: 'enum',\n className: 'rt-r-ta',\n values: textAlignValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof textAlignValues)[number]>;\n};\n\nexport { textAlignPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textWrapValues = ['wrap', 'nowrap', 'pretty', 'balance'] as const;\n\nconst textWrapPropDef = {\n wrap: {\n type: 'enum',\n className: 'rt-r-tw',\n values: textWrapValues,\n responsive: true,\n },\n} satisfies {\n wrap: PropDef<(typeof textWrapValues)[number]>;\n};\n\nexport { textWrapPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst truncatePropDef = {\n truncate: {\n type: 'boolean',\n className: 'rt-truncate',\n },\n} satisfies {\n truncate: PropDef<boolean>;\n};\n\nexport { truncatePropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst fontFamilyPropDef = {\n font: {\n type: 'enum',\n className: 'rt-r-ff',\n values: fontFamilies,\n },\n} satisfies {\n font: PropDef<(typeof fontFamilies)[number]>;\n};\n\nexport { fontFamilyPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst weights = ['thin', 'extralight', 'light', 'regular', 'medium', 'semibold', 'bold', 'extrabold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'rt-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['span', 'div', 'label', 'p'] as const;\nconst sizes = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst textPropDefs = {\n as: { type: 'enum', values: as, default: 'span' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { textPropDefs };\n", "import type { GetPropDefTypes, PropDef } from './prop-def.js';\n\nconst widthPropDefs = {\n /**\n * Sets the CSS **width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * width=\"100px\"\n * width={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/width\n */\n width: {\n type: 'string',\n className: 'rt-r-w',\n customProperties: ['--width'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minWidth=\"100px\"\n * minWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-width\n */\n minWidth: {\n type: 'string',\n className: 'rt-r-min-w',\n customProperties: ['--min-width'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxWidth=\"100px\"\n * maxWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-width\n */\n maxWidth: {\n type: 'string',\n className: 'rt-r-max-w',\n customProperties: ['--max-width'],\n responsive: true,\n },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\ntype WidthProps = GetPropDefTypes<typeof widthPropDefs>;\n\nexport { widthPropDefs };\nexport type { WidthProps };\n", "import { colorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst alignValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\nconst orientationValues = ['horizontal', 'vertical'] as const;\nconst sizes = ['1', '2', '3'] as const;\n\nconst dataListRootPropDefs = {\n orientation: {\n type: 'enum',\n className: 'rt-r-orientation',\n values: orientationValues,\n default: 'horizontal',\n responsive: true,\n },\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n default: '2',\n responsive: true,\n },\n trim: {\n ...leadingTrimPropDef.trim,\n className: 'rt-r-trim', // Custom trim styles due to grid layout\n },\n} satisfies {\n orientation: PropDef<(typeof orientationValues)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n trim: typeof leadingTrimPropDef.trim;\n};\n\nconst dataListItemPropDefs = {\n align: {\n type: 'enum',\n className: 'rt-r-ai',\n values: alignValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof alignValues)[number]>;\n};\n\nconst dataListLabelPropDefs = {\n ...widthPropDefs,\n ...colorPropDef,\n ...highContrastPropDef,\n};\n\nexport { dataListRootPropDefs, dataListItemPropDefs, dataListLabelPropDefs };\n"],
|
|
5
|
+
"mappings": "kkBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,UAAAE,EA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AClC,gBAAC,MAAI,GAAGD,EAAO,IAAKC,EAAc,aAAW,EAAAO,SAAWN,EAAW,kBAAkB,GAClFe,CACH,CAEJ,EACAD,EAAc,YAAc",
|
|
6
|
+
"names": ["data_list_exports", "__export", "DataListItem", "DataListLabel", "DataListRoot", "DataListValue", "__toCommonJS", "import_classnames", "React", "React", "import_radix_ui", "import_classnames", "EMPTY_VALUES", "EMPTY_SET", "compile", "propDefs", "merged", "styling", "passthrough", "stylingKeys", "key", "def", "values", "compiled", "cacheRoot", "getCompiledPropDefs", "node", "i", "propDef", "child", "breakpoints", "breakpointSet", "hasOwnProperty", "obj", "key", "breakpointSet", "isResponsiveObject", "obj", "key", "includesValue", "propValues", "propValueSet", "value", "getResponsiveStyles", "className", "customProperties", "args", "responsiveClassNames", "getResponsiveClassNames", "responsiveCustomProperties", "getResponsiveCustomProperties", "allowArbitraryValues", "parseValue", "getBaseClassName", "isResponsiveObject", "object", "classNames", "bp", "hasOwnProperty", "breakpointSet", "baseClassName", "bpClassName", "delimiter", "matchedValue", "isNegative", "minus", "absoluteValue", "styles", "parsed", "customProperty", "bpProperty", "mergeStyles", "styles", "result", "style", "normalizeResponsiveValue", "value", "propDef", "initial", "changed", "extractProps", "props", "propDefs", "styling", "passthrough", "stylingKeys", "getCompiledPropDefs", "extractedProps", "key", "isResponsiveObject", "style", "classes", "propClassName", "getResponsiveClassNames", "propClassNames", "propCustomProperties", "getResponsiveStyles", "mergeStyles", "classNames", "marginValues", "marginPropDefs", "asChildPropDef", "accentColors", "colorPropDef", "accentColors", "highContrastPropDef", "leadingTrimValues", "leadingTrimPropDef", "textAlignValues", "textAlignPropDef", "textWrapValues", "textWrapPropDef", "truncatePropDef", "fontFamilies", "fontFamilyPropDef", "weights", "weightPropDef", "as", "sizes", "textPropDefs", "asChildPropDef", "fontFamilyPropDef", "weightPropDef", "textAlignPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "colorPropDef", "highContrastPropDef", "mergedPropDefs", "textPropDefs", "marginPropDefs", "Text", "props", "forwardedRef", "children", "className", "asChild", "Tag", "color", "textProps", "extractProps", "combinedClassName", "widthPropDefs", "alignValues", "orientationValues", "sizes", "dataListRootPropDefs", "leadingTrimPropDef", "dataListItemPropDefs", "dataListLabelPropDefs", "widthPropDefs", "colorPropDef", "highContrastPropDef", "DataListRoot", "props", "forwardedRef", "className", "dataListProps", "extractProps", "dataListRootPropDefs", "marginPropDefs", "Text", "classNames", "DataListItem", "itemProps", "dataListItemPropDefs", "DataListLabel", "color", "labelProps", "dataListLabelPropDefs", "DataListValue", "children"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/components/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AAGrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/components/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AAGrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAOjC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EACV,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EACjB,MAAM,+BAA+B,CAAC;AAEvC,UAAU,eAAgB,SAAQ,qBAAqB,CAAC,OAAO,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC;CAAG;AAChG,QAAA,MAAM,UAAU,EAAE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or;var Ae=Object.getOwnPropertyNames;var Ge=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var Ie=(e,o)=>{for(var t in o)L(e,t,{get:o[t],enumerable:!0})},fe=(e,o,t,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of Ae(o))!Me.call(e,a)&&a!==t&&L(e,a,{get:()=>o[a],enumerable:!(m=Ve(o,a))||m.enumerable});return e};var b=(e,o,t)=>(t=e!=null?Fe(Ge(e)):{},fe(o||!e||!e.__esModule?L(t,"default",{value:e,enumerable:!0}):t,e)),Le=e=>fe(L({},"__esModule",{value:!0}),e);var ut={};Ie(ut,{Close:()=>We,Content:()=>He,Description:()=>je,Root:()=>we,Title:()=>Oe,Trigger:()=>Be});module.exports=Le(ut);var l=b(require("react")),Se=b(require("classnames")),y=require("radix-ui");var S={asChild:{type:"boolean"}};var z={width:{type:"string",className:"rt-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"rt-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"rt-r-max-w",customProperties:["--max-width"],responsive:!0}};var ue={height:{type:"string",className:"rt-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"rt-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"rt-r-max-h",customProperties:["--max-height"],responsive:!0}};var ze=["1","2","3","4"],$e=["solid","translucent"],Ke=["solid","translucent"],de={...S,align:{type:"enum",className:"rt-r-align",values:["start","center"],default:"center"},size:{type:"enum",className:"rt-r-size",values:ze,default:"3",responsive:!0},panelBackground:{type:"enum",values:$e,default:void 0},material:{type:"enum",values:Ke,default:void 0},width:z.width,minWidth:z.minWidth,maxWidth:{...z.maxWidth,default:"600px"},...ue};var O=b(require("react")),he=require("radix-ui");var oe=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"],ge=["auto","gray","mauve","slate","sage","olive","sand"],$={color:{type:"enum",values:oe,default:void 0}};var K={highContrast:{type:"boolean",className:"rt-high-contrast",default:void 0}};var Ue=["normal","start","end","both"],U={trim:{type:"enum",className:"rt-r-lt",values:Ue,responsive:!0}};var qe=["left","center","right"],q={align:{type:"enum",className:"rt-r-ta",values:qe,responsive:!0}};var _e=["wrap","nowrap","pretty","balance"],_={wrap:{type:"enum",className:"rt-r-tw",values:_e,responsive:!0}};var J={truncate:{type:"boolean",className:"rt-truncate"}};var Je=["sans","mono","serif"],Q={font:{type:"enum",className:"rt-r-ff",values:Je}};var Qe=["thin","extralight","light","regular","medium","semibold","bold","extrabold"],X={weight:{type:"enum",className:"rt-r-weight",values:Qe,responsive:!0}};var Xe=["h1","h2","h3","h4","h5","h6"],Ye=["0","1","2","3","4","5","6","7","8","9","10","11","12"],ye={as:{type:"enum",values:Xe,default:"h1"},...S,size:{type:"enum",className:"rt-r-size",values:Ye,default:"6",responsive:!0},...Q,...X,...q,...U,...J,..._,...$,...K};var M=b(require("classnames"));var Ze=["initial","xs","sm","md","lg","xl"],re=new Set(Ze);function ne(e,o){return Object.prototype.hasOwnProperty.call(e,o)}var et=new Set(["initial","xs","sm","md","lg","xl"]);function B(e){if(typeof e!="object"||e===null)return!1;for(let o in e)if(et.has(o))return!0;return!1}function De({className:e,customProperties:o,...t}){let m=ae({allowArbitraryValues:!0,className:e,...t}),a=tt({customProperties:o,...t});return[m,a]}function ae({allowArbitraryValues:e,value:o,className:t,propValues:m,parseValue:a=i=>i}){let i=[];if(o){if(typeof o=="string"&&m.includes(o))return Pe(t,o,a);if(B(o)){let p=o;for(let n in p){if(!ne(p,n)||!re.has(n))continue;let r=p[n];if(r!==void 0){if(m.includes(r)){let f=Pe(t,r,a),d=n==="initial"?f:`${n}:${f}`;i.push(d)}else if(e){let f=n==="initial"?t:`${n}:${t}`;i.push(f)}}}return i.join(" ")}if(e)return t}}function Pe(e,o,t){let m=e?"-":"",a=t(o),i=a?.startsWith("-"),p=i?"-":"",n=i?a?.substring(1):a;return`${p}${e}${m}${n}`}function tt({customProperties:e,value:o,propValues:t,parseValue:m=a=>a}){let a={};if(!(!o||typeof o=="string"&&t.includes(o))){if(typeof o=="string"&&(a=Object.fromEntries(e.map(i=>[i,o]))),B(o)){let i=o;for(let p in i){if(!ne(i,p)||!re.has(p))continue;let n=i[p];if(!t.includes(n))for(let r of e){let f=p==="initial"?r:`${r}-${p}`;a[f]=n}}}for(let i in a){let p=a[i];p!==void 0&&(a[i]=m(p))}return a}}function se(...e){let o;for(let t of e)t&&(o===void 0&&(o={}),Object.assign(o,t));return o}function ot(...e){return Object.assign({},...e)}function x(e,...o){let t,m,a={...e},i=ot(...o);for(let p in i){let n=a[p],r=i[p];if(r.default!==void 0&&n===void 0&&(n=r.default),r.type==="enum"&&![r.default,...r.values].includes(n)&&!B(n)&&(n=r.default),a[p]=n,"className"in r&&r.className){delete a[p];let f="responsive"in r;if(!n||B(n)&&!f)continue;if(B(n)&&(r.default!==void 0&&n.initial===void 0&&(n.initial=r.default),r.type==="enum"&&([r.default,...r.values].includes(n.initial)||(n.initial=r.default))),r.type==="enum"){let d=ae({allowArbitraryValues:!1,value:n,className:r.className,propValues:r.values,parseValue:r.parseValue});t=(0,M.default)(t,d);continue}if(r.type==="string"||r.type==="enum | string"){let d=r.type==="string"?[]:r.values,[D,h]=De({className:r.className,customProperties:r.customProperties,propValues:d,parseValue:r.parseValue,value:n});m=se(m,h),t=(0,M.default)(t,D);continue}if(r.type==="boolean"&&n){t=(0,M.default)(t,r.className);continue}}}return a.className=(0,M.default)(t,e.className),a.style=se(m,e.style),a}var H=["0","1","2","3","4","5","6","7","8","9","10","11","12","-1","-2","-3","-4","-5","-6","-7","-8","-9","-10","-11","-12"],Y={m:{type:"enum | string",values:H,responsive:!0,className:"rt-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:H,responsive:!0,className:"rt-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:H,responsive:!0,className:"rt-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:H,responsive:!0,className:"rt-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:H,responsive:!0,className:"rt-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:H,responsive:!0,className:"rt-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:H,responsive:!0,className:"rt-r-ml",customProperties:["--ml"]}};var rt={...ye,...Y},ie=O.memo(O.forwardRef((e,o)=>{let{children:t,className:m,asChild:a,as:i="h1",color:p,...n}=x(e,rt),r=m?`rt-Heading ${m}`:"rt-Heading";return a?O.createElement(he.Slot.Root,{"data-accent-color":p,...n,ref:o,className:r},t):O.createElement(i,{"data-accent-color":p,...n,ref:o,className:r},t)}));ie.displayName="Heading";var j=b(require("react")),Ce=require("radix-ui");var nt=["span","div","label","p"],at=["0","1","2","3","4","5","6","7","8","9","10","11","12"],ve={as:{type:"enum",values:nt,default:"span"},...S,size:{type:"enum",className:"rt-r-size",values:at,responsive:!0},...Q,...X,...q,...U,...J,..._,...$,...K};var st={...ve,...Y},pe=j.memo(j.forwardRef((e,o)=>{let{children:t,className:m,asChild:a,as:i="span",color:p,...n}=x(e,st),r=m?`rt-Text ${m}`:"rt-Text";return a?j.createElement(Ce.Slot.Root,{"data-accent-color":p,...n,ref:o,className:r},t):j.createElement(i,{"data-accent-color":p,...n,ref:o,className:r},t)}));pe.displayName="Text";var s=b(require("react")),be=b(require("classnames")),A=require("radix-ui");function Te(e){switch(e){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}var Re=["none","small","medium","large","full"];var it=["inherit","light","dark"],pt=["solid","translucent"],lt=["solid","translucent"],mt=["90%","95%","100%","105%","110%"],ct=["sans","mono","serif"],c={...S,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:it,default:"inherit"},accentColor:{type:"enum",values:oe,default:"blue"},grayColor:{type:"enum",values:ge,default:"slate"},material:{type:"enum",values:lt,default:"translucent"},panelBackground:{type:"enum",values:pt,default:"translucent"},radius:{type:"enum",values:Re,default:"medium"},scaling:{type:"enum",values:mt,default:"100%"},fontFamily:{type:"enum",values:ct,default:"sans"}};var u=()=>{},No={appearance:c.appearance.default,accentColor:c.accentColor.default,grayColor:c.grayColor.default,resolvedGrayColor:c.grayColor.default,material:c.material.default,panelBackground:c.panelBackground.default,radius:c.radius.default,scaling:c.scaling.default,fontFamily:c.fontFamily.default,onAppearanceChange:u,onAccentColorChange:u,onGrayColorChange:u,onMaterialChange:u,onPanelBackgroundChange:u,onRadiusChange:u,onScalingChange:u,onFontFamilyChange:u},le=s.createContext(void 0);var Z=s.forwardRef((e,o)=>s.useContext(le)===void 0?s.createElement(A.Tooltip.Provider,{delayDuration:200},s.createElement(A.Direction.Provider,{dir:"ltr"},s.createElement(xe,{...e,ref:o}))):s.createElement(me,{...e,ref:o}));Z.displayName="Theme";var xe=s.forwardRef((e,o)=>{let{appearance:t=c.appearance.default,accentColor:m=c.accentColor.default,grayColor:a=c.grayColor.default,material:i=c.material.default,panelBackground:p=c.panelBackground.default,radius:n=c.radius.default,scaling:r=c.scaling.default,fontFamily:f=c.fontFamily.default,hasBackground:d=c.hasBackground.default,...D}=e;s.useEffect(()=>{e.panelBackground!==void 0&&console.warn("Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.")},[e.panelBackground]);let[h,v]=s.useState(t);s.useEffect(()=>v(t),[t]);let[G,W]=s.useState(m);s.useEffect(()=>W(m),[m]);let[F,N]=s.useState(a);s.useEffect(()=>N(a),[a]);let k=i!==c.material.default?i:p,[C,E]=s.useState(k);s.useEffect(()=>E(k),[k]);let[g,P]=s.useState(p);s.useEffect(()=>P(C),[C]);let[w,T]=s.useState(n);s.useEffect(()=>T(n),[n]);let[V,R]=s.useState(r);s.useEffect(()=>R(r),[r]);let[te,I]=s.useState(f);return s.useEffect(()=>I(f),[f]),s.createElement(me,{...D,ref:o,isRoot:!0,hasBackground:d,appearance:h,accentColor:G,grayColor:F,material:C,panelBackground:g,radius:w,scaling:V,fontFamily:te,onAppearanceChange:v,onAccentColorChange:W,onGrayColorChange:N,onMaterialChange:E,onPanelBackgroundChange:P,onRadiusChange:T,onScalingChange:R,onFontFamilyChange:I})});xe.displayName="ThemeRoot";function ft(){if(typeof navigator>"u")return;let e=navigator.userAgent;if(e.includes("Win"))return"windows";if(e.includes("Mac"))return"macos";if(e.includes("Linux"))return"linux"}var me=s.forwardRef((e,o)=>{let t=s.useContext(le),{asChild:m,isRoot:a,hasBackground:i,appearance:p=e.appearance??t?.appearance??c.appearance.default,accentColor:n=e.accentColor??t?.accentColor??c.accentColor.default,grayColor:r=e.grayColor??t?.resolvedGrayColor??c.grayColor.default,material:f=e.material??t?.material??c.material.default,panelBackground:d=e.panelBackground??t?.panelBackground??c.panelBackground.default,radius:D=e.radius??t?.radius??c.radius.default,scaling:h=e.scaling??t?.scaling??c.scaling.default,fontFamily:v=e.fontFamily??t?.fontFamily??c.fontFamily.default,onAppearanceChange:G=u,onAccentColorChange:W=u,onGrayColorChange:F=u,onMaterialChange:N=u,onPanelBackgroundChange:k=u,onRadiusChange:C=u,onScalingChange:E=u,onFontFamilyChange:g=u,...P}=e,w=m?A.Slot.Root:"div",T=r==="auto"?Te(n):r,V=e.appearance==="light"||e.appearance==="dark",R=i===void 0?a||V:i,[te,I]=s.useState(void 0);return s.useEffect(()=>{a&&I(ft())},[a]),s.createElement(le.Provider,{value:s.useMemo(()=>({appearance:p,accentColor:n,grayColor:r,resolvedGrayColor:T,material:f,panelBackground:d,radius:D,scaling:h,fontFamily:v,onAppearanceChange:G,onAccentColorChange:W,onGrayColorChange:F,onMaterialChange:N,onPanelBackgroundChange:k,onRadiusChange:C,onScalingChange:E,onFontFamilyChange:g}),[p,n,r,T,f,d,D,h,v,G,W,F,N,k,C,E,g])},s.createElement(w,{"data-is-root-theme":a?"true":"false","data-accent-color":n,"data-gray-color":T,"data-has-background":R?"true":"false","data-material":f,"data-panel-background":d,"data-radius":D,"data-scaling":h,"data-font-family":v,"data-os":a?te:void 0,ref:o,...P,className:(0,be.default)("radix-themes",{light:p==="light",dark:p==="dark"},P.className)}))});me.displayName="ThemeImpl";var ee=b(require("react")),ce=e=>{if(!ee.isValidElement(e))throw Error(`Expected a single React Element child, but got: ${ee.Children.toArray(e).map(t=>typeof t=="object"&&"type"in t&&typeof t.type=="string"?t.type:typeof t).join(", ")}`);return e};var ke=b(require("react")),Ne=!1;function Ee(){ke.useEffect(()=>{if(typeof document>"u"||Ne)return;Ne=!0;let e=()=>{let r=!!document.querySelector('[role="dialog"][aria-modal="true"], [role="alertdialog"][aria-modal="true"]'),f=!!document.querySelector('[data-radix-popper-content-wrapper], [data-state="open"]');return r||f},o=()=>{document.body.style.pointerEvents==="none"&&(console.log("[KookieUI] Force cleaning stuck pointer-events: none from body"),document.body.style.pointerEvents="",document.body.removeAttribute("data-scroll-locked"),document.body.removeAttribute("data-remove-scroll"),document.body.classList.remove("ReactModal__Body--open"))},t=()=>{document.body.style.pointerEvents==="none"&&!e()&&(console.log("[KookieUI] Safe cleaning stuck pointer-events: none from body"),document.body.style.pointerEvents="")},m=r=>{let f=r.target;f&&!f.closest('[role="dialog"], [role="alertdialog"], [data-radix-popper-content-wrapper]')&&setTimeout(o,100)},a=r=>{r.key==="Escape"&&setTimeout(o,200)},i=()=>{setTimeout(t,50)};document.addEventListener("click",m,!0),document.addEventListener("keydown",a,!0),document.addEventListener("pointerup",i,!0),document.addEventListener("transitionend",i,!0),document.addEventListener("animationend",i,!0),new MutationObserver(()=>{setTimeout(t,0)}).observe(document.body,{childList:!0,subtree:!0,attributes:!0});let n=setInterval(()=>{document.body.style.pointerEvents==="none"&&!e()&&(console.log("[KookieUI] Periodic cleanup of stuck pointer-events"),document.body.style.pointerEvents="")},1e3);return setTimeout(t,100),()=>{clearInterval(n)}},[])}var we=e=>l.createElement(y.Dialog.Root,{...e,modal:!0});we.displayName="Dialog.Root";var Be=l.forwardRef(({children:e,...o},t)=>l.createElement(y.Dialog.Trigger,{...o,ref:t,asChild:!0},ce(e)));Be.displayName="Dialog.Trigger";var He=l.forwardRef(({align:e,...o},t)=>{let{align:m,panelBackground:a,material:i,...p}=de,{className:n}=x({align:e},{align:m}),{panelBackground:r}=x({panelBackground:o.panelBackground},{panelBackground:a}),{material:f}=x({material:o.material},{material:i}),d=l.useMemo(()=>(f!==void 0&&console.warn("Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead."),f??r),[f,r]),{className:D,forceMount:h,container:v,panelBackground:G,material:W,...F}=x(o,p),N=l.useRef(null),k=l.useMemo(()=>g=>{N.current=g,typeof t=="function"?t(g):t&&(t.current=g)},[t]);Ee(),l.useEffect(()=>{if(typeof window>"u")return;let g=N.current;if(!g)return;let P=g.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(P.length===0)return;let w=P[0],T=P[P.length-1],V=R=>{R.key==="Tab"&&(R.shiftKey?document.activeElement===w&&(R.preventDefault(),T.focus()):document.activeElement===T&&(R.preventDefault(),w.focus()))};return g.addEventListener("keydown",V),w.focus(),()=>{g.removeEventListener("keydown",V)}},[]);let C=l.createElement(y.Dialog.Content,{...F,ref:k,className:(0,Se.default)("rt-BaseDialogContent","rt-DialogContent",D),"data-material":d,"data-panel-background":d,tabIndex:-1,role:"dialog","aria-modal":"true",onCloseAutoFocus:g=>{g.preventDefault(),document.body.style.pointerEvents=""}}),E=l.createElement("div",{"aria-live":"polite","aria-atomic":"true",className:"rt-sr-only",id:"dialog-announcement"});return h?l.createElement(y.Dialog.Portal,{container:v,forceMount:!0},l.createElement(Z,null,l.createElement(y.Dialog.Overlay,{className:"rt-BaseDialogOverlay rt-DialogOverlay"}),l.createElement("div",{className:"rt-BaseDialogScroll rt-DialogScroll rt-BaseDialogScroll--detached"},l.createElement("div",{className:`rt-BaseDialogScrollPadding rt-DialogScrollPadding ${n}`},l.cloneElement(C,{forceMount:!0}),E)))):l.createElement(y.Dialog.Portal,{container:v},l.createElement(Z,{asChild:!0},l.createElement(y.Dialog.Overlay,{className:"rt-BaseDialogOverlay rt-DialogOverlay"},l.createElement("div",{className:"rt-BaseDialogScroll rt-DialogScroll"},l.createElement("div",{className:`rt-BaseDialogScrollPadding rt-DialogScrollPadding ${n}`},C,E)))))});He.displayName="Dialog.Content";var Oe=l.forwardRef((e,o)=>l.createElement(y.Dialog.Title,{asChild:!0},l.createElement(ie,{size:"5",mb:"3",trim:"start",...e,asChild:!1,ref:o})));Oe.displayName="Dialog.Title";var je=l.forwardRef((e,o)=>l.createElement(y.Dialog.Description,{asChild:!0},l.createElement(pe,{as:"p",size:"3",...e,asChild:!1,ref:o})));je.displayName="Dialog.Description";var We=l.forwardRef(({children:e,...o},t)=>l.createElement(y.Dialog.Close,{...o,ref:t,asChild:!0},ce(e)));We.displayName="Dialog.Close";
|
|
1
|
+
"use strict";var qe=Object.create;var G=Object.defineProperty;var _e=Object.getOwnPropertyDescriptor;var Ye=Object.getOwnPropertyNames;var Je=Object.getPrototypeOf,Qe=Object.prototype.hasOwnProperty;var Xe=(e,t)=>{for(var o in t)G(e,o,{get:t[o],enumerable:!0})},ve=(e,t,o,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ye(t))!Qe.call(e,a)&&a!==o&&G(e,a,{get:()=>t[a],enumerable:!(p=_e(t,a))||p.enumerable});return e};var h=(e,t,o)=>(o=e!=null?qe(Je(e)):{},ve(t||!e||!e.__esModule?G(o,"default",{value:e,enumerable:!0}):o,e)),Ze=e=>ve(G({},"__esModule",{value:!0}),e);var At={};Xe(At,{Close:()=>Ue,Content:()=>ze,Description:()=>$e,Root:()=>Le,Title:()=>Ke,Trigger:()=>Ie});module.exports=Ze(At);var f=h(require("react")),Me=h(require("classnames")),R=require("radix-ui");var S={asChild:{type:"boolean"}};var M={width:{type:"string",className:"rt-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"rt-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"rt-r-max-w",customProperties:["--max-width"],responsive:!0}};var Ce={height:{type:"string",className:"rt-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"rt-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"rt-r-max-h",customProperties:["--max-height"],responsive:!0}};var et=["1","2","3","4"],tt=["solid","translucent"],ot=["solid","translucent"],Te={...S,align:{type:"enum",className:"rt-r-align",values:["start","center"],default:"center"},size:{type:"enum",className:"rt-r-size",values:et,default:"3",responsive:!0},panelBackground:{type:"enum",values:tt,default:void 0},material:{type:"enum",values:ot,default:void 0},width:M.width,minWidth:M.minWidth,maxWidth:{...M.maxWidth,default:"600px"},...Ce};var B=h(require("react")),Ee=require("radix-ui");var se=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"],Re=["auto","gray","mauve","slate","sage","olive","sand"],L={color:{type:"enum",values:se,default:void 0}};var I={highContrast:{type:"boolean",className:"rt-high-contrast",default:void 0}};var rt=["normal","start","end","both"],z={trim:{type:"enum",className:"rt-r-lt",values:rt,responsive:!0}};var nt=["left","center","right"],K={align:{type:"enum",className:"rt-r-ta",values:nt,responsive:!0}};var st=["wrap","nowrap","pretty","balance"],$={wrap:{type:"enum",className:"rt-r-tw",values:st,responsive:!0}};var U={truncate:{type:"boolean",className:"rt-truncate"}};var at=["sans","mono","serif"],q={font:{type:"enum",className:"rt-r-ff",values:at}};var it=["thin","extralight","light","regular","medium","semibold","bold","extrabold"],_={weight:{type:"enum",className:"rt-r-weight",values:it,responsive:!0}};var pt=["h1","h2","h3","h4","h5","h6"],lt=["0","1","2","3","4","5","6","7","8","9","10","11","12"],be={as:{type:"enum",values:pt,default:"h1"},...S,size:{type:"enum",className:"rt-r-size",values:lt,default:"6",responsive:!0},...q,..._,...K,...z,...U,...$,...L,...I};var Ne=h(require("classnames"));var mt=[],ct=new Set;function ft(e){let t=Object.assign({},...e),o=[],p=[],a=new Set;for(let l in t){let r=t[l],s=r.values??mt,i={key:l,type:r.type,default:r.default,hasDefault:r.default!==void 0,responsive:"responsive"in r,className:r.className,customProperties:r.customProperties,parseValue:r.parseValue,values:s,valueSet:s.length>0?new Set(s):ct,enumValueSet:r.type==="enum"?new Set([r.default,...s]):void 0};r.className?(o.push(i),a.add(l)):(i.hasDefault||r.type==="enum")&&p.push(i)}return{styling:o,passthrough:p,stylingKeys:a}}var ut={children:new WeakMap};function xe(e){let t=ut;for(let o=0;o<e.length;o++){let p=e[o],a=t.children.get(p);a===void 0&&(a={children:new WeakMap},t.children.set(p,a)),t=a}return t.compiled??(t.compiled=ft(e))}var dt=["initial","xs","sm","md","lg","xl"],ae=new Set(dt);function ie(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var gt=new Set(["initial","xs","sm","md","lg","xl"]);function E(e){if(typeof e!="object"||e===null)return!1;for(let t in e)if(gt.has(t))return!0;return!1}function Y(e,t,o){return t!==void 0?t.has(o):e.includes(o)}function Se({className:e,customProperties:t,...o}){let p=pe({allowArbitraryValues:!0,className:e,...o}),a=yt({customProperties:t,...o});return[p,a]}function pe({allowArbitraryValues:e,value:t,className:o,propValues:p,propValueSet:a,parseValue:l=r=>r}){if(t){if(typeof t=="string")return Y(p,a,t)?ke(o,t,l):e?o:void 0;if(E(t)){let r=t,s=[];for(let i in r){if(!ie(r,i)||!ae.has(i))continue;let n=r[i];if(n!==void 0){if(Y(p,a,n)){let m=ke(o,n,l),u=i==="initial"?m:`${i}:${m}`;s.push(u)}else if(e){let m=i==="initial"?o:`${i}:${o}`;s.push(m)}}}return s.length>0?s.join(" "):""}if(e)return o}}function ke(e,t,o){let p=e?"-":"",a=o(t),l=a?.startsWith("-"),r=l?"-":"",s=l?a?.substring(1):a;return`${r}${e}${p}${s}`}function yt({customProperties:e,value:t,propValues:o,propValueSet:p,parseValue:a=l=>l}){if(!t||typeof t=="string"&&Y(o,p,t))return;let l;if(typeof t=="string"){let r=a(t);l={};for(let s of e)l[s]=r;return l}if(E(t)){let r=t;for(let s in r){if(!ie(r,s)||!ae.has(s))continue;let i=r[s];if(i===void 0||Y(o,p,i))continue;let n=a(i);l??(l={});for(let m of e){let u=s==="initial"?m:`${m}-${s}`;l[u]=n}}}return l??{}}function le(...e){let t;for(let o of e)o&&(t===void 0&&(t={}),Object.assign(t,o));return t}function Pt(e,t){let o=e.initial,p=!1;return t.hasDefault&&o===void 0&&(o=t.default,p=!0),t.enumValueSet!==void 0&&!t.enumValueSet.has(o)&&(o=t.default,p=!0),p?{...e,initial:o}:e}function C(e,...t){let{styling:o,passthrough:p,stylingKeys:a}=xe(t),l={};for(let i in e)a.has(i)||(l[i]=e[i]);for(let i=0;i<p.length;i++){let n=p[i],m=l[n.key];if(m===void 0){n.hasDefault&&(l[n.key]=n.default);continue}n.enumValueSet!==void 0&&!n.enumValueSet.has(m)&&!E(m)&&(l[n.key]=n.default)}let r,s=[];for(let i=0;i<o.length;i++){let n=o[i],m=e[n.key];if(m===void 0&&n.hasDefault&&(m=n.default),n.enumValueSet!==void 0&&!n.enumValueSet.has(m)&&!E(m)&&(m=n.default),!!m){if(E(m)){if(!n.responsive)continue;m=Pt(m,n)}if(n.type==="enum"){let u=pe({allowArbitraryValues:!1,value:m,className:n.className,propValues:n.values,propValueSet:n.valueSet,parseValue:n.parseValue});u&&s.push(u);continue}if(n.type==="string"||n.type==="enum | string"){let[u,P]=Se({className:n.className,customProperties:n.customProperties,propValues:n.type==="string"?[]:n.values,propValueSet:n.type==="string"?void 0:n.valueSet,parseValue:n.parseValue,value:m});P&&(r=le(r,P)),u&&s.push(u);continue}if(n.type==="boolean"){s.push(n.className);continue}}}return l.className=(0,Ne.default)(s.length>0?s.join(" "):void 0,e.className),l.style=le(r,e.style),l}var w=["0","1","2","3","4","5","6","7","8","9","10","11","12","-1","-2","-3","-4","-5","-6","-7","-8","-9","-10","-11","-12"],J={m:{type:"enum | string",values:w,responsive:!0,className:"rt-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:w,responsive:!0,className:"rt-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:w,responsive:!0,className:"rt-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:w,responsive:!0,className:"rt-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:w,responsive:!0,className:"rt-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:w,responsive:!0,className:"rt-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:w,responsive:!0,className:"rt-r-ml",customProperties:["--ml"]}};var ht={...be,...J},me=B.memo(B.forwardRef((e,t)=>{let{children:o,className:p,asChild:a,as:l="h1",color:r,...s}=C(e,ht),i=p?`rt-Heading ${p}`:"rt-Heading";return a?B.createElement(Ee.Slot.Root,{"data-accent-color":r,...s,ref:t,className:i},o):B.createElement(l,{"data-accent-color":r,...s,ref:t,className:i},o)}));me.displayName="Heading";var H=h(require("react")),Be=require("radix-ui");var Dt=["span","div","label","p"],vt=["0","1","2","3","4","5","6","7","8","9","10","11","12"],we={as:{type:"enum",values:Dt,default:"span"},...S,size:{type:"enum",className:"rt-r-size",values:vt,responsive:!0},...q,..._,...K,...z,...U,...$,...L,...I};var Ct={...we,...J},ce=H.memo(H.forwardRef((e,t)=>{let{children:o,className:p,asChild:a,as:l="span",color:r,...s}=C(e,Ct),i=p?`rt-Text ${p}`:"rt-Text";return a?H.createElement(Be.Slot.Root,{"data-accent-color":r,...s,ref:t,className:i},o):H.createElement(l,{"data-accent-color":r,...s,ref:t,className:i},o)}));ce.displayName="Text";var d=h(require("react")),Oe=h(require("classnames")),j=require("radix-ui"),X=require("radix-ui/internal");function He(e){switch(e){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}var fe=h(require("react"));function T(e){let[t,o]=fe.useState(e),[p,a]=fe.useState(e);return Object.is(e,p)||(a(e),o(e)),[t,o]}var je=h(require("react")),Tt="Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.",Ve=new Set;function Rt(e){Ve.has(e)||(Ve.add(e),console.warn(e))}function Q(e){je.useEffect(()=>{},[e])}var We=["none","small","medium","large","full"];var bt=["inherit","light","dark"],xt=["solid","translucent"],kt=["solid","translucent"],St=["90%","95%","100%","105%","110%"],Nt=["sans","mono","serif"],c={...S,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:bt,default:"inherit"},accentColor:{type:"enum",values:se,default:"blue"},grayColor:{type:"enum",values:Re,default:"slate"},material:{type:"enum",values:kt,default:"translucent"},panelBackground:{type:"enum",values:xt,default:"translucent"},radius:{type:"enum",values:We,default:"medium"},scaling:{type:"enum",values:St,default:"100%"},fontFamily:{type:"enum",values:Nt,default:"sans"}};var g=()=>{},or={appearance:c.appearance.default,accentColor:c.accentColor.default,grayColor:c.grayColor.default,resolvedGrayColor:c.grayColor.default,material:c.material.default,panelBackground:c.panelBackground.default,radius:c.radius.default,scaling:c.scaling.default,fontFamily:c.fontFamily.default,onAppearanceChange:g,onAccentColorChange:g,onGrayColorChange:g,onMaterialChange:g,onPanelBackgroundChange:g,onRadiusChange:g,onScalingChange:g,onFontFamilyChange:g},ue=d.createContext(void 0);var de=d.forwardRef((e,t)=>d.useContext(ue)===void 0?d.createElement(j.Tooltip.Provider,{delayDuration:200},d.createElement(j.Direction.Provider,{dir:"ltr"},d.createElement(Ae,{...e,ref:t}))):d.createElement(ge,{...e,ref:t}));de.displayName="Theme";var Ae=d.forwardRef((e,t)=>{let{appearance:o=c.appearance.default,accentColor:p=c.accentColor.default,grayColor:a=c.grayColor.default,material:l=c.material.default,panelBackground:r=c.panelBackground.default,radius:s=c.radius.default,scaling:i=c.scaling.default,fontFamily:n=c.fontFamily.default,hasBackground:m=c.hasBackground.default,...u}=e;Q(e.panelBackground);let[P,b]=T(o),[V,y]=T(p),[D,x]=T(a),N=l!==c.material.default?l:r,[k,v]=T(N),[A,W]=T(k),[ee,O]=T(s),[te,oe]=T(i),[F,re]=T(n);return d.createElement(ge,{...u,ref:t,isRoot:!0,hasBackground:m,appearance:P,accentColor:V,grayColor:D,material:k,panelBackground:A,radius:ee,scaling:te,fontFamily:F,onAppearanceChange:b,onAccentColorChange:y,onGrayColorChange:x,onMaterialChange:v,onPanelBackgroundChange:W,onRadiusChange:O,onScalingChange:oe,onFontFamilyChange:re})});Ae.displayName="ThemeRoot";function Et(){if(typeof navigator>"u")return;let e=navigator.userAgent;if(e.includes("Win"))return"windows";if(e.includes("Mac"))return"macos";if(e.includes("Linux"))return"linux"}var ge=d.forwardRef((e,t)=>{let o=d.useContext(ue),{asChild:p,isRoot:a,hasBackground:l,appearance:r=e.appearance??o?.appearance??c.appearance.default,accentColor:s=e.accentColor??o?.accentColor??c.accentColor.default,grayColor:i=e.grayColor??o?.resolvedGrayColor??c.grayColor.default,material:n=e.material??o?.material??c.material.default,panelBackground:m=e.panelBackground??o?.panelBackground??c.panelBackground.default,radius:u=e.radius??o?.radius??c.radius.default,scaling:P=e.scaling??o?.scaling??c.scaling.default,fontFamily:b=e.fontFamily??o?.fontFamily??c.fontFamily.default,onAppearanceChange:V=g,onAccentColorChange:y=g,onGrayColorChange:D=g,onMaterialChange:x=g,onPanelBackgroundChange:N=g,onRadiusChange:k=g,onScalingChange:v=g,onFontFamilyChange:A=g,...W}=e,ee=p?j.Slot.Root:"div",O=i==="auto"?He(s):i,te=e.appearance==="light"||e.appearance==="dark",oe=l===void 0?a||te:l,F=d.useRef(null),re=(0,X.useComposedRefs)(t,F),he="data-os"in W;return(0,X.useLayoutEffect)(()=>{if(!a||he)return;let ne=F.current;if(!ne)return;let De=Et();if(De)return ne.setAttribute("data-os",De),()=>ne.removeAttribute("data-os")},[a,he]),d.createElement(ue.Provider,{value:d.useMemo(()=>({appearance:r,accentColor:s,grayColor:i,resolvedGrayColor:O,material:n,panelBackground:m,radius:u,scaling:P,fontFamily:b,onAppearanceChange:V,onAccentColorChange:y,onGrayColorChange:D,onMaterialChange:x,onPanelBackgroundChange:N,onRadiusChange:k,onScalingChange:v,onFontFamilyChange:A}),[r,s,i,O,n,m,u,P,b,V,y,D,x,N,k,v,A])},d.createElement(ee,{"data-is-root-theme":a?"true":"false","data-accent-color":s,"data-gray-color":O,"data-has-background":oe?"true":"false","data-material":n,"data-panel-background":m,"data-radius":u,"data-scaling":P,"data-font-family":b,ref:re,...W,className:(0,Oe.default)("radix-themes",{light:r==="light",dark:r==="dark"},W.className)}))});ge.displayName="ThemeImpl";var Z=h(require("react")),ye=e=>{if(!Z.isValidElement(e))throw Error(`Expected a single React Element child, but got: ${Z.Children.toArray(e).map(o=>typeof o=="object"&&"type"in o&&typeof o.type=="string"?o.type:typeof o).join(", ")}`);return e};var Fe=h(require("react")),Pe=!1;function Ge(){Fe.useEffect(()=>{if(typeof document>"u"||Pe)return;Pe=!0;let e=new Set,t=(m,u)=>{let P=setTimeout(()=>{e.delete(P),m()},u);e.add(P)},o=()=>{let m=!!document.querySelector('[role="dialog"][aria-modal="true"], [role="alertdialog"][aria-modal="true"]'),u=!!document.querySelector('[data-radix-popper-content-wrapper], [data-state="open"]');return m||u},p=()=>{document.body.style.pointerEvents==="none"&&(console.log("[KookieUI] Force cleaning stuck pointer-events: none from body"),document.body.style.pointerEvents="",document.body.removeAttribute("data-scroll-locked"),document.body.removeAttribute("data-remove-scroll"),document.body.classList.remove("ReactModal__Body--open"))},a=()=>{document.body.style.pointerEvents==="none"&&!o()&&(console.log("[KookieUI] Safe cleaning stuck pointer-events: none from body"),document.body.style.pointerEvents="")},l=m=>{let u=m.target;u&&!u.closest('[role="dialog"], [role="alertdialog"], [data-radix-popper-content-wrapper]')&&t(p,100)},r=m=>{m.key==="Escape"&&t(p,200)},s=()=>{t(a,50)};document.addEventListener("click",l,!0),document.addEventListener("keydown",r,!0),document.addEventListener("pointerup",s,!0),document.addEventListener("transitionend",s,!0),document.addEventListener("animationend",s,!0);let i=new MutationObserver(()=>{t(a,0)});i.observe(document.body,{childList:!0,subtree:!0,attributes:!0});let n=setInterval(()=>{document.body.style.pointerEvents==="none"&&!o()&&(console.log("[KookieUI] Periodic cleanup of stuck pointer-events"),document.body.style.pointerEvents="")},1e3);return t(a,100),()=>{clearInterval(n),e.forEach(clearTimeout),e.clear(),i.disconnect(),document.removeEventListener("click",l,!0),document.removeEventListener("keydown",r,!0),document.removeEventListener("pointerup",s,!0),document.removeEventListener("transitionend",s,!0),document.removeEventListener("animationend",s,!0),Pe=!1}},[])}var Le=e=>f.createElement(R.Dialog.Root,{...e,modal:!0});Le.displayName="Dialog.Root";var Ie=f.forwardRef(({children:e,...t},o)=>f.createElement(R.Dialog.Trigger,{...t,ref:o,asChild:!0},ye(e)));Ie.displayName="Dialog.Trigger";var{align:wt,panelBackground:Bt,material:Ht,...Vt}=Te,jt={align:wt},Wt={panelBackground:Bt},Ot={material:Ht},ze=f.forwardRef(({align:e,...t},o)=>{let{className:p}=C({align:e},jt),{panelBackground:a}=C({panelBackground:t.panelBackground},Wt),{material:l}=C({material:t.material},Ot);Q(t.panelBackground);let r=l??a,{className:s,forceMount:i,container:n,panelBackground:m,material:u,...P}=C(t,Vt),b=f.useRef(null),V=f.useMemo(()=>y=>{b.current=y,typeof o=="function"?o(y):o&&(o.current=y)},[o]);return Ge(),f.useEffect(()=>{if(typeof window>"u")return;let y=b.current;if(!y)return;let D=y.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(D.length===0)return;let x=D[0],N=D[D.length-1],k=v=>{v.key==="Tab"&&(v.shiftKey?document.activeElement===x&&(v.preventDefault(),N.focus()):document.activeElement===N&&(v.preventDefault(),x.focus()))};return y.addEventListener("keydown",k),x.focus(),()=>{y.removeEventListener("keydown",k)}},[]),f.createElement(R.Dialog.Portal,{container:n,forceMount:i},f.createElement(de,{asChild:!0},f.createElement(R.Dialog.Overlay,{className:"rt-BaseDialogOverlay rt-DialogOverlay"},f.createElement("div",{className:"rt-BaseDialogScroll rt-DialogScroll"},f.createElement("div",{className:`rt-BaseDialogScrollPadding rt-DialogScrollPadding ${p}`},f.createElement(R.Dialog.Content,{...P,ref:V,className:(0,Me.default)("rt-BaseDialogContent","rt-DialogContent",s),"data-material":r,"data-panel-background":r,tabIndex:-1,role:"dialog","aria-modal":"true",onCloseAutoFocus:y=>{y.preventDefault(),document.body.style.pointerEvents=""}}),f.createElement("div",{"aria-live":"polite","aria-atomic":"true",className:"rt-sr-only",id:"dialog-announcement"}))))))});ze.displayName="Dialog.Content";var Ke=f.forwardRef((e,t)=>f.createElement(R.Dialog.Title,{asChild:!0},f.createElement(me,{size:"5",mb:"3",trim:"start",...e,asChild:!1,ref:t})));Ke.displayName="Dialog.Title";var $e=f.forwardRef((e,t)=>f.createElement(R.Dialog.Description,{asChild:!0},f.createElement(ce,{as:"p",size:"3",...e,asChild:!1,ref:t})));$e.displayName="Dialog.Description";var Ue=f.forwardRef(({children:e,...t},o)=>f.createElement(R.Dialog.Close,{...t,ref:o,asChild:!0},ye(e)));Ue.displayName="Dialog.Close";
|
|
2
2
|
//# sourceMappingURL=dialog.js.map
|