@womp/kookie-ui 0.34.1 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/components.css +20 -7
- package/dist/cjs/components/_internal/pane-chrome.d.ts +1 -2
- package/dist/cjs/components/_internal/pane-chrome.d.ts.map +1 -1
- package/dist/cjs/components/_internal/pane-chrome.js.map +2 -2
- package/dist/cjs/components/_internal/shell-bottom.js +1 -1
- package/dist/cjs/components/_internal/shell-bottom.js.map +3 -3
- 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 +3 -3
- package/dist/cjs/components/_internal/shell-resizable.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-resizable.js +1 -1
- package/dist/cjs/components/_internal/shell-resizable.js.map +3 -3
- package/dist/cjs/components/_internal/shell-resize.d.ts +2 -0
- package/dist/cjs/components/_internal/shell-resize.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-resize.js.map +2 -2
- package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js.map +3 -3
- package/dist/cjs/components/avatar.d.ts.map +1 -1
- package/dist/cjs/components/avatar.js +1 -1
- package/dist/cjs/components/avatar.js.map +2 -2
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +3 -3
- package/dist/cjs/components/chatbar.d.ts.map +1 -1
- package/dist/cjs/components/chatbar.js +1 -1
- package/dist/cjs/components/chatbar.js.map +3 -3
- package/dist/cjs/components/combobox.d.ts +16 -0
- package/dist/cjs/components/combobox.d.ts.map +1 -1
- package/dist/cjs/components/combobox.js +1 -1
- package/dist/cjs/components/combobox.js.map +2 -2
- package/dist/cjs/components/index.js +2 -2
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/message-scroller.js +1 -1
- package/dist/cjs/components/message-scroller.js.map +3 -3
- package/dist/cjs/components/navbar.d.ts.map +1 -1
- package/dist/cjs/components/navbar.js +1 -1
- package/dist/cjs/components/navbar.js.map +3 -3
- package/dist/cjs/components/navigator.js +1 -1
- package/dist/cjs/components/navigator.js.map +3 -3
- package/dist/cjs/components/notice.js +1 -1
- package/dist/cjs/components/notice.js.map +3 -3
- package/dist/cjs/components/schemas/base-button.schema.d.ts +7 -0
- package/dist/cjs/components/schemas/base-button.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/base-button.schema.js +1 -1
- package/dist/cjs/components/schemas/base-button.schema.js.map +2 -2
- package/dist/cjs/components/schemas/button.schema.d.ts +14 -0
- package/dist/cjs/components/schemas/button.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/button.schema.js +1 -1
- package/dist/cjs/components/schemas/button.schema.js.map +2 -2
- package/dist/cjs/components/schemas/index.js +1 -1
- package/dist/cjs/components/schemas/index.js.map +2 -2
- package/dist/cjs/components/schemas/shell.schema.d.ts +7 -6
- package/dist/cjs/components/schemas/shell.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/shell.schema.js +1 -1
- package/dist/cjs/components/schemas/shell.schema.js.map +2 -2
- package/dist/cjs/components/schemas/toggle.schema.d.ts +83 -77
- package/dist/cjs/components/schemas/toggle.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/toggle.schema.js +1 -1
- package/dist/cjs/components/schemas/toggle.schema.js.map +2 -2
- package/dist/cjs/components/segmented-control.d.ts.map +1 -1
- package/dist/cjs/components/segmented-control.js +1 -1
- package/dist/cjs/components/segmented-control.js.map +3 -3
- package/dist/cjs/components/select.js +1 -1
- package/dist/cjs/components/select.js.map +2 -2
- package/dist/cjs/components/sheet.d.ts +2 -2
- package/dist/cjs/components/sheet.js.map +1 -1
- package/dist/cjs/components/shell.context.js.map +1 -1
- package/dist/cjs/components/shell.js +1 -1
- package/dist/cjs/components/shell.js.map +3 -3
- package/dist/cjs/components/sidebar.d.ts +1 -1
- package/dist/cjs/components/sidebar.d.ts.map +1 -1
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +3 -3
- package/dist/cjs/components/table.d.ts.map +1 -1
- package/dist/cjs/components/table.js +1 -1
- package/dist/cjs/components/table.js.map +3 -3
- package/dist/cjs/components/toggle.js +1 -1
- package/dist/cjs/components/toggle.js.map +3 -3
- package/dist/cjs/components/toolbar.js +1 -1
- package/dist/cjs/components/toolbar.js.map +3 -3
- package/dist/cjs/components/virtual-menu.d.ts.map +1 -1
- package/dist/cjs/components/virtual-menu.js +1 -1
- package/dist/cjs/components/virtual-menu.js.map +3 -3
- package/dist/cjs/helpers/index.d.ts +0 -1
- package/dist/cjs/helpers/index.d.ts.map +1 -1
- package/dist/cjs/helpers/index.js +2 -2
- package/dist/cjs/helpers/index.js.map +4 -4
- package/dist/cjs/hooks/index.d.ts +0 -2
- package/dist/cjs/hooks/index.d.ts.map +1 -1
- package/dist/cjs/hooks/index.js +3 -11
- package/dist/cjs/hooks/index.js.map +4 -4
- package/dist/cjs/index.js +3 -11
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/props/index.d.ts +6 -1
- package/dist/cjs/props/index.d.ts.map +1 -1
- package/dist/cjs/props/index.js +1 -1
- package/dist/cjs/props/index.js.map +4 -4
- package/dist/esm/chunk-25FNCKUM.js +2 -0
- package/dist/esm/chunk-25FNCKUM.js.map +7 -0
- package/dist/esm/{chunk-KDJM4NQQ.js → chunk-2WFN4D52.js} +2 -2
- package/dist/esm/chunk-4OJRLS5N.js +3 -0
- package/dist/esm/chunk-4OJRLS5N.js.map +7 -0
- package/dist/esm/chunk-4TTRPCGG.js +3 -0
- package/dist/esm/{chunk-QKCNGEX4.js.map → chunk-4TTRPCGG.js.map} +3 -3
- package/dist/esm/chunk-4X64QOAR.js +3 -0
- package/dist/esm/chunk-4X64QOAR.js.map +7 -0
- package/dist/esm/{chunk-L7PRLW6A.js → chunk-5APRBJRR.js} +2 -2
- package/dist/esm/{chunk-L7PRLW6A.js.map → chunk-5APRBJRR.js.map} +2 -2
- package/dist/esm/chunk-7HD5LS3M.js +3 -0
- package/dist/esm/chunk-7HD5LS3M.js.map +7 -0
- package/dist/esm/chunk-7ZOGH5NT.js +2 -0
- package/dist/esm/chunk-7ZOGH5NT.js.map +7 -0
- package/dist/esm/chunk-BJA75XKG.js +2 -0
- package/dist/esm/chunk-BJA75XKG.js.map +7 -0
- package/dist/esm/{chunk-NO2JCJWI.js → chunk-BJVXB3PN.js} +2 -2
- package/dist/esm/{chunk-BR6Z2CAE.js → chunk-C6VGCYFQ.js} +2 -2
- package/dist/esm/chunk-EZYXYLR2.js +2 -0
- package/dist/esm/chunk-EZYXYLR2.js.map +7 -0
- package/dist/esm/chunk-FTNZWAPB.js +3 -0
- package/dist/esm/{chunk-7QBNXNEN.js.map → chunk-FTNZWAPB.js.map} +3 -3
- package/dist/esm/{chunk-ZLGOZKB3.js → chunk-FYZXC7AL.js} +2 -2
- package/dist/esm/{chunk-XD676L6S.js → chunk-HQT32HQ6.js} +2 -2
- package/dist/esm/{chunk-XKYPJTRN.js → chunk-I5TPDYJO.js} +2 -2
- package/dist/esm/chunk-I77CYEBT.js +2 -0
- package/dist/esm/chunk-I77CYEBT.js.map +7 -0
- package/dist/esm/{chunk-API4DAPY.js → chunk-J7MIXG6M.js} +1 -1
- package/dist/esm/chunk-J7MIXG6M.js.map +7 -0
- package/dist/esm/{chunk-UMQOTGJC.js → chunk-M26LLCQC.js} +2 -2
- package/dist/esm/{chunk-WN3WMFAM.js → chunk-MLHS2GWL.js} +2 -2
- package/dist/esm/chunk-MPLBIPJ6.js +3 -0
- package/dist/esm/chunk-MPLBIPJ6.js.map +7 -0
- package/dist/esm/{chunk-WEBNIUEX.js → chunk-MXEOE4LA.js} +1 -1
- package/dist/esm/chunk-MXEOE4LA.js.map +7 -0
- package/dist/esm/chunk-OGVKMDO7.js +3 -0
- package/dist/esm/chunk-OGVKMDO7.js.map +7 -0
- package/dist/esm/{chunk-ODHCDJ3Y.js → chunk-PMXIQ5B4.js} +1 -1
- package/dist/esm/chunk-PMXIQ5B4.js.map +7 -0
- package/dist/esm/{chunk-LG5DPQ46.js → chunk-R4DMVTM3.js} +2 -2
- package/dist/esm/{chunk-LG5DPQ46.js.map → chunk-R4DMVTM3.js.map} +3 -3
- package/dist/esm/chunk-S6SEWECR.js +3 -0
- package/dist/esm/{chunk-5VYQDA5S.js.map → chunk-S6SEWECR.js.map} +3 -3
- package/dist/esm/{chunk-7YXHLU4C.js → chunk-TANYRHGP.js} +2 -2
- package/dist/esm/{chunk-INGT6DB6.js → chunk-TS4QCDSI.js} +1 -1
- package/dist/esm/chunk-TS4QCDSI.js.map +7 -0
- package/dist/esm/chunk-VRWZLGR7.js +2 -0
- package/dist/esm/chunk-X4PWBFOT.js +3 -0
- package/dist/esm/chunk-X4PWBFOT.js.map +7 -0
- package/dist/esm/chunk-XFMAA4MD.js +3 -0
- package/dist/esm/chunk-XFMAA4MD.js.map +7 -0
- package/dist/esm/chunk-XGV7KNSE.js +3 -0
- package/dist/esm/chunk-XGV7KNSE.js.map +7 -0
- package/dist/esm/chunk-XOAOSRTH.js +3 -0
- package/dist/esm/chunk-XOAOSRTH.js.map +7 -0
- package/dist/esm/{chunk-YOTTLPJ3.js → chunk-Y5ITMKC6.js} +2 -2
- package/dist/esm/chunk-YLPCYCYA.js +3 -0
- package/dist/esm/chunk-YLPCYCYA.js.map +7 -0
- package/dist/esm/components/_internal/pane-chrome.d.ts +1 -2
- package/dist/esm/components/_internal/pane-chrome.d.ts.map +1 -1
- package/dist/esm/components/_internal/pane-chrome.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-resizable.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-resizable.js +1 -1
- package/dist/esm/components/_internal/shell-resize.d.ts +2 -0
- package/dist/esm/components/_internal/shell-resize.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-resize.js +1 -1
- package/dist/esm/components/_internal/shell-sidebar.js +1 -1
- package/dist/esm/components/accordion.props.js +1 -1
- package/dist/esm/components/accordion.props.js.map +4 -4
- package/dist/esm/components/avatar.d.ts.map +1 -1
- package/dist/esm/components/avatar.js +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/chatbar.d.ts.map +1 -1
- package/dist/esm/components/chatbar.js +1 -1
- package/dist/esm/components/combobox.d.ts +16 -0
- package/dist/esm/components/combobox.d.ts.map +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/combobox.props.js +1 -1
- package/dist/esm/components/combobox.props.js.map +4 -4
- package/dist/esm/components/image.props.js +1 -1
- package/dist/esm/components/image.props.js.map +4 -4
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/message-scroller.js +1 -1
- package/dist/esm/components/navbar.d.ts.map +1 -1
- package/dist/esm/components/navbar.js +1 -1
- package/dist/esm/components/navbar.props.js +1 -1
- package/dist/esm/components/navbar.props.js.map +4 -4
- package/dist/esm/components/navigator.js +1 -1
- package/dist/esm/components/notice.js +1 -1
- package/dist/esm/components/schemas/base-button.schema.d.ts +7 -0
- package/dist/esm/components/schemas/base-button.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/base-button.schema.js +1 -1
- package/dist/esm/components/schemas/button.schema.d.ts +14 -0
- package/dist/esm/components/schemas/button.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/button.schema.js +1 -1
- package/dist/esm/components/schemas/index.js +1 -1
- package/dist/esm/components/schemas/shell.schema.d.ts +7 -6
- package/dist/esm/components/schemas/shell.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/shell.schema.js +1 -1
- package/dist/esm/components/schemas/toggle.schema.d.ts +83 -77
- package/dist/esm/components/schemas/toggle.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/toggle.schema.js +1 -1
- package/dist/esm/components/segmented-control.d.ts.map +1 -1
- package/dist/esm/components/segmented-control.js +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/sheet.d.ts +2 -2
- package/dist/esm/components/sheet.js +1 -1
- package/dist/esm/components/shell.context.js +1 -1
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/sidebar.d.ts +1 -1
- package/dist/esm/components/sidebar.d.ts.map +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/table.d.ts.map +1 -1
- package/dist/esm/components/table.js +1 -1
- package/dist/esm/components/toggle.js +1 -1
- package/dist/esm/components/toolbar.js +1 -1
- package/dist/esm/components/toolbar.props.js +1 -1
- package/dist/esm/components/toolbar.props.js.map +4 -4
- package/dist/esm/components/virtual-menu.d.ts.map +1 -1
- package/dist/esm/components/virtual-menu.js +1 -1
- package/dist/esm/helpers/index.d.ts +0 -1
- package/dist/esm/helpers/index.d.ts.map +1 -1
- package/dist/esm/helpers/index.js +1 -1
- package/dist/esm/helpers/index.js.map +2 -2
- package/dist/esm/hooks/index.d.ts +0 -2
- package/dist/esm/hooks/index.d.ts.map +1 -1
- package/dist/esm/hooks/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/props/index.d.ts +6 -1
- package/dist/esm/props/index.d.ts.map +1 -1
- package/dist/esm/props/index.js +1 -1
- package/layout/utilities.css +810 -0
- package/layout.css +810 -0
- package/package.json +3 -4
- package/schemas/base-button.json +13 -0
- package/schemas/button.json +13 -0
- package/schemas/index.json +51 -12
- package/schemas/shell-bottom.json +2 -2
- package/schemas/shell-content.json +2 -2
- package/schemas/shell-header.json +4 -0
- package/schemas/shell-inspector.json +2 -2
- package/schemas/shell-panel.json +2 -2
- package/schemas/shell-rail.json +2 -2
- package/schemas/shell-sidebar.json +2 -2
- package/schemas/toggle.json +9 -0
- package/src/components/_internal/base-checkbox.css +0 -2
- package/src/components/_internal/base-dialog.css +1 -1
- package/src/components/_internal/base-sidebar-menu.css +0 -3
- package/src/components/_internal/base-sidebar.css +0 -2
- package/src/components/_internal/base-tab-list.css +0 -1
- package/src/components/_internal/pane-chrome.tsx +2 -3
- package/src/components/_internal/shell-handles.tsx +3 -0
- package/src/components/_internal/shell-resizable.tsx +9 -0
- package/src/components/_internal/shell-resize.tsx +2 -0
- package/src/components/accordion.css +0 -1
- package/src/components/avatar.tsx +3 -1
- package/src/components/button.tsx +1 -1
- package/src/components/chatbar.css +0 -2
- package/src/components/chatbar.tsx +2 -1
- package/src/components/combobox.tsx +2 -3
- package/src/components/navbar.tsx +3 -4
- package/src/components/navigator.css +4 -4
- package/src/components/notice.css +1 -1
- package/src/components/schemas/base-button.schema.ts +7 -0
- package/src/components/schemas/shell.schema.ts +3 -2
- package/src/components/schemas/toggle.schema.ts +2 -1
- package/src/components/segmented-control.css +13 -3
- package/src/components/segmented-control.tsx +10 -2
- package/src/components/select.tsx +2 -2
- package/src/components/sheet.tsx +2 -2
- package/src/components/shell.context.tsx +1 -1
- package/src/components/sidebar.css +2 -7
- package/src/components/sidebar.tsx +1 -1
- package/src/components/table.tsx +4 -1
- package/src/components/text-area.css +0 -1
- package/src/components/text-field.css +2 -2
- package/src/components/virtual-menu.css +0 -1
- package/src/components/virtual-menu.tsx +8 -1
- package/src/helpers/index.ts +0 -1
- package/src/hooks/index.ts +0 -2
- package/src/props/index.ts +6 -1
- package/src/styles/utilities/inset.css +135 -0
- package/styles.css +830 -7
- package/utilities.css +810 -0
- package/dist/cjs/helpers/map-prop-values.d.ts +0 -4
- package/dist/cjs/helpers/map-prop-values.d.ts.map +0 -1
- package/dist/cjs/helpers/map-prop-values.js +0 -2
- package/dist/cjs/helpers/map-prop-values.js.map +0 -7
- package/dist/cjs/hooks/use-live-announcer.d.ts +0 -6
- package/dist/cjs/hooks/use-live-announcer.d.ts.map +0 -1
- package/dist/cjs/hooks/use-live-announcer.js +0 -11
- package/dist/cjs/hooks/use-live-announcer.js.map +0 -7
- package/dist/cjs/hooks/use-toggle-state.d.ts +0 -37
- package/dist/cjs/hooks/use-toggle-state.d.ts.map +0 -1
- package/dist/cjs/hooks/use-toggle-state.js +0 -11
- package/dist/cjs/hooks/use-toggle-state.js.map +0 -7
- package/dist/cjs/props/shadow.props.d.ts +0 -24
- package/dist/cjs/props/shadow.props.d.ts.map +0 -1
- package/dist/cjs/props/shadow.props.js +0 -2
- package/dist/cjs/props/shadow.props.js.map +0 -7
- package/dist/esm/chunk-3QWGSRYC.js +0 -3
- package/dist/esm/chunk-3QWGSRYC.js.map +0 -7
- package/dist/esm/chunk-5KQCG7AV.js +0 -3
- package/dist/esm/chunk-5KQCG7AV.js.map +0 -7
- package/dist/esm/chunk-5VYQDA5S.js +0 -3
- package/dist/esm/chunk-677CX2QF.js +0 -2
- package/dist/esm/chunk-677CX2QF.js.map +0 -7
- package/dist/esm/chunk-7QBNXNEN.js +0 -3
- package/dist/esm/chunk-API4DAPY.js.map +0 -7
- package/dist/esm/chunk-AYKOOEZR.js +0 -2
- package/dist/esm/chunk-BQOFHLDP.js +0 -3
- package/dist/esm/chunk-BQOFHLDP.js.map +0 -7
- package/dist/esm/chunk-CZ24FOFS.js +0 -3
- package/dist/esm/chunk-CZ24FOFS.js.map +0 -7
- package/dist/esm/chunk-EERKYRYI.js +0 -3
- package/dist/esm/chunk-EERKYRYI.js.map +0 -7
- package/dist/esm/chunk-HZYE46V2.js +0 -2
- package/dist/esm/chunk-HZYE46V2.js.map +0 -7
- package/dist/esm/chunk-IN2WND4B.js +0 -3
- package/dist/esm/chunk-IN2WND4B.js.map +0 -7
- package/dist/esm/chunk-INGT6DB6.js.map +0 -7
- package/dist/esm/chunk-J6B7UCZN.js +0 -3
- package/dist/esm/chunk-J6B7UCZN.js.map +0 -7
- package/dist/esm/chunk-JQMWNI62.js +0 -3
- package/dist/esm/chunk-JQMWNI62.js.map +0 -7
- package/dist/esm/chunk-ODHCDJ3Y.js.map +0 -7
- package/dist/esm/chunk-QKCNGEX4.js +0 -3
- package/dist/esm/chunk-RIHTVZVJ.js +0 -3
- package/dist/esm/chunk-RIHTVZVJ.js.map +0 -7
- package/dist/esm/chunk-TMINGBSQ.js +0 -3
- package/dist/esm/chunk-TMINGBSQ.js.map +0 -7
- package/dist/esm/chunk-WEBNIUEX.js.map +0 -7
- package/dist/esm/chunk-WTP2KIK3.js +0 -11
- package/dist/esm/chunk-WTP2KIK3.js.map +0 -7
- package/dist/esm/chunk-XF6Z5NKE.js +0 -3
- package/dist/esm/chunk-XF6Z5NKE.js.map +0 -7
- package/dist/esm/helpers/map-prop-values.d.ts +0 -4
- package/dist/esm/helpers/map-prop-values.d.ts.map +0 -1
- package/dist/esm/helpers/map-prop-values.js +0 -2
- package/dist/esm/helpers/map-prop-values.js.map +0 -7
- package/dist/esm/hooks/use-live-announcer.d.ts +0 -6
- package/dist/esm/hooks/use-live-announcer.d.ts.map +0 -1
- package/dist/esm/hooks/use-live-announcer.js +0 -3
- package/dist/esm/hooks/use-live-announcer.js.map +0 -7
- package/dist/esm/hooks/use-toggle-state.d.ts +0 -37
- package/dist/esm/hooks/use-toggle-state.d.ts.map +0 -1
- package/dist/esm/hooks/use-toggle-state.js +0 -3
- package/dist/esm/hooks/use-toggle-state.js.map +0 -7
- package/dist/esm/props/shadow.props.d.ts +0 -24
- package/dist/esm/props/shadow.props.d.ts.map +0 -1
- package/dist/esm/props/shadow.props.js +0 -2
- package/dist/esm/props/shadow.props.js.map +0 -7
- package/src/helpers/map-prop-values.ts +0 -17
- package/src/hooks/use-live-announcer.ts +0 -79
- package/src/hooks/use-toggle-state.ts +0 -72
- package/src/props/shadow.props.ts +0 -30
- /package/dist/esm/{chunk-KDJM4NQQ.js.map → chunk-2WFN4D52.js.map} +0 -0
- /package/dist/esm/{chunk-NO2JCJWI.js.map → chunk-BJVXB3PN.js.map} +0 -0
- /package/dist/esm/{chunk-BR6Z2CAE.js.map → chunk-C6VGCYFQ.js.map} +0 -0
- /package/dist/esm/{chunk-ZLGOZKB3.js.map → chunk-FYZXC7AL.js.map} +0 -0
- /package/dist/esm/{chunk-XD676L6S.js.map → chunk-HQT32HQ6.js.map} +0 -0
- /package/dist/esm/{chunk-XKYPJTRN.js.map → chunk-I5TPDYJO.js.map} +0 -0
- /package/dist/esm/{chunk-UMQOTGJC.js.map → chunk-M26LLCQC.js.map} +0 -0
- /package/dist/esm/{chunk-WN3WMFAM.js.map → chunk-MLHS2GWL.js.map} +0 -0
- /package/dist/esm/{chunk-7YXHLU4C.js.map → chunk-TANYRHGP.js.map} +0 -0
- /package/dist/esm/{chunk-AYKOOEZR.js.map → chunk-VRWZLGR7.js.map} +0 -0
- /package/dist/esm/{chunk-YOTTLPJ3.js.map → chunk-Y5ITMKC6.js.map} +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as d}from"./chunk-OAJ5DARR.js";import{c}from"./chunk-5ON3XLRD.js";import{a as u}from"./chunk-DFQIIYLD.js";import{a as f}from"./chunk-L54FWKJE.js";import{a as b,c as r}from"./chunk-OKQAVYW4.js";import{a as g}from"./chunk-VQPANPMI.js";var G={};g(G,{Body:()=>y,Cell:()=>w,ColumnHeaderCell:()=>v,Header:()=>T,Root:()=>R,Row:()=>C,RowHeaderCell:()=>H});import*as e from"react";import t from"classnames";var O=["1","2","3","4"],W=["surface","ghost"],j=["auto","fixed"],p={size:{type:"enum",className:"kui-r-size",values:O,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:W,default:"ghost"},layout:{type:"enum",className:"kui-r-tl",values:j,responsive:!0}},z=["start","center","end","baseline"],P={align:{type:"enum",className:"kui-r-va",values:z,parseValue:V,responsive:!0}};function V(a){return{baseline:"baseline",start:"top",center:"middle",end:"bottom"}[a]}var A=["start","center","end"],n={justify:{type:"enum",className:"kui-r-ta",values:A,responsive:!0},...f,...d};var R=e.forwardRef((a,o)=>{let l=c(a,p.size),{layout:s,...N}=p,{className:h,children:D,layout:E,"aria-label":m,"aria-labelledby":i,"aria-describedby":k,...x}=r(l,N),B=b({value:E,className:p.layout.className,propValues:p.layout.values});return e.createElement("div",{ref:o,className:t("kui-TableRoot",h),...x},e.createElement(u,{"aria-label":m,"aria-labelledby":i},e.createElement("table",{className:t("kui-TableRootTable",B),"aria-label":m,"aria-labelledby":i,"aria-describedby":k},D)))});R.displayName="Table.Root";var T=e.forwardRef(({className:a,...o},l)=>e.createElement("thead",{...o,ref:l,className:t("kui-TableHeader",a)}));T.displayName="Table.Header";var y=e.forwardRef(({className:a,...o},l)=>e.createElement("tbody",{...o,ref:l,className:t("kui-TableBody",a)}));y.displayName="Table.Body";var C=e.forwardRef((a,o)=>{let{className:l,...s}=r(a,P);return e.createElement("tr",{...s,ref:o,className:t("kui-TableRow",l)})});C.displayName="Table.Row";var w=e.forwardRef((a,o)=>{let{className:l,...s}=r(a,n);return e.createElement("td",{className:t("kui-TableCell",l),ref:o,...s})});w.displayName="Table.Cell";var v=e.forwardRef((a,o)=>{let{className:l,...s}=r(a,n);return e.createElement("th",{className:t("kui-TableCell","kui-TableColumnHeaderCell",l),scope:"col",ref:o,...s})});v.displayName="Table.ColumnHeaderCell";var H=e.forwardRef((a,o)=>{let{className:l,...s}=r(a,n);return e.createElement("th",{className:t("kui-TableCell","kui-TableRowHeaderCell",l),scope:"row",ref:o,...s})});H.displayName="Table.RowHeaderCell";export{R as a,T as b,y as c,C as d,w as e,v as f,H as g,G as h};
|
|
3
|
-
//# sourceMappingURL=chunk-XF6Z5NKE.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/table.tsx", "../../src/components/table.props.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { tableRootPropDefs, tableRowPropDefs, tableCellPropDefs } from './table.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\nimport { getResponsiveClassNames } from '../helpers/get-responsive-styles.js';\nimport { ScrollArea } from './scroll-area.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TableRootElement = React.ElementRef<'div'>;\ntype TableRootOwnProps = GetPropDefTypes<typeof tableRootPropDefs>;\ninterface TableRootProps\n extends ComponentPropsWithout<'div', RemovedProps>,\n TableRootOwnProps {}\nconst TableRoot = React.forwardRef<TableRootElement, TableRootProps>((ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, tableRootPropDefs.size);\n const { layout: layoutPropDef, ...rootPropDefs } = tableRootPropDefs;\n const {\n className,\n children,\n layout,\n // The table is what gets named, not the scroll wrapper around it.\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n ...rootProps\n } = extractProps(props, rootPropDefs);\n const tableLayoutClassNames = getResponsiveClassNames({\n value: layout,\n className: tableRootPropDefs.layout.className,\n propValues: tableRootPropDefs.layout.values,\n });\n return (\n <div ref={forwardedRef} className={classNames('kui-TableRoot', className)} {...rootProps}>\n {/* An overflowing scroller is a tab stop, so it carries the table's name and reads as a region. */}\n <ScrollArea aria-label={ariaLabel} aria-labelledby={ariaLabelledBy}>\n <table\n className={classNames('kui-TableRootTable', tableLayoutClassNames)}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-describedby={ariaDescribedBy}\n >\n {children}\n </table>\n </ScrollArea>\n </div>\n );\n});\nTableRoot.displayName = 'Table.Root';\n\ntype TableHeaderElement = React.ElementRef<'thead'>;\ninterface TableHeaderProps extends ComponentPropsWithout<'thead', RemovedProps> {}\nconst TableHeader = React.forwardRef<TableHeaderElement, TableHeaderProps>(\n ({ className, ...props }, forwardedRef) => (\n <thead {...props} ref={forwardedRef} className={classNames('kui-TableHeader', className)} />\n )\n);\nTableHeader.displayName = 'Table.Header';\n\ntype TableBodyElement = React.ElementRef<'tbody'>;\ninterface TableBodyProps extends ComponentPropsWithout<'tbody', RemovedProps> {}\nconst TableBody = React.forwardRef<TableBodyElement, TableBodyProps>(\n ({ className, ...props }, forwardedRef) => (\n <tbody {...props} ref={forwardedRef} className={classNames('kui-TableBody', className)} />\n )\n);\nTableBody.displayName = 'Table.Body';\n\ntype TableRowElement = React.ElementRef<'tr'>;\ntype TableRowOwnProps = GetPropDefTypes<typeof tableRowPropDefs>;\ninterface TableRowProps extends ComponentPropsWithout<'tr', RemovedProps>, TableRowOwnProps {}\nconst TableRow = React.forwardRef<TableRowElement, TableRowProps>((props, forwardedRef) => {\n const { className, ...rowProps } = extractProps(props, tableRowPropDefs);\n return <tr {...rowProps} ref={forwardedRef} className={classNames('kui-TableRow', className)} />;\n});\nTableRow.displayName = 'Table.Row';\n\ntype TableCellElement = React.ElementRef<'td'>;\ntype TableCellOwnProps = GetPropDefTypes<typeof tableCellPropDefs>;\ninterface TableCellProps\n extends ComponentPropsWithout<'td', RemovedProps | 'width'>,\n TableCellOwnProps {}\nconst TableCell = React.forwardRef<TableCellElement, TableCellProps>((props, forwardedRef) => {\n const { className, ...cellProps } = extractProps(props, tableCellPropDefs);\n return <td className={classNames('kui-TableCell', className)} ref={forwardedRef} {...cellProps} />;\n});\nTableCell.displayName = 'Table.Cell';\n\ntype TableColumnHeaderCellElement = React.ElementRef<'th'>;\ninterface TableColumnHeaderCellProps\n extends ComponentPropsWithout<'th', RemovedProps>,\n TableCellOwnProps {}\nconst TableColumnHeaderCell = React.forwardRef<\n TableColumnHeaderCellElement,\n TableColumnHeaderCellProps\n>((props, forwardedRef) => {\n const { className, ...cellProps } = extractProps(props, tableCellPropDefs);\n return (\n <th\n className={classNames('kui-TableCell', 'kui-TableColumnHeaderCell', className)}\n scope=\"col\"\n ref={forwardedRef}\n {...cellProps}\n />\n );\n});\nTableColumnHeaderCell.displayName = 'Table.ColumnHeaderCell';\n\ntype TableRowHeaderCellElement = React.ElementRef<'th'>;\ninterface TableRowHeaderCellProps\n extends ComponentPropsWithout<'th', RemovedProps>,\n TableCellOwnProps {}\nconst TableRowHeaderCell = React.forwardRef<TableRowHeaderCellElement, TableRowHeaderCellProps>(\n (props, forwardedRef) => {\n const { className, ...cellProps } = extractProps(props, tableCellPropDefs);\n return (\n <th\n className={classNames('kui-TableCell', 'kui-TableRowHeaderCell', className)}\n scope=\"row\"\n ref={forwardedRef}\n {...cellProps}\n />\n );\n }\n);\nTableRowHeaderCell.displayName = 'Table.RowHeaderCell';\n\nexport {\n TableRoot as Root,\n TableHeader as Header,\n TableBody as Body,\n TableRow as Row,\n TableCell as Cell,\n TableColumnHeaderCell as ColumnHeaderCell,\n TableRowHeaderCell as RowHeaderCell,\n};\n\nexport type {\n TableRootProps as RootProps,\n TableHeaderProps as HeaderProps,\n TableBodyProps as BodyProps,\n TableRowProps as RowProps,\n TableCellProps as CellProps,\n TableColumnHeaderCellProps as ColumnHeaderCellProps,\n TableRowHeaderCellProps as RowHeaderCellProps,\n};\n", "import { paddingPropDefs } from '../props/padding.props.js';\nimport { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['surface', 'ghost'] as const;\nconst layoutValues = ['auto', 'fixed'] as const;\n\nconst tableRootPropDefs = {\n size: {\n type: 'enum',\n className: 'kui-r-size',\n values: sizes,\n default: '2',\n responsive: true,\n },\n variant: {\n type: 'enum',\n className: 'kui-variant',\n values: variants,\n default: 'ghost',\n },\n layout: {\n type: 'enum',\n className: 'kui-r-tl',\n values: layoutValues,\n responsive: true,\n },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n layout: PropDef<(typeof layoutValues)[number]>;\n};\n\nconst rowAlign = ['start', 'center', 'end', 'baseline'] as const;\n\nconst tableRowPropDefs = {\n align: {\n type: 'enum',\n className: 'kui-r-va',\n values: rowAlign,\n parseValue: parseAlignValue,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof rowAlign)[number]>;\n};\n\nfunction parseAlignValue(value: string) {\n return {\n baseline: 'baseline',\n start: 'top',\n center: 'middle',\n end: 'bottom',\n }[value];\n}\n\nconst justifyValues = ['start', 'center', 'end'] as const;\n\nconst tableCellPropDefs = {\n justify: {\n type: 'enum',\n className: 'kui-r-ta',\n values: justifyValues,\n responsive: true,\n },\n ...widthPropDefs,\n ...paddingPropDefs,\n} satisfies {\n justify: PropDef<(typeof justifyValues)[number]>;\n};\n\nexport { tableRootPropDefs, tableRowPropDefs, tableCellPropDefs };\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["table_exports", "__export", "TableBody", "TableCell", "TableColumnHeaderCell", "TableHeader", "TableRoot", "TableRow", "TableRowHeaderCell", "React", "classNames", "sizes", "variants", "layoutValues", "tableRootPropDefs", "rowAlign", "tableRowPropDefs", "parseAlignValue", "value", "justifyValues", "tableCellPropDefs", "widthPropDefs", "paddingPropDefs", "TableRoot", "ownProps", "forwardedRef", "props", "useThemeSizeProps", "tableRootPropDefs", "layoutPropDef", "rootPropDefs", "className", "children", "layout", "ariaLabel", "ariaLabelledBy", "ariaDescribedBy", "rootProps", "extractProps", "tableLayoutClassNames", "getResponsiveClassNames", "classNames", "ScrollArea", "TableHeader", "TableBody", "TableRow", "rowProps", "tableRowPropDefs", "TableCell", "cellProps", "tableCellPropDefs", "TableColumnHeaderCell", "TableRowHeaderCell"]
|
|
7
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Responsive } from '../props/prop-def.js';
|
|
2
|
-
declare function mapResponsiveProp<Input extends string, Output>(propValue: Responsive<Input> | undefined, mapValue: (value: Input) => Output): Responsive<Output> | undefined;
|
|
3
|
-
export { mapResponsiveProp };
|
|
4
|
-
//# sourceMappingURL=map-prop-values.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"map-prop-values.d.ts","sourceRoot":"","sources":["../../../src/helpers/map-prop-values.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,iBAAS,iBAAiB,CAAC,KAAK,SAAS,MAAM,EAAE,MAAM,EACrD,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,SAAS,EACxC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,GACjC,UAAU,CAAC,MAAM,CAAC,GAAG,SAAS,CAQhC;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-live-announcer.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-live-announcer.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,wBAAgB,gBAAgB,cA+Ce,MAAM,UAmBpD"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Options for the useToggleState hook
|
|
3
|
-
*/
|
|
4
|
-
interface UseToggleStateOptions {
|
|
5
|
-
/** Controlled pressed state */
|
|
6
|
-
pressed?: boolean;
|
|
7
|
-
/** Callback when pressed state changes */
|
|
8
|
-
onPressedChange?: (pressed: boolean) => void;
|
|
9
|
-
/** Function to get the accessible name for announcements */
|
|
10
|
-
getAccessibleName: () => string;
|
|
11
|
-
/** Component name for warning messages */
|
|
12
|
-
componentName: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Hook for shared toggle button state management.
|
|
16
|
-
* Provides accessibility announcements and controlled/uncontrolled warnings.
|
|
17
|
-
*
|
|
18
|
-
* @param options - Configuration options for the toggle state
|
|
19
|
-
* @returns Object containing the handlePressedChange callback
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```tsx
|
|
23
|
-
* const getAccessibleName = React.useCallback(() => 'Toggle button', []);
|
|
24
|
-
*
|
|
25
|
-
* const { handlePressedChange } = useToggleState({
|
|
26
|
-
* pressed,
|
|
27
|
-
* onPressedChange,
|
|
28
|
-
* getAccessibleName,
|
|
29
|
-
* componentName: 'Toggle',
|
|
30
|
-
* });
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
export declare function useToggleState({ pressed, onPressedChange, getAccessibleName, componentName }: UseToggleStateOptions): {
|
|
34
|
-
handlePressedChange: (newPressed: boolean) => void;
|
|
35
|
-
};
|
|
36
|
-
export {};
|
|
37
|
-
//# sourceMappingURL=use-toggle-state.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-toggle-state.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-toggle-state.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,UAAU,qBAAqB;IAC7B,+BAA+B;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0CAA0C;IAC1C,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,4DAA4D;IAC5D,iBAAiB,EAAE,MAAM,MAAM,CAAC;IAChC,0CAA0C;IAC1C,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,EAAE,EAAE,qBAAqB;sCAWnG,OAAO;EAwBvB"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { GetPropDefTypes } from './prop-def.js';
|
|
2
|
-
declare const shadowPropDefs: {
|
|
3
|
-
/**
|
|
4
|
-
* Sets the CSS **box-shadow** property using design system shadow tokens.
|
|
5
|
-
* Supports shadow scale values and responsive objects.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* shadow="3"
|
|
9
|
-
* shadow={{ sm: '2', lg: '4' }}
|
|
10
|
-
*
|
|
11
|
-
* @link
|
|
12
|
-
* https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow
|
|
13
|
-
*/
|
|
14
|
-
shadow: {
|
|
15
|
-
type: "enum";
|
|
16
|
-
className: string;
|
|
17
|
-
values: readonly ["1", "2", "3", "4", "5", "6"];
|
|
18
|
-
responsive: true;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
type ShadowProps = GetPropDefTypes<typeof shadowPropDefs>;
|
|
22
|
-
export { shadowPropDefs };
|
|
23
|
-
export type { ShadowProps };
|
|
24
|
-
//# sourceMappingURL=shadow.props.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shadow.props.d.ts","sourceRoot":"","sources":["../../../src/props/shadow.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,eAAe,EAAE,MAAM,eAAe,CAAC;AAI9D,QAAA,MAAM,cAAc;IAClB;;;;;;;;;;OAUG;;;;;;;CASJ,CAAC;AAEF,KAAK,WAAW,GAAG,eAAe,CAAC,OAAO,cAAc,CAAC,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { textPropDefs } from '../components/text.props.js';
|
|
2
|
-
import type { Responsive } from '../props/prop-def.js';
|
|
3
|
-
|
|
4
|
-
function mapResponsiveProp<Input extends string, Output>(
|
|
5
|
-
propValue: Responsive<Input> | undefined,
|
|
6
|
-
mapValue: (value: Input) => Output
|
|
7
|
-
): Responsive<Output> | undefined {
|
|
8
|
-
if (propValue === undefined) return undefined;
|
|
9
|
-
if (typeof propValue === 'string') {
|
|
10
|
-
return mapValue(propValue);
|
|
11
|
-
}
|
|
12
|
-
return Object.fromEntries(
|
|
13
|
-
Object.entries(propValue).map(([key, value]) => [key, mapValue(value)])
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { mapResponsiveProp };
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Reference counter to track how many components are using the live region.
|
|
5
|
-
* Only remove the live region when no components are using it.
|
|
6
|
-
*/
|
|
7
|
-
let liveRegionRefCount = 0;
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Hook for making live announcements to screen readers
|
|
11
|
-
* Creates a hidden aria-live region for announcing dynamic content changes
|
|
12
|
-
*/
|
|
13
|
-
export function useLiveAnnouncer() {
|
|
14
|
-
// Track the timeout so we can clean it up on unmount
|
|
15
|
-
const timeoutRef = React.useRef<ReturnType<typeof setTimeout> | undefined>(undefined);
|
|
16
|
-
|
|
17
|
-
// Create aria-live region if it doesn't exist
|
|
18
|
-
React.useEffect(() => {
|
|
19
|
-
let liveRegion = document.getElementById('kui-live-announcer');
|
|
20
|
-
|
|
21
|
-
if (!liveRegion) {
|
|
22
|
-
liveRegion = document.createElement('div');
|
|
23
|
-
liveRegion.id = 'kui-live-announcer';
|
|
24
|
-
liveRegion.setAttribute('aria-live', 'polite');
|
|
25
|
-
liveRegion.setAttribute('aria-atomic', 'true');
|
|
26
|
-
liveRegion.style.cssText = `
|
|
27
|
-
position: absolute;
|
|
28
|
-
left: -10000px;
|
|
29
|
-
width: 1px;
|
|
30
|
-
height: 1px;
|
|
31
|
-
overflow: hidden;
|
|
32
|
-
clip: rect(0, 0, 0, 0);
|
|
33
|
-
white-space: nowrap;
|
|
34
|
-
`;
|
|
35
|
-
document.body.appendChild(liveRegion);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Increment ref count when component mounts
|
|
39
|
-
liveRegionRefCount++;
|
|
40
|
-
|
|
41
|
-
return () => {
|
|
42
|
-
// Decrement ref count when component unmounts
|
|
43
|
-
liveRegionRefCount--;
|
|
44
|
-
|
|
45
|
-
// Clean up timeout on unmount
|
|
46
|
-
if (timeoutRef.current) {
|
|
47
|
-
clearTimeout(timeoutRef.current);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Only remove the live region if no components are using it
|
|
51
|
-
if (liveRegionRefCount === 0) {
|
|
52
|
-
const region = document.getElementById('kui-live-announcer');
|
|
53
|
-
if (region) {
|
|
54
|
-
region.remove();
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
}, []);
|
|
59
|
-
|
|
60
|
-
const announce = React.useCallback((message: string) => {
|
|
61
|
-
const liveRegion = document.getElementById('kui-live-announcer');
|
|
62
|
-
if (liveRegion) {
|
|
63
|
-
// Clear any pending timeout
|
|
64
|
-
if (timeoutRef.current) {
|
|
65
|
-
clearTimeout(timeoutRef.current);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Clear previous announcements
|
|
69
|
-
liveRegion.textContent = '';
|
|
70
|
-
|
|
71
|
-
// Add new announcement with a small delay to ensure it's announced
|
|
72
|
-
timeoutRef.current = setTimeout(() => {
|
|
73
|
-
liveRegion.textContent = message;
|
|
74
|
-
}, 100);
|
|
75
|
-
}
|
|
76
|
-
}, []);
|
|
77
|
-
|
|
78
|
-
return announce;
|
|
79
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { useLiveAnnouncer } from './use-live-announcer.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Options for the useToggleState hook
|
|
6
|
-
*/
|
|
7
|
-
interface UseToggleStateOptions {
|
|
8
|
-
/** Controlled pressed state */
|
|
9
|
-
pressed?: boolean;
|
|
10
|
-
/** Callback when pressed state changes */
|
|
11
|
-
onPressedChange?: (pressed: boolean) => void;
|
|
12
|
-
/** Function to get the accessible name for announcements */
|
|
13
|
-
getAccessibleName: () => string;
|
|
14
|
-
/** Component name for warning messages */
|
|
15
|
-
componentName: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Hook for shared toggle button state management.
|
|
20
|
-
* Provides accessibility announcements and controlled/uncontrolled warnings.
|
|
21
|
-
*
|
|
22
|
-
* @param options - Configuration options for the toggle state
|
|
23
|
-
* @returns Object containing the handlePressedChange callback
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```tsx
|
|
27
|
-
* const getAccessibleName = React.useCallback(() => 'Toggle button', []);
|
|
28
|
-
*
|
|
29
|
-
* const { handlePressedChange } = useToggleState({
|
|
30
|
-
* pressed,
|
|
31
|
-
* onPressedChange,
|
|
32
|
-
* getAccessibleName,
|
|
33
|
-
* componentName: 'Toggle',
|
|
34
|
-
* });
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
export function useToggleState({ pressed, onPressedChange, getAccessibleName, componentName }: UseToggleStateOptions) {
|
|
38
|
-
const announce = useLiveAnnouncer();
|
|
39
|
-
|
|
40
|
-
// Track if we've already warned about controlled without handler
|
|
41
|
-
const warnedRef = React.useRef(false);
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Memoized handler for state changes with accessibility announcements.
|
|
45
|
-
* Announces the new state immediately for screen readers.
|
|
46
|
-
*/
|
|
47
|
-
const handlePressedChange = React.useCallback(
|
|
48
|
-
(newPressed: boolean) => {
|
|
49
|
-
const accessibleName = getAccessibleName();
|
|
50
|
-
// Announce the state change for screen readers
|
|
51
|
-
announce(`${accessibleName} ${newPressed ? 'pressed' : 'unpressed'}`);
|
|
52
|
-
// Call the user's change handler
|
|
53
|
-
onPressedChange?.(newPressed);
|
|
54
|
-
},
|
|
55
|
-
[announce, onPressedChange, getAccessibleName],
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
// Development-only warning for controlled/uncontrolled pattern
|
|
59
|
-
// Only warns once to avoid console spam
|
|
60
|
-
React.useEffect(() => {
|
|
61
|
-
if (process.env.NODE_ENV === 'development' && pressed !== undefined && onPressedChange === undefined && !warnedRef.current) {
|
|
62
|
-
warnedRef.current = true;
|
|
63
|
-
console.warn(
|
|
64
|
-
`${componentName}: You provided a \`pressed\` prop without an \`onPressedChange\` handler. ` +
|
|
65
|
-
'This will result in a read-only toggle button. If you want the button to be interactive, ' +
|
|
66
|
-
'you should provide an `onPressedChange` handler.',
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
}, [pressed, onPressedChange, componentName]);
|
|
70
|
-
|
|
71
|
-
return { handlePressedChange };
|
|
72
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { PropDef, GetPropDefTypes } from './prop-def.js';
|
|
2
|
-
|
|
3
|
-
const shadowValues = ['1', '2', '3', '4', '5', '6'] as const;
|
|
4
|
-
|
|
5
|
-
const shadowPropDefs = {
|
|
6
|
-
/**
|
|
7
|
-
* Sets the CSS **box-shadow** property using design system shadow tokens.
|
|
8
|
-
* Supports shadow scale values and responsive objects.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* shadow="3"
|
|
12
|
-
* shadow={{ sm: '2', lg: '4' }}
|
|
13
|
-
*
|
|
14
|
-
* @link
|
|
15
|
-
* https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow
|
|
16
|
-
*/
|
|
17
|
-
shadow: {
|
|
18
|
-
type: 'enum',
|
|
19
|
-
className: 'kui-r-shadow',
|
|
20
|
-
values: shadowValues,
|
|
21
|
-
responsive: true,
|
|
22
|
-
},
|
|
23
|
-
} satisfies {
|
|
24
|
-
shadow: PropDef<(typeof shadowValues)[number]>;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
type ShadowProps = GetPropDefTypes<typeof shadowPropDefs>;
|
|
28
|
-
|
|
29
|
-
export { shadowPropDefs };
|
|
30
|
-
export type { ShadowProps };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|