@womp/kookie-ui 0.34.0 → 0.34.2
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 +15 -4
- 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/text-field.d.ts.map +1 -1
- package/dist/cjs/components/text-field.js +2 -2
- package/dist/cjs/components/text-field.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.js +3 -3
- package/dist/cjs/helpers/index.js.map +2 -2
- package/dist/cjs/helpers/map-prop-values.d.ts.map +1 -1
- package/dist/cjs/helpers/map-prop-values.js +1 -1
- package/dist/cjs/helpers/map-prop-values.js.map +2 -2
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/props/index.d.ts +6 -0
- 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-WYLIU3Q6.js +2 -0
- package/dist/esm/chunk-WYLIU3Q6.js.map +7 -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-YLGIP3A5.js +6 -0
- package/dist/esm/chunk-YLGIP3A5.js.map +7 -0
- 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/text-field.d.ts.map +1 -1
- package/dist/esm/components/text-field.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.js +1 -1
- package/dist/esm/helpers/map-prop-values.d.ts.map +1 -1
- package/dist/esm/helpers/map-prop-values.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/props/index.d.ts +6 -0
- 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-dialog.css +1 -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/avatar.tsx +3 -1
- package/src/components/button.tsx +1 -1
- 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/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 -0
- 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.tsx +1 -1
- package/src/components/table.tsx +4 -1
- package/src/components/text-field.css +2 -2
- package/src/components/text-field.tsx +11 -4
- package/src/components/virtual-menu.tsx +8 -1
- package/src/helpers/map-prop-values.ts +0 -1
- package/src/props/index.ts +6 -0
- package/src/styles/utilities/inset.css +135 -0
- package/styles.css +825 -4
- package/utilities.css +810 -0
- 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-7QBNXNEN.js +0 -3
- package/dist/esm/chunk-API4DAPY.js.map +0 -7
- 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-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-XF6Z5NKE.js +0 -3
- package/dist/esm/chunk-XF6Z5NKE.js.map +0 -7
- package/dist/esm/chunk-Y44DYJA5.js +0 -6
- package/dist/esm/chunk-Y44DYJA5.js.map +0 -7
- /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-YOTTLPJ3.js.map → chunk-Y5ITMKC6.js.map} +0 -0
|
@@ -143,8 +143,8 @@ const SelectTrigger = React.forwardRef<SelectTriggerElement, SelectTriggerProps>
|
|
|
143
143
|
<button
|
|
144
144
|
data-accent-color={color}
|
|
145
145
|
data-radius={radius}
|
|
146
|
-
data-error={error}
|
|
147
|
-
data-loading={loading}
|
|
146
|
+
data-error={error || undefined}
|
|
147
|
+
data-loading={loading || undefined}
|
|
148
148
|
{...triggerProps}
|
|
149
149
|
{...ariaProps}
|
|
150
150
|
ref={forwardedRef}
|
package/src/components/sheet.tsx
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* A side-placed overlay built on top of Radix Dialog. It inherits accessibility,
|
|
7
7
|
* focus management, overlay behavior, and sizing scales from the base dialog, and
|
|
8
|
-
* adds side placement
|
|
8
|
+
* adds side placement, suited for navigation panels and drawers.
|
|
9
9
|
*
|
|
10
10
|
* Structure mirrors Dialog:
|
|
11
11
|
* - Root, Trigger, Content, Title, Description, Close
|
|
@@ -58,7 +58,7 @@ type SheetSide = 'start' | 'end' | 'top' | 'bottom' | 'left' | 'right';
|
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* Sheet is a side-placed overlay built on the Dialog primitive.
|
|
61
|
-
* It reuses Dialog's accessibility, focus, overlay, and size scales, while adding side placement
|
|
61
|
+
* It reuses Dialog's accessibility, focus, overlay, and size scales, while adding side placement.
|
|
62
62
|
*/
|
|
63
63
|
|
|
64
64
|
// Root
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Since 0.8.0 the Shell has two contexts: the pane registry (the store) and
|
|
5
|
-
* the
|
|
5
|
+
* the set of panes off the frame. They live in `_internal/shell-store.tsx`. This module keeps
|
|
6
6
|
* the two hooks consumers can reach: `useSidebarMode`, and the deprecated
|
|
7
7
|
* `useShell`.
|
|
8
8
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import { Slot } from './slot.js';
|
|
6
|
-
import
|
|
6
|
+
import { Accordion } from 'radix-ui';
|
|
7
7
|
import * as DropdownMenu from './dropdown-menu.js';
|
|
8
8
|
import * as Popover from './popover.js';
|
|
9
9
|
|
package/src/components/table.tsx
CHANGED
|
@@ -10,6 +10,10 @@ import { ScrollArea } from './scroll-area.js';
|
|
|
10
10
|
import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
|
|
11
11
|
import type { GetPropDefTypes } from '../props/prop-def.js';
|
|
12
12
|
|
|
13
|
+
// Built once: `extractProps` caches its compiled prop defs on the identity of this object, so
|
|
14
|
+
// making it inside the component would recompile them on every render.
|
|
15
|
+
const { layout: _layoutPropDef, ...rootPropDefs } = tableRootPropDefs;
|
|
16
|
+
|
|
13
17
|
type TableRootElement = React.ElementRef<'div'>;
|
|
14
18
|
type TableRootOwnProps = GetPropDefTypes<typeof tableRootPropDefs>;
|
|
15
19
|
interface TableRootProps
|
|
@@ -17,7 +21,6 @@ interface TableRootProps
|
|
|
17
21
|
TableRootOwnProps {}
|
|
18
22
|
const TableRoot = React.forwardRef<TableRootElement, TableRootProps>((ownProps, forwardedRef) => {
|
|
19
23
|
const props = useThemeSizeProps(ownProps, tableRootPropDefs.size);
|
|
20
|
-
const { layout: layoutPropDef, ...rootPropDefs } = tableRootPropDefs;
|
|
21
24
|
const {
|
|
22
25
|
className,
|
|
23
26
|
children,
|
|
@@ -347,7 +347,7 @@
|
|
|
347
347
|
* *
|
|
348
348
|
***************************************************************************************************/
|
|
349
349
|
|
|
350
|
-
/*
|
|
350
|
+
/* outline */
|
|
351
351
|
|
|
352
352
|
.kui-TextFieldRoot:where(.kui-variant-outline) {
|
|
353
353
|
--text-field-selection-color: var(--focus-a5);
|
|
@@ -531,7 +531,7 @@
|
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
|
|
534
|
-
/*
|
|
534
|
+
/* surface */
|
|
535
535
|
|
|
536
536
|
.kui-TextFieldRoot:where(.kui-variant-surface) {
|
|
537
537
|
--text-field-selection-color: var(--accent-a5);
|
|
@@ -37,6 +37,14 @@ const TextFieldContext = React.createContext<TextFieldContextValue | null>(null)
|
|
|
37
37
|
// list, not a tag list. `[tabindex]` catches role-based widgets; `label` already redirects a click.
|
|
38
38
|
const FOCUSABLE_IN_SLOT = 'button, a, input, select, textarea, label, [tabindex], [contenteditable]';
|
|
39
39
|
|
|
40
|
+
/** Is the target a control inside `container`? Ancestors outside it, such as a panel or dialog
|
|
41
|
+
* with a tabindex, don't count: matching them turned scrubbing and click-to-focus off. */
|
|
42
|
+
function isControlWithin(target: EventTarget | null, container: HTMLElement | null) {
|
|
43
|
+
if (!(target instanceof Element) || !container) return false;
|
|
44
|
+
const hit = target.closest(FOCUSABLE_IN_SLOT);
|
|
45
|
+
return Boolean(hit && hit !== container && container.contains(hit));
|
|
46
|
+
}
|
|
47
|
+
|
|
40
48
|
// A Group decides the look of its fields: their size, variant and radius come from it. A field
|
|
41
49
|
// can still take its own color, and is disabled when either it or the group is.
|
|
42
50
|
type TextFieldGroupContextValue = Pick<TextFieldGroupOwnProps, 'size' | 'variant' | 'radius' | 'color' | 'disabled'>;
|
|
@@ -120,8 +128,8 @@ const TextFieldRoot = React.forwardRef<TextFieldRootElement, TextFieldRootProps>
|
|
|
120
128
|
// Clicking the padding or a passive slot focuses the input. preventDefault stops the browser
|
|
121
129
|
// from moving focus to the root first, so the input is focused once, synchronously.
|
|
122
130
|
const handleMouseDown = React.useCallback((event: React.MouseEvent) => {
|
|
131
|
+
if (isControlWithin(event.target, event.currentTarget as HTMLElement)) return;
|
|
123
132
|
const target = event.target as HTMLElement;
|
|
124
|
-
if (target.closest(FOCUSABLE_IN_SLOT)) return;
|
|
125
133
|
|
|
126
134
|
const input = inputRef.current;
|
|
127
135
|
if (!input) return;
|
|
@@ -289,9 +297,8 @@ const TextFieldSlot = React.forwardRef<TextFieldSlotElement, TextFieldSlotProps>
|
|
|
289
297
|
(event: React.PointerEvent) => {
|
|
290
298
|
if (!scrub) return;
|
|
291
299
|
|
|
292
|
-
// Don't start scrubbing if clicking on
|
|
293
|
-
|
|
294
|
-
if (target.closest(FOCUSABLE_IN_SLOT)) return;
|
|
300
|
+
// Don't start scrubbing if clicking on a control inside the slot
|
|
301
|
+
if (isControlWithin(event.target, slotRef.current)) return;
|
|
295
302
|
|
|
296
303
|
event.preventDefault();
|
|
297
304
|
accumulatedMovement.current = 0;
|
|
@@ -569,7 +569,14 @@ interface VirtualMenuItemProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
|
569
569
|
}
|
|
570
570
|
|
|
571
571
|
const VirtualMenuItemInner = React.forwardRef<HTMLDivElement, VirtualMenuItemProps>(
|
|
572
|
-
({ className, children, ...
|
|
572
|
+
({ className, children, ...allProps }, forwardedRef) => {
|
|
573
|
+
// A `renderItem` component usually spreads everything it is given onto this row. These three
|
|
574
|
+
// are for the component, not the element, so they stop here.
|
|
575
|
+
const { isHighlighted: _isHighlighted, index: _index, item: _item, ...props } = allProps as typeof allProps & {
|
|
576
|
+
isHighlighted?: boolean;
|
|
577
|
+
index?: number;
|
|
578
|
+
item?: unknown;
|
|
579
|
+
};
|
|
573
580
|
return (
|
|
574
581
|
<div
|
|
575
582
|
ref={forwardedRef}
|
package/src/props/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './prop-def.js';
|
|
|
5
5
|
export * from './as-child.prop.js';
|
|
6
6
|
export * from './color.prop.js';
|
|
7
7
|
export * from './emphasis.prop.js';
|
|
8
|
+
export * from './font-family.prop.js';
|
|
8
9
|
export * from './gap.props.js';
|
|
9
10
|
export * from './height.props.js';
|
|
10
11
|
export * from './layout.props.js';
|
|
@@ -20,6 +21,7 @@ export * from './weight.prop.js';
|
|
|
20
21
|
export * from './width.props.js';
|
|
21
22
|
|
|
22
23
|
// Component props
|
|
24
|
+
export * from '../components/accordion.props.js';
|
|
23
25
|
export * from '../components/alert-dialog.props.js';
|
|
24
26
|
export * from '../components/avatar.props.js';
|
|
25
27
|
export * from '../components/blockquote.props.js';
|
|
@@ -30,14 +32,17 @@ export * from '../components/checkbox-group.props.js';
|
|
|
30
32
|
export * from '../components/checkbox.props.js';
|
|
31
33
|
export * from '../components/chip.props.js';
|
|
32
34
|
export * from '../components/code.props.js';
|
|
35
|
+
export * from '../components/combobox.props.js';
|
|
33
36
|
export * from '../components/context-menu.props.js';
|
|
34
37
|
export * from '../components/dialog.props.js';
|
|
35
38
|
export * from '../components/dropdown-menu.props.js';
|
|
36
39
|
export * from '../components/flex.props.js';
|
|
37
40
|
export * from '../components/grid.props.js';
|
|
38
41
|
export * from '../components/heading.props.js';
|
|
42
|
+
export * from '../components/image.props.js';
|
|
39
43
|
export * from '../components/kbd.props.js';
|
|
40
44
|
export * from '../components/link.props.js';
|
|
45
|
+
export * from '../components/navbar.props.js';
|
|
41
46
|
export * from '../components/popover.props.js';
|
|
42
47
|
export * from '../components/progress.props.js';
|
|
43
48
|
export * from '../components/radio.props.js';
|
|
@@ -55,4 +60,5 @@ export * from '../components/text-area.props.js';
|
|
|
55
60
|
export * from '../components/text-field.props.js';
|
|
56
61
|
export * from '../components/text.props.js';
|
|
57
62
|
export * from '../components/theme.props.js';
|
|
63
|
+
export * from '../components/toolbar.props.js';
|
|
58
64
|
export * from '../components/tooltip.props.js';
|
|
@@ -47,6 +47,33 @@
|
|
|
47
47
|
.kui-r-inset-12 {
|
|
48
48
|
inset: var(--space-12);
|
|
49
49
|
}
|
|
50
|
+
.-kui-r-inset-1 {
|
|
51
|
+
inset: calc(-1 * var(--space-1));
|
|
52
|
+
}
|
|
53
|
+
.-kui-r-inset-2 {
|
|
54
|
+
inset: calc(-1 * var(--space-2));
|
|
55
|
+
}
|
|
56
|
+
.-kui-r-inset-3 {
|
|
57
|
+
inset: calc(-1 * var(--space-3));
|
|
58
|
+
}
|
|
59
|
+
.-kui-r-inset-4 {
|
|
60
|
+
inset: calc(-1 * var(--space-4));
|
|
61
|
+
}
|
|
62
|
+
.-kui-r-inset-5 {
|
|
63
|
+
inset: calc(-1 * var(--space-5));
|
|
64
|
+
}
|
|
65
|
+
.-kui-r-inset-6 {
|
|
66
|
+
inset: calc(-1 * var(--space-6));
|
|
67
|
+
}
|
|
68
|
+
.-kui-r-inset-7 {
|
|
69
|
+
inset: calc(-1 * var(--space-7));
|
|
70
|
+
}
|
|
71
|
+
.-kui-r-inset-8 {
|
|
72
|
+
inset: calc(-1 * var(--space-8));
|
|
73
|
+
}
|
|
74
|
+
.-kui-r-inset-9 {
|
|
75
|
+
inset: calc(-1 * var(--space-9));
|
|
76
|
+
}
|
|
50
77
|
}
|
|
51
78
|
|
|
52
79
|
.kui-r-inset {
|
|
@@ -127,6 +154,33 @@
|
|
|
127
154
|
.kui-r-top-12 {
|
|
128
155
|
top: var(--space-12);
|
|
129
156
|
}
|
|
157
|
+
.-kui-r-top-1 {
|
|
158
|
+
top: calc(-1 * var(--space-1));
|
|
159
|
+
}
|
|
160
|
+
.-kui-r-top-2 {
|
|
161
|
+
top: calc(-1 * var(--space-2));
|
|
162
|
+
}
|
|
163
|
+
.-kui-r-top-3 {
|
|
164
|
+
top: calc(-1 * var(--space-3));
|
|
165
|
+
}
|
|
166
|
+
.-kui-r-top-4 {
|
|
167
|
+
top: calc(-1 * var(--space-4));
|
|
168
|
+
}
|
|
169
|
+
.-kui-r-top-5 {
|
|
170
|
+
top: calc(-1 * var(--space-5));
|
|
171
|
+
}
|
|
172
|
+
.-kui-r-top-6 {
|
|
173
|
+
top: calc(-1 * var(--space-6));
|
|
174
|
+
}
|
|
175
|
+
.-kui-r-top-7 {
|
|
176
|
+
top: calc(-1 * var(--space-7));
|
|
177
|
+
}
|
|
178
|
+
.-kui-r-top-8 {
|
|
179
|
+
top: calc(-1 * var(--space-8));
|
|
180
|
+
}
|
|
181
|
+
.-kui-r-top-9 {
|
|
182
|
+
top: calc(-1 * var(--space-9));
|
|
183
|
+
}
|
|
130
184
|
}
|
|
131
185
|
|
|
132
186
|
.kui-r-top {
|
|
@@ -207,6 +261,33 @@
|
|
|
207
261
|
.kui-r-right-12 {
|
|
208
262
|
right: var(--space-12);
|
|
209
263
|
}
|
|
264
|
+
.-kui-r-right-1 {
|
|
265
|
+
right: calc(-1 * var(--space-1));
|
|
266
|
+
}
|
|
267
|
+
.-kui-r-right-2 {
|
|
268
|
+
right: calc(-1 * var(--space-2));
|
|
269
|
+
}
|
|
270
|
+
.-kui-r-right-3 {
|
|
271
|
+
right: calc(-1 * var(--space-3));
|
|
272
|
+
}
|
|
273
|
+
.-kui-r-right-4 {
|
|
274
|
+
right: calc(-1 * var(--space-4));
|
|
275
|
+
}
|
|
276
|
+
.-kui-r-right-5 {
|
|
277
|
+
right: calc(-1 * var(--space-5));
|
|
278
|
+
}
|
|
279
|
+
.-kui-r-right-6 {
|
|
280
|
+
right: calc(-1 * var(--space-6));
|
|
281
|
+
}
|
|
282
|
+
.-kui-r-right-7 {
|
|
283
|
+
right: calc(-1 * var(--space-7));
|
|
284
|
+
}
|
|
285
|
+
.-kui-r-right-8 {
|
|
286
|
+
right: calc(-1 * var(--space-8));
|
|
287
|
+
}
|
|
288
|
+
.-kui-r-right-9 {
|
|
289
|
+
right: calc(-1 * var(--space-9));
|
|
290
|
+
}
|
|
210
291
|
}
|
|
211
292
|
|
|
212
293
|
.kui-r-right {
|
|
@@ -287,6 +368,33 @@
|
|
|
287
368
|
.kui-r-bottom-12 {
|
|
288
369
|
bottom: var(--space-12);
|
|
289
370
|
}
|
|
371
|
+
.-kui-r-bottom-1 {
|
|
372
|
+
bottom: calc(-1 * var(--space-1));
|
|
373
|
+
}
|
|
374
|
+
.-kui-r-bottom-2 {
|
|
375
|
+
bottom: calc(-1 * var(--space-2));
|
|
376
|
+
}
|
|
377
|
+
.-kui-r-bottom-3 {
|
|
378
|
+
bottom: calc(-1 * var(--space-3));
|
|
379
|
+
}
|
|
380
|
+
.-kui-r-bottom-4 {
|
|
381
|
+
bottom: calc(-1 * var(--space-4));
|
|
382
|
+
}
|
|
383
|
+
.-kui-r-bottom-5 {
|
|
384
|
+
bottom: calc(-1 * var(--space-5));
|
|
385
|
+
}
|
|
386
|
+
.-kui-r-bottom-6 {
|
|
387
|
+
bottom: calc(-1 * var(--space-6));
|
|
388
|
+
}
|
|
389
|
+
.-kui-r-bottom-7 {
|
|
390
|
+
bottom: calc(-1 * var(--space-7));
|
|
391
|
+
}
|
|
392
|
+
.-kui-r-bottom-8 {
|
|
393
|
+
bottom: calc(-1 * var(--space-8));
|
|
394
|
+
}
|
|
395
|
+
.-kui-r-bottom-9 {
|
|
396
|
+
bottom: calc(-1 * var(--space-9));
|
|
397
|
+
}
|
|
290
398
|
}
|
|
291
399
|
|
|
292
400
|
.kui-r-bottom {
|
|
@@ -367,6 +475,33 @@
|
|
|
367
475
|
.kui-r-left-12 {
|
|
368
476
|
left: var(--space-12);
|
|
369
477
|
}
|
|
478
|
+
.-kui-r-left-1 {
|
|
479
|
+
left: calc(-1 * var(--space-1));
|
|
480
|
+
}
|
|
481
|
+
.-kui-r-left-2 {
|
|
482
|
+
left: calc(-1 * var(--space-2));
|
|
483
|
+
}
|
|
484
|
+
.-kui-r-left-3 {
|
|
485
|
+
left: calc(-1 * var(--space-3));
|
|
486
|
+
}
|
|
487
|
+
.-kui-r-left-4 {
|
|
488
|
+
left: calc(-1 * var(--space-4));
|
|
489
|
+
}
|
|
490
|
+
.-kui-r-left-5 {
|
|
491
|
+
left: calc(-1 * var(--space-5));
|
|
492
|
+
}
|
|
493
|
+
.-kui-r-left-6 {
|
|
494
|
+
left: calc(-1 * var(--space-6));
|
|
495
|
+
}
|
|
496
|
+
.-kui-r-left-7 {
|
|
497
|
+
left: calc(-1 * var(--space-7));
|
|
498
|
+
}
|
|
499
|
+
.-kui-r-left-8 {
|
|
500
|
+
left: calc(-1 * var(--space-8));
|
|
501
|
+
}
|
|
502
|
+
.-kui-r-left-9 {
|
|
503
|
+
left: calc(-1 * var(--space-9));
|
|
504
|
+
}
|
|
370
505
|
}
|
|
371
506
|
|
|
372
507
|
.kui-r-left {
|