@wordpress/components 23.3.2 → 23.4.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/CHANGELOG.md +20 -5
- package/build/alignment-matrix-control/utils.js +4 -4
- package/build/alignment-matrix-control/utils.js.map +1 -1
- package/build/angle-picker-control/angle-circle.js +37 -29
- package/build/angle-picker-control/angle-circle.js.map +1 -1
- package/build/angle-picker-control/index.js +44 -9
- package/build/angle-picker-control/index.js.map +1 -1
- package/build/angle-picker-control/styles/angle-picker-control-styles.js +13 -13
- package/build/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
- package/build/{base-field → angle-picker-control}/types.js +0 -0
- package/build/angle-picker-control/types.js.map +1 -0
- package/build/autocomplete/autocompleter-ui.native.js +1 -0
- package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
- package/build/base-control/hooks.js +1 -1
- package/build/base-control/hooks.js.map +1 -1
- package/build/border-box-control/utils.js +1 -1
- package/build/border-box-control/utils.js.map +1 -1
- package/build/box-control/all-input-control.js +2 -2
- package/build/box-control/all-input-control.js.map +1 -1
- package/build/box-control/axial-input-controls.js +1 -1
- package/build/box-control/axial-input-controls.js.map +1 -1
- package/build/box-control/icon.js.map +1 -1
- package/build/box-control/index.js +32 -3
- package/build/box-control/index.js.map +1 -1
- package/build/box-control/input-controls.js +5 -5
- package/build/box-control/input-controls.js.map +1 -1
- package/build/box-control/linked-button.js.map +1 -1
- package/build/box-control/styles/box-control-icon-styles.js +28 -28
- package/build/box-control/styles/box-control-icon-styles.js.map +1 -1
- package/build/box-control/styles/box-control-styles.js +23 -23
- package/build/box-control/styles/box-control-styles.js.map +1 -1
- package/build/box-control/styles/box-control-visualizer-styles.js +19 -19
- package/build/box-control/styles/box-control-visualizer-styles.js.map +1 -1
- package/build/box-control/types.js +6 -0
- package/build/box-control/types.js.map +1 -0
- package/build/box-control/unit-control.js.map +1 -1
- package/build/box-control/utils.js +23 -23
- package/build/box-control/utils.js.map +1 -1
- package/build/color-palette/index.js +8 -3
- package/build/color-palette/index.js.map +1 -1
- package/build/combobox-control/index.js +68 -12
- package/build/combobox-control/index.js.map +1 -1
- package/build/combobox-control/styles.js +2 -2
- package/build/combobox-control/styles.js.map +1 -1
- package/build/combobox-control/types.js +6 -0
- package/build/combobox-control/types.js.map +1 -0
- package/build/custom-gradient-picker/index.js +0 -1
- package/build/custom-gradient-picker/index.js.map +1 -1
- package/build/date-time/time/index.js +1 -1
- package/build/date-time/time/index.js.map +1 -1
- package/build/date-time/utils.js +1 -1
- package/build/date-time/utils.js.map +1 -1
- package/build/draggable/index.js +2 -2
- package/build/draggable/index.js.map +1 -1
- package/build/focal-point-picker/utils.js +3 -3
- package/build/focal-point-picker/utils.js.map +1 -1
- package/build/font-size-picker/utils.js +2 -2
- package/build/font-size-picker/utils.js.map +1 -1
- package/build/gradient-picker/index.js +9 -4
- package/build/gradient-picker/index.js.map +1 -1
- package/build/input-control/reducer/reducer.js +5 -5
- package/build/input-control/reducer/reducer.js.map +1 -1
- package/build/input-control/utils.js +1 -1
- package/build/input-control/utils.js.map +1 -1
- package/build/menu-items-choice/index.js +40 -3
- package/build/menu-items-choice/index.js.map +1 -1
- package/build/menu-items-choice/types.js +6 -0
- package/build/menu-items-choice/types.js.map +1 -0
- package/build/modal/index.js +41 -3
- package/build/modal/index.js.map +1 -1
- package/build/palette-edit/index.js +4 -1
- package/build/palette-edit/index.js.map +1 -1
- package/build/panel/header.js +9 -0
- package/build/panel/header.js.map +1 -1
- package/build/panel/index.js +21 -3
- package/build/panel/index.js.map +1 -1
- package/build/panel/row.js +10 -4
- package/build/panel/row.js.map +1 -1
- package/build/panel/types.js +6 -0
- package/build/panel/types.js.map +1 -0
- package/build/popover/index.js +15 -3
- package/build/popover/index.js.map +1 -1
- package/build/popover/overlay-middlewares.js +46 -0
- package/build/popover/overlay-middlewares.js.map +1 -0
- package/build/popover/utils.js +45 -6
- package/build/popover/utils.js.map +1 -1
- package/build/query-controls/terms.js +1 -1
- package/build/query-controls/terms.js.map +1 -1
- package/build/range-control/utils.js +4 -4
- package/build/range-control/utils.js.map +1 -1
- package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +12 -12
- package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
- package/build/resizable-box/resize-tooltip/utils.js +14 -14
- package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build/snackbar/index.js +2 -2
- package/build/snackbar/index.js.map +1 -1
- package/build/toolbar/toolbar/index.js +25 -14
- package/build/toolbar/toolbar/index.js.map +1 -1
- package/build/toolbar/toolbar/toolbar-container.js +5 -4
- package/build/toolbar/toolbar/toolbar-container.js.map +1 -1
- package/build/toolbar/toolbar/types.js +6 -0
- package/build/toolbar/toolbar/types.js.map +1 -0
- package/build/toolbar/toolbar-button/index.js +2 -0
- package/build/toolbar/toolbar-button/index.js.map +1 -1
- package/build/toolbar/toolbar-button/toolbar-button-container.js +1 -0
- package/build/toolbar/toolbar-button/toolbar-button-container.js.map +1 -1
- package/build/toolbar/toolbar-context/index.js +2 -0
- package/build/toolbar/toolbar-context/index.js.map +1 -1
- package/build/toolbar/toolbar-dropdown-menu/index.js +2 -0
- package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
- package/build/toolbar/toolbar-group/index.js +2 -0
- package/build/toolbar/toolbar-group/index.js.map +1 -1
- package/build/toolbar/toolbar-group/toolbar-group-collapsed.js +2 -0
- package/build/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
- package/build/toolbar/toolbar-group/toolbar-group-container.js +1 -0
- package/build/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
- package/build/toolbar/toolbar-item/index.js +2 -0
- package/build/toolbar/toolbar-item/index.js.map +1 -1
- package/build/tools-panel/tools-panel/component.js +61 -5
- package/build/tools-panel/tools-panel/component.js.map +1 -1
- package/build/tools-panel/tools-panel/hook.js +4 -2
- package/build/tools-panel/tools-panel/hook.js.map +1 -1
- package/build/tools-panel/tools-panel-header/component.js +2 -1
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build/tools-panel/tools-panel-header/hook.js +2 -0
- package/build/tools-panel/tools-panel-header/hook.js.map +1 -1
- package/build/tools-panel/tools-panel-item/component.js +5 -4
- package/build/tools-panel/tools-panel-item/component.js.map +1 -1
- package/build/tools-panel/tools-panel-item/hook.js +4 -2
- package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build/tree-grid/cell.js +15 -4
- package/build/tree-grid/cell.js.map +1 -1
- package/build/tree-grid/index.js +81 -19
- package/build/tree-grid/index.js.map +1 -1
- package/build/tree-grid/item.js +14 -3
- package/build/tree-grid/item.js.map +1 -1
- package/build/tree-grid/roving-tab-index-context.js +1 -1
- package/build/tree-grid/roving-tab-index-context.js.map +1 -1
- package/build/tree-grid/roving-tab-index-item.js +13 -6
- package/build/tree-grid/roving-tab-index-item.js.map +1 -1
- package/build/tree-grid/roving-tab-index.js +0 -3
- package/build/tree-grid/roving-tab-index.js.map +1 -1
- package/build/tree-grid/row.js +20 -18
- package/build/tree-grid/row.js.map +1 -1
- package/build/tree-grid/types.js +6 -0
- package/build/tree-grid/types.js.map +1 -0
- package/build/ui/context/context-connect.js +7 -7
- package/build/ui/context/context-connect.js.map +1 -1
- package/build/ui/context/get-styled-class-name-from-key.js +1 -1
- package/build/ui/context/get-styled-class-name-from-key.js.map +1 -1
- package/build/ui/utils/get-valid-children.js +1 -1
- package/build/ui/utils/get-valid-children.js.map +1 -1
- package/build/ui/utils/space.js +1 -1
- package/build/ui/utils/space.js.map +1 -1
- package/build/unit-control/index.js +2 -2
- package/build/unit-control/index.js.map +1 -1
- package/build/unit-control/utils.js +20 -20
- package/build/unit-control/utils.js.map +1 -1
- package/build/utils/events.js +4 -4
- package/build/utils/events.js.map +1 -1
- package/build/utils/hooks/use-controlled-state.js +2 -2
- package/build/utils/hooks/use-controlled-state.js.map +1 -1
- package/build/utils/hooks/use-controlled-value.js +4 -4
- package/build/utils/hooks/use-controlled-value.js.map +1 -1
- package/build/utils/hooks/use-latest-ref.js +1 -1
- package/build/utils/hooks/use-latest-ref.js.map +1 -1
- package/build/utils/unit-values.js +3 -3
- package/build/utils/unit-values.js.map +1 -1
- package/build-module/alignment-matrix-control/utils.js +4 -4
- package/build-module/alignment-matrix-control/utils.js.map +1 -1
- package/build-module/angle-picker-control/angle-circle.js +37 -29
- package/build-module/angle-picker-control/angle-circle.js.map +1 -1
- package/build-module/angle-picker-control/index.js +42 -8
- package/build-module/angle-picker-control/index.js.map +1 -1
- package/build-module/angle-picker-control/styles/angle-picker-control-styles.js +13 -13
- package/build-module/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
- package/build-module/{base-field → angle-picker-control}/types.js +0 -0
- package/build-module/{base-field → angle-picker-control}/types.js.map +0 -0
- package/build-module/autocomplete/autocompleter-ui.native.js +1 -0
- package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
- package/build-module/base-control/hooks.js +1 -1
- package/build-module/base-control/hooks.js.map +1 -1
- package/build-module/border-box-control/utils.js +1 -1
- package/build-module/border-box-control/utils.js.map +1 -1
- package/build-module/box-control/all-input-control.js +2 -2
- package/build-module/box-control/all-input-control.js.map +1 -1
- package/build-module/box-control/axial-input-controls.js +1 -1
- package/build-module/box-control/axial-input-controls.js.map +1 -1
- package/build-module/box-control/icon.js.map +1 -1
- package/build-module/box-control/index.js +31 -3
- package/build-module/box-control/index.js.map +1 -1
- package/build-module/box-control/input-controls.js +5 -5
- package/build-module/box-control/input-controls.js.map +1 -1
- package/build-module/box-control/linked-button.js.map +1 -1
- package/build-module/box-control/styles/box-control-icon-styles.js +28 -28
- package/build-module/box-control/styles/box-control-icon-styles.js.map +1 -1
- package/build-module/box-control/styles/box-control-styles.js +23 -23
- package/build-module/box-control/styles/box-control-styles.js.map +1 -1
- package/build-module/box-control/styles/box-control-visualizer-styles.js +19 -19
- package/build-module/box-control/styles/box-control-visualizer-styles.js.map +1 -1
- package/build-module/box-control/types.js +2 -0
- package/{build/base-field → build-module/box-control}/types.js.map +0 -0
- package/build-module/box-control/unit-control.js.map +1 -1
- package/build-module/box-control/utils.js +23 -23
- package/build-module/box-control/utils.js.map +1 -1
- package/build-module/color-palette/index.js +8 -3
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/combobox-control/index.js +68 -12
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/combobox-control/styles.js +2 -2
- package/build-module/combobox-control/styles.js.map +1 -1
- package/build-module/combobox-control/types.js +2 -0
- package/build-module/{resizable-box/styles/resizable-box.styles.js.map → combobox-control/types.js.map} +0 -0
- package/build-module/custom-gradient-picker/index.js +0 -1
- package/build-module/custom-gradient-picker/index.js.map +1 -1
- package/build-module/date-time/time/index.js +1 -1
- package/build-module/date-time/time/index.js.map +1 -1
- package/build-module/date-time/utils.js +1 -1
- package/build-module/date-time/utils.js.map +1 -1
- package/build-module/draggable/index.js +2 -2
- package/build-module/draggable/index.js.map +1 -1
- package/build-module/focal-point-picker/utils.js +3 -3
- package/build-module/focal-point-picker/utils.js.map +1 -1
- package/build-module/font-size-picker/utils.js +2 -2
- package/build-module/font-size-picker/utils.js.map +1 -1
- package/build-module/gradient-picker/index.js +9 -4
- package/build-module/gradient-picker/index.js.map +1 -1
- package/build-module/input-control/reducer/reducer.js +5 -5
- package/build-module/input-control/reducer/reducer.js.map +1 -1
- package/build-module/input-control/utils.js +1 -1
- package/build-module/input-control/utils.js.map +1 -1
- package/build-module/menu-items-choice/index.js +40 -4
- package/build-module/menu-items-choice/index.js.map +1 -1
- package/build-module/menu-items-choice/types.js +2 -0
- package/{build/resizable-box/styles/resizable-box.styles.js.map → build-module/menu-items-choice/types.js.map} +0 -0
- package/build-module/modal/index.js +41 -4
- package/build-module/modal/index.js.map +1 -1
- package/build-module/palette-edit/index.js +4 -1
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/panel/header.js +9 -0
- package/build-module/panel/header.js.map +1 -1
- package/build-module/panel/index.js +20 -2
- package/build-module/panel/index.js.map +1 -1
- package/build-module/panel/row.js +9 -3
- package/build-module/panel/row.js.map +1 -1
- package/build-module/panel/types.js +2 -0
- package/build-module/panel/types.js.map +1 -0
- package/build-module/popover/index.js +14 -4
- package/build-module/popover/index.js.map +1 -1
- package/build-module/popover/overlay-middlewares.js +38 -0
- package/build-module/popover/overlay-middlewares.js.map +1 -0
- package/build-module/popover/utils.js +41 -5
- package/build-module/popover/utils.js.map +1 -1
- package/build-module/query-controls/terms.js +1 -1
- package/build-module/query-controls/terms.js.map +1 -1
- package/build-module/range-control/utils.js +4 -4
- package/build-module/range-control/utils.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +12 -12
- package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/utils.js +14 -14
- package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build-module/snackbar/index.js +2 -2
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/toolbar/toolbar/index.js +25 -13
- package/build-module/toolbar/toolbar/index.js.map +1 -1
- package/build-module/toolbar/toolbar/toolbar-container.js +4 -3
- package/build-module/toolbar/toolbar/toolbar-container.js.map +1 -1
- package/build-module/toolbar/toolbar/types.js +2 -0
- package/build-module/toolbar/toolbar/types.js.map +1 -0
- package/build-module/toolbar/toolbar-button/index.js +1 -0
- package/build-module/toolbar/toolbar-button/index.js.map +1 -1
- package/build-module/toolbar/toolbar-button/toolbar-button-container.js +1 -0
- package/build-module/toolbar/toolbar-button/toolbar-button-container.js.map +1 -1
- package/build-module/toolbar/toolbar-context/index.js +2 -0
- package/build-module/toolbar/toolbar-context/index.js.map +1 -1
- package/build-module/toolbar/toolbar-dropdown-menu/index.js +1 -0
- package/build-module/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
- package/build-module/toolbar/toolbar-group/index.js +1 -0
- package/build-module/toolbar/toolbar-group/index.js.map +1 -1
- package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js +1 -0
- package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
- package/build-module/toolbar/toolbar-group/toolbar-group-container.js +1 -0
- package/build-module/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
- package/build-module/toolbar/toolbar-item/index.js +1 -0
- package/build-module/toolbar/toolbar-item/index.js.map +1 -1
- package/build-module/tools-panel/tools-panel/component.js +59 -4
- package/build-module/tools-panel/tools-panel/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel/hook.js +4 -2
- package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js +2 -1
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/hook.js +2 -0
- package/build-module/tools-panel/tools-panel-header/hook.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/component.js +3 -3
- package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/hook.js +5 -2
- package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build-module/tree-grid/cell.js +16 -4
- package/build-module/tree-grid/cell.js.map +1 -1
- package/build-module/tree-grid/index.js +81 -21
- package/build-module/tree-grid/index.js.map +1 -1
- package/build-module/tree-grid/item.js +14 -2
- package/build-module/tree-grid/item.js.map +1 -1
- package/build-module/tree-grid/roving-tab-index-context.js +1 -1
- package/build-module/tree-grid/roving-tab-index-context.js.map +1 -1
- package/build-module/tree-grid/roving-tab-index-item.js +11 -4
- package/build-module/tree-grid/roving-tab-index-item.js.map +1 -1
- package/build-module/tree-grid/roving-tab-index.js +0 -3
- package/build-module/tree-grid/roving-tab-index.js.map +1 -1
- package/build-module/tree-grid/row.js +22 -17
- package/build-module/tree-grid/row.js.map +1 -1
- package/build-module/tree-grid/types.js +2 -0
- package/build-module/tree-grid/types.js.map +1 -0
- package/build-module/ui/context/context-connect.js +7 -7
- package/build-module/ui/context/context-connect.js.map +1 -1
- package/build-module/ui/context/get-styled-class-name-from-key.js +1 -1
- package/build-module/ui/context/get-styled-class-name-from-key.js.map +1 -1
- package/build-module/ui/utils/get-valid-children.js +1 -1
- package/build-module/ui/utils/get-valid-children.js.map +1 -1
- package/build-module/ui/utils/space.js +1 -1
- package/build-module/ui/utils/space.js.map +1 -1
- package/build-module/unit-control/index.js +2 -2
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/unit-control/utils.js +20 -20
- package/build-module/unit-control/utils.js.map +1 -1
- package/build-module/utils/events.js +4 -4
- package/build-module/utils/events.js.map +1 -1
- package/build-module/utils/hooks/use-controlled-state.js +2 -2
- package/build-module/utils/hooks/use-controlled-state.js.map +1 -1
- package/build-module/utils/hooks/use-controlled-value.js +4 -4
- package/build-module/utils/hooks/use-controlled-value.js.map +1 -1
- package/build-module/utils/hooks/use-latest-ref.js +1 -1
- package/build-module/utils/hooks/use-latest-ref.js.map +1 -1
- package/build-module/utils/unit-values.js +3 -3
- package/build-module/utils/unit-values.js.map +1 -1
- package/build-style/style-rtl.css +5 -0
- package/build-style/style.css +5 -0
- package/build-types/alignment-matrix-control/utils.d.ts +4 -4
- package/build-types/angle-picker-control/angle-circle.d.ts +6 -0
- package/build-types/angle-picker-control/angle-circle.d.ts.map +1 -0
- package/build-types/angle-picker-control/index.d.ts +29 -0
- package/build-types/angle-picker-control/index.d.ts.map +1 -0
- package/build-types/angle-picker-control/stories/index.d.ts +15 -0
- package/build-types/angle-picker-control/stories/index.d.ts.map +1 -0
- package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts +20 -0
- package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -0
- package/build-types/angle-picker-control/types.d.ts +26 -0
- package/build-types/angle-picker-control/types.d.ts.map +1 -0
- package/build-types/base-control/hooks.d.ts +1 -1
- package/build-types/border-box-control/border-box-control/component.d.ts +1 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts +1 -1
- package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +1 -1
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +1 -1
- package/build-types/border-box-control/stories/index.d.ts +1 -1
- package/build-types/{base-field → border-box-control}/test/index.d.ts +0 -0
- package/build-types/border-box-control/test/index.d.ts.map +1 -0
- package/build-types/border-box-control/test/utils.d.ts +2 -0
- package/build-types/border-box-control/test/utils.d.ts.map +1 -0
- package/build-types/box-control/all-input-control.d.ts +4 -0
- package/build-types/box-control/all-input-control.d.ts.map +1 -0
- package/build-types/box-control/axial-input-controls.d.ts +4 -0
- package/build-types/box-control/axial-input-controls.d.ts.map +1 -0
- package/build-types/box-control/icon.d.ts +8 -0
- package/build-types/box-control/icon.d.ts.map +1 -0
- package/build-types/box-control/index.d.ts +31 -0
- package/build-types/box-control/index.d.ts.map +1 -0
- package/build-types/box-control/input-controls.d.ts +4 -0
- package/build-types/box-control/input-controls.d.ts.map +1 -0
- package/build-types/box-control/linked-button.d.ts +9 -0
- package/build-types/box-control/linked-button.d.ts.map +1 -0
- package/build-types/box-control/styles/box-control-icon-styles.d.ts +42 -0
- package/build-types/box-control/styles/box-control-icon-styles.d.ts.map +1 -0
- package/build-types/box-control/styles/box-control-styles.d.ts +42 -0
- package/build-types/box-control/styles/box-control-styles.d.ts.map +1 -0
- package/build-types/box-control/styles/box-control-visualizer-styles.d.ts +46 -0
- package/build-types/box-control/styles/box-control-visualizer-styles.d.ts.map +1 -0
- package/build-types/box-control/test/index.d.ts +2 -0
- package/build-types/box-control/test/index.d.ts.map +1 -0
- package/build-types/box-control/types.d.ts +99 -0
- package/build-types/box-control/types.d.ts.map +1 -0
- package/build-types/box-control/unit-control.d.ts +4 -0
- package/build-types/box-control/unit-control.d.ts.map +1 -0
- package/build-types/box-control/utils.d.ts +84 -0
- package/build-types/box-control/utils.d.ts.map +1 -0
- package/build-types/color-palette/index.d.ts +3 -1
- package/build-types/color-palette/index.d.ts.map +1 -1
- package/build-types/color-palette/stories/index.d.ts +6 -2
- package/build-types/color-palette/stories/index.d.ts.map +1 -1
- package/build-types/color-palette/types.d.ts +8 -0
- package/build-types/color-palette/types.d.ts.map +1 -1
- package/build-types/combobox-control/index.d.ts +51 -0
- package/build-types/combobox-control/index.d.ts.map +1 -0
- package/build-types/combobox-control/stories/index.d.ts +18 -0
- package/build-types/combobox-control/stories/index.d.ts.map +1 -0
- package/build-types/combobox-control/styles.d.ts +8 -0
- package/build-types/combobox-control/styles.d.ts.map +1 -0
- package/build-types/combobox-control/test/index.d.ts +2 -0
- package/build-types/combobox-control/test/index.d.ts.map +1 -0
- package/build-types/combobox-control/types.d.ts +62 -0
- package/build-types/combobox-control/types.d.ts.map +1 -0
- package/build-types/date-time/utils.d.ts +1 -1
- package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +1 -1
- package/build-types/focal-point-picker/utils.d.ts +3 -3
- package/build-types/font-size-picker/utils.d.ts +2 -2
- package/build-types/input-control/reducer/reducer.d.ts +3 -3
- package/build-types/input-control/utils.d.ts +1 -1
- package/build-types/menu-items-choice/index.d.ts +38 -0
- package/build-types/menu-items-choice/index.d.ts.map +1 -0
- package/build-types/menu-items-choice/stories/index.d.ts +12 -0
- package/build-types/menu-items-choice/stories/index.d.ts.map +1 -0
- package/build-types/menu-items-choice/types.d.ts +53 -0
- package/build-types/menu-items-choice/types.d.ts.map +1 -0
- package/build-types/modal/index.d.ts.map +1 -1
- package/build-types/modal/types.d.ts +2 -0
- package/build-types/modal/types.d.ts.map +1 -1
- package/build-types/panel/header.d.ts +13 -0
- package/build-types/panel/header.d.ts.map +1 -0
- package/build-types/panel/index.d.ts +21 -0
- package/build-types/panel/index.d.ts.map +1 -0
- package/build-types/panel/row.d.ts +12 -0
- package/build-types/panel/row.d.ts.map +1 -0
- package/build-types/panel/test/header.d.ts +2 -0
- package/build-types/panel/test/header.d.ts.map +1 -0
- package/build-types/panel/test/index.d.ts +2 -0
- package/build-types/{base-field → panel}/test/index.d.ts.map +1 -1
- package/build-types/panel/test/row.d.ts +2 -0
- package/build-types/panel/test/row.d.ts.map +1 -0
- package/build-types/panel/types.d.ts +38 -0
- package/build-types/panel/types.d.ts.map +1 -0
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/popover/overlay-middlewares.d.ts +9 -0
- package/build-types/popover/overlay-middlewares.d.ts.map +1 -0
- package/build-types/popover/stories/index.d.ts.map +1 -1
- package/build-types/popover/types.d.ts +3 -2
- package/build-types/popover/types.d.ts.map +1 -1
- package/build-types/popover/utils.d.ts +12 -4
- package/build-types/popover/utils.d.ts.map +1 -1
- package/build-types/query-controls/terms.d.ts +1 -1
- package/build-types/range-control/utils.d.ts +4 -4
- package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts +5 -4
- package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/utils.d.ts +6 -6
- package/build-types/toolbar/index.d.ts +7 -0
- package/build-types/toolbar/index.d.ts.map +1 -0
- package/build-types/toolbar/stories/index.d.ts +14 -0
- package/build-types/toolbar/stories/index.d.ts.map +1 -0
- package/build-types/toolbar/test/index.d.ts +2 -0
- package/build-types/toolbar/test/index.d.ts.map +1 -0
- package/build-types/toolbar/test/toolbar-group.d.ts +2 -0
- package/build-types/toolbar/test/toolbar-group.d.ts.map +1 -0
- package/build-types/toolbar/toolbar/index.d.ts +25 -0
- package/build-types/toolbar/toolbar/index.d.ts.map +1 -0
- package/build-types/toolbar/toolbar/toolbar-container.d.ts +5 -0
- package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -0
- package/build-types/toolbar/toolbar/types.d.ts +15 -0
- package/build-types/toolbar/toolbar/types.d.ts.map +1 -0
- package/build-types/toolbar/toolbar-button/index.d.ts +12 -0
- package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -0
- package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts +3 -0
- package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts.map +1 -0
- package/build-types/toolbar/toolbar-context/index.d.ts +3 -0
- package/build-types/toolbar/toolbar-context/index.d.ts.map +1 -0
- package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts +3 -0
- package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -0
- package/build-types/toolbar/toolbar-group/index.d.ts +39 -0
- package/build-types/toolbar/toolbar-group/index.d.ts.map +1 -0
- package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts +7 -0
- package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts.map +1 -0
- package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts +7 -0
- package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts.map +1 -0
- package/build-types/toolbar/toolbar-item/index.d.ts +7 -0
- package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -0
- package/build-types/tools-panel/stories/index.d.ts +17 -0
- package/build-types/tools-panel/stories/index.d.ts.map +1 -0
- package/build-types/tools-panel/tools-panel/component.d.ts +54 -2
- package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts +2 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/hook.d.ts +2 -1
- package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-item/component.d.ts +2 -2
- package/build-types/tools-panel/tools-panel-item/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
- package/build-types/tools-panel/types.d.ts +42 -15
- package/build-types/tools-panel/types.d.ts.map +1 -1
- package/build-types/tree-grid/cell.d.ts +13 -0
- package/build-types/tree-grid/cell.d.ts.map +1 -0
- package/build-types/tree-grid/index.d.ts +70 -0
- package/build-types/tree-grid/index.d.ts.map +1 -0
- package/build-types/tree-grid/item.d.ts +12 -0
- package/build-types/tree-grid/item.d.ts.map +1 -0
- package/build-types/tree-grid/roving-tab-index-context.d.ts +10 -0
- package/build-types/tree-grid/roving-tab-index-context.d.ts.map +1 -0
- package/build-types/tree-grid/roving-tab-index-item.d.ts +5 -0
- package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -0
- package/build-types/tree-grid/roving-tab-index.d.ts +10 -0
- package/build-types/tree-grid/roving-tab-index.d.ts.map +1 -0
- package/build-types/tree-grid/row.d.ts +12 -0
- package/build-types/tree-grid/row.d.ts.map +1 -0
- package/build-types/tree-grid/stories/index.d.ts +13 -0
- package/build-types/tree-grid/stories/index.d.ts.map +1 -0
- package/build-types/tree-grid/test/cell.d.ts +2 -0
- package/build-types/tree-grid/test/cell.d.ts.map +1 -0
- package/build-types/tree-grid/test/index.d.ts +2 -0
- package/build-types/tree-grid/test/index.d.ts.map +1 -0
- package/build-types/tree-grid/test/roving-tab-index-item.d.ts +2 -0
- package/build-types/tree-grid/test/roving-tab-index-item.d.ts.map +1 -0
- package/build-types/tree-grid/test/roving-tab-index.d.ts +2 -0
- package/build-types/tree-grid/test/roving-tab-index.d.ts.map +1 -0
- package/build-types/tree-grid/test/row.d.ts +2 -0
- package/build-types/tree-grid/test/row.d.ts.map +1 -0
- package/build-types/tree-grid/types.d.ts +109 -0
- package/build-types/tree-grid/types.d.ts.map +1 -0
- package/build-types/ui/context/context-connect.d.ts +7 -7
- package/build-types/ui/context/get-styled-class-name-from-key.d.ts +1 -1
- package/build-types/ui/utils/get-valid-children.d.ts +1 -1
- package/build-types/ui/utils/space.d.ts +1 -1
- package/build-types/unit-control/index.d.ts +1 -1
- package/build-types/unit-control/utils.d.ts +20 -20
- package/build-types/utils/events.d.ts +2 -2
- package/build-types/utils/hooks/use-controlled-state.d.ts +1 -1
- package/build-types/utils/hooks/use-controlled-state.d.ts.map +1 -1
- package/build-types/utils/hooks/use-controlled-value.d.ts +4 -4
- package/build-types/utils/hooks/use-latest-ref.d.ts +1 -1
- package/build-types/utils/unit-values.d.ts +3 -3
- package/package.json +19 -19
- package/src/alignment-matrix-control/utils.tsx +4 -4
- package/src/angle-picker-control/README.md +17 -14
- package/src/angle-picker-control/{angle-circle.js → angle-circle.tsx} +44 -12
- package/src/angle-picker-control/{index.js → index.tsx} +54 -10
- package/src/angle-picker-control/stories/index.tsx +57 -0
- package/src/angle-picker-control/styles/{angle-picker-control-styles.js → angle-picker-control-styles.tsx} +5 -1
- package/src/angle-picker-control/types.ts +29 -0
- package/src/autocomplete/autocompleter-ui.native.js +1 -0
- package/src/base-control/hooks.ts +1 -1
- package/src/border-box-control/test/{index.js → index.tsx} +76 -102
- package/src/border-box-control/test/{utils.js → utils.ts} +20 -0
- package/src/border-box-control/utils.ts +1 -1
- package/src/box-control/README.md +17 -26
- package/src/box-control/{all-input-control.js → all-input-control.tsx} +10 -6
- package/src/box-control/{axial-input-controls.js → axial-input-controls.tsx} +29 -24
- package/src/box-control/{icon.js → icon.tsx} +9 -4
- package/src/box-control/{index.js → index.tsx} +43 -8
- package/src/box-control/{input-controls.js → input-controls.tsx} +26 -16
- package/src/box-control/{linked-button.js → linked-button.tsx} +4 -1
- package/src/box-control/styles/{box-control-icon-styles.js → box-control-icon-styles.ts} +1 -1
- package/src/box-control/styles/{box-control-styles.js → box-control-styles.ts} +10 -2
- package/src/box-control/styles/{box-control-visualizer-styles.js → box-control-visualizer-styles.ts} +6 -2
- package/src/box-control/test/{index.js → index.tsx} +12 -9
- package/src/box-control/types.ts +121 -0
- package/src/box-control/{unit-control.js → unit-control.tsx} +9 -2
- package/src/box-control/{utils.js → utils.ts} +47 -38
- package/src/button/test/index.tsx +38 -30
- package/src/color-palette/README.md +7 -0
- package/src/color-palette/index.tsx +6 -1
- package/src/color-palette/types.ts +8 -0
- package/src/combobox-control/README.md +8 -15
- package/src/combobox-control/{index.js → index.tsx} +91 -19
- package/src/combobox-control/stories/index.tsx +114 -0
- package/src/combobox-control/styles.ts +4 -1
- package/src/combobox-control/test/{index.js → index.tsx} +9 -7
- package/src/combobox-control/types.ts +69 -0
- package/src/custom-gradient-picker/index.js +0 -1
- package/src/custom-select-control/stories/index.js +1 -1
- package/src/date-time/time/index.tsx +1 -1
- package/src/date-time/utils.ts +1 -1
- package/src/draggable/index.tsx +2 -2
- package/src/dropdown-menu/test/index.js +3 -11
- package/src/focal-point-picker/utils.ts +3 -3
- package/src/font-size-picker/utils.ts +2 -2
- package/src/gradient-picker/README.md +8 -0
- package/src/gradient-picker/index.js +6 -1
- package/src/input-control/reducer/reducer.ts +5 -5
- package/src/input-control/utils.ts +1 -1
- package/src/menu-items-choice/index.tsx +83 -0
- package/src/menu-items-choice/stories/index.tsx +79 -0
- package/src/menu-items-choice/types.ts +54 -0
- package/src/modal/index.tsx +45 -1
- package/src/modal/style.scss +8 -0
- package/src/modal/types.ts +2 -0
- package/src/palette-edit/index.js +4 -1
- package/src/panel/README.md +2 -2
- package/src/panel/header.tsx +20 -0
- package/src/panel/index.tsx +48 -0
- package/src/panel/row.tsx +37 -0
- package/src/panel/stories/index.js +22 -0
- package/src/panel/test/__snapshots__/{header.js.snap → header.tsx.snap} +0 -0
- package/src/panel/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
- package/src/panel/test/__snapshots__/{row.js.snap → row.tsx.snap} +0 -0
- package/src/panel/test/{header.js → header.tsx} +1 -1
- package/src/panel/test/{index.js → index.tsx} +6 -4
- package/src/panel/test/{row.js → row.tsx} +4 -2
- package/src/panel/types.ts +38 -0
- package/src/popover/README.md +4 -1
- package/src/popover/index.tsx +17 -1
- package/src/popover/overlay-middlewares.tsx +29 -0
- package/src/popover/stories/index.tsx +7 -1
- package/src/popover/test/index.tsx +29 -21
- package/src/popover/types.ts +4 -2
- package/src/popover/utils.ts +39 -3
- package/src/query-controls/terms.ts +1 -1
- package/src/range-control/utils.ts +4 -4
- package/src/resizable-box/resize-tooltip/styles/{resize-tooltip.styles.js → resize-tooltip.styles.ts} +0 -0
- package/src/resizable-box/resize-tooltip/utils.ts +14 -14
- package/src/snackbar/index.tsx +2 -2
- package/src/toolbar/stories/{index.js → index.tsx} +39 -26
- package/src/toolbar/test/{index.js → index.tsx} +0 -0
- package/src/toolbar/test/{toolbar-group.js → toolbar-group.tsx} +2 -2
- package/src/toolbar/toolbar/README.md +7 -2
- package/src/toolbar/toolbar/{index.js → index.tsx} +33 -12
- package/src/toolbar/toolbar/{toolbar-container.js → toolbar-container.tsx} +9 -2
- package/src/toolbar/toolbar/types.ts +15 -0
- package/src/toolbar/toolbar-button/index.js +2 -0
- package/src/toolbar/toolbar-button/toolbar-button-container.js +2 -0
- package/src/toolbar/toolbar-context/index.js +2 -0
- package/src/toolbar/toolbar-dropdown-menu/index.js +2 -0
- package/src/toolbar/toolbar-group/index.js +2 -0
- package/src/toolbar/toolbar-group/toolbar-group-collapsed.js +2 -0
- package/src/toolbar/toolbar-group/toolbar-group-container.js +2 -0
- package/src/toolbar/toolbar-item/index.js +2 -0
- package/src/tools-panel/stories/{index.js → index.tsx} +196 -95
- package/src/tools-panel/test/index.js +6 -6
- package/src/tools-panel/tools-panel/README.md +12 -4
- package/src/tools-panel/tools-panel/component.tsx +57 -3
- package/src/tools-panel/tools-panel/hook.ts +4 -2
- package/src/tools-panel/tools-panel-header/README.md +7 -0
- package/src/tools-panel/tools-panel-header/component.tsx +2 -1
- package/src/tools-panel/tools-panel-header/hook.ts +6 -4
- package/src/tools-panel/tools-panel-item/README.md +6 -4
- package/src/tools-panel/tools-panel-item/component.tsx +4 -4
- package/src/tools-panel/tools-panel-item/hook.ts +4 -2
- package/src/tools-panel/types.ts +43 -15
- package/src/tree-grid/README.md +18 -58
- package/src/tree-grid/cell.tsx +41 -0
- package/src/tree-grid/{index.js → index.tsx} +111 -35
- package/src/tree-grid/item.tsx +32 -0
- package/src/tree-grid/{roving-tab-index-context.js → roving-tab-index-context.ts} +9 -1
- package/src/tree-grid/roving-tab-index-item.tsx +50 -0
- package/src/tree-grid/{roving-tab-index.js → roving-tab-index.tsx} +7 -5
- package/src/tree-grid/row.tsx +47 -0
- package/src/tree-grid/stories/index.tsx +144 -0
- package/src/tree-grid/test/__snapshots__/{cell.js.snap → cell.tsx.snap} +0 -0
- package/src/tree-grid/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
- package/src/tree-grid/test/__snapshots__/{roving-tab-index-item.js.snap → roving-tab-index-item.tsx.snap} +0 -0
- package/src/tree-grid/test/__snapshots__/{roving-tab-index.js.snap → roving-tab-index.tsx.snap} +0 -0
- package/src/tree-grid/test/__snapshots__/{row.js.snap → row.tsx.snap} +0 -0
- package/src/tree-grid/test/{cell.js → cell.tsx} +7 -4
- package/src/tree-grid/test/{index.js → index.tsx} +13 -5
- package/src/tree-grid/test/{roving-tab-index-item.js → roving-tab-index-item.tsx} +7 -4
- package/src/tree-grid/test/{roving-tab-index.js → roving-tab-index.tsx} +0 -0
- package/src/tree-grid/test/{row.js → row.tsx} +4 -4
- package/src/tree-grid/types.ts +116 -0
- package/src/ui/context/context-connect.ts +7 -7
- package/src/ui/context/get-styled-class-name-from-key.ts +1 -1
- package/src/ui/utils/get-valid-children.ts +1 -1
- package/src/ui/utils/space.ts +1 -1
- package/src/unit-control/index.tsx +2 -2
- package/src/unit-control/utils.ts +20 -20
- package/src/utils/events.ts +4 -4
- package/src/utils/hooks/use-controlled-state.js +2 -2
- package/src/utils/hooks/use-controlled-value.ts +4 -4
- package/src/utils/hooks/use-latest-ref.ts +1 -1
- package/src/utils/unit-values.ts +3 -3
- package/tsconfig.json +1 -7
- package/tsconfig.tsbuildinfo +1 -1
- package/build/base-field/hook.js +0 -54
- package/build/base-field/hook.js.map +0 -1
- package/build/base-field/index.js +0 -14
- package/build/base-field/index.js.map +0 -1
- package/build/base-field/styles.js +0 -33
- package/build/base-field/styles.js.map +0 -1
- package/build/resizable-box/styles/resizable-box.styles.js +0 -2
- package/build-module/base-field/hook.js +0 -37
- package/build-module/base-field/hook.js.map +0 -1
- package/build-module/base-field/index.js +0 -2
- package/build-module/base-field/index.js.map +0 -1
- package/build-module/base-field/styles.js +0 -18
- package/build-module/base-field/styles.js.map +0 -1
- package/build-module/resizable-box/styles/resizable-box.styles.js +0 -2
- package/build-types/base-field/hook.d.ts +0 -270
- package/build-types/base-field/hook.d.ts.map +0 -1
- package/build-types/base-field/index.d.ts +0 -2
- package/build-types/base-field/index.d.ts.map +0 -1
- package/build-types/base-field/styles.d.ts +0 -6
- package/build-types/base-field/styles.d.ts.map +0 -1
- package/build-types/base-field/types.d.ts +0 -29
- package/build-types/base-field/types.d.ts.map +0 -1
- package/build-types/resizable-box/styles/resizable-box.styles.d.ts +0 -1
- package/build-types/resizable-box/styles/resizable-box.styles.d.ts.map +0 -1
- package/src/angle-picker-control/stories/index.js +0 -29
- package/src/base-field/README.md +0 -66
- package/src/base-field/hook.ts +0 -51
- package/src/base-field/index.ts +0 -1
- package/src/base-field/styles.ts +0 -86
- package/src/base-field/test/__snapshots__/index.tsx.snap +0 -141
- package/src/base-field/test/index.tsx +0 -84
- package/src/base-field/types.ts +0 -29
- package/src/combobox-control/stories/index.js +0 -339
- package/src/menu-items-choice/index.js +0 -43
- package/src/panel/header.js +0 -10
- package/src/panel/index.js +0 -26
- package/src/panel/row.js +0 -20
- package/src/resizable-box/styles/resizable-box.styles.js +0 -0
- package/src/tools-panel/stories/utils/tools-panel-with-item-group-slot.js +0 -246
- package/src/tree-grid/cell.js +0 -24
- package/src/tree-grid/item.js +0 -20
- package/src/tree-grid/roving-tab-index-item.js +0 -33
- package/src/tree-grid/row.js +0 -31
- package/src/tree-grid/stories/index.js +0 -106
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
export type TreeGridRowProps = {
|
|
2
|
+
/**
|
|
3
|
+
* The children to be rendered in the row.
|
|
4
|
+
*/
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* An integer value designating the level in the hierarchical tree structure.
|
|
8
|
+
* Counting starts at 1. A value of `1` indicates the root level of the structure.
|
|
9
|
+
*/
|
|
10
|
+
level: NonNullable< React.AriaAttributes[ 'aria-level' ] >;
|
|
11
|
+
/**
|
|
12
|
+
* An integer value that represents the position in the set.
|
|
13
|
+
* A set is the count of elements at a specific level. Counting starts at 1.
|
|
14
|
+
*/
|
|
15
|
+
positionInSet: NonNullable< React.AriaAttributes[ 'aria-posinset' ] >;
|
|
16
|
+
/**
|
|
17
|
+
* An integer value that represents the total number of items in the set,
|
|
18
|
+
* at this specific level of the hierarchy.
|
|
19
|
+
*/
|
|
20
|
+
setSize: NonNullable< React.AriaAttributes[ 'aria-setsize' ] >;
|
|
21
|
+
/**
|
|
22
|
+
* An optional value that designates whether a row is expanded or collapsed.
|
|
23
|
+
* Currently this value only sets the correct aria-expanded property on a row,
|
|
24
|
+
* it has no other built-in behavior.
|
|
25
|
+
*/
|
|
26
|
+
isExpanded?: boolean;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
type RovingTabIndexItemPassThruProps = {
|
|
30
|
+
ref: React.ForwardedRef< any >;
|
|
31
|
+
tabIndex?: number;
|
|
32
|
+
onFocus: React.FocusEventHandler< any >;
|
|
33
|
+
[ key: string ]: any;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type RovingTabIndexItemProps = {
|
|
37
|
+
/**
|
|
38
|
+
* A render function that receives the props necessary to make it participate in the
|
|
39
|
+
* roving tabindex. Any extra props will also be passed through to this function.
|
|
40
|
+
*
|
|
41
|
+
* Props passed as an argument to the render prop must be passed to the child
|
|
42
|
+
* focusable component/element within the cell. If a component is used, it must
|
|
43
|
+
* correctly handle the `onFocus`, `tabIndex`, and `ref` props, passing these to the
|
|
44
|
+
* element it renders. These props are used to handle the roving tabindex functionality
|
|
45
|
+
* of the tree grid.
|
|
46
|
+
*
|
|
47
|
+
* ```jsx
|
|
48
|
+
* <TreeGridCell>
|
|
49
|
+
* { ( props ) => (
|
|
50
|
+
* <Button onClick={ doSomething } { ...props }>
|
|
51
|
+
* Do something
|
|
52
|
+
* </Button>
|
|
53
|
+
* ) }
|
|
54
|
+
* </TreeGridCell>
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
children?: ( props: RovingTabIndexItemPassThruProps ) => JSX.Element;
|
|
58
|
+
/**
|
|
59
|
+
* If `children` is not a function, this component will be used instead.
|
|
60
|
+
*/
|
|
61
|
+
as?: React.ComponentType< RovingTabIndexItemPassThruProps >;
|
|
62
|
+
[ key: string ]: any;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export type TreeGridCellProps =
|
|
66
|
+
| ( {
|
|
67
|
+
/**
|
|
68
|
+
* Render `children` without wrapping it in a `TreeGridItem` component.
|
|
69
|
+
* This means that `children` will not participate in the roving tabindex.
|
|
70
|
+
*
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
73
|
+
withoutGridItem?: false;
|
|
74
|
+
} & NonNullable< Pick< RovingTabIndexItemProps, 'children' > > )
|
|
75
|
+
| {
|
|
76
|
+
children: React.ReactNode;
|
|
77
|
+
withoutGridItem: true;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export type TreeGridProps = {
|
|
81
|
+
/**
|
|
82
|
+
* Label to use for the element with the `application` role.
|
|
83
|
+
*/
|
|
84
|
+
applicationAriaLabel?: string;
|
|
85
|
+
/**
|
|
86
|
+
* The children to be rendered in the tree grid.
|
|
87
|
+
*/
|
|
88
|
+
children: React.ReactNode;
|
|
89
|
+
/**
|
|
90
|
+
* Callback to fire when row is expanded.
|
|
91
|
+
*
|
|
92
|
+
* @default noop
|
|
93
|
+
*/
|
|
94
|
+
onExpandRow?: ( row: HTMLElement ) => void;
|
|
95
|
+
/**
|
|
96
|
+
* Callback to fire when row is collapsed.
|
|
97
|
+
*
|
|
98
|
+
* @default noop
|
|
99
|
+
*/
|
|
100
|
+
onCollapseRow?: ( row: HTMLElement ) => void;
|
|
101
|
+
/**
|
|
102
|
+
* Callback that fires when focus is shifted from one row to another via
|
|
103
|
+
* the Up and Down keys. Callback is also fired on Home and End keys which
|
|
104
|
+
* move focus from the beginning row to the end row.
|
|
105
|
+
*
|
|
106
|
+
* The callback is passed the event, the start row element that the focus was on
|
|
107
|
+
* originally, and the destination row element after the focus has moved.
|
|
108
|
+
*
|
|
109
|
+
* @default noop
|
|
110
|
+
*/
|
|
111
|
+
onFocusRow?: (
|
|
112
|
+
event: React.KeyboardEvent< HTMLTableElement >,
|
|
113
|
+
startRow: HTMLElement,
|
|
114
|
+
destinationRow: HTMLElement
|
|
115
|
+
) => void;
|
|
116
|
+
};
|
|
@@ -29,8 +29,8 @@ type ContextConnectOptions = {
|
|
|
29
29
|
* Forwards ref (React.ForwardRef) and "Connects" (or registers) a component
|
|
30
30
|
* within the Context system under a specified namespace.
|
|
31
31
|
*
|
|
32
|
-
* @param
|
|
33
|
-
* @param
|
|
32
|
+
* @param Component The component to register into the Context system.
|
|
33
|
+
* @param namespace The namespace to register the component under.
|
|
34
34
|
* @return The connected WordPressComponent
|
|
35
35
|
*/
|
|
36
36
|
export function contextConnect<
|
|
@@ -50,8 +50,8 @@ export function contextConnect<
|
|
|
50
50
|
* "Connects" (or registers) a component within the Context system under a specified namespace.
|
|
51
51
|
* Does not forward a ref.
|
|
52
52
|
*
|
|
53
|
-
* @param
|
|
54
|
-
* @param
|
|
53
|
+
* @param Component The component to register into the Context system.
|
|
54
|
+
* @param namespace The namespace to register the component under.
|
|
55
55
|
* @return The connected WordPressComponent
|
|
56
56
|
*/
|
|
57
57
|
export function contextConnectWithoutRef< P >(
|
|
@@ -110,7 +110,7 @@ function _contextConnect<
|
|
|
110
110
|
/**
|
|
111
111
|
* Attempts to retrieve the connected namespace from a component.
|
|
112
112
|
*
|
|
113
|
-
* @param
|
|
113
|
+
* @param Component The component to retrieve a namespace from.
|
|
114
114
|
* @return The connected namespaces.
|
|
115
115
|
*/
|
|
116
116
|
export function getConnectNamespace(
|
|
@@ -138,8 +138,8 @@ export function getConnectNamespace(
|
|
|
138
138
|
/**
|
|
139
139
|
* Checks to see if a component is connected within the Context system.
|
|
140
140
|
*
|
|
141
|
-
* @param
|
|
142
|
-
* @param
|
|
141
|
+
* @param Component The component to retrieve a namespace from.
|
|
142
|
+
* @param match The namespace to check.
|
|
143
143
|
*/
|
|
144
144
|
export function hasConnectNamespace(
|
|
145
145
|
Component: ReactNode,
|
|
@@ -7,7 +7,7 @@ import memoize from 'memize';
|
|
|
7
7
|
/**
|
|
8
8
|
* Generates the connected component CSS className based on the namespace.
|
|
9
9
|
*
|
|
10
|
-
* @param
|
|
10
|
+
* @param namespace The name of the connected component.
|
|
11
11
|
* @return The generated CSS className.
|
|
12
12
|
*/
|
|
13
13
|
function getStyledClassName( namespace: string ): string {
|
|
@@ -11,7 +11,7 @@ import { Children, isValidElement } from '@wordpress/element';
|
|
|
11
11
|
/**
|
|
12
12
|
* Gets a collection of available children elements from a React component's children prop.
|
|
13
13
|
*
|
|
14
|
-
* @param
|
|
14
|
+
* @param children
|
|
15
15
|
*
|
|
16
16
|
* @return An array of available children.
|
|
17
17
|
*/
|
package/src/ui/utils/space.ts
CHANGED
|
@@ -20,7 +20,7 @@ const GRID_BASE = '4px';
|
|
|
20
20
|
* When given a unit value or one of the named CSS values like `auto`,
|
|
21
21
|
* it will simply return the value back.
|
|
22
22
|
*
|
|
23
|
-
* @param
|
|
23
|
+
* @param value A number, numeric string, or a unit value.
|
|
24
24
|
*/
|
|
25
25
|
export function space( value?: SpaceInput ): string | undefined {
|
|
26
26
|
if ( typeof value === 'undefined' ) {
|
|
@@ -203,8 +203,8 @@ function UnforwardedUnitControl(
|
|
|
203
203
|
* This allows us to tap into actions to transform the (next) state for
|
|
204
204
|
* InputControl.
|
|
205
205
|
*
|
|
206
|
-
* @param
|
|
207
|
-
* @param
|
|
206
|
+
* @param state State from InputControl
|
|
207
|
+
* @param action Action triggering state change
|
|
208
208
|
* @return The updated state to apply to InputControl
|
|
209
209
|
*/
|
|
210
210
|
const unitControlStateReducer: StateReducer = ( state, action ) => {
|
|
@@ -130,9 +130,9 @@ export const DEFAULT_UNIT = allUnits.px;
|
|
|
130
130
|
* Moving forward, ideally the value should be a string that contains both
|
|
131
131
|
* the value and unit, example: '10px'
|
|
132
132
|
*
|
|
133
|
-
* @param
|
|
134
|
-
* @param
|
|
135
|
-
* @param
|
|
133
|
+
* @param rawValue The raw value as a string (may or may not contain the unit)
|
|
134
|
+
* @param fallbackUnit The unit used as a fallback, if not unit is detected in the `value`
|
|
135
|
+
* @param allowedUnits Units to derive from.
|
|
136
136
|
* @return The extracted quantity and unit. The quantity can be `undefined` in case the raw value
|
|
137
137
|
* could not be parsed to a number correctly. The unit can be `undefined` in case the unit parse
|
|
138
138
|
* from the raw value could not be matched against the list of allowed units.
|
|
@@ -152,7 +152,7 @@ export function getParsedQuantityAndUnit(
|
|
|
152
152
|
/**
|
|
153
153
|
* Checks if units are defined.
|
|
154
154
|
*
|
|
155
|
-
* @param
|
|
155
|
+
* @param units List of units.
|
|
156
156
|
* @return Whether the list actually contains any units.
|
|
157
157
|
*/
|
|
158
158
|
export function hasUnits(
|
|
@@ -168,8 +168,8 @@ export function hasUnits(
|
|
|
168
168
|
* Parses a quantity and unit from a raw string value, given a list of allowed
|
|
169
169
|
* units and otherwise falling back to the default unit.
|
|
170
170
|
*
|
|
171
|
-
* @param
|
|
172
|
-
* @param
|
|
171
|
+
* @param rawValue The raw value as a string (may or may not contain the unit)
|
|
172
|
+
* @param allowedUnits Units to derive from.
|
|
173
173
|
* @return The extracted quantity and unit. The quantity can be `undefined` in case the raw value
|
|
174
174
|
* could not be parsed to a number correctly. The unit can be `undefined` in case the unit parsed
|
|
175
175
|
* from the raw value could not be matched against the list of allowed units.
|
|
@@ -208,10 +208,10 @@ export function parseQuantityAndUnitFromRawValue(
|
|
|
208
208
|
* Parses quantity and unit from a raw value. Validates parsed value, using fallback
|
|
209
209
|
* value if invalid.
|
|
210
210
|
*
|
|
211
|
-
* @param
|
|
212
|
-
* @param
|
|
213
|
-
* @param
|
|
214
|
-
* @param
|
|
211
|
+
* @param rawValue The next value.
|
|
212
|
+
* @param allowedUnits Units to derive from.
|
|
213
|
+
* @param fallbackQuantity The fallback quantity, used in case it's not possible to parse a valid quantity from the raw value.
|
|
214
|
+
* @param fallbackUnit The fallback unit, used in case it's not possible to parse a valid unit from the raw value.
|
|
215
215
|
* @return The extracted quantity and unit. The quantity can be `undefined` in case the raw value
|
|
216
216
|
* could not be parsed to a number correctly, and the `fallbackQuantity` was also `undefined`. The
|
|
217
217
|
* unit can be `undefined` only if the unit parsed from the raw value could not be matched against
|
|
@@ -248,7 +248,7 @@ export function getValidParsedQuantityAndUnit(
|
|
|
248
248
|
* Takes a unit value and finds the matching accessibility label for the
|
|
249
249
|
* unit abbreviation.
|
|
250
250
|
*
|
|
251
|
-
* @param
|
|
251
|
+
* @param unit Unit value (example: `px`)
|
|
252
252
|
* @return a11y label for the unit abbreviation
|
|
253
253
|
*/
|
|
254
254
|
export function getAccessibleLabelForUnit( unit: string ): string | undefined {
|
|
@@ -259,8 +259,8 @@ export function getAccessibleLabelForUnit( unit: string ): string | undefined {
|
|
|
259
259
|
/**
|
|
260
260
|
* Filters available units based on values defined a list of allowed unit values.
|
|
261
261
|
*
|
|
262
|
-
* @param
|
|
263
|
-
* @param
|
|
262
|
+
* @param allowedUnitValues Collection of allowed unit value strings.
|
|
263
|
+
* @param availableUnits Collection of available unit objects.
|
|
264
264
|
* @return Filtered units.
|
|
265
265
|
*/
|
|
266
266
|
export function filterUnitsWithSettings(
|
|
@@ -282,10 +282,10 @@ export function filterUnitsWithSettings(
|
|
|
282
282
|
* TODO: ideally this hook shouldn't be needed
|
|
283
283
|
* https://github.com/WordPress/gutenberg/pull/31822#discussion_r633280823
|
|
284
284
|
*
|
|
285
|
-
* @param
|
|
286
|
-
* @param
|
|
287
|
-
* @param
|
|
288
|
-
* @param
|
|
285
|
+
* @param args An object containing units, settingPath & defaultUnits.
|
|
286
|
+
* @param args.units Collection of all potentially available units.
|
|
287
|
+
* @param args.availableUnits Collection of unit value strings for filtering available units.
|
|
288
|
+
* @param args.defaultValues Collection of default values for defined units. Example: `{ px: 350, em: 15 }`.
|
|
289
289
|
*
|
|
290
290
|
* @return Filtered list of units, with their default values updated following the `defaultValues`
|
|
291
291
|
* argument's property.
|
|
@@ -327,9 +327,9 @@ export const useCustomUnits = ( {
|
|
|
327
327
|
* accurately displayed in the UI, even if the intention is to hide
|
|
328
328
|
* the availability of that unit.
|
|
329
329
|
*
|
|
330
|
-
* @param
|
|
331
|
-
* @param
|
|
332
|
-
* @param
|
|
330
|
+
* @param rawValue Selected value to parse.
|
|
331
|
+
* @param legacyUnit Legacy unit value, if rawValue needs it appended.
|
|
332
|
+
* @param units List of available units.
|
|
333
333
|
*
|
|
334
334
|
* @return A collection of units containing the unit for the current value.
|
|
335
335
|
*/
|
package/src/utils/events.ts
CHANGED
|
@@ -4,8 +4,8 @@ type EventHandler< T extends Event > = ( event: T ) => void;
|
|
|
4
4
|
* Merges event handlers together.
|
|
5
5
|
*
|
|
6
6
|
* @template TEvent
|
|
7
|
-
* @param
|
|
8
|
-
* @param
|
|
7
|
+
* @param handler
|
|
8
|
+
* @param otherHandler
|
|
9
9
|
*/
|
|
10
10
|
function mergeEvent< TEvent extends Event >(
|
|
11
11
|
handler: EventHandler< TEvent >,
|
|
@@ -25,8 +25,8 @@ function mergeEvent< TEvent extends Event >(
|
|
|
25
25
|
* Merges two sets of event handlers together.
|
|
26
26
|
*
|
|
27
27
|
* @template TEvent
|
|
28
|
-
* @param
|
|
29
|
-
* @param
|
|
28
|
+
* @param handlers
|
|
29
|
+
* @param extraHandlers
|
|
30
30
|
*/
|
|
31
31
|
export function mergeEventHandlers<
|
|
32
32
|
TEvent extends Event,
|
|
@@ -11,8 +11,8 @@ import { isValueDefined, getDefinedValue } from '../values';
|
|
|
11
11
|
/**
|
|
12
12
|
* @template T
|
|
13
13
|
* @typedef Options
|
|
14
|
-
* @property {T
|
|
15
|
-
* @property {T | ""}
|
|
14
|
+
* @property {T} [initial] Initial value
|
|
15
|
+
* @property {T | ""} fallback Fallback value
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
/** @type {Readonly<{ initial: undefined, fallback: '' }>} */
|
|
@@ -12,10 +12,10 @@ type Props< T > = {
|
|
|
12
12
|
/**
|
|
13
13
|
* Simplified and improved implementation of useControlledState.
|
|
14
14
|
*
|
|
15
|
-
* @param
|
|
16
|
-
* @param
|
|
17
|
-
* @param
|
|
18
|
-
* @param
|
|
15
|
+
* @param props
|
|
16
|
+
* @param props.defaultValue
|
|
17
|
+
* @param props.value
|
|
18
|
+
* @param props.onChange
|
|
19
19
|
* @return The controlled value and the value setter.
|
|
20
20
|
*/
|
|
21
21
|
export function useControlledValue< T >( {
|
|
@@ -15,7 +15,7 @@ import { useIsomorphicLayoutEffect } from '@wordpress/compose';
|
|
|
15
15
|
*
|
|
16
16
|
* @see https://codesandbox.io/s/uselatestref-mlj3i?file=/src/App.tsx
|
|
17
17
|
*
|
|
18
|
-
* @param
|
|
18
|
+
* @param value The value to reference
|
|
19
19
|
* @return The prop reference.
|
|
20
20
|
*/
|
|
21
21
|
export function useLatestRef< T >( value: T ): RefObject< T > {
|
package/src/utils/unit-values.ts
CHANGED
|
@@ -4,7 +4,7 @@ const UNITED_VALUE_REGEX =
|
|
|
4
4
|
/**
|
|
5
5
|
* Parses a number and unit from a value.
|
|
6
6
|
*
|
|
7
|
-
* @param
|
|
7
|
+
* @param toParse Value to parse
|
|
8
8
|
*
|
|
9
9
|
* @return The extracted number and unit.
|
|
10
10
|
*/
|
|
@@ -27,8 +27,8 @@ export function parseCSSUnitValue(
|
|
|
27
27
|
/**
|
|
28
28
|
* Combines a value and a unit into a unit value.
|
|
29
29
|
*
|
|
30
|
-
* @param
|
|
31
|
-
* @param
|
|
30
|
+
* @param value
|
|
31
|
+
* @param unit
|
|
32
32
|
*
|
|
33
33
|
* @return The unit value.
|
|
34
34
|
*/
|
package/tsconfig.json
CHANGED
|
@@ -45,10 +45,7 @@
|
|
|
45
45
|
"src/**/stories/**/*.js", // only exclude js files, tsx files should be checked
|
|
46
46
|
"src/**/test/**/*.js", // only exclude js files, ts{x} files should be checked
|
|
47
47
|
"src/index.js",
|
|
48
|
-
"src/angle-picker-control",
|
|
49
48
|
"src/autocomplete",
|
|
50
|
-
"src/box-control",
|
|
51
|
-
"src/combobox-control",
|
|
52
49
|
"src/custom-gradient-picker",
|
|
53
50
|
"src/dimension-control",
|
|
54
51
|
"src/duotone-picker",
|
|
@@ -59,11 +56,8 @@
|
|
|
59
56
|
"src/higher-order/with-filters",
|
|
60
57
|
"src/higher-order/with-focus-return",
|
|
61
58
|
"src/higher-order/with-notices",
|
|
62
|
-
"src/menu-items-choice",
|
|
63
59
|
"src/navigation",
|
|
64
60
|
"src/palette-edit",
|
|
65
|
-
"src/panel"
|
|
66
|
-
"src/toolbar",
|
|
67
|
-
"src/tree-grid"
|
|
61
|
+
"src/panel/body.js"
|
|
68
62
|
]
|
|
69
63
|
}
|