@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
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = void 0;
|
|
8
|
+
exports.default = exports.Card = void 0;
|
|
9
9
|
|
|
10
10
|
var _element = require("@wordpress/element");
|
|
11
11
|
|
|
@@ -42,12 +42,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
42
42
|
/**
|
|
43
43
|
* Internal dependencies
|
|
44
44
|
*/
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').Props, 'div'>} props
|
|
48
|
-
* @param {import('react').ForwardedRef<any>} forwardedRef
|
|
49
|
-
*/
|
|
50
|
-
function Card(props, forwardedRef) {
|
|
45
|
+
function UnconnectedCard(props, forwardedRef) {
|
|
51
46
|
const {
|
|
52
47
|
children,
|
|
53
48
|
elevation,
|
|
@@ -60,7 +55,7 @@ function Card(props, forwardedRef) {
|
|
|
60
55
|
const cx = (0, _useCx.useCx)();
|
|
61
56
|
const elevationClassName = (0, _element.useMemo)(() => cx( /*#__PURE__*/(0, _react.css)({
|
|
62
57
|
borderRadius: elevationBorderRadius
|
|
63
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:elevationClassName;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
58
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:elevationClassName;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvY2FyZC9jYXJkL2NvbXBvbmVudC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNENZIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvY2FyZC9jYXJkL2NvbXBvbmVudC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgdHlwZSB7IEZvcndhcmRlZFJlZiB9IGZyb20gJ3JlYWN0JztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IHVzZU1lbW8gfSBmcm9tICdAd29yZHByZXNzL2VsZW1lbn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KiAgICAgICA8L0NhcmRGb290ZXI+XG4gKiAgICAgPC9DYXJkPlxuICogICApO1xuICogfVxuICogYGBgXG4gKi9cbmV4cG9ydCBjb25zdCBDYXJkID0gY29udGV4dENvbm5lY3QoIFVuY29ubmVjdGVkQ2FyZCwgJ0NhcmQnICk7XG5cbmV4cG9ydCBkZWZhdWx0IENhcmQ7XG4iXX0= */")), [cx, elevationBorderRadius]);
|
|
64
59
|
const contextProviderValue = (0, _element.useMemo)(() => {
|
|
65
60
|
const contextProps = {
|
|
66
61
|
size,
|
|
@@ -93,7 +88,6 @@ function Card(props, forwardedRef) {
|
|
|
93
88
|
* `Card` also provides a convenient set of sub-components such as `CardBody`,
|
|
94
89
|
* `CardHeader`, `CardFooter`, and more.
|
|
95
90
|
*
|
|
96
|
-
* @example
|
|
97
91
|
* ```jsx
|
|
98
92
|
* import {
|
|
99
93
|
* Card,
|
|
@@ -123,7 +117,8 @@ function Card(props, forwardedRef) {
|
|
|
123
117
|
*/
|
|
124
118
|
|
|
125
119
|
|
|
126
|
-
const
|
|
127
|
-
|
|
120
|
+
const Card = (0, _context.contextConnect)(UnconnectedCard, 'Card');
|
|
121
|
+
exports.Card = Card;
|
|
122
|
+
var _default = Card;
|
|
128
123
|
exports.default = _default;
|
|
129
124
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/card/card/component.
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/card/card/component.tsx"],"names":["UnconnectedCard","props","forwardedRef","children","elevation","isBorderless","isRounded","size","otherProps","elevationBorderRadius","CONFIG","cardBorderRadius","cx","elevationClassName","borderRadius","contextProviderValue","contextProps","CardBody","CardHeader","CardFooter","styles","Content","Card"],"mappings":";;;;;;;;;AASA;;;;AANA;;AAWA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAxBA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;AAcA,SAASA,eAAT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AHT,IAPD,CADD,CADD;AAiBA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMkB,IAAI,GAAG,6BAAgBtB,eAAhB,EAAiC,MAAjC,CAAb;;eAEQsB,I","sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tcontextConnect,\n\tContextSystemProvider,\n\tWordPressComponentProps,\n} from '../../ui/context';\nimport { Elevation } from '../../elevation';\nimport { View } from '../../view';\nimport * as styles from '../styles';\nimport { useCard } from './hook';\nimport CONFIG from '../../utils/config-values';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { Props } from '../types';\n\nfunction UnconnectedCard(\n\tprops: WordPressComponentProps< Props, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\tchildren,\n\t\televation,\n\t\tisBorderless,\n\t\tisRounded,\n\t\tsize,\n\t\t...otherProps\n\t} = useCard( props );\n\tconst elevationBorderRadius = isRounded ? CONFIG.cardBorderRadius : 0;\n\n\tconst cx = useCx();\n\n\tconst elevationClassName = useMemo(\n\t\t() => cx( css( { borderRadius: elevationBorderRadius } ) ),\n\t\t[ cx, elevationBorderRadius ]\n\t);\n\n\tconst contextProviderValue = useMemo( () => {\n\t\tconst contextProps = {\n\t\t\tsize,\n\t\t\tisBorderless,\n\t\t};\n\t\treturn {\n\t\t\tCardBody: contextProps,\n\t\t\tCardHeader: contextProps,\n\t\t\tCardFooter: contextProps,\n\t\t};\n\t}, [ isBorderless, size ] );\n\n\treturn (\n\t\t<ContextSystemProvider value={ contextProviderValue }>\n\t\t\t<View { ...otherProps } ref={ forwardedRef }>\n\t\t\t\t<View className={ cx( styles.Content ) }>{ children }</View>\n\t\t\t\t<Elevation\n\t\t\t\t\tclassName={ elevationClassName }\n\t\t\t\t\tisInteractive={ false }\n\t\t\t\t\tvalue={ elevation ? 1 : 0 }\n\t\t\t\t/>\n\t\t\t\t<Elevation\n\t\t\t\t\tclassName={ elevationClassName }\n\t\t\t\t\tisInteractive={ false }\n\t\t\t\t\tvalue={ elevation }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</ContextSystemProvider>\n\t);\n}\n\n/**\n * `Card` provides a flexible and extensible content container.\n * `Card` also provides a convenient set of sub-components such as `CardBody`,\n * `CardHeader`, `CardFooter`, and more.\n *\n * ```jsx\n * import {\n * Card,\n * CardHeader,\n * CardBody,\n * CardFooter,\n * Text,\n * Heading,\n * } from `@wordpress/components`;\n *\n * function Example() {\n * return (\n * <Card>\n * <CardHeader>\n * <Heading size={ 4 }>Card Title</Heading>\n * </CardHeader>\n * <CardBody>\n * <Text>Card Content</Text>\n * </CardBody>\n * <CardFooter>\n * <Text>Card Footer</Text>\n * </CardFooter>\n * </Card>\n * );\n * }\n * ```\n */\nexport const Card = contextConnect( UnconnectedCard, 'Card' );\n\nexport default Card;\n"]}
|
package/build/card/card/hook.js
CHANGED
|
@@ -30,18 +30,12 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
30
30
|
/**
|
|
31
31
|
* Internal dependencies
|
|
32
32
|
*/
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').Props, 'div'>} props
|
|
36
|
-
*/
|
|
37
33
|
function useDeprecatedProps(_ref) {
|
|
38
34
|
let {
|
|
39
35
|
elevation,
|
|
40
36
|
isElevated,
|
|
41
37
|
...otherProps
|
|
42
38
|
} = _ref;
|
|
43
|
-
|
|
44
|
-
/**@type {import('../../ui/context').WordPressComponentProps<import('../types').Props, 'div'>} */
|
|
45
39
|
const propsToReturn = { ...otherProps
|
|
46
40
|
};
|
|
47
41
|
let computedElevation = elevation;
|
|
@@ -64,10 +58,6 @@ function useDeprecatedProps(_ref) {
|
|
|
64
58
|
|
|
65
59
|
return propsToReturn;
|
|
66
60
|
}
|
|
67
|
-
/**
|
|
68
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').Props, 'div'>} props
|
|
69
|
-
*/
|
|
70
|
-
|
|
71
61
|
|
|
72
62
|
function useCard(props) {
|
|
73
63
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/card/card/hook.
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/card/card/hook.ts"],"names":["useDeprecatedProps","elevation","isElevated","otherProps","propsToReturn","computedElevation","since","alternative","useCard","props","className","isBorderless","isRounded","size","cx","classes","styles","Card","boxShadowless","rounded","surfaceProps"],"mappings":";;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AACA;;AACA;;;;;;AAZA;AACA;AACA;;AAIA;AACA;AACA;AASA,SAASA,kBAAT,OAIe;AAAA,MAJc;AAC5BC,IAAAA,SAD4B;AAE5BC,IAAAA,UAF4B;AAG5B,OAAGC;AAHyB,GAId;AACd,QAAMC,aAA8C,GAAG,EACtD,GAAGD;AADmD,GAAvD;AAGA,MAAIE,iBAAiB,GAAGJ,SAAxB;;AAEA,MAAKC,UAAL,EAAkB;AAAA;;AACjB,6BAAY,sBAAZ,EAAoC;AACnCI,MAAAA,KAAK,EAAE,KAD4B;AAEnCC,MAAAA,WAAW,EAAE;AAFsB,KAApC;AAIA,0BAAAF,iBAAiB,UAAjB,yDAAAA,iBAAiB,GAAK,CAAtB;AACA,GAZa,CAcd;AACA;;;AACA,MAAK,OAAOA,iBAAP,KAA6B,WAAlC,EAAgD;AAC/CD,IAAAA,aAAa,CAACH,SAAd,GAA0BI,iBAA1B;AACA;;AAED,SAAOD,aAAP;AACA;;AAEM,SAASI,OAAT,CAAkBC,KAAlB,EAAqC;AAC3C,QAAM;AACLC,IAAAA,SADK;AAELT,IAAAA,SAAS,GAAG,CAFP;AAGLU,IAAAA,YAAY,GAAG,KAHV;AAILC,IAAAA,SAAS,GAAG,IAJP;AAKLC,IAAAA,IAAI,GAAG,QALF;AAML,OAAGV;AANE,MAOF,+BAAkBH,kBAAkB,CAAES,KAAF,CAApC,EAA+C,MAA/C,CAPJ;AASA,QAAMK,EAAE,GAAG,mBAAX;AAEA,QAAMC,OAAO,GAAG,sBAAS,MAAM;AAC9B,WAAOD,EAAE,CACRE,MAAM,CAACC,IADC,EAERN,YAAY,IAAIK,MAAM,CAACE,aAFf,EAGRN,SAAS,IAAII,MAAM,CAACG,OAHZ,EAIRT,SAJQ,CAAT;AAMA,GAPe,EAOb,CAAEA,SAAF,EAAaI,EAAb,EAAiBH,YAAjB,EAA+BC,SAA/B,CAPa,CAAhB;AASA,QAAMQ,YAAY,GAAG,yBAAY,EAAE,GAAGjB,UAAL;AAAiBO,IAAAA,SAAS,EAAEK;AAA5B,GAAZ,CAArB;AAEA,SAAO,EACN,GAAGK,YADG;AAENnB,IAAAA,SAFM;AAGNU,IAAAA,YAHM;AAINC,IAAAA,SAJM;AAKNC,IAAAA;AALM,GAAP;AAOA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport { useSurface } from '../../surface';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { Props } from '../types';\n\ntype CardProps = WordPressComponentProps< Props, 'div' >;\n\nfunction useDeprecatedProps( {\n\televation,\n\tisElevated,\n\t...otherProps\n}: CardProps ) {\n\tconst propsToReturn: Omit< CardProps, 'isElevated' > = {\n\t\t...otherProps,\n\t};\n\tlet computedElevation = elevation;\n\n\tif ( isElevated ) {\n\t\tdeprecated( 'Card isElevated prop', {\n\t\t\tsince: '5.9',\n\t\t\talternative: 'elevation',\n\t\t} );\n\t\tcomputedElevation ??= 2;\n\t}\n\n\t// The `elevation` prop should only be passed when it's not `undefined`,\n\t// otherwise it will override the value that gets derived from `useContextSystem`.\n\tif ( typeof computedElevation !== 'undefined' ) {\n\t\tpropsToReturn.elevation = computedElevation;\n\t}\n\n\treturn propsToReturn;\n}\n\nexport function useCard( props: CardProps ) {\n\tconst {\n\t\tclassName,\n\t\televation = 0,\n\t\tisBorderless = false,\n\t\tisRounded = true,\n\t\tsize = 'medium',\n\t\t...otherProps\n\t} = useContextSystem( useDeprecatedProps( props ), 'Card' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo( () => {\n\t\treturn cx(\n\t\t\tstyles.Card,\n\t\t\tisBorderless && styles.boxShadowless,\n\t\t\tisRounded && styles.rounded,\n\t\t\tclassName\n\t\t);\n\t}, [ className, cx, isBorderless, isRounded ] );\n\n\tconst surfaceProps = useSurface( { ...otherProps, className: classes } );\n\n\treturn {\n\t\t...surfaceProps,\n\t\televation,\n\t\tisBorderless,\n\t\tisRounded,\n\t\tsize,\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/card/card/index.
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/card/card/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;AACA","sourcesContent":["export { default } from './component';\nexport { useCard } from './hook';\n"]}
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = void 0;
|
|
8
|
+
exports.default = exports.CardBody = void 0;
|
|
9
9
|
|
|
10
10
|
var _element = require("@wordpress/element");
|
|
11
11
|
|
|
@@ -20,14 +20,13 @@ var _view = require("../../view");
|
|
|
20
20
|
var _hook = require("./hook");
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* External dependencies
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
* @param {import('react').ForwardedRef<any>} forwardedRef
|
|
27
|
+
* Internal dependencies
|
|
29
28
|
*/
|
|
30
|
-
function
|
|
29
|
+
function UnconnectedCardBody(props, forwardedRef) {
|
|
31
30
|
const {
|
|
32
31
|
isScrollable,
|
|
33
32
|
...otherProps
|
|
@@ -47,7 +46,6 @@ function CardBody(props, forwardedRef) {
|
|
|
47
46
|
* `CardBody` renders an optional content area for a `Card`.
|
|
48
47
|
* Multiple `CardBody` components can be used within `Card` if needed.
|
|
49
48
|
*
|
|
50
|
-
* @example
|
|
51
49
|
* ```jsx
|
|
52
50
|
* import { Card, CardBody } from `@wordpress/components`;
|
|
53
51
|
*
|
|
@@ -60,7 +58,8 @@ function CardBody(props, forwardedRef) {
|
|
|
60
58
|
*/
|
|
61
59
|
|
|
62
60
|
|
|
63
|
-
const
|
|
64
|
-
|
|
61
|
+
const CardBody = (0, _context.contextConnect)(UnconnectedCardBody, 'CardBody');
|
|
62
|
+
exports.CardBody = CardBody;
|
|
63
|
+
var _default = CardBody;
|
|
65
64
|
exports.default = _default;
|
|
66
65
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/card/card-body/component.
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/card/card-body/component.tsx"],"names":["UnconnectedCardBody","props","forwardedRef","isScrollable","otherProps","CardBody"],"mappings":";;;;;;;;;;;;;AAQA;;AACA;;AACA;;AACA;;AAXA;AACA;AACA;;AAGA;AACA;AACA;AAOA,SAASA,mBAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAM;AAAEC,IAAAA,YAAF;AAAgB,OAAGC;AAAnB,MAAkC,uBAAaH,KAAb,CAAxC;;AAEA,MAAKE,YAAL,EAAoB;AACnB,WAAO,4BAAC,sBAAD,6BAAiBC,UAAjB;AAA8B,MAAA,GAAG,EAAGF;AAApC,OAAP;AACA;;AAED,SAAO,4BAAC,UAAD,6BAAWE,UAAX;AAAwB,IAAA,GAAG,EAAGF;AAA9B,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMG,QAAQ,GAAG,6BAAgBL,mBAAhB,EAAqC,UAArC,CAAjB;;eAEQK,Q","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { Scrollable } from '../../scrollable';\nimport { View } from '../../view';\nimport { useCardBody } from './hook';\nimport type { BodyProps } from '../types';\n\nfunction UnconnectedCardBody(\n\tprops: WordPressComponentProps< BodyProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst { isScrollable, ...otherProps } = useCardBody( props );\n\n\tif ( isScrollable ) {\n\t\treturn <Scrollable { ...otherProps } ref={ forwardedRef } />;\n\t}\n\n\treturn <View { ...otherProps } ref={ forwardedRef } />;\n}\n\n/**\n * `CardBody` renders an optional content area for a `Card`.\n * Multiple `CardBody` components can be used within `Card` if needed.\n *\n * ```jsx\n * import { Card, CardBody } from `@wordpress/components`;\n *\n * <Card>\n * \t<CardBody>\n * \t\t...\n * \t</CardBody>\n * </Card>\n * ```\n */\nexport const CardBody = contextConnect( UnconnectedCardBody, 'CardBody' );\n\nexport default CardBody;\n"]}
|
|
@@ -24,10 +24,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
24
24
|
/**
|
|
25
25
|
* Internal dependencies
|
|
26
26
|
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').BodyProps, 'div'>} props
|
|
30
|
-
*/
|
|
31
27
|
function useCardBody(props) {
|
|
32
28
|
const {
|
|
33
29
|
className,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/card/card-body/hook.
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/card/card-body/hook.ts"],"names":["useCardBody","props","className","isScrollable","isShady","size","otherProps","cx","classes","styles","Body","borderRadius","cardPaddings","shady"],"mappings":";;;;;;;AAGA;;AAKA;;AACA;;AACA;;;;;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAMO,SAASA,WAAT,CACNC,KADM,EAEL;AACD,QAAM;AACLC,IAAAA,SADK;AAELC,IAAAA,YAAY,GAAG,KAFV;AAGLC,IAAAA,OAAO,GAAG,KAHL;AAILC,IAAAA,IAAI,GAAG,QAJF;AAKL,OAAGC;AALE,MAMF,+BAAkBL,KAAlB,EAAyB,UAAzB,CANJ;AAQA,QAAMM,EAAE,GAAG,mBAAX;AAEA,QAAMC,OAAO,GAAG,sBACf,MACCD,EAAE,CACDE,MAAM,CAACC,IADN,EAEDD,MAAM,CAACE,YAFN,EAGDF,MAAM,CAACG,YAAP,CAAqBP,IAArB,CAHC,EAIDD,OAAO,IAAIK,MAAM,CAACI,KAJjB,EAKD;AACA,yBANC,EAODX,SAPC,CAFY,EAWf,CAAEA,SAAF,EAAaK,EAAb,EAAiBH,OAAjB,EAA0BC,IAA1B,CAXe,CAAhB;AAcA,SAAO,EACN,GAAGC,UADG;AAENJ,IAAAA,SAAS,EAAEM,OAFL;AAGNL,IAAAA;AAHM,GAAP;AAKA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { BodyProps } from '../types';\n\nexport function useCardBody(\n\tprops: WordPressComponentProps< BodyProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tisScrollable = false,\n\t\tisShady = false,\n\t\tsize = 'medium',\n\t\t...otherProps\n\t} = useContextSystem( props, 'CardBody' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.Body,\n\t\t\t\tstyles.borderRadius,\n\t\t\t\tstyles.cardPaddings[ size ],\n\t\t\t\tisShady && styles.shady,\n\t\t\t\t// This classname is added for legacy compatibility reasons.\n\t\t\t\t'components-card__body',\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx, isShady, size ]\n\t);\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t\tisScrollable,\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/card/card-body/index.
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/card/card-body/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;AACA","sourcesContent":["export { default } from './component';\nexport { useCardBody } from './hook';\n"]}
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = void 0;
|
|
8
|
+
exports.default = exports.CardDivider = void 0;
|
|
9
9
|
|
|
10
10
|
var _element = require("@wordpress/element");
|
|
11
11
|
|
|
@@ -18,14 +18,13 @@ var _divider = require("../../divider");
|
|
|
18
18
|
var _hook = require("./hook");
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* External dependencies
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* @param {import('react').ForwardedRef<any>} forwardedRef
|
|
25
|
+
* Internal dependencies
|
|
27
26
|
*/
|
|
28
|
-
function
|
|
27
|
+
function UnconnectedCardDivider(props, forwardedRef) {
|
|
29
28
|
const dividerProps = (0, _hook.useCardDivider)(props);
|
|
30
29
|
return (0, _element.createElement)(_divider.Divider, (0, _extends2.default)({}, dividerProps, {
|
|
31
30
|
ref: forwardedRef
|
|
@@ -35,7 +34,6 @@ function CardDivider(props, forwardedRef) {
|
|
|
35
34
|
* `CardDivider` renders an optional divider within a `Card`.
|
|
36
35
|
* It is typically used to divide multiple `CardBody` components from each other.
|
|
37
36
|
*
|
|
38
|
-
* @example
|
|
39
37
|
* ```jsx
|
|
40
38
|
* import { Card, CardBody, CardDivider } from `@wordpress/components`;
|
|
41
39
|
*
|
|
@@ -48,7 +46,8 @@ function CardDivider(props, forwardedRef) {
|
|
|
48
46
|
*/
|
|
49
47
|
|
|
50
48
|
|
|
51
|
-
const
|
|
52
|
-
|
|
49
|
+
const CardDivider = (0, _context.contextConnect)(UnconnectedCardDivider, 'CardDivider');
|
|
50
|
+
exports.CardDivider = CardDivider;
|
|
51
|
+
var _default = CardDivider;
|
|
53
52
|
exports.default = _default;
|
|
54
53
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/card/card-divider/component.
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/card/card-divider/component.tsx"],"names":["UnconnectedCardDivider","props","forwardedRef","dividerProps","CardDivider"],"mappings":";;;;;;;;;;;;;AAQA;;AACA;;AACA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAKA,SAASA,sBAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,YAAY,GAAG,0BAAgBF,KAAhB,CAArB;AAEA,SAAO,4BAAC,gBAAD,6BAAcE,YAAd;AAA6B,IAAA,GAAG,EAAGD;AAAnC,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAME,WAAW,GAAG,6BAC1BJ,sBAD0B,EAE1B,aAF0B,CAApB;;eAKQI,W","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { Divider, DividerProps } from '../../divider';\nimport { useCardDivider } from './hook';\n\nfunction UnconnectedCardDivider(\n\tprops: WordPressComponentProps< DividerProps, 'hr', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst dividerProps = useCardDivider( props );\n\n\treturn <Divider { ...dividerProps } ref={ forwardedRef } />;\n}\n\n/**\n * `CardDivider` renders an optional divider within a `Card`.\n * It is typically used to divide multiple `CardBody` components from each other.\n *\n * ```jsx\n * import { Card, CardBody, CardDivider } from `@wordpress/components`;\n *\n * <Card>\n * <CardBody>...</CardBody>\n * <CardDivider />\n * <CardBody>...</CardBody>\n * </Card>\n * ```\n */\nexport const CardDivider = contextConnect(\n\tUnconnectedCardDivider,\n\t'CardDivider'\n);\n\nexport default CardDivider;\n"]}
|
|
@@ -24,10 +24,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
24
24
|
/**
|
|
25
25
|
* Internal dependencies
|
|
26
26
|
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../../divider').DividerProps, 'hr', false>} props
|
|
30
|
-
*/
|
|
31
27
|
function useCardDivider(props) {
|
|
32
28
|
const {
|
|
33
29
|
className,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/card/card-divider/hook.
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/card/card-divider/hook.ts"],"names":["useCardDivider","props","className","otherProps","cx","classes","styles","Divider","borderColor"],"mappings":";;;;;;;AAGA;;AAKA;;AACA;;AACA;;;;;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAMO,SAASA,cAAT,CACNC,KADM,EAEL;AACD,QAAM;AAAEC,IAAAA,SAAF;AAAa,OAAGC;AAAhB,MAA+B,+BACpCF,KADoC,EAEpC,aAFoC,CAArC;AAKA,QAAMG,EAAE,GAAG,mBAAX;AAEA,QAAMC,OAAO,GAAG,sBACf,MACCD,EAAE,CACDE,MAAM,CAACC,OADN,EAEDD,MAAM,CAACE,WAFN,EAGD;AACA,4BAJC,EAKDN,SALC,CAFY,EASf,CAAEA,SAAF,EAAaE,EAAb,CATe,CAAhB;AAYA,SAAO,EACN,GAAGD,UADG;AAEND,IAAAA,SAAS,EAAEG;AAFL,GAAP;AAIA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { DividerProps } from '../../divider';\n\nexport function useCardDivider(\n\tprops: WordPressComponentProps< DividerProps, 'hr', false >\n) {\n\tconst { className, ...otherProps } = useContextSystem(\n\t\tprops,\n\t\t'CardDivider'\n\t);\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.Divider,\n\t\t\t\tstyles.borderColor,\n\t\t\t\t// This classname is added for legacy compatibility reasons.\n\t\t\t\t'components-card__divider',\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx ]\n\t);\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/card/card-divider/index.
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/card/card-divider/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;AACA","sourcesContent":["export { default } from './component';\nexport { useCardDivider } from './hook';\n"]}
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = void 0;
|
|
8
|
+
exports.default = exports.CardFooter = void 0;
|
|
9
9
|
|
|
10
10
|
var _element = require("@wordpress/element");
|
|
11
11
|
|
|
@@ -18,14 +18,13 @@ var _flex = require("../../flex");
|
|
|
18
18
|
var _hook = require("./hook");
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* External dependencies
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* @param {import('react').ForwardedRef<any>} forwardedRef
|
|
25
|
+
* Internal dependencies
|
|
27
26
|
*/
|
|
28
|
-
function
|
|
27
|
+
function UnconnectedCardFooter(props, forwardedRef) {
|
|
29
28
|
const footerProps = (0, _hook.useCardFooter)(props);
|
|
30
29
|
return (0, _element.createElement)(_flex.Flex, (0, _extends2.default)({}, footerProps, {
|
|
31
30
|
ref: forwardedRef
|
|
@@ -34,7 +33,6 @@ function CardFooter(props, forwardedRef) {
|
|
|
34
33
|
/**
|
|
35
34
|
* `CardFooter` renders an optional footer within a `Card`.
|
|
36
35
|
*
|
|
37
|
-
* @example
|
|
38
36
|
* ```jsx
|
|
39
37
|
* import { Card, CardBody, CardFooter } from `@wordpress/components`;
|
|
40
38
|
*
|
|
@@ -46,7 +44,8 @@ function CardFooter(props, forwardedRef) {
|
|
|
46
44
|
*/
|
|
47
45
|
|
|
48
46
|
|
|
49
|
-
const
|
|
50
|
-
|
|
47
|
+
const CardFooter = (0, _context.contextConnect)(UnconnectedCardFooter, 'CardFooter');
|
|
48
|
+
exports.CardFooter = CardFooter;
|
|
49
|
+
var _default = CardFooter;
|
|
51
50
|
exports.default = _default;
|
|
52
51
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/card/card-footer/component.
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/card/card-footer/component.tsx"],"names":["UnconnectedCardFooter","props","forwardedRef","footerProps","CardFooter"],"mappings":";;;;;;;;;;;;;AAQA;;AACA;;AACA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAMA,SAASA,qBAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,WAAW,GAAG,yBAAeF,KAAf,CAApB;AAEA,SAAO,4BAAC,UAAD,6BAAWE,WAAX;AAAyB,IAAA,GAAG,EAAGD;AAA/B,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAME,UAAU,GAAG,6BAAgBJ,qBAAhB,EAAuC,YAAvC,CAAnB;;eAEQI,U","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { Flex } from '../../flex';\nimport { useCardFooter } from './hook';\nimport type { FooterProps } from '../types';\n\nfunction UnconnectedCardFooter(\n\tprops: WordPressComponentProps< FooterProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst footerProps = useCardFooter( props );\n\n\treturn <Flex { ...footerProps } ref={ forwardedRef } />;\n}\n\n/**\n * `CardFooter` renders an optional footer within a `Card`.\n *\n * ```jsx\n * import { Card, CardBody, CardFooter } from `@wordpress/components`;\n *\n * <Card>\n * \t<CardBody>...</CardBody>\n * \t<CardFooter>...</CardFooter>\n * </Card>\n * ```\n */\nexport const CardFooter = contextConnect( UnconnectedCardFooter, 'CardFooter' );\n\nexport default CardFooter;\n"]}
|
|
@@ -24,10 +24,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
24
24
|
/**
|
|
25
25
|
* Internal dependencies
|
|
26
26
|
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').FooterProps, 'div'>} props
|
|
30
|
-
*/
|
|
31
27
|
function useCardFooter(props) {
|
|
32
28
|
const {
|
|
33
29
|
className,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/card/card-footer/hook.
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/card/card-footer/hook.ts"],"names":["useCardFooter","props","className","justify","isBorderless","isShady","size","otherProps","cx","classes","styles","Footer","borderRadius","borderColor","cardPaddings","borderless","shady"],"mappings":";;;;;;;AAGA;;AAKA;;AACA;;AACA;;;;;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAMO,SAASA,aAAT,CACNC,KADM,EAEL;AACD,QAAM;AACLC,IAAAA,SADK;AAELC,IAAAA,OAFK;AAGLC,IAAAA,YAAY,GAAG,KAHV;AAILC,IAAAA,OAAO,GAAG,KAJL;AAKLC,IAAAA,IAAI,GAAG,QALF;AAML,OAAGC;AANE,MAOF,+BAAkBN,KAAlB,EAAyB,YAAzB,CAPJ;AASA,QAAMO,EAAE,GAAG,mBAAX;AAEA,QAAMC,OAAO,GAAG,sBACf,MACCD,EAAE,CACDE,MAAM,CAACC,MADN,EAEDD,MAAM,CAACE,YAFN,EAGDF,MAAM,CAACG,WAHN,EAIDH,MAAM,CAACI,YAAP,CAAqBR,IAArB,CAJC,EAKDF,YAAY,IAAIM,MAAM,CAACK,UALtB,EAMDV,OAAO,IAAIK,MAAM,CAACM,KANjB,EAOD;AACA,2BARC,EASDd,SATC,CAFY,EAaf,CAAEA,SAAF,EAAaM,EAAb,EAAiBJ,YAAjB,EAA+BC,OAA/B,EAAwCC,IAAxC,CAbe,CAAhB;AAgBA,SAAO,EACN,GAAGC,UADG;AAENL,IAAAA,SAAS,EAAEO,OAFL;AAGNN,IAAAA;AAHM,GAAP;AAKA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { FooterProps } from '../types';\n\nexport function useCardFooter(\n\tprops: WordPressComponentProps< FooterProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tjustify,\n\t\tisBorderless = false,\n\t\tisShady = false,\n\t\tsize = 'medium',\n\t\t...otherProps\n\t} = useContextSystem( props, 'CardFooter' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.Footer,\n\t\t\t\tstyles.borderRadius,\n\t\t\t\tstyles.borderColor,\n\t\t\t\tstyles.cardPaddings[ size ],\n\t\t\t\tisBorderless && styles.borderless,\n\t\t\t\tisShady && styles.shady,\n\t\t\t\t// This classname is added for legacy compatibility reasons.\n\t\t\t\t'components-card__footer',\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx, isBorderless, isShady, size ]\n\t);\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t\tjustify,\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/card/card-footer/index.
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/card/card-footer/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;AACA","sourcesContent":["export { default } from './component';\nexport { useCardFooter } from './hook';\n"]}
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = void 0;
|
|
8
|
+
exports.default = exports.CardHeader = void 0;
|
|
9
9
|
|
|
10
10
|
var _element = require("@wordpress/element");
|
|
11
11
|
|
|
@@ -18,14 +18,13 @@ var _flex = require("../../flex");
|
|
|
18
18
|
var _hook = require("./hook");
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* External dependencies
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* @param {import('react').ForwardedRef<any>} forwardedRef
|
|
25
|
+
* Internal dependencies
|
|
27
26
|
*/
|
|
28
|
-
function
|
|
27
|
+
function UnconnectedCardHeader(props, forwardedRef) {
|
|
29
28
|
const headerProps = (0, _hook.useCardHeader)(props);
|
|
30
29
|
return (0, _element.createElement)(_flex.Flex, (0, _extends2.default)({}, headerProps, {
|
|
31
30
|
ref: forwardedRef
|
|
@@ -34,7 +33,6 @@ function CardHeader(props, forwardedRef) {
|
|
|
34
33
|
/**
|
|
35
34
|
* `CardHeader` renders an optional header within a `Card`.
|
|
36
35
|
*
|
|
37
|
-
* @example
|
|
38
36
|
* ```jsx
|
|
39
37
|
* import { Card, CardBody, CardHeader } from `@wordpress/components`;
|
|
40
38
|
*
|
|
@@ -46,7 +44,8 @@ function CardHeader(props, forwardedRef) {
|
|
|
46
44
|
*/
|
|
47
45
|
|
|
48
46
|
|
|
49
|
-
const
|
|
50
|
-
|
|
47
|
+
const CardHeader = (0, _context.contextConnect)(UnconnectedCardHeader, 'CardHeader');
|
|
48
|
+
exports.CardHeader = CardHeader;
|
|
49
|
+
var _default = CardHeader;
|
|
51
50
|
exports.default = _default;
|
|
52
51
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/card/card-header/component.
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/card/card-header/component.tsx"],"names":["UnconnectedCardHeader","props","forwardedRef","headerProps","CardHeader"],"mappings":";;;;;;;;;;;;;AAQA;;AACA;;AACA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAMA,SAASA,qBAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,WAAW,GAAG,yBAAeF,KAAf,CAApB;AAEA,SAAO,4BAAC,UAAD,6BAAWE,WAAX;AAAyB,IAAA,GAAG,EAAGD;AAA/B,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAME,UAAU,GAAG,6BAAgBJ,qBAAhB,EAAuC,YAAvC,CAAnB;;eAEQI,U","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { Flex } from '../../flex';\nimport { useCardHeader } from './hook';\nimport type { HeaderProps } from '../types';\n\nfunction UnconnectedCardHeader(\n\tprops: WordPressComponentProps< HeaderProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst headerProps = useCardHeader( props );\n\n\treturn <Flex { ...headerProps } ref={ forwardedRef } />;\n}\n\n/**\n * `CardHeader` renders an optional header within a `Card`.\n *\n * ```jsx\n * import { Card, CardBody, CardHeader } from `@wordpress/components`;\n *\n * <Card>\n * \t<CardHeader>...</CardHeader>\n * \t<CardBody>...</CardBody>\n * </Card>\n * ```\n */\nexport const CardHeader = contextConnect( UnconnectedCardHeader, 'CardHeader' );\n\nexport default CardHeader;\n"]}
|
|
@@ -24,10 +24,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
24
24
|
/**
|
|
25
25
|
* Internal dependencies
|
|
26
26
|
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').HeaderProps, 'div'>} props
|
|
30
|
-
*/
|
|
31
27
|
function useCardHeader(props) {
|
|
32
28
|
const {
|
|
33
29
|
className,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/card/card-header/hook.
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/card/card-header/hook.ts"],"names":["useCardHeader","props","className","isBorderless","isShady","size","otherProps","cx","classes","styles","Header","borderRadius","borderColor","cardPaddings","borderless","shady"],"mappings":";;;;;;;AAGA;;AAKA;;AACA;;AACA;;;;;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAMO,SAASA,aAAT,CACNC,KADM,EAEL;AACD,QAAM;AACLC,IAAAA,SADK;AAELC,IAAAA,YAAY,GAAG,KAFV;AAGLC,IAAAA,OAAO,GAAG,KAHL;AAILC,IAAAA,IAAI,GAAG,QAJF;AAKL,OAAGC;AALE,MAMF,+BAAkBL,KAAlB,EAAyB,YAAzB,CANJ;AAQA,QAAMM,EAAE,GAAG,mBAAX;AAEA,QAAMC,OAAO,GAAG,sBACf,MACCD,EAAE,CACDE,MAAM,CAACC,MADN,EAEDD,MAAM,CAACE,YAFN,EAGDF,MAAM,CAACG,WAHN,EAIDH,MAAM,CAACI,YAAP,CAAqBR,IAArB,CAJC,EAKDF,YAAY,IAAIM,MAAM,CAACK,UALtB,EAMDV,OAAO,IAAIK,MAAM,CAACM,KANjB,EAOD;AACA,2BARC,EASDb,SATC,CAFY,EAaf,CAAEA,SAAF,EAAaK,EAAb,EAAiBJ,YAAjB,EAA+BC,OAA/B,EAAwCC,IAAxC,CAbe,CAAhB;AAgBA,SAAO,EACN,GAAGC,UADG;AAENJ,IAAAA,SAAS,EAAEM;AAFL,GAAP;AAIA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { HeaderProps } from '../types';\n\nexport function useCardHeader(\n\tprops: WordPressComponentProps< HeaderProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tisBorderless = false,\n\t\tisShady = false,\n\t\tsize = 'medium',\n\t\t...otherProps\n\t} = useContextSystem( props, 'CardHeader' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.Header,\n\t\t\t\tstyles.borderRadius,\n\t\t\t\tstyles.borderColor,\n\t\t\t\tstyles.cardPaddings[ size ],\n\t\t\t\tisBorderless && styles.borderless,\n\t\t\t\tisShady && styles.shady,\n\t\t\t\t// This classname is added for legacy compatibility reasons.\n\t\t\t\t'components-card__header',\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx, isBorderless, isShady, size ]\n\t);\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/card/card-header/index.
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/card/card-header/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;AACA","sourcesContent":["export { default } from './component';\nexport { useCardHeader } from './hook';\n"]}
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = void 0;
|
|
8
|
+
exports.default = exports.CardMedia = void 0;
|
|
9
9
|
|
|
10
10
|
var _element = require("@wordpress/element");
|
|
11
11
|
|
|
@@ -18,14 +18,13 @@ var _view = require("../../view");
|
|
|
18
18
|
var _hook = require("./hook");
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* External dependencies
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* @param {import('react').ForwardedRef<any>} forwardedRef
|
|
25
|
+
* Internal dependencies
|
|
27
26
|
*/
|
|
28
|
-
function
|
|
27
|
+
function UnconnectedCardMedia(props, forwardedRef) {
|
|
29
28
|
const cardMediaProps = (0, _hook.useCardMedia)(props);
|
|
30
29
|
return (0, _element.createElement)(_view.View, (0, _extends2.default)({}, cardMediaProps, {
|
|
31
30
|
ref: forwardedRef
|
|
@@ -50,7 +49,8 @@ function CardMedia(props, forwardedRef) {
|
|
|
50
49
|
*/
|
|
51
50
|
|
|
52
51
|
|
|
53
|
-
const
|
|
54
|
-
|
|
52
|
+
const CardMedia = (0, _context.contextConnect)(UnconnectedCardMedia, 'CardMedia');
|
|
53
|
+
exports.CardMedia = CardMedia;
|
|
54
|
+
var _default = CardMedia;
|
|
55
55
|
exports.default = _default;
|
|
56
56
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/card/card-media/component.
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/card/card-media/component.tsx"],"names":["UnconnectedCardMedia","props","forwardedRef","cardMediaProps","CardMedia"],"mappings":";;;;;;;;;;;;;AAQA;;AACA;;AACA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAMA,SAASA,oBAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,cAAc,GAAG,wBAAcF,KAAd,CAAvB;AAEA,SAAO,4BAAC,UAAD,6BAAWE,cAAX;AAA4B,IAAA,GAAG,EAAGD;AAAlC,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAME,SAAS,GAAG,6BAAgBJ,oBAAhB,EAAsC,WAAtC,CAAlB;;eAEQI,S","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { View } from '../../view';\nimport { useCardMedia } from './hook';\nimport type { MediaProps } from '../types';\n\nfunction UnconnectedCardMedia(\n\tprops: WordPressComponentProps< MediaProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst cardMediaProps = useCardMedia( props );\n\n\treturn <View { ...cardMediaProps } ref={ forwardedRef } />;\n}\n\n/**\n * `CardMedia` provides a container for media elements within a `Card`.\n *\n * @example\n * ```jsx\n * import { Card, CardBody, CardMedia } from '@wordpress/components';\n *\n * const Example = () => (\n * <Card>\n *\t <CardMedia>\n *\t\t <img src=\"...\" />\n * </CardMedia>\n * <CardBody>...</CardBody>\n * </Card>\n * );\n * ```\n */\nexport const CardMedia = contextConnect( UnconnectedCardMedia, 'CardMedia' );\n\nexport default CardMedia;\n"]}
|
|
@@ -24,10 +24,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
24
24
|
/**
|
|
25
25
|
* Internal dependencies
|
|
26
26
|
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @param {import('../../ui/context').WordPressComponentProps<{ children: import('react').ReactNode }, 'div'>} props
|
|
30
|
-
*/
|
|
31
27
|
function useCardMedia(props) {
|
|
32
28
|
const {
|
|
33
29
|
className,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/card/card-media/hook.
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/card/card-media/hook.ts"],"names":["useCardMedia","props","className","otherProps","cx","classes","styles","Media","borderRadius"],"mappings":";;;;;;;AAGA;;AAKA;;AACA;;AACA;;;;;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAMO,SAASA,YAAT,CACNC,KADM,EAEL;AACD,QAAM;AAAEC,IAAAA,SAAF;AAAa,OAAGC;AAAhB,MAA+B,+BAAkBF,KAAlB,EAAyB,WAAzB,CAArC;AAEA,QAAMG,EAAE,GAAG,mBAAX;AAEA,QAAMC,OAAO,GAAG,sBACf,MACCD,EAAE,CACDE,MAAM,CAACC,KADN,EAEDD,MAAM,CAACE,YAFN,EAGD;AACA,0BAJC,EAKDN,SALC,CAFY,EASf,CAAEA,SAAF,EAAaE,EAAb,CATe,CAAhB;AAYA,SAAO,EACN,GAAGD,UADG;AAEND,IAAAA,SAAS,EAAEG;AAFL,GAAP;AAIA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { MediaProps } from '../types';\n\nexport function useCardMedia(\n\tprops: WordPressComponentProps< MediaProps, 'div' >\n) {\n\tconst { className, ...otherProps } = useContextSystem( props, 'CardMedia' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.Media,\n\t\t\t\tstyles.borderRadius,\n\t\t\t\t// This classname is added for legacy compatibility reasons.\n\t\t\t\t'components-card__media',\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx ]\n\t);\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/card/card-media/index.
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/card/card-media/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;AACA","sourcesContent":["export { default } from './component';\nexport { useCardMedia } from './hook';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/card/context.
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/card/context.ts"],"names":["CardContext","useCardContext"],"mappings":";;;;;;;AAGA;;AAHA;AACA;AACA;AAGO,MAAMA,WAAW,GAAG,4BAAe,EAAf,CAApB;;;AACA,MAAMC,cAAc,GAAG,MAAM,yBAAYD,WAAZ,CAA7B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\nexport const CardContext = createContext( {} );\nexport const useCardContext = () => useContext( CardContext );\n"]}
|