@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/text.tsx", "../../../src/helpers/extract-props.ts", "../../../src/props/prop-def.ts", "../../../src/helpers/has-own-property.ts", "../../../src/helpers/is-responsive-object.ts", "../../../src/helpers/get-responsive-styles.ts", "../../../src/helpers/merge-styles.ts", "../../../src/props/margin.props.ts", "../../../src/props/as-child.prop.ts", "../../../src/props/color.prop.ts", "../../../src/props/high-contrast.prop.ts", "../../../src/props/leading-trim.prop.ts", "../../../src/props/text-align.prop.ts", "../../../src/props/text-wrap.prop.ts", "../../../src/props/truncate.prop.ts", "../../../src/props/font-family.prop.ts", "../../../src/props/weight.prop.ts", "../../../src/components/text.props.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { textPropDefs } from './text.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype TextElement = React.ElementRef<'span'>;\ntype TextOwnProps = GetPropDefTypes<typeof textPropDefs>;\ninterface CommonTextProps extends MarginProps, TextOwnProps {}\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>;\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>;\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\nconst mergedPropDefs = { ...textPropDefs, ...marginPropDefs };\n\nconst Text = React.memo(\n React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'span',\n color,\n ...textProps\n } = extractProps(props, mergedPropDefs);\n\n const combinedClassName = className ? `rt-Text ${className}` : 'rt-Text';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...textProps}\n ref={forwardedRef}\n className={combinedClassName}\n >\n {children}\n </Slot.Root>\n );\n }\n\n return (\n <Tag\n data-accent-color={color}\n {...(textProps as React.HTMLAttributes<HTMLElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nText.displayName = 'Text';\n\nexport { Text };\nexport type { TextProps };\n", "import classNames from 'classnames';\n\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef>\n ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T]\n : never;\n\nfunction mergePropDefs<T extends Record<string, PropDef>[]>(...args: T): Record<string, PropDef> {\n return Object.assign({}, ...args);\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<\n P extends { className?: string; style?: React.CSSProperties; [key: string]: any },\n T extends Record<string, PropDef>[]\n>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n let className: string | undefined;\n let style: ReturnType<typeof mergeStyles>;\n const extractedProps = { ...props };\n const allPropDefs = mergePropDefs(...propDefs);\n\n for (const key in allPropDefs) {\n let value = extractedProps[key];\n const propDef = allPropDefs[key];\n\n // Apply prop def defaults\n if (propDef.default !== undefined && value === undefined) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.type === 'enum') {\n const values = [propDef.default, ...propDef.values];\n\n if (!values.includes(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n }\n\n // Apply the value with defaults\n (extractedProps as Record<string, any>)[key] = value;\n\n if ('className' in propDef && propDef.className) {\n delete extractedProps[key];\n\n const isResponsivePropDef = 'responsive' in propDef;\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!value || (isResponsiveObject(value) && !isResponsivePropDef)) {\n continue;\n }\n\n if (isResponsiveObject(value)) {\n // Apply prop def defaults to the `initial` breakpoint\n if (propDef.default !== undefined && value.initial === undefined) {\n value.initial = propDef.default;\n }\n\n // Apply the default value to the `initial` breakpoint when it is not a valid enum value\n if (propDef.type === 'enum') {\n const values = [propDef.default, ...propDef.values];\n\n if (!values.includes(value.initial)) {\n value.initial = propDef.default;\n }\n }\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className,\n propValues: propDef.values,\n parseValue: propDef.parseValue,\n });\n\n className = classNames(className, propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const propDefValues = propDef.type === 'string' ? [] : propDef.values;\n\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className,\n customProperties: propDef.customProperties,\n propValues: propDefValues,\n parseValue: propDef.parseValue,\n value,\n });\n\n style = mergeStyles(style, propCustomProperties);\n className = classNames(className, propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean' && value) {\n // TODO handle responsive boolean props\n className = classNames(className, propDef.className);\n continue;\n }\n }\n }\n\n extractedProps.className = classNames(className, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps;\n}\n\nexport { extractProps };\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({\n allowArbitraryValues,\n value,\n className,\n propValues,\n parseValue = (value) => value,\n}: GetResponsiveClassNamesOptions): string | undefined {\n const classNames: string[] = [];\n\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string' && propValues.includes(value)) {\n return getBaseClassName(className, value, parseValue);\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (propValues.includes(value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.join(' ');\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(\n className: string,\n value: string,\n parseValue: (value: string) => string | undefined\n): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({\n customProperties,\n value,\n propValues,\n parseValue = (value) => value,\n}: GetResponsiveCustomPropertiesOptions) {\n let styles: Record<string, string | undefined> = {};\n\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && propValues.includes(value))) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n styles = Object.fromEntries(customProperties.map((prop) => [prop, value]));\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (propValues.includes(value)) {\n continue;\n }\n\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = value;\n }\n }\n }\n\n for (const key in styles) {\n const value = styles[key];\n if (value !== undefined) {\n styles[key] = parseValue(value);\n }\n }\n\n return styles;\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\n// prettier-ignore\nconst marginValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '-1', '-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9', '-10', '-11', '-12'] as const;\n\nconst marginPropDefs = {\n /**\n * Sets the CSS **margin** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * m=\"4\"\n * m=\"100px\"\n * m={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin\n */\n m: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-m',\n customProperties: ['--m'],\n },\n /**\n * Sets the CSS **margin-left** and **margin-right** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mx=\"4\"\n * mx=\"100px\"\n * mx={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mx: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mx',\n customProperties: ['--ml', '--mr'],\n },\n /**\n * Sets the CSS **margin-top** and **margin-bottom** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * my=\"4\"\n * my=\"100px\"\n * my={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n my: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-my',\n customProperties: ['--mt', '--mb'],\n },\n /**\n * Sets the CSS **margin-top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mt=\"4\"\n * mt=\"100px\"\n * mt={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n */\n mt: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mt',\n customProperties: ['--mt'],\n },\n /**\n * Sets the CSS **margin-right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mr=\"4\"\n * mr=\"100px\"\n * mr={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mr: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mr',\n customProperties: ['--mr'],\n },\n /**\n * Sets the CSS **margin-bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mb=\"4\"\n * mb=\"100px\"\n * mb={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n mb: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mb',\n customProperties: ['--mb'],\n },\n /**\n * Sets the CSS **margin-left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * ml=\"4\"\n * ml=\"100px\"\n * ml={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n */\n ml: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-ml',\n customProperties: ['--ml'],\n },\n} satisfies {\n m: PropDef<(typeof marginValues)[number]>;\n mx: PropDef<(typeof marginValues)[number]>;\n my: PropDef<(typeof marginValues)[number]>;\n mt: PropDef<(typeof marginValues)[number]>;\n mr: PropDef<(typeof marginValues)[number]>;\n mb: PropDef<(typeof marginValues)[number]>;\n ml: PropDef<(typeof marginValues)[number]>;\n};\n\ntype MarginProps = GetPropDefTypes<typeof marginPropDefs>;\n\nexport { marginPropDefs };\nexport type { MarginProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Defines accent color for descendant text components\u00A0with `highContrast={true}`.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst highContrastPropDef = {\n highContrast: {\n type: 'boolean',\n className: 'rt-high-contrast',\n default: undefined,\n },\n} satisfies {\n highContrast: PropDef<boolean>;\n};\n\nexport { highContrastPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst leadingTrimValues = ['normal', 'start', 'end', 'both'] as const;\n\nconst leadingTrimPropDef = {\n trim: {\n type: 'enum',\n className: 'rt-r-lt',\n values: leadingTrimValues,\n responsive: true,\n },\n} satisfies {\n trim: PropDef<(typeof leadingTrimValues)[number]>;\n};\n\nexport { leadingTrimPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textAlignValues = ['left', 'center', 'right'] as const;\n\nconst textAlignPropDef = {\n align: {\n type: 'enum',\n className: 'rt-r-ta',\n values: textAlignValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof textAlignValues)[number]>;\n};\n\nexport { textAlignPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textWrapValues = ['wrap', 'nowrap', 'pretty', 'balance'] as const;\n\nconst textWrapPropDef = {\n wrap: {\n type: 'enum',\n className: 'rt-r-tw',\n values: textWrapValues,\n responsive: true,\n },\n} satisfies {\n wrap: PropDef<(typeof textWrapValues)[number]>;\n};\n\nexport { textWrapPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst truncatePropDef = {\n truncate: {\n type: 'boolean',\n className: 'rt-truncate',\n },\n} satisfies {\n truncate: PropDef<boolean>;\n};\n\nexport { truncatePropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst fontFamilyPropDef = {\n font: {\n type: 'enum',\n className: 'rt-r-ff',\n values: fontFamilies,\n },\n} satisfies {\n font: PropDef<(typeof fontFamilies)[number]>;\n};\n\nexport { fontFamilyPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst weights = ['thin', 'extralight', 'light', 'regular', 'medium', 'semibold', 'bold', 'extrabold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'rt-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['span', 'div', 'label', 'p'] as const;\nconst sizes = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst textPropDefs = {\n as: { type: 'enum', values: as, default: 'span' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { textPropDefs };\n"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,UAAAE,IAAA,eAAAC,EAAAH,IAAA,IAAAI,EAAuB,oBACvBC,EAAqB,oBCDrB,IAAAC,EAAuB,
|
|
6
|
-
"names": ["text_exports", "__export", "Text", "__toCommonJS", "React", "import_radix_ui", "import_classnames", "breakpoints", "breakpointSet", "hasOwnProperty", "obj", "key", "breakpointSet", "isResponsiveObject", "obj", "key", "
|
|
3
|
+
"sources": ["../../../src/components/text.tsx", "../../../src/helpers/extract-props.ts", "../../../src/helpers/compile-prop-defs.ts", "../../../src/props/prop-def.ts", "../../../src/helpers/has-own-property.ts", "../../../src/helpers/is-responsive-object.ts", "../../../src/helpers/get-responsive-styles.ts", "../../../src/helpers/merge-styles.ts", "../../../src/props/margin.props.ts", "../../../src/props/as-child.prop.ts", "../../../src/props/color.prop.ts", "../../../src/props/high-contrast.prop.ts", "../../../src/props/leading-trim.prop.ts", "../../../src/props/text-align.prop.ts", "../../../src/props/text-wrap.prop.ts", "../../../src/props/truncate.prop.ts", "../../../src/props/font-family.prop.ts", "../../../src/props/weight.prop.ts", "../../../src/components/text.props.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { textPropDefs } from './text.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype TextElement = React.ElementRef<'span'>;\ntype TextOwnProps = GetPropDefTypes<typeof textPropDefs>;\ninterface CommonTextProps extends MarginProps, TextOwnProps {}\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>;\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>;\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\nconst mergedPropDefs = { ...textPropDefs, ...marginPropDefs };\n\nconst Text = React.memo(\n React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'span',\n color,\n ...textProps\n } = extractProps(props, mergedPropDefs);\n\n const combinedClassName = className ? `rt-Text ${className}` : 'rt-Text';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...textProps}\n ref={forwardedRef}\n className={combinedClassName}\n >\n {children}\n </Slot.Root>\n );\n }\n\n return (\n <Tag\n data-accent-color={color}\n {...(textProps as React.HTMLAttributes<HTMLElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nText.displayName = 'Text';\n\nexport { Text };\nexport type { TextProps };\n", "import classNames from 'classnames';\n\nimport { getCompiledPropDefs } from './compile-prop-defs.js';\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type { CompiledPropDef } from './compile-prop-defs.js';\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef> ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T] : never;\n\ntype ResponsiveValue = Record<string, string | undefined>;\n\n/**\n * Fills in the `initial` breakpoint of a responsive value from the prop def's\n * default, and coerces an invalid `initial` enum value back to that default.\n *\n * Returns the value untouched when nothing needs changing, and a copy otherwise\n * \u2014 callers routinely hoist responsive objects to module scope, so mutating the\n * caller's object would corrupt it for every later render.\n */\nfunction normalizeResponsiveValue(value: ResponsiveValue, propDef: CompiledPropDef) {\n let initial = value.initial;\n let changed = false;\n\n if (propDef.hasDefault && initial === undefined) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(initial)) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n return changed ? { ...value, initial } : value;\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<P extends { className?: string; style?: React.CSSProperties; [key: string]: any }, T extends Record<string, PropDef>[]>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n const { styling, passthrough, stylingKeys } = getCompiledPropDefs(propDefs);\n\n // Copy the props that survive to the element rather than spreading and then\n // deleting the styling keys. Deleting off a spread demotes the object to\n // dictionary mode in V8, and this object is on the render path of every\n // component in the library.\n const extractedProps: Record<string, any> = {};\n for (const key in props) {\n if (stylingKeys.has(key)) continue;\n extractedProps[key] = props[key];\n }\n\n for (let i = 0; i < passthrough.length; i++) {\n const propDef = passthrough[i];\n const value = extractedProps[propDef.key];\n\n if (value === undefined) {\n if (propDef.hasDefault) extractedProps[propDef.key] = propDef.default;\n continue;\n }\n\n // Fall back to the default when the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n extractedProps[propDef.key] = propDef.default;\n }\n }\n\n let style: ReturnType<typeof mergeStyles>;\n const classes: string[] = [];\n\n for (let i = 0; i < styling.length; i++) {\n const propDef = styling[i];\n let value = props[propDef.key];\n\n // Apply prop def defaults\n if (value === undefined && propDef.hasDefault) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n\n if (!value) continue;\n\n if (isResponsiveObject(value)) {\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!propDef.responsive) continue;\n value = normalizeResponsiveValue(value, propDef);\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className!,\n propValues: propDef.values,\n propValueSet: propDef.valueSet,\n parseValue: propDef.parseValue,\n });\n\n if (propClassName) classes.push(propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className!,\n customProperties: propDef.customProperties!,\n // `string` prop defs have no enum values, so every value is arbitrary\n propValues: propDef.type === 'string' ? [] : propDef.values,\n propValueSet: propDef.type === 'string' ? undefined : propDef.valueSet,\n parseValue: propDef.parseValue,\n value,\n });\n\n if (propCustomProperties) style = mergeStyles(style, propCustomProperties);\n if (propClassNames) classes.push(propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean') {\n // TODO handle responsive boolean props\n classes.push(propDef.className!);\n continue;\n }\n }\n\n extractedProps.className = classNames(classes.length > 0 ? classes.join(' ') : undefined, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps as ReturnType<typeof extractProps<P, T>>;\n}\n\nexport { extractProps };\n", "import type { PropDef } from '../props/prop-def.js';\n\n/**\n * A prop def pre-processed into the exact shape `extractProps` needs at render\n * time. Everything that can be derived from the static prop def \u2014 enum\n * membership sets, whether the def is responsive, whether it carries a default\n * \u2014 is computed once here instead of on every render.\n */\ninterface CompiledPropDef {\n key: string;\n type: PropDef['type'];\n default: unknown;\n hasDefault: boolean;\n responsive: boolean;\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n /** The prop def's own enum values, kept for the responsive class name helpers. */\n values: readonly string[];\n /** O(1) membership for `values`. */\n valueSet: ReadonlySet<string>;\n /**\n * `values` plus the default, used to coerce invalid enum values back to the\n * default. Only present for `type: 'enum'` \u2014 `'enum | string'` props accept\n * arbitrary strings and must not be coerced.\n */\n enumValueSet?: ReadonlySet<unknown>;\n}\n\ninterface CompiledPropDefs {\n /** Defs that contribute a class name and/or custom properties. */\n styling: CompiledPropDef[];\n /**\n * Defs that pass through to the element but still need a default applied or\n * an invalid enum value coerced. Defs that can do neither are omitted\n * entirely \u2014 they are already correct as passed.\n */\n passthrough: CompiledPropDef[];\n /** Keys consumed by `styling`, so they can be skipped when copying props. */\n stylingKeys: ReadonlySet<string>;\n}\n\nconst EMPTY_VALUES: readonly string[] = [];\nconst EMPTY_SET: ReadonlySet<string> = new Set();\n\nfunction compile(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n const merged: Record<string, PropDef> = Object.assign({}, ...propDefs);\n const styling: CompiledPropDef[] = [];\n const passthrough: CompiledPropDef[] = [];\n const stylingKeys = new Set<string>();\n\n for (const key in merged) {\n // The PropDef union is narrowed per-field below; reading the optional\n // members off the union directly is what the runtime actually needs.\n const def = merged[key] as PropDef & {\n default?: unknown;\n values?: readonly string[];\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n responsive?: true;\n };\n\n const values = def.values ?? EMPTY_VALUES;\n const compiled: CompiledPropDef = {\n key,\n type: def.type,\n default: def.default,\n hasDefault: def.default !== undefined,\n responsive: 'responsive' in def,\n className: def.className,\n customProperties: def.customProperties,\n parseValue: def.parseValue,\n values,\n valueSet: values.length > 0 ? new Set(values) : EMPTY_SET,\n enumValueSet: def.type === 'enum' ? new Set<unknown>([def.default, ...values]) : undefined,\n };\n\n if (def.className) {\n styling.push(compiled);\n stylingKeys.add(key);\n } else if (compiled.hasDefault || def.type === 'enum') {\n // Anything else is copied through untouched, so there is nothing to do.\n passthrough.push(compiled);\n }\n }\n\n return { styling, passthrough, stylingKeys };\n}\n\ninterface CacheNode {\n children: WeakMap<object, CacheNode>;\n compiled?: CompiledPropDefs;\n}\n\nconst cacheRoot: CacheNode = { children: new WeakMap() };\n\n/**\n * Compiles a set of prop defs, memoized on the identity of the prop def objects\n * themselves. Components always pass the same module-level constants, so after\n * the first render of a given component this is a couple of WeakMap lookups\n * instead of merging 50-odd prop defs into a fresh object.\n */\nfunction getCompiledPropDefs(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n let node = cacheRoot;\n\n for (let i = 0; i < propDefs.length; i++) {\n const propDef = propDefs[i];\n let child = node.children.get(propDef);\n if (child === undefined) {\n child = { children: new WeakMap() };\n node.children.set(propDef, child);\n }\n node = child;\n }\n\n return (node.compiled ??= compile(propDefs));\n}\n\nexport { getCompiledPropDefs };\nexport type { CompiledPropDef, CompiledPropDefs };\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\n/**\n * Membership test against a prop def's enum values. Callers that already hold a\n * compiled prop def pass `propValueSet` for an O(1) lookup; the handful of call\n * sites that build options inline fall back to scanning the array.\n */\nfunction includesValue(propValues: string[] | readonly string[], propValueSet: ReadonlySet<string> | undefined, value: string): boolean {\n return propValueSet !== undefined ? propValueSet.has(value) : propValues.includes(value);\n}\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({ allowArbitraryValues, value, className, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveClassNamesOptions): string | undefined {\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n if (includesValue(propValues, propValueSet, value)) {\n return getBaseClassName(className, value, parseValue);\n }\n return allowArbitraryValues ? className : undefined;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n const classNames: string[] = [];\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (includesValue(propValues, propValueSet, value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.length > 0 ? classNames.join(' ') : '';\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(className: string, value: string, parseValue: (value: string) => string | undefined): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({ customProperties, value, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveCustomPropertiesOptions) {\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && includesValue(propValues, propValueSet, value))) {\n return undefined;\n }\n\n let styles: Record<string, string | undefined> | undefined;\n\n if (typeof value === 'string') {\n const parsed = parseValue(value);\n styles = {};\n for (const customProperty of customProperties) {\n styles[customProperty] = parsed;\n }\n return styles;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (value === undefined || includesValue(propValues, propValueSet, value)) {\n continue;\n }\n\n const parsed = parseValue(value);\n styles ??= {};\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = parsed;\n }\n }\n }\n\n return styles ?? {};\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\n// prettier-ignore\nconst marginValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '-1', '-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9', '-10', '-11', '-12'] as const;\n\nconst marginPropDefs = {\n /**\n * Sets the CSS **margin** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * m=\"4\"\n * m=\"100px\"\n * m={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin\n */\n m: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-m',\n customProperties: ['--m'],\n },\n /**\n * Sets the CSS **margin-left** and **margin-right** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mx=\"4\"\n * mx=\"100px\"\n * mx={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mx: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mx',\n customProperties: ['--ml', '--mr'],\n },\n /**\n * Sets the CSS **margin-top** and **margin-bottom** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * my=\"4\"\n * my=\"100px\"\n * my={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n my: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-my',\n customProperties: ['--mt', '--mb'],\n },\n /**\n * Sets the CSS **margin-top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mt=\"4\"\n * mt=\"100px\"\n * mt={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n */\n mt: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mt',\n customProperties: ['--mt'],\n },\n /**\n * Sets the CSS **margin-right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mr=\"4\"\n * mr=\"100px\"\n * mr={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mr: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mr',\n customProperties: ['--mr'],\n },\n /**\n * Sets the CSS **margin-bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mb=\"4\"\n * mb=\"100px\"\n * mb={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n mb: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mb',\n customProperties: ['--mb'],\n },\n /**\n * Sets the CSS **margin-left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * ml=\"4\"\n * ml=\"100px\"\n * ml={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n */\n ml: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-ml',\n customProperties: ['--ml'],\n },\n} satisfies {\n m: PropDef<(typeof marginValues)[number]>;\n mx: PropDef<(typeof marginValues)[number]>;\n my: PropDef<(typeof marginValues)[number]>;\n mt: PropDef<(typeof marginValues)[number]>;\n mr: PropDef<(typeof marginValues)[number]>;\n mb: PropDef<(typeof marginValues)[number]>;\n ml: PropDef<(typeof marginValues)[number]>;\n};\n\ntype MarginProps = GetPropDefTypes<typeof marginPropDefs>;\n\nexport { marginPropDefs };\nexport type { MarginProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Defines accent color for descendant text components\u00A0with `highContrast={true}`.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst highContrastPropDef = {\n highContrast: {\n type: 'boolean',\n className: 'rt-high-contrast',\n default: undefined,\n },\n} satisfies {\n highContrast: PropDef<boolean>;\n};\n\nexport { highContrastPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst leadingTrimValues = ['normal', 'start', 'end', 'both'] as const;\n\nconst leadingTrimPropDef = {\n trim: {\n type: 'enum',\n className: 'rt-r-lt',\n values: leadingTrimValues,\n responsive: true,\n },\n} satisfies {\n trim: PropDef<(typeof leadingTrimValues)[number]>;\n};\n\nexport { leadingTrimPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textAlignValues = ['left', 'center', 'right'] as const;\n\nconst textAlignPropDef = {\n align: {\n type: 'enum',\n className: 'rt-r-ta',\n values: textAlignValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof textAlignValues)[number]>;\n};\n\nexport { textAlignPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textWrapValues = ['wrap', 'nowrap', 'pretty', 'balance'] as const;\n\nconst textWrapPropDef = {\n wrap: {\n type: 'enum',\n className: 'rt-r-tw',\n values: textWrapValues,\n responsive: true,\n },\n} satisfies {\n wrap: PropDef<(typeof textWrapValues)[number]>;\n};\n\nexport { textWrapPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst truncatePropDef = {\n truncate: {\n type: 'boolean',\n className: 'rt-truncate',\n },\n} satisfies {\n truncate: PropDef<boolean>;\n};\n\nexport { truncatePropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst fontFamilyPropDef = {\n font: {\n type: 'enum',\n className: 'rt-r-ff',\n values: fontFamilies,\n },\n} satisfies {\n font: PropDef<(typeof fontFamilies)[number]>;\n};\n\nexport { fontFamilyPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst weights = ['thin', 'extralight', 'light', 'regular', 'medium', 'semibold', 'bold', 'extrabold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'rt-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['span', 'div', 'label', 'p'] as const;\nconst sizes = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst textPropDefs = {\n as: { type: 'enum', values: as, default: 'span' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { textPropDefs };\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["text_exports", "__export", "Text", "__toCommonJS", "React", "import_radix_ui", "import_classnames", "EMPTY_VALUES", "EMPTY_SET", "compile", "propDefs", "merged", "styling", "passthrough", "stylingKeys", "key", "def", "values", "compiled", "cacheRoot", "getCompiledPropDefs", "node", "i", "propDef", "child", "breakpoints", "breakpointSet", "hasOwnProperty", "obj", "key", "breakpointSet", "isResponsiveObject", "obj", "key", "includesValue", "propValues", "propValueSet", "value", "getResponsiveStyles", "className", "customProperties", "args", "responsiveClassNames", "getResponsiveClassNames", "responsiveCustomProperties", "getResponsiveCustomProperties", "allowArbitraryValues", "parseValue", "getBaseClassName", "isResponsiveObject", "object", "classNames", "bp", "hasOwnProperty", "breakpointSet", "baseClassName", "bpClassName", "delimiter", "matchedValue", "isNegative", "minus", "absoluteValue", "styles", "parsed", "customProperty", "bpProperty", "mergeStyles", "styles", "result", "style", "normalizeResponsiveValue", "value", "propDef", "initial", "changed", "extractProps", "props", "propDefs", "styling", "passthrough", "stylingKeys", "getCompiledPropDefs", "extractedProps", "key", "i", "isResponsiveObject", "style", "classes", "propClassName", "getResponsiveClassNames", "propClassNames", "propCustomProperties", "getResponsiveStyles", "mergeStyles", "classNames", "marginValues", "marginPropDefs", "asChildPropDef", "accentColors", "colorPropDef", "accentColors", "highContrastPropDef", "leadingTrimValues", "leadingTrimPropDef", "textAlignValues", "textAlignPropDef", "textWrapValues", "textWrapPropDef", "truncatePropDef", "fontFamilies", "fontFamilyPropDef", "weights", "weightPropDef", "as", "sizes", "textPropDefs", "asChildPropDef", "fontFamilyPropDef", "weightPropDef", "textAlignPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "colorPropDef", "highContrastPropDef", "mergedPropDefs", "textPropDefs", "marginPropDefs", "Text", "props", "forwardedRef", "children", "className", "asChild", "Tag", "color", "textProps", "extractProps", "combinedClassName"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";"use client";var go=Object.create;var we=Object.defineProperty;var ho=Object.getOwnPropertyDescriptor;var vo=Object.getOwnPropertyNames;var Co=Object.getPrototypeOf,bo=Object.prototype.hasOwnProperty;var Ro=(e,t)=>{for(var o in t)we(e,o,{get:t[o],enumerable:!0})},yt=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of vo(t))!bo.call(e,s)&&s!==o&&we(e,s,{get:()=>t[s],enumerable:!(i=ho(t,s))||i.enumerable});return e};var y=(e,t,o)=>(o=e!=null?go(Co(e)):{},yt(t||!e||!e.__esModule?we(o,"default",{value:e,enumerable:!0}):o,e)),To=e=>yt(we({},"__esModule",{value:!0}),e);var Lr={};Ro(Lr,{ThemePanel:()=>fo,ThemePanelContent:()=>Pt});module.exports=To(Lr);var r=y(require("react")),mo=require("radix-ui/internal"),co=require("react-dom");var gt=require("radix-ui"),ht=gt.AccessibleIcon.Root;var Be=y(require("react")),Rt=y(require("classnames"));var Ne=require("radix-ui"),Hr=Ne.Slot.Root,me=Ne.Slot.Root,Or=Ne.Slot.Slottable;var S={asChild:{type:"boolean"}};var Do=["div","span"],xo=["none","inline","inline-block","block","contents"],vt={as:{type:"enum",values:Do,default:"div"},...S,display:{type:"enum",className:"rt-r-display",values:xo,responsive:!0}};var ve=y(require("classnames"));var wo=["initial","xs","sm","md","lg","xl"],Ye=new Set(wo);function Je(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var No=new Set(["initial","xs","sm","md","lg","xl"]);function ee(e){if(typeof e!="object"||e===null)return!1;for(let t in e)if(No.has(t))return!0;return!1}function I({className:e,customProperties:t,...o}){let i=ce({allowArbitraryValues:!0,className:e,...o}),s=So({customProperties:t,...o});return[i,s]}function ce({allowArbitraryValues:e,value:t,className:o,propValues:i,parseValue:s=l=>l}){let l=[];if(t){if(typeof t=="string"&&i.includes(t))return Ct(o,t,s);if(ee(t)){let n=t;for(let a in n){if(!Je(n,a)||!Ye.has(a))continue;let p=n[a];if(p!==void 0){if(i.includes(p)){let f=Ct(o,p,s),P=a==="initial"?f:`${a}:${f}`;l.push(P)}else if(e){let f=a==="initial"?o:`${a}:${o}`;l.push(f)}}}return l.join(" ")}if(e)return o}}function Ct(e,t,o){let i=e?"-":"",s=o(t),l=s?.startsWith("-"),n=l?"-":"",a=l?s?.substring(1):s;return`${n}${e}${i}${a}`}function So({customProperties:e,value:t,propValues:o,parseValue:i=s=>s}){let s={};if(!(!t||typeof t=="string"&&o.includes(t))){if(typeof t=="string"&&(s=Object.fromEntries(e.map(l=>[l,t]))),ee(t)){let l=t;for(let n in l){if(!Je(l,n)||!Ye.has(n))continue;let a=l[n];if(!o.includes(a))for(let p of e){let f=n==="initial"?p:`${p}-${n}`;s[f]=a}}}for(let l in s){let n=s[l];n!==void 0&&(s[l]=i(n))}return s}}function te(...e){let t;for(let o of e)o&&(t===void 0&&(t={}),Object.assign(t,o));return t}function Bo(...e){return Object.assign({},...e)}function B(e,...t){let o,i,s={...e},l=Bo(...t);for(let n in l){let a=s[n],p=l[n];if(p.default!==void 0&&a===void 0&&(a=p.default),p.type==="enum"&&![p.default,...p.values].includes(a)&&!ee(a)&&(a=p.default),s[n]=a,"className"in p&&p.className){delete s[n];let f="responsive"in p;if(!a||ee(a)&&!f)continue;if(ee(a)&&(p.default!==void 0&&a.initial===void 0&&(a.initial=p.default),p.type==="enum"&&([p.default,...p.values].includes(a.initial)||(a.initial=p.default))),p.type==="enum"){let P=ce({allowArbitraryValues:!1,value:a,className:p.className,propValues:p.values,parseValue:p.parseValue});o=(0,ve.default)(o,P);continue}if(p.type==="string"||p.type==="enum | string"){let P=p.type==="string"?[]:p.values,[R,h]=I({className:p.className,customProperties:p.customProperties,propValues:P,parseValue:p.parseValue,value:a});i=te(i,h),o=(0,ve.default)(o,R);continue}if(p.type==="boolean"&&a){o=(0,ve.default)(o,p.className);continue}}}return s.className=(0,ve.default)(o,e.className),s.style=te(i,e.style),s}var oe=["0","1","2","3","4","5","6","7","8","9","10","11","12"],bt={p:{type:"enum | string",className:"rt-r-p",customProperties:["--p"],values:oe,responsive:!0},px:{type:"enum | string",className:"rt-r-px",customProperties:["--pl","--pr"],values:oe,responsive:!0},py:{type:"enum | string",className:"rt-r-py",customProperties:["--pt","--pb"],values:oe,responsive:!0},pt:{type:"enum | string",className:"rt-r-pt",customProperties:["--pt"],values:oe,responsive:!0},pr:{type:"enum | string",className:"rt-r-pr",customProperties:["--pr"],values:oe,responsive:!0},pb:{type:"enum | string",className:"rt-r-pb",customProperties:["--pb"],values:oe,responsive:!0},pl:{type:"enum | string",className:"rt-r-pl",customProperties:["--pl"],values:oe,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 W={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 Qe=["visible","hidden","clip","scroll","auto"],ko=["static","relative","absolute","fixed","sticky"],Ce=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],Eo=["0","1"],Vo=["0","1"],Lo=["start","center","end","baseline","stretch"],jo=["start","center","end","baseline","stretch"],ue={...bt,...W,...Se,position:{type:"enum",className:"rt-r-position",values:ko,responsive:!0},inset:{type:"enum | string",className:"rt-r-inset",customProperties:["--inset"],values:Ce,responsive:!0},top:{type:"enum | string",className:"rt-r-top",customProperties:["--top"],values:Ce,responsive:!0},right:{type:"enum | string",className:"rt-r-right",customProperties:["--right"],values:Ce,responsive:!0},bottom:{type:"enum | string",className:"rt-r-bottom",customProperties:["--bottom"],values:Ce,responsive:!0},left:{type:"enum | string",className:"rt-r-left",customProperties:["--left"],values:Ce,responsive:!0},overflow:{type:"enum",className:"rt-r-overflow",values:Qe,responsive:!0},overflowX:{type:"enum",className:"rt-r-ox",values:Qe,responsive:!0},overflowY:{type:"enum",className:"rt-r-oy",values:Qe,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:Eo,responsive:!0},flexGrow:{type:"enum | string",className:"rt-r-fg",customProperties:["--flex-grow"],values:Vo,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:Lo,responsive:!0},justifySelf:{type:"enum",className:"rt-r-js",values:jo,responsive:!0}};var re=["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"],E={m:{type:"enum | string",values:re,responsive:!0,className:"rt-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:re,responsive:!0,className:"rt-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:re,responsive:!0,className:"rt-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:re,responsive:!0,className:"rt-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:re,responsive:!0,className:"rt-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:re,responsive:!0,className:"rt-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:re,responsive:!0,className:"rt-r-ml",customProperties:["--ml"]}};var se=Be.forwardRef((e,t)=>{let{className:o,asChild:i,as:s="div",...l}=B(e,vt,ue,E);return Be.createElement(i?me:s,{...l,ref:t,className:(0,Rt.default)("rt-Box",o)})});se.displayName="Box";var J=y(require("react")),It=y(require("classnames"));var b=y(require("react")),Vt=y(require("classnames")),Lt=require("radix-ui"),jt=require("radix-ui/internal");var ke=["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"],Tt=["auto","gray","mauve","slate","sage","olive","sand"],Ee={color:{type:"enum",values:ke,default:void 0}},Dt={color:{type:"enum",values:ke,default:""}};var fe={highContrast:{type:"boolean",className:"rt-high-contrast",default:void 0}};var et=["none","small","medium","large","full"],Ve={radius:{type:"enum",values:et,default:void 0}};var Ao=["1","2","3","4"],Ho=["classic","solid","soft","surface","outline","ghost","override"],Oo=["solid","translucent"],Mo=["solid","translucent"],tt={...S,size:{type:"enum",className:"rt-r-size",values:Ao,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:Ho,default:"solid"},...Dt,...fe,...Ve,loading:{type:"boolean",className:"rt-loading",default:!1},fullWidth:{type:"boolean",className:"rt-full-width",default:!1},material:{type:"enum",values:Mo,default:void 0},panelBackground:{type:"enum",values:Oo,default:void 0},flush:{type:"boolean",default:!1}};var je=y(require("react")),wt=y(require("classnames"));var ot=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Le={gap:{type:"enum | string",className:"rt-r-gap",customProperties:["--gap"],values:ot,responsive:!0},gapX:{type:"enum | string",className:"rt-r-cg",customProperties:["--column-gap"],values:ot,responsive:!0},gapY:{type:"enum | string",className:"rt-r-rg",customProperties:["--row-gap"],values:ot,responsive:!0}};var Go=["div","span"],Fo=["none","inline-flex","flex"],Io=["row","column","row-reverse","column-reverse"],Wo=["start","center","end","baseline","stretch"],zo=["start","center","end","between"],$o=["nowrap","wrap","wrap-reverse"],xt={as:{type:"enum",values:Go,default:"div"},...S,display:{type:"enum",className:"rt-r-display",values:Fo,responsive:!0},direction:{type:"enum",className:"rt-r-fd",values:Io,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:Wo,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:zo,parseValue:Ko,responsive:!0},wrap:{type:"enum",className:"rt-r-fw",values:$o,responsive:!0},...Le};function Ko(e){return e==="between"?"space-between":e}var N=je.forwardRef((e,t)=>{let{className:o,asChild:i,as:s="div",...l}=B(e,xt,ue,E);return je.createElement(i?me:s,{...l,ref:t,className:(0,wt.default)("rt-Flex",o)})});N.displayName="Flex";var V=y(require("react")),St=y(require("classnames"));var Zo=["1","2","3"],Nt={size:{type:"enum",className:"rt-r-size",values:Zo,default:"2",responsive:!0},loading:{type:"boolean",default:!0}};var rt=V.forwardRef((e,t)=>{let{className:o,children:i,loading:s,...l}=B(e,Nt,E);if(!s)return i;let n=V.createElement("span",{...l,ref:t,className:(0,St.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 i===void 0?n:V.createElement(N,{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},i),V.createElement(N,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},V.createElement("span",null,n))))});rt.displayName="Spinner";var st=require("radix-ui"),Bt=st.VisuallyHidden.Root,Ms=st.VisuallyHidden.Root;function kt(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([o,i])=>[o,t(i)]))}function Et(e){switch(e){case"1":return"1";case"2":case"3":return"2";case"4":return"3"}}var be=b.forwardRef((e,t)=>{let{size:o=tt.size.default}=e,{className:i,children:s,asChild:l,as:n,color:a,radius:p,material:f,panelBackground:P,flush:R,disabled:h=e.loading,...v}=B(e,tt,E);b.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 g=f??P,T=b.useRef(null),L=b.useRef(g);L.current=g,b.useEffect(()=>{let A=T.current;if(!A)return;if(g==="translucent"){A.style.setProperty("will-change","backdrop-filter");let U,m=()=>{let Y=getComputedStyle(A).getPropertyValue("--duration-2")||"75ms",M=parseInt(Y)||75;U=setTimeout(()=>{A&&L.current!=="translucent"&&A.style.setProperty("will-change","auto")},M)},C=new MutationObserver(m);return C.observe(A,{attributes:!0,attributeFilter:["data-material"]}),()=>{U&&clearTimeout(U),C.disconnect(),A.style.setProperty("will-change","auto")}}else A.style.setProperty("will-change","auto")},[g]);let w=l?Lt.Slot.Root:n||"button",k=l||!n||["button","input","textarea","select"].includes(n),D=!l&&(!n||n==="button"),x="type"in v,K=b.useId(),O=e.loading?`${K}-loading`:void 0,G=b.useMemo(()=>typeof s=="string"?s:b.isValidElement(s)&&typeof s.props?.children=="string"?s.props.children:"button",[s]),F=b.useMemo(()=>e.loading?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":O,"aria-label":`${G} (loading)`}:{},[e.loading,O,G]);return b.createElement(w,{"data-disabled":h||void 0,"data-accent-color":a,"data-radius":p,"data-material":g,"data-panel-background":g,"data-flush":R?"true":void 0,...v,...F,ref:(0,jt.composeRefs)(T,t),className:(0,Vt.default)("rt-reset","rt-BaseButton",i),...k&&{disabled:h},...D&&!x?{type:"button"}:{}},e.loading?b.createElement(b.Fragment,null,b.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},s),b.createElement(Bt,null,b.createElement("span",{id:O},G," is loading, please wait..."),s),b.createElement(N,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},b.createElement("span",null,b.createElement(rt,{size:kt(o,Et),"aria-hidden":"true"})))):s)});be.displayName="BaseButton";var z=y(require("react")),Ft=y(require("classnames")),Pe=require("radix-ui");var ne=y(require("react")),Ht=require("radix-ui");var Uo=["normal","start","end","both"],Ae={trim:{type:"enum",className:"rt-r-lt",values:Uo,responsive:!0}};var qo=["left","center","right"],He={align:{type:"enum",className:"rt-r-ta",values:qo,responsive:!0}};var _o=["wrap","nowrap","pretty","balance"],Oe={wrap:{type:"enum",className:"rt-r-tw",values:_o,responsive:!0}};var Me={truncate:{type:"boolean",className:"rt-truncate"}};var Xo=["sans","mono","serif"],Ge={font:{type:"enum",className:"rt-r-ff",values:Xo}};var Yo=["thin","extralight","light","regular","medium","semibold","bold","extrabold"],Fe={weight:{type:"enum",className:"rt-r-weight",values:Yo,responsive:!0}};var Jo=["span","div","label","p"],Qo=["0","1","2","3","4","5","6","7","8","9","10","11","12"],At={as:{type:"enum",values:Jo,default:"span"},...S,size:{type:"enum",className:"rt-r-size",values:Qo,responsive:!0},...Ge,...Fe,...He,...Ae,...Me,...Oe,...Ee,...fe};var er={...At,...E},q=ne.memo(ne.forwardRef((e,t)=>{let{children:o,className:i,asChild:s,as:l="span",color:n,...a}=B(e,er),p=i?`rt-Text ${i}`:"rt-Text";return s?ne.createElement(Ht.Slot.Root,{"data-accent-color":n,...a,ref:t,className:p},o):ne.createElement(l,{"data-accent-color":n,...a,ref:t,className:p},o)}));q.displayName="Text";var u=y(require("react")),Ot=y(require("classnames")),de=require("radix-ui");function Ie(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 tr=["inherit","light","dark"],or=["solid","translucent"],rr=["solid","translucent"],sr=["90%","95%","100%","105%","110%"],nr=["sans","mono","serif"],d={...S,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:tr,default:"inherit"},accentColor:{type:"enum",values:ke,default:"blue"},grayColor:{type:"enum",values:Tt,default:"slate"},material:{type:"enum",values:rr,default:"translucent"},panelBackground:{type:"enum",values:or,default:"translucent"},radius:{type:"enum",values:et,default:"medium"},scaling:{type:"enum",values:sr,default:"100%"},fontFamily:{type:"enum",values:nr,default:"sans"}};var j=()=>{},ar={appearance:d.appearance.default,accentColor:d.accentColor.default,grayColor:d.grayColor.default,resolvedGrayColor:d.grayColor.default,material:d.material.default,panelBackground:d.panelBackground.default,radius:d.radius.default,scaling:d.scaling.default,fontFamily:d.fontFamily.default,onAppearanceChange:j,onAccentColorChange:j,onGrayColorChange:j,onMaterialChange:j,onPanelBackgroundChange:j,onRadiusChange:j,onScalingChange:j,onFontFamilyChange:j},We=u.createContext(void 0);function Re(){return u.useContext(We)??ar}var _=u.forwardRef((e,t)=>u.useContext(We)===void 0?u.createElement(de.Tooltip.Provider,{delayDuration:200},u.createElement(de.Direction.Provider,{dir:"ltr"},u.createElement(Mt,{...e,ref:t}))):u.createElement(nt,{...e,ref:t}));_.displayName="Theme";var Mt=u.forwardRef((e,t)=>{let{appearance:o=d.appearance.default,accentColor:i=d.accentColor.default,grayColor:s=d.grayColor.default,material:l=d.material.default,panelBackground:n=d.panelBackground.default,radius:a=d.radius.default,scaling:p=d.scaling.default,fontFamily:f=d.fontFamily.default,hasBackground:P=d.hasBackground.default,...R}=e;u.useEffect(()=>{e.panelBackground!==void 0&&console.warn("Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.")},[e.panelBackground]);let[h,v]=u.useState(o);u.useEffect(()=>v(o),[o]);let[g,T]=u.useState(i);u.useEffect(()=>T(i),[i]);let[L,w]=u.useState(s);u.useEffect(()=>w(s),[s]);let k=l!==d.material.default?l:n,[D,x]=u.useState(k);u.useEffect(()=>x(k),[k]);let[K,O]=u.useState(n);u.useEffect(()=>O(D),[D]);let[G,F]=u.useState(a);u.useEffect(()=>F(a),[a]);let[A,Z]=u.useState(p);u.useEffect(()=>Z(p),[p]);let[U,m]=u.useState(f);return u.useEffect(()=>m(f),[f]),u.createElement(nt,{...R,ref:t,isRoot:!0,hasBackground:P,appearance:h,accentColor:g,grayColor:L,material:D,panelBackground:K,radius:G,scaling:A,fontFamily:U,onAppearanceChange:v,onAccentColorChange:T,onGrayColorChange:w,onMaterialChange:x,onPanelBackgroundChange:O,onRadiusChange:F,onScalingChange:Z,onFontFamilyChange:m})});Mt.displayName="ThemeRoot";function pr(){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 nt=u.forwardRef((e,t)=>{let o=u.useContext(We),{asChild:i,isRoot:s,hasBackground:l,appearance:n=e.appearance??o?.appearance??d.appearance.default,accentColor:a=e.accentColor??o?.accentColor??d.accentColor.default,grayColor:p=e.grayColor??o?.resolvedGrayColor??d.grayColor.default,material:f=e.material??o?.material??d.material.default,panelBackground:P=e.panelBackground??o?.panelBackground??d.panelBackground.default,radius:R=e.radius??o?.radius??d.radius.default,scaling:h=e.scaling??o?.scaling??d.scaling.default,fontFamily:v=e.fontFamily??o?.fontFamily??d.fontFamily.default,onAppearanceChange:g=j,onAccentColorChange:T=j,onGrayColorChange:L=j,onMaterialChange:w=j,onPanelBackgroundChange:k=j,onRadiusChange:D=j,onScalingChange:x=j,onFontFamilyChange:K=j,...O}=e,G=i?de.Slot.Root:"div",F=p==="auto"?Ie(a):p,A=e.appearance==="light"||e.appearance==="dark",Z=l===void 0?s||A:l,[U,m]=u.useState(void 0);return u.useEffect(()=>{s&&m(pr())},[s]),u.createElement(We.Provider,{value:u.useMemo(()=>({appearance:n,accentColor:a,grayColor:p,resolvedGrayColor:F,material:f,panelBackground:P,radius:R,scaling:h,fontFamily:v,onAppearanceChange:g,onAccentColorChange:T,onGrayColorChange:L,onMaterialChange:w,onPanelBackgroundChange:k,onRadiusChange:D,onScalingChange:x,onFontFamilyChange:K}),[n,a,p,F,f,P,R,h,v,g,T,L,w,k,D,x,K])},u.createElement(G,{"data-is-root-theme":s?"true":"false","data-accent-color":a,"data-gray-color":F,"data-has-background":Z?"true":"false","data-material":f,"data-panel-background":P,"data-radius":R,"data-scaling":h,"data-font-family":v,"data-os":s?U:void 0,ref:t,...O,className:(0,Ot.default)("radix-themes",{light:n==="light",dark:n==="dark"},O.className)}))});nt.displayName="ThemeImpl";var Gt={content:{type:"ReactNode",required:!0},width:W.width,minWidth:W.minWidth,maxWidth:{...W.maxWidth,default:"360px"}};var X=z.forwardRef((e,t)=>{let{children:o,className:i,open:s,defaultOpen:l,onOpenChange:n,delayDuration:a,disableHoverableContent:p,content:f,container:P,forceMount:R,...h}=B(e,Gt),v={open:s,defaultOpen:l,onOpenChange:n,delayDuration:a,disableHoverableContent:p};return z.createElement(Pe.Tooltip.Root,{...v},z.createElement(Pe.Tooltip.Trigger,{asChild:!0},o),z.createElement(Pe.Tooltip.Portal,{container:P,forceMount:R},z.createElement(_,{asChild:!0},z.createElement(Pe.Tooltip.Content,{sideOffset:4,collisionPadding:10,...h,asChild:!1,ref:t,className:(0,Ft.default)("rt-TooltipContent",i)},z.createElement(q,{as:"p",className:"rt-TooltipText",size:"1"},f),z.createElement(Pe.Tooltip.Arrow,{className:"rt-TooltipArrow"})))))});X.displayName="Tooltip";var ze=y(require("react"));function $e(e){let t=ze.useId(),o=!!e,i=ze.useMemo(()=>o?{"aria-describedby":t}:{},[o,t]);return{tooltipId:t,hasTooltip:o,accessibilityProps:i}}var at=J.forwardRef(({className:e,style:t,tooltip:o,tooltipSide:i="top",tooltipAlign:s="center",tooltipDelayDuration:l,tooltipDisableHoverableContent:n,overrideStyles:a,...p},f)=>{let{tooltipId:P,hasTooltip:R,accessibilityProps:h}=$e(o),v=J.useMemo(()=>{if(!a)return;let L={},w=(D,x)=>{x!==void 0&&(L[D]=x)},k=(D,x)=>{x&&(w(`--button-override-${D}color`,x.color),w(`--button-override-${D}background`,x.background),w(`--button-override-${D}background-color`,x.backgroundColor),w(`--button-override-${D}box-shadow`,x.boxShadow),w(`--button-override-${D}filter`,x.filter),w(`--button-override-${D}outline`,x.outline),w(`--button-override-${D}outline-offset`,x.outlineOffset),w(`--button-override-${D}opacity`,x.opacity))};return k("",a.normal),k("hover-",a.hover),k("active-",a.active),k("pressed-",a.pressed),k("open-",a.open),k("disabled-",a.disabled),a.focus&&(w("--button-override-focus-outline",a.focus.outline),w("--button-override-focus-outline-offset",a.focus.outlineOffset)),L},[a]),g=J.useMemo(()=>v?{...v,...t}:t,[v,t]),T=J.createElement(be,{...p,...h,ref:f,className:(0,It.default)("rt-Button",e),style:g});return R?J.createElement(X,{content:o,side:i,align:s,delayDuration:l,disableHoverableContent:n,id:P},T):T});at.displayName="Button";var Ke=y(require("react")),zt=y(require("classnames"));var ir=["div","span"],lr=["none","inline-grid","grid"],mr=["1","2","3","4","5","6","7","8","9"],cr=["1","2","3","4","5","6","7","8","9"],ur=["row","column","dense","row-dense","column-dense"],fr=["start","center","end","baseline","stretch"],dr=["start","center","end","between"],Pr=["start","center","end","baseline","between","around","evenly","stretch"],yr=["start","center","end","baseline","stretch"],pt={as:{type:"enum",values:ir,default:"div"},...S,display:{type:"enum",className:"rt-r-display",values:lr,responsive:!0},areas:{type:"string",className:"rt-r-gta",customProperties:["--grid-template-areas"],responsive:!0},columns:{type:"enum | string",className:"rt-r-gtc",customProperties:["--grid-template-columns"],values:mr,parseValue:Wt,responsive:!0},rows:{type:"enum | string",className:"rt-r-gtr",customProperties:["--grid-template-rows"],values:cr,parseValue:Wt,responsive:!0},flow:{type:"enum",className:"rt-r-gaf",values:ur,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:fr,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:dr,parseValue:gr,responsive:!0},alignContent:{type:"enum",className:"rt-r-ac",values:Pr,parseValue:hr,responsive:!0},justifyItems:{type:"enum",className:"rt-r-ji",values:yr,responsive:!0},...Le};function Wt(e){return pt.columns.values.includes(e)?e:e?.match(/^\d+$/)?`repeat(${e}, minmax(0, 1fr))`:e}function gr(e){return e==="between"?"space-between":e}function hr(e){return e==="between"?"space-between":e==="around"?"space-around":e==="evenly"?"space-evenly":e}var Te=Ke.forwardRef((e,t)=>{let{className:o,asChild:i,as:s="div",...l}=B(e,pt,ue,E);return Ke.createElement(i?me:s,{...l,ref:t,className:(0,zt.default)("rt-Grid",o)})});Te.displayName="Grid";var ae=y(require("react")),Kt=require("radix-ui");var vr=["h1","h2","h3","h4","h5","h6"],Cr=["0","1","2","3","4","5","6","7","8","9","10","11","12"],$t={as:{type:"enum",values:vr,default:"h1"},...S,size:{type:"enum",className:"rt-r-size",values:Cr,default:"6",responsive:!0},...Ge,...Fe,...He,...Ae,...Me,...Oe,...Ee,...fe};var br={...$t,...E},Ze=ae.memo(ae.forwardRef((e,t)=>{let{children:o,className:i,asChild:s,as:l="h1",color:n,...a}=B(e,br),p=i?`rt-Heading ${i}`:"rt-Heading";return s?ae.createElement(Kt.Slot.Root,{"data-accent-color":n,...a,ref:t,className:p},o):ae.createElement(l,{"data-accent-color":n,...a,ref:t,className:p},o)}));Ze.displayName="Heading";var De=y(require("react")),Zt=y(require("classnames"));var it=De.forwardRef(({className:e,tooltip:t,tooltipSide:o="top",tooltipAlign:i="center",tooltipDelayDuration:s,tooltipDisableHoverableContent:l,...n},a)=>{let{tooltipId:p,hasTooltip:f,accessibilityProps:P}=$e(t),R="aria-label"in n&&n["aria-label"],h="aria-labelledby"in n&&n["aria-labelledby"],v="children"in n&&n.children;!R&&!h&&!v&&console.error(`IconButton: Icon buttons must have an accessible name. Please provide either:
|
|
1
|
+
"use strict";"use client";var To=Object.create;var Te=Object.defineProperty;var xo=Object.getOwnPropertyDescriptor;var wo=Object.getOwnPropertyNames;var No=Object.getPrototypeOf,So=Object.prototype.hasOwnProperty;var Bo=(e,t)=>{for(var o in t)Te(e,o,{get:t[o],enumerable:!0})},vt=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of wo(t))!So.call(e,n)&&n!==o&&Te(e,n,{get:()=>t[n],enumerable:!(a=xo(t,n))||a.enumerable});return e};var P=(e,t,o)=>(o=e!=null?To(No(e)):{},vt(t||!e||!e.__esModule?Te(o,"default",{value:e,enumerable:!0}):o,e)),ko=e=>vt(Te({},"__esModule",{value:!0}),e);var Ur={};Bo(Ur,{ThemePanel:()=>bo,ThemePanelContent:()=>ht});module.exports=ko(Ur);var r=P(require("react")),ho=require("radix-ui/internal"),vo=require("react-dom");var Ct=require("radix-ui"),bt=Ct.AccessibleIcon.Root;var Be=P(require("react")),Nt=P(require("classnames"));var xe=require("radix-ui"),Yr=xe.Slot.Root,ie=xe.Slot.Root,Xr=xe.Slot.Slottable;var N={asChild:{type:"boolean"}};var Vo=["div","span"],Eo=["none","inline","inline-block","block","contents"],Rt={as:{type:"enum",values:Vo,default:"div"},...N,display:{type:"enum",className:"rt-r-display",values:Eo,responsive:!0}};var xt=P(require("classnames"));var Lo=[],jo=new Set;function Ao(e){let t=Object.assign({},...e),o=[],a=[],n=new Set;for(let i in t){let s=t[i],p=s.values??Lo,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:p,valueSet:p.length>0?new Set(p):jo,enumValueSet:s.type==="enum"?new Set([s.default,...p]):void 0};s.className?(o.push(l),n.add(i)):(l.hasDefault||s.type==="enum")&&a.push(l)}return{styling:o,passthrough:a,stylingKeys:n}}var Mo={children:new WeakMap};function Dt(e){let t=Mo;for(let o=0;o<e.length;o++){let a=e[o],n=t.children.get(a);n===void 0&&(n={children:new WeakMap},t.children.set(a,n)),t=n}return t.compiled??(t.compiled=Ao(e))}var Oo=["initial","xs","sm","md","lg","xl"],Qe=new Set(Oo);function et(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Ho=new Set(["initial","xs","sm","md","lg","xl"]);function J(e){if(typeof e!="object"||e===null)return!1;for(let t in e)if(Ho.has(t))return!0;return!1}function we(e,t,o){return t!==void 0?t.has(o):e.includes(o)}function Ne({className:e,customProperties:t,...o}){let a=le({allowArbitraryValues:!0,className:e,...o}),n=Go({customProperties:t,...o});return[a,n]}function le({allowArbitraryValues:e,value:t,className:o,propValues:a,propValueSet:n,parseValue:i=s=>s}){if(t){if(typeof t=="string")return we(a,n,t)?Tt(o,t,i):e?o:void 0;if(J(t)){let s=t,p=[];for(let l in s){if(!et(s,l)||!Qe.has(l))continue;let m=s[l];if(m!==void 0){if(we(a,n,m)){let u=Tt(o,m,i),y=l==="initial"?u:`${l}:${u}`;p.push(y)}else if(e){let u=l==="initial"?o:`${l}:${o}`;p.push(u)}}}return p.length>0?p.join(" "):""}if(e)return o}}function Tt(e,t,o){let a=e?"-":"",n=o(t),i=n?.startsWith("-"),s=i?"-":"",p=i?n?.substring(1):n;return`${s}${e}${a}${p}`}function Go({customProperties:e,value:t,propValues:o,propValueSet:a,parseValue:n=i=>i}){if(!t||typeof t=="string"&&we(o,a,t))return;let i;if(typeof t=="string"){let s=n(t);i={};for(let p of e)i[p]=s;return i}if(J(t)){let s=t;for(let p in s){if(!et(s,p)||!Qe.has(p))continue;let l=s[p];if(l===void 0||we(o,a,l))continue;let m=n(l);i??(i={});for(let u of e){let y=p==="initial"?u:`${u}-${p}`;i[y]=m}}}return i??{}}function Q(...e){let t;for(let o of e)o&&(t===void 0&&(t={}),Object.assign(t,o));return t}function Wo(e,t){let o=e.initial,a=!1;return t.hasDefault&&o===void 0&&(o=t.default,a=!0),t.enumValueSet!==void 0&&!t.enumValueSet.has(o)&&(o=t.default,a=!0),a?{...e,initial:o}:e}function S(e,...t){let{styling:o,passthrough:a,stylingKeys:n}=Dt(t),i={};for(let l in e)n.has(l)||(i[l]=e[l]);for(let l=0;l<a.length;l++){let m=a[l],u=i[m.key];if(u===void 0){m.hasDefault&&(i[m.key]=m.default);continue}m.enumValueSet!==void 0&&!m.enumValueSet.has(u)&&!J(u)&&(i[m.key]=m.default)}let s,p=[];for(let l=0;l<o.length;l++){let m=o[l],u=e[m.key];if(u===void 0&&m.hasDefault&&(u=m.default),m.enumValueSet!==void 0&&!m.enumValueSet.has(u)&&!J(u)&&(u=m.default),!!u){if(J(u)){if(!m.responsive)continue;u=Wo(u,m)}if(m.type==="enum"){let y=le({allowArbitraryValues:!1,value:u,className:m.className,propValues:m.values,propValueSet:m.valueSet,parseValue:m.parseValue});y&&p.push(y);continue}if(m.type==="string"||m.type==="enum | string"){let[y,h]=Ne({className:m.className,customProperties:m.customProperties,propValues:m.type==="string"?[]:m.values,propValueSet:m.type==="string"?void 0:m.valueSet,parseValue:m.parseValue,value:u});h&&(s=Q(s,h)),y&&p.push(y);continue}if(m.type==="boolean"){p.push(m.className);continue}}}return i.className=(0,xt.default)(p.length>0?p.join(" "):void 0,e.className),i.style=Q(s,e.style),i}var ee=["0","1","2","3","4","5","6","7","8","9","10","11","12"],wt={p:{type:"enum | string",className:"rt-r-p",customProperties:["--p"],values:ee,responsive:!0},px:{type:"enum | string",className:"rt-r-px",customProperties:["--pl","--pr"],values:ee,responsive:!0},py:{type:"enum | string",className:"rt-r-py",customProperties:["--pt","--pb"],values:ee,responsive:!0},pt:{type:"enum | string",className:"rt-r-pt",customProperties:["--pt"],values:ee,responsive:!0},pr:{type:"enum | string",className:"rt-r-pr",customProperties:["--pr"],values:ee,responsive:!0},pb:{type:"enum | string",className:"rt-r-pb",customProperties:["--pb"],values:ee,responsive:!0},pl:{type:"enum | string",className:"rt-r-pl",customProperties:["--pl"],values:ee,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 W={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 tt=["visible","hidden","clip","scroll","auto"],Fo=["static","relative","absolute","fixed","sticky"],he=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],Io=["0","1"],zo=["0","1"],$o=["start","center","end","baseline","stretch"],Ko=["start","center","end","baseline","stretch"],me={...wt,...W,...Se,position:{type:"enum",className:"rt-r-position",values:Fo,responsive:!0},inset:{type:"enum | string",className:"rt-r-inset",customProperties:["--inset"],values:he,responsive:!0},top:{type:"enum | string",className:"rt-r-top",customProperties:["--top"],values:he,responsive:!0},right:{type:"enum | string",className:"rt-r-right",customProperties:["--right"],values:he,responsive:!0},bottom:{type:"enum | string",className:"rt-r-bottom",customProperties:["--bottom"],values:he,responsive:!0},left:{type:"enum | string",className:"rt-r-left",customProperties:["--left"],values:he,responsive:!0},overflow:{type:"enum",className:"rt-r-overflow",values:tt,responsive:!0},overflowX:{type:"enum",className:"rt-r-ox",values:tt,responsive:!0},overflowY:{type:"enum",className:"rt-r-oy",values:tt,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:Io,responsive:!0},flexGrow:{type:"enum | string",className:"rt-r-fg",customProperties:["--flex-grow"],values:zo,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:$o,responsive:!0},justifySelf:{type:"enum",className:"rt-r-js",values:Ko,responsive:!0}};var te=["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"],k={m:{type:"enum | string",values:te,responsive:!0,className:"rt-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:te,responsive:!0,className:"rt-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:te,responsive:!0,className:"rt-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:te,responsive:!0,className:"rt-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:te,responsive:!0,className:"rt-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:te,responsive:!0,className:"rt-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:te,responsive:!0,className:"rt-r-ml",customProperties:["--ml"]}};var oe=Be.forwardRef((e,t)=>{let{className:o,asChild:a,as:n="div",...i}=S(e,Rt,me,k);return Be.createElement(a?ie:n,{...i,ref:t,className:(0,Nt.default)("rt-Box",o)})});oe.displayName="Box";var _=P(require("react")),Ut=P(require("classnames"));var B=P(require("react")),Gt=P(require("classnames")),Wt=require("radix-ui");var ke=["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"],St=["auto","gray","mauve","slate","sage","olive","sand"],Ve={color:{type:"enum",values:ke,default:void 0}},Bt={color:{type:"enum",values:ke,default:""}};var ce={highContrast:{type:"boolean",className:"rt-high-contrast",default:void 0}};var ot=["none","small","medium","large","full"],Ee={radius:{type:"enum",values:ot,default:void 0}};var Zo=["1","2","3","4"],Uo=["classic","solid","soft","surface","outline","ghost","override"],_o=["solid","translucent"],qo=["solid","translucent"],rt={...N,size:{type:"enum",className:"rt-r-size",values:Zo,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:Uo,default:"solid"},...Bt,...ce,...Ee,loading:{type:"boolean",className:"rt-loading",default:!1},fullWidth:{type:"boolean",className:"rt-full-width",default:!1},material:{type:"enum",values:qo,default:void 0},panelBackground:{type:"enum",values:_o,default:void 0},flush:{type:"boolean",default:!1}};var je=P(require("react")),Vt=P(require("classnames"));var st=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Le={gap:{type:"enum | string",className:"rt-r-gap",customProperties:["--gap"],values:st,responsive:!0},gapX:{type:"enum | string",className:"rt-r-cg",customProperties:["--column-gap"],values:st,responsive:!0},gapY:{type:"enum | string",className:"rt-r-rg",customProperties:["--row-gap"],values:st,responsive:!0}};var Yo=["div","span"],Xo=["none","inline-flex","flex"],Jo=["row","column","row-reverse","column-reverse"],Qo=["start","center","end","baseline","stretch"],er=["start","center","end","between"],tr=["nowrap","wrap","wrap-reverse"],kt={as:{type:"enum",values:Yo,default:"div"},...N,display:{type:"enum",className:"rt-r-display",values:Xo,responsive:!0},direction:{type:"enum",className:"rt-r-fd",values:Jo,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:Qo,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:er,parseValue:or,responsive:!0},wrap:{type:"enum",className:"rt-r-fw",values:tr,responsive:!0},...Le};function or(e){return e==="between"?"space-between":e}var w=je.forwardRef((e,t)=>{let{className:o,asChild:a,as:n="div",...i}=S(e,kt,me,k);return je.createElement(a?ie:n,{...i,ref:t,className:(0,Vt.default)("rt-Flex",o)})});w.displayName="Flex";var E=P(require("react")),Lt=P(require("classnames"));var rr=["1","2","3"],Et={size:{type:"enum",className:"rt-r-size",values:rr,default:"2",responsive:!0},loading:{type:"boolean",default:!0}};var nt=E.forwardRef((e,t)=>{let{className:o,children:a,loading:n,...i}=S(e,Et,k);if(!n)return a;let s=E.createElement("span",{...i,ref:t,className:(0,Lt.default)("rt-Spinner",o)},E.createElement("span",{className:"rt-SpinnerLeaf"}),E.createElement("span",{className:"rt-SpinnerLeaf"}),E.createElement("span",{className:"rt-SpinnerLeaf"}),E.createElement("span",{className:"rt-SpinnerLeaf"}),E.createElement("span",{className:"rt-SpinnerLeaf"}),E.createElement("span",{className:"rt-SpinnerLeaf"}),E.createElement("span",{className:"rt-SpinnerLeaf"}),E.createElement("span",{className:"rt-SpinnerLeaf"}));return a===void 0?s:E.createElement(w,{asChild:!0,position:"relative",align:"center",justify:"center"},E.createElement("span",null,E.createElement("span",{"aria-hidden":!0,style:{display:"contents",visibility:"hidden"},inert:void 0},a),E.createElement(w,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},E.createElement("span",null,s))))});nt.displayName="Spinner";var at=require("radix-ui"),jt=at.VisuallyHidden.Root,en=at.VisuallyHidden.Root;var Mt=P(require("react")),sr="Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.",At=new Set;function nr(e){At.has(e)||(At.add(e),console.warn(e))}function Ae(e){Mt.useEffect(()=>{},[e])}function Ot(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([o,a])=>[o,t(a)]))}function Ht(e){switch(e){case"1":return"1";case"2":case"3":return"2";case"4":return"3"}}var ve=B.forwardRef((e,t)=>{let{size:o=rt.size.default}=e,{className:a,children:n,asChild:i,as:s,color:p,radius:l,material:m,panelBackground:u,flush:y,disabled:h=e.loading,...v}=S(e,rt,k);Ae(e.panelBackground);let C=m??u,R=i?Wt.Slot.Root:s||"button",j=i||!s||["button","input","textarea","select"].includes(s),x=!i&&(!s||s==="button"),V="type"in v,D=B.useId(),b=e.loading?`${D}-loading`:void 0,O=B.useMemo(()=>typeof n=="string"?n:B.isValidElement(n)&&typeof n.props?.children=="string"?n.props.children:"button",[n]),H=B.useMemo(()=>e.loading?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":b,"aria-label":`${O} (loading)`}:{},[e.loading,b,O]);return B.createElement(R,{"data-disabled":h||void 0,"data-accent-color":p,"data-radius":l,"data-material":C,"data-panel-background":C,"data-flush":y?"true":void 0,...v,...H,ref:t,className:(0,Gt.default)("rt-reset","rt-BaseButton",a),...j&&{disabled:h},...x&&!V?{type:"button"}:{}},e.loading?B.createElement(B.Fragment,null,B.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},n),B.createElement(jt,null,B.createElement("span",{id:b},O," is loading, please wait..."),n),B.createElement(w,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},B.createElement("span",null,B.createElement(nt,{size:Ot(o,Ht),"aria-hidden":"true"})))):n)});ve.displayName="BaseButton";var F=P(require("react")),Zt=P(require("classnames")),fe=require("radix-ui");var re=P(require("react")),It=require("radix-ui");var ar=["normal","start","end","both"],Me={trim:{type:"enum",className:"rt-r-lt",values:ar,responsive:!0}};var pr=["left","center","right"],Oe={align:{type:"enum",className:"rt-r-ta",values:pr,responsive:!0}};var ir=["wrap","nowrap","pretty","balance"],He={wrap:{type:"enum",className:"rt-r-tw",values:ir,responsive:!0}};var Ge={truncate:{type:"boolean",className:"rt-truncate"}};var lr=["sans","mono","serif"],We={font:{type:"enum",className:"rt-r-ff",values:lr}};var mr=["thin","extralight","light","regular","medium","semibold","bold","extrabold"],Fe={weight:{type:"enum",className:"rt-r-weight",values:mr,responsive:!0}};var cr=["span","div","label","p"],ur=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Ft={as:{type:"enum",values:cr,default:"span"},...N,size:{type:"enum",className:"rt-r-size",values:ur,responsive:!0},...We,...Fe,...Oe,...Me,...Ge,...He,...Ve,...ce};var fr={...Ft,...k},z=re.memo(re.forwardRef((e,t)=>{let{children:o,className:a,asChild:n,as:i="span",color:s,...p}=S(e,fr),l=a?`rt-Text ${a}`:"rt-Text";return n?re.createElement(It.Slot.Root,{"data-accent-color":s,...p,ref:t,className:l},o):re.createElement(i,{"data-accent-color":s,...p,ref:t,className:l},o)}));z.displayName="Text";var T=P(require("react")),zt=P(require("classnames")),ue=require("radix-ui"),$e=require("radix-ui/internal");function Ie(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 pt=P(require("react"));function $(e){let[t,o]=pt.useState(e),[a,n]=pt.useState(e);return Object.is(e,a)||(n(e),o(e)),[t,o]}var dr=["inherit","light","dark"],Pr=["solid","translucent"],yr=["solid","translucent"],gr=["90%","95%","100%","105%","110%"],hr=["sans","mono","serif"],d={...N,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:dr,default:"inherit"},accentColor:{type:"enum",values:ke,default:"blue"},grayColor:{type:"enum",values:St,default:"slate"},material:{type:"enum",values:yr,default:"translucent"},panelBackground:{type:"enum",values:Pr,default:"translucent"},radius:{type:"enum",values:ot,default:"medium"},scaling:{type:"enum",values:gr,default:"100%"},fontFamily:{type:"enum",values:hr,default:"sans"}};var L=()=>{},vr={appearance:d.appearance.default,accentColor:d.accentColor.default,grayColor:d.grayColor.default,resolvedGrayColor:d.grayColor.default,material:d.material.default,panelBackground:d.panelBackground.default,radius:d.radius.default,scaling:d.scaling.default,fontFamily:d.fontFamily.default,onAppearanceChange:L,onAccentColorChange:L,onGrayColorChange:L,onMaterialChange:L,onPanelBackgroundChange:L,onRadiusChange:L,onScalingChange:L,onFontFamilyChange:L},ze=T.createContext(void 0);function Ce(){return T.useContext(ze)??vr}var K=T.forwardRef((e,t)=>T.useContext(ze)===void 0?T.createElement(ue.Tooltip.Provider,{delayDuration:200},T.createElement(ue.Direction.Provider,{dir:"ltr"},T.createElement($t,{...e,ref:t}))):T.createElement(it,{...e,ref:t}));K.displayName="Theme";var $t=T.forwardRef((e,t)=>{let{appearance:o=d.appearance.default,accentColor:a=d.accentColor.default,grayColor:n=d.grayColor.default,material:i=d.material.default,panelBackground:s=d.panelBackground.default,radius:p=d.radius.default,scaling:l=d.scaling.default,fontFamily:m=d.fontFamily.default,hasBackground:u=d.hasBackground.default,...y}=e;Ae(e.panelBackground);let[h,v]=$(o),[C,R]=$(a),[j,x]=$(n),V=i!==d.material.default?i:s,[D,b]=$(V),[O,H]=$(D),[Y,U]=$(p),[ge,X]=$(l),[pe,c]=$(m);return T.createElement(it,{...y,ref:t,isRoot:!0,hasBackground:u,appearance:h,accentColor:C,grayColor:j,material:D,panelBackground:O,radius:Y,scaling:ge,fontFamily:pe,onAppearanceChange:v,onAccentColorChange:R,onGrayColorChange:x,onMaterialChange:b,onPanelBackgroundChange:H,onRadiusChange:U,onScalingChange:X,onFontFamilyChange:c})});$t.displayName="ThemeRoot";function Cr(){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 it=T.forwardRef((e,t)=>{let o=T.useContext(ze),{asChild:a,isRoot:n,hasBackground:i,appearance:s=e.appearance??o?.appearance??d.appearance.default,accentColor:p=e.accentColor??o?.accentColor??d.accentColor.default,grayColor:l=e.grayColor??o?.resolvedGrayColor??d.grayColor.default,material:m=e.material??o?.material??d.material.default,panelBackground:u=e.panelBackground??o?.panelBackground??d.panelBackground.default,radius:y=e.radius??o?.radius??d.radius.default,scaling:h=e.scaling??o?.scaling??d.scaling.default,fontFamily:v=e.fontFamily??o?.fontFamily??d.fontFamily.default,onAppearanceChange:C=L,onAccentColorChange:R=L,onGrayColorChange:j=L,onMaterialChange:x=L,onPanelBackgroundChange:V=L,onRadiusChange:D=L,onScalingChange:b=L,onFontFamilyChange:O=L,...H}=e,Y=a?ue.Slot.Root:"div",U=l==="auto"?Ie(p):l,ge=e.appearance==="light"||e.appearance==="dark",X=i===void 0?n||ge:i,pe=T.useRef(null),c=(0,$e.useComposedRefs)(t,pe),g="data-os"in H;return(0,$e.useLayoutEffect)(()=>{if(!n||g)return;let G=pe.current;if(!G)return;let M=Cr();if(M)return G.setAttribute("data-os",M),()=>G.removeAttribute("data-os")},[n,g]),T.createElement(ze.Provider,{value:T.useMemo(()=>({appearance:s,accentColor:p,grayColor:l,resolvedGrayColor:U,material:m,panelBackground:u,radius:y,scaling:h,fontFamily:v,onAppearanceChange:C,onAccentColorChange:R,onGrayColorChange:j,onMaterialChange:x,onPanelBackgroundChange:V,onRadiusChange:D,onScalingChange:b,onFontFamilyChange:O}),[s,p,l,U,m,u,y,h,v,C,R,j,x,V,D,b,O])},T.createElement(Y,{"data-is-root-theme":n?"true":"false","data-accent-color":p,"data-gray-color":U,"data-has-background":X?"true":"false","data-material":m,"data-panel-background":u,"data-radius":y,"data-scaling":h,"data-font-family":v,ref:c,...H,className:(0,zt.default)("radix-themes",{light:s==="light",dark:s==="dark"},H.className)}))});it.displayName="ThemeImpl";var Kt={content:{type:"ReactNode",required:!0},width:W.width,minWidth:W.minWidth,maxWidth:{...W.maxWidth,default:"360px"}};var Z=F.forwardRef((e,t)=>{let{children:o,className:a,open:n,defaultOpen:i,onOpenChange:s,delayDuration:p,disableHoverableContent:l,content:m,container:u,forceMount:y,...h}=S(e,Kt),v={open:n,defaultOpen:i,onOpenChange:s,delayDuration:p,disableHoverableContent:l};return F.createElement(fe.Tooltip.Root,{...v},F.createElement(fe.Tooltip.Trigger,{asChild:!0},o),F.createElement(fe.Tooltip.Portal,{container:u,forceMount:y},F.createElement(K,{asChild:!0},F.createElement(fe.Tooltip.Content,{sideOffset:4,collisionPadding:10,...h,asChild:!1,ref:t,className:(0,Zt.default)("rt-TooltipContent",a)},F.createElement(z,{as:"p",className:"rt-TooltipText",size:"1"},m),F.createElement(fe.Tooltip.Arrow,{className:"rt-TooltipArrow"})))))});Z.displayName="Tooltip";var Ke=P(require("react"));function Ze(e){let t=Ke.useId(),o=!!e,a=Ke.useMemo(()=>o?{"aria-describedby":t}:{},[o,t]);return{tooltipId:t,hasTooltip:o,accessibilityProps:a}}var lt=_.forwardRef(({className:e,style:t,tooltip:o,tooltipSide:a="top",tooltipAlign:n="center",tooltipDelayDuration:i,tooltipDisableHoverableContent:s,overrideStyles:p,...l},m)=>{let{tooltipId:u,hasTooltip:y,accessibilityProps:h}=Ze(o),v=_.useMemo(()=>{if(!p)return;let j={},x=(D,b)=>{b!==void 0&&(j[D]=b)},V=(D,b)=>{b&&(x(`--button-override-${D}color`,b.color),x(`--button-override-${D}background`,b.background),x(`--button-override-${D}background-color`,b.backgroundColor),x(`--button-override-${D}box-shadow`,b.boxShadow),x(`--button-override-${D}filter`,b.filter),x(`--button-override-${D}outline`,b.outline),x(`--button-override-${D}outline-offset`,b.outlineOffset),x(`--button-override-${D}opacity`,b.opacity))};return V("",p.normal),V("hover-",p.hover),V("active-",p.active),V("pressed-",p.pressed),V("open-",p.open),V("disabled-",p.disabled),p.focus&&(x("--button-override-focus-outline",p.focus.outline),x("--button-override-focus-outline-offset",p.focus.outlineOffset)),j},[p]),C=_.useMemo(()=>v?{...v,...t}:t,[v,t]),R=_.createElement(ve,{...l,...h,ref:m,className:(0,Ut.default)("rt-Button",e),style:C});return y?_.createElement(Z,{content:o,side:a,align:n,delayDuration:i,disableHoverableContent:s,id:u},R):R});lt.displayName="Button";var Ue=P(require("react")),qt=P(require("classnames"));var br=["div","span"],Rr=["none","inline-grid","grid"],Dr=["1","2","3","4","5","6","7","8","9"],Tr=["1","2","3","4","5","6","7","8","9"],xr=["row","column","dense","row-dense","column-dense"],wr=["start","center","end","baseline","stretch"],Nr=["start","center","end","between"],Sr=["start","center","end","baseline","between","around","evenly","stretch"],Br=["start","center","end","baseline","stretch"],mt={as:{type:"enum",values:br,default:"div"},...N,display:{type:"enum",className:"rt-r-display",values:Rr,responsive:!0},areas:{type:"string",className:"rt-r-gta",customProperties:["--grid-template-areas"],responsive:!0},columns:{type:"enum | string",className:"rt-r-gtc",customProperties:["--grid-template-columns"],values:Dr,parseValue:_t,responsive:!0},rows:{type:"enum | string",className:"rt-r-gtr",customProperties:["--grid-template-rows"],values:Tr,parseValue:_t,responsive:!0},flow:{type:"enum",className:"rt-r-gaf",values:xr,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:wr,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:Nr,parseValue:kr,responsive:!0},alignContent:{type:"enum",className:"rt-r-ac",values:Sr,parseValue:Vr,responsive:!0},justifyItems:{type:"enum",className:"rt-r-ji",values:Br,responsive:!0},...Le};function _t(e){return mt.columns.values.includes(e)?e:e?.match(/^\d+$/)?`repeat(${e}, minmax(0, 1fr))`:e}function kr(e){return e==="between"?"space-between":e}function Vr(e){return e==="between"?"space-between":e==="around"?"space-around":e==="evenly"?"space-evenly":e}var be=Ue.forwardRef((e,t)=>{let{className:o,asChild:a,as:n="div",...i}=S(e,mt,me,k);return Ue.createElement(a?ie:n,{...i,ref:t,className:(0,qt.default)("rt-Grid",o)})});be.displayName="Grid";var se=P(require("react")),Xt=require("radix-ui");var Er=["h1","h2","h3","h4","h5","h6"],Lr=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Yt={as:{type:"enum",values:Er,default:"h1"},...N,size:{type:"enum",className:"rt-r-size",values:Lr,default:"6",responsive:!0},...We,...Fe,...Oe,...Me,...Ge,...He,...Ve,...ce};var jr={...Yt,...k},_e=se.memo(se.forwardRef((e,t)=>{let{children:o,className:a,asChild:n,as:i="h1",color:s,...p}=S(e,jr),l=a?`rt-Heading ${a}`:"rt-Heading";return n?se.createElement(Xt.Slot.Root,{"data-accent-color":s,...p,ref:t,className:l},o):se.createElement(i,{"data-accent-color":s,...p,ref:t,className:l},o)}));_e.displayName="Heading";var Re=P(require("react")),Jt=P(require("classnames"));var ct=Re.forwardRef(({className:e,tooltip:t,tooltipSide:o="top",tooltipAlign:a="center",tooltipDelayDuration:n,tooltipDisableHoverableContent:i,...s},p)=>{let{tooltipId:l,hasTooltip:m,accessibilityProps:u}=Ze(t),y="aria-label"in s&&s["aria-label"],h="aria-labelledby"in s&&s["aria-labelledby"],v="children"in s&&s.children;!y&&!h&&!v&&console.error(`IconButton: Icon buttons must have an accessible name. Please provide either:
|
|
2
2
|
- aria-label prop with descriptive text
|
|
3
3
|
- aria-labelledby prop referencing a label element
|
|
4
|
-
- or visible text children`);let
|
|
4
|
+
- or visible text children`);let C=Re.createElement(ve,{...s,...u,ref:p,className:(0,Jt.default)("rt-IconButton",e)});return m?Re.createElement(Z,{content:t,side:o,align:a,delayDuration:n,disableHoverableContent:i,id:l},C):C});ct.displayName="IconButton";var qe=P(require("react")),eo=P(require("classnames")),to=require("radix-ui");var Ar=["1","2","3","4","5","6","7","8","9"],Mr=["classic","soft"],Qt={...N,size:{type:"enum",className:"rt-r-size",values:Ar,responsive:!0},variant:{type:"enum",className:"rt-variant",values:Mr,default:"classic"}};var ut=qe.forwardRef((e,t)=>{let{asChild:o,className:a,...n}=S(e,Qt,k),i=o?to.Slot.Root:"kbd";return qe.createElement(i,{...n,ref:t,className:(0,eo.default)("rt-reset","rt-Kbd",a)})});ut.displayName="Kbd";var f=P(require("react")),ae=P(require("classnames")),ne=require("radix-ui");var Ye=P(require("react")),ft=e=>{if(!Ye.isValidElement(e))throw Error(`Expected a single React Element child, but got: ${Ye.Children.toArray(e).map(o=>typeof o=="object"&&"type"in o&&typeof o.type=="string"?o.type:typeof o).join(", ")}`);return e};var Or=["1","2","3","4"],Hr=["solid","translucent"],oo={...N,size:{type:"enum",className:"rt-r-size",values:Or,default:"2",responsive:!0},panelBackground:{type:"enum",values:Hr,default:void 0},width:W.width,minWidth:W.minWidth,maxWidth:{...W.maxWidth,default:"480px"},...Se};var ro=f.createContext(null),so=e=>{let t=f.useContext(ro);return t},dt=e=>f.createElement(ne.Popover.Root,{...e});dt.displayName="Popover.Root";var Pt=f.forwardRef(({children:e,...t},o)=>f.createElement(ne.Popover.Trigger,{...t,ref:o,asChild:!0},ft(e)));Pt.displayName="Popover.Trigger";var yt=f.forwardRef((e,t)=>{let o=Ce(),a=e.panelBackground??o.panelBackground,{className:n,forceMount:i,container:s,panelBackground:p,...l}=S(e,oo),m=f.useRef(null),u=f.useCallback(C=>{m.current=C,typeof t=="function"?t(C):t&&(t.current=C)},[t]),[y,h]=f.useState(void 0),v=f.useCallback(C=>{let R=m.current;R&&(C>0?(R.style.setProperty("--popover-toolbar-offset",`${C}px`),R.setAttribute("data-has-toolbar","true")):(R.style.removeProperty("--popover-toolbar-offset"),R.removeAttribute("data-has-toolbar")))},[]);return f.createElement(ne.Popover.Portal,{container:s,forceMount:i},f.createElement(K,{asChild:!0},f.createElement(ne.Popover.Content,{align:"start",sideOffset:8,collisionPadding:10,...l,ref:u,"aria-labelledby":y,"data-panel-background":a,className:(0,ae.default)("rt-PopperContent","rt-PopoverContent",n)},f.createElement(ro.Provider,{value:f.useMemo(()=>({contentRef:m,setToolbarOffset:v,setLabelId:h}),[v])},e.children))))});yt.displayName="Popover.Content";var Gr=f.forwardRef(({children:e,...t},o)=>f.createElement(ne.Popover.Close,{...t,ref:o,asChild:!0},ft(e)));Gr.displayName="Popover.Close";var Wr=f.forwardRef(({children:e,...t},o)=>f.createElement(ne.Popover.Anchor,{...t,ref:o}));Wr.displayName="Popover.Anchor";var no=f.forwardRef(({className:e,children:t,...o},a)=>{let n=so("Popover.Toolbar"),i=f.useRef(null),s=f.useCallback(p=>{i.current=p,typeof a=="function"?a(p):a&&(a.current=p)},[a]);return f.useEffect(()=>{if(!n||!i.current)return;let p=i.current,l=()=>{let u=p.getBoundingClientRect().height;n.setToolbarOffset(u)};l();let m=new ResizeObserver(l);return m.observe(p),()=>{m.disconnect(),n.setToolbarOffset(0)}},[n]),f.createElement("div",{...o,ref:s,className:(0,ae.default)("rt-PopoverToolbar",e)},t)});no.displayName="Popover.Toolbar";var ao=f.forwardRef(({className:e,...t},o)=>f.createElement("div",{...t,ref:o,className:(0,ae.default)("rt-PopoverToolbarSection","rt-PopoverToolbarLeft",e)}));ao.displayName="Popover.Toolbar.Left";var po=f.forwardRef(({className:e,...t},o)=>f.createElement("div",{...t,ref:o,className:(0,ae.default)("rt-PopoverToolbarSection","rt-PopoverToolbarCenter",e)}));po.displayName="Popover.Toolbar.Center";var io=f.forwardRef(({className:e,...t},o)=>f.createElement("div",{...t,ref:o,className:(0,ae.default)("rt-PopoverToolbarSection","rt-PopoverToolbarRight",e)}));io.displayName="Popover.Toolbar.Right";var lo=f.forwardRef(({className:e,id:t,...o},a)=>{let n=so("Popover.Toolbar.Title"),i=f.useId(),s=t??`rt-popover-toolbar-title-${i}`;return f.useEffect(()=>(n?.setLabelId(s),()=>n?.setLabelId(void 0)),[n,s]),f.createElement("span",{...o,id:s,ref:a,className:(0,ae.default)("rt-PopoverToolbarTitle",e)})});lo.displayName="Popover.Toolbar.Title";var Za=Object.assign(no,{Left:ao,Center:po,Right:io,Title:lo});var A=P(require("react")),Je=P(require("classnames")),q=require("radix-ui");var Ir=["1","2","3"],zr=["vertical","horizontal","both"],de={...N,size:{type:"enum",className:"rt-r-size",values:Ir,default:"1",responsive:!0},...Ee,scrollbars:{type:"enum",values:zr,default:"both"}};function mo(e){let{m:t,mx:o,my:a,mt:n,mr:i,mb:s,ml:p,...l}=e;return{m:t,mx:o,my:a,mt:n,mr:i,mb:s,ml:p,rest:l}}var uo=k.m.values,$r=new Set(uo),co=[{key:"m",className:"rt-r-m",customProperties:["--margin"]},{key:"mx",className:"rt-r-mx",customProperties:["--margin-left","--margin-right"]},{key:"my",className:"rt-r-my",customProperties:["--margin-top","--margin-bottom"]},{key:"mt",className:"rt-r-mt",customProperties:["--margin-top"]},{key:"mr",className:"rt-r-mr",customProperties:["--margin-right"]},{key:"mb",className:"rt-r-mb",customProperties:["--margin-bottom"]},{key:"ml",className:"rt-r-ml",customProperties:["--margin-left"]}];function fo(e){let t,o;for(let a=0;a<co.length;a++){let{key:n,className:i,customProperties:s}=co[a],p=e[n];if(p===void 0)continue;let[l,m]=Ne({className:i,customProperties:s,propValues:uo,propValueSet:$r,value:p});l&&(t??(t=[])).push(l),m&&(o=Q(o,m))}return[t!==void 0?t.join(" "):"",o]}var Xe=P(require("react"));function Po(e,t){let{asChild:o,children:a}=e;if(!o)return typeof t=="function"?t(a):t;let n=Xe.Children.only(a);return Xe.cloneElement(n,{children:typeof t=="function"?t(n.props.children):t})}var gt=A.forwardRef((e,t)=>{let{rest:o,...a}=mo(e),[n,i]=fo(a),{asChild:s,children:p,className:l,style:m,type:u,scrollHideDelay:y=u!=="scroll"?0:void 0,dir:h,size:v=de.size.default,radius:C=de.radius.default,scrollbars:R=de.scrollbars.default,...j}=o;return A.createElement(q.ScrollArea.Root,{type:u,scrollHideDelay:y,className:(0,Je.default)("rt-ScrollAreaRoot",n,l),style:Q(i,m),asChild:s},Po({asChild:s,children:p},x=>A.createElement(A.Fragment,null,A.createElement(q.ScrollArea.Viewport,{...j,ref:t,className:"rt-ScrollAreaViewport"},x),A.createElement("div",{className:"rt-ScrollAreaViewportFocusRing"}),R!=="vertical"?A.createElement(q.ScrollArea.Scrollbar,{"data-radius":C,orientation:"horizontal",className:(0,Je.default)("rt-ScrollAreaScrollbar",le({className:"rt-r-size",value:v,propValues:de.size.values}))},A.createElement(q.ScrollArea.Thumb,{className:"rt-ScrollAreaThumb"})):null,R!=="horizontal"?A.createElement(q.ScrollArea.Scrollbar,{"data-radius":C,orientation:"vertical",className:(0,Je.default)("rt-ScrollAreaScrollbar",le({className:"rt-r-size",value:v,propValues:de.size.values}))},A.createElement(q.ScrollArea.Thumb,{className:"rt-ScrollAreaThumb"})):null,R==="both"?A.createElement(q.ScrollArea.Corner,{className:"rt-ScrollAreaCorner"}):null)))});gt.displayName="ScrollArea";var yo=P(require("react")),go=Number.parseFloat(yo.version)>=19||"";var Co=`
|
|
5
5
|
[contenteditable],
|
|
6
6
|
[role="combobox"],
|
|
7
7
|
[role="listbox"],
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
input:not([type="radio"], [type="checkbox"]),
|
|
10
10
|
select,
|
|
11
11
|
textarea
|
|
12
|
-
`,fo=r.forwardRef(({defaultOpen:e=!0,...t},o)=>{let[i,s]=r.useState(e),l=r.useRef(null),n=r.useRef(null);return r.useEffect(()=>{function a(p){let f=p.altKey||p.ctrlKey||p.shiftKey||p.metaKey,P=document.activeElement?.closest(uo);if(p.key?.toUpperCase()==="T"&&!f&&!P){let h=!1;(0,co.flushSync)(()=>{s(v=>(h=!v,h))}),h?(n.current=document.activeElement,l.current?.focus()):n.current?.focus()}}return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[]),r.createElement(Po,{...t,ref:o,triggerRef:l,open:i,shortcut:r.createElement(X,{content:"Press T to show/hide the Theme Panel",side:"bottom",sideOffset:6},r.createElement(lt,{asChild:!0,size:"3",tabIndex:0,className:"rt-ThemePanelShortcut"},r.createElement("button",{type:"button",onClick:()=>s(a=>!a),ref:l,"aria-label":"Toggle the Theme Panel"},"T")))})});fo.displayName="ThemePanel";var Po=r.forwardRef((e,t)=>{let{open:o,onAppearanceChange:i,shortcut:s,triggerRef:l,...n}=e,a=Re();return r.createElement(_,{asChild:!0,radius:"medium",scaling:"100%"},r.createElement(N,{direction:"column",position:"fixed",top:"0",right:"0",mr:{initial:"2",sm:"4"},mt:{initial:"2",sm:"4"},width:{initial:"360px"},maxHeight:{initial:"calc(100svh - var(--space-2) - var(--space-2))",sm:"calc(100svh - var(--space-4) - var(--space-4))"},maxWidth:{initial:"calc(100svw - var(--space-2) - var(--space-2))",sm:"calc(100svw - var(--space-4) - var(--space-4))"},inert:o?void 0:lo,...n,ref:t,style:{zIndex:999999999,overflow:"hidden",borderRadius:"var(--radius-4)",backgroundColor:"var(--color-panel-solid)",transformOrigin:"top center",transitionProperty:"transform, box-shadow",transitionDuration:"200ms",transitionTimingFunction:o?"ease-out":"ease-in",transform:o?"none":"translateX(105%)",boxShadow:o?"var(--shadow-5)":"var(--shadow-2)",...e.style}},r.createElement(dt,null,r.createElement(se,{flexGrow:"1",p:{initial:"4",xs:"5"},position:"relative"},!!s&&r.createElement(se,{position:"absolute",top:"0",right:"0",m:"2"},s),r.createElement(Pt,{onAppearanceChange:i,context:a})))))});Po.displayName="ThemePanelImpl";var Pt=r.forwardRef((e,t)=>{let{onAppearanceChange:o,context:i,...s}=e,l=Re(),{appearance:n,onAppearanceChange:a,accentColor:p,onAccentColorChange:f,grayColor:P,onGrayColorChange:R,panelBackground:h,onPanelBackgroundChange:v,radius:g,onRadiusChange:T,scaling:L,onScalingChange:w}=i??l,[k,D]=r.useState(n==="inherit"?null:n),x=o!==void 0,K=(0,mo.useCallbackRef)(o),O=r.useCallback(m=>{let C=Er();if(n!=="inherit"){a(m);return}x?K(m):(D(m),Vr(m)),C()},[n,a,x,K]),G=Ie(p),F=P==="auto"?G:P,[A,Z]=r.useState("idle");async function U(){let m={appearance:n===d.appearance.default?void 0:n,accentColor:p===d.accentColor.default?void 0:p,grayColor:P===d.grayColor.default?void 0:P,panelBackground:h===d.panelBackground.default?void 0:h,radius:g===d.radius.default?void 0:g,scaling:L===d.scaling.default?void 0:L},C=Object.keys(m).filter(M=>m[M]!==void 0).map(M=>`${M}="${m[M]}"`).join(" "),Y=C?`<Theme ${C}>`:"<Theme>";Z("copying"),await navigator.clipboard.writeText(Y),Z("copied"),setTimeout(()=>Z("idle"),2e3)}return r.useEffect(()=>{function m(C){let Y=C.altKey||C.ctrlKey||C.shiftKey||C.metaKey,M=document.activeElement?.closest(uo);C.key?.toUpperCase()==="D"&&!Y&&!M&&O(k==="light"?"dark":"light")}return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[O,k]),r.useEffect(()=>{let m=document.documentElement,C=document.body;function Y(){let xe=m.classList.contains("dark")||m.classList.contains("dark-theme")||C.classList.contains("dark")||C.classList.contains("dark-theme");D(n==="inherit"?xe?"dark":"light":n)}let M=new MutationObserver(function(xe){xe.forEach(function(yo){yo.attributeName==="class"&&Y()})});return Y(),n==="inherit"&&(M.observe(m,{attributes:!0}),M.observe(C,{attributes:!0})),()=>M.disconnect()},[n]),r.createElement(N,{direction:"column",gap:"5",...s,ref:t},r.createElement(Ze,{size:{initial:"3",sm:"5"},trim:"both",as:"h2"},"Theme"),r.createElement(N,{direction:"column",gap:"5"},r.createElement(ge,null,r.createElement(he,{id:"accent-color-title"},"Accent color"),r.createElement(N,{wrap:"wrap",gap:"2",role:"group","aria-labelledby":"accent-color-title"},d.accentColor.values.map(m=>r.createElement(se,{asChild:!0,key:m},r.createElement("label",{className:"rt-ThemePanelSwatch","aria-label":$(m),style:{backgroundColor:`var(--${m}-9)`}},r.createElement(X,{content:`${$(m)}${p==="gray"&&F!=="gray"?` (${$(F)})`:""}`},r.createElement("input",{className:"rt-ThemePanelSwatchInput",type:"radio",name:"accentColor",value:m,checked:p===m,onChange:C=>f(C.target.value)}))))))),r.createElement(ge,null,r.createElement(he,{id:"gray-color-title"},"Gray color"),r.createElement(N,{wrap:"wrap",gap:"2",role:"group","aria-labelledby":"gray-color-title"},d.grayColor.values.map(m=>r.createElement(N,{key:m,asChild:!0,align:"center",justify:"center"},r.createElement("label",{className:"rt-ThemePanelSwatch","aria-label":$(m),style:{backgroundColor:m==="auto"?`var(--${G}-9)`:m==="gray"?"var(--gray-9)":`var(--${m}-9)`,filter:m==="gray"?"saturate(0)":void 0}},r.createElement(X,{content:`${$(m)}${m==="auto"?` (${$(G)})`:""}`},r.createElement("input",{className:"rt-ThemePanelSwatchInput",type:"radio",name:"grayColor",value:m,checked:P===m,onChange:C=>R(C.target.value)}))))))),r.createElement(ge,null,r.createElement(he,{id:"appearance-title"},"Appearance"),r.createElement(Te,{columns:"2",gap:"2",role:"group","aria-labelledby":"appearance-title"},["light","dark"].map(m=>r.createElement("label",{key:m,className:"rt-ThemePanelRadioCard"},r.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"appearance",value:m,checked:k===m,onChange:C=>O(C.target.value)}),r.createElement(N,{align:"center",justify:"center",height:"32px",gap:"2"},m==="light"?r.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -1px"}},r.createElement("path",{d:"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})):r.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -1px"}},r.createElement("path",{d:"M2.89998 0.499976C2.89998 0.279062 2.72089 0.0999756 2.49998 0.0999756C2.27906 0.0999756 2.09998 0.279062 2.09998 0.499976V1.09998H1.49998C1.27906 1.09998 1.09998 1.27906 1.09998 1.49998C1.09998 1.72089 1.27906 1.89998 1.49998 1.89998H2.09998V2.49998C2.09998 2.72089 2.27906 2.89998 2.49998 2.89998C2.72089 2.89998 2.89998 2.72089 2.89998 2.49998V1.89998H3.49998C3.72089 1.89998 3.89998 1.72089 3.89998 1.49998C3.89998 1.27906 3.72089 1.09998 3.49998 1.09998H2.89998V0.499976ZM5.89998 3.49998C5.89998 3.27906 5.72089 3.09998 5.49998 3.09998C5.27906 3.09998 5.09998 3.27906 5.09998 3.49998V4.09998H4.49998C4.27906 4.09998 4.09998 4.27906 4.09998 4.49998C4.09998 4.72089 4.27906 4.89998 4.49998 4.89998H5.09998V5.49998C5.09998 5.72089 5.27906 5.89998 5.49998 5.89998C5.72089 5.89998 5.89998 5.72089 5.89998 5.49998V4.89998H6.49998C6.72089 4.89998 6.89998 4.72089 6.89998 4.49998C6.89998 4.27906 6.72089 4.09998 6.49998 4.09998H5.89998V3.49998ZM1.89998 6.49998C1.89998 6.27906 1.72089 6.09998 1.49998 6.09998C1.27906 6.09998 1.09998 6.27906 1.09998 6.49998V7.09998H0.499976C0.279062 7.09998 0.0999756 7.27906 0.0999756 7.49998C0.0999756 7.72089 0.279062 7.89998 0.499976 7.89998H1.09998V8.49998C1.09998 8.72089 1.27906 8.89997 1.49998 8.89997C1.72089 8.89997 1.89998 8.72089 1.89998 8.49998V7.89998H2.49998C2.72089 7.89998 2.89998 7.72089 2.89998 7.49998C2.89998 7.27906 2.72089 7.09998 2.49998 7.09998H1.89998V6.49998ZM8.54406 0.98184L8.24618 0.941586C8.03275 0.917676 7.90692 1.1655 8.02936 1.34194C8.17013 1.54479 8.29981 1.75592 8.41754 1.97445C8.91878 2.90485 9.20322 3.96932 9.20322 5.10022C9.20322 8.37201 6.82247 11.0878 3.69887 11.6097C3.45736 11.65 3.20988 11.6772 2.96008 11.6906C2.74563 11.702 2.62729 11.9535 2.77721 12.1072C2.84551 12.1773 2.91535 12.2458 2.98667 12.3128L3.05883 12.3795L3.31883 12.6045L3.50684 12.7532L3.62796 12.8433L3.81491 12.9742L3.99079 13.089C4.11175 13.1651 4.23536 13.2375 4.36157 13.3059L4.62496 13.4412L4.88553 13.5607L5.18837 13.6828L5.43169 13.7686C5.56564 13.8128 5.70149 13.8529 5.83857 13.8885C5.94262 13.9155 6.04767 13.9401 6.15405 13.9622C6.27993 13.9883 6.40713 14.0109 6.53544 14.0298L6.85241 14.0685L7.11934 14.0892C7.24637 14.0965 7.37436 14.1002 7.50322 14.1002C11.1483 14.1002 14.1032 11.1453 14.1032 7.50023C14.1032 7.25044 14.0893 7.00389 14.0623 6.76131L14.0255 6.48407C13.991 6.26083 13.9453 6.04129 13.8891 5.82642C13.8213 5.56709 13.7382 5.31398 13.6409 5.06881L13.5279 4.80132L13.4507 4.63542L13.3766 4.48666C13.2178 4.17773 13.0353 3.88295 12.8312 3.60423L12.6782 3.40352L12.4793 3.16432L12.3157 2.98361L12.1961 2.85951L12.0355 2.70246L11.8134 2.50184L11.4925 2.24191L11.2483 2.06498L10.9562 1.87446L10.6346 1.68894L10.3073 1.52378L10.1938 1.47176L9.95488 1.3706L9.67791 1.2669L9.42566 1.1846L9.10075 1.09489L8.83599 1.03486L8.54406 0.98184ZM10.4032 5.30023C10.4032 4.27588 10.2002 3.29829 9.83244 2.40604C11.7623 3.28995 13.1032 5.23862 13.1032 7.50023C13.1032 10.593 10.596 13.1002 7.50322 13.1002C6.63646 13.1002 5.81597 12.9036 5.08355 12.5522C6.5419 12.0941 7.81081 11.2082 8.74322 10.0416C8.87963 10.2284 9.10028 10.3497 9.34928 10.3497C9.76349 10.3497 10.0993 10.0139 10.0993 9.59971C10.0993 9.24256 9.84965 8.94373 9.51535 8.86816C9.57741 8.75165 9.63653 8.63334 9.6926 8.51332C9.88358 8.63163 10.1088 8.69993 10.35 8.69993C11.0403 8.69993 11.6 8.14028 11.6 7.44993C11.6 6.75976 11.0406 6.20024 10.3505 6.19993C10.3853 5.90487 10.4032 5.60464 10.4032 5.30023Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})),r.createElement(q,{size:"1",weight:"medium"},$(m))))))),r.createElement(ge,null,r.createElement(he,{id:"radius-title"},"Radius"),r.createElement(N,{gap:"2",role:"group","aria-labelledby":"radius-title",wrap:"wrap"},d.radius.values.map(m=>r.createElement(N,{key:m,direction:"column",align:"center"},r.createElement("label",{className:"rt-ThemePanelRadioCard"},r.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"radius",id:`theme-panel-radius-${m}`,value:m,checked:g===m,onChange:C=>T(C.target.value)}),r.createElement(_,{asChild:!0,radius:m},r.createElement(se,{m:"3",width:{initial:"24px",sm:"32px"},height:{initial:"24px",sm:"32px"},style:{borderTopLeftRadius:m==="full"?"80%":"var(--radius-5)",backgroundImage:"linear-gradient(to bottom right, var(--accent-3), var(--accent-4))",borderTop:"2px solid var(--accent-a8)",borderLeft:"2px solid var(--accent-a8)"}}))),r.createElement(se,{asChild:!0,pt:"2"},r.createElement(q,{asChild:!0,size:"1",color:"gray"},r.createElement("label",{htmlFor:`theme-panel-radius-${m}`},$(m)))))))),r.createElement(ge,null,r.createElement(he,{id:"scaling-title"},"Scaling"),r.createElement(Te,{columns:{initial:"repeat(3, 1fr)",sm:"5"},gap:"2",role:"group","aria-labelledby":"scaling-title"},d.scaling.values.map(m=>r.createElement("label",{key:m,className:"rt-ThemePanelRadioCard","aria-label":`Scaling ${m}`},r.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"scaling",value:m,checked:L===m,onChange:C=>w(C.target.value)}),r.createElement(N,{align:"center",justify:"center",height:"32px"},r.createElement(_,{asChild:!0,scaling:m},r.createElement(N,{align:"center",justify:"center"},r.createElement(q,{size:"1",weight:"medium"},$(m))))))))),r.createElement(ge,null,r.createElement(N,{align:"center",gap:"2"},r.createElement(he,{id:"panel-background-title"},"Panel background"),r.createElement(ct,null,r.createElement(ut,null,r.createElement(it,{size:"1",variant:"ghost",color:"gray"},r.createElement(ht,{label:"Learn more about panel background options"},r.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z",fillRule:"evenodd",clipRule:"evenodd"}))))),r.createElement(ft,{size:"1",width:"220px",maxWidth:"90svw",minWidth:"0",side:"top",align:"center"},r.createElement(q,{as:"p",size:"1"},"Whether Card and Table panels are translucent, showing some of the background behind them.")))),r.createElement(Te,{columns:{initial:"1",sm:"2"},rows:{initial:"2",sm:"1"},gap:"2",role:"group","aria-labelledby":"panel-background-title"},d.panelBackground.values.map(m=>r.createElement("label",{key:m,className:"rt-ThemePanelRadioCard"},r.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"panelBackground",value:m,checked:h===m,onChange:C=>v(C.target.value)}),r.createElement(N,{align:"center",justify:"center",height:"32px",gap:"2"},m==="solid"?r.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -2px"}},r.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})):r.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -2px"}},r.createElement("path",{opacity:".05",d:"M6.78296 13.376C8.73904 9.95284 8.73904 5.04719 6.78296 1.62405L7.21708 1.37598C9.261 4.95283 9.261 10.0472 7.21708 13.624L6.78296 13.376Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{opacity:".1",d:"M7.28204 13.4775C9.23929 9.99523 9.23929 5.00475 7.28204 1.52248L7.71791 1.2775C9.76067 4.9119 9.76067 10.0881 7.71791 13.7225L7.28204 13.4775Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{opacity:".15",d:"M7.82098 13.5064C9.72502 9.99523 9.72636 5.01411 7.82492 1.50084L8.26465 1.26285C10.2465 4.92466 10.2451 10.085 8.26052 13.7448L7.82098 13.5064Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{opacity:".2",d:"M8.41284 13.429C10.1952 9.92842 10.1957 5.07537 8.41435 1.57402L8.85999 1.34729C10.7139 4.99113 10.7133 10.0128 8.85841 13.6559L8.41284 13.429Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{opacity:".25",d:"M9.02441 13.2956C10.6567 9.8379 10.6586 5.17715 9.03005 1.71656L9.48245 1.50366C11.1745 5.09919 11.1726 9.91629 9.47657 13.5091L9.02441 13.2956Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{opacity:".3",d:"M9.66809 13.0655C11.1097 9.69572 11.1107 5.3121 9.67088 1.94095L10.1307 1.74457C11.6241 5.24121 11.6231 9.76683 10.1278 13.2622L9.66809 13.0655Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{opacity:".35",d:"M10.331 12.7456C11.5551 9.52073 11.5564 5.49103 10.3347 2.26444L10.8024 2.0874C12.0672 5.42815 12.0659 9.58394 10.7985 12.9231L10.331 12.7456Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{opacity:".4",d:"M11.0155 12.2986C11.9938 9.29744 11.9948 5.71296 11.0184 2.71067L11.4939 2.55603C12.503 5.6589 12.502 9.35178 11.4909 12.4535L11.0155 12.2986Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{opacity:".45",d:"M11.7214 11.668C12.4254 9.01303 12.4262 5.99691 11.7237 3.34116L12.2071 3.21329C12.9318 5.95292 12.931 9.05728 12.2047 11.7961L11.7214 11.668Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{opacity:".5",d:"M12.4432 10.752C12.8524 8.63762 12.8523 6.36089 12.4429 4.2466L12.9338 4.15155C13.3553 6.32861 13.3554 8.66985 12.9341 10.847L12.4432 10.752Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})),r.createElement(q,{size:"1",weight:"medium"},$(m)))))))),r.createElement(at,{style:{width:"100%"},onClick:U},A==="copied"?"Copied":"Copy Theme"))});Pt.displayName="ThemePanelContent";function ge(e){return r.createElement(N,{direction:"column",gap:"3",asChild:!0,...e},r.createElement("section",null,e.children))}function he(e){return r.createElement(Ze,{as:"h3",size:{initial:"1",sm:"2"},...e})}function Er(){let e=document.createElement("style");return e.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}}function $(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Vr(e){let t=document.documentElement,o=t.classList.contains("light-theme"),i=t.classList.contains("dark-theme"),s=t.classList.contains("light"),l=t.classList.contains("dark");(o||i)&&(t.classList.remove("light-theme","dark-theme"),t.style.colorScheme=e,t.classList.add(`${e}-theme`)),(s||l)&&(t.classList.remove("light","dark"),t.style.colorScheme=e,t.classList.add(e)),!o&&!i&&!s&&!l&&(t.style.colorScheme=e,t.classList.add(e))}
|
|
12
|
+
`,bo=r.forwardRef(({defaultOpen:e=!0,...t},o)=>{let[a,n]=r.useState(e),i=r.useRef(null),s=r.useRef(null);return r.useEffect(()=>{function p(l){let m=l.altKey||l.ctrlKey||l.shiftKey||l.metaKey,u=document.activeElement?.closest(Co);if(l.key?.toUpperCase()==="T"&&!m&&!u){let h=!1;(0,vo.flushSync)(()=>{n(v=>(h=!v,h))}),h?(s.current=document.activeElement,i.current?.focus()):s.current?.focus()}}return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[]),r.createElement(Ro,{...t,ref:o,triggerRef:i,open:a,shortcut:r.createElement(Z,{content:"Press T to show/hide the Theme Panel",side:"bottom",sideOffset:6},r.createElement(ut,{asChild:!0,size:"3",tabIndex:0,className:"rt-ThemePanelShortcut"},r.createElement("button",{type:"button",onClick:()=>n(p=>!p),ref:i,"aria-label":"Toggle the Theme Panel"},"T")))})});bo.displayName="ThemePanel";var Ro=r.forwardRef((e,t)=>{let{open:o,onAppearanceChange:a,shortcut:n,triggerRef:i,...s}=e,p=Ce();return r.createElement(K,{asChild:!0,radius:"medium",scaling:"100%"},r.createElement(w,{direction:"column",position:"fixed",top:"0",right:"0",mr:{initial:"2",sm:"4"},mt:{initial:"2",sm:"4"},width:{initial:"360px"},maxHeight:{initial:"calc(100svh - var(--space-2) - var(--space-2))",sm:"calc(100svh - var(--space-4) - var(--space-4))"},maxWidth:{initial:"calc(100svw - var(--space-2) - var(--space-2))",sm:"calc(100svw - var(--space-4) - var(--space-4))"},inert:o?void 0:go,...s,ref:t,style:{zIndex:999999999,overflow:"hidden",borderRadius:"var(--radius-4)",backgroundColor:"var(--color-panel-solid)",transformOrigin:"top center",transitionProperty:"transform, box-shadow",transitionDuration:"200ms",transitionTimingFunction:o?"ease-out":"ease-in",transform:o?"none":"translateX(105%)",boxShadow:o?"var(--shadow-5)":"var(--shadow-2)",...e.style}},r.createElement(gt,null,r.createElement(oe,{flexGrow:"1",p:{initial:"4",xs:"5"},position:"relative"},!!n&&r.createElement(oe,{position:"absolute",top:"0",right:"0",m:"2"},n),r.createElement(ht,{onAppearanceChange:a,context:p})))))});Ro.displayName="ThemePanelImpl";var ht=r.forwardRef((e,t)=>{let{onAppearanceChange:o,context:a,...n}=e,i=Ce(),{appearance:s,onAppearanceChange:p,accentColor:l,onAccentColorChange:m,grayColor:u,onGrayColorChange:y,panelBackground:h,onPanelBackgroundChange:v,radius:C,onRadiusChange:R,scaling:j,onScalingChange:x}=a??i,[V,D]=r.useState(s==="inherit"?null:s),b=o!==void 0,O=(0,ho.useCallbackRef)(o),H=r.useCallback(c=>{let g=Kr();if(s!=="inherit"){p(c);return}b?O(c):(D(c),Zr(c)),g()},[s,p,b,O]),Y=Ie(l),U=u==="auto"?Y:u,[ge,X]=r.useState("idle");async function pe(){let c={appearance:s===d.appearance.default?void 0:s,accentColor:l===d.accentColor.default?void 0:l,grayColor:u===d.grayColor.default?void 0:u,panelBackground:h===d.panelBackground.default?void 0:h,radius:C===d.radius.default?void 0:C,scaling:j===d.scaling.default?void 0:j},g=Object.keys(c).filter(M=>c[M]!==void 0).map(M=>`${M}="${c[M]}"`).join(" "),G=g?`<Theme ${g}>`:"<Theme>";X("copying"),await navigator.clipboard.writeText(G),X("copied"),setTimeout(()=>X("idle"),2e3)}return r.useEffect(()=>{function c(g){let G=g.altKey||g.ctrlKey||g.shiftKey||g.metaKey,M=document.activeElement?.closest(Co);g.key?.toUpperCase()==="D"&&!G&&!M&&H(V==="light"?"dark":"light")}return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[H,V]),r.useEffect(()=>{let c=document.documentElement,g=document.body;function G(){let De=c.classList.contains("dark")||c.classList.contains("dark-theme")||g.classList.contains("dark")||g.classList.contains("dark-theme");D(s==="inherit"?De?"dark":"light":s)}let M=new MutationObserver(function(De){De.forEach(function(Do){Do.attributeName==="class"&&G()})});return G(),s==="inherit"&&(M.observe(c,{attributes:!0}),M.observe(g,{attributes:!0})),()=>M.disconnect()},[s]),r.createElement(w,{direction:"column",gap:"5",...n,ref:t},r.createElement(_e,{size:{initial:"3",sm:"5"},trim:"both",as:"h2"},"Theme"),r.createElement(w,{direction:"column",gap:"5"},r.createElement(Pe,null,r.createElement(ye,{id:"accent-color-title"},"Accent color"),r.createElement(w,{wrap:"wrap",gap:"2",role:"group","aria-labelledby":"accent-color-title"},d.accentColor.values.map(c=>r.createElement(oe,{asChild:!0,key:c},r.createElement("label",{className:"rt-ThemePanelSwatch","aria-label":I(c),style:{backgroundColor:`var(--${c}-9)`}},r.createElement(Z,{content:`${I(c)}${l==="gray"&&U!=="gray"?` (${I(U)})`:""}`},r.createElement("input",{className:"rt-ThemePanelSwatchInput",type:"radio",name:"accentColor",value:c,checked:l===c,onChange:g=>m(g.target.value)}))))))),r.createElement(Pe,null,r.createElement(ye,{id:"gray-color-title"},"Gray color"),r.createElement(w,{wrap:"wrap",gap:"2",role:"group","aria-labelledby":"gray-color-title"},d.grayColor.values.map(c=>r.createElement(w,{key:c,asChild:!0,align:"center",justify:"center"},r.createElement("label",{className:"rt-ThemePanelSwatch","aria-label":I(c),style:{backgroundColor:c==="auto"?`var(--${Y}-9)`:c==="gray"?"var(--gray-9)":`var(--${c}-9)`,filter:c==="gray"?"saturate(0)":void 0}},r.createElement(Z,{content:`${I(c)}${c==="auto"?` (${I(Y)})`:""}`},r.createElement("input",{className:"rt-ThemePanelSwatchInput",type:"radio",name:"grayColor",value:c,checked:u===c,onChange:g=>y(g.target.value)}))))))),r.createElement(Pe,null,r.createElement(ye,{id:"appearance-title"},"Appearance"),r.createElement(be,{columns:"2",gap:"2",role:"group","aria-labelledby":"appearance-title"},["light","dark"].map(c=>r.createElement("label",{key:c,className:"rt-ThemePanelRadioCard"},r.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"appearance",value:c,checked:V===c,onChange:g=>H(g.target.value)}),r.createElement(w,{align:"center",justify:"center",height:"32px",gap:"2"},c==="light"?r.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -1px"}},r.createElement("path",{d:"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})):r.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -1px"}},r.createElement("path",{d:"M2.89998 0.499976C2.89998 0.279062 2.72089 0.0999756 2.49998 0.0999756C2.27906 0.0999756 2.09998 0.279062 2.09998 0.499976V1.09998H1.49998C1.27906 1.09998 1.09998 1.27906 1.09998 1.49998C1.09998 1.72089 1.27906 1.89998 1.49998 1.89998H2.09998V2.49998C2.09998 2.72089 2.27906 2.89998 2.49998 2.89998C2.72089 2.89998 2.89998 2.72089 2.89998 2.49998V1.89998H3.49998C3.72089 1.89998 3.89998 1.72089 3.89998 1.49998C3.89998 1.27906 3.72089 1.09998 3.49998 1.09998H2.89998V0.499976ZM5.89998 3.49998C5.89998 3.27906 5.72089 3.09998 5.49998 3.09998C5.27906 3.09998 5.09998 3.27906 5.09998 3.49998V4.09998H4.49998C4.27906 4.09998 4.09998 4.27906 4.09998 4.49998C4.09998 4.72089 4.27906 4.89998 4.49998 4.89998H5.09998V5.49998C5.09998 5.72089 5.27906 5.89998 5.49998 5.89998C5.72089 5.89998 5.89998 5.72089 5.89998 5.49998V4.89998H6.49998C6.72089 4.89998 6.89998 4.72089 6.89998 4.49998C6.89998 4.27906 6.72089 4.09998 6.49998 4.09998H5.89998V3.49998ZM1.89998 6.49998C1.89998 6.27906 1.72089 6.09998 1.49998 6.09998C1.27906 6.09998 1.09998 6.27906 1.09998 6.49998V7.09998H0.499976C0.279062 7.09998 0.0999756 7.27906 0.0999756 7.49998C0.0999756 7.72089 0.279062 7.89998 0.499976 7.89998H1.09998V8.49998C1.09998 8.72089 1.27906 8.89997 1.49998 8.89997C1.72089 8.89997 1.89998 8.72089 1.89998 8.49998V7.89998H2.49998C2.72089 7.89998 2.89998 7.72089 2.89998 7.49998C2.89998 7.27906 2.72089 7.09998 2.49998 7.09998H1.89998V6.49998ZM8.54406 0.98184L8.24618 0.941586C8.03275 0.917676 7.90692 1.1655 8.02936 1.34194C8.17013 1.54479 8.29981 1.75592 8.41754 1.97445C8.91878 2.90485 9.20322 3.96932 9.20322 5.10022C9.20322 8.37201 6.82247 11.0878 3.69887 11.6097C3.45736 11.65 3.20988 11.6772 2.96008 11.6906C2.74563 11.702 2.62729 11.9535 2.77721 12.1072C2.84551 12.1773 2.91535 12.2458 2.98667 12.3128L3.05883 12.3795L3.31883 12.6045L3.50684 12.7532L3.62796 12.8433L3.81491 12.9742L3.99079 13.089C4.11175 13.1651 4.23536 13.2375 4.36157 13.3059L4.62496 13.4412L4.88553 13.5607L5.18837 13.6828L5.43169 13.7686C5.56564 13.8128 5.70149 13.8529 5.83857 13.8885C5.94262 13.9155 6.04767 13.9401 6.15405 13.9622C6.27993 13.9883 6.40713 14.0109 6.53544 14.0298L6.85241 14.0685L7.11934 14.0892C7.24637 14.0965 7.37436 14.1002 7.50322 14.1002C11.1483 14.1002 14.1032 11.1453 14.1032 7.50023C14.1032 7.25044 14.0893 7.00389 14.0623 6.76131L14.0255 6.48407C13.991 6.26083 13.9453 6.04129 13.8891 5.82642C13.8213 5.56709 13.7382 5.31398 13.6409 5.06881L13.5279 4.80132L13.4507 4.63542L13.3766 4.48666C13.2178 4.17773 13.0353 3.88295 12.8312 3.60423L12.6782 3.40352L12.4793 3.16432L12.3157 2.98361L12.1961 2.85951L12.0355 2.70246L11.8134 2.50184L11.4925 2.24191L11.2483 2.06498L10.9562 1.87446L10.6346 1.68894L10.3073 1.52378L10.1938 1.47176L9.95488 1.3706L9.67791 1.2669L9.42566 1.1846L9.10075 1.09489L8.83599 1.03486L8.54406 0.98184ZM10.4032 5.30023C10.4032 4.27588 10.2002 3.29829 9.83244 2.40604C11.7623 3.28995 13.1032 5.23862 13.1032 7.50023C13.1032 10.593 10.596 13.1002 7.50322 13.1002C6.63646 13.1002 5.81597 12.9036 5.08355 12.5522C6.5419 12.0941 7.81081 11.2082 8.74322 10.0416C8.87963 10.2284 9.10028 10.3497 9.34928 10.3497C9.76349 10.3497 10.0993 10.0139 10.0993 9.59971C10.0993 9.24256 9.84965 8.94373 9.51535 8.86816C9.57741 8.75165 9.63653 8.63334 9.6926 8.51332C9.88358 8.63163 10.1088 8.69993 10.35 8.69993C11.0403 8.69993 11.6 8.14028 11.6 7.44993C11.6 6.75976 11.0406 6.20024 10.3505 6.19993C10.3853 5.90487 10.4032 5.60464 10.4032 5.30023Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})),r.createElement(z,{size:"1",weight:"medium"},I(c))))))),r.createElement(Pe,null,r.createElement(ye,{id:"radius-title"},"Radius"),r.createElement(w,{gap:"2",role:"group","aria-labelledby":"radius-title",wrap:"wrap"},d.radius.values.map(c=>r.createElement(w,{key:c,direction:"column",align:"center"},r.createElement("label",{className:"rt-ThemePanelRadioCard"},r.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"radius",id:`theme-panel-radius-${c}`,value:c,checked:C===c,onChange:g=>R(g.target.value)}),r.createElement(K,{asChild:!0,radius:c},r.createElement(oe,{m:"3",width:{initial:"24px",sm:"32px"},height:{initial:"24px",sm:"32px"},style:{borderTopLeftRadius:c==="full"?"80%":"var(--radius-5)",backgroundImage:"linear-gradient(to bottom right, var(--accent-3), var(--accent-4))",borderTop:"2px solid var(--accent-a8)",borderLeft:"2px solid var(--accent-a8)"}}))),r.createElement(oe,{asChild:!0,pt:"2"},r.createElement(z,{asChild:!0,size:"1",color:"gray"},r.createElement("label",{htmlFor:`theme-panel-radius-${c}`},I(c)))))))),r.createElement(Pe,null,r.createElement(ye,{id:"scaling-title"},"Scaling"),r.createElement(be,{columns:{initial:"repeat(3, 1fr)",sm:"5"},gap:"2",role:"group","aria-labelledby":"scaling-title"},d.scaling.values.map(c=>r.createElement("label",{key:c,className:"rt-ThemePanelRadioCard","aria-label":`Scaling ${c}`},r.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"scaling",value:c,checked:j===c,onChange:g=>x(g.target.value)}),r.createElement(w,{align:"center",justify:"center",height:"32px"},r.createElement(K,{asChild:!0,scaling:c},r.createElement(w,{align:"center",justify:"center"},r.createElement(z,{size:"1",weight:"medium"},I(c))))))))),r.createElement(Pe,null,r.createElement(w,{align:"center",gap:"2"},r.createElement(ye,{id:"panel-background-title"},"Panel background"),r.createElement(dt,null,r.createElement(Pt,null,r.createElement(ct,{size:"1",variant:"ghost",color:"gray"},r.createElement(bt,{label:"Learn more about panel background options"},r.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z",fillRule:"evenodd",clipRule:"evenodd"}))))),r.createElement(yt,{size:"1",width:"220px",maxWidth:"90svw",minWidth:"0",side:"top",align:"center"},r.createElement(z,{as:"p",size:"1"},"Whether Card and Table panels are translucent, showing some of the background behind them.")))),r.createElement(be,{columns:{initial:"1",sm:"2"},rows:{initial:"2",sm:"1"},gap:"2",role:"group","aria-labelledby":"panel-background-title"},d.panelBackground.values.map(c=>r.createElement("label",{key:c,className:"rt-ThemePanelRadioCard"},r.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"panelBackground",value:c,checked:h===c,onChange:g=>v(g.target.value)}),r.createElement(w,{align:"center",justify:"center",height:"32px",gap:"2"},c==="solid"?r.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -2px"}},r.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})):r.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -2px"}},r.createElement("path",{opacity:".05",d:"M6.78296 13.376C8.73904 9.95284 8.73904 5.04719 6.78296 1.62405L7.21708 1.37598C9.261 4.95283 9.261 10.0472 7.21708 13.624L6.78296 13.376Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{opacity:".1",d:"M7.28204 13.4775C9.23929 9.99523 9.23929 5.00475 7.28204 1.52248L7.71791 1.2775C9.76067 4.9119 9.76067 10.0881 7.71791 13.7225L7.28204 13.4775Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{opacity:".15",d:"M7.82098 13.5064C9.72502 9.99523 9.72636 5.01411 7.82492 1.50084L8.26465 1.26285C10.2465 4.92466 10.2451 10.085 8.26052 13.7448L7.82098 13.5064Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{opacity:".2",d:"M8.41284 13.429C10.1952 9.92842 10.1957 5.07537 8.41435 1.57402L8.85999 1.34729C10.7139 4.99113 10.7133 10.0128 8.85841 13.6559L8.41284 13.429Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{opacity:".25",d:"M9.02441 13.2956C10.6567 9.8379 10.6586 5.17715 9.03005 1.71656L9.48245 1.50366C11.1745 5.09919 11.1726 9.91629 9.47657 13.5091L9.02441 13.2956Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{opacity:".3",d:"M9.66809 13.0655C11.1097 9.69572 11.1107 5.3121 9.67088 1.94095L10.1307 1.74457C11.6241 5.24121 11.6231 9.76683 10.1278 13.2622L9.66809 13.0655Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{opacity:".35",d:"M10.331 12.7456C11.5551 9.52073 11.5564 5.49103 10.3347 2.26444L10.8024 2.0874C12.0672 5.42815 12.0659 9.58394 10.7985 12.9231L10.331 12.7456Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{opacity:".4",d:"M11.0155 12.2986C11.9938 9.29744 11.9948 5.71296 11.0184 2.71067L11.4939 2.55603C12.503 5.6589 12.502 9.35178 11.4909 12.4535L11.0155 12.2986Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{opacity:".45",d:"M11.7214 11.668C12.4254 9.01303 12.4262 5.99691 11.7237 3.34116L12.2071 3.21329C12.9318 5.95292 12.931 9.05728 12.2047 11.7961L11.7214 11.668Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{opacity:".5",d:"M12.4432 10.752C12.8524 8.63762 12.8523 6.36089 12.4429 4.2466L12.9338 4.15155C13.3553 6.32861 13.3554 8.66985 12.9341 10.847L12.4432 10.752Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),r.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})),r.createElement(z,{size:"1",weight:"medium"},I(c)))))))),r.createElement(lt,{style:{width:"100%"},onClick:pe},ge==="copied"?"Copied":"Copy Theme"))});ht.displayName="ThemePanelContent";function Pe(e){return r.createElement(w,{direction:"column",gap:"3",asChild:!0,...e},r.createElement("section",null,e.children))}function ye(e){return r.createElement(_e,{as:"h3",size:{initial:"1",sm:"2"},...e})}function Kr(){let e=document.createElement("style");return e.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}}function I(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Zr(e){let t=document.documentElement,o=t.classList.contains("light-theme"),a=t.classList.contains("dark-theme"),n=t.classList.contains("light"),i=t.classList.contains("dark");(o||a)&&(t.classList.remove("light-theme","dark-theme"),t.style.colorScheme=e,t.classList.add(`${e}-theme`)),(n||i)&&(t.classList.remove("light","dark"),t.style.colorScheme=e,t.classList.add(e)),!o&&!a&&!n&&!i&&(t.style.colorScheme=e,t.classList.add(e))}
|
|
13
13
|
//# sourceMappingURL=theme-panel.js.map
|