@wordpress/components 21.1.2-next.4d3b314fd5.0 → 21.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 +48 -3
- package/CONTRIBUTING.md +20 -0
- package/build/border-box-control/border-box-control/component.js +2 -0
- package/build/border-box-control/border-box-control/component.js.map +1 -1
- package/build/border-box-control/border-box-control/hook.js +4 -1
- package/build/border-box-control/border-box-control/hook.js.map +1 -1
- package/build/border-box-control/utils.js +42 -2
- package/build/border-box-control/utils.js.map +1 -1
- package/build/border-control/border-control/component.js +2 -0
- package/build/border-control/border-control/component.js.map +1 -1
- package/build/combobox-control/index.js +0 -1
- package/build/combobox-control/index.js.map +1 -1
- package/build/custom-select-control/index.js +4 -2
- package/build/custom-select-control/index.js.map +1 -1
- package/build/disabled/index.js +6 -26
- package/build/disabled/index.js.map +1 -1
- package/build/font-size-picker/index.js +47 -56
- package/build/font-size-picker/index.js.map +1 -1
- package/build/font-size-picker/styles.js +65 -0
- package/build/font-size-picker/styles.js.map +1 -0
- package/build/font-size-picker/types.js +6 -0
- package/build/font-size-picker/types.js.map +1 -0
- package/build/font-size-picker/utils.js +18 -16
- package/build/font-size-picker/utils.js.map +1 -1
- package/build/form-token-field/suggestions-list.js +5 -5
- package/build/form-token-field/suggestions-list.js.map +1 -1
- package/build/form-token-field/token-input.js +20 -1
- package/build/form-token-field/token-input.js.map +1 -1
- package/build/higher-order/with-fallback-styles/index.js +1 -1
- package/build/higher-order/with-fallback-styles/index.js.map +1 -1
- package/build/index.js +14 -6
- package/build/index.js.map +1 -1
- package/build/modal/aria-helper.js +2 -3
- package/build/modal/aria-helper.js.map +1 -1
- package/build/modal/index.js +42 -11
- package/build/modal/index.js.map +1 -1
- package/build/modal/types.js +6 -0
- package/build/modal/types.js.map +1 -0
- package/build/navigator/index.js +8 -8
- package/build/navigator/index.js.map +1 -1
- package/build/navigator/navigator-back-button/component.js +5 -4
- package/build/navigator/navigator-back-button/component.js.map +1 -1
- package/build/navigator/navigator-back-button/index.js +1 -1
- package/build/navigator/navigator-back-button/index.js.map +1 -1
- package/build/navigator/navigator-button/component.js +5 -4
- package/build/navigator/navigator-button/component.js.map +1 -1
- package/build/navigator/navigator-button/index.js +1 -1
- package/build/navigator/navigator-button/index.js.map +1 -1
- package/build/navigator/navigator-provider/component.js +10 -7
- package/build/navigator/navigator-provider/component.js.map +1 -1
- package/build/navigator/navigator-provider/index.js +1 -1
- package/build/navigator/navigator-provider/index.js.map +1 -1
- package/build/navigator/navigator-screen/component.js +30 -26
- package/build/navigator/navigator-screen/component.js.map +1 -1
- package/build/navigator/navigator-screen/index.js +1 -1
- package/build/navigator/navigator-screen/index.js.map +1 -1
- package/build/resizable-box/resize-tooltip/utils.js +12 -14
- package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build/sandbox/index.js +68 -67
- package/build/sandbox/index.js.map +1 -1
- package/build/sandbox/index.native.js +66 -63
- package/build/sandbox/index.native.js.map +1 -1
- package/build/search-control/index.native.js +6 -2
- package/build/search-control/index.native.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-context.js +8 -2
- package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +31 -41
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/use-slot-fills.js +39 -0
- package/build/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -0
- package/build/slot-fill/bubbles-virtually/use-slot.js +13 -4
- package/build/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
- package/build/slot-fill/index.js +8 -0
- package/build/slot-fill/index.js.map +1 -1
- package/build/tab-panel/index.js +4 -4
- package/build/tab-panel/index.js.map +1 -1
- package/build/theme/index.js +62 -0
- package/build/theme/index.js.map +1 -0
- package/build/theme/styles.js +33 -0
- package/build/theme/styles.js.map +1 -0
- package/build/theme/types.js +6 -0
- package/build/theme/types.js.map +1 -0
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js +8 -8
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build/tools-panel/tools-panel/hook.js +3 -3
- package/build/tools-panel/tools-panel/hook.js.map +1 -1
- package/build/tools-panel/tools-panel-item/hook.js +6 -6
- package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build/tooltip/index.js +4 -1
- package/build/tooltip/index.js.map +1 -1
- package/build/tooltip/index.native.js +17 -4
- package/build/tooltip/index.native.js.map +1 -1
- package/build-module/border-box-control/border-box-control/component.js +2 -0
- package/build-module/border-box-control/border-box-control/component.js.map +1 -1
- package/build-module/border-box-control/border-box-control/hook.js +4 -1
- package/build-module/border-box-control/border-box-control/hook.js.map +1 -1
- package/build-module/border-box-control/utils.js +36 -1
- package/build-module/border-box-control/utils.js.map +1 -1
- package/build-module/border-control/border-control/component.js +2 -0
- package/build-module/border-control/border-control/component.js.map +1 -1
- package/build-module/combobox-control/index.js +0 -1
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/custom-select-control/index.js +2 -1
- package/build-module/custom-select-control/index.js.map +1 -1
- package/build-module/disabled/index.js +7 -26
- package/build-module/disabled/index.js.map +1 -1
- package/build-module/font-size-picker/index.js +46 -54
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/font-size-picker/styles.js +54 -0
- package/build-module/font-size-picker/styles.js.map +1 -0
- package/build-module/font-size-picker/types.js +2 -0
- package/build-module/font-size-picker/types.js.map +1 -0
- package/build-module/font-size-picker/utils.js +22 -16
- package/build-module/font-size-picker/utils.js.map +1 -1
- package/build-module/form-token-field/suggestions-list.js +5 -5
- package/build-module/form-token-field/suggestions-list.js.map +1 -1
- package/build-module/form-token-field/token-input.js +21 -2
- package/build-module/form-token-field/token-input.js.map +1 -1
- package/build-module/higher-order/with-fallback-styles/index.js +2 -2
- package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
- package/build-module/index.js +3 -2
- package/build-module/index.js.map +1 -1
- package/build-module/modal/aria-helper.js +2 -3
- package/build-module/modal/aria-helper.js.map +1 -1
- package/build-module/modal/index.js +44 -12
- package/build-module/modal/index.js.map +1 -1
- package/build-module/modal/types.js +2 -0
- package/build-module/modal/types.js.map +1 -0
- package/build-module/navigator/index.js +4 -4
- package/build-module/navigator/index.js.map +1 -1
- package/build-module/navigator/navigator-back-button/component.js +3 -3
- package/build-module/navigator/navigator-back-button/component.js.map +1 -1
- package/build-module/navigator/navigator-back-button/index.js +1 -1
- package/build-module/navigator/navigator-back-button/index.js.map +1 -1
- package/build-module/navigator/navigator-button/component.js +3 -3
- package/build-module/navigator/navigator-button/component.js.map +1 -1
- package/build-module/navigator/navigator-button/index.js +1 -1
- package/build-module/navigator/navigator-button/index.js.map +1 -1
- package/build-module/navigator/navigator-provider/component.js +8 -6
- package/build-module/navigator/navigator-provider/component.js.map +1 -1
- package/build-module/navigator/navigator-provider/index.js +1 -1
- package/build-module/navigator/navigator-provider/index.js.map +1 -1
- package/build-module/navigator/navigator-screen/component.js +18 -25
- package/build-module/navigator/navigator-screen/component.js.map +1 -1
- package/build-module/navigator/navigator-screen/index.js +1 -1
- package/build-module/navigator/navigator-screen/index.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/utils.js +13 -15
- package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build-module/sandbox/index.js +69 -67
- package/build-module/sandbox/index.js.map +1 -1
- package/build-module/sandbox/index.native.js +57 -53
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/search-control/index.native.js +6 -2
- package/build-module/search-control/index.native.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +7 -2
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +30 -42
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js +27 -0
- package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -0
- package/build-module/slot-fill/bubbles-virtually/use-slot.js +13 -5
- package/build-module/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
- package/build-module/slot-fill/index.js +1 -0
- package/build-module/slot-fill/index.js.map +1 -1
- package/build-module/tab-panel/index.js +4 -4
- package/build-module/tab-panel/index.js.map +1 -1
- package/build-module/theme/index.js +52 -0
- package/build-module/theme/index.js.map +1 -0
- package/build-module/theme/styles.js +25 -0
- package/build-module/theme/styles.js.map +1 -0
- package/build-module/theme/types.js +2 -0
- package/build-module/theme/types.js.map +1 -0
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +7 -7
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build-module/tools-panel/tools-panel/hook.js +3 -3
- package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/hook.js +6 -6
- package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build-module/tooltip/index.js +4 -1
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/tooltip/index.native.js +17 -4
- package/build-module/tooltip/index.native.js.map +1 -1
- package/build-style/style-rtl.css +27 -120
- package/build-style/style.css +27 -120
- package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts +1 -0
- package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
- package/build-types/border-box-control/utils.d.ts +1 -3
- package/build-types/border-box-control/utils.d.ts.map +1 -1
- package/build-types/border-control/border-control/component.d.ts +1 -0
- package/build-types/border-control/border-control/component.d.ts.map +1 -1
- package/build-types/border-control/border-control/hook.d.ts +1 -0
- package/build-types/border-control/border-control/hook.d.ts.map +1 -1
- package/build-types/border-control/stories/index.d.ts +6 -0
- package/build-types/border-control/stories/index.d.ts.map +1 -1
- package/build-types/border-control/types.d.ts +4 -0
- package/build-types/border-control/types.d.ts.map +1 -1
- package/build-types/confirm-dialog/types.d.ts +5 -1
- package/build-types/confirm-dialog/types.d.ts.map +1 -1
- package/build-types/custom-select-control/index.d.ts +13 -0
- package/build-types/custom-select-control/index.d.ts.map +1 -0
- package/build-types/custom-select-control/styles.d.ts +9 -0
- package/build-types/custom-select-control/styles.d.ts.map +1 -0
- package/build-types/disabled/index.d.ts.map +1 -1
- package/build-types/font-size-picker/index.d.ts +5 -0
- package/build-types/font-size-picker/index.d.ts.map +1 -0
- package/build-types/font-size-picker/stories/e2e/index.d.ts +16 -0
- package/build-types/font-size-picker/stories/e2e/index.d.ts.map +1 -0
- package/build-types/font-size-picker/stories/index.d.ts +31 -0
- package/build-types/font-size-picker/stories/index.d.ts.map +1 -0
- package/build-types/font-size-picker/styles.d.ts +27 -0
- package/build-types/font-size-picker/styles.d.ts.map +1 -0
- package/build-types/font-size-picker/test/index.d.ts +2 -0
- package/build-types/font-size-picker/test/index.d.ts.map +1 -0
- package/build-types/font-size-picker/test/utils.d.ts +2 -0
- package/build-types/font-size-picker/test/utils.d.ts.map +1 -0
- package/build-types/font-size-picker/types.d.ts +93 -0
- package/build-types/font-size-picker/types.d.ts.map +1 -0
- package/build-types/font-size-picker/utils.d.ts +41 -0
- package/build-types/font-size-picker/utils.d.ts.map +1 -0
- package/build-types/form-token-field/token-input.d.ts.map +1 -1
- package/build-types/modal/aria-helper.d.ts +4 -4
- package/build-types/modal/aria-helper.d.ts.map +1 -1
- package/build-types/modal/index.d.ts +35 -2
- package/build-types/modal/index.d.ts.map +1 -1
- package/build-types/modal/stories/index.d.ts +9 -0
- package/build-types/modal/stories/index.d.ts.map +1 -0
- package/build-types/modal/test/aria-helper.d.ts +2 -0
- package/build-types/modal/test/aria-helper.d.ts.map +1 -0
- package/build-types/modal/test/index.d.ts +2 -0
- package/build-types/modal/test/index.d.ts.map +1 -0
- package/build-types/modal/types.d.ts +134 -0
- package/build-types/modal/types.d.ts.map +1 -0
- package/build-types/navigator/index.d.ts +4 -4
- package/build-types/navigator/index.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/component.d.ts +4 -2
- package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/hook.d.ts +1 -0
- package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/index.d.ts +1 -1
- package/build-types/navigator/navigator-back-button/index.d.ts.map +1 -1
- package/build-types/navigator/navigator-button/component.d.ts +4 -2
- package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-button/hook.d.ts +1 -0
- package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-button/index.d.ts +1 -1
- package/build-types/navigator/navigator-button/index.d.ts.map +1 -1
- package/build-types/navigator/navigator-provider/component.d.ts +2 -2
- package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-provider/index.d.ts +1 -1
- package/build-types/navigator/navigator-provider/index.d.ts.map +1 -1
- package/build-types/navigator/navigator-screen/component.d.ts +2 -2
- package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-screen/index.d.ts +1 -1
- package/build-types/navigator/navigator-screen/index.d.ts.map +1 -1
- package/build-types/navigator/stories/index.d.ts +9 -0
- package/build-types/navigator/stories/index.d.ts.map +1 -0
- package/build-types/navigator/test/index.d.ts +2 -0
- package/build-types/navigator/test/index.d.ts.map +1 -0
- package/build-types/navigator/types.d.ts +4 -1
- package/build-types/navigator/types.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +2 -2
- package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts +2 -0
- package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts.map +1 -0
- package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
- package/build-types/slot-fill/index.d.ts +1 -0
- package/build-types/slot-fill/index.d.ts.map +1 -1
- package/build-types/tab-panel/index.d.ts.map +1 -1
- package/build-types/theme/index.d.ts +31 -0
- package/build-types/theme/index.d.ts.map +1 -0
- package/build-types/theme/stories/index.d.ts +13 -0
- package/build-types/theme/stories/index.d.ts.map +1 -0
- package/build-types/theme/styles.d.ts +10 -0
- package/build-types/theme/styles.d.ts.map +1 -0
- package/build-types/theme/test/index.d.ts +2 -0
- package/build-types/theme/test/index.d.ts.map +1 -0
- package/build-types/theme/types.d.ts +21 -0
- package/build-types/theme/types.d.ts.map +1 -0
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/package.json +19 -18
- package/src/alignment-matrix-control/test/index.js +17 -62
- package/src/base-field/test/index.js +4 -6
- package/src/border-box-control/border-box-control/component.tsx +2 -0
- package/src/border-box-control/border-box-control/hook.ts +4 -0
- package/src/border-box-control/test/index.js +7 -2
- package/src/border-box-control/test/utils.js +48 -0
- package/src/border-box-control/utils.ts +44 -1
- package/src/border-control/border-control/README.md +6 -0
- package/src/border-control/border-control/component.tsx +2 -0
- package/src/border-control/types.ts +4 -0
- package/src/button/style.scss +25 -25
- package/src/button/test/index.js +3 -5
- package/src/combobox-control/index.js +0 -5
- package/src/combobox-control/test/index.js +1 -1
- package/src/confirm-dialog/types.ts +6 -0
- package/src/custom-select-control/index.js +2 -1
- package/src/date-time/time/test/index.tsx +2 -6
- package/src/disabled/index.tsx +11 -33
- package/src/disabled/test/index.tsx +14 -82
- package/src/dropdown/test/index.js +4 -3
- package/src/font-size-picker/{index.js → index.tsx} +114 -80
- package/src/font-size-picker/stories/e2e/{index.js → index.tsx} +13 -4
- package/src/font-size-picker/stories/{index.js → index.tsx} +42 -36
- package/src/font-size-picker/styles.ts +46 -0
- package/src/font-size-picker/test/{index.js → index.tsx} +3 -3
- package/src/font-size-picker/test/{utils.js → utils.ts} +11 -7
- package/src/font-size-picker/types.ts +98 -0
- package/src/font-size-picker/{utils.js → utils.ts} +52 -28
- package/src/form-file-upload/test/index.tsx +1 -1
- package/src/form-token-field/suggestions-list.tsx +5 -5
- package/src/form-token-field/test/index.tsx +22 -1
- package/src/form-token-field/token-input.tsx +25 -3
- package/src/higher-order/with-fallback-styles/index.js +6 -2
- package/src/higher-order/with-focus-outside/test/index.js +44 -45
- package/src/higher-order/with-focus-return/test/index.js +34 -30
- package/src/higher-order/with-notices/test/index.js +1 -1
- package/src/index.js +3 -1
- package/src/input-control/test/index.js +2 -2
- package/src/item-group/test/index.js +2 -2
- package/src/menu-item/test/index.js +0 -3
- package/src/mobile/bottom-sheet/test/range-cell.native.js +16 -14
- package/src/modal/README.md +53 -54
- package/src/modal/{aria-helper.js → aria-helper.ts} +5 -7
- package/src/modal/{index.js → index.tsx} +48 -12
- package/src/modal/stories/{index.js → index.tsx} +47 -42
- package/src/modal/test/{aria-helper.js → aria-helper.ts} +0 -0
- package/src/modal/test/{index.js → index.tsx} +13 -3
- package/src/modal/types.ts +144 -0
- package/src/navigation/test/index.js +1 -1
- package/src/navigator/index.ts +4 -4
- package/src/navigator/navigator-back-button/component.tsx +4 -4
- package/src/navigator/navigator-back-button/index.ts +1 -1
- package/src/navigator/navigator-button/component.tsx +4 -4
- package/src/navigator/navigator-button/index.ts +1 -1
- package/src/navigator/navigator-provider/component.tsx +6 -4
- package/src/navigator/navigator-provider/index.ts +1 -1
- package/src/navigator/navigator-screen/component.tsx +27 -26
- package/src/navigator/navigator-screen/index.ts +1 -1
- package/src/navigator/stories/index.tsx +210 -0
- package/src/navigator/test/index.tsx +509 -0
- package/src/navigator/types.ts +2 -0
- package/src/notice/test/__snapshots__/index.js.snap +39 -38
- package/src/notice/test/index.js +15 -36
- package/src/notice/test/list.js +6 -14
- package/src/number-control/test/index.js +3 -2
- package/src/panel/test/body.js +2 -2
- package/src/placeholder/style.scss +7 -2
- package/src/resizable-box/resize-tooltip/utils.ts +13 -13
- package/src/sandbox/index.js +75 -54
- package/src/sandbox/index.native.js +75 -52
- package/src/sandbox/test/index.js +7 -10
- package/src/search-control/index.native.js +6 -0
- package/src/shortcut/test/index.tsx +1 -1
- package/src/slot-fill/bubbles-virtually/slot-fill-context.js +6 -2
- package/src/slot-fill/bubbles-virtually/slot-fill-provider.js +53 -58
- package/src/slot-fill/bubbles-virtually/use-slot-fills.js +24 -0
- package/src/slot-fill/bubbles-virtually/use-slot.js +11 -6
- package/src/slot-fill/index.js +1 -0
- package/src/style.scss +4 -1
- package/src/tab-panel/index.tsx +4 -7
- package/src/text-highlight/test/index.tsx +1 -3
- package/src/theme/README.md +34 -0
- package/src/theme/index.tsx +51 -0
- package/src/theme/stories/index.tsx +47 -0
- package/src/theme/styles.ts +28 -0
- package/src/theme/test/index.tsx +101 -0
- package/src/theme/types.ts +21 -0
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +1 -0
- package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +9 -7
- package/src/toolbar/test/index.js +2 -2
- package/src/toolbar-group/test/index.js +6 -10
- package/src/tools-panel/test/index.js +4 -6
- package/src/tools-panel/tools-panel/hook.ts +2 -9
- package/src/tools-panel/tools-panel-item/hook.ts +17 -3
- package/src/tooltip/index.js +3 -0
- package/src/tooltip/index.native.js +15 -0
- package/src/tooltip/test/index.native.js +1 -2
- package/src/tree-grid/test/__snapshots__/cell.js.snap +1 -3
- package/src/tree-grid/test/__snapshots__/roving-tab-index-item.js.snap +17 -15
- package/src/tree-grid/test/__snapshots__/row.js.snap +25 -21
- package/src/tree-grid/test/cell.js +4 -4
- package/src/tree-grid/test/roving-tab-index-item.js +8 -8
- package/src/tree-grid/test/roving-tab-index.js +3 -3
- package/src/tree-grid/test/row.js +20 -16
- package/src/truncate/test/index.tsx +4 -4
- package/src/ui/shortcut/test/index.js +2 -1
- package/src/ui/spinner/test/index.js +14 -13
- package/src/ui/tooltip/test/index.js +16 -14
- package/src/utils/theme-variables.scss +8 -0
- package/src/visually-hidden/README.md +4 -0
- package/tsconfig.json +0 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/src/font-size-picker/style.scss +0 -78
- package/src/navigator/stories/index.js +0 -194
- package/src/navigator/test/index.js +0 -407
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-back-button/component.tsx"],"names":[],"mappings":";AAsBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-back-button/component.tsx"],"names":[],"mappings":";AAsBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,mBAAmB;;;;6CAG/B,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { WordPressComponentProps } from '../../ui/context';
|
|
6
6
|
import type { NavigatorBackButtonProps } from '../types';
|
|
7
7
|
export declare function useNavigatorBackButton(props: WordPressComponentProps<NavigatorBackButtonProps, 'button'>): {
|
|
8
|
+
variant?: "link" | "secondary" | "tertiary" | "primary" | undefined;
|
|
8
9
|
children: import("react").ReactNode;
|
|
9
10
|
type?: "button" | "reset" | "submit" | undefined;
|
|
10
11
|
value?: string | number | readonly string[] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-back-button/hook.ts"],"names":[],"mappings":";AAKA;;GAEG;AACH,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAG7E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAEzD,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,uBAAuB,CAAE,wBAAwB,EAAE,QAAQ,CAAE
|
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-back-button/hook.ts"],"names":[],"mappings":";AAKA;;GAEG;AACH,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAG7E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAEzD,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,uBAAuB,CAAE,wBAAwB,EAAE,QAAQ,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBpE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './component';
|
|
1
|
+
export { default as NavigatorBackButton } from './component';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-back-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-back-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -32,11 +32,13 @@
|
|
|
32
32
|
* );
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
35
|
-
declare const
|
|
35
|
+
export declare const NavigatorButton: import("../../ui/context").WordPressComponent<"button", Omit<{
|
|
36
|
+
variant?: "link" | "secondary" | "tertiary" | "primary" | undefined;
|
|
37
|
+
}, "href"> & {
|
|
36
38
|
children: import("react").ReactNode;
|
|
37
39
|
} & {
|
|
38
40
|
path: string;
|
|
39
41
|
attributeName?: string | undefined;
|
|
40
42
|
} & import("react").RefAttributes<any>, true>;
|
|
41
|
-
export default
|
|
43
|
+
export default NavigatorButton;
|
|
42
44
|
//# sourceMappingURL=component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-button/component.tsx"],"names":[],"mappings":";AAsBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-button/component.tsx"],"names":[],"mappings":";AAsBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,eAAe;;;;;;;6CAG3B,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { WordPressComponentProps } from '../../ui/context';
|
|
6
6
|
import type { NavigatorButtonProps } from '../types';
|
|
7
7
|
export declare function useNavigatorButton(props: WordPressComponentProps<NavigatorButtonProps, 'button'>): {
|
|
8
|
+
variant?: "link" | "secondary" | "tertiary" | "primary" | undefined;
|
|
8
9
|
children: import("react").ReactNode;
|
|
9
10
|
type?: "button" | "reset" | "submit" | undefined;
|
|
10
11
|
value?: string | number | readonly string[] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-button/hook.ts"],"names":[],"mappings":";AAMA;;GAEG;AACH,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAG7E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAKrD,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,uBAAuB,CAAE,oBAAoB,EAAE,QAAQ,CAAE
|
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-button/hook.ts"],"names":[],"mappings":";AAMA;;GAEG;AACH,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAG7E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAKrD,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,uBAAuB,CAAE,oBAAoB,EAAE,QAAQ,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkChE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './component';
|
|
1
|
+
export { default as NavigatorButton } from './component';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -34,6 +34,6 @@ import type { NavigatorProviderProps } from '../types';
|
|
|
34
34
|
* );
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
declare const
|
|
38
|
-
export default
|
|
37
|
+
export declare const NavigatorProvider: import("../../ui/context").WordPressComponent<"div", NavigatorProviderProps & import("react").RefAttributes<any>, true>;
|
|
38
|
+
export default NavigatorProvider;
|
|
39
39
|
//# sourceMappingURL=component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-provider/component.tsx"],"names":[],"mappings":";AAsBA,OAAO,KAAK,EACX,sBAAsB,EAGtB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-provider/component.tsx"],"names":[],"mappings":";AAsBA,OAAO,KAAK,EACX,sBAAsB,EAGtB,MAAM,UAAU,CAAC;AAyElB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,iBAAiB,yHAG7B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './component';
|
|
1
|
+
export { default as NavigatorProvider } from './component';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -40,6 +40,6 @@ declare type Props = Omit<WordPressComponentProps<NavigatorScreenProps, 'div', f
|
|
|
40
40
|
* );
|
|
41
41
|
* ```
|
|
42
42
|
*/
|
|
43
|
-
declare const
|
|
44
|
-
export default
|
|
43
|
+
export declare const NavigatorScreen: import("../../ui/context").WordPressComponent<import("react").ElementType<any>, Props & import("react").RefAttributes<any>, boolean>;
|
|
44
|
+
export default NavigatorScreen;
|
|
45
45
|
//# sourceMappingURL=component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-screen/component.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-screen/component.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AAepD;;GAEG;AACH,OAAO,EAGN,uBAAuB,EACvB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AASrD,aAAK,KAAK,GAAG,IAAI,CAChB,uBAAuB,CAAE,oBAAoB,EAAE,KAAK,EAAE,KAAK,CAAE,EAC7D,MAAM,WAAW,CACjB,CAAC;AAyIF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,eAAe,sIAG3B,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './component';
|
|
1
|
+
export { default as NavigatorScreen } from './component';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-screen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-screen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
5
|
+
import { NavigatorProvider } from '..';
|
|
6
|
+
declare const meta: ComponentMeta<typeof NavigatorProvider>;
|
|
7
|
+
export default meta;
|
|
8
|
+
export declare const Default: ComponentStory<typeof NavigatorProvider>;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/navigator/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAStE,OAAO,EACN,iBAAiB,EAIjB,MAAM,IAAI,CAAC;AAEZ,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,iBAAiB,CAalD,CAAC;AACF,eAAe,IAAI,CAAC;AA0IpB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,iBAAiB,CAC1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/navigator/test/index.tsx"],"names":[],"mappings":""}
|
|
@@ -9,6 +9,7 @@ export declare type NavigatorLocation = NavigateOptions & {
|
|
|
9
9
|
isInitial?: boolean;
|
|
10
10
|
isBack?: boolean;
|
|
11
11
|
path?: string;
|
|
12
|
+
hasRestoredFocus?: boolean;
|
|
12
13
|
};
|
|
13
14
|
export declare type NavigatorContext = {
|
|
14
15
|
location: NavigatorLocation;
|
|
@@ -36,7 +37,9 @@ export declare type NavigatorScreenProps = {
|
|
|
36
37
|
*/
|
|
37
38
|
children: ReactNode;
|
|
38
39
|
};
|
|
39
|
-
declare type ButtonProps = {
|
|
40
|
+
declare type ButtonProps = {
|
|
41
|
+
variant?: 'primary' | 'secondary' | 'tertiary' | 'link';
|
|
42
|
+
};
|
|
40
43
|
export declare type NavigatorBackButtonProps = Omit<ButtonProps, 'href'> & {
|
|
41
44
|
/**
|
|
42
45
|
* The children elements.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/navigator/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,aAAK,eAAe,GAAG;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,oBAAY,iBAAiB,GAAG,eAAe,GAAG;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/navigator/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,aAAK,eAAe,GAAG;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,oBAAY,iBAAiB,GAAG,eAAe,GAAG;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,IAAI,EAAE,CAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,KAAM,IAAI,CAAC;IAC1D,MAAM,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC;AAGF,oBAAY,SAAS,GAAG,gBAAgB,CAAC;AAEzC,oBAAY,sBAAsB,GAAG;IACpC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,aAAK,WAAW,GAAG;IAGlB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,CAAC;CACxD,CAAC;AACF,oBAAY,wBAAwB,GAAG,IAAI,CAAE,WAAW,EAAE,MAAM,CAAE,GAAG;IACpE;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,oBAAY,oBAAoB,GAAG,wBAAwB,GAAG;IAC7D;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot-fill-context.d.ts","sourceRoot":"","sources":["../../../src/slot-fill/bubbles-virtually/slot-fill-context.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"slot-fill-context.d.ts","sourceRoot":"","sources":["../../../src/slot-fill/bubbles-virtually/slot-fill-context.js"],"names":[],"mappings":";AAWA;;;;;;;;GAaI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot-fill-provider.d.ts","sourceRoot":"","sources":["../../../src/slot-fill/bubbles-virtually/slot-fill-provider.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slot-fill-provider.d.ts","sourceRoot":"","sources":["../../../src/slot-fill/bubbles-virtually/slot-fill-provider.js"],"names":[],"mappings":"AAqGA;;gBAOC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-slot-fills.d.ts","sourceRoot":"","sources":["../../../src/slot-fill/bubbles-virtually/use-slot-fills.js"],"names":[],"mappings":"AAgBA,qDAOC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-slot.d.ts","sourceRoot":"","sources":["../../../src/slot-fill/bubbles-virtually/use-slot.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-slot.d.ts","sourceRoot":"","sources":["../../../src/slot-fill/bubbles-virtually/use-slot.js"],"names":[],"mappings":"AAgBA,gDA2CC"}
|
|
@@ -14,6 +14,7 @@ export function createSlotFill(name: any): {
|
|
|
14
14
|
__unstableName: any;
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
+
export { default as useSlotFills } from "./bubbles-virtually/use-slot-fills";
|
|
17
18
|
export const Slot: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
18
19
|
export { useSlot };
|
|
19
20
|
import useSlot from "./bubbles-virtually/use-slot";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/slot-fill/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/slot-fill/index.js"],"names":[],"mappings":"AAkBA,8CAUC;AAQD;;;gBAQC;AAED;;;;;;;;;;EAYC;;AA7BD,iGAKI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tab-panel/index.tsx"],"names":[],"mappings":";AAiBA,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAqB7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,QAAQ,CAAE,EACzB,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,cAAc,EACd,WAA0B,EAC1B,WAAyB,EACzB,QAAQ,GACR,EAAE,uBAAuB,CAAE,aAAa,EAAE,KAAK,EAAE,KAAK,CAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tab-panel/index.tsx"],"names":[],"mappings":";AAiBA,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAqB7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,QAAQ,CAAE,EACzB,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,cAAc,EACd,WAA0B,EAC1B,WAAyB,EACzB,QAAQ,GACR,EAAE,uBAAuB,CAAE,aAAa,EAAE,KAAK,EAAE,KAAK,CAAE,eA8DxD;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Internal dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type { ThemeProps } from './types';
|
|
6
|
+
import type { WordPressComponentProps } from '../ui/context';
|
|
7
|
+
/**
|
|
8
|
+
* `Theme` allows defining theme variables for components in the `@wordpress/components` package.
|
|
9
|
+
*
|
|
10
|
+
* Multiple `Theme` components can be nested in order to override specific theme variables.
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```jsx
|
|
15
|
+
* import { __experimentalTheme as Theme } from '@wordpress/components';
|
|
16
|
+
*
|
|
17
|
+
* const Example = () => {
|
|
18
|
+
* return (
|
|
19
|
+
* <Theme accent="red">
|
|
20
|
+
* <Button variant="primary">I'm red</Button>
|
|
21
|
+
* <Theme accent="blue">
|
|
22
|
+
* <Button variant="primary">I'm blue</Button>
|
|
23
|
+
* </Theme>
|
|
24
|
+
* </Theme>
|
|
25
|
+
* );
|
|
26
|
+
* };
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
declare function Theme(props: WordPressComponentProps<ThemeProps, 'div', true>): JSX.Element;
|
|
30
|
+
export default Theme;
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.tsx"],"names":[],"mappings":";AAOA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAK7D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,iBAAS,KAAK,CAAE,KAAK,EAAE,uBAAuB,CAAE,UAAU,EAAE,KAAK,EAAE,IAAI,CAAE,eAUxE;AAED,eAAe,KAAK,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 Theme from '../index';
|
|
9
|
+
declare const meta: ComponentMeta<typeof Theme>;
|
|
10
|
+
export default meta;
|
|
11
|
+
export declare const Default: ComponentStory<typeof Theme>;
|
|
12
|
+
export declare const Nested: ComponentStory<typeof Theme>;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEtE;;GAEG;AACH,OAAO,KAAK,MAAM,UAAU,CAAC;AAG7B,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,KAAK,CAUtC,CAAC;AACF,eAAe,IAAI,CAAC;AAQpB,eAAO,MAAM,OAAO,8BAAsB,CAAC;AAG3C,eAAO,MAAM,MAAM,EAAE,cAAc,CAAE,OAAO,KAAK,CAUhD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Internal dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type { ThemeProps } from './types';
|
|
6
|
+
export declare const Wrapper: import("@emotion/styled").StyledComponent<{
|
|
7
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
+
as?: import("react").ElementType<any> | undefined;
|
|
9
|
+
} & ThemeProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/theme/styles.ts"],"names":[],"mappings":";AAOA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAe1C,eAAO,MAAM,OAAO;;;sHAEnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/test/index.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ReactNode } from 'react';
|
|
5
|
+
export declare type ThemeProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Used to set the accent color (used by components as the primary color).
|
|
8
|
+
*
|
|
9
|
+
* If an accent color is not defined, the default fallback value is the original
|
|
10
|
+
* WP Admin main theme color. No all valid CSS color syntaxes are supported —
|
|
11
|
+
* in particular, keywords (like `'currentcolor'`, `'inherit'`, `'initial'`,
|
|
12
|
+
* `'revert'`, `'unset'`...) and CSS custom properties (e.g.
|
|
13
|
+
* `var(--my-custom-property)`) are _not_ supported values for this property.
|
|
14
|
+
*/
|
|
15
|
+
accent?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The children elements.
|
|
18
|
+
*/
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,oBAAY,UAAU,GAAG;IACxB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC"}
|
|
@@ -6,7 +6,6 @@ export declare const LabelView: import("@emotion/styled").StyledComponent<{
|
|
|
6
6
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
7
|
export declare const labelBlock: import("@emotion/utils").SerializedStyles;
|
|
8
8
|
export declare const buttonView: import("@emotion/utils").SerializedStyles;
|
|
9
|
-
export declare const buttonActive: import("@emotion/utils").SerializedStyles;
|
|
10
9
|
export declare const ButtonContentView: import("@emotion/styled").StyledComponent<{
|
|
11
10
|
theme?: import("@emotion/react").Theme | undefined;
|
|
12
11
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -15,4 +14,5 @@ export declare const separatorActive: import("@emotion/utils").SerializedStyles;
|
|
|
15
14
|
export declare const isIcon: ({ size, }: {
|
|
16
15
|
size: NonNullable<ToggleGroupControlProps['size']>;
|
|
17
16
|
}) => import("@emotion/utils").SerializedStyles;
|
|
17
|
+
export declare const buttonActive: import("@emotion/utils").SerializedStyles;
|
|
18
18
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/toggle-group-control/toggle-group-control-option-base/styles.ts"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,SAAS;;;yGAKrB,CAAC;AAEF,eAAO,MAAM,UAAU,2CAEtB,CAAC;AAEF,eAAO,MAAM,UAAU,2CAgCtB,CAAC;AAEF,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/toggle-group-control/toggle-group-control-option-base/styles.ts"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,SAAS;;;yGAKrB,CAAC;AAEF,eAAO,MAAM,UAAU,2CAEtB,CAAC;AAEF,eAAO,MAAM,UAAU,2CAgCtB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;yGAG7B,CAAC;AAEF,eAAO,MAAM,eAAe,2CAE3B,CAAC;AAEF,eAAO,MAAM,MAAM;UAGZ,YAAa,uBAAuB,CAAE,MAAM,CAAE,CAAE;+CAatD,CAAC;AAEF,eAAO,MAAM,YAAY,2CAMxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/tools-panel/tools-panel/hook.ts"],"names":[],"mappings":";AAeA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EACX,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EAEnB,eAAe,EACf,MAAM,UAAU,CAAC;AA+BlB,wBAAgB,aAAa,CAC5B,KAAK,EAAE,uBAAuB,CAAE,eAAe,EAAE,KAAK,CAAE;;;qCAmD9C,MAAM;;uCA0CN,MAAM,UAAS,qBAAqB;;;;;;kCA/DrC,cAAc;;;;;;wBA4Hb,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/tools-panel/tools-panel/hook.ts"],"names":[],"mappings":";AAeA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EACX,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EAEnB,eAAe,EACf,MAAM,UAAU,CAAC;AA+BlB,wBAAgB,aAAa,CAC5B,KAAK,EAAE,uBAAuB,CAAE,eAAe,EAAE,KAAK,CAAE;;;qCAmD9C,MAAM;;uCA0CN,MAAM,UAAS,qBAAqB;;;;;;kCA/DrC,cAAc;;;;;;wBA4Hb,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyGhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/tools-panel/tools-panel-item/hook.ts"],"names":[],"mappings":";AAWA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,uBAAuB,CAAE,mBAAmB,EAAE,KAAK,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/tools-panel/tools-panel-item/hook.ts"],"names":[],"mappings":";AAWA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,uBAAuB,CAAE,mBAAmB,EAAE,KAAK,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiK5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tooltip/index.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,4BAFU,MAAM,CAEiB;;AAmFjC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tooltip/index.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,4BAFU,MAAM,CAEiB;;AAmFjC,0CA4KC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/components",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.3.0",
|
|
4
4
|
"description": "UI components for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -38,21 +38,21 @@
|
|
|
38
38
|
"@emotion/utils": "^1.0.0",
|
|
39
39
|
"@floating-ui/react-dom": "^1.0.0",
|
|
40
40
|
"@use-gesture/react": "^10.2.6",
|
|
41
|
-
"@wordpress/a11y": "^3.
|
|
42
|
-
"@wordpress/compose": "^5.
|
|
43
|
-
"@wordpress/date": "^4.
|
|
44
|
-
"@wordpress/deprecated": "^3.
|
|
45
|
-
"@wordpress/dom": "^3.
|
|
46
|
-
"@wordpress/element": "^4.
|
|
47
|
-
"@wordpress/escape-html": "^2.
|
|
48
|
-
"@wordpress/hooks": "^3.
|
|
49
|
-
"@wordpress/i18n": "^4.
|
|
50
|
-
"@wordpress/icons": "^9.
|
|
51
|
-
"@wordpress/is-shallow-equal": "^4.
|
|
52
|
-
"@wordpress/keycodes": "^3.
|
|
53
|
-
"@wordpress/primitives": "^3.
|
|
54
|
-
"@wordpress/rich-text": "^5.
|
|
55
|
-
"@wordpress/warning": "^2.
|
|
41
|
+
"@wordpress/a11y": "^3.20.0",
|
|
42
|
+
"@wordpress/compose": "^5.18.0",
|
|
43
|
+
"@wordpress/date": "^4.20.0",
|
|
44
|
+
"@wordpress/deprecated": "^3.20.0",
|
|
45
|
+
"@wordpress/dom": "^3.20.0",
|
|
46
|
+
"@wordpress/element": "^4.18.0",
|
|
47
|
+
"@wordpress/escape-html": "^2.20.0",
|
|
48
|
+
"@wordpress/hooks": "^3.20.0",
|
|
49
|
+
"@wordpress/i18n": "^4.20.0",
|
|
50
|
+
"@wordpress/icons": "^9.11.0",
|
|
51
|
+
"@wordpress/is-shallow-equal": "^4.20.0",
|
|
52
|
+
"@wordpress/keycodes": "^3.20.0",
|
|
53
|
+
"@wordpress/primitives": "^3.18.0",
|
|
54
|
+
"@wordpress/rich-text": "^5.18.0",
|
|
55
|
+
"@wordpress/warning": "^2.20.0",
|
|
56
56
|
"change-case": "^4.1.2",
|
|
57
57
|
"classnames": "^2.3.1",
|
|
58
58
|
"colord": "^2.7.0",
|
|
@@ -69,7 +69,8 @@
|
|
|
69
69
|
"reakit": "^1.3.8",
|
|
70
70
|
"remove-accents": "^0.4.2",
|
|
71
71
|
"use-lilius": "^2.0.1",
|
|
72
|
-
"uuid": "^8.3.0"
|
|
72
|
+
"uuid": "^8.3.0",
|
|
73
|
+
"valtio": "^1.7.0"
|
|
73
74
|
},
|
|
74
75
|
"peerDependencies": {
|
|
75
76
|
"react": "^17.0.0",
|
|
@@ -78,5 +79,5 @@
|
|
|
78
79
|
"publishConfig": {
|
|
79
80
|
"access": "public"
|
|
80
81
|
},
|
|
81
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "a2ff0e6471c88436dad0287beb88d1729aa6f5dd"
|
|
82
83
|
}
|
|
@@ -1,91 +1,46 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { render,
|
|
5
|
-
import { act } from 'react-dom/test-utils';
|
|
4
|
+
import { render, screen, within } from '@testing-library/react';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* Internal dependencies
|
|
9
8
|
*/
|
|
10
9
|
import AlignmentMatrixControl from '../';
|
|
11
10
|
|
|
12
|
-
const __windowFocus = window.focus;
|
|
13
|
-
|
|
14
|
-
beforeAll( () => {
|
|
15
|
-
window.focus = jest.fn();
|
|
16
|
-
} );
|
|
17
|
-
|
|
18
|
-
afterAll( () => {
|
|
19
|
-
window.focus = __windowFocus;
|
|
20
|
-
} );
|
|
21
|
-
|
|
22
|
-
let container = null;
|
|
23
|
-
|
|
24
|
-
beforeEach( () => {
|
|
25
|
-
container = document.createElement( 'div' );
|
|
26
|
-
document.body.appendChild( container );
|
|
27
|
-
} );
|
|
28
|
-
|
|
29
|
-
afterEach( () => {
|
|
30
|
-
unmountComponentAtNode( container );
|
|
31
|
-
container.remove();
|
|
32
|
-
container = null;
|
|
33
|
-
} );
|
|
34
|
-
|
|
35
11
|
const getControl = () => {
|
|
36
|
-
return
|
|
12
|
+
return screen.getByRole( 'grid' );
|
|
37
13
|
};
|
|
38
14
|
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
return control.querySelectorAll( '[role="gridcell"]' );
|
|
15
|
+
const getCell = ( name ) => {
|
|
16
|
+
return within( getControl() ).getByRole( 'gridcell', { name } );
|
|
42
17
|
};
|
|
43
18
|
|
|
44
19
|
describe( 'AlignmentMatrixControl', () => {
|
|
45
20
|
describe( 'Basic rendering', () => {
|
|
46
21
|
it( 'should render', () => {
|
|
47
|
-
|
|
48
|
-
render( <AlignmentMatrixControl />, container );
|
|
49
|
-
} );
|
|
50
|
-
const control = getControl();
|
|
22
|
+
render( <AlignmentMatrixControl /> );
|
|
51
23
|
|
|
52
|
-
expect(
|
|
24
|
+
expect( getControl() ).toBeInTheDocument();
|
|
53
25
|
} );
|
|
54
26
|
} );
|
|
55
27
|
|
|
56
28
|
describe( 'Change value', () => {
|
|
57
|
-
|
|
58
|
-
|
|
29
|
+
const alignments = [ 'center left', 'center center', 'bottom center' ];
|
|
30
|
+
|
|
31
|
+
it.each( alignments )(
|
|
32
|
+
'should change value on %s cell click',
|
|
33
|
+
( alignment ) => {
|
|
34
|
+
const spy = jest.fn();
|
|
59
35
|
|
|
60
|
-
act( () => {
|
|
61
36
|
render(
|
|
62
|
-
<AlignmentMatrixControl
|
|
63
|
-
value={ 'center' }
|
|
64
|
-
onChange={ spy }
|
|
65
|
-
/>,
|
|
66
|
-
container
|
|
37
|
+
<AlignmentMatrixControl value="center" onChange={ spy } />
|
|
67
38
|
);
|
|
68
|
-
} );
|
|
69
|
-
|
|
70
|
-
const cells = getCells();
|
|
71
|
-
|
|
72
|
-
act( () => {
|
|
73
|
-
cells[ 3 ].focus();
|
|
74
|
-
} );
|
|
75
39
|
|
|
76
|
-
|
|
40
|
+
getCell( alignment ).focus();
|
|
77
41
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
expect( spy.mock.calls[ 1 ][ 0 ] ).toBe( 'center center' );
|
|
83
|
-
|
|
84
|
-
act( () => {
|
|
85
|
-
cells[ 7 ].focus();
|
|
86
|
-
} );
|
|
87
|
-
|
|
88
|
-
expect( spy.mock.calls[ 2 ][ 0 ] ).toBe( 'bottom center' );
|
|
89
|
-
} );
|
|
42
|
+
expect( spy ).toHaveBeenCalledWith( alignment );
|
|
43
|
+
}
|
|
44
|
+
);
|
|
90
45
|
} );
|
|
91
46
|
} );
|
|
@@ -14,18 +14,14 @@ const TestField = ( props ) => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
describe( 'base field', () => {
|
|
17
|
-
let base;
|
|
18
|
-
|
|
19
|
-
beforeEach( () => {
|
|
20
|
-
base = render( <TestField /> ).container;
|
|
21
|
-
} );
|
|
22
|
-
|
|
23
17
|
it( 'should render correctly', () => {
|
|
18
|
+
const base = render( <TestField /> ).container;
|
|
24
19
|
expect( base.firstChild ).toMatchSnapshot();
|
|
25
20
|
} );
|
|
26
21
|
|
|
27
22
|
describe( 'props', () => {
|
|
28
23
|
it( 'should render error styles', () => {
|
|
24
|
+
const base = render( <TestField /> ).container;
|
|
29
25
|
const { container } = render( <TestField hasError /> );
|
|
30
26
|
expect( container.firstChild ).toMatchStyleDiffSnapshot(
|
|
31
27
|
base.firstChild
|
|
@@ -33,6 +29,7 @@ describe( 'base field', () => {
|
|
|
33
29
|
} );
|
|
34
30
|
|
|
35
31
|
it( 'should render inline styles', () => {
|
|
32
|
+
const base = render( <TestField /> ).container;
|
|
36
33
|
const { container } = render( <TestField isInline /> );
|
|
37
34
|
expect( container.firstChild ).toMatchStyleDiffSnapshot(
|
|
38
35
|
base.firstChild
|
|
@@ -40,6 +37,7 @@ describe( 'base field', () => {
|
|
|
40
37
|
} );
|
|
41
38
|
|
|
42
39
|
it( 'should render subtle styles', () => {
|
|
40
|
+
const base = render( <TestField /> ).container;
|
|
43
41
|
const { container } = render( <TestField isSubtle /> );
|
|
44
42
|
expect( container.firstChild ).toMatchStyleDiffSnapshot(
|
|
45
43
|
base.firstChild
|
|
@@ -46,6 +46,7 @@ const BorderBoxControl = (
|
|
|
46
46
|
className,
|
|
47
47
|
colors,
|
|
48
48
|
disableCustomColors,
|
|
49
|
+
disableUnits,
|
|
49
50
|
enableAlpha,
|
|
50
51
|
enableStyle,
|
|
51
52
|
hasMixedBorders,
|
|
@@ -100,6 +101,7 @@ const BorderBoxControl = (
|
|
|
100
101
|
<BorderControl
|
|
101
102
|
className={ linkedControlClassName }
|
|
102
103
|
colors={ colors }
|
|
104
|
+
disableUnits={ disableUnits }
|
|
103
105
|
disableCustomColors={ disableCustomColors }
|
|
104
106
|
enableAlpha={ enableAlpha }
|
|
105
107
|
enableStyle={ enableStyle }
|