@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,99 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* External dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type { useHover } from '@use-gesture/react';
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import type { UnitControlProps } from '../unit-control/types';
|
|
10
|
+
import type { LABELS } from './utils';
|
|
11
|
+
export declare type BoxControlValue = {
|
|
12
|
+
top?: string;
|
|
13
|
+
right?: string;
|
|
14
|
+
bottom?: string;
|
|
15
|
+
left?: string;
|
|
16
|
+
};
|
|
17
|
+
declare type UnitControlPassthroughProps = Omit<UnitControlProps, 'label' | 'onChange' | 'onFocus' | 'onMouseOver' | 'onMouseOut' | 'units'>;
|
|
18
|
+
export declare type BoxControlProps = Pick<UnitControlProps, 'onMouseOver' | 'onMouseOut' | 'units'> & {
|
|
19
|
+
/**
|
|
20
|
+
* If this property is true, a button to reset the box control is rendered.
|
|
21
|
+
*
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
allowReset?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* The id to use as a base for the unique HTML id attribute of the control.
|
|
27
|
+
*/
|
|
28
|
+
id?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Props for the internal `UnitControl` components.
|
|
31
|
+
*
|
|
32
|
+
* @default `{ min: 0 }`
|
|
33
|
+
*/
|
|
34
|
+
inputProps?: UnitControlPassthroughProps;
|
|
35
|
+
/**
|
|
36
|
+
* Heading label for the control.
|
|
37
|
+
*
|
|
38
|
+
* @default `__( 'Box Control' )`
|
|
39
|
+
*/
|
|
40
|
+
label?: string;
|
|
41
|
+
/**
|
|
42
|
+
* A callback function when an input value changes.
|
|
43
|
+
*/
|
|
44
|
+
onChange: (next: BoxControlValue) => void;
|
|
45
|
+
/**
|
|
46
|
+
* The `top`, `right`, `bottom`, and `left` box dimension values to use when the control is reset.
|
|
47
|
+
*
|
|
48
|
+
* @default `{ top: undefined, right: undefined, bottom: undefined, left: undefined }`
|
|
49
|
+
*/
|
|
50
|
+
resetValues?: BoxControlValue;
|
|
51
|
+
/**
|
|
52
|
+
* Collection of sides to allow control of. If omitted or empty, all sides will be available.
|
|
53
|
+
*/
|
|
54
|
+
sides?: readonly (keyof BoxControlValue | 'horizontal' | 'vertical')[];
|
|
55
|
+
/**
|
|
56
|
+
* If this property is true, when the box control is unlinked, vertical and horizontal controls
|
|
57
|
+
* can be used instead of updating individual sides.
|
|
58
|
+
*
|
|
59
|
+
* @default false
|
|
60
|
+
*/
|
|
61
|
+
splitOnAxis?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* The current values of the control, expressed as an object of `top`, `right`, `bottom`, and `left` values.
|
|
64
|
+
*/
|
|
65
|
+
values?: BoxControlValue;
|
|
66
|
+
};
|
|
67
|
+
export declare type BoxControlInputControlProps = UnitControlPassthroughProps & {
|
|
68
|
+
onChange?: (nextValues: BoxControlValue) => void;
|
|
69
|
+
onFocus?: (_event: React.FocusEvent<HTMLInputElement>, { side }: {
|
|
70
|
+
side: keyof typeof LABELS;
|
|
71
|
+
}) => void;
|
|
72
|
+
onHoverOff?: (sides: Partial<Record<keyof BoxControlValue, boolean>>) => void;
|
|
73
|
+
onHoverOn?: (sides: Partial<Record<keyof BoxControlValue, boolean>>) => void;
|
|
74
|
+
selectedUnits: BoxControlValue;
|
|
75
|
+
setSelectedUnits: React.Dispatch<React.SetStateAction<BoxControlValue>>;
|
|
76
|
+
sides: BoxControlProps['sides'];
|
|
77
|
+
values: BoxControlValue;
|
|
78
|
+
};
|
|
79
|
+
export declare type BoxUnitControlProps = UnitControlPassthroughProps & Pick<UnitControlProps, 'onChange' | 'onFocus'> & {
|
|
80
|
+
isFirst?: boolean;
|
|
81
|
+
isLast?: boolean;
|
|
82
|
+
isOnly?: boolean;
|
|
83
|
+
label?: string;
|
|
84
|
+
onHoverOff?: (event: ReturnType<typeof useHover>['event'], state: Omit<ReturnType<typeof useHover>, 'event'>) => void;
|
|
85
|
+
onHoverOn?: (event: ReturnType<typeof useHover>['event'], state: Omit<ReturnType<typeof useHover>, 'event'>) => void;
|
|
86
|
+
};
|
|
87
|
+
export declare type BoxControlIconProps = {
|
|
88
|
+
/**
|
|
89
|
+
* @default 24
|
|
90
|
+
*/
|
|
91
|
+
size?: number;
|
|
92
|
+
/**
|
|
93
|
+
* @default 'all'
|
|
94
|
+
*/
|
|
95
|
+
side?: keyof typeof LABELS;
|
|
96
|
+
sides?: BoxControlProps['sides'];
|
|
97
|
+
};
|
|
98
|
+
export {};
|
|
99
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/box-control/types.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEtC,oBAAY,eAAe,GAAG;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,aAAK,2BAA2B,GAAG,IAAI,CACtC,gBAAgB,EAChB,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,aAAa,GAAG,YAAY,GAAG,OAAO,CACzE,CAAC;AAEF,oBAAY,eAAe,GAAG,IAAI,CACjC,gBAAgB,EAChB,aAAa,GAAG,YAAY,GAAG,OAAO,CACtC,GAAG;IACH;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,UAAU,CAAC,EAAE,2BAA2B,CAAC;IACzC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,CAAE,IAAI,EAAE,eAAe,KAAM,IAAI,CAAC;IAC5C;;;;OAIG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAE,MAAM,eAAe,GAAG,YAAY,GAAG,UAAU,CAAE,EAAE,CAAC;IACzE;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;CACzB,CAAC;AAEF,oBAAY,2BAA2B,GAAG,2BAA2B,GAAG;IACvE,QAAQ,CAAC,EAAE,CAAE,UAAU,EAAE,eAAe,KAAM,IAAI,CAAC;IACnD,OAAO,CAAC,EAAE,CACT,MAAM,EAAE,KAAK,CAAC,UAAU,CAAE,gBAAgB,CAAE,EAC5C,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,MAAM,OAAO,MAAM,CAAA;KAAE,KACnC,IAAI,CAAC;IACV,UAAU,CAAC,EAAE,CACZ,KAAK,EAAE,OAAO,CAAE,MAAM,CAAE,MAAM,eAAe,EAAE,OAAO,CAAE,CAAE,KACtD,IAAI,CAAC;IACV,SAAS,CAAC,EAAE,CACX,KAAK,EAAE,OAAO,CAAE,MAAM,CAAE,MAAM,eAAe,EAAE,OAAO,CAAE,CAAE,KACtD,IAAI,CAAC;IACV,aAAa,EAAE,eAAe,CAAC;IAC/B,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAE,KAAK,CAAC,cAAc,CAAE,eAAe,CAAE,CAAE,CAAC;IAC5E,KAAK,EAAE,eAAe,CAAE,OAAO,CAAE,CAAC;IAClC,MAAM,EAAE,eAAe,CAAC;CACxB,CAAC;AAEF,oBAAY,mBAAmB,GAAG,2BAA2B,GAC5D,IAAI,CAAE,gBAAgB,EAAE,UAAU,GAAG,SAAS,CAAE,GAAG;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,CACZ,KAAK,EAAE,UAAU,CAAE,OAAO,QAAQ,CAAE,CAAE,OAAO,CAAE,EAC/C,KAAK,EAAE,IAAI,CAAE,UAAU,CAAE,OAAO,QAAQ,CAAE,EAAE,OAAO,CAAE,KACjD,IAAI,CAAC;IACV,SAAS,CAAC,EAAE,CACX,KAAK,EAAE,UAAU,CAAE,OAAO,QAAQ,CAAE,CAAE,OAAO,CAAE,EAC/C,KAAK,EAAE,IAAI,CAAE,UAAU,CAAE,OAAO,QAAQ,CAAE,EAAE,OAAO,CAAE,KACjD,IAAI,CAAC;CACV,CAAC;AAEH,oBAAY,mBAAmB,GAAG;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC;IAC3B,KAAK,CAAC,EAAE,eAAe,CAAE,OAAO,CAAE,CAAC;CACnC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { BoxUnitControlProps } from './types';
|
|
3
|
+
export default function BoxUnitControl({ isFirst, isLast, isOnly, onHoverOn, onHoverOff, label, value, ...props }: BoxUnitControlProps): JSX.Element;
|
|
4
|
+
//# sourceMappingURL=unit-control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unit-control.d.ts","sourceRoot":"","sources":["../../src/box-control/unit-control.tsx"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAInD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAE,EACvC,OAAO,EACP,MAAM,EACN,MAAM,EACN,SAAgB,EAChB,UAAiB,EACjB,KAAK,EACL,KAAK,EACL,GAAG,KAAK,EACR,EAAE,mBAAmB,eA0BrB"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { BoxControlProps, BoxControlValue } from './types';
|
|
2
|
+
export declare const LABELS: {
|
|
3
|
+
all: string;
|
|
4
|
+
top: string;
|
|
5
|
+
bottom: string;
|
|
6
|
+
left: string;
|
|
7
|
+
right: string;
|
|
8
|
+
mixed: string;
|
|
9
|
+
vertical: string;
|
|
10
|
+
horizontal: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const DEFAULT_VALUES: {
|
|
13
|
+
top: undefined;
|
|
14
|
+
right: undefined;
|
|
15
|
+
bottom: undefined;
|
|
16
|
+
left: undefined;
|
|
17
|
+
};
|
|
18
|
+
export declare const ALL_SIDES: readonly ["top", "right", "bottom", "left"];
|
|
19
|
+
/**
|
|
20
|
+
* Gets the 'all' input value and unit from values data.
|
|
21
|
+
*
|
|
22
|
+
* @param values Box values.
|
|
23
|
+
* @param selectedUnits Box units.
|
|
24
|
+
* @param availableSides Available box sides to evaluate.
|
|
25
|
+
*
|
|
26
|
+
* @return A value + unit for the 'all' input.
|
|
27
|
+
*/
|
|
28
|
+
export declare function getAllValue(values?: BoxControlValue, selectedUnits?: BoxControlValue, availableSides?: BoxControlProps['sides']): string;
|
|
29
|
+
/**
|
|
30
|
+
* Determine the most common unit selection to use as a fallback option.
|
|
31
|
+
*
|
|
32
|
+
* @param selectedUnits Current unit selections for individual sides.
|
|
33
|
+
* @return Most common unit selection.
|
|
34
|
+
*/
|
|
35
|
+
export declare function getAllUnitFallback(selectedUnits?: BoxControlValue): string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Checks to determine if values are mixed.
|
|
38
|
+
*
|
|
39
|
+
* @param values Box values.
|
|
40
|
+
* @param selectedUnits Box units.
|
|
41
|
+
* @param sides Available box sides to evaluate.
|
|
42
|
+
*
|
|
43
|
+
* @return Whether values are mixed.
|
|
44
|
+
*/
|
|
45
|
+
export declare function isValuesMixed(values?: BoxControlValue, selectedUnits?: BoxControlValue, sides?: BoxControlProps['sides']): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Checks to determine if values are defined.
|
|
48
|
+
*
|
|
49
|
+
* @param values Box values.
|
|
50
|
+
*
|
|
51
|
+
* @return Whether values are mixed.
|
|
52
|
+
*/
|
|
53
|
+
export declare function isValuesDefined(values?: BoxControlValue): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Get initial selected side, factoring in whether the sides are linked,
|
|
56
|
+
* and whether the vertical / horizontal directions are grouped via splitOnAxis.
|
|
57
|
+
*
|
|
58
|
+
* @param isLinked Whether the box control's fields are linked.
|
|
59
|
+
* @param splitOnAxis Whether splitting by horizontal or vertical axis.
|
|
60
|
+
* @return The initial side.
|
|
61
|
+
*/
|
|
62
|
+
export declare function getInitialSide(isLinked: boolean, splitOnAxis: boolean): "top" | "all" | "vertical";
|
|
63
|
+
/**
|
|
64
|
+
* Normalizes provided sides configuration to an array containing only top,
|
|
65
|
+
* right, bottom and left. This essentially just maps `horizontal` or `vertical`
|
|
66
|
+
* to their appropriate sides to facilitate correctly determining value for
|
|
67
|
+
* all input control.
|
|
68
|
+
*
|
|
69
|
+
* @param sides Available sides for box control.
|
|
70
|
+
* @return Normalized sides configuration.
|
|
71
|
+
*/
|
|
72
|
+
export declare function normalizeSides(sides: BoxControlProps['sides']): readonly ["top", "right", "bottom", "left"] | (keyof BoxControlValue)[];
|
|
73
|
+
/**
|
|
74
|
+
* Applies a value to an object representing top, right, bottom and left sides
|
|
75
|
+
* while taking into account any custom side configuration.
|
|
76
|
+
*
|
|
77
|
+
* @param currentValues The current values for each side.
|
|
78
|
+
* @param newValue The value to apply to the sides object.
|
|
79
|
+
* @param sides Array defining valid sides.
|
|
80
|
+
*
|
|
81
|
+
* @return Object containing the updated values for each side.
|
|
82
|
+
*/
|
|
83
|
+
export declare function applyValueToSides(currentValues: BoxControlValue, newValue?: string, sides?: BoxControlProps['sides']): BoxControlValue;
|
|
84
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/box-control/utils.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAEhE,eAAO,MAAM,MAAM;;;;;;;;;CASlB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;CAK1B,CAAC;AAEF,eAAO,MAAM,SAAS,6CAAgD,CAAC;AAmBvE;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAC1B,MAAM,GAAE,eAAoB,EAC5B,aAAa,CAAC,EAAE,eAAe,EAC/B,cAAc,GAAE,eAAe,CAAE,OAAO,CAAc,UAuCtD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAE,aAAa,CAAC,EAAE,eAAe,sBAQlE;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC5B,MAAM,GAAE,eAAoB,EAC5B,aAAa,CAAC,EAAE,eAAe,EAC/B,KAAK,GAAE,eAAe,CAAE,OAAO,CAAc,WAM7C;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAE,MAAM,CAAC,EAAE,eAAe,WAUxD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,8BAQtE;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAE,KAAK,EAAE,eAAe,CAAE,OAAO,CAAE,2EAiBhE;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAChC,aAAa,EAAE,eAAe,EAC9B,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,eAAe,CAAE,OAAO,CAAE,GAChC,eAAe,CAoBjB"}
|
|
@@ -31,14 +31,16 @@ export declare const ColorPalette: import("react").ForwardRefExoticComponent<Pic
|
|
|
31
31
|
onChange: (newColor?: string | undefined, index?: number | undefined) => void;
|
|
32
32
|
value?: string | undefined;
|
|
33
33
|
actions?: import("react").ReactNode;
|
|
34
|
+
headingLevel?: import("../heading/types").HeadingSize | undefined;
|
|
34
35
|
}, "onChange"> & {
|
|
35
36
|
clearable?: boolean | undefined;
|
|
36
37
|
colors?: ColorObject[] | PaletteObject[] | undefined;
|
|
37
38
|
disableCustomColors?: boolean | undefined;
|
|
38
39
|
enableAlpha?: boolean | undefined;
|
|
40
|
+
headingLevel?: import("../heading/types").HeadingSize | undefined;
|
|
39
41
|
value?: string | undefined;
|
|
40
42
|
__experimentalIsRenderedInSidebar?: boolean | undefined;
|
|
41
|
-
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "onChange" | "value" | "children" | "as" | "colors" | "enableAlpha" | "__experimentalIsRenderedInSidebar" | "clearable" | "disableCustomColors"> & {
|
|
43
|
+
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "onChange" | "value" | "children" | "as" | "headingLevel" | "colors" | "enableAlpha" | "__experimentalIsRenderedInSidebar" | "clearable" | "disableCustomColors"> & {
|
|
42
44
|
as?: keyof JSX.IntrinsicElements | undefined;
|
|
43
45
|
} & import("react").RefAttributes<any>>;
|
|
44
46
|
export default ColorPalette;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/color-palette/index.tsx"],"names":[],"mappings":";AAyBA,OAAO,KAAK,EACX,WAAW,EAEX,8BAA8B,EAE9B,aAAa,EAEb,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/color-palette/index.tsx"],"names":[],"mappings":";AAyBA,OAAO,KAAK,EACX,WAAW,EAEX,8BAA8B,EAE9B,aAAa,EAEb,MAAM,SAAS,CAAC;AA6GjB,wBAAgB,yBAAyB,CAAE,EAC1C,mBAAmB,EACnB,YAAY,EAAE,oBAAoB,EAClC,GAAG,KAAK,EACR,EAAE,8BAA8B,eA4BhC;AA6ID;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;uCAAwC,CAAC;AAElE,eAAe,YAAY,CAAC"}
|
|
@@ -12,14 +12,16 @@ export declare const Default: ComponentStory<import("react").ForwardRefExoticCom
|
|
|
12
12
|
onChange: (newColor?: string | undefined, index?: number | undefined) => void;
|
|
13
13
|
value?: string | undefined;
|
|
14
14
|
actions?: import("react").ReactNode;
|
|
15
|
+
headingLevel?: import("../../heading/types").HeadingSize | undefined;
|
|
15
16
|
}, "onChange"> & {
|
|
16
17
|
clearable?: boolean | undefined;
|
|
17
18
|
colors?: import("../types").ColorObject[] | import("../types").PaletteObject[] | undefined;
|
|
18
19
|
disableCustomColors?: boolean | undefined;
|
|
19
20
|
enableAlpha?: boolean | undefined;
|
|
21
|
+
headingLevel?: import("../../heading/types").HeadingSize | undefined;
|
|
20
22
|
value?: string | undefined;
|
|
21
23
|
__experimentalIsRenderedInSidebar?: boolean | undefined;
|
|
22
|
-
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "onChange" | "value" | "children" | "as" | "colors" | "enableAlpha" | "__experimentalIsRenderedInSidebar" | "clearable" | "disableCustomColors"> & {
|
|
24
|
+
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "onChange" | "value" | "children" | "as" | "headingLevel" | "colors" | "enableAlpha" | "__experimentalIsRenderedInSidebar" | "clearable" | "disableCustomColors"> & {
|
|
23
25
|
as?: keyof JSX.IntrinsicElements | undefined;
|
|
24
26
|
} & import("react").RefAttributes<any>>>;
|
|
25
27
|
export declare const MultipleOrigins: ComponentStory<import("react").ForwardRefExoticComponent<Pick<{
|
|
@@ -28,14 +30,16 @@ export declare const MultipleOrigins: ComponentStory<import("react").ForwardRefE
|
|
|
28
30
|
onChange: (newColor?: string | undefined, index?: number | undefined) => void;
|
|
29
31
|
value?: string | undefined;
|
|
30
32
|
actions?: import("react").ReactNode;
|
|
33
|
+
headingLevel?: import("../../heading/types").HeadingSize | undefined;
|
|
31
34
|
}, "onChange"> & {
|
|
32
35
|
clearable?: boolean | undefined;
|
|
33
36
|
colors?: import("../types").ColorObject[] | import("../types").PaletteObject[] | undefined;
|
|
34
37
|
disableCustomColors?: boolean | undefined;
|
|
35
38
|
enableAlpha?: boolean | undefined;
|
|
39
|
+
headingLevel?: import("../../heading/types").HeadingSize | undefined;
|
|
36
40
|
value?: string | undefined;
|
|
37
41
|
__experimentalIsRenderedInSidebar?: boolean | undefined;
|
|
38
|
-
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "onChange" | "value" | "children" | "as" | "colors" | "enableAlpha" | "__experimentalIsRenderedInSidebar" | "clearable" | "disableCustomColors"> & {
|
|
42
|
+
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "onChange" | "value" | "children" | "as" | "headingLevel" | "colors" | "enableAlpha" | "__experimentalIsRenderedInSidebar" | "clearable" | "disableCustomColors"> & {
|
|
39
43
|
as?: keyof JSX.IntrinsicElements | undefined;
|
|
40
44
|
} & import("react").RefAttributes<any>>>;
|
|
41
45
|
export declare const CSSVariables: ComponentStory<typeof ColorPalette>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/color-palette/stories/index.tsx"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOtE;;GAEG;AACH,OAAO,YAAY,MAAM,IAAI,CAAC;AAI9B,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,YAAY,CAY7C,CAAC;AACF,eAAe,IAAI,CAAC;AAwBpB,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/color-palette/stories/index.tsx"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOtE;;GAEG;AACH,OAAO,YAAY,MAAM,IAAI,CAAC;AAI9B,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,YAAY,CAY7C,CAAC;AACF,eAAe,IAAI,CAAC;AAwBpB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;wCAAsB,CAAC;AAS3C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;wCAAsB,CAAC;AAsBnD,eAAO,MAAM,YAAY,EAAE,cAAc,CAAE,OAAO,YAAY,CAc7D,CAAC"}
|
|
@@ -6,6 +6,7 @@ import type { CSSProperties, ReactNode } from 'react';
|
|
|
6
6
|
* Internal dependencies
|
|
7
7
|
*/
|
|
8
8
|
import type { DropdownProps } from '../dropdown/types';
|
|
9
|
+
import type { HeadingSize } from '../heading/types';
|
|
9
10
|
export declare type ColorObject = {
|
|
10
11
|
name: string;
|
|
11
12
|
color: NonNullable<CSSProperties['color']>;
|
|
@@ -23,6 +24,7 @@ declare type PaletteProps = {
|
|
|
23
24
|
onChange: (newColor?: string, index?: number) => void;
|
|
24
25
|
value?: string;
|
|
25
26
|
actions?: ReactNode;
|
|
27
|
+
headingLevel?: HeadingSize;
|
|
26
28
|
};
|
|
27
29
|
export declare type SinglePaletteProps = PaletteProps & {
|
|
28
30
|
colors: ColorObject[];
|
|
@@ -62,6 +64,12 @@ export declare type ColorPaletteProps = Pick<PaletteProps, 'onChange'> & {
|
|
|
62
64
|
* @default false
|
|
63
65
|
*/
|
|
64
66
|
enableAlpha?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* The heading level.
|
|
69
|
+
*
|
|
70
|
+
* @default 2
|
|
71
|
+
*/
|
|
72
|
+
headingLevel?: HeadingSize;
|
|
65
73
|
/**
|
|
66
74
|
* Currently active value.
|
|
67
75
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/color-palette/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/color-palette/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,oBAAY,WAAW,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,CAAE,aAAa,CAAE,OAAO,CAAE,CAAE,CAAC;CAC/C,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,EAAE,CAAC;CACtB,CAAC;AAEF,aAAK,YAAY,GAAG;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,CAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAM,IAAI,CAAC;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,WAAW,CAAC;CAC3B,CAAC;AAEF,oBAAY,kBAAkB,GAAG,YAAY,GAAG;IAC/C,MAAM,EAAE,WAAW,EAAE,CAAC;CACtB,CAAC;AAEF,oBAAY,qBAAqB,GAAG,YAAY,GAAG;IAClD,MAAM,EAAE,aAAa,EAAE,CAAC;CACxB,CAAC;AAEF,oBAAY,8BAA8B,GAAG,aAAa,GAAG;IAC5D,mBAAmB,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,oBAAY,iBAAiB,GAAG,IAAI,CAAE,YAAY,EAAE,UAAU,CAAE,GAAG;IAClE;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,aAAa,EAAE,GAAG,WAAW,EAAE,CAAC;IACzC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,iCAAiC,CAAC,EAAE,OAAO,CAAC;CAC5C,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComboboxControlProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* `ComboboxControl` is an enhanced version of a [`SelectControl`](../select-control/README.md) with the addition of
|
|
5
|
+
* being able to search for options using a search input.
|
|
6
|
+
*
|
|
7
|
+
* ```jsx
|
|
8
|
+
* import { ComboboxControl } from '@wordpress/components';
|
|
9
|
+
* import { useState } from '@wordpress/element';
|
|
10
|
+
*
|
|
11
|
+
* const options = [
|
|
12
|
+
* {
|
|
13
|
+
* value: 'small',
|
|
14
|
+
* label: 'Small',
|
|
15
|
+
* },
|
|
16
|
+
* {
|
|
17
|
+
* value: 'normal',
|
|
18
|
+
* label: 'Normal',
|
|
19
|
+
* },
|
|
20
|
+
* {
|
|
21
|
+
* value: 'large',
|
|
22
|
+
* label: 'Large',
|
|
23
|
+
* },
|
|
24
|
+
* ];
|
|
25
|
+
*
|
|
26
|
+
* function MyComboboxControl() {
|
|
27
|
+
* const [ fontSize, setFontSize ] = useState();
|
|
28
|
+
* const [ filteredOptions, setFilteredOptions ] = useState( options );
|
|
29
|
+
* return (
|
|
30
|
+
* <ComboboxControl
|
|
31
|
+
* label="Font Size"
|
|
32
|
+
* value={ fontSize }
|
|
33
|
+
* onChange={ setFontSize }
|
|
34
|
+
* options={ filteredOptions }
|
|
35
|
+
* onFilterValueChange={ ( inputValue ) =>
|
|
36
|
+
* setFilteredOptions(
|
|
37
|
+
* options.filter( ( option ) =>
|
|
38
|
+
* option.label
|
|
39
|
+
* .toLowerCase()
|
|
40
|
+
* .startsWith( inputValue.toLowerCase() )
|
|
41
|
+
* )
|
|
42
|
+
* )
|
|
43
|
+
* }
|
|
44
|
+
* />
|
|
45
|
+
* );
|
|
46
|
+
* }
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
declare function ComboboxControl({ __nextHasNoMarginBottom, __next36pxDefaultSize, value: valueProp, label, options, onChange: onChangeProp, onFilterValueChange, hideLabelFromVision, help, allowReset, className, messages, __experimentalRenderItem, }: ComboboxControlProps): JSX.Element;
|
|
50
|
+
export default ComboboxControl;
|
|
51
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/combobox-control/index.tsx"],"names":[],"mappings":";AAgCA,OAAO,KAAK,EAAyB,oBAAoB,EAAE,MAAM,SAAS,CAAC;AA4B3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,iBAAS,eAAe,CAAE,EACzB,uBAA+B,EAC/B,qBAA6B,EAC7B,KAAK,EAAE,SAAS,EAChB,KAAK,EACL,OAAO,EACP,QAAQ,EAAE,YAAY,EACtB,mBAA0B,EAC1B,mBAAmB,EACnB,IAAI,EACJ,UAAiB,EACjB,SAAS,EACT,QAEC,EACD,wBAAwB,GACxB,EAAE,oBAAoB,eA4PtB;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import ComboboxControl from '..';
|
|
9
|
+
declare const meta: ComponentMeta<typeof ComboboxControl>;
|
|
10
|
+
export default meta;
|
|
11
|
+
export declare const Default: ComponentStory<typeof ComboboxControl>;
|
|
12
|
+
/**
|
|
13
|
+
* The rendered output of each suggestion can be customized by passing a
|
|
14
|
+
* render function to the `__experimentalRenderItem` prop. (This is still an experimental feature
|
|
15
|
+
* and is subject to change.)
|
|
16
|
+
*/
|
|
17
|
+
export declare const WithCustomRenderItem: ComponentStory<typeof ComboboxControl>;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/combobox-control/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOtE;;GAEG;AACH,OAAO,eAAe,MAAM,IAAI,CAAC;AAWjC,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,eAAe,CAWhD,CAAC;AACF,eAAe,IAAI,CAAC;AA6BpB,eAAO,MAAM,OAAO,wCAAsB,CAAC;AAQ3C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,wCAAsB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComboboxControlProps } from './types';
|
|
3
|
+
export declare const InputWrapperFlex: import("@emotion/styled").StyledComponent<import("../flex/types").FlexProps & import("react").RefAttributes<any> & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "as" | keyof import("../flex/types").FlexProps | keyof import("react").RefAttributes<any>> & {
|
|
4
|
+
as?: keyof JSX.IntrinsicElements | undefined;
|
|
5
|
+
} & {
|
|
6
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
7
|
+
} & Pick<ComboboxControlProps, "__next36pxDefaultSize">, {}, {}>;
|
|
8
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/combobox-control/styles.ts"],"names":[],"mappings":";AAWA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAYpD,eAAO,MAAM,gBAAgB;;;;gEAM5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/combobox-control/test/index.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Internal dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type { BaseControlProps } from '../base-control/types';
|
|
6
|
+
export declare type ComboboxControlOption = {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
};
|
|
11
|
+
export declare type ComboboxControlProps = Pick<BaseControlProps, '__nextHasNoMarginBottom' | 'className' | 'label' | 'hideLabelFromVision' | 'help'> & {
|
|
12
|
+
/**
|
|
13
|
+
* Custom renderer invoked for each option in the suggestion list.
|
|
14
|
+
* The render prop receives as its argument an object containing, under the `item` key,
|
|
15
|
+
* the single option's data (directly from the array of data passed to the `options` prop).
|
|
16
|
+
*/
|
|
17
|
+
__experimentalRenderItem?: (args: {
|
|
18
|
+
item: ComboboxControlOption;
|
|
19
|
+
}) => React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Start opting into the larger default height that will become the default size in a future version.
|
|
22
|
+
*
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
__next36pxDefaultSize?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Show a reset button to clear the input.
|
|
28
|
+
*
|
|
29
|
+
* @default true
|
|
30
|
+
*/
|
|
31
|
+
allowReset?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Customizable UI messages.
|
|
34
|
+
*/
|
|
35
|
+
messages?: {
|
|
36
|
+
/**
|
|
37
|
+
* The message to announce to screen readers when a suggestion is selected.
|
|
38
|
+
*
|
|
39
|
+
* @default `__( 'Item selected.' )`
|
|
40
|
+
*/
|
|
41
|
+
selected: string;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Function called with the selected value changes.
|
|
45
|
+
*/
|
|
46
|
+
onChange?: (value: ComboboxControlProps['value']) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Function called when the control's search input value changes. The argument contains the next input value.
|
|
49
|
+
*
|
|
50
|
+
* @default noop
|
|
51
|
+
*/
|
|
52
|
+
onFilterValueChange?: (value: string) => void;
|
|
53
|
+
/**
|
|
54
|
+
* The options that can be chosen from.
|
|
55
|
+
*/
|
|
56
|
+
options: ComboboxControlOption[];
|
|
57
|
+
/**
|
|
58
|
+
* The current value of the control.
|
|
59
|
+
*/
|
|
60
|
+
value?: string | null;
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/combobox-control/types.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,oBAAY,qBAAqB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,CAAE,GAAG,EAAE,MAAM,GAAI,GAAG,CAAC;CACrB,CAAC;AAEF,oBAAY,oBAAoB,GAAG,IAAI,CACtC,gBAAgB,EACd,yBAAyB,GACzB,WAAW,GACX,OAAO,GACP,qBAAqB,GACrB,MAAM,CACR,GAAG;IACH;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,CAAE,IAAI,EAAE;QAClC,IAAI,EAAE,qBAAqB,CAAC;KAC5B,KAAM,KAAK,CAAC,SAAS,CAAC;IACvB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE;QACV;;;;WAIG;QACH,QAAQ,EAAE,MAAM,CAAC;KACjB,CAAC;IACF;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAE,KAAK,EAAE,oBAAoB,CAAE,OAAO,CAAE,KAAM,IAAI,CAAC;IAC9D;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IAChD;;OAEG;IACH,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Like date-fn's toDate, but tries to guess the format when a string is
|
|
3
3
|
* given.
|
|
4
4
|
*
|
|
5
|
-
* @param
|
|
5
|
+
* @param input Value to turn into a date.
|
|
6
6
|
*/
|
|
7
7
|
export declare function inputToDate(input: Date | string | number): Date;
|
|
8
8
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -20,7 +20,7 @@ export declare const StyledUnitControl: import("@emotion/styled").StyledComponen
|
|
|
20
20
|
value?: string | number | undefined;
|
|
21
21
|
onBlur?: import("react").FocusEventHandler<HTMLInputElement | HTMLSelectElement> | undefined;
|
|
22
22
|
onFocus?: import("react").FocusEventHandler<HTMLInputElement | HTMLSelectElement> | undefined;
|
|
23
|
-
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "defaultValue" | "onChange" | "value" | "name" | "color" | "height" | "translate" | "width" | "hidden" | "size" | "style" | "help" | "multiple" | "disabled" | "key" | "children" | "form" | "label" | "slot" | "title" | "pattern" | "as" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "__next36pxDefaultSize" | "__unstableInputWidth" | "hideLabelFromVision" | "labelPosition" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "max" | "maxLength" | "min" | "minLength" | "readOnly" | "required" | "src" | "step" | "dragDirection" | "dragThreshold" | "isDragEnabled" | "isPressEnterToChange" | "onValidate" | "__unstableStateReducer" | "
|
|
23
|
+
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "defaultValue" | "onChange" | "value" | "name" | "color" | "height" | "translate" | "width" | "hidden" | "size" | "style" | "help" | "multiple" | "disabled" | "key" | "children" | "form" | "label" | "slot" | "title" | "pattern" | "as" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "__next36pxDefaultSize" | "__unstableInputWidth" | "hideLabelFromVision" | "labelPosition" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "max" | "maxLength" | "min" | "minLength" | "readOnly" | "required" | "src" | "step" | "dragDirection" | "dragThreshold" | "isDragEnabled" | "isPressEnterToChange" | "onValidate" | "__unstableStateReducer" | "hideHTMLArrows" | "isShiftStepEnabled" | "shiftStep" | "disableUnits" | "unit" | "isUnitSelectTabbable" | "units" | "isResetValueOnUnitChange" | "onUnitChange"> & import("react").RefAttributes<any> & {
|
|
24
24
|
theme?: import("@emotion/react").Theme | undefined;
|
|
25
25
|
}, {}, {}>;
|
|
26
26
|
export declare const ControlWrapper: import("@emotion/styled").StyledComponent<import("../../flex/types").FlexProps & import("react").RefAttributes<any> & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "as" | keyof import("../../flex/types").FlexProps | keyof import("react").RefAttributes<any>> & {
|
|
@@ -5,21 +5,21 @@ export declare const INITIAL_BOUNDS: {
|
|
|
5
5
|
/**
|
|
6
6
|
* Gets the extension of a file name.
|
|
7
7
|
*
|
|
8
|
-
* @param
|
|
8
|
+
* @param filename The file name.
|
|
9
9
|
* @return The extension of the file name.
|
|
10
10
|
*/
|
|
11
11
|
export declare function getExtension(filename?: string): string;
|
|
12
12
|
/**
|
|
13
13
|
* Checks if a file is a video.
|
|
14
14
|
*
|
|
15
|
-
* @param
|
|
15
|
+
* @param filename The file name.
|
|
16
16
|
* @return Whether the file is a video.
|
|
17
17
|
*/
|
|
18
18
|
export declare function isVideoType(filename?: string): boolean;
|
|
19
19
|
/**
|
|
20
20
|
* Transforms a fraction value to a percentage value.
|
|
21
21
|
*
|
|
22
|
-
* @param
|
|
22
|
+
* @param fraction The fraction value.
|
|
23
23
|
* @return A percentage value.
|
|
24
24
|
*/
|
|
25
25
|
export declare function fractionToPercentage(fraction: number): number;
|
|
@@ -6,7 +6,7 @@ import type { FontSizePickerProps, FontSize } from './types';
|
|
|
6
6
|
* Some themes use css vars for their font sizes, so until we
|
|
7
7
|
* have the way of calculating them don't display them.
|
|
8
8
|
*
|
|
9
|
-
* @param
|
|
9
|
+
* @param value The value that is checked.
|
|
10
10
|
* @return Whether the value is a simple css value.
|
|
11
11
|
*/
|
|
12
12
|
export declare function isSimpleCssValue(value: NonNullable<FontSizePickerProps['value']>): boolean;
|
|
@@ -14,7 +14,7 @@ export declare function isSimpleCssValue(value: NonNullable<FontSizePickerProps[
|
|
|
14
14
|
* If all of the given font sizes have the same unit (e.g. 'px'), return that
|
|
15
15
|
* unit. Otherwise return null.
|
|
16
16
|
*
|
|
17
|
-
* @param
|
|
17
|
+
* @param fontSizes List of font sizes.
|
|
18
18
|
* @return The common unit, or null.
|
|
19
19
|
*/
|
|
20
20
|
export declare function getCommonSizeUnit(fontSizes: FontSize[]): string | null | undefined;
|
|
@@ -18,9 +18,9 @@ import type { InputChangeCallback } from '../types';
|
|
|
18
18
|
* This technique uses the "stateReducer" design pattern:
|
|
19
19
|
* https://kentcdodds.com/blog/the-state-reducer-pattern/
|
|
20
20
|
*
|
|
21
|
-
* @param
|
|
22
|
-
* @param
|
|
23
|
-
* @param
|
|
21
|
+
* @param stateReducer An external state reducer.
|
|
22
|
+
* @param initialState The initial state for the reducer.
|
|
23
|
+
* @param onChangeHandler A handler for the onChange event.
|
|
24
24
|
* @return State, dispatch, and a collection of actions.
|
|
25
25
|
*/
|
|
26
26
|
export declare function useInputControlStateReducer(stateReducer: StateReducer<{}> | undefined, initialState: Partial<InputState> | undefined, onChangeHandler: InputChangeCallback): {
|
|
@@ -9,7 +9,7 @@ import type { InputChangeCallback } from './types';
|
|
|
9
9
|
/**
|
|
10
10
|
* Gets a CSS cursor value based on a drag direction.
|
|
11
11
|
*
|
|
12
|
-
* @param
|
|
12
|
+
* @param dragDirection The drag direction.
|
|
13
13
|
* @return The CSS cursor value.
|
|
14
14
|
*/
|
|
15
15
|
export declare function getDragCursor(dragDirection: string): string;
|