@wordpress/components 23.1.0 → 23.3.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 +53 -0
- package/CONTRIBUTING.md +1 -1
- package/LICENSE.md +1 -1
- package/build/alignment-matrix-control/utils.js +2 -2
- package/build/alignment-matrix-control/utils.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.js +1 -3
- package/build/autocomplete/autocompleter-ui.js.map +1 -1
- package/build/border-box-control/border-box-control-linked-button/component.js.map +1 -1
- package/build/border-box-control/border-box-control-linked-button/hook.js.map +1 -1
- package/build/border-control/border-control-dropdown/component.js +8 -4
- package/build/border-control/border-control-dropdown/component.js.map +1 -1
- package/build/button/deprecated.js +8 -6
- package/build/button/deprecated.js.map +1 -1
- package/build/button/index.js +52 -23
- package/build/button/index.js.map +1 -1
- package/build/button/types.js +6 -0
- package/build/button/types.js.map +1 -0
- package/build/color-list-picker/index.js.map +1 -1
- package/build/color-list-picker/types.js +6 -0
- package/build/color-list-picker/types.js.map +1 -0
- package/build/color-palette/index.js +9 -61
- package/build/color-palette/index.js.map +1 -1
- package/build/color-palette/index.native.js +24 -9
- package/build/color-palette/index.native.js.map +1 -1
- package/build/color-palette/utils.js +103 -0
- package/build/color-palette/utils.js.map +1 -0
- package/build/color-picker/component.js +1 -0
- package/build/color-picker/component.js.map +1 -1
- package/build/color-picker/styles.js +8 -10
- package/build/color-picker/styles.js.map +1 -1
- package/build/combobox-control/index.js +5 -1
- package/build/combobox-control/index.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/utils.js +1 -1
- package/build/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
- package/build/date-time/date/index.js.map +1 -1
- package/build/dropdown/index.js +20 -8
- package/build/dropdown/index.js.map +1 -1
- package/build/focal-point-picker/utils.js +1 -1
- package/build/focal-point-picker/utils.js.map +1 -1
- package/build/form-token-field/token.js +1 -1
- package/build/form-token-field/token.js.map +1 -1
- package/build/gradient-picker/index.js +9 -1
- package/build/gradient-picker/index.js.map +1 -1
- package/build/h-stack/component.js +0 -1
- package/build/h-stack/component.js.map +1 -1
- package/build/index.js +7 -17
- package/build/index.js.map +1 -1
- package/build/index.native.js +8 -18
- package/build/index.native.js.map +1 -1
- package/build/input-control/input-field.js +4 -2
- package/build/input-control/input-field.js.map +1 -1
- package/build/item-group/item/component.js +27 -3
- package/build/item-group/item/component.js.map +1 -1
- package/build/item-group/item-group/component.js +26 -3
- package/build/item-group/item-group/component.js.map +1 -1
- package/build/item-group/styles.js +14 -14
- package/build/item-group/styles.js.map +1 -1
- package/build/keyboard-shortcuts/index.js +44 -16
- package/build/keyboard-shortcuts/index.js.map +1 -1
- package/build/keyboard-shortcuts/types.js +6 -0
- package/build/keyboard-shortcuts/types.js.map +1 -0
- package/build/modal/index.js +1 -1
- package/build/modal/index.js.map +1 -1
- package/build/notice/index.js +16 -18
- package/build/notice/index.js.map +1 -1
- package/build/notice/list.js +23 -8
- package/build/notice/list.js.map +1 -1
- package/build/notice/types.js +6 -0
- package/build/notice/types.js.map +1 -0
- package/build/number-control/index.js +1 -1
- package/build/number-control/index.js.map +1 -1
- package/build/panel/row.js +5 -3
- package/build/panel/row.js.map +1 -1
- package/build/query-controls/author-select.js +7 -3
- package/build/query-controls/author-select.js.map +1 -1
- package/build/query-controls/category-select.js +7 -3
- package/build/query-controls/category-select.js.map +1 -1
- package/build/query-controls/index.js +69 -20
- package/build/query-controls/index.js.map +1 -1
- package/build/query-controls/terms.js +4 -3
- package/build/query-controls/terms.js.map +1 -1
- package/build/query-controls/types.js +6 -0
- package/build/query-controls/types.js.map +1 -0
- package/build/resizable-box/index.js +5 -4
- package/build/resizable-box/index.js.map +1 -1
- package/build/responsive-wrapper/index.js +18 -1
- package/build/responsive-wrapper/index.js.map +1 -1
- package/build/responsive-wrapper/types.js +6 -0
- package/build/responsive-wrapper/types.js.map +1 -0
- package/build/sandbox/index.js +35 -24
- package/build/sandbox/index.js.map +1 -1
- package/build/sandbox/types.js +6 -0
- package/build/sandbox/types.js.map +1 -0
- package/build/slot-fill/bubbles-virtually/fill.js +1 -0
- package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build/slot-fill/slot.js +1 -0
- package/build/slot-fill/slot.js.map +1 -1
- package/build/slot-fill/use-slot.js +1 -11
- package/build/slot-fill/use-slot.js.map +1 -1
- package/build/snackbar/index.js.map +1 -1
- package/build/snackbar/list.js.map +1 -1
- package/build/tab-panel/index.js +40 -7
- package/build/tab-panel/index.js.map +1 -1
- package/build/toolbar/index.js +42 -60
- package/build/toolbar/index.js.map +1 -1
- package/build/toolbar/toolbar/index.js +74 -0
- package/build/toolbar/toolbar/index.js.map +1 -0
- package/build/toolbar/{toolbar-container.js → toolbar/toolbar-container.js} +0 -0
- package/build/toolbar/toolbar/toolbar-container.js.map +1 -0
- package/build/toolbar/{toolbar-container.native.js → toolbar/toolbar-container.native.js} +0 -0
- package/build/toolbar/toolbar/toolbar-container.native.js.map +1 -0
- package/build/{toolbar-button → toolbar/toolbar-button}/index.js +1 -1
- package/build/toolbar/toolbar-button/index.js.map +1 -0
- package/build/{toolbar-button → toolbar/toolbar-button}/toolbar-button-container.js +0 -0
- package/build/toolbar/toolbar-button/toolbar-button-container.js.map +1 -0
- package/build/{toolbar-button → toolbar/toolbar-button}/toolbar-button-container.native.js +0 -0
- package/build/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -0
- package/build/{toolbar-context → toolbar/toolbar-context}/index.js +0 -0
- package/build/toolbar/toolbar-context/index.js.map +1 -0
- package/build/{toolbar-dropdown-menu → toolbar/toolbar-dropdown-menu}/index.js +1 -1
- package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -0
- package/build/{toolbar-group → toolbar/toolbar-group}/index.js +0 -0
- package/build/toolbar/toolbar-group/index.js.map +1 -0
- package/build/{toolbar-group → toolbar/toolbar-group}/toolbar-group-collapsed.js +1 -1
- package/build/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -0
- package/build/{toolbar-group → toolbar/toolbar-group}/toolbar-group-collapsed.native.js +1 -1
- package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -0
- package/build/{toolbar-group → toolbar/toolbar-group}/toolbar-group-container.js +0 -0
- package/build/toolbar/toolbar-group/toolbar-group-container.js.map +1 -0
- package/build/{toolbar-group → toolbar/toolbar-group}/toolbar-group-container.native.js +0 -0
- package/build/toolbar/toolbar-group/toolbar-group-container.native.js.map +1 -0
- package/build/{toolbar-item → toolbar/toolbar-item}/index.js +0 -0
- package/build/toolbar/toolbar-item/index.js.map +1 -0
- package/build/{toolbar-item → toolbar/toolbar-item}/index.native.js +0 -0
- package/build/toolbar/toolbar-item/index.native.js.map +1 -0
- package/build/tree-grid/index.js +4 -4
- package/build/tree-grid/index.js.map +1 -1
- package/build/tree-select/index.js +2 -6
- package/build/tree-select/index.js.map +1 -1
- package/build-module/alignment-matrix-control/utils.js +2 -2
- package/build-module/alignment-matrix-control/utils.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.js +1 -2
- package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
- package/build-module/border-box-control/border-box-control-linked-button/component.js.map +1 -1
- package/build-module/border-box-control/border-box-control-linked-button/hook.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/component.js +7 -4
- package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
- package/build-module/button/deprecated.js +8 -5
- package/build-module/button/deprecated.js.map +1 -1
- package/build-module/button/index.js +51 -22
- package/build-module/button/index.js.map +1 -1
- package/build-module/button/types.js +2 -0
- package/build-module/button/types.js.map +1 -0
- package/build-module/color-list-picker/index.js.map +1 -1
- package/build-module/color-list-picker/types.js +2 -0
- package/build-module/color-list-picker/types.js.map +1 -0
- package/build-module/color-palette/index.js +7 -54
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/color-palette/index.native.js +24 -8
- package/build-module/color-palette/index.native.js.map +1 -1
- package/build-module/color-palette/utils.js +79 -0
- package/build-module/color-palette/utils.js.map +1 -0
- package/build-module/color-picker/component.js +1 -0
- package/build-module/color-picker/component.js.map +1 -1
- package/build-module/color-picker/styles.js +8 -9
- package/build-module/color-picker/styles.js.map +1 -1
- package/build-module/combobox-control/index.js +5 -1
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/utils.js +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
- package/build-module/date-time/date/index.js +1 -1
- package/build-module/date-time/date/index.js.map +1 -1
- package/build-module/dropdown/index.js +19 -8
- package/build-module/dropdown/index.js.map +1 -1
- package/build-module/focal-point-picker/utils.js +1 -1
- package/build-module/focal-point-picker/utils.js.map +1 -1
- package/build-module/form-token-field/token.js +1 -1
- package/build-module/form-token-field/token.js.map +1 -1
- package/build-module/gradient-picker/index.js +9 -2
- package/build-module/gradient-picker/index.js.map +1 -1
- package/build-module/h-stack/component.js +0 -1
- package/build-module/h-stack/component.js.map +1 -1
- package/build-module/index.js +1 -6
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +1 -6
- package/build-module/index.native.js.map +1 -1
- package/build-module/input-control/input-field.js +4 -2
- package/build-module/input-control/input-field.js.map +1 -1
- package/build-module/item-group/item/component.js +26 -2
- package/build-module/item-group/item/component.js.map +1 -1
- package/build-module/item-group/item-group/component.js +25 -2
- package/build-module/item-group/item-group/component.js.map +1 -1
- package/build-module/item-group/styles.js +14 -14
- package/build-module/item-group/styles.js.map +1 -1
- package/build-module/keyboard-shortcuts/index.js +48 -16
- package/build-module/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/keyboard-shortcuts/types.js +2 -0
- package/build-module/keyboard-shortcuts/types.js.map +1 -0
- package/build-module/modal/index.js +1 -1
- package/build-module/modal/index.js.map +1 -1
- package/build-module/notice/index.js +14 -15
- package/build-module/notice/index.js.map +1 -1
- package/build-module/notice/list.js +23 -8
- package/build-module/notice/list.js.map +1 -1
- package/build-module/notice/types.js +2 -0
- package/build-module/notice/types.js.map +1 -0
- package/build-module/number-control/index.js +1 -1
- package/build-module/number-control/index.js.map +1 -1
- package/build-module/panel/row.js +5 -3
- package/build-module/panel/row.js.map +1 -1
- package/build-module/query-controls/author-select.js +7 -3
- package/build-module/query-controls/author-select.js.map +1 -1
- package/build-module/query-controls/category-select.js +8 -4
- package/build-module/query-controls/category-select.js.map +1 -1
- package/build-module/query-controls/index.js +65 -20
- package/build-module/query-controls/index.js.map +1 -1
- package/build-module/query-controls/terms.js +8 -4
- package/build-module/query-controls/terms.js.map +1 -1
- package/build-module/query-controls/types.js +2 -0
- package/build-module/query-controls/types.js.map +1 -0
- package/build-module/resizable-box/index.js +3 -2
- package/build-module/resizable-box/index.js.map +1 -1
- package/build-module/responsive-wrapper/index.js +20 -1
- package/build-module/responsive-wrapper/index.js.map +1 -1
- package/build-module/responsive-wrapper/types.js +2 -0
- package/build-module/responsive-wrapper/types.js.map +1 -0
- package/build-module/sandbox/index.js +37 -23
- package/build-module/sandbox/index.js.map +1 -1
- package/build-module/sandbox/types.js +2 -0
- package/build-module/sandbox/types.js.map +1 -0
- package/build-module/slot-fill/bubbles-virtually/fill.js +1 -0
- package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build-module/slot-fill/slot.js +1 -0
- package/build-module/slot-fill/slot.js.map +1 -1
- package/build-module/slot-fill/use-slot.js +2 -12
- package/build-module/slot-fill/use-slot.js.map +1 -1
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/snackbar/list.js.map +1 -1
- package/build-module/tab-panel/index.js +40 -7
- package/build-module/tab-panel/index.js.map +1 -1
- package/build-module/toolbar/index.js +6 -58
- package/build-module/toolbar/index.js.map +1 -1
- package/build-module/toolbar/toolbar/index.js +59 -0
- package/build-module/toolbar/toolbar/index.js.map +1 -0
- package/build-module/toolbar/{toolbar-container.js → toolbar/toolbar-container.js} +0 -0
- package/{build → build-module/toolbar}/toolbar/toolbar-container.js.map +1 -1
- package/build-module/toolbar/{toolbar-container.native.js → toolbar/toolbar-container.native.js} +0 -0
- package/build-module/toolbar/toolbar/toolbar-container.native.js.map +1 -0
- package/build-module/{toolbar-button → toolbar/toolbar-button}/index.js +1 -1
- package/build-module/toolbar/toolbar-button/index.js.map +1 -0
- package/build-module/{toolbar-button → toolbar/toolbar-button}/toolbar-button-container.js +0 -0
- package/build-module/toolbar/toolbar-button/toolbar-button-container.js.map +1 -0
- package/build-module/{toolbar-button → toolbar/toolbar-button}/toolbar-button-container.native.js +0 -0
- package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -0
- package/build-module/{toolbar-context → toolbar/toolbar-context}/index.js +0 -0
- package/build-module/toolbar/toolbar-context/index.js.map +1 -0
- package/build-module/{toolbar-dropdown-menu → toolbar/toolbar-dropdown-menu}/index.js +1 -1
- package/build-module/toolbar/toolbar-dropdown-menu/index.js.map +1 -0
- package/build-module/{toolbar-group → toolbar/toolbar-group}/index.js +0 -0
- package/build-module/toolbar/toolbar-group/index.js.map +1 -0
- package/build-module/{toolbar-group → toolbar/toolbar-group}/toolbar-group-collapsed.js +1 -1
- package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -0
- package/build-module/{toolbar-group → toolbar/toolbar-group}/toolbar-group-collapsed.native.js +1 -1
- package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -0
- package/build-module/{toolbar-group → toolbar/toolbar-group}/toolbar-group-container.js +0 -0
- package/build-module/toolbar/toolbar-group/toolbar-group-container.js.map +1 -0
- package/build-module/{toolbar-group → toolbar/toolbar-group}/toolbar-group-container.native.js +0 -0
- package/build-module/toolbar/toolbar-group/toolbar-group-container.native.js.map +1 -0
- package/build-module/{toolbar-item → toolbar/toolbar-item}/index.js +0 -0
- package/build-module/toolbar/toolbar-item/index.js.map +1 -0
- package/build-module/{toolbar-item → toolbar/toolbar-item}/index.native.js +0 -0
- package/build-module/toolbar/toolbar-item/index.native.js.map +1 -0
- package/build-module/tree-grid/index.js +4 -4
- package/build-module/tree-grid/index.js.map +1 -1
- package/build-module/tree-select/index.js +2 -6
- package/build-module/tree-select/index.js.map +1 -1
- package/build-style/style-rtl.css +6 -1
- package/build-style/style.css +6 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts +1 -1
- package/build-types/border-box-control/border-box-control-linked-button/component.d.ts +1 -1
- package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +171 -160
- package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +1 -1
- package/build-types/border-control/border-control/hook.d.ts +1 -1
- package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
- package/build-types/border-control/border-control-dropdown/hook.d.ts +1 -1
- package/build-types/button/deprecated.d.ts +143 -7
- package/build-types/button/deprecated.d.ts.map +1 -1
- package/build-types/button/index.d.ts +20 -3
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/button/stories/index.d.ts +20 -0
- package/build-types/button/stories/index.d.ts.map +1 -0
- package/build-types/button/test/index.d.ts +2 -0
- package/build-types/button/test/index.d.ts.map +1 -0
- package/build-types/button/types.d.ts +134 -0
- package/build-types/button/types.d.ts.map +1 -0
- package/build-types/color-list-picker/index.d.ts +5 -0
- package/build-types/color-list-picker/index.d.ts.map +1 -0
- package/build-types/color-list-picker/types.d.ts +42 -0
- package/build-types/color-list-picker/types.d.ts.map +1 -0
- package/build-types/color-palette/index.d.ts +2 -4
- package/build-types/color-palette/index.d.ts.map +1 -1
- package/build-types/color-palette/stories/index.d.ts +2 -2
- package/build-types/color-palette/styles.d.ts +1 -1
- package/build-types/color-palette/types.d.ts +1 -1
- package/build-types/color-palette/types.d.ts.map +1 -1
- package/build-types/color-palette/utils.d.ts +14 -0
- package/build-types/color-palette/utils.d.ts.map +1 -0
- package/build-types/color-picker/component.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +2 -2
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/dashicon/types.d.ts +0 -4
- package/build-types/dashicon/types.d.ts.map +1 -1
- package/build-types/date-time/date/index.d.ts.map +1 -1
- package/build-types/date-time/date/styles.d.ts +3 -3
- package/build-types/dropdown/index.d.ts +4 -4
- package/build-types/dropdown/index.d.ts.map +1 -1
- package/build-types/dropdown/stories/index.d.ts.map +1 -1
- package/build-types/dropdown/types.d.ts +9 -10
- package/build-types/dropdown/types.d.ts.map +1 -1
- package/build-types/focal-point-picker/utils.d.ts.map +1 -1
- package/build-types/font-size-picker/styles.d.ts +2 -2
- package/build-types/h-stack/component.d.ts +0 -1
- package/build-types/h-stack/component.d.ts.map +1 -1
- package/build-types/input-control/input-field.d.ts.map +1 -1
- package/build-types/item-group/item/component.d.ts +24 -2
- package/build-types/item-group/item/component.d.ts.map +1 -1
- package/build-types/item-group/item-group/component.d.ts +23 -2
- package/build-types/item-group/item-group/component.d.ts.map +1 -1
- package/build-types/item-group/stories/index.d.ts +15 -0
- package/build-types/item-group/stories/index.d.ts.map +1 -0
- package/build-types/item-group/styles.d.ts.map +1 -1
- package/build-types/keyboard-shortcuts/index.d.ts +38 -0
- package/build-types/keyboard-shortcuts/index.d.ts.map +1 -0
- package/build-types/keyboard-shortcuts/stories/index.d.ts +12 -0
- package/build-types/keyboard-shortcuts/stories/index.d.ts.map +1 -0
- package/build-types/keyboard-shortcuts/test/index.d.ts +2 -0
- package/build-types/keyboard-shortcuts/test/index.d.ts.map +1 -0
- package/build-types/keyboard-shortcuts/types.d.ts +48 -0
- package/build-types/keyboard-shortcuts/types.d.ts.map +1 -0
- package/build-types/modal/index.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/component.d.ts +1 -1
- package/build-types/navigator/navigator-back-button/hook.d.ts +2 -2
- package/build-types/navigator/navigator-button/component.d.ts +1 -1
- package/build-types/navigator/navigator-button/hook.d.ts +2 -2
- package/build-types/notice/index.d.ts +16 -0
- package/build-types/notice/index.d.ts.map +1 -0
- package/build-types/notice/list.d.ts +32 -0
- package/build-types/notice/list.d.ts.map +1 -0
- package/build-types/notice/stories/index.d.ts +17 -0
- package/build-types/notice/stories/index.d.ts.map +1 -0
- package/build-types/notice/test/index.d.ts +2 -0
- package/build-types/notice/test/index.d.ts.map +1 -0
- package/build-types/notice/test/list.d.ts +2 -0
- package/build-types/notice/test/list.d.ts.map +1 -0
- package/build-types/notice/types.d.ts +128 -0
- package/build-types/notice/types.d.ts.map +1 -0
- package/build-types/number-control/styles/number-control-styles.d.ts +2 -2
- package/build-types/number-control/styles/number-control-styles.d.ts.map +1 -1
- package/build-types/placeholder/stories/index.d.ts.map +1 -1
- package/build-types/query-controls/author-select.d.ts +4 -0
- package/build-types/query-controls/author-select.d.ts.map +1 -0
- package/build-types/query-controls/category-select.d.ts +4 -0
- package/build-types/query-controls/category-select.d.ts.map +1 -0
- package/build-types/query-controls/index.d.ts +30 -0
- package/build-types/query-controls/index.d.ts.map +1 -0
- package/build-types/query-controls/stories/index.d.ts +13 -0
- package/build-types/query-controls/stories/index.d.ts.map +1 -0
- package/build-types/query-controls/terms.d.ts +13 -0
- package/build-types/query-controls/terms.d.ts.map +1 -0
- package/build-types/query-controls/test/terms.d.ts +2 -0
- package/build-types/query-controls/test/terms.d.ts.map +1 -0
- package/build-types/query-controls/types.d.ts +131 -0
- package/build-types/query-controls/types.d.ts.map +1 -0
- package/build-types/range-control/index.d.ts +1 -1
- package/build-types/resizable-box/index.d.ts +6 -7
- package/build-types/resizable-box/index.d.ts.map +1 -1
- package/build-types/resizable-box/stories/index.d.ts +61 -0
- package/build-types/resizable-box/stories/index.d.ts.map +1 -0
- package/build-types/responsive-wrapper/index.d.ts +24 -0
- package/build-types/responsive-wrapper/index.d.ts.map +1 -0
- package/build-types/responsive-wrapper/stories/index.d.ts +12 -0
- package/build-types/responsive-wrapper/stories/index.d.ts.map +1 -0
- package/build-types/responsive-wrapper/types.d.ts +22 -0
- package/build-types/responsive-wrapper/types.d.ts.map +1 -0
- package/build-types/sandbox/index.d.ts +19 -0
- package/build-types/sandbox/index.d.ts.map +1 -0
- package/build-types/sandbox/stories/index.d.ts +12 -0
- package/build-types/sandbox/stories/index.d.ts.map +1 -0
- package/build-types/sandbox/test/index.d.ts +2 -0
- package/build-types/sandbox/test/index.d.ts.map +1 -0
- package/build-types/sandbox/types.d.ts +36 -0
- package/build-types/sandbox/types.d.ts.map +1 -0
- package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
- package/build-types/slot-fill/use-slot.d.ts.map +1 -1
- package/build-types/snackbar/index.d.ts +9 -2
- package/build-types/snackbar/index.d.ts.map +1 -1
- package/build-types/snackbar/list.d.ts.map +1 -1
- package/build-types/snackbar/types.d.ts +15 -88
- package/build-types/snackbar/types.d.ts.map +1 -1
- package/build-types/tab-panel/index.d.ts.map +1 -1
- package/build-types/tab-panel/stories/index.d.ts +1 -0
- package/build-types/tab-panel/stories/index.d.ts.map +1 -1
- package/build-types/tab-panel/types.d.ts +11 -5
- package/build-types/tab-panel/types.d.ts.map +1 -1
- package/build-types/toggle-group-control/stories/index.d.ts.map +1 -1
- package/build-types/tree-select/index.d.ts.map +1 -1
- package/build-types/ui/form-group/form-group.d.ts +2 -2
- package/package.json +18 -17
- package/src/alignment-matrix-control/utils.tsx +2 -2
- package/src/autocomplete/autocompleter-ui.js +1 -2
- package/src/autocomplete/test/index.js +1 -5
- package/src/border-box-control/border-box-control-linked-button/component.tsx +1 -1
- package/src/border-box-control/border-box-control-linked-button/hook.ts +1 -1
- package/src/border-control/border-control-dropdown/component.tsx +9 -8
- package/src/box-control/test/index.js +11 -35
- package/src/button/README.md +49 -55
- package/src/button/{deprecated.js → deprecated.tsx} +19 -4
- package/src/button/{index.js → index.tsx} +95 -34
- package/src/button/stories/index.tsx +106 -0
- package/src/button/style.scss +3 -2
- package/src/button/test/{index.js → index.tsx} +30 -7
- package/src/button/types.ts +138 -0
- package/src/checkbox-control/test/index.tsx +1 -5
- package/src/color-list-picker/{index.js → index.tsx} +3 -2
- package/src/color-list-picker/types.ts +46 -0
- package/src/color-palette/README.md +1 -1
- package/src/color-palette/index.native.js +11 -4
- package/src/color-palette/index.tsx +11 -67
- package/src/color-palette/test/index.tsx +4 -14
- package/src/color-palette/test/utils.ts +1 -1
- package/src/color-palette/types.ts +1 -1
- package/src/color-palette/utils.ts +98 -0
- package/src/color-picker/component.tsx +1 -0
- package/src/color-picker/stories/index.js +20 -60
- package/src/color-picker/styles.ts +0 -5
- package/src/color-picker/test/index.js +6 -15
- package/src/combobox-control/index.js +9 -1
- package/src/combobox-control/test/index.js +1 -6
- package/src/confirm-dialog/test/index.js +9 -29
- package/src/custom-gradient-picker/gradient-bar/utils.js +1 -1
- package/src/dashicon/types.ts +0 -6
- package/src/date-time/date/index.tsx +2 -1
- package/src/date-time/date/test/index.tsx +2 -8
- package/src/date-time/time/test/index.tsx +9 -29
- package/src/dimension-control/test/index.test.js +2 -8
- package/src/disabled/test/index.tsx +1 -5
- package/src/draggable/test/index.native.js +4 -4
- package/src/dropdown/README.md +1 -8
- package/src/dropdown/index.tsx +17 -6
- package/src/dropdown/stories/index.tsx +3 -3
- package/src/dropdown/test/index.tsx +2 -8
- package/src/dropdown/types.ts +9 -10
- package/src/dropdown-menu/README.md +1 -1
- package/src/dropdown-menu/stories/index.js +96 -27
- package/src/dropdown-menu/test/index.js +2 -8
- package/src/external-link/test/index.tsx +1 -6
- package/src/focal-point-picker/stories/index.tsx +1 -1
- package/src/focal-point-picker/test/index.js +3 -11
- package/src/focal-point-picker/utils.ts +4 -1
- package/src/font-size-picker/test/index.tsx +14 -44
- package/src/form-file-upload/test/index.tsx +2 -17
- package/src/form-toggle/test/index.tsx +1 -5
- package/src/form-token-field/test/index.tsx +80 -163
- package/src/form-token-field/token.tsx +1 -1
- package/src/gradient-picker/index.js +15 -4
- package/src/guide/stories/index.js +14 -41
- package/src/guide/test/index.js +5 -17
- package/src/h-stack/component.tsx +0 -1
- package/src/higher-order/with-filters/test/index.js +24 -24
- package/src/higher-order/with-focus-outside/test/index.js +11 -25
- package/src/higher-order/with-focus-return/test/index.js +1 -5
- package/src/index.js +8 -6
- package/src/index.native.js +8 -6
- package/src/input-control/input-field.tsx +3 -1
- package/src/input-control/test/index.js +1 -6
- package/src/isolated-event-container/test/index.js +2 -8
- package/src/item-group/item/component.tsx +26 -2
- package/src/item-group/item-group/component.tsx +25 -2
- package/src/item-group/stories/index.tsx +103 -0
- package/src/item-group/styles.ts +1 -0
- package/src/item-group/test/__snapshots__/index.js.snap +11 -10
- package/src/keyboard-shortcuts/README.md +1 -1
- package/src/keyboard-shortcuts/index.tsx +93 -0
- package/src/keyboard-shortcuts/stories/index.tsx +60 -0
- package/src/keyboard-shortcuts/test/{index.js → index.tsx} +16 -6
- package/src/keyboard-shortcuts/types.ts +51 -0
- package/src/modal/index.tsx +1 -2
- package/src/navigable-container/test/navigable-menu.js +5 -17
- package/src/navigable-container/test/tababble-container.js +3 -11
- package/src/navigation/test/index.js +3 -11
- package/src/navigator/test/index.tsx +6 -20
- package/src/notice/README.md +89 -42
- package/src/notice/{index.js → index.tsx} +28 -20
- package/src/notice/list.tsx +72 -0
- package/src/notice/stories/index.tsx +119 -0
- package/src/notice/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
- package/src/notice/test/{index.js → index.tsx} +7 -4
- package/src/notice/test/{list.js → list.tsx} +0 -0
- package/src/notice/types.ts +136 -0
- package/src/number-control/index.tsx +1 -1
- package/src/number-control/test/index.tsx +28 -86
- package/src/panel/row.js +3 -3
- package/src/panel/stories/index.js +62 -80
- package/src/panel/test/body.js +2 -8
- package/src/placeholder/stories/index.tsx +1 -0
- package/src/placeholder/style.scss +1 -1
- package/src/query-controls/README.md +56 -56
- package/src/query-controls/author-select.tsx +37 -0
- package/src/query-controls/category-select.tsx +46 -0
- package/src/query-controls/index.tsx +192 -0
- package/src/query-controls/stories/index.tsx +205 -0
- package/src/query-controls/terms.ts +57 -0
- package/src/query-controls/test/{terms.js → terms.ts} +36 -20
- package/src/query-controls/types.ts +150 -0
- package/src/resizable-box/README.md +2 -2
- package/src/resizable-box/index.tsx +7 -6
- package/src/resizable-box/stories/index.tsx +92 -0
- package/src/responsive-wrapper/README.md +29 -0
- package/src/responsive-wrapper/{index.js → index.tsx} +23 -2
- package/src/responsive-wrapper/stories/index.tsx +38 -0
- package/src/responsive-wrapper/types.ts +20 -0
- package/src/sandbox/README.md +45 -2
- package/src/sandbox/{index.js → index.tsx} +47 -24
- package/src/sandbox/stories/index.tsx +32 -0
- package/src/sandbox/test/{index.js → index.tsx} +9 -4
- package/src/sandbox/types.ts +34 -0
- package/src/select-control/test/select-control.tsx +1 -6
- package/src/slot-fill/bubbles-virtually/fill.js +1 -0
- package/src/slot-fill/slot.js +1 -1
- package/src/slot-fill/stories/index.js +12 -17
- package/src/slot-fill/use-slot.js +6 -16
- package/src/snackbar/index.tsx +6 -5
- package/src/snackbar/list.tsx +4 -2
- package/src/snackbar/types.ts +18 -92
- package/src/style.scss +3 -3
- package/src/tab-panel/README.md +1 -0
- package/src/tab-panel/index.tsx +42 -6
- package/src/tab-panel/stories/index.tsx +20 -0
- package/src/tab-panel/style.scss +8 -0
- package/src/tab-panel/test/index.tsx +124 -7
- package/src/tab-panel/types.ts +11 -5
- package/src/theme/test/index.tsx +4 -4
- package/src/toggle-group-control/stories/index.tsx +1 -0
- package/src/toggle-group-control/test/index.tsx +7 -23
- package/src/toolbar/index.js +6 -52
- package/src/toolbar/stories/index.js +71 -75
- package/src/toolbar/test/index.js +1 -2
- package/src/{toolbar-group/test/index.js → toolbar/test/toolbar-group.js} +1 -1
- package/src/toolbar/{README.md → toolbar/README.md} +0 -0
- package/src/toolbar/toolbar/index.js +52 -0
- package/src/toolbar/{style.native.scss → toolbar/style.native.scss} +0 -0
- package/src/toolbar/{style.scss → toolbar/style.scss} +0 -0
- package/src/toolbar/{toolbar-container.js → toolbar/toolbar-container.js} +0 -0
- package/src/toolbar/{toolbar-container.native.js → toolbar/toolbar-container.native.js} +0 -0
- package/src/{toolbar-button → toolbar/toolbar-button}/README.md +0 -0
- package/src/{toolbar-button → toolbar/toolbar-button}/index.js +1 -1
- package/src/{toolbar-button → toolbar/toolbar-button}/style.scss +0 -0
- package/src/{toolbar-button → toolbar/toolbar-button}/toolbar-button-container.js +0 -0
- package/src/{toolbar-button → toolbar/toolbar-button}/toolbar-button-container.native.js +0 -0
- package/src/{toolbar-context → toolbar/toolbar-context}/index.js +0 -0
- package/src/{toolbar-dropdown-menu → toolbar/toolbar-dropdown-menu}/README.md +0 -0
- package/src/{toolbar-dropdown-menu → toolbar/toolbar-dropdown-menu}/index.js +1 -1
- package/src/{toolbar-group → toolbar/toolbar-group}/README.md +0 -0
- package/src/{toolbar-group → toolbar/toolbar-group}/index.js +0 -0
- package/src/{toolbar-group → toolbar/toolbar-group}/style.native.scss +0 -0
- package/src/{toolbar-group → toolbar/toolbar-group}/style.scss +0 -0
- package/src/{toolbar-group → toolbar/toolbar-group}/toolbar-group-collapsed.js +1 -1
- package/src/{toolbar-group → toolbar/toolbar-group}/toolbar-group-collapsed.native.js +1 -1
- package/src/{toolbar-group → toolbar/toolbar-group}/toolbar-group-container.js +0 -0
- package/src/{toolbar-group → toolbar/toolbar-group}/toolbar-group-container.native.js +0 -0
- package/src/{toolbar-item → toolbar/toolbar-item}/README.md +0 -0
- package/src/{toolbar-item → toolbar/toolbar-item}/index.js +0 -0
- package/src/{toolbar-item → toolbar/toolbar-item}/index.native.js +0 -0
- package/src/tools-panel/stories/index.js +3 -0
- package/src/tools-panel/test/index.js +1 -1
- package/src/tree-grid/index.js +3 -5
- package/src/tree-select/index.tsx +3 -6
- package/src/ui/context/test/context-connect.tsx +2 -0
- package/src/ui/context/test/wordpress-component.tsx +2 -0
- package/src/unit-control/test/index.tsx +21 -74
- package/src/utils/hooks/test/use-latest-ref.js +15 -18
- package/tsconfig.json +1 -11
- package/tsconfig.tsbuildinfo +1 -1
- package/build/toolbar/toolbar-container.native.js.map +0 -1
- package/build/toolbar-button/index.js.map +0 -1
- package/build/toolbar-button/toolbar-button-container.js.map +0 -1
- package/build/toolbar-button/toolbar-button-container.native.js.map +0 -1
- package/build/toolbar-context/index.js.map +0 -1
- package/build/toolbar-dropdown-menu/index.js.map +0 -1
- package/build/toolbar-group/index.js.map +0 -1
- package/build/toolbar-group/toolbar-group-collapsed.js.map +0 -1
- package/build/toolbar-group/toolbar-group-collapsed.native.js.map +0 -1
- package/build/toolbar-group/toolbar-group-container.js.map +0 -1
- package/build/toolbar-group/toolbar-group-container.native.js.map +0 -1
- package/build/toolbar-item/index.js.map +0 -1
- package/build/toolbar-item/index.native.js.map +0 -1
- package/build-module/toolbar/toolbar-container.js.map +0 -1
- package/build-module/toolbar/toolbar-container.native.js.map +0 -1
- package/build-module/toolbar-button/index.js.map +0 -1
- package/build-module/toolbar-button/toolbar-button-container.js.map +0 -1
- package/build-module/toolbar-button/toolbar-button-container.native.js.map +0 -1
- package/build-module/toolbar-context/index.js.map +0 -1
- package/build-module/toolbar-dropdown-menu/index.js.map +0 -1
- package/build-module/toolbar-group/index.js.map +0 -1
- package/build-module/toolbar-group/toolbar-group-collapsed.js.map +0 -1
- package/build-module/toolbar-group/toolbar-group-collapsed.native.js.map +0 -1
- package/build-module/toolbar-group/toolbar-group-container.js.map +0 -1
- package/build-module/toolbar-group/toolbar-group-container.native.js.map +0 -1
- package/build-module/toolbar-item/index.js.map +0 -1
- package/build-module/toolbar-item/index.native.js.map +0 -1
- package/src/button/stories/index.js +0 -179
- package/src/item-group/stories/index.js +0 -270
- package/src/keyboard-shortcuts/index.js +0 -56
- package/src/notice/list.js +0 -48
- package/src/notice/stories/index.js +0 -74
- package/src/query-controls/author-select.js +0 -23
- package/src/query-controls/category-select.js +0 -31
- package/src/query-controls/index.js +0 -121
- package/src/query-controls/terms.js +0 -40
- package/src/resizable-box/stories/index.js +0 -97
- package/src/toolbar-button/stories/index.js +0 -33
- package/src/toolbar-group/stories/index.js +0 -33
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { MouseEventHandler, ReactNode } from 'react';
|
|
5
|
+
declare type CommonNoticeActionProps = {
|
|
6
|
+
label: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
noDefaultClasses?: boolean;
|
|
9
|
+
variant?: 'primary' | 'secondary' | 'link';
|
|
10
|
+
};
|
|
11
|
+
declare type NoticeActionWithURL = CommonNoticeActionProps & {
|
|
12
|
+
url: string;
|
|
13
|
+
onClick?: never;
|
|
14
|
+
};
|
|
15
|
+
declare type NoticeActionWithOnClick = CommonNoticeActionProps & {
|
|
16
|
+
url?: never;
|
|
17
|
+
onClick: MouseEventHandler<HTMLButtonElement>;
|
|
18
|
+
};
|
|
19
|
+
export declare type NoticeAction = NoticeActionWithURL | NoticeActionWithOnClick;
|
|
20
|
+
export declare type NoticeChildren = string | JSX.Element;
|
|
21
|
+
export declare type NoticeProps = {
|
|
22
|
+
/**
|
|
23
|
+
* A CSS `class` to give to the wrapper element.
|
|
24
|
+
*/
|
|
25
|
+
className?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The displayed message of a notice. Also used as the spoken message for
|
|
28
|
+
* assistive technology, unless `spokenMessage` is provided as an alternative message.
|
|
29
|
+
*/
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* Used to provide a custom spoken message in place of the `children` default.
|
|
33
|
+
*
|
|
34
|
+
* @default `children`
|
|
35
|
+
*/
|
|
36
|
+
spokenMessage?: ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Determines the color of the notice: `warning` (yellow),
|
|
39
|
+
* `success` (green), `error` (red), or `'info'`.
|
|
40
|
+
* By default `'info'` will be blue, but if there is a parent Theme component
|
|
41
|
+
* with an accent color prop, the notice will take on that color instead.
|
|
42
|
+
*
|
|
43
|
+
* @default 'info'
|
|
44
|
+
*/
|
|
45
|
+
status?: 'warning' | 'success' | 'error' | 'info';
|
|
46
|
+
/**
|
|
47
|
+
* Function called when dismissing the notice
|
|
48
|
+
*
|
|
49
|
+
* @default noop
|
|
50
|
+
*/
|
|
51
|
+
onRemove?: () => void;
|
|
52
|
+
/**
|
|
53
|
+
* A politeness level for the notice's spoken message. Should be provided as
|
|
54
|
+
* one of the valid options for an `aria-live` attribute value.
|
|
55
|
+
*
|
|
56
|
+
* A value of `'assertive'` is to be used for important, and usually
|
|
57
|
+
* time-sensitive, information. It will interrupt anything else the screen
|
|
58
|
+
* reader is announcing in that moment.
|
|
59
|
+
* A value of `'polite'` is to be used for advisory information. It should
|
|
60
|
+
* not interrupt what the screen reader is announcing in that moment
|
|
61
|
+
* (the "speech queue") or interrupt the current task.
|
|
62
|
+
*
|
|
63
|
+
* Note that this value should be considered a suggestion; assistive
|
|
64
|
+
* technologies may override it based on internal heuristics.
|
|
65
|
+
*
|
|
66
|
+
* @see https://www.w3.org/TR/wai-aria-1.1/#aria-live
|
|
67
|
+
*
|
|
68
|
+
* @default 'assertive' for 'error' status, 'polite' for all other statuses
|
|
69
|
+
*/
|
|
70
|
+
politeness?: 'polite' | 'assertive';
|
|
71
|
+
/**
|
|
72
|
+
* Whether the notice should be dismissible or not
|
|
73
|
+
*
|
|
74
|
+
* @default true
|
|
75
|
+
*/
|
|
76
|
+
isDismissible?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* A deprecated alternative to `onRemove`. This prop is kept for
|
|
79
|
+
* compatibilty reasons but should be avoided.
|
|
80
|
+
*
|
|
81
|
+
* @default noop
|
|
82
|
+
*/
|
|
83
|
+
onDismiss?: () => void;
|
|
84
|
+
/**
|
|
85
|
+
* An array of action objects. Each member object should contain:
|
|
86
|
+
*
|
|
87
|
+
* - `label`: `string` containing the text of the button/link
|
|
88
|
+
* - `url`: `string` OR `onClick`: `( event: SyntheticEvent ) => void` to specify
|
|
89
|
+
* what the action does.
|
|
90
|
+
* - `className`: `string` (optional) to add custom classes to the button styles.
|
|
91
|
+
* - `noDefaultClasses`: `boolean` (optional) A value of `true` will remove all
|
|
92
|
+
* default styling.
|
|
93
|
+
* - `variant`: `'primary' | 'secondary' | 'link'` (optional) You can denote a
|
|
94
|
+
* primary button action for a notice by passing a value of `primary`.
|
|
95
|
+
*
|
|
96
|
+
* The default appearance of an action button is inferred based on whether
|
|
97
|
+
* `url` or `onClick` are provided, rendering the button as a link if
|
|
98
|
+
* appropriate. If both props are provided, `url` takes precedence, and the
|
|
99
|
+
* action button will render as an anchor tag.
|
|
100
|
+
*
|
|
101
|
+
* @default []
|
|
102
|
+
*/
|
|
103
|
+
actions?: Array<NoticeAction>;
|
|
104
|
+
/**
|
|
105
|
+
* Determines whether or not the message should be parsed as custom HTML
|
|
106
|
+
* instead of a string.
|
|
107
|
+
*/
|
|
108
|
+
__unstableHTML?: boolean;
|
|
109
|
+
};
|
|
110
|
+
export declare type NoticeListProps = {
|
|
111
|
+
/**
|
|
112
|
+
* Array of notices to render.
|
|
113
|
+
*/
|
|
114
|
+
notices: Array<Omit<NoticeProps, 'children'> & {
|
|
115
|
+
id: string;
|
|
116
|
+
content: string;
|
|
117
|
+
}>;
|
|
118
|
+
/**
|
|
119
|
+
* Function called when a notice should be removed / dismissed.
|
|
120
|
+
*/
|
|
121
|
+
onRemove?: (id: string) => void;
|
|
122
|
+
/**
|
|
123
|
+
* Children to be rendered inside the notice list.
|
|
124
|
+
*/
|
|
125
|
+
children?: ReactNode;
|
|
126
|
+
};
|
|
127
|
+
export {};
|
|
128
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/notice/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1D,aAAK,uBAAuB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,MAAM,CAAC;CAC3C,CAAC;AAIF,aAAK,mBAAmB,GAAG,uBAAuB,GAAG;IACpD,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,KAAK,CAAC;CAChB,CAAC;AACF,aAAK,uBAAuB,GAAG,uBAAuB,GAAG;IACxD,GAAG,CAAC,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,iBAAiB,CAAE,iBAAiB,CAAE,CAAC;CAChD,CAAC;AAEF,oBAAY,YAAY,GAAG,mBAAmB,GAAG,uBAAuB,CAAC;AAEzE,oBAAY,cAAc,GAAG,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;AAElD,oBAAY,WAAW,GAAG;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;IAClD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;;;;;;;;;;;;;;;;OAiBG;IACH,UAAU,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAC;IACpC;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,EAAE,KAAK,CAAE,YAAY,CAAE,CAAC;IAChC;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC7B;;OAEG;IACH,OAAO,EAAE,KAAK,CACb,IAAI,CAAE,WAAW,EAAE,UAAU,CAAE,GAAG;QACjC,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;KAChB,CACD,CAAC;IACF;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAE,EAAE,EAAE,MAAM,KAAM,IAAI,CAAC;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC"}
|
|
@@ -5,7 +5,7 @@ export declare const Input: import("@emotion/styled").StyledComponent<import("..
|
|
|
5
5
|
} & {
|
|
6
6
|
hideHTMLArrows: boolean;
|
|
7
7
|
}, {}, {}>;
|
|
8
|
-
export declare const SpinButton: import("@emotion/styled").StyledComponent<
|
|
8
|
+
export declare const SpinButton: import("@emotion/styled").StyledComponent<((import("../../button/types").ButtonProps & import("react").RefAttributes<any>) & {
|
|
9
9
|
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
-
} & Pick<NumberControlProps, "size">, {}, {}>;
|
|
10
|
+
}) & Pick<NumberControlProps, "size">, {}, {}>;
|
|
11
11
|
//# sourceMappingURL=number-control-styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-control-styles.d.ts","sourceRoot":"","sources":["../../../src/number-control/styles/number-control-styles.ts"],"names":[],"mappings":";AAaA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAoBnD,eAAO,MAAM,KAAK;;;oBAlB8C,OAAO;UAoBtE,CAAC;AAgBF,eAAO,MAAM,UAAU;;
|
|
1
|
+
{"version":3,"file":"number-control-styles.d.ts","sourceRoot":"","sources":["../../../src/number-control/styles/number-control-styles.ts"],"names":[],"mappings":";AAaA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAoBnD,eAAO,MAAM,KAAK;;;oBAlB8C,OAAO;UAoBtE,CAAC;AAgBF,eAAO,MAAM,UAAU;;8CAKtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/placeholder/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAQtE;;GAEG;AACH,OAAO,WAAW,MAAM,KAAK,CAAC;AAK9B,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,WAAW,CAiB5C,CAAC;AACF,eAAe,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/placeholder/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAQtE;;GAEG;AACH,OAAO,WAAW,MAAM,KAAK,CAAC;AAK9B,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,WAAW,CAiB5C,CAAC;AACF,eAAe,IAAI,CAAC;AAoBpB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,WAAW,CAEvD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { AuthorSelectProps } from './types';
|
|
3
|
+
export default function AuthorSelect({ label, noOptionLabel, authorList, selectedAuthorId, onChange: onChangeProp, }: AuthorSelectProps): JSX.Element | null;
|
|
4
|
+
//# sourceMappingURL=author-select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"author-select.d.ts","sourceRoot":"","sources":["../../src/query-controls/author-select.tsx"],"names":[],"mappings":";AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,EACrC,KAAK,EACL,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,QAAQ,EAAE,YAAY,GACtB,EAAE,iBAAiB,sBAsBnB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { CategorySelectProps } from './types';
|
|
3
|
+
export default function CategorySelect({ label, noOptionLabel, categoriesList, selectedCategoryId, onChange: onChangeProp, ...props }: CategorySelectProps): JSX.Element;
|
|
4
|
+
//# sourceMappingURL=category-select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category-select.d.ts","sourceRoot":"","sources":["../../src/query-controls/category-select.tsx"],"names":[],"mappings":";AAWA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAE,EACvC,KAAK,EACL,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,QAAQ,EAAE,YAAY,EACtB,GAAG,KAAK,EACR,EAAE,mBAAmB,eAyBrB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { QueryControlsProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Controls to query for posts.
|
|
5
|
+
*
|
|
6
|
+
* ```jsx
|
|
7
|
+
* const MyQueryControls = () => (
|
|
8
|
+
* <QueryControls
|
|
9
|
+
* { ...{ maxItems, minItems, numberOfItems, order, orderBy } }
|
|
10
|
+
* onOrderByChange={ ( newOrderBy ) => {
|
|
11
|
+
* updateQuery( { orderBy: newOrderBy } )
|
|
12
|
+
* }
|
|
13
|
+
* onOrderChange={ ( newOrder ) => {
|
|
14
|
+
* updateQuery( { order: newOrder } )
|
|
15
|
+
* }
|
|
16
|
+
* categoriesList={ categories }
|
|
17
|
+
* selectedCategoryId={ category }
|
|
18
|
+
* onCategoryChange={ ( newCategory ) => {
|
|
19
|
+
* updateQuery( { category: newCategory } )
|
|
20
|
+
* }
|
|
21
|
+
* onNumberOfItemsChange={ ( newNumberOfItems ) => {
|
|
22
|
+
* updateQuery( { numberOfItems: newNumberOfItems } )
|
|
23
|
+
* } }
|
|
24
|
+
* />
|
|
25
|
+
* );
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function QueryControls({ authorList, selectedAuthorId, numberOfItems, order, orderBy, maxItems, minItems, onAuthorChange, onNumberOfItemsChange, onOrderChange, onOrderByChange, ...props }: QueryControlsProps): JSX.Element;
|
|
29
|
+
export default QueryControls;
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/query-controls/index.tsx"],"names":[],"mappings":";AAaA,OAAO,KAAK,EACX,kBAAkB,EAGlB,MAAM,SAAS,CAAC;AAkBjB;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAAE,EAC9B,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,KAAK,EACL,OAAO,EACP,QAA4B,EAC5B,QAA4B,EAC5B,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,eAAe,EAGf,GAAG,KAAK,EACR,EAAE,kBAAkB,eAkHpB;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import QueryControls from '..';
|
|
9
|
+
declare const meta: ComponentMeta<typeof QueryControls>;
|
|
10
|
+
export default meta;
|
|
11
|
+
export declare const Default: ComponentStory<typeof QueryControls>;
|
|
12
|
+
export declare const SelectSingleCategory: ComponentStory<typeof QueryControls>;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/query-controls/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOtE;;GAEG;AACH,OAAO,aAAa,MAAM,IAAI,CAAC;AAO/B,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,aAAa,CAgB9C,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,aAAa,CAuEzD,CAAC;AA8EF,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAE,OAAO,aAAa,CACrC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { Author, Category, TermWithParentAndChildren } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* Returns terms in a tree form.
|
|
7
|
+
*
|
|
8
|
+
* @param flatTerms Array of terms in flat format.
|
|
9
|
+
*
|
|
10
|
+
* @return Terms in tree format.
|
|
11
|
+
*/
|
|
12
|
+
export declare function buildTermsTree(flatTerms: readonly (Author | Category)[]): TermWithParentAndChildren[];
|
|
13
|
+
//# sourceMappingURL=terms.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terms.d.ts","sourceRoot":"","sources":["../../src/query-controls/terms.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EACX,MAAM,EACN,QAAQ,EACR,yBAAyB,EAEzB,MAAM,SAAS,CAAC;AAEjB;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAE,SAAS,EAAE,SAAS,CAAE,MAAM,GAAG,QAAQ,CAAE,EAAE,+BAkC1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terms.d.ts","sourceRoot":"","sources":["../../../src/query-controls/test/terms.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { FormTokenFieldProps } from '../form-token-field/types';
|
|
5
|
+
import type { TreeSelectProps } from '../tree-select/types';
|
|
6
|
+
export declare type Author = {
|
|
7
|
+
id: number;
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
10
|
+
export declare type Category = {
|
|
11
|
+
id: number;
|
|
12
|
+
name: string;
|
|
13
|
+
parent: number;
|
|
14
|
+
};
|
|
15
|
+
export declare type TermWithParentAndChildren = {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
parent: number | null;
|
|
19
|
+
children: TermWithParentAndChildren[];
|
|
20
|
+
};
|
|
21
|
+
export declare type TermsByParent = Record<string, TermWithParentAndChildren[]>;
|
|
22
|
+
export declare type CategorySelectProps = Pick<TreeSelectProps, 'label' | 'noOptionLabel'> & {
|
|
23
|
+
categoriesList: Category[];
|
|
24
|
+
onChange: (newCategory: string) => void;
|
|
25
|
+
selectedCategoryId?: Category['id'];
|
|
26
|
+
};
|
|
27
|
+
export declare type AuthorSelectProps = Pick<TreeSelectProps, 'label' | 'noOptionLabel'> & {
|
|
28
|
+
authorList?: Author[];
|
|
29
|
+
onChange: (newAuthor: string) => void;
|
|
30
|
+
selectedAuthorId?: Author['id'];
|
|
31
|
+
};
|
|
32
|
+
declare type Order = 'asc' | 'desc';
|
|
33
|
+
declare type OrderBy = 'date' | 'title';
|
|
34
|
+
declare type BaseQueryControlsProps = {
|
|
35
|
+
/**
|
|
36
|
+
* An array of the authors to select from.
|
|
37
|
+
*/
|
|
38
|
+
authorList?: AuthorSelectProps['authorList'];
|
|
39
|
+
/**
|
|
40
|
+
* The maximum number of items.
|
|
41
|
+
*
|
|
42
|
+
* @default 100
|
|
43
|
+
*/
|
|
44
|
+
maxItems?: number;
|
|
45
|
+
/**
|
|
46
|
+
* The minimum number of items.
|
|
47
|
+
*
|
|
48
|
+
* @default 1
|
|
49
|
+
*/
|
|
50
|
+
minItems?: number;
|
|
51
|
+
/**
|
|
52
|
+
* The selected number of items to retrieve via the query.
|
|
53
|
+
*/
|
|
54
|
+
numberOfItems?: number;
|
|
55
|
+
/**
|
|
56
|
+
* A function that receives the new author value.
|
|
57
|
+
* If not specified, the author controls are not rendered.
|
|
58
|
+
*/
|
|
59
|
+
onAuthorChange?: AuthorSelectProps['onChange'];
|
|
60
|
+
/**
|
|
61
|
+
* A function that receives the new number of items.
|
|
62
|
+
* If not specified, then the number of items
|
|
63
|
+
* range control is not rendered.
|
|
64
|
+
*/
|
|
65
|
+
onNumberOfItemsChange?: (newNumber?: number) => void;
|
|
66
|
+
/**
|
|
67
|
+
* A function that receives the new order value.
|
|
68
|
+
* If this prop or the `onOrderByChange` prop are not specified,
|
|
69
|
+
* then the order controls are not rendered.
|
|
70
|
+
*/
|
|
71
|
+
onOrderChange?: (newOrder: Order) => void;
|
|
72
|
+
/**
|
|
73
|
+
* A function that receives the new orderby value.
|
|
74
|
+
* If this prop or the `onOrderChange` prop are not specified,
|
|
75
|
+
* then the order controls are not rendered.
|
|
76
|
+
*/
|
|
77
|
+
onOrderByChange?: (newOrderBy: OrderBy) => void;
|
|
78
|
+
/**
|
|
79
|
+
* The order in which to retrieve posts.
|
|
80
|
+
*/
|
|
81
|
+
order?: Order;
|
|
82
|
+
/**
|
|
83
|
+
* The meta key by which to order posts.
|
|
84
|
+
*/
|
|
85
|
+
orderBy?: OrderBy;
|
|
86
|
+
/**
|
|
87
|
+
* The selected author ID.
|
|
88
|
+
*/
|
|
89
|
+
selectedAuthorId?: AuthorSelectProps['selectedAuthorId'];
|
|
90
|
+
};
|
|
91
|
+
export declare type QueryControlsWithSingleCategorySelectionProps = BaseQueryControlsProps & {
|
|
92
|
+
/**
|
|
93
|
+
* An array of categories. When passed in conjunction with the
|
|
94
|
+
* `onCategoryChange` prop, it causes the component to render UI that allows
|
|
95
|
+
* selecting one category at a time.
|
|
96
|
+
*/
|
|
97
|
+
categoriesList?: CategorySelectProps['categoriesList'];
|
|
98
|
+
/**
|
|
99
|
+
* The selected category for the `categoriesList` prop.
|
|
100
|
+
*/
|
|
101
|
+
selectedCategoryId?: CategorySelectProps['selectedCategoryId'];
|
|
102
|
+
/**
|
|
103
|
+
* A function that receives the new category value. If not specified, the
|
|
104
|
+
* category controls are not rendered.
|
|
105
|
+
* The function's signature changes depending on whether multiple category
|
|
106
|
+
* selection is enabled or not.
|
|
107
|
+
*/
|
|
108
|
+
onCategoryChange?: CategorySelectProps['onChange'];
|
|
109
|
+
};
|
|
110
|
+
export declare type QueryControlsWithMultipleCategorySelectionProps = BaseQueryControlsProps & {
|
|
111
|
+
/**
|
|
112
|
+
* An object of categories with the category name as the key. When passed in
|
|
113
|
+
* conjunction with the `onCategoryChange` prop, it causes the component to
|
|
114
|
+
* render UI that enables multiple selection.
|
|
115
|
+
*/
|
|
116
|
+
categorySuggestions?: Record<Category['name'], Category>;
|
|
117
|
+
/**
|
|
118
|
+
* The selected categories for the `categorySuggestions` prop.
|
|
119
|
+
*/
|
|
120
|
+
selectedCategories?: Category[];
|
|
121
|
+
/**
|
|
122
|
+
* A function that receives the new category value. If not specified, the
|
|
123
|
+
* category controls are not rendered.
|
|
124
|
+
* The function's signature changes depending on whether multiple category
|
|
125
|
+
* selection is enabled or not.
|
|
126
|
+
*/
|
|
127
|
+
onCategoryChange?: FormTokenFieldProps['onChange'];
|
|
128
|
+
};
|
|
129
|
+
export declare type QueryControlsProps = QueryControlsWithSingleCategorySelectionProps | QueryControlsWithMultipleCategorySelectionProps;
|
|
130
|
+
export {};
|
|
131
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/query-controls/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,oBAAY,MAAM,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,yBAAyB,GAAG;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,yBAAyB,EAAE,CAAC;CACtC,CAAC;AAEF,oBAAY,aAAa,GAAG,MAAM,CAAE,MAAM,EAAE,yBAAyB,EAAE,CAAE,CAAC;AAE1E,oBAAY,mBAAmB,GAAG,IAAI,CACrC,eAAe,EACf,OAAO,GAAG,eAAe,CACzB,GAAG;IACH,cAAc,EAAE,QAAQ,EAAE,CAAC;IAC3B,QAAQ,EAAE,CAAE,WAAW,EAAE,MAAM,KAAM,IAAI,CAAC;IAC1C,kBAAkB,CAAC,EAAE,QAAQ,CAAE,IAAI,CAAE,CAAC;CACtC,CAAC;AAEF,oBAAY,iBAAiB,GAAG,IAAI,CACnC,eAAe,EACf,OAAO,GAAG,eAAe,CACzB,GAAG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,EAAE,CAAE,SAAS,EAAE,MAAM,KAAM,IAAI,CAAC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAE,IAAI,CAAE,CAAC;CAClC,CAAC;AAEF,aAAK,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;AAC5B,aAAK,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AAEhC,aAAK,sBAAsB,GAAG;IAC7B;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAE,YAAY,CAAE,CAAC;IAC/C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE,iBAAiB,CAAE,UAAU,CAAE,CAAC;IACjD;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,CAAE,SAAS,CAAC,EAAE,MAAM,KAAM,IAAI,CAAC;IACvD;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAE,QAAQ,EAAE,KAAK,KAAM,IAAI,CAAC;IAC5C;;;;OAIG;IACH,eAAe,CAAC,EAAE,CAAE,UAAU,EAAE,OAAO,KAAM,IAAI,CAAC;IAClD;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,iBAAiB,CAAE,kBAAkB,CAAE,CAAC;CAC3D,CAAC;AAEF,oBAAY,6CAA6C,GACxD,sBAAsB,GAAG;IACxB;;;;OAIG;IACH,cAAc,CAAC,EAAE,mBAAmB,CAAE,gBAAgB,CAAE,CAAC;IACzD;;OAEG;IACH,kBAAkB,CAAC,EAAE,mBAAmB,CAAE,oBAAoB,CAAE,CAAC;IACjE;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,mBAAmB,CAAE,UAAU,CAAE,CAAC;CACrD,CAAC;AAEH,oBAAY,+CAA+C,GAC1D,sBAAsB,GAAG;IACxB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAE,QAAQ,CAAE,MAAM,CAAE,EAAE,QAAQ,CAAE,CAAC;IAC7D;;OAEG;IACH,kBAAkB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAChC;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,mBAAmB,CAAE,UAAU,CAAE,CAAC;CACrD,CAAC;AAEH,oBAAY,kBAAkB,GAC3B,6CAA6C,GAC7C,+CAA+C,CAAC"}
|
|
@@ -52,6 +52,6 @@ export declare const RangeControl: import("react").ForwardRefExoticComponent<Pic
|
|
|
52
52
|
trackColor?: import("csstype").Property.Color | undefined;
|
|
53
53
|
type?: "stepper" | undefined;
|
|
54
54
|
withInputField?: boolean | undefined;
|
|
55
|
-
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "onChange" | "color" | "help" | "icon" | "disabled" | "children" | "label" | "as" | "type" | "onFocus" | "onBlur" | "onMouseLeave" | "onMouseMove" | "step" | "
|
|
55
|
+
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "onChange" | "color" | "help" | "icon" | "disabled" | "children" | "label" | "as" | "type" | "onFocus" | "onBlur" | "onMouseLeave" | "onMouseMove" | "step" | "showTooltip" | "__nextHasNoMarginBottom" | "hideLabelFromVision" | "isShiftStepEnabled" | "shiftStep" | "marks" | "railColor" | "trackColor" | keyof import("./types").NumericProps | "renderTooltipContent" | "afterIcon" | "allowReset" | "beforeIcon" | "currentInput" | "initialPosition" | "resetFallbackValue" | "separatorType" | "withInputField"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
56
56
|
export default RangeControl;
|
|
57
57
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Resizable } from 're-resizable';
|
|
2
2
|
import type { ResizableProps } from 're-resizable';
|
|
3
3
|
import type { ReactNode } from 'react';
|
|
4
|
-
declare const
|
|
5
|
-
className: string;
|
|
4
|
+
export declare const ResizableBox: import("react").ForwardRefExoticComponent<ResizableProps & {
|
|
6
5
|
children: ReactNode;
|
|
7
|
-
showHandle
|
|
8
|
-
__experimentalShowTooltip
|
|
9
|
-
__experimentalTooltipProps
|
|
6
|
+
showHandle?: boolean | undefined;
|
|
7
|
+
__experimentalShowTooltip?: boolean | undefined;
|
|
8
|
+
__experimentalTooltipProps?: (Pick<{
|
|
10
9
|
theme?: import("@emotion/react").Theme | undefined;
|
|
11
10
|
as?: import("react").ElementType<any> | undefined;
|
|
12
11
|
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
@@ -23,7 +22,7 @@ declare const _default: import("react").ForwardRefExoticComponent<ResizableProps
|
|
|
23
22
|
position?: import("./resize-tooltip/utils").Position | undefined;
|
|
24
23
|
showPx?: boolean | undefined;
|
|
25
24
|
zIndex?: number | undefined;
|
|
26
|
-
}, "position" | "zIndex" | "key" | "as" | keyof import("react").HTMLAttributes<HTMLDivElement> | "theme" | "axis" | "isVisible" | "fadeTimeout" | "onResize" | "showPx" | "labelRef"> & import("react").RefAttributes<HTMLDivElement
|
|
25
|
+
}, "position" | "zIndex" | "key" | "as" | keyof import("react").HTMLAttributes<HTMLDivElement> | "theme" | "axis" | "isVisible" | "fadeTimeout" | "onResize" | "showPx" | "labelRef"> & import("react").RefAttributes<HTMLDivElement>) | undefined;
|
|
27
26
|
} & import("react").RefAttributes<Resizable>>;
|
|
28
|
-
export default
|
|
27
|
+
export default ResizableBox;
|
|
29
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resizable-box/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAgB,MAAM,OAAO,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resizable-box/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAgB,MAAM,OAAO,CAAC;AAkHrD,eAAO,MAAM,YAAY;cAnCd,SAAS;;;;;;;;;;;;;;;;;;;;;6CAmC6C,CAAC;AAElE,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* External dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import ResizableBox from '..';
|
|
10
|
+
declare const meta: ComponentMeta<typeof ResizableBox>;
|
|
11
|
+
export default meta;
|
|
12
|
+
export declare const Default: ComponentStory<import("react").ForwardRefExoticComponent<import("re-resizable").ResizableProps & {
|
|
13
|
+
children: import("react").ReactNode;
|
|
14
|
+
showHandle?: boolean | undefined;
|
|
15
|
+
__experimentalShowTooltip?: boolean | undefined;
|
|
16
|
+
__experimentalTooltipProps?: (Pick<{
|
|
17
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
18
|
+
as?: import("react").ElementType<any> | undefined;
|
|
19
|
+
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
20
|
+
'aria-hidden'?: boolean | undefined;
|
|
21
|
+
axis?: import("../resize-tooltip/utils").Axis | undefined;
|
|
22
|
+
className?: string | undefined;
|
|
23
|
+
fadeTimeout?: number | undefined;
|
|
24
|
+
isVisible?: boolean | undefined;
|
|
25
|
+
labelRef?: import("react").Ref<HTMLDivElement> | undefined;
|
|
26
|
+
onResize?: ((data: {
|
|
27
|
+
width: number | null;
|
|
28
|
+
height: number | null;
|
|
29
|
+
}) => void) | undefined;
|
|
30
|
+
position?: import("../resize-tooltip/utils").Position | undefined;
|
|
31
|
+
showPx?: boolean | undefined;
|
|
32
|
+
zIndex?: number | undefined;
|
|
33
|
+
}, "position" | "zIndex" | "key" | "as" | keyof import("react").HTMLAttributes<HTMLDivElement> | "theme" | "axis" | "isVisible" | "fadeTimeout" | "onResize" | "showPx" | "labelRef"> & import("react").RefAttributes<HTMLDivElement>) | undefined;
|
|
34
|
+
} & import("react").RefAttributes<import("re-resizable").Resizable>>>;
|
|
35
|
+
/**
|
|
36
|
+
* The `enable` prop can be used to disable resizing in specific directions.
|
|
37
|
+
*/
|
|
38
|
+
export declare const DisabledDirections: ComponentStory<import("react").ForwardRefExoticComponent<import("re-resizable").ResizableProps & {
|
|
39
|
+
children: import("react").ReactNode;
|
|
40
|
+
showHandle?: boolean | undefined;
|
|
41
|
+
__experimentalShowTooltip?: boolean | undefined;
|
|
42
|
+
__experimentalTooltipProps?: (Pick<{
|
|
43
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
44
|
+
as?: import("react").ElementType<any> | undefined;
|
|
45
|
+
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
46
|
+
'aria-hidden'?: boolean | undefined;
|
|
47
|
+
axis?: import("../resize-tooltip/utils").Axis | undefined;
|
|
48
|
+
className?: string | undefined;
|
|
49
|
+
fadeTimeout?: number | undefined;
|
|
50
|
+
isVisible?: boolean | undefined;
|
|
51
|
+
labelRef?: import("react").Ref<HTMLDivElement> | undefined;
|
|
52
|
+
onResize?: ((data: {
|
|
53
|
+
width: number | null;
|
|
54
|
+
height: number | null;
|
|
55
|
+
}) => void) | undefined;
|
|
56
|
+
position?: import("../resize-tooltip/utils").Position | undefined;
|
|
57
|
+
showPx?: boolean | undefined;
|
|
58
|
+
zIndex?: number | undefined;
|
|
59
|
+
}, "position" | "zIndex" | "key" | "as" | keyof import("react").HTMLAttributes<HTMLDivElement> | "theme" | "axis" | "isVisible" | "fadeTimeout" | "onResize" | "showPx" | "labelRef"> & import("react").RefAttributes<HTMLDivElement>) | undefined;
|
|
60
|
+
} & import("react").RefAttributes<import("re-resizable").Resizable>>>;
|
|
61
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resizable-box/stories/index.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEtE;;GAEG;AACH,OAAO,YAAY,MAAM,IAAI,CAAC;AAO9B,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,YAAY,CAY7C,CAAC;AACF,eAAe,IAAI,CAAC;AA6BpB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;qEAAsB,CAAC;AAkB3C;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;qEAAsB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Internal dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type { ResponsiveWrapperProps } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* A wrapper component that maintains its aspect ratio when resized.
|
|
8
|
+
*
|
|
9
|
+
* ```jsx
|
|
10
|
+
* import { ResponsiveWrapper } from '@wordpress/components';
|
|
11
|
+
*
|
|
12
|
+
* const MyResponsiveWrapper = () => (
|
|
13
|
+
* <ResponsiveWrapper naturalWidth={ 2000 } naturalHeight={ 680 }>
|
|
14
|
+
* <img
|
|
15
|
+
* src="https://s.w.org/style/images/about/WordPress-logotype-standard.png"
|
|
16
|
+
* alt="WordPress"
|
|
17
|
+
* />
|
|
18
|
+
* </ResponsiveWrapper>
|
|
19
|
+
* );
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare function ResponsiveWrapper({ naturalWidth, naturalHeight, children, isInline, }: ResponsiveWrapperProps): JSX.Element | null;
|
|
23
|
+
export default ResponsiveWrapper;
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/responsive-wrapper/index.tsx"],"names":[],"mappings":";AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD;;;;;;;;;;;;;;;GAeG;AACH,iBAAS,iBAAiB,CAAE,EAC3B,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,QAAgB,GAChB,EAAE,sBAAsB,sBAyBxB;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import ResponsiveWrapper from '..';
|
|
9
|
+
declare const meta: ComponentMeta<typeof ResponsiveWrapper>;
|
|
10
|
+
export default meta;
|
|
11
|
+
export declare const Default: ComponentStory<typeof ResponsiveWrapper>;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/responsive-wrapper/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEtE;;GAEG;AACH,OAAO,iBAAiB,MAAM,IAAI,CAAC;AAEnC,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,iBAAiB,CAUlD,CAAC;AACF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO,0CAAsB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type ResponsiveWrapperProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The intrinsic width of the element to wrap. Will be used to determine the aspect ratio.
|
|
5
|
+
*/
|
|
6
|
+
naturalWidth: number;
|
|
7
|
+
/**
|
|
8
|
+
* The intrinsic height of the element to wrap. Will be used to determine the aspect ratio.
|
|
9
|
+
*/
|
|
10
|
+
naturalHeight: number;
|
|
11
|
+
/**
|
|
12
|
+
* The element to wrap.
|
|
13
|
+
*/
|
|
14
|
+
children: React.ReactElement;
|
|
15
|
+
/**
|
|
16
|
+
* If true, the wrapper will be `span` instead of `div`.
|
|
17
|
+
*
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
isInline?: boolean;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/responsive-wrapper/types.ts"],"names":[],"mappings":";AAAA,oBAAY,sBAAsB,GAAG;IACpC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Internal dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type { SandBoxProps } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* This component provides an isolated environment for arbitrary HTML via iframes.
|
|
8
|
+
*
|
|
9
|
+
* ```jsx
|
|
10
|
+
* import { SandBox } from '@wordpress/components';
|
|
11
|
+
*
|
|
12
|
+
* const MySandBox = () => (
|
|
13
|
+
* <SandBox html="<p>Content</p>" title="SandBox" type="embed" />
|
|
14
|
+
* );
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
declare function SandBox({ html, title, type, styles, scripts, onFocus, }: SandBoxProps): JSX.Element;
|
|
18
|
+
export default SandBox;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sandbox/index.tsx"],"names":[],"mappings":";AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAoG5C;;;;;;;;;;GAUG;AACH,iBAAS,OAAO,CAAE,EACjB,IAAS,EACT,KAAU,EACV,IAAI,EACJ,MAAW,EACX,OAAY,EACZ,OAAO,GACP,EAAE,YAAY,eA4Jd;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import SandBox from '..';
|
|
9
|
+
declare const meta: ComponentMeta<typeof SandBox>;
|
|
10
|
+
export default meta;
|
|
11
|
+
export declare const Default: ComponentStory<typeof SandBox>;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sandbox/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEtE;;GAEG;AACH,OAAO,OAAO,MAAM,IAAI,CAAC;AAEzB,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,OAAO,CAWxC,CAAC;AACF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO,gCAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sandbox/test/index.tsx"],"names":[],"mappings":""}
|