@wordpress/components 20.0.1-next.d6164808d3.0 → 20.0.2-next.957ca95e4c.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 +29 -1
- package/CONTRIBUTING.md +12 -12
- package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js +12 -12
- package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
- package/build/autocomplete/get-default-use-items.js +7 -1
- package/build/autocomplete/get-default-use-items.js.map +1 -1
- package/build/autocomplete/index.js +3 -1
- package/build/autocomplete/index.js.map +1 -1
- package/build/card/card/component.js +6 -11
- package/build/card/card/component.js.map +1 -1
- package/build/card/card/hook.js +0 -10
- package/build/card/card/hook.js.map +1 -1
- package/build/card/card/index.js.map +1 -1
- package/build/card/card-body/component.js +7 -8
- package/build/card/card-body/component.js.map +1 -1
- package/build/card/card-body/hook.js +0 -4
- package/build/card/card-body/hook.js.map +1 -1
- package/build/card/card-body/index.js.map +1 -1
- package/build/card/card-divider/component.js +7 -8
- package/build/card/card-divider/component.js.map +1 -1
- package/build/card/card-divider/hook.js +0 -4
- package/build/card/card-divider/hook.js.map +1 -1
- package/build/card/card-divider/index.js.map +1 -1
- package/build/card/card-footer/component.js +7 -8
- package/build/card/card-footer/component.js.map +1 -1
- package/build/card/card-footer/hook.js +0 -4
- package/build/card/card-footer/hook.js.map +1 -1
- package/build/card/card-footer/index.js.map +1 -1
- package/build/card/card-header/component.js +7 -8
- package/build/card/card-header/component.js.map +1 -1
- package/build/card/card-header/hook.js +0 -4
- package/build/card/card-header/hook.js.map +1 -1
- package/build/card/card-header/index.js.map +1 -1
- package/build/card/card-media/component.js +7 -7
- package/build/card/card-media/component.js.map +1 -1
- package/build/card/card-media/hook.js +0 -4
- package/build/card/card-media/hook.js.map +1 -1
- package/build/card/card-media/index.js.map +1 -1
- package/build/card/context.js.map +1 -1
- package/build/card/index.js.map +1 -1
- package/build/card/styles.js +17 -17
- package/build/card/styles.js.map +1 -1
- package/build/clipboard-button/index.js +16 -1
- package/build/clipboard-button/index.js.map +1 -1
- package/build/color-palette/index.js +6 -2
- package/build/color-palette/index.js.map +1 -1
- package/build/custom-gradient-picker/index.js +11 -0
- package/build/custom-gradient-picker/index.js.map +1 -1
- package/build/date-time/date/index.js +25 -6
- package/build/date-time/date/index.js.map +1 -1
- package/build/date-time/date/styles.js +22 -12
- package/build/date-time/date/styles.js.map +1 -1
- package/build/date-time/date-time/index.js +1 -3
- package/build/date-time/date-time/index.js.map +1 -1
- package/build/date-time/date-time/styles.js +19 -5
- package/build/date-time/date-time/styles.js.map +1 -1
- package/build/date-time/time/styles.js +12 -12
- package/build/date-time/time/styles.js.map +1 -1
- package/build/drop-zone/index.js +2 -4
- package/build/drop-zone/index.js.map +1 -1
- package/build/dropdown-menu/index.js +1 -3
- package/build/dropdown-menu/index.js.map +1 -1
- package/build/dropdown-menu/index.native.js +0 -17
- package/build/dropdown-menu/index.native.js.map +1 -1
- package/build/focal-point-picker/controls.js +4 -4
- package/build/focal-point-picker/controls.js.map +1 -1
- package/build/focal-point-picker/focal-point.js +4 -6
- package/build/focal-point-picker/focal-point.js.map +1 -1
- package/build/focal-point-picker/grid.js +6 -35
- package/build/focal-point-picker/grid.js.map +1 -1
- package/build/focal-point-picker/index.js +160 -330
- package/build/focal-point-picker/index.js.map +1 -1
- package/build/focal-point-picker/media.js +4 -34
- package/build/focal-point-picker/media.js.map +1 -1
- package/build/focal-point-picker/styles/focal-point-picker-style.js +14 -14
- package/build/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
- package/build/focal-point-picker/utils.js +2 -6
- package/build/focal-point-picker/utils.js.map +1 -1
- package/build/focusable-iframe/index.js +6 -0
- package/build/focusable-iframe/index.js.map +1 -1
- package/build/form-token-field/index.js +18 -15
- package/build/form-token-field/index.js.map +1 -1
- package/build/gradient-picker/index.js +12 -1
- package/build/gradient-picker/index.js.map +1 -1
- package/build/guide/index.js +8 -6
- package/build/guide/index.js.map +1 -1
- package/build/higher-order/with-constrained-tabbing/index.js +1 -1
- package/build/higher-order/with-constrained-tabbing/index.js.map +1 -1
- package/build/higher-order/with-spoken-messages/index.js +2 -0
- package/build/higher-order/with-spoken-messages/index.js.map +1 -1
- package/build/isolated-event-container/index.js +4 -0
- package/build/isolated-event-container/index.js.map +1 -1
- package/build/mobile/global-styles-context/utils.native.js +1 -1
- package/build/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build/navigable-container/menu.js +3 -9
- package/build/navigable-container/menu.js.map +1 -1
- package/build/navigation/menu/menu-title-search.js +1 -3
- package/build/navigation/menu/menu-title-search.js.map +1 -1
- package/build/palette-edit/index.js +6 -2
- package/build/palette-edit/index.js.map +1 -1
- package/build/popover/index.js +15 -35
- package/build/popover/index.js.map +1 -1
- package/build/text-highlight/index.js +4 -4
- package/build/text-highlight/index.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/component.js +1 -1
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/styles.js +23 -8
- package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build/tooltip/index.js +1 -7
- package/build/tooltip/index.js.map +1 -1
- package/build/tree-grid/index.js +4 -10
- package/build/tree-grid/index.js.map +1 -1
- package/build/utils/strings.js +13 -0
- package/build/utils/strings.js.map +1 -1
- package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js +12 -12
- package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
- package/build-module/autocomplete/get-default-use-items.js +6 -1
- package/build-module/autocomplete/get-default-use-items.js.map +1 -1
- package/build-module/autocomplete/index.js +2 -1
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/card/card/component.js +5 -10
- package/build-module/card/card/component.js.map +1 -1
- package/build-module/card/card/hook.js +0 -9
- package/build-module/card/card/hook.js.map +1 -1
- package/build-module/card/card/index.js.map +1 -1
- package/build-module/card/card-body/component.js +7 -8
- package/build-module/card/card-body/component.js.map +1 -1
- package/build-module/card/card-body/hook.js +0 -4
- package/build-module/card/card-body/hook.js.map +1 -1
- package/build-module/card/card-body/index.js.map +1 -1
- package/build-module/card/card-divider/component.js +7 -8
- package/build-module/card/card-divider/component.js.map +1 -1
- package/build-module/card/card-divider/hook.js +0 -4
- package/build-module/card/card-divider/hook.js.map +1 -1
- package/build-module/card/card-divider/index.js.map +1 -1
- package/build-module/card/card-footer/component.js +7 -8
- package/build-module/card/card-footer/component.js.map +1 -1
- package/build-module/card/card-footer/hook.js +0 -4
- package/build-module/card/card-footer/hook.js.map +1 -1
- package/build-module/card/card-footer/index.js.map +1 -1
- package/build-module/card/card-header/component.js +7 -8
- package/build-module/card/card-header/component.js.map +1 -1
- package/build-module/card/card-header/hook.js +0 -4
- package/build-module/card/card-header/hook.js.map +1 -1
- package/build-module/card/card-header/index.js.map +1 -1
- package/build-module/card/card-media/component.js +7 -7
- package/build-module/card/card-media/component.js.map +1 -1
- package/build-module/card/card-media/hook.js +0 -4
- package/build-module/card/card-media/hook.js.map +1 -1
- package/build-module/card/card-media/index.js.map +1 -1
- package/build-module/card/context.js.map +1 -1
- package/build-module/card/index.js.map +1 -1
- package/build-module/card/styles.js +17 -17
- package/build-module/card/styles.js.map +1 -1
- package/build-module/clipboard-button/index.js +17 -1
- package/build-module/clipboard-button/index.js.map +1 -1
- package/build-module/color-palette/index.js +5 -2
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/custom-gradient-picker/index.js +10 -0
- package/build-module/custom-gradient-picker/index.js.map +1 -1
- package/build-module/date-time/date/index.js +27 -8
- package/build-module/date-time/date/index.js.map +1 -1
- package/build-module/date-time/date/styles.js +21 -5
- package/build-module/date-time/date/styles.js.map +1 -1
- package/build-module/date-time/date-time/index.js +2 -3
- package/build-module/date-time/date-time/index.js.map +1 -1
- package/build-module/date-time/date-time/styles.js +20 -1
- package/build-module/date-time/date-time/styles.js.map +1 -1
- package/build-module/date-time/time/styles.js +12 -12
- package/build-module/date-time/time/styles.js.map +1 -1
- package/build-module/drop-zone/index.js +2 -3
- package/build-module/drop-zone/index.js.map +1 -1
- package/build-module/dropdown-menu/index.js +1 -2
- package/build-module/dropdown-menu/index.js.map +1 -1
- package/build-module/dropdown-menu/index.native.js +0 -16
- package/build-module/dropdown-menu/index.native.js.map +1 -1
- package/build-module/focal-point-picker/controls.js +4 -4
- package/build-module/focal-point-picker/controls.js.map +1 -1
- package/build-module/focal-point-picker/focal-point.js +4 -6
- package/build-module/focal-point-picker/focal-point.js.map +1 -1
- package/build-module/focal-point-picker/grid.js +6 -34
- package/build-module/focal-point-picker/grid.js.map +1 -1
- package/build-module/focal-point-picker/index.js +158 -325
- package/build-module/focal-point-picker/index.js.map +1 -1
- package/build-module/focal-point-picker/media.js +4 -36
- package/build-module/focal-point-picker/media.js.map +1 -1
- package/build-module/focal-point-picker/styles/focal-point-picker-style.js +13 -14
- package/build-module/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
- package/build-module/focal-point-picker/utils.js +2 -6
- package/build-module/focal-point-picker/utils.js.map +1 -1
- package/build-module/focusable-iframe/index.js +6 -0
- package/build-module/focusable-iframe/index.js.map +1 -1
- package/build-module/form-token-field/index.js +18 -14
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/gradient-picker/index.js +11 -1
- package/build-module/gradient-picker/index.js.map +1 -1
- package/build-module/guide/index.js +8 -5
- package/build-module/guide/index.js.map +1 -1
- package/build-module/higher-order/with-constrained-tabbing/index.js +1 -1
- package/build-module/higher-order/with-constrained-tabbing/index.js.map +1 -1
- package/build-module/higher-order/with-spoken-messages/index.js +2 -0
- package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
- package/build-module/isolated-event-container/index.js +3 -0
- package/build-module/isolated-event-container/index.js.map +1 -1
- package/build-module/mobile/global-styles-context/utils.native.js +2 -2
- package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build-module/navigable-container/menu.js +3 -8
- package/build-module/navigable-container/menu.js.map +1 -1
- package/build-module/navigation/menu/menu-title-search.js +1 -2
- package/build-module/navigation/menu/menu-title-search.js.map +1 -1
- package/build-module/palette-edit/index.js +6 -2
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/popover/index.js +15 -35
- package/build-module/popover/index.js.map +1 -1
- package/build-module/text-highlight/index.js +2 -5
- package/build-module/text-highlight/index.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/component.js +2 -1
- package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/styles.js +20 -6
- package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build-module/tooltip/index.js +1 -6
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/tree-grid/index.js +4 -9
- package/build-module/tree-grid/index.js.map +1 -1
- package/build-module/utils/strings.js +11 -0
- package/build-module/utils/strings.js.map +1 -1
- package/build-style/style-rtl.css +2 -21
- package/build-style/style.css +2 -21
- package/build-types/animation/index.d.ts +2 -0
- package/build-types/animation/index.d.ts.map +1 -0
- package/build-types/card/card/component.d.ts +3 -3
- package/build-types/card/card/component.d.ts.map +1 -1
- package/build-types/card/card/hook.d.ts +7 -2
- package/build-types/card/card/hook.d.ts.map +1 -1
- package/build-types/card/card/index.d.ts +2 -2
- package/build-types/card/card/index.d.ts.map +1 -1
- package/build-types/card/card-body/component.d.ts +3 -3
- package/build-types/card/card-body/component.d.ts.map +1 -1
- package/build-types/card/card-body/hook.d.ts +5 -2
- package/build-types/card/card-body/hook.d.ts.map +1 -1
- package/build-types/card/card-body/index.d.ts +2 -2
- package/build-types/card/card-body/index.d.ts.map +1 -1
- package/build-types/card/card-divider/component.d.ts +3 -3
- package/build-types/card/card-divider/component.d.ts.map +1 -1
- package/build-types/card/card-divider/hook.d.ts +5 -2
- package/build-types/card/card-divider/hook.d.ts.map +1 -1
- package/build-types/card/card-divider/index.d.ts +2 -2
- package/build-types/card/card-divider/index.d.ts.map +1 -1
- package/build-types/card/card-footer/component.d.ts +3 -3
- package/build-types/card/card-footer/component.d.ts.map +1 -1
- package/build-types/card/card-footer/hook.d.ts +5 -2
- package/build-types/card/card-footer/hook.d.ts.map +1 -1
- package/build-types/card/card-footer/index.d.ts +2 -2
- package/build-types/card/card-footer/index.d.ts.map +1 -1
- package/build-types/card/card-header/component.d.ts +3 -3
- package/build-types/card/card-header/component.d.ts.map +1 -1
- package/build-types/card/card-header/hook.d.ts +5 -2
- package/build-types/card/card-header/hook.d.ts.map +1 -1
- package/build-types/card/card-header/index.d.ts +2 -2
- package/build-types/card/card-header/index.d.ts.map +1 -1
- package/build-types/card/card-media/component.d.ts +3 -4
- package/build-types/card/card-media/component.d.ts.map +1 -1
- package/build-types/card/card-media/hook.d.ts +6 -5
- package/build-types/card/card-media/hook.d.ts.map +1 -1
- package/build-types/card/card-media/index.d.ts +2 -2
- package/build-types/card/card-media/index.d.ts.map +1 -1
- package/build-types/card/context.d.ts +3 -2
- package/build-types/card/context.d.ts.map +1 -1
- package/build-types/card/index.d.ts +6 -6
- package/build-types/card/index.d.ts.map +1 -1
- package/build-types/card/stories/index.d.ts +12 -0
- package/build-types/card/stories/index.d.ts.map +1 -0
- package/build-types/card/styles.d.ts +20 -22
- package/build-types/card/styles.d.ts.map +1 -1
- package/build-types/card/test/index.d.ts +2 -0
- package/build-types/card/test/index.d.ts.map +1 -0
- package/build-types/card/types.d.ts +7 -1
- package/build-types/card/types.d.ts.map +1 -1
- package/build-types/clipboard-button/index.d.ts +16 -0
- package/build-types/clipboard-button/index.d.ts.map +1 -0
- package/build-types/color-palette/index.d.ts.map +1 -1
- package/build-types/composite/index.d.ts +2 -0
- package/build-types/composite/index.d.ts.map +1 -0
- package/build-types/date-time/date/index.d.ts +1 -1
- package/build-types/date-time/date/index.d.ts.map +1 -1
- package/build-types/date-time/date/styles.d.ts +4 -0
- package/build-types/date-time/date/styles.d.ts.map +1 -1
- package/build-types/date-time/date-time/index.d.ts.map +1 -1
- package/build-types/date-time/date-time/styles.d.ts +13 -0
- package/build-types/date-time/date-time/styles.d.ts.map +1 -1
- package/build-types/date-time/time/styles.d.ts.map +1 -1
- package/build-types/disclosure/index.d.ts +2 -0
- package/build-types/disclosure/index.d.ts.map +1 -0
- package/build-types/dropdown-menu/index.d.ts.map +1 -1
- package/build-types/focusable-iframe/index.d.ts +8 -0
- package/build-types/focusable-iframe/index.d.ts.map +1 -0
- package/build-types/form-token-field/index.d.ts.map +1 -1
- package/build-types/form-token-field/test/index.d.ts +2 -0
- package/build-types/form-token-field/test/index.d.ts.map +1 -0
- package/build-types/higher-order/with-constrained-tabbing/index.d.ts +3 -0
- package/build-types/higher-order/with-constrained-tabbing/index.d.ts.map +1 -0
- package/build-types/higher-order/with-spoken-messages/index.d.ts +4 -0
- package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -0
- package/build-types/isolated-event-container/index.d.ts +3 -0
- package/build-types/isolated-event-container/index.d.ts.map +1 -0
- package/build-types/mobile/inserter-button/sparkles.d.ts +3 -0
- package/build-types/mobile/inserter-button/sparkles.d.ts.map +1 -0
- package/build-types/navigable-container/menu.d.ts.map +1 -1
- package/build-types/popover/index.d.ts +0 -1
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/radio-context/index.d.ts +6 -0
- package/build-types/radio-context/index.d.ts.map +1 -0
- package/build-types/text-highlight/index.d.ts +0 -3
- package/build-types/text-highlight/index.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +4 -0
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/build-types/utils/strings.d.ts +8 -0
- package/build-types/utils/strings.d.ts.map +1 -1
- package/package.json +17 -17
- package/src/alignment-matrix-control/styles/alignment-matrix-control-styles.js +1 -0
- package/src/autocomplete/get-default-use-items.js +6 -1
- package/src/autocomplete/index.js +2 -1
- package/src/card/card/{component.js → component.tsx} +13 -9
- package/src/card/card/{hook.js → hook.ts} +11 -11
- package/src/card/card/{index.js → index.ts} +0 -0
- package/src/card/card-body/{component.js → component.tsx} +13 -9
- package/src/card/card-body/{hook.js → hook.ts} +5 -5
- package/src/card/card-body/{index.js → index.ts} +0 -0
- package/src/card/card-divider/{component.js → component.tsx} +16 -10
- package/src/card/card-divider/{hook.js → hook.ts} +5 -5
- package/src/card/card-divider/{index.js → index.ts} +0 -0
- package/src/card/card-footer/{component.js → component.tsx} +13 -9
- package/src/card/card-footer/{hook.js → hook.ts} +5 -5
- package/src/card/card-footer/{index.js → index.ts} +0 -0
- package/src/card/card-header/{component.js → component.tsx} +13 -9
- package/src/card/card-header/{hook.js → hook.ts} +5 -5
- package/src/card/card-header/{index.js → index.ts} +0 -0
- package/src/card/card-media/{component.js → component.tsx} +13 -8
- package/src/card/card-media/{hook.js → hook.ts} +5 -5
- package/src/card/card-media/{index.js → index.ts} +0 -0
- package/src/card/{context.js → context.ts} +0 -0
- package/src/card/{index.js → index.ts} +0 -0
- package/src/card/stories/index.tsx +75 -0
- package/src/card/{styles.js → styles.ts} +0 -0
- package/src/card/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
- package/src/card/test/{index.js → index.tsx} +3 -3
- package/src/card/types.ts +8 -1
- package/src/clipboard-button/index.js +13 -0
- package/src/color-palette/index.js +8 -5
- package/src/color-palette/style.scss +0 -14
- package/src/color-palette/test/__snapshots__/index.js.snap +11 -4
- package/src/custom-gradient-picker/index.js +12 -0
- package/src/custom-gradient-picker/stories/index.js +3 -0
- package/src/date-time/date/index.tsx +26 -6
- package/src/date-time/date/styles.ts +6 -0
- package/src/date-time/date/test/index.tsx +6 -2
- package/src/date-time/date-time/index.tsx +3 -4
- package/src/date-time/date-time/styles.ts +9 -0
- package/src/date-time/time/styles.ts +1 -0
- package/src/drop-zone/index.js +2 -3
- package/src/dropdown-menu/index.js +1 -2
- package/src/dropdown-menu/index.native.js +0 -13
- package/src/dropdown-menu/test/index.js +54 -58
- package/src/focal-point-picker/README.md +3 -6
- package/src/focal-point-picker/controls.js +4 -4
- package/src/focal-point-picker/focal-point.js +2 -8
- package/src/focal-point-picker/grid.js +5 -41
- package/src/focal-point-picker/index.js +161 -303
- package/src/focal-point-picker/media.js +4 -28
- package/src/focal-point-picker/styles/focal-point-picker-style.js +5 -8
- package/src/focal-point-picker/test/index.js +1 -1
- package/src/focal-point-picker/utils.js +2 -6
- package/src/focusable-iframe/index.js +5 -0
- package/src/form-token-field/index.tsx +17 -23
- package/src/form-token-field/test/index.tsx +2106 -0
- package/src/gradient-picker/README.md +9 -0
- package/src/gradient-picker/index.js +9 -0
- package/src/gradient-picker/stories/index.js +1 -0
- package/src/guide/index.js +6 -3
- package/src/guide/test/index.js +138 -1
- package/src/higher-order/with-constrained-tabbing/index.js +1 -1
- package/src/higher-order/with-spoken-messages/index.js +2 -0
- package/src/isolated-event-container/index.js +3 -0
- package/src/mobile/global-styles-context/utils.native.js +7 -2
- package/src/navigable-container/menu.js +3 -7
- package/src/navigation/menu/menu-title-search.js +1 -2
- package/src/palette-edit/index.js +14 -10
- package/src/palette-edit/style.scss +3 -11
- package/src/placeholder/style.scss +1 -4
- package/src/popover/index.js +17 -35
- package/src/popover/stories/index.js +0 -1
- package/src/text-highlight/index.tsx +1 -5
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +62 -44
- package/src/toggle-group-control/toggle-group-control/component.tsx +3 -2
- package/src/toggle-group-control/toggle-group-control/styles.ts +5 -0
- package/src/tooltip/index.js +1 -5
- package/src/tree-grid/index.js +4 -9
- package/src/utils/strings.ts +11 -0
- package/tsconfig.json +45 -76
- package/tsconfig.tsbuildinfo +1 -1
- package/build/ui/__storybook-utils/example-grid.js +0 -88
- package/build/ui/__storybook-utils/example-grid.js.map +0 -1
- package/build/ui/__storybook-utils/index.js +0 -19
- package/build/ui/__storybook-utils/index.js.map +0 -1
- package/build/ui/__storybook-utils/page.js +0 -43
- package/build/ui/__storybook-utils/page.js.map +0 -1
- package/build/utils/keyboard.js +0 -41
- package/build/utils/keyboard.js.map +0 -1
- package/build-module/ui/__storybook-utils/example-grid.js +0 -69
- package/build-module/ui/__storybook-utils/example-grid.js.map +0 -1
- package/build-module/ui/__storybook-utils/index.js +0 -2
- package/build-module/ui/__storybook-utils/index.js.map +0 -1
- package/build-module/ui/__storybook-utils/page.js +0 -32
- package/build-module/ui/__storybook-utils/page.js.map +0 -1
- package/build-module/utils/keyboard.js +0 -33
- package/build-module/utils/keyboard.js.map +0 -1
- package/build-types/form-token-field/test/lib/fixtures.d.ts +0 -26
- package/build-types/form-token-field/test/lib/fixtures.d.ts.map +0 -1
- package/build-types/form-token-field/test/lib/token-field-wrapper.d.ts +0 -21
- package/build-types/form-token-field/test/lib/token-field-wrapper.d.ts.map +0 -1
- package/build-types/utils/keyboard.d.ts +0 -12
- package/build-types/utils/keyboard.d.ts.map +0 -1
- package/src/card/stories/index.js +0 -209
- package/src/form-token-field/test/index.js +0 -442
- package/src/form-token-field/test/lib/fixtures.js +0 -89
- package/src/form-token-field/test/lib/token-field-wrapper.tsx +0 -71
- package/src/guide/test/page-control.js +0 -40
- package/src/ui/__storybook-utils/example-grid.js +0 -61
- package/src/ui/__storybook-utils/index.js +0 -1
- package/src/ui/__storybook-utils/page.js +0 -29
- package/src/utils/keyboard.js +0 -28
- package/src/utils/test/keyboard.js +0 -34
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/higher-order/with-spoken-messages/index.js"],"names":[],"mappings":";;0BAMc,OAAO,oBAAoB,EAAE,WAAW"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/isolated-event-container/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sparkles.d.ts","sourceRoot":"","sources":["../../../src/mobile/inserter-button/sparkles.js"],"names":[],"mappings":";AAKA,oCAOE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../src/navigable-container/menu.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../src/navigable-container/menu.js"],"names":[],"mappings":"AAaA;;;;0BA2CC"}
|
|
@@ -19,7 +19,6 @@ declare const PopoverContainer: import("react").ForwardRefExoticComponent<Pick<{
|
|
|
19
19
|
expandOnMobile: any;
|
|
20
20
|
onFocusOutside: any;
|
|
21
21
|
__unstableSlotName?: string | undefined;
|
|
22
|
-
__unstableObserveElement: any;
|
|
23
22
|
__unstableForcePosition?: boolean | undefined;
|
|
24
23
|
__unstableShift?: boolean | undefined;
|
|
25
24
|
}, string | number> & import("react").RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/popover/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/popover/index.js"],"names":[],"mappings":";AA+eA;;;;;;;;;;;;;;;;;;;;;;0DAA+C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/radio-context/index.js"],"names":[],"mappings":";AAKA;;;GAGI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/text-highlight/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/text-highlight/index.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,UAAY,kBAAkB,gBAgBvD,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/toggle-group-control/toggle-group-control/component.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/toggle-group-control/toggle-group-control/component.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAuGxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,kBAAkB,wFAG9B,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -10,4 +10,8 @@ export declare const BackdropView: import("@emotion/styled").StyledComponent<{
|
|
|
10
10
|
theme?: import("@emotion/react").Theme | undefined;
|
|
11
11
|
as?: import("react").ElementType<any> | undefined;
|
|
12
12
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
13
|
+
export declare const VisualLabelWrapper: import("@emotion/styled").StyledComponent<{
|
|
14
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
15
|
+
as?: import("react").ElementType<any> | undefined;
|
|
16
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
13
17
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/toggle-group-control/toggle-group-control/styles.ts"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,kBAAkB;UAGxB,YAAa,uBAAuB,CAAE,MAAM,CAAE,CAAE;+CAoBtD,CAAC;AAEF,eAAO,MAAM,MAAM,2CAMlB,CAAC;AAEF,eAAO,MAAM,sBAAsB,SAC5B,YAAa,uBAAuB,CAAE,MAAM,CAAE,CAAE,8CAUtD,CAAC;AAEF,eAAO,MAAM,KAAK,2CAGjB,CAAC;AAEF,eAAO,MAAM,YAAY;;;yGAWxB,CAAC"}
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/toggle-group-control/toggle-group-control/styles.ts"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,kBAAkB;UAGxB,YAAa,uBAAuB,CAAE,MAAM,CAAE,CAAE;+CAoBtD,CAAC;AAEF,eAAO,MAAM,MAAM,2CAMlB,CAAC;AAEF,eAAO,MAAM,sBAAsB,SAC5B,YAAa,uBAAuB,CAAE,MAAM,CAAE,CAAE,8CAUtD,CAAC;AAEF,eAAO,MAAM,KAAK,2CAGjB,CAAC;AAEF,eAAO,MAAM,YAAY;;;yGAWxB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;yGAG9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tooltip/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tooltip/index.js"],"names":[],"mappings":"AAqBA;;;;GAIG;AACH,4BAFU,MAAM,CAEiB;;AAmFjC,0CAoKC"}
|
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
export declare const normalizeTextString: (value: string) => string;
|
|
2
|
+
/**
|
|
3
|
+
* Escapes the RegExp special characters.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} string Input string.
|
|
6
|
+
*
|
|
7
|
+
* @return {string} Regex-escaped string.
|
|
8
|
+
*/
|
|
9
|
+
export declare function escapeRegExp(string: string): string;
|
|
2
10
|
//# sourceMappingURL=strings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/utils/strings.ts"],"names":[],"mappings":"AAmEA,eAAO,MAAM,mBAAmB,UAAY,MAAM,KAAI,MAIrD,CAAC"}
|
|
1
|
+
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/utils/strings.ts"],"names":[],"mappings":"AAmEA,eAAO,MAAM,mBAAmB,UAAY,MAAM,KAAI,MAIrD,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAE,MAAM,EAAE,MAAM,GAAI,MAAM,CAErD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/components",
|
|
3
|
-
"version": "20.0.
|
|
3
|
+
"version": "20.0.2-next.957ca95e4c.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.16.1-next.957ca95e4c.0",
|
|
42
|
+
"@wordpress/compose": "^5.14.1-next.957ca95e4c.0",
|
|
43
|
+
"@wordpress/date": "^4.16.1-next.957ca95e4c.0",
|
|
44
|
+
"@wordpress/deprecated": "^3.16.1-next.957ca95e4c.0",
|
|
45
|
+
"@wordpress/dom": "^3.16.1-next.957ca95e4c.0",
|
|
46
|
+
"@wordpress/element": "^4.14.1-next.957ca95e4c.0",
|
|
47
|
+
"@wordpress/escape-html": "^2.16.1-next.957ca95e4c.0",
|
|
48
|
+
"@wordpress/hooks": "^3.16.1-next.957ca95e4c.0",
|
|
49
|
+
"@wordpress/i18n": "^4.16.1-next.957ca95e4c.0",
|
|
50
|
+
"@wordpress/icons": "^9.7.1-next.957ca95e4c.0",
|
|
51
|
+
"@wordpress/is-shallow-equal": "^4.16.1-next.957ca95e4c.0",
|
|
52
|
+
"@wordpress/keycodes": "^3.16.1-next.957ca95e4c.0",
|
|
53
|
+
"@wordpress/primitives": "^3.14.1-next.957ca95e4c.0",
|
|
54
|
+
"@wordpress/rich-text": "^5.14.1-next.957ca95e4c.0",
|
|
55
|
+
"@wordpress/warning": "^2.16.1-next.957ca95e4c.0",
|
|
56
56
|
"change-case": "^4.1.2",
|
|
57
57
|
"classnames": "^2.3.1",
|
|
58
58
|
"colord": "^2.7.0",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"publishConfig": {
|
|
79
79
|
"access": "public"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "272a74bbbaab10ee24424eafe9578e705fbfbbb4"
|
|
82
82
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { debounce
|
|
4
|
+
import { debounce } from 'lodash';
|
|
5
5
|
import removeAccents from 'remove-accents';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -9,6 +9,11 @@ import removeAccents from 'remove-accents';
|
|
|
9
9
|
*/
|
|
10
10
|
import { useLayoutEffect, useState } from '@wordpress/element';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Internal dependencies
|
|
14
|
+
*/
|
|
15
|
+
import { escapeRegExp } from '../utils/strings';
|
|
16
|
+
|
|
12
17
|
function filterOptions( search, options = [], maxResults = 10 ) {
|
|
13
18
|
const filtered = [];
|
|
14
19
|
for ( let i = 0; i < options.length; i++ ) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { find } from 'lodash';
|
|
5
5
|
import removeAccents from 'remove-accents';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -34,6 +34,7 @@ import { speak } from '@wordpress/a11y';
|
|
|
34
34
|
* Internal dependencies
|
|
35
35
|
*/
|
|
36
36
|
import { getAutoCompleterUI } from './autocompleter-ui';
|
|
37
|
+
import { escapeRegExp } from '../utils/strings';
|
|
37
38
|
|
|
38
39
|
/**
|
|
39
40
|
* A raw completer option.
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { css } from '@emotion/react';
|
|
5
|
+
import type { ForwardedRef } from 'react';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* WordPress dependencies
|
|
@@ -11,19 +12,23 @@ import { useMemo } from '@wordpress/element';
|
|
|
11
12
|
/**
|
|
12
13
|
* Internal dependencies
|
|
13
14
|
*/
|
|
14
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
contextConnect,
|
|
17
|
+
ContextSystemProvider,
|
|
18
|
+
WordPressComponentProps,
|
|
19
|
+
} from '../../ui/context';
|
|
15
20
|
import { Elevation } from '../../elevation';
|
|
16
21
|
import { View } from '../../view';
|
|
17
22
|
import * as styles from '../styles';
|
|
18
23
|
import { useCard } from './hook';
|
|
19
24
|
import CONFIG from '../../utils/config-values';
|
|
20
25
|
import { useCx } from '../../utils/hooks/use-cx';
|
|
26
|
+
import type { Props } from '../types';
|
|
21
27
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
function Card( props, forwardedRef ) {
|
|
28
|
+
function UnconnectedCard(
|
|
29
|
+
props: WordPressComponentProps< Props, 'div' >,
|
|
30
|
+
forwardedRef: ForwardedRef< any >
|
|
31
|
+
) {
|
|
27
32
|
const {
|
|
28
33
|
children,
|
|
29
34
|
elevation,
|
|
@@ -77,7 +82,6 @@ function Card( props, forwardedRef ) {
|
|
|
77
82
|
* `Card` also provides a convenient set of sub-components such as `CardBody`,
|
|
78
83
|
* `CardHeader`, `CardFooter`, and more.
|
|
79
84
|
*
|
|
80
|
-
* @example
|
|
81
85
|
* ```jsx
|
|
82
86
|
* import {
|
|
83
87
|
* Card,
|
|
@@ -105,6 +109,6 @@ function Card( props, forwardedRef ) {
|
|
|
105
109
|
* }
|
|
106
110
|
* ```
|
|
107
111
|
*/
|
|
108
|
-
const
|
|
112
|
+
export const Card = contextConnect( UnconnectedCard, 'Card' );
|
|
109
113
|
|
|
110
|
-
export default
|
|
114
|
+
export default Card;
|
|
@@ -7,17 +7,20 @@ import { useMemo } from '@wordpress/element';
|
|
|
7
7
|
/**
|
|
8
8
|
* Internal dependencies
|
|
9
9
|
*/
|
|
10
|
-
import { useContextSystem } from '../../ui/context';
|
|
10
|
+
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
|
|
11
11
|
import { useSurface } from '../../surface';
|
|
12
12
|
import * as styles from '../styles';
|
|
13
13
|
import { useCx } from '../../utils/hooks/use-cx';
|
|
14
|
+
import type { Props } from '../types';
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
type CardProps = WordPressComponentProps< Props, 'div' >;
|
|
17
|
+
|
|
18
|
+
function useDeprecatedProps( {
|
|
19
|
+
elevation,
|
|
20
|
+
isElevated,
|
|
21
|
+
...otherProps
|
|
22
|
+
}: CardProps ) {
|
|
23
|
+
const propsToReturn: Omit< CardProps, 'isElevated' > = {
|
|
21
24
|
...otherProps,
|
|
22
25
|
};
|
|
23
26
|
let computedElevation = elevation;
|
|
@@ -39,10 +42,7 @@ function useDeprecatedProps( { elevation, isElevated, ...otherProps } ) {
|
|
|
39
42
|
return propsToReturn;
|
|
40
43
|
}
|
|
41
44
|
|
|
42
|
-
|
|
43
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').Props, 'div'>} props
|
|
44
|
-
*/
|
|
45
|
-
export function useCard( props ) {
|
|
45
|
+
export function useCard( props: CardProps ) {
|
|
46
46
|
const {
|
|
47
47
|
className,
|
|
48
48
|
elevation = 0,
|
|
File without changes
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ForwardedRef } from 'react';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
* Internal dependencies
|
|
3
8
|
*/
|
|
4
|
-
import { contextConnect } from '../../ui/context';
|
|
9
|
+
import { contextConnect, WordPressComponentProps } from '../../ui/context';
|
|
5
10
|
import { Scrollable } from '../../scrollable';
|
|
6
11
|
import { View } from '../../view';
|
|
7
12
|
import { useCardBody } from './hook';
|
|
13
|
+
import type { BodyProps } from '../types';
|
|
8
14
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function CardBody( props, forwardedRef ) {
|
|
15
|
+
function UnconnectedCardBody(
|
|
16
|
+
props: WordPressComponentProps< BodyProps, 'div' >,
|
|
17
|
+
forwardedRef: ForwardedRef< any >
|
|
18
|
+
) {
|
|
14
19
|
const { isScrollable, ...otherProps } = useCardBody( props );
|
|
15
20
|
|
|
16
21
|
if ( isScrollable ) {
|
|
@@ -24,7 +29,6 @@ function CardBody( props, forwardedRef ) {
|
|
|
24
29
|
* `CardBody` renders an optional content area for a `Card`.
|
|
25
30
|
* Multiple `CardBody` components can be used within `Card` if needed.
|
|
26
31
|
*
|
|
27
|
-
* @example
|
|
28
32
|
* ```jsx
|
|
29
33
|
* import { Card, CardBody } from `@wordpress/components`;
|
|
30
34
|
*
|
|
@@ -35,6 +39,6 @@ function CardBody( props, forwardedRef ) {
|
|
|
35
39
|
* </Card>
|
|
36
40
|
* ```
|
|
37
41
|
*/
|
|
38
|
-
const
|
|
42
|
+
export const CardBody = contextConnect( UnconnectedCardBody, 'CardBody' );
|
|
39
43
|
|
|
40
|
-
export default
|
|
44
|
+
export default CardBody;
|
|
@@ -6,14 +6,14 @@ import { useMemo } from '@wordpress/element';
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
|
-
import { useContextSystem } from '../../ui/context';
|
|
9
|
+
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
|
|
10
10
|
import * as styles from '../styles';
|
|
11
11
|
import { useCx } from '../../utils/hooks/use-cx';
|
|
12
|
+
import type { BodyProps } from '../types';
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export function useCardBody( props ) {
|
|
14
|
+
export function useCardBody(
|
|
15
|
+
props: WordPressComponentProps< BodyProps, 'div' >
|
|
16
|
+
) {
|
|
17
17
|
const {
|
|
18
18
|
className,
|
|
19
19
|
isScrollable = false,
|
|
File without changes
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import { Divider } from '../../divider';
|
|
6
|
-
import { useCardDivider } from './hook';
|
|
4
|
+
import type { ForwardedRef } from 'react';
|
|
7
5
|
|
|
8
6
|
/**
|
|
9
|
-
*
|
|
10
|
-
* @param {import('react').ForwardedRef<any>} forwardedRef
|
|
7
|
+
* Internal dependencies
|
|
11
8
|
*/
|
|
12
|
-
|
|
9
|
+
import { contextConnect, WordPressComponentProps } from '../../ui/context';
|
|
10
|
+
import { Divider, DividerProps } from '../../divider';
|
|
11
|
+
import { useCardDivider } from './hook';
|
|
12
|
+
|
|
13
|
+
function UnconnectedCardDivider(
|
|
14
|
+
props: WordPressComponentProps< DividerProps, 'hr', false >,
|
|
15
|
+
forwardedRef: ForwardedRef< any >
|
|
16
|
+
) {
|
|
13
17
|
const dividerProps = useCardDivider( props );
|
|
14
18
|
|
|
15
19
|
return <Divider { ...dividerProps } ref={ forwardedRef } />;
|
|
@@ -19,7 +23,6 @@ function CardDivider( props, forwardedRef ) {
|
|
|
19
23
|
* `CardDivider` renders an optional divider within a `Card`.
|
|
20
24
|
* It is typically used to divide multiple `CardBody` components from each other.
|
|
21
25
|
*
|
|
22
|
-
* @example
|
|
23
26
|
* ```jsx
|
|
24
27
|
* import { Card, CardBody, CardDivider } from `@wordpress/components`;
|
|
25
28
|
*
|
|
@@ -30,6 +33,9 @@ function CardDivider( props, forwardedRef ) {
|
|
|
30
33
|
* </Card>
|
|
31
34
|
* ```
|
|
32
35
|
*/
|
|
33
|
-
const
|
|
36
|
+
export const CardDivider = contextConnect(
|
|
37
|
+
UnconnectedCardDivider,
|
|
38
|
+
'CardDivider'
|
|
39
|
+
);
|
|
34
40
|
|
|
35
|
-
export default
|
|
41
|
+
export default CardDivider;
|
|
@@ -6,14 +6,14 @@ import { useMemo } from '@wordpress/element';
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
|
-
import { useContextSystem } from '../../ui/context';
|
|
9
|
+
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
|
|
10
10
|
import * as styles from '../styles';
|
|
11
11
|
import { useCx } from '../../utils/hooks/use-cx';
|
|
12
|
+
import type { DividerProps } from '../../divider';
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export function useCardDivider( props ) {
|
|
14
|
+
export function useCardDivider(
|
|
15
|
+
props: WordPressComponentProps< DividerProps, 'hr', false >
|
|
16
|
+
) {
|
|
17
17
|
const { className, ...otherProps } = useContextSystem(
|
|
18
18
|
props,
|
|
19
19
|
'CardDivider'
|
|
File without changes
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ForwardedRef } from 'react';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
* Internal dependencies
|
|
3
8
|
*/
|
|
4
|
-
import { contextConnect } from '../../ui/context';
|
|
9
|
+
import { contextConnect, WordPressComponentProps } from '../../ui/context';
|
|
5
10
|
import { Flex } from '../../flex';
|
|
6
11
|
import { useCardFooter } from './hook';
|
|
12
|
+
import type { FooterProps } from '../types';
|
|
7
13
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function CardFooter( props, forwardedRef ) {
|
|
14
|
+
function UnconnectedCardFooter(
|
|
15
|
+
props: WordPressComponentProps< FooterProps, 'div' >,
|
|
16
|
+
forwardedRef: ForwardedRef< any >
|
|
17
|
+
) {
|
|
13
18
|
const footerProps = useCardFooter( props );
|
|
14
19
|
|
|
15
20
|
return <Flex { ...footerProps } ref={ forwardedRef } />;
|
|
@@ -18,7 +23,6 @@ function CardFooter( props, forwardedRef ) {
|
|
|
18
23
|
/**
|
|
19
24
|
* `CardFooter` renders an optional footer within a `Card`.
|
|
20
25
|
*
|
|
21
|
-
* @example
|
|
22
26
|
* ```jsx
|
|
23
27
|
* import { Card, CardBody, CardFooter } from `@wordpress/components`;
|
|
24
28
|
*
|
|
@@ -28,6 +32,6 @@ function CardFooter( props, forwardedRef ) {
|
|
|
28
32
|
* </Card>
|
|
29
33
|
* ```
|
|
30
34
|
*/
|
|
31
|
-
const
|
|
35
|
+
export const CardFooter = contextConnect( UnconnectedCardFooter, 'CardFooter' );
|
|
32
36
|
|
|
33
|
-
export default
|
|
37
|
+
export default CardFooter;
|
|
@@ -6,14 +6,14 @@ import { useMemo } from '@wordpress/element';
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
|
-
import { useContextSystem } from '../../ui/context';
|
|
9
|
+
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
|
|
10
10
|
import * as styles from '../styles';
|
|
11
11
|
import { useCx } from '../../utils/hooks/use-cx';
|
|
12
|
+
import type { FooterProps } from '../types';
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export function useCardFooter( props ) {
|
|
14
|
+
export function useCardFooter(
|
|
15
|
+
props: WordPressComponentProps< FooterProps, 'div' >
|
|
16
|
+
) {
|
|
17
17
|
const {
|
|
18
18
|
className,
|
|
19
19
|
justify,
|
|
File without changes
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ForwardedRef } from 'react';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
* Internal dependencies
|
|
3
8
|
*/
|
|
4
|
-
import { contextConnect } from '../../ui/context';
|
|
9
|
+
import { contextConnect, WordPressComponentProps } from '../../ui/context';
|
|
5
10
|
import { Flex } from '../../flex';
|
|
6
11
|
import { useCardHeader } from './hook';
|
|
12
|
+
import type { HeaderProps } from '../types';
|
|
7
13
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function CardHeader( props, forwardedRef ) {
|
|
14
|
+
function UnconnectedCardHeader(
|
|
15
|
+
props: WordPressComponentProps< HeaderProps, 'div' >,
|
|
16
|
+
forwardedRef: ForwardedRef< any >
|
|
17
|
+
) {
|
|
13
18
|
const headerProps = useCardHeader( props );
|
|
14
19
|
|
|
15
20
|
return <Flex { ...headerProps } ref={ forwardedRef } />;
|
|
@@ -18,7 +23,6 @@ function CardHeader( props, forwardedRef ) {
|
|
|
18
23
|
/**
|
|
19
24
|
* `CardHeader` renders an optional header within a `Card`.
|
|
20
25
|
*
|
|
21
|
-
* @example
|
|
22
26
|
* ```jsx
|
|
23
27
|
* import { Card, CardBody, CardHeader } from `@wordpress/components`;
|
|
24
28
|
*
|
|
@@ -28,6 +32,6 @@ function CardHeader( props, forwardedRef ) {
|
|
|
28
32
|
* </Card>
|
|
29
33
|
* ```
|
|
30
34
|
*/
|
|
31
|
-
const
|
|
35
|
+
export const CardHeader = contextConnect( UnconnectedCardHeader, 'CardHeader' );
|
|
32
36
|
|
|
33
|
-
export default
|
|
37
|
+
export default CardHeader;
|
|
@@ -6,14 +6,14 @@ import { useMemo } from '@wordpress/element';
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
|
-
import { useContextSystem } from '../../ui/context';
|
|
9
|
+
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
|
|
10
10
|
import * as styles from '../styles';
|
|
11
11
|
import { useCx } from '../../utils/hooks/use-cx';
|
|
12
|
+
import type { HeaderProps } from '../types';
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export function useCardHeader( props ) {
|
|
14
|
+
export function useCardHeader(
|
|
15
|
+
props: WordPressComponentProps< HeaderProps, 'div' >
|
|
16
|
+
) {
|
|
17
17
|
const {
|
|
18
18
|
className,
|
|
19
19
|
isBorderless = false,
|
|
File without changes
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ForwardedRef } from 'react';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
* Internal dependencies
|
|
3
8
|
*/
|
|
4
|
-
import { contextConnect } from '../../ui/context';
|
|
9
|
+
import { contextConnect, WordPressComponentProps } from '../../ui/context';
|
|
5
10
|
import { View } from '../../view';
|
|
6
11
|
import { useCardMedia } from './hook';
|
|
12
|
+
import type { MediaProps } from '../types';
|
|
7
13
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function CardMedia( props, forwardedRef ) {
|
|
14
|
+
function UnconnectedCardMedia(
|
|
15
|
+
props: WordPressComponentProps< MediaProps, 'div' >,
|
|
16
|
+
forwardedRef: ForwardedRef< any >
|
|
17
|
+
) {
|
|
13
18
|
const cardMediaProps = useCardMedia( props );
|
|
14
19
|
|
|
15
20
|
return <View { ...cardMediaProps } ref={ forwardedRef } />;
|
|
@@ -32,6 +37,6 @@ function CardMedia( props, forwardedRef ) {
|
|
|
32
37
|
* );
|
|
33
38
|
* ```
|
|
34
39
|
*/
|
|
35
|
-
const
|
|
40
|
+
export const CardMedia = contextConnect( UnconnectedCardMedia, 'CardMedia' );
|
|
36
41
|
|
|
37
|
-
export default
|
|
42
|
+
export default CardMedia;
|