@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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/box.tsx", "../../../src/components/slot.tsx", "../../../src/props/as-child.prop.ts", "../../../src/components/box.props.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/padding.props.ts", "../../../src/props/height.props.ts", "../../../src/props/width.props.ts", "../../../src/props/layout.props.ts", "../../../src/props/margin.props.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { Slot } from './slot.js';\nimport { boxPropDefs } from './box.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { layoutPropDefs } from '../props/layout.props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { LayoutProps } from '../props/layout.props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { BoxOwnProps } from './box.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype BoxElement = React.ElementRef<'div'>;\ninterface CommonBoxProps extends MarginProps, LayoutProps, BoxOwnProps {}\ntype BoxDivProps = { as?: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype BoxSpanProps = { as: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype BoxProps = CommonBoxProps & (BoxSpanProps | BoxDivProps);\n\nconst Box = React.forwardRef<BoxElement, BoxProps>((props, forwardedRef) => {\n const {\n className,\n asChild,\n as: Tag = 'div',\n ...boxProps\n } = extractProps(props, boxPropDefs, layoutPropDefs, marginPropDefs);\n const Comp = asChild ? Slot : Tag;\n return <Comp {...boxProps} ref={forwardedRef} className={classNames('rt-Box', className)} />;\n});\nBox.displayName = 'Box';\n\nexport { Box };\nexport type { BoxProps };\n", "import { Slot as SlotPrimitive } from 'radix-ui';\nexport const Root = SlotPrimitive.Root;\nexport const Slot = SlotPrimitive.Root;\nexport const Slottable: typeof SlotPrimitive.Slottable = SlotPrimitive.Slottable;\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 { asChildPropDef } from '../props/as-child.prop.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst as = ['div', 'span'] as const;\nconst displayValues = ['none', 'inline', 'inline-block', 'block', 'contents'] as const;\n\nconst boxPropDefs = {\n /**\n * Controls whether to render **div** or **span**\n *\n * @example\n * as=\"div\"\n * as=\"span\"\n */\n as: { type: 'enum', values: as, default: 'div' },\n ...asChildPropDef,\n /**\n * Sets the CSS **display** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * display=\"inline-block\"\n * display={{ sm: 'none', lg: 'block' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/display\n */\n display: {\n type: 'enum',\n className: 'rt-r-display',\n values: displayValues,\n responsive: true,\n },\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n display: PropDef<(typeof displayValues)[number]>;\n};\n\n// Use all of the imported prop defs to ensure that JSDoc works\ntype BoxOwnProps = GetPropDefTypes<typeof boxPropDefs & typeof asChildPropDef>;\n\nexport { boxPropDefs };\nexport type { BoxOwnProps };\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 { GetPropDefTypes, PropDef } from './prop-def.js';\n\nconst paddingValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst paddingPropDefs = {\n /**\n * Sets the CSS **padding** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * p=\"4\"\n * p=\"100px\"\n * p={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding\n */\n p: {\n type: 'enum | string',\n className: 'rt-r-p',\n customProperties: ['--p'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-left** and **padding-right** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * px=\"4\"\n * px=\"100px\"\n * px={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right\n */\n px: {\n type: 'enum | string',\n className: 'rt-r-px',\n customProperties: ['--pl', '--pr'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-top** and **padding-bottom** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * py=\"4\"\n * py=\"100px\"\n * py={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom\n */\n py: {\n type: 'enum | string',\n className: 'rt-r-py',\n customProperties: ['--pt', '--pb'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pt=\"4\"\n * pt=\"100px\"\n * pt={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top\n */\n pt: {\n type: 'enum | string',\n className: 'rt-r-pt',\n customProperties: ['--pt'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pr=\"4\"\n * pr=\"100px\"\n * pr={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right\n */\n pr: {\n type: 'enum | string',\n className: 'rt-r-pr',\n customProperties: ['--pr'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pb=\"4\"\n * pb=\"100px\"\n * pb={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom\n */\n pb: {\n type: 'enum | string',\n className: 'rt-r-pb',\n customProperties: ['--pb'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pl=\"4\"\n * pl=\"100px\"\n * pl={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left\n */\n pl: {\n type: 'enum | string',\n className: 'rt-r-pl',\n customProperties: ['--pl'],\n values: paddingValues,\n responsive: true,\n },\n} satisfies {\n p: PropDef<(typeof paddingValues)[number]>;\n px: PropDef<(typeof paddingValues)[number]>;\n py: PropDef<(typeof paddingValues)[number]>;\n pt: PropDef<(typeof paddingValues)[number]>;\n pr: PropDef<(typeof paddingValues)[number]>;\n pb: PropDef<(typeof paddingValues)[number]>;\n pl: PropDef<(typeof paddingValues)[number]>;\n};\n\ntype PaddingProps = GetPropDefTypes<typeof paddingPropDefs>;\n\nexport { paddingPropDefs };\nexport type { PaddingProps };\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\nconst heightPropDefs = {\n /**\n * Sets the CSS **height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * height=\"100px\"\n * height={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/height\n */\n height: {\n type: 'string',\n className: 'rt-r-h',\n customProperties: ['--height'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minHeight=\"100px\"\n * minHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-height\n */\n minHeight: {\n type: 'string',\n className: 'rt-r-min-h',\n customProperties: ['--min-height'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxHeight=\"100px\"\n * maxHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-height\n */\n maxHeight: {\n type: 'string',\n className: 'rt-r-max-h',\n customProperties: ['--max-height'],\n responsive: true,\n },\n} satisfies {\n height: PropDef<string>;\n minHeight: PropDef<string>;\n maxHeight: PropDef<string>;\n};\n\ntype HeightProps = GetPropDefTypes<typeof heightPropDefs>;\n\nexport { heightPropDefs };\nexport type { HeightProps };\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 { paddingPropDefs } from './padding.props.js';\nimport { heightPropDefs } from './height.props.js';\nimport { widthPropDefs } from './width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from './prop-def.js';\n\nconst overflowValues = ['visible', 'hidden', 'clip', 'scroll', 'auto'] as const;\nconst positionValues = ['static', 'relative', 'absolute', 'fixed', 'sticky'] as const;\n// prettier-ignore\nconst positionEdgeValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-1', '-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9'] as const;\nconst flexShrinkValues = ['0', '1'] as const;\nconst flexGrowValues = ['0', '1'] as const;\nconst alignSelfValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\nconst justifySelfValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\n\nconst layoutPropDefs = {\n ...paddingPropDefs,\n ...widthPropDefs,\n ...heightPropDefs,\n /**\n * Sets the CSS **position** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * position=\"absolute\"\n * position={{ sm: 'absolute', lg: 'sticky' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/position\n */\n position: {\n type: 'enum',\n className: 'rt-r-position',\n values: positionValues,\n responsive: true,\n },\n /**\n * Sets the CSS **inset** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * inset=\"4\"\n * inset=\"100px\"\n * inset={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/inset\n */\n inset: {\n type: 'enum | string',\n className: 'rt-r-inset',\n customProperties: ['--inset'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * top=\"4\"\n * top=\"100px\"\n * top={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/top\n */\n top: {\n type: 'enum | string',\n className: 'rt-r-top',\n customProperties: ['--top'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * right=\"4\"\n * right=\"100px\"\n * right={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/right\n */\n right: {\n type: 'enum | string',\n className: 'rt-r-right',\n customProperties: ['--right'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * bottom=\"4\"\n * bottom=\"100px\"\n * bottom={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/bottom\n */\n bottom: {\n type: 'enum | string',\n className: 'rt-r-bottom',\n customProperties: ['--bottom'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * left=\"4\"\n * left=\"100px\"\n * left={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/left\n */\n left: {\n type: 'enum | string',\n className: 'rt-r-left',\n customProperties: ['--left'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **overflow** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * overflow=\"hidden\"\n * overflow={{ sm: 'hidden', lg: 'visible' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow\n */\n overflow: {\n type: 'enum',\n className: 'rt-r-overflow',\n values: overflowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **overflow-x** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * overflowX=\"hidden\"\n * overflowX={{ sm: 'hidden', md: 'visible' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow\n */\n overflowX: {\n type: 'enum',\n className: 'rt-r-ox',\n values: overflowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **overflow-y** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * overflowY=\"hidden\"\n * overflowY={{ sm: 'hidden', md: 'visible' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow\n */\n overflowY: {\n type: 'enum',\n className: 'rt-r-oy',\n values: overflowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-basis** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * flexBasis=\"0\"\n * flexBasis=\"100%\"\n * flexBasis={{ sm: '200px', lg: 'auto' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis\n */\n flexBasis: {\n type: 'string',\n className: 'rt-r-fb',\n customProperties: ['--flex-basis'],\n responsive: true,\n },\n /**\n * Sets the CSS **flex-shrink** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * flexShrink=\"0\"\n * flexShrink=\"1\"\n * flexShrink={{ sm: '0', lg: '1' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink\n */\n flexShrink: {\n type: 'enum | string',\n className: 'rt-r-fs',\n customProperties: ['--flex-shrink'],\n values: flexShrinkValues,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-grow** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * flexGrow=\"0\"\n * flexGrow=\"1\"\n * flexGrow={{ sm: '0', lg: '1' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow\n */\n flexGrow: {\n type: 'enum | string',\n className: 'rt-r-fg',\n customProperties: ['--flex-grow'],\n values: flexGrowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **grid-area** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridArea=\"header\"\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area\n */\n gridArea: {\n type: 'string',\n className: 'rt-r-ga',\n customProperties: ['--grid-area'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-column** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridColumn=\"1\"\n * gridColumn=\"1 / -1\"\n * gridColumn={{ sm: '1 / 3', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column\n */\n gridColumn: {\n type: 'string',\n className: 'rt-r-gc',\n customProperties: ['--grid-column'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-column-start** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridColumnStart=\"1\"\n * gridColumnStart=\"auto\"\n * gridColumnStart={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-start\n */\n gridColumnStart: {\n type: 'string',\n className: 'rt-r-gcs',\n customProperties: ['--grid-column-start'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-column-end** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridColumnEnd=\"1\"\n * gridColumnEnd=\"auto\"\n * gridColumnEnd={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-end\n */\n gridColumnEnd: {\n type: 'string',\n className: 'rt-r-gce',\n customProperties: ['--grid-column-end'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-row** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridRow=\"1\"\n * gridRow=\"auto\"\n * gridRow={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row\n */\n gridRow: {\n type: 'string',\n className: 'rt-r-gr',\n customProperties: ['--grid-row'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-row-start** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridRowStart=\"1\"\n * gridRowStart=\"auto\"\n * gridRowStart={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-start\n */\n gridRowStart: {\n type: 'string',\n className: 'rt-r-grs',\n customProperties: ['--grid-row-start'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-row-end** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridRowEnd=\"1\"\n * gridRowEnd=\"auto\"\n * gridRowEnd={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-end\n */\n gridRowEnd: {\n type: 'string',\n className: 'rt-r-gre',\n customProperties: ['--grid-row-end'],\n responsive: true,\n },\n /**\n * Sets the CSS **align-self** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * alignSelf=\"center\"\n * alignSelf={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/align-self\n */\n alignSelf: {\n type: 'enum',\n className: 'rt-r-as',\n values: alignSelfValues,\n responsive: true,\n },\n /**\n * Sets the CSS **justify-self** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * justifySelf=\"center\"\n * justifySelf={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/justify-self\n */\n justifySelf: {\n type: 'enum',\n className: 'rt-r-js',\n values: justifySelfValues,\n responsive: true,\n },\n} satisfies {\n position: PropDef<(typeof positionValues)[number]>;\n inset: PropDef<(typeof positionEdgeValues)[number]>;\n top: PropDef<(typeof positionEdgeValues)[number]>;\n right: PropDef<(typeof positionEdgeValues)[number]>;\n bottom: PropDef<(typeof positionEdgeValues)[number]>;\n left: PropDef<(typeof positionEdgeValues)[number]>;\n overflow: PropDef<(typeof overflowValues)[number]>;\n overflowX: PropDef<(typeof overflowValues)[number]>;\n overflowY: PropDef<(typeof overflowValues)[number]>;\n flexBasis: PropDef<string>;\n flexShrink: PropDef<(typeof flexShrinkValues)[number]>;\n flexGrow: PropDef<(typeof flexGrowValues)[number]>;\n gridColumn: PropDef<string>;\n gridColumnStart: PropDef<string>;\n gridColumnEnd: PropDef<string>;\n gridRow: PropDef<string>;\n gridRowStart: PropDef<string>;\n gridRowEnd: PropDef<string>;\n gridArea: PropDef<string>;\n alignSelf: PropDef<(typeof alignSelfValues)[number]>;\n justifySelf: PropDef<(typeof justifySelfValues)[number]>;\n};\n\n// Use all of the imported prop defs to ensure that JSDoc works\ntype LayoutProps = GetPropDefTypes<\n typeof paddingPropDefs & typeof widthPropDefs & typeof heightPropDefs & typeof layoutPropDefs\n>;\n\nexport { layoutPropDefs };\nexport type { LayoutProps };\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"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,SAAAE,IAAA,eAAAC,EAAAH,IAAA,IAAAI,EAAuB,oBACvBC,EAAuB,yBCDvB,IAAAC,EAAsC,oBACzBC,GAAO,EAAAC,KAAc,KACrBC,EAAO,EAAAD,KAAc,KACrBE,GAA4C,EAAAF,KAAc,UCDvE,IAAMG,EAAiB,CAKrB,QAAS,CACP,KAAM,SACR,CACF,ECNA,IAAMC,EAAK,CAAC,MAAO,MAAM,EACnBC,EAAgB,CAAC,OAAQ,SAAU,eAAgB,QAAS,UAAU,EAEtEC,EAAc,CAQlB,GAAI,CAAE,KAAM,OAAQ,OAAQF,EAAI,QAAS,KAAM,EAC/C,GAAGG,EAYH,QAAS,CACP,KAAM,OACN,UAAW,eACX,OAAQF,EACR,WAAY,EACd,CACF,EClCA,IAAAG,EAAuB,
|
|
6
|
-
"names": ["box_exports", "__export", "Box", "__toCommonJS", "React", "import_classnames", "import_radix_ui", "Root", "SlotPrimitive", "Slot", "Slottable", "asChildPropDef", "as", "displayValues", "boxPropDefs", "asChildPropDef", "import_classnames", "breakpoints", "breakpointSet", "hasOwnProperty", "obj", "key", "breakpointSet", "isResponsiveObject", "obj", "key", "
|
|
3
|
+
"sources": ["../../../src/components/box.tsx", "../../../src/components/slot.tsx", "../../../src/props/as-child.prop.ts", "../../../src/components/box.props.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/padding.props.ts", "../../../src/props/height.props.ts", "../../../src/props/width.props.ts", "../../../src/props/layout.props.ts", "../../../src/props/margin.props.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { Slot } from './slot.js';\nimport { boxPropDefs } from './box.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { layoutPropDefs } from '../props/layout.props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { LayoutProps } from '../props/layout.props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { BoxOwnProps } from './box.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype BoxElement = React.ElementRef<'div'>;\ninterface CommonBoxProps extends MarginProps, LayoutProps, BoxOwnProps {}\ntype BoxDivProps = { as?: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype BoxSpanProps = { as: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype BoxProps = CommonBoxProps & (BoxSpanProps | BoxDivProps);\n\nconst Box = React.forwardRef<BoxElement, BoxProps>((props, forwardedRef) => {\n const {\n className,\n asChild,\n as: Tag = 'div',\n ...boxProps\n } = extractProps(props, boxPropDefs, layoutPropDefs, marginPropDefs);\n const Comp = asChild ? Slot : Tag;\n return <Comp {...boxProps} ref={forwardedRef} className={classNames('rt-Box', className)} />;\n});\nBox.displayName = 'Box';\n\nexport { Box };\nexport type { BoxProps };\n", "import { Slot as SlotPrimitive } from 'radix-ui';\nexport const Root = SlotPrimitive.Root;\nexport const Slot = SlotPrimitive.Root;\nexport const Slottable: typeof SlotPrimitive.Slottable = SlotPrimitive.Slottable;\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 { asChildPropDef } from '../props/as-child.prop.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst as = ['div', 'span'] as const;\nconst displayValues = ['none', 'inline', 'inline-block', 'block', 'contents'] as const;\n\nconst boxPropDefs = {\n /**\n * Controls whether to render **div** or **span**\n *\n * @example\n * as=\"div\"\n * as=\"span\"\n */\n as: { type: 'enum', values: as, default: 'div' },\n ...asChildPropDef,\n /**\n * Sets the CSS **display** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * display=\"inline-block\"\n * display={{ sm: 'none', lg: 'block' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/display\n */\n display: {\n type: 'enum',\n className: 'rt-r-display',\n values: displayValues,\n responsive: true,\n },\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n display: PropDef<(typeof displayValues)[number]>;\n};\n\n// Use all of the imported prop defs to ensure that JSDoc works\ntype BoxOwnProps = GetPropDefTypes<typeof boxPropDefs & typeof asChildPropDef>;\n\nexport { boxPropDefs };\nexport type { BoxOwnProps };\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 { GetPropDefTypes, PropDef } from './prop-def.js';\n\nconst paddingValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst paddingPropDefs = {\n /**\n * Sets the CSS **padding** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * p=\"4\"\n * p=\"100px\"\n * p={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding\n */\n p: {\n type: 'enum | string',\n className: 'rt-r-p',\n customProperties: ['--p'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-left** and **padding-right** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * px=\"4\"\n * px=\"100px\"\n * px={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right\n */\n px: {\n type: 'enum | string',\n className: 'rt-r-px',\n customProperties: ['--pl', '--pr'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-top** and **padding-bottom** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * py=\"4\"\n * py=\"100px\"\n * py={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom\n */\n py: {\n type: 'enum | string',\n className: 'rt-r-py',\n customProperties: ['--pt', '--pb'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pt=\"4\"\n * pt=\"100px\"\n * pt={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top\n */\n pt: {\n type: 'enum | string',\n className: 'rt-r-pt',\n customProperties: ['--pt'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pr=\"4\"\n * pr=\"100px\"\n * pr={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right\n */\n pr: {\n type: 'enum | string',\n className: 'rt-r-pr',\n customProperties: ['--pr'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pb=\"4\"\n * pb=\"100px\"\n * pb={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom\n */\n pb: {\n type: 'enum | string',\n className: 'rt-r-pb',\n customProperties: ['--pb'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pl=\"4\"\n * pl=\"100px\"\n * pl={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left\n */\n pl: {\n type: 'enum | string',\n className: 'rt-r-pl',\n customProperties: ['--pl'],\n values: paddingValues,\n responsive: true,\n },\n} satisfies {\n p: PropDef<(typeof paddingValues)[number]>;\n px: PropDef<(typeof paddingValues)[number]>;\n py: PropDef<(typeof paddingValues)[number]>;\n pt: PropDef<(typeof paddingValues)[number]>;\n pr: PropDef<(typeof paddingValues)[number]>;\n pb: PropDef<(typeof paddingValues)[number]>;\n pl: PropDef<(typeof paddingValues)[number]>;\n};\n\ntype PaddingProps = GetPropDefTypes<typeof paddingPropDefs>;\n\nexport { paddingPropDefs };\nexport type { PaddingProps };\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\nconst heightPropDefs = {\n /**\n * Sets the CSS **height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * height=\"100px\"\n * height={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/height\n */\n height: {\n type: 'string',\n className: 'rt-r-h',\n customProperties: ['--height'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minHeight=\"100px\"\n * minHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-height\n */\n minHeight: {\n type: 'string',\n className: 'rt-r-min-h',\n customProperties: ['--min-height'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxHeight=\"100px\"\n * maxHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-height\n */\n maxHeight: {\n type: 'string',\n className: 'rt-r-max-h',\n customProperties: ['--max-height'],\n responsive: true,\n },\n} satisfies {\n height: PropDef<string>;\n minHeight: PropDef<string>;\n maxHeight: PropDef<string>;\n};\n\ntype HeightProps = GetPropDefTypes<typeof heightPropDefs>;\n\nexport { heightPropDefs };\nexport type { HeightProps };\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 { paddingPropDefs } from './padding.props.js';\nimport { heightPropDefs } from './height.props.js';\nimport { widthPropDefs } from './width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from './prop-def.js';\n\nconst overflowValues = ['visible', 'hidden', 'clip', 'scroll', 'auto'] as const;\nconst positionValues = ['static', 'relative', 'absolute', 'fixed', 'sticky'] as const;\n// prettier-ignore\nconst positionEdgeValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-1', '-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9'] as const;\nconst flexShrinkValues = ['0', '1'] as const;\nconst flexGrowValues = ['0', '1'] as const;\nconst alignSelfValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\nconst justifySelfValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\n\nconst layoutPropDefs = {\n ...paddingPropDefs,\n ...widthPropDefs,\n ...heightPropDefs,\n /**\n * Sets the CSS **position** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * position=\"absolute\"\n * position={{ sm: 'absolute', lg: 'sticky' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/position\n */\n position: {\n type: 'enum',\n className: 'rt-r-position',\n values: positionValues,\n responsive: true,\n },\n /**\n * Sets the CSS **inset** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * inset=\"4\"\n * inset=\"100px\"\n * inset={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/inset\n */\n inset: {\n type: 'enum | string',\n className: 'rt-r-inset',\n customProperties: ['--inset'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * top=\"4\"\n * top=\"100px\"\n * top={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/top\n */\n top: {\n type: 'enum | string',\n className: 'rt-r-top',\n customProperties: ['--top'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * right=\"4\"\n * right=\"100px\"\n * right={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/right\n */\n right: {\n type: 'enum | string',\n className: 'rt-r-right',\n customProperties: ['--right'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * bottom=\"4\"\n * bottom=\"100px\"\n * bottom={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/bottom\n */\n bottom: {\n type: 'enum | string',\n className: 'rt-r-bottom',\n customProperties: ['--bottom'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * left=\"4\"\n * left=\"100px\"\n * left={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/left\n */\n left: {\n type: 'enum | string',\n className: 'rt-r-left',\n customProperties: ['--left'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **overflow** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * overflow=\"hidden\"\n * overflow={{ sm: 'hidden', lg: 'visible' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow\n */\n overflow: {\n type: 'enum',\n className: 'rt-r-overflow',\n values: overflowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **overflow-x** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * overflowX=\"hidden\"\n * overflowX={{ sm: 'hidden', md: 'visible' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow\n */\n overflowX: {\n type: 'enum',\n className: 'rt-r-ox',\n values: overflowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **overflow-y** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * overflowY=\"hidden\"\n * overflowY={{ sm: 'hidden', md: 'visible' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow\n */\n overflowY: {\n type: 'enum',\n className: 'rt-r-oy',\n values: overflowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-basis** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * flexBasis=\"0\"\n * flexBasis=\"100%\"\n * flexBasis={{ sm: '200px', lg: 'auto' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis\n */\n flexBasis: {\n type: 'string',\n className: 'rt-r-fb',\n customProperties: ['--flex-basis'],\n responsive: true,\n },\n /**\n * Sets the CSS **flex-shrink** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * flexShrink=\"0\"\n * flexShrink=\"1\"\n * flexShrink={{ sm: '0', lg: '1' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink\n */\n flexShrink: {\n type: 'enum | string',\n className: 'rt-r-fs',\n customProperties: ['--flex-shrink'],\n values: flexShrinkValues,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-grow** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * flexGrow=\"0\"\n * flexGrow=\"1\"\n * flexGrow={{ sm: '0', lg: '1' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow\n */\n flexGrow: {\n type: 'enum | string',\n className: 'rt-r-fg',\n customProperties: ['--flex-grow'],\n values: flexGrowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **grid-area** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridArea=\"header\"\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area\n */\n gridArea: {\n type: 'string',\n className: 'rt-r-ga',\n customProperties: ['--grid-area'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-column** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridColumn=\"1\"\n * gridColumn=\"1 / -1\"\n * gridColumn={{ sm: '1 / 3', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column\n */\n gridColumn: {\n type: 'string',\n className: 'rt-r-gc',\n customProperties: ['--grid-column'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-column-start** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridColumnStart=\"1\"\n * gridColumnStart=\"auto\"\n * gridColumnStart={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-start\n */\n gridColumnStart: {\n type: 'string',\n className: 'rt-r-gcs',\n customProperties: ['--grid-column-start'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-column-end** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridColumnEnd=\"1\"\n * gridColumnEnd=\"auto\"\n * gridColumnEnd={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-end\n */\n gridColumnEnd: {\n type: 'string',\n className: 'rt-r-gce',\n customProperties: ['--grid-column-end'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-row** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridRow=\"1\"\n * gridRow=\"auto\"\n * gridRow={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row\n */\n gridRow: {\n type: 'string',\n className: 'rt-r-gr',\n customProperties: ['--grid-row'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-row-start** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridRowStart=\"1\"\n * gridRowStart=\"auto\"\n * gridRowStart={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-start\n */\n gridRowStart: {\n type: 'string',\n className: 'rt-r-grs',\n customProperties: ['--grid-row-start'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-row-end** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridRowEnd=\"1\"\n * gridRowEnd=\"auto\"\n * gridRowEnd={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-end\n */\n gridRowEnd: {\n type: 'string',\n className: 'rt-r-gre',\n customProperties: ['--grid-row-end'],\n responsive: true,\n },\n /**\n * Sets the CSS **align-self** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * alignSelf=\"center\"\n * alignSelf={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/align-self\n */\n alignSelf: {\n type: 'enum',\n className: 'rt-r-as',\n values: alignSelfValues,\n responsive: true,\n },\n /**\n * Sets the CSS **justify-self** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * justifySelf=\"center\"\n * justifySelf={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/justify-self\n */\n justifySelf: {\n type: 'enum',\n className: 'rt-r-js',\n values: justifySelfValues,\n responsive: true,\n },\n} satisfies {\n position: PropDef<(typeof positionValues)[number]>;\n inset: PropDef<(typeof positionEdgeValues)[number]>;\n top: PropDef<(typeof positionEdgeValues)[number]>;\n right: PropDef<(typeof positionEdgeValues)[number]>;\n bottom: PropDef<(typeof positionEdgeValues)[number]>;\n left: PropDef<(typeof positionEdgeValues)[number]>;\n overflow: PropDef<(typeof overflowValues)[number]>;\n overflowX: PropDef<(typeof overflowValues)[number]>;\n overflowY: PropDef<(typeof overflowValues)[number]>;\n flexBasis: PropDef<string>;\n flexShrink: PropDef<(typeof flexShrinkValues)[number]>;\n flexGrow: PropDef<(typeof flexGrowValues)[number]>;\n gridColumn: PropDef<string>;\n gridColumnStart: PropDef<string>;\n gridColumnEnd: PropDef<string>;\n gridRow: PropDef<string>;\n gridRowStart: PropDef<string>;\n gridRowEnd: PropDef<string>;\n gridArea: PropDef<string>;\n alignSelf: PropDef<(typeof alignSelfValues)[number]>;\n justifySelf: PropDef<(typeof justifySelfValues)[number]>;\n};\n\n// Use all of the imported prop defs to ensure that JSDoc works\ntype LayoutProps = GetPropDefTypes<\n typeof paddingPropDefs & typeof widthPropDefs & typeof heightPropDefs & typeof layoutPropDefs\n>;\n\nexport { layoutPropDefs };\nexport type { LayoutProps };\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"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["box_exports", "__export", "Box", "__toCommonJS", "React", "import_classnames", "import_radix_ui", "Root", "SlotPrimitive", "Slot", "Slottable", "asChildPropDef", "as", "displayValues", "boxPropDefs", "asChildPropDef", "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", "i", "isResponsiveObject", "style", "classes", "propClassName", "getResponsiveClassNames", "propClassNames", "propCustomProperties", "getResponsiveStyles", "mergeStyles", "classNames", "paddingValues", "paddingPropDefs", "heightPropDefs", "widthPropDefs", "overflowValues", "positionValues", "positionEdgeValues", "flexShrinkValues", "flexGrowValues", "alignSelfValues", "justifySelfValues", "layoutPropDefs", "paddingPropDefs", "widthPropDefs", "heightPropDefs", "marginValues", "marginPropDefs", "Box", "props", "forwardedRef", "className", "asChild", "Tag", "boxProps", "extractProps", "boxPropDefs", "layoutPropDefs", "marginPropDefs", "Slot", "classNames"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var nt=Object.create;var _=Object.defineProperty;var at=Object.getOwnPropertyDescriptor;var pt=Object.getOwnPropertyNames;var it=Object.getPrototypeOf,lt=Object.prototype.hasOwnProperty;var ut=(e,t)=>{for(var o in t)_(e,o,{get:t[o],enumerable:!0})},he=(e,t,o,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of pt(t))!lt.call(e,r)&&r!==o&&_(e,r,{get:()=>t[r],enumerable:!(p=at(t,r))||p.enumerable});return e};var b=(e,t,o)=>(o=e!=null?nt(it(e)):{},he(t||!e||!e.__esModule?_(o,"default",{value:e,enumerable:!0}):o,e)),ft=e=>he(_({},"__esModule",{value:!0}),e);var qt={};ut(qt,{Button:()=>ot});module.exports=ft(qt);var E=b(require("react")),tt=b(require("classnames"));var f=b(require("react")),Ae=b(require("classnames")),Me=require("radix-ui"),ze=require("radix-ui/internal");var O={asChild:{type:"boolean"}};var J=["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"],De=["auto","gray","mauve","slate","sage","olive","sand"],be={color:{type:"enum",values:J,default:void 0}},Re={color:{type:"enum",values:J,default:""}};var Q={highContrast:{type:"boolean",className:"rt-high-contrast",default:void 0}};var oe=["none","small","medium","large","full"],xe={radius:{type:"enum",values:oe,default:void 0}};var mt=["1","2","3","4"],ct=["classic","solid","soft","surface","outline","ghost","override"],dt=["solid","translucent"],yt=["solid","translucent"],re={...O,size:{type:"enum",className:"rt-r-size",values:mt,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:ct,default:"solid"},...Re,...Q,...xe,loading:{type:"boolean",className:"rt-loading",default:!1},fullWidth:{type:"boolean",className:"rt-full-width",default:!1},material:{type:"enum",values:yt,default:void 0},panelBackground:{type:"enum",values:dt,default:void 0},flush:{type:"boolean",default:!1}};var ee=b(require("react")),Oe=b(require("classnames"));var X=b(require("classnames"));var Pt=["initial","xs","sm","md","lg","xl"],se=new Set(Pt);function ne(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var gt=new Set(["initial","xs","sm","md","lg","xl"]);function W(e){if(typeof e!="object"||e===null)return!1;for(let t in e)if(gt.has(t))return!0;return!1}function Te({className:e,customProperties:t,...o}){let p=ae({allowArbitraryValues:!0,className:e,...o}),r=vt({customProperties:t,...o});return[p,r]}function ae({allowArbitraryValues:e,value:t,className:o,propValues:p,parseValue:r=i=>i}){let i=[];if(t){if(typeof t=="string"&&p.includes(t))return Ce(o,t,r);if(W(t)){let a=t;for(let s in a){if(!ne(a,s)||!se.has(s))continue;let n=a[s];if(n!==void 0){if(p.includes(n)){let m=Ce(o,n,r),y=s==="initial"?m:`${s}:${m}`;i.push(y)}else if(e){let m=s==="initial"?o:`${s}:${o}`;i.push(m)}}}return i.join(" ")}if(e)return o}}function Ce(e,t,o){let p=e?"-":"",r=o(t),i=r?.startsWith("-"),a=i?"-":"",s=i?r?.substring(1):r;return`${a}${e}${p}${s}`}function vt({customProperties:e,value:t,propValues:o,parseValue:p=r=>r}){let r={};if(!(!t||typeof t=="string"&&o.includes(t))){if(typeof t=="string"&&(r=Object.fromEntries(e.map(i=>[i,t]))),W(t)){let i=t;for(let a in i){if(!ne(i,a)||!se.has(a))continue;let s=i[a];if(!o.includes(s))for(let n of e){let m=a==="initial"?n:`${n}-${a}`;r[m]=s}}}for(let i in r){let a=r[i];a!==void 0&&(r[i]=p(a))}return r}}function pe(...e){let t;for(let o of e)o&&(t===void 0&&(t={}),Object.assign(t,o));return t}function ht(...e){return Object.assign({},...e)}function w(e,...t){let o,p,r={...e},i=ht(...t);for(let a in i){let s=r[a],n=i[a];if(n.default!==void 0&&s===void 0&&(s=n.default),n.type==="enum"&&![n.default,...n.values].includes(s)&&!W(s)&&(s=n.default),r[a]=s,"className"in n&&n.className){delete r[a];let m="responsive"in n;if(!s||W(s)&&!m)continue;if(W(s)&&(n.default!==void 0&&s.initial===void 0&&(s.initial=n.default),n.type==="enum"&&([n.default,...n.values].includes(s.initial)||(s.initial=n.default))),n.type==="enum"){let y=ae({allowArbitraryValues:!1,value:s,className:n.className,propValues:n.values,parseValue:n.parseValue});o=(0,X.default)(o,y);continue}if(n.type==="string"||n.type==="enum | string"){let y=n.type==="string"?[]:n.values,[x,R]=Te({className:n.className,customProperties:n.customProperties,propValues:y,parseValue:n.parseValue,value:s});p=pe(p,R),o=(0,X.default)(o,x);continue}if(n.type==="boolean"&&s){o=(0,X.default)(o,n.className);continue}}}return r.className=(0,X.default)(o,e.className),r.style=pe(p,e.style),r}var A=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Ne={p:{type:"enum | string",className:"rt-r-p",customProperties:["--p"],values:A,responsive:!0},px:{type:"enum | string",className:"rt-r-px",customProperties:["--pl","--pr"],values:A,responsive:!0},py:{type:"enum | string",className:"rt-r-py",customProperties:["--pt","--pb"],values:A,responsive:!0},pt:{type:"enum | string",className:"rt-r-pt",customProperties:["--pt"],values:A,responsive:!0},pr:{type:"enum | string",className:"rt-r-pr",customProperties:["--pr"],values:A,responsive:!0},pb:{type:"enum | string",className:"rt-r-pb",customProperties:["--pb"],values:A,responsive:!0},pl:{type:"enum | string",className:"rt-r-pl",customProperties:["--pl"],values:A,responsive:!0}};var Se={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 H={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 ie=["visible","hidden","clip","scroll","auto"],Dt=["static","relative","absolute","fixed","sticky"],Y=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],bt=["0","1"],Rt=["0","1"],xt=["start","center","end","baseline","stretch"],Ct=["start","center","end","baseline","stretch"],we={...Ne,...H,...Se,position:{type:"enum",className:"rt-r-position",values:Dt,responsive:!0},inset:{type:"enum | string",className:"rt-r-inset",customProperties:["--inset"],values:Y,responsive:!0},top:{type:"enum | string",className:"rt-r-top",customProperties:["--top"],values:Y,responsive:!0},right:{type:"enum | string",className:"rt-r-right",customProperties:["--right"],values:Y,responsive:!0},bottom:{type:"enum | string",className:"rt-r-bottom",customProperties:["--bottom"],values:Y,responsive:!0},left:{type:"enum | string",className:"rt-r-left",customProperties:["--left"],values:Y,responsive:!0},overflow:{type:"enum",className:"rt-r-overflow",values:ie,responsive:!0},overflowX:{type:"enum",className:"rt-r-ox",values:ie,responsive:!0},overflowY:{type:"enum",className:"rt-r-oy",values:ie,responsive:!0},flexBasis:{type:"string",className:"rt-r-fb",customProperties:["--flex-basis"],responsive:!0},flexShrink:{type:"enum | string",className:"rt-r-fs",customProperties:["--flex-shrink"],values:bt,responsive:!0},flexGrow:{type:"enum | string",className:"rt-r-fg",customProperties:["--flex-grow"],values:Rt,responsive:!0},gridArea:{type:"string",className:"rt-r-ga",customProperties:["--grid-area"],responsive:!0},gridColumn:{type:"string",className:"rt-r-gc",customProperties:["--grid-column"],responsive:!0},gridColumnStart:{type:"string",className:"rt-r-gcs",customProperties:["--grid-column-start"],responsive:!0},gridColumnEnd:{type:"string",className:"rt-r-gce",customProperties:["--grid-column-end"],responsive:!0},gridRow:{type:"string",className:"rt-r-gr",customProperties:["--grid-row"],responsive:!0},gridRowStart:{type:"string",className:"rt-r-grs",customProperties:["--grid-row-start"],responsive:!0},gridRowEnd:{type:"string",className:"rt-r-gre",customProperties:["--grid-row-end"],responsive:!0},alignSelf:{type:"enum",className:"rt-r-as",values:xt,responsive:!0},justifySelf:{type:"enum",className:"rt-r-js",values:Ct,responsive:!0}};var M=["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:M,responsive:!0,className:"rt-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:M,responsive:!0,className:"rt-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:M,responsive:!0,className:"rt-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:M,responsive:!0,className:"rt-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:M,responsive:!0,className:"rt-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:M,responsive:!0,className:"rt-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:M,responsive:!0,className:"rt-r-ml",customProperties:["--ml"]}};var Z=require("radix-ui"),To=Z.Slot.Root,Be=Z.Slot.Root,No=Z.Slot.Slottable;var le=["0","1","2","3","4","5","6","7","8","9","10","11","12"],ke={gap:{type:"enum | string",className:"rt-r-gap",customProperties:["--gap"],values:le,responsive:!0},gapX:{type:"enum | string",className:"rt-r-cg",customProperties:["--column-gap"],values:le,responsive:!0},gapY:{type:"enum | string",className:"rt-r-rg",customProperties:["--row-gap"],values:le,responsive:!0}};var Tt=["div","span"],Nt=["none","inline-flex","flex"],St=["row","column","row-reverse","column-reverse"],wt=["start","center","end","baseline","stretch"],Bt=["start","center","end","between"],kt=["nowrap","wrap","wrap-reverse"],Ve={as:{type:"enum",values:Tt,default:"div"},...O,display:{type:"enum",className:"rt-r-display",values:Nt,responsive:!0},direction:{type:"enum",className:"rt-r-fd",values:St,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:wt,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:Bt,parseValue:Vt,responsive:!0},wrap:{type:"enum",className:"rt-r-fw",values:kt,responsive:!0},...ke};function Vt(e){return e==="between"?"space-between":e}var L=ee.forwardRef((e,t)=>{let{className:o,asChild:p,as:r="div",...i}=w(e,Ve,we,j);return ee.createElement(p?Be:r,{...i,ref:t,className:(0,Oe.default)("rt-Flex",o)})});L.displayName="Flex";var g=b(require("react")),Ee=b(require("classnames"));var Ot=["1","2","3"],je={size:{type:"enum",className:"rt-r-size",values:Ot,default:"2",responsive:!0},loading:{type:"boolean",default:!0}};var ue=g.forwardRef((e,t)=>{let{className:o,children:p,loading:r,...i}=w(e,je,j);if(!r)return p;let a=g.createElement("span",{...i,ref:t,className:(0,Ee.default)("rt-Spinner",o)},g.createElement("span",{className:"rt-SpinnerLeaf"}),g.createElement("span",{className:"rt-SpinnerLeaf"}),g.createElement("span",{className:"rt-SpinnerLeaf"}),g.createElement("span",{className:"rt-SpinnerLeaf"}),g.createElement("span",{className:"rt-SpinnerLeaf"}),g.createElement("span",{className:"rt-SpinnerLeaf"}),g.createElement("span",{className:"rt-SpinnerLeaf"}),g.createElement("span",{className:"rt-SpinnerLeaf"}));return p===void 0?a:g.createElement(L,{asChild:!0,position:"relative",align:"center",justify:"center"},g.createElement("span",null,g.createElement("span",{"aria-hidden":!0,style:{display:"contents",visibility:"hidden"},inert:void 0},p),g.createElement(L,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},g.createElement("span",null,a))))});ue.displayName="Spinner";var fe=require("radix-ui"),Fe=fe.VisuallyHidden.Root,Lo=fe.VisuallyHidden.Root;function Ge(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([o,p])=>[o,t(p)]))}function We(e){switch(e){case"1":return"1";case"2":case"3":return"2";case"4":return"3"}}var me=f.forwardRef((e,t)=>{let{size:o=re.size.default}=e,{className:p,children:r,asChild:i,as:a,color:s,radius:n,material:m,panelBackground:y,flush:x,disabled:R=e.loading,...h}=w(e,re,j);f.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 C=m??y,N=f.useRef(null),S=f.useRef(C);S.current=C,f.useEffect(()=>{let T=N.current;if(!T)return;if(C==="translucent"){T.style.setProperty("will-change","backdrop-filter");let G,$=()=>{let rt=getComputedStyle(T).getPropertyValue("--duration-2")||"75ms",st=parseInt(rt)||75;G=setTimeout(()=>{T&&S.current!=="translucent"&&T.style.setProperty("will-change","auto")},st)},ve=new MutationObserver($);return ve.observe(T,{attributes:!0,attributeFilter:["data-material"]}),()=>{G&&clearTimeout(G),ve.disconnect(),T.style.setProperty("will-change","auto")}}else T.style.setProperty("will-change","auto")},[C]);let P=i?Me.Slot.Root:a||"button",D=i||!a||["button","input","textarea","select"].includes(a),d=!i&&(!a||a==="button"),c="type"in h,I=f.useId(),k=e.loading?`${I}-loading`:void 0,F=f.useMemo(()=>typeof r=="string"?r:f.isValidElement(r)&&typeof r.props?.children=="string"?r.props.children:"button",[r]),V=f.useMemo(()=>e.loading?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":k,"aria-label":`${F} (loading)`}:{},[e.loading,k,F]);return f.createElement(P,{"data-disabled":R||void 0,"data-accent-color":s,"data-radius":n,"data-material":C,"data-panel-background":C,"data-flush":x?"true":void 0,...h,...V,ref:(0,ze.composeRefs)(N,t),className:(0,Ae.default)("rt-reset","rt-BaseButton",p),...D&&{disabled:R},...d&&!c?{type:"button"}:{}},e.loading?f.createElement(f.Fragment,null,f.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},r),f.createElement(Fe,null,f.createElement("span",{id:k},F," is loading, please wait..."),r),f.createElement(L,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},f.createElement("span",null,f.createElement(ue,{size:Ge(o,We),"aria-hidden":"true"})))):r)});me.displayName="BaseButton";var B=b(require("react")),Ze=b(require("classnames")),K=require("radix-ui");var z=b(require("react")),Xe=require("radix-ui");var jt=["normal","start","end","both"],Ie={trim:{type:"enum",className:"rt-r-lt",values:jt,responsive:!0}};var Et=["left","center","right"],$e={align:{type:"enum",className:"rt-r-ta",values:Et,responsive:!0}};var Ft=["wrap","nowrap","pretty","balance"],He={wrap:{type:"enum",className:"rt-r-tw",values:Ft,responsive:!0}};var Le={truncate:{type:"boolean",className:"rt-truncate"}};var Gt=["sans","mono","serif"],Ue={font:{type:"enum",className:"rt-r-ff",values:Gt}};var Wt=["thin","extralight","light","regular","medium","semibold","bold","extrabold"],Ke={weight:{type:"enum",className:"rt-r-weight",values:Wt,responsive:!0}};var At=["span","div","label","p"],Mt=["0","1","2","3","4","5","6","7","8","9","10","11","12"],qe={as:{type:"enum",values:At,default:"span"},...O,size:{type:"enum",className:"rt-r-size",values:Mt,responsive:!0},...Ue,...Ke,...$e,...Ie,...Le,...He,...be,...Q};var zt={...qe,...j},ce=z.memo(z.forwardRef((e,t)=>{let{children:o,className:p,asChild:r,as:i="span",color:a,...s}=w(e,zt),n=p?`rt-Text ${p}`:"rt-Text";return r?z.createElement(Xe.Slot.Root,{"data-accent-color":a,...s,ref:t,className:n},o):z.createElement(i,{"data-accent-color":a,...s,ref:t,className:n},o)}));ce.displayName="Text";var l=b(require("react")),_e=b(require("classnames")),U=require("radix-ui");function Ye(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 It=["inherit","light","dark"],$t=["solid","translucent"],Ht=["solid","translucent"],Lt=["90%","95%","100%","105%","110%"],Ut=["sans","mono","serif"],u={...O,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:It,default:"inherit"},accentColor:{type:"enum",values:J,default:"blue"},grayColor:{type:"enum",values:De,default:"slate"},material:{type:"enum",values:Ht,default:"translucent"},panelBackground:{type:"enum",values:$t,default:"translucent"},radius:{type:"enum",values:oe,default:"medium"},scaling:{type:"enum",values:Lt,default:"100%"},fontFamily:{type:"enum",values:Ut,default:"sans"}};var v=()=>{},wr={appearance:u.appearance.default,accentColor:u.accentColor.default,grayColor:u.grayColor.default,resolvedGrayColor:u.grayColor.default,material:u.material.default,panelBackground:u.panelBackground.default,radius:u.radius.default,scaling:u.scaling.default,fontFamily:u.fontFamily.default,onAppearanceChange:v,onAccentColorChange:v,onGrayColorChange:v,onMaterialChange:v,onPanelBackgroundChange:v,onRadiusChange:v,onScalingChange:v,onFontFamilyChange:v},de=l.createContext(void 0);var ye=l.forwardRef((e,t)=>l.useContext(de)===void 0?l.createElement(U.Tooltip.Provider,{delayDuration:200},l.createElement(U.Direction.Provider,{dir:"ltr"},l.createElement(Je,{...e,ref:t}))):l.createElement(Pe,{...e,ref:t}));ye.displayName="Theme";var Je=l.forwardRef((e,t)=>{let{appearance:o=u.appearance.default,accentColor:p=u.accentColor.default,grayColor:r=u.grayColor.default,material:i=u.material.default,panelBackground:a=u.panelBackground.default,radius:s=u.radius.default,scaling:n=u.scaling.default,fontFamily:m=u.fontFamily.default,hasBackground:y=u.hasBackground.default,...x}=e;l.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[R,h]=l.useState(o);l.useEffect(()=>h(o),[o]);let[C,N]=l.useState(p);l.useEffect(()=>N(p),[p]);let[S,P]=l.useState(r);l.useEffect(()=>P(r),[r]);let D=i!==u.material.default?i:a,[d,c]=l.useState(D);l.useEffect(()=>c(D),[D]);let[I,k]=l.useState(a);l.useEffect(()=>k(d),[d]);let[F,V]=l.useState(s);l.useEffect(()=>V(s),[s]);let[T,q]=l.useState(n);l.useEffect(()=>q(n),[n]);let[G,$]=l.useState(m);return l.useEffect(()=>$(m),[m]),l.createElement(Pe,{...x,ref:t,isRoot:!0,hasBackground:y,appearance:R,accentColor:C,grayColor:S,material:d,panelBackground:I,radius:F,scaling:T,fontFamily:G,onAppearanceChange:h,onAccentColorChange:N,onGrayColorChange:P,onMaterialChange:c,onPanelBackgroundChange:k,onRadiusChange:V,onScalingChange:q,onFontFamilyChange:$})});Je.displayName="ThemeRoot";function Kt(){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 Pe=l.forwardRef((e,t)=>{let o=l.useContext(de),{asChild:p,isRoot:r,hasBackground:i,appearance:a=e.appearance??o?.appearance??u.appearance.default,accentColor:s=e.accentColor??o?.accentColor??u.accentColor.default,grayColor:n=e.grayColor??o?.resolvedGrayColor??u.grayColor.default,material:m=e.material??o?.material??u.material.default,panelBackground:y=e.panelBackground??o?.panelBackground??u.panelBackground.default,radius:x=e.radius??o?.radius??u.radius.default,scaling:R=e.scaling??o?.scaling??u.scaling.default,fontFamily:h=e.fontFamily??o?.fontFamily??u.fontFamily.default,onAppearanceChange:C=v,onAccentColorChange:N=v,onGrayColorChange:S=v,onMaterialChange:P=v,onPanelBackgroundChange:D=v,onRadiusChange:d=v,onScalingChange:c=v,onFontFamilyChange:I=v,...k}=e,F=p?U.Slot.Root:"div",V=n==="auto"?Ye(s):n,T=e.appearance==="light"||e.appearance==="dark",q=i===void 0?r||T:i,[G,$]=l.useState(void 0);return l.useEffect(()=>{r&&$(Kt())},[r]),l.createElement(de.Provider,{value:l.useMemo(()=>({appearance:a,accentColor:s,grayColor:n,resolvedGrayColor:V,material:m,panelBackground:y,radius:x,scaling:R,fontFamily:h,onAppearanceChange:C,onAccentColorChange:N,onGrayColorChange:S,onMaterialChange:P,onPanelBackgroundChange:D,onRadiusChange:d,onScalingChange:c,onFontFamilyChange:I}),[a,s,n,V,m,y,x,R,h,C,N,S,P,D,d,c,I])},l.createElement(F,{"data-is-root-theme":r?"true":"false","data-accent-color":s,"data-gray-color":V,"data-has-background":q?"true":"false","data-material":m,"data-panel-background":y,"data-radius":x,"data-scaling":R,"data-font-family":h,"data-os":r?G:void 0,ref:t,...k,className:(0,_e.default)("radix-themes",{light:a==="light",dark:a==="dark"},k.className)}))});Pe.displayName="ThemeImpl";var Qe={content:{type:"ReactNode",required:!0},width:H.width,minWidth:H.minWidth,maxWidth:{...H.maxWidth,default:"360px"}};var ge=B.forwardRef((e,t)=>{let{children:o,className:p,open:r,defaultOpen:i,onOpenChange:a,delayDuration:s,disableHoverableContent:n,content:m,container:y,forceMount:x,...R}=w(e,Qe),h={open:r,defaultOpen:i,onOpenChange:a,delayDuration:s,disableHoverableContent:n};return B.createElement(K.Tooltip.Root,{...h},B.createElement(K.Tooltip.Trigger,{asChild:!0},o),B.createElement(K.Tooltip.Portal,{container:y,forceMount:x},B.createElement(ye,{asChild:!0},B.createElement(K.Tooltip.Content,{sideOffset:4,collisionPadding:10,...R,asChild:!1,ref:t,className:(0,Ze.default)("rt-TooltipContent",p)},B.createElement(ce,{as:"p",className:"rt-TooltipText",size:"1"},m),B.createElement(K.Tooltip.Arrow,{className:"rt-TooltipArrow"})))))});ge.displayName="Tooltip";var te=b(require("react"));function et(e){let t=te.useId(),o=!!e,p=te.useMemo(()=>o?{"aria-describedby":t}:{},[o,t]);return{tooltipId:t,hasTooltip:o,accessibilityProps:p}}var ot=E.forwardRef(({className:e,style:t,tooltip:o,tooltipSide:p="top",tooltipAlign:r="center",tooltipDelayDuration:i,tooltipDisableHoverableContent:a,overrideStyles:s,...n},m)=>{let{tooltipId:y,hasTooltip:x,accessibilityProps:R}=et(o),h=E.useMemo(()=>{if(!s)return;let S={},P=(d,c)=>{c!==void 0&&(S[d]=c)},D=(d,c)=>{c&&(P(`--button-override-${d}color`,c.color),P(`--button-override-${d}background`,c.background),P(`--button-override-${d}background-color`,c.backgroundColor),P(`--button-override-${d}box-shadow`,c.boxShadow),P(`--button-override-${d}filter`,c.filter),P(`--button-override-${d}outline`,c.outline),P(`--button-override-${d}outline-offset`,c.outlineOffset),P(`--button-override-${d}opacity`,c.opacity))};return D("",s.normal),D("hover-",s.hover),D("active-",s.active),D("pressed-",s.pressed),D("open-",s.open),D("disabled-",s.disabled),s.focus&&(P("--button-override-focus-outline",s.focus.outline),P("--button-override-focus-outline-offset",s.focus.outlineOffset)),S},[s]),C=E.useMemo(()=>h?{...h,...t}:t,[h,t]),N=E.createElement(me,{...n,...R,ref:m,className:(0,tt.default)("rt-Button",e),style:C});return x?E.createElement(ge,{content:o,side:p,align:r,delayDuration:i,disableHoverableContent:a,id:y},N):N});ot.displayName="Button";
|
|
1
|
+
"use strict";var mt=Object.create;var U=Object.defineProperty;var ct=Object.getOwnPropertyDescriptor;var dt=Object.getOwnPropertyNames;var yt=Object.getPrototypeOf,gt=Object.prototype.hasOwnProperty;var Pt=(e,t)=>{for(var o in t)U(e,o,{get:t[o],enumerable:!0})},Te=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of dt(t))!gt.call(e,r)&&r!==o&&U(e,r,{get:()=>t[r],enumerable:!(n=ct(t,r))||n.enumerable});return e};var h=(e,t,o)=>(o=e!=null?mt(yt(e)):{},Te(t||!e||!e.__esModule?U(o,"default",{value:e,enumerable:!0}):o,e)),ht=e=>Te(U({},"__esModule",{value:!0}),e);var ao={};Pt(ao,{Button:()=>ft});module.exports=ht(ao);var O=h(require("react")),ut=h(require("classnames"));var y=h(require("react")),qe=h(require("classnames")),Ye=require("radix-ui");var V={asChild:{type:"boolean"}};var _=["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"],Se=["auto","gray","mauve","slate","sage","olive","sand"],Ne={color:{type:"enum",values:_,default:void 0}},we={color:{type:"enum",values:_,default:""}};var q={highContrast:{type:"boolean",className:"rt-high-contrast",default:void 0}};var ae=["none","small","medium","large","full"],Be={radius:{type:"enum",values:ae,default:void 0}};var vt=["1","2","3","4"],Dt=["classic","solid","soft","surface","outline","ghost","override"],bt=["solid","translucent"],Ct=["solid","translucent"],pe={...V,size:{type:"enum",className:"rt-r-size",values:vt,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:Dt,default:"solid"},...we,...q,...Be,loading:{type:"boolean",className:"rt-loading",default:!1},fullWidth:{type:"boolean",className:"rt-full-width",default:!1},material:{type:"enum",values:Ct,default:void 0},panelBackground:{type:"enum",values:bt,default:void 0},flush:{type:"boolean",default:!1}};var J=h(require("react")),ze=h(require("classnames"));var Oe=h(require("classnames"));var xt=[],Rt=new Set;function Tt(e){let t=Object.assign({},...e),o=[],n=[],r=new Set;for(let i in t){let s=t[i],a=s.values??xt,l={key:i,type:s.type,default:s.default,hasDefault:s.default!==void 0,responsive:"responsive"in s,className:s.className,customProperties:s.customProperties,parseValue:s.parseValue,values:a,valueSet:a.length>0?new Set(a):Rt,enumValueSet:s.type==="enum"?new Set([s.default,...a]):void 0};s.className?(o.push(l),r.add(i)):(l.hasDefault||s.type==="enum")&&n.push(l)}return{styling:o,passthrough:n,stylingKeys:r}}var St={children:new WeakMap};function ke(e){let t=St;for(let o=0;o<e.length;o++){let n=e[o],r=t.children.get(n);r===void 0&&(r={children:new WeakMap},t.children.set(n,r)),t=r}return t.compiled??(t.compiled=Tt(e))}var Nt=["initial","xs","sm","md","lg","xl"],ie=new Set(Nt);function le(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var wt=new Set(["initial","xs","sm","md","lg","xl"]);function F(e){if(typeof e!="object"||e===null)return!1;for(let t in e)if(wt.has(t))return!0;return!1}function Y(e,t,o){return t!==void 0?t.has(o):e.includes(o)}function je({className:e,customProperties:t,...o}){let n=ue({allowArbitraryValues:!0,className:e,...o}),r=Bt({customProperties:t,...o});return[n,r]}function ue({allowArbitraryValues:e,value:t,className:o,propValues:n,propValueSet:r,parseValue:i=s=>s}){if(t){if(typeof t=="string")return Y(n,r,t)?Ve(o,t,i):e?o:void 0;if(F(t)){let s=t,a=[];for(let l in s){if(!le(s,l)||!ie.has(l))continue;let p=s[l];if(p!==void 0){if(Y(n,r,p)){let u=Ve(o,p,i),m=l==="initial"?u:`${l}:${u}`;a.push(m)}else if(e){let u=l==="initial"?o:`${l}:${o}`;a.push(u)}}}return a.length>0?a.join(" "):""}if(e)return o}}function Ve(e,t,o){let n=e?"-":"",r=o(t),i=r?.startsWith("-"),s=i?"-":"",a=i?r?.substring(1):r;return`${s}${e}${n}${a}`}function Bt({customProperties:e,value:t,propValues:o,propValueSet:n,parseValue:r=i=>i}){if(!t||typeof t=="string"&&Y(o,n,t))return;let i;if(typeof t=="string"){let s=r(t);i={};for(let a of e)i[a]=s;return i}if(F(t)){let s=t;for(let a in s){if(!le(s,a)||!ie.has(a))continue;let l=s[a];if(l===void 0||Y(o,n,l))continue;let p=r(l);i??(i={});for(let u of e){let m=a==="initial"?u:`${u}-${a}`;i[m]=p}}}return i??{}}function fe(...e){let t;for(let o of e)o&&(t===void 0&&(t={}),Object.assign(t,o));return t}function kt(e,t){let o=e.initial,n=!1;return t.hasDefault&&o===void 0&&(o=t.default,n=!0),t.enumValueSet!==void 0&&!t.enumValueSet.has(o)&&(o=t.default,n=!0),n?{...e,initial:o}:e}function R(e,...t){let{styling:o,passthrough:n,stylingKeys:r}=ke(t),i={};for(let l in e)r.has(l)||(i[l]=e[l]);for(let l=0;l<n.length;l++){let p=n[l],u=i[p.key];if(u===void 0){p.hasDefault&&(i[p.key]=p.default);continue}p.enumValueSet!==void 0&&!p.enumValueSet.has(u)&&!F(u)&&(i[p.key]=p.default)}let s,a=[];for(let l=0;l<o.length;l++){let p=o[l],u=e[p.key];if(u===void 0&&p.hasDefault&&(u=p.default),p.enumValueSet!==void 0&&!p.enumValueSet.has(u)&&!F(u)&&(u=p.default),!!u){if(F(u)){if(!p.responsive)continue;u=kt(u,p)}if(p.type==="enum"){let m=ue({allowArbitraryValues:!1,value:u,className:p.className,propValues:p.values,propValueSet:p.valueSet,parseValue:p.parseValue});m&&a.push(m);continue}if(p.type==="string"||p.type==="enum | string"){let[m,b]=je({className:p.className,customProperties:p.customProperties,propValues:p.type==="string"?[]:p.values,propValueSet:p.type==="string"?void 0:p.valueSet,parseValue:p.parseValue,value:u});b&&(s=fe(s,b)),m&&a.push(m);continue}if(p.type==="boolean"){a.push(p.className);continue}}}return i.className=(0,Oe.default)(a.length>0?a.join(" "):void 0,e.className),i.style=fe(s,e.style),i}var G=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Ee={p:{type:"enum | string",className:"rt-r-p",customProperties:["--p"],values:G,responsive:!0},px:{type:"enum | string",className:"rt-r-px",customProperties:["--pl","--pr"],values:G,responsive:!0},py:{type:"enum | string",className:"rt-r-py",customProperties:["--pt","--pb"],values:G,responsive:!0},pt:{type:"enum | string",className:"rt-r-pt",customProperties:["--pt"],values:G,responsive:!0},pr:{type:"enum | string",className:"rt-r-pr",customProperties:["--pr"],values:G,responsive:!0},pb:{type:"enum | string",className:"rt-r-pb",customProperties:["--pb"],values:G,responsive:!0},pl:{type:"enum | string",className:"rt-r-pl",customProperties:["--pl"],values:G,responsive:!0}};var Fe={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 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 me=["visible","hidden","clip","scroll","auto"],Vt=["static","relative","absolute","fixed","sticky"],L=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],jt=["0","1"],Ot=["0","1"],Et=["start","center","end","baseline","stretch"],Ft=["start","center","end","baseline","stretch"],Ge={...Ee,...M,...Fe,position:{type:"enum",className:"rt-r-position",values:Vt,responsive:!0},inset:{type:"enum | string",className:"rt-r-inset",customProperties:["--inset"],values:L,responsive:!0},top:{type:"enum | string",className:"rt-r-top",customProperties:["--top"],values:L,responsive:!0},right:{type:"enum | string",className:"rt-r-right",customProperties:["--right"],values:L,responsive:!0},bottom:{type:"enum | string",className:"rt-r-bottom",customProperties:["--bottom"],values:L,responsive:!0},left:{type:"enum | string",className:"rt-r-left",customProperties:["--left"],values:L,responsive:!0},overflow:{type:"enum",className:"rt-r-overflow",values:me,responsive:!0},overflowX:{type:"enum",className:"rt-r-ox",values:me,responsive:!0},overflowY:{type:"enum",className:"rt-r-oy",values:me,responsive:!0},flexBasis:{type:"string",className:"rt-r-fb",customProperties:["--flex-basis"],responsive:!0},flexShrink:{type:"enum | string",className:"rt-r-fs",customProperties:["--flex-shrink"],values:jt,responsive:!0},flexGrow:{type:"enum | string",className:"rt-r-fg",customProperties:["--flex-grow"],values:Ot,responsive:!0},gridArea:{type:"string",className:"rt-r-ga",customProperties:["--grid-area"],responsive:!0},gridColumn:{type:"string",className:"rt-r-gc",customProperties:["--grid-column"],responsive:!0},gridColumnStart:{type:"string",className:"rt-r-gcs",customProperties:["--grid-column-start"],responsive:!0},gridColumnEnd:{type:"string",className:"rt-r-gce",customProperties:["--grid-column-end"],responsive:!0},gridRow:{type:"string",className:"rt-r-gr",customProperties:["--grid-row"],responsive:!0},gridRowStart:{type:"string",className:"rt-r-grs",customProperties:["--grid-row-start"],responsive:!0},gridRowEnd:{type:"string",className:"rt-r-gre",customProperties:["--grid-row-end"],responsive:!0},alignSelf:{type:"enum",className:"rt-r-as",values:Et,responsive:!0},justifySelf:{type:"enum",className:"rt-r-js",values:Ft,responsive:!0}};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 X=require("radix-ui"),zo=X.Slot.Root,We=X.Slot.Root,Io=X.Slot.Slottable;var ce=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Ae={gap:{type:"enum | string",className:"rt-r-gap",customProperties:["--gap"],values:ce,responsive:!0},gapX:{type:"enum | string",className:"rt-r-cg",customProperties:["--column-gap"],values:ce,responsive:!0},gapY:{type:"enum | string",className:"rt-r-rg",customProperties:["--row-gap"],values:ce,responsive:!0}};var Gt=["div","span"],Wt=["none","inline-flex","flex"],At=["row","column","row-reverse","column-reverse"],Mt=["start","center","end","baseline","stretch"],zt=["start","center","end","between"],It=["nowrap","wrap","wrap-reverse"],Me={as:{type:"enum",values:Gt,default:"div"},...V,display:{type:"enum",className:"rt-r-display",values:Wt,responsive:!0},direction:{type:"enum",className:"rt-r-fd",values:At,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:Mt,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:zt,parseValue:$t,responsive:!0},wrap:{type:"enum",className:"rt-r-fw",values:It,responsive:!0},...Ae};function $t(e){return e==="between"?"space-between":e}var z=J.forwardRef((e,t)=>{let{className:o,asChild:n,as:r="div",...i}=R(e,Me,Ge,j);return J.createElement(n?We:r,{...i,ref:t,className:(0,ze.default)("rt-Flex",o)})});z.displayName="Flex";var v=h(require("react")),$e=h(require("classnames"));var Ht=["1","2","3"],Ie={size:{type:"enum",className:"rt-r-size",values:Ht,default:"2",responsive:!0},loading:{type:"boolean",default:!0}};var de=v.forwardRef((e,t)=>{let{className:o,children:n,loading:r,...i}=R(e,Ie,j);if(!r)return n;let s=v.createElement("span",{...i,ref:t,className:(0,$e.default)("rt-Spinner",o)},v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}));return n===void 0?s:v.createElement(z,{asChild:!0,position:"relative",align:"center",justify:"center"},v.createElement("span",null,v.createElement("span",{"aria-hidden":!0,style:{display:"contents",visibility:"hidden"},inert:void 0},n),v.createElement(z,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},v.createElement("span",null,s))))});de.displayName="Spinner";var ye=require("radix-ui"),He=ye.VisuallyHidden.Root,nr=ye.VisuallyHidden.Root;var Ke=h(require("react")),Lt="Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.",Le=new Set;function Kt(e){Le.has(e)||(Le.add(e),console.warn(e))}function Q(e){Ke.useEffect(()=>{},[e])}function Ue(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([o,n])=>[o,t(n)]))}function _e(e){switch(e){case"1":return"1";case"2":case"3":return"2";case"4":return"3"}}var ge=y.forwardRef((e,t)=>{let{size:o=pe.size.default}=e,{className:n,children:r,asChild:i,as:s,color:a,radius:l,material:p,panelBackground:u,flush:m,disabled:b=e.loading,...C}=R(e,pe,j);Q(e.panelBackground);let S=p??u,N=i?Ye.Slot.Root:s||"button",w=i||!s||["button","input","textarea","select"].includes(s),P=!i&&(!s||s==="button"),x="type"in C,g=y.useId(),c=e.loading?`${g}-loading`:void 0,k=y.useMemo(()=>typeof r=="string"?r:y.isValidElement(r)&&typeof r.props?.children=="string"?r.props.children:"button",[r]),E=y.useMemo(()=>e.loading?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":c,"aria-label":`${k} (loading)`}:{},[e.loading,c,k]);return y.createElement(N,{"data-disabled":b||void 0,"data-accent-color":a,"data-radius":l,"data-material":S,"data-panel-background":S,"data-flush":m?"true":void 0,...C,...E,ref:t,className:(0,qe.default)("rt-reset","rt-BaseButton",n),...w&&{disabled:b},...P&&!x?{type:"button"}:{}},e.loading?y.createElement(y.Fragment,null,y.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},r),y.createElement(He,null,y.createElement("span",{id:c},k," is loading, please wait..."),r),y.createElement(z,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},y.createElement("span",null,y.createElement(de,{size:Ue(o,_e),"aria-hidden":"true"})))):r)});ge.displayName="BaseButton";var T=h(require("react")),it=h(require("classnames")),$=require("radix-ui");var A=h(require("react")),rt=require("radix-ui");var Ut=["normal","start","end","both"],Xe={trim:{type:"enum",className:"rt-r-lt",values:Ut,responsive:!0}};var _t=["left","center","right"],Je={align:{type:"enum",className:"rt-r-ta",values:_t,responsive:!0}};var qt=["wrap","nowrap","pretty","balance"],Qe={wrap:{type:"enum",className:"rt-r-tw",values:qt,responsive:!0}};var Ze={truncate:{type:"boolean",className:"rt-truncate"}};var Yt=["sans","mono","serif"],et={font:{type:"enum",className:"rt-r-ff",values:Yt}};var Xt=["thin","extralight","light","regular","medium","semibold","bold","extrabold"],tt={weight:{type:"enum",className:"rt-r-weight",values:Xt,responsive:!0}};var Jt=["span","div","label","p"],Qt=["0","1","2","3","4","5","6","7","8","9","10","11","12"],ot={as:{type:"enum",values:Jt,default:"span"},...V,size:{type:"enum",className:"rt-r-size",values:Qt,responsive:!0},...et,...tt,...Je,...Xe,...Ze,...Qe,...Ne,...q};var Zt={...ot,...j},Pe=A.memo(A.forwardRef((e,t)=>{let{children:o,className:n,asChild:r,as:i="span",color:s,...a}=R(e,Zt),l=n?`rt-Text ${n}`:"rt-Text";return r?A.createElement(rt.Slot.Root,{"data-accent-color":s,...a,ref:t,className:l},o):A.createElement(i,{"data-accent-color":s,...a,ref:t,className:l},o)}));Pe.displayName="Text";var d=h(require("react")),nt=h(require("classnames")),I=require("radix-ui"),Z=require("radix-ui/internal");function st(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 he=h(require("react"));function B(e){let[t,o]=he.useState(e),[n,r]=he.useState(e);return Object.is(e,n)||(r(e),o(e)),[t,o]}var eo=["inherit","light","dark"],to=["solid","translucent"],oo=["solid","translucent"],ro=["90%","95%","100%","105%","110%"],so=["sans","mono","serif"],f={...V,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:eo,default:"inherit"},accentColor:{type:"enum",values:_,default:"blue"},grayColor:{type:"enum",values:Se,default:"slate"},material:{type:"enum",values:oo,default:"translucent"},panelBackground:{type:"enum",values:to,default:"translucent"},radius:{type:"enum",values:ae,default:"medium"},scaling:{type:"enum",values:ro,default:"100%"},fontFamily:{type:"enum",values:so,default:"sans"}};var D=()=>{},qr={appearance:f.appearance.default,accentColor:f.accentColor.default,grayColor:f.grayColor.default,resolvedGrayColor:f.grayColor.default,material:f.material.default,panelBackground:f.panelBackground.default,radius:f.radius.default,scaling:f.scaling.default,fontFamily:f.fontFamily.default,onAppearanceChange:D,onAccentColorChange:D,onGrayColorChange:D,onMaterialChange:D,onPanelBackgroundChange:D,onRadiusChange:D,onScalingChange:D,onFontFamilyChange:D},ve=d.createContext(void 0);var De=d.forwardRef((e,t)=>d.useContext(ve)===void 0?d.createElement(I.Tooltip.Provider,{delayDuration:200},d.createElement(I.Direction.Provider,{dir:"ltr"},d.createElement(at,{...e,ref:t}))):d.createElement(be,{...e,ref:t}));De.displayName="Theme";var at=d.forwardRef((e,t)=>{let{appearance:o=f.appearance.default,accentColor:n=f.accentColor.default,grayColor:r=f.grayColor.default,material:i=f.material.default,panelBackground:s=f.panelBackground.default,radius:a=f.radius.default,scaling:l=f.scaling.default,fontFamily:p=f.fontFamily.default,hasBackground:u=f.hasBackground.default,...m}=e;Q(e.panelBackground);let[b,C]=B(o),[S,N]=B(n),[w,P]=B(r),x=i!==f.material.default?i:s,[g,c]=B(x),[k,E]=B(g),[te,H]=B(a),[oe,re]=B(l),[K,se]=B(p);return d.createElement(be,{...m,ref:t,isRoot:!0,hasBackground:u,appearance:b,accentColor:S,grayColor:w,material:g,panelBackground:k,radius:te,scaling:oe,fontFamily:K,onAppearanceChange:C,onAccentColorChange:N,onGrayColorChange:P,onMaterialChange:c,onPanelBackgroundChange:E,onRadiusChange:H,onScalingChange:re,onFontFamilyChange:se})});at.displayName="ThemeRoot";function no(){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 be=d.forwardRef((e,t)=>{let o=d.useContext(ve),{asChild:n,isRoot:r,hasBackground:i,appearance:s=e.appearance??o?.appearance??f.appearance.default,accentColor:a=e.accentColor??o?.accentColor??f.accentColor.default,grayColor:l=e.grayColor??o?.resolvedGrayColor??f.grayColor.default,material:p=e.material??o?.material??f.material.default,panelBackground:u=e.panelBackground??o?.panelBackground??f.panelBackground.default,radius:m=e.radius??o?.radius??f.radius.default,scaling:b=e.scaling??o?.scaling??f.scaling.default,fontFamily:C=e.fontFamily??o?.fontFamily??f.fontFamily.default,onAppearanceChange:S=D,onAccentColorChange:N=D,onGrayColorChange:w=D,onMaterialChange:P=D,onPanelBackgroundChange:x=D,onRadiusChange:g=D,onScalingChange:c=D,onFontFamilyChange:k=D,...E}=e,te=n?I.Slot.Root:"div",H=l==="auto"?st(a):l,oe=e.appearance==="light"||e.appearance==="dark",re=i===void 0?r||oe:i,K=d.useRef(null),se=(0,Z.useComposedRefs)(t,K),xe="data-os"in E;return(0,Z.useLayoutEffect)(()=>{if(!r||xe)return;let ne=K.current;if(!ne)return;let Re=no();if(Re)return ne.setAttribute("data-os",Re),()=>ne.removeAttribute("data-os")},[r,xe]),d.createElement(ve.Provider,{value:d.useMemo(()=>({appearance:s,accentColor:a,grayColor:l,resolvedGrayColor:H,material:p,panelBackground:u,radius:m,scaling:b,fontFamily:C,onAppearanceChange:S,onAccentColorChange:N,onGrayColorChange:w,onMaterialChange:P,onPanelBackgroundChange:x,onRadiusChange:g,onScalingChange:c,onFontFamilyChange:k}),[s,a,l,H,p,u,m,b,C,S,N,w,P,x,g,c,k])},d.createElement(te,{"data-is-root-theme":r?"true":"false","data-accent-color":a,"data-gray-color":H,"data-has-background":re?"true":"false","data-material":p,"data-panel-background":u,"data-radius":m,"data-scaling":b,"data-font-family":C,ref:se,...E,className:(0,nt.default)("radix-themes",{light:s==="light",dark:s==="dark"},E.className)}))});be.displayName="ThemeImpl";var pt={content:{type:"ReactNode",required:!0},width:M.width,minWidth:M.minWidth,maxWidth:{...M.maxWidth,default:"360px"}};var Ce=T.forwardRef((e,t)=>{let{children:o,className:n,open:r,defaultOpen:i,onOpenChange:s,delayDuration:a,disableHoverableContent:l,content:p,container:u,forceMount:m,...b}=R(e,pt),C={open:r,defaultOpen:i,onOpenChange:s,delayDuration:a,disableHoverableContent:l};return T.createElement($.Tooltip.Root,{...C},T.createElement($.Tooltip.Trigger,{asChild:!0},o),T.createElement($.Tooltip.Portal,{container:u,forceMount:m},T.createElement(De,{asChild:!0},T.createElement($.Tooltip.Content,{sideOffset:4,collisionPadding:10,...b,asChild:!1,ref:t,className:(0,it.default)("rt-TooltipContent",n)},T.createElement(Pe,{as:"p",className:"rt-TooltipText",size:"1"},p),T.createElement($.Tooltip.Arrow,{className:"rt-TooltipArrow"})))))});Ce.displayName="Tooltip";var ee=h(require("react"));function lt(e){let t=ee.useId(),o=!!e,n=ee.useMemo(()=>o?{"aria-describedby":t}:{},[o,t]);return{tooltipId:t,hasTooltip:o,accessibilityProps:n}}var ft=O.forwardRef(({className:e,style:t,tooltip:o,tooltipSide:n="top",tooltipAlign:r="center",tooltipDelayDuration:i,tooltipDisableHoverableContent:s,overrideStyles:a,...l},p)=>{let{tooltipId:u,hasTooltip:m,accessibilityProps:b}=lt(o),C=O.useMemo(()=>{if(!a)return;let w={},P=(g,c)=>{c!==void 0&&(w[g]=c)},x=(g,c)=>{c&&(P(`--button-override-${g}color`,c.color),P(`--button-override-${g}background`,c.background),P(`--button-override-${g}background-color`,c.backgroundColor),P(`--button-override-${g}box-shadow`,c.boxShadow),P(`--button-override-${g}filter`,c.filter),P(`--button-override-${g}outline`,c.outline),P(`--button-override-${g}outline-offset`,c.outlineOffset),P(`--button-override-${g}opacity`,c.opacity))};return x("",a.normal),x("hover-",a.hover),x("active-",a.active),x("pressed-",a.pressed),x("open-",a.open),x("disabled-",a.disabled),a.focus&&(P("--button-override-focus-outline",a.focus.outline),P("--button-override-focus-outline-offset",a.focus.outlineOffset)),w},[a]),S=O.useMemo(()=>C?{...C,...t}:t,[C,t]),N=O.createElement(ge,{...l,...b,ref:p,className:(0,ut.default)("rt-Button",e),style:S});return m?O.createElement(Ce,{content:o,side:n,align:r,delayDuration:i,disableHoverableContent:s,id:u},N):N});ft.displayName="Button";
|
|
2
2
|
//# sourceMappingURL=button.js.map
|