@wordpress/components 19.17.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 +96 -1
- package/CONTRIBUTING.md +12 -12
- package/build/alignment-matrix-control/index.js +1 -1
- package/build/alignment-matrix-control/index.js.map +1 -1
- package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js +13 -13
- package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
- package/build/angle-picker-control/index.js +3 -0
- package/build/angle-picker-control/index.js.map +1 -1
- package/build/angle-picker-control/styles/angle-picker-control-styles.js +14 -4
- package/build/angle-picker-control/styles/angle-picker-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 +12 -12
- package/build/autocomplete/index.js.map +1 -1
- package/build/base-control/styles/base-control-styles.js +8 -8
- package/build/base-control/styles/base-control-styles.js.map +1 -1
- package/build/base-field/styles.js +5 -5
- package/build/base-field/styles.js.map +1 -1
- package/build/box-control/styles/box-control-visualizer-styles.js +8 -8
- package/build/box-control/styles/box-control-visualizer-styles.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-list-picker/index.js +16 -5
- package/build/color-list-picker/index.js.map +1 -1
- package/build/color-palette/index.js +28 -14
- package/build/color-palette/index.js.map +1 -1
- package/build/color-palette/index.native.js +3 -3
- package/build/color-palette/index.native.js.map +1 -1
- package/build/combobox-control/index.js +7 -4
- package/build/combobox-control/index.js.map +1 -1
- package/build/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/constants.js +0 -0
- package/build/custom-gradient-picker/gradient-bar/constants.js.map +1 -0
- package/build/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/control-points.js +34 -41
- package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -0
- package/build/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/index.js +0 -1
- package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -0
- package/build/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/utils.js +0 -0
- package/build/custom-gradient-picker/gradient-bar/utils.js.map +1 -0
- package/build/custom-gradient-picker/index.js +30 -4
- package/build/custom-gradient-picker/index.js.map +1 -1
- package/build/custom-select-control/index.js +21 -11
- package/build/custom-select-control/index.js.map +1 -1
- package/build/custom-select-control/styles.js +34 -0
- package/build/custom-select-control/styles.js.map +1 -0
- package/build/date-time/constants.js +9 -0
- package/build/date-time/constants.js.map +1 -0
- package/build/date-time/date/index.js +196 -188
- package/build/date-time/date/index.js.map +1 -1
- package/build/date-time/date/styles.js +68 -39
- package/build/date-time/date/styles.js.map +1 -1
- package/build/date-time/date-time/index.js +3 -2
- 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/index.js +22 -17
- package/build/date-time/time/index.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/date-time/utils.js +27 -0
- package/build/date-time/utils.js.map +1 -0
- package/build/dimension-control/index.js +2 -6
- package/build/dimension-control/index.js.map +1 -1
- package/build/disabled/index.js +28 -11
- package/build/disabled/index.js.map +1 -1
- package/build/disabled/styles/disabled-styles.js +3 -3
- package/build/disabled/styles/disabled-styles.js.map +1 -1
- package/build/{swatch → disabled}/types.js +0 -0
- package/build/{swatch → disabled}/types.js.map +0 -0
- package/build/drop-zone/index.js +2 -4
- package/build/drop-zone/index.js.map +1 -1
- package/build/dropdown/index.js +5 -6
- package/build/dropdown/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/duotone-picker/custom-duotone-bar.js +2 -2
- package/build/duotone-picker/custom-duotone-bar.js.map +1 -1
- package/build/duotone-picker/duotone-picker.js +9 -1
- package/build/duotone-picker/duotone-picker.js.map +1 -1
- package/build/duotone-picker/duotone-swatch.js +13 -3
- package/build/duotone-picker/duotone-swatch.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 +164 -336
- 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/styles/focal-point-style.js +4 -4
- package/build/focal-point-picker/styles/focal-point-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/font-size-picker/index.js +43 -14
- package/build/font-size-picker/index.js.map +1 -1
- package/build/font-size-picker/utils.js +32 -22
- package/build/font-size-picker/utils.js.map +1 -1
- package/build/form-token-field/index.js +29 -20
- package/build/form-token-field/index.js.map +1 -1
- package/build/gradient-picker/index.js +25 -2
- package/build/gradient-picker/index.js.map +1 -1
- package/build/guide/index.js +13 -9
- package/build/guide/index.js.map +1 -1
- package/build/guide/page-control.js +3 -7
- package/build/guide/page-control.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/item-group/styles.js +10 -10
- package/build/item-group/styles.js.map +1 -1
- package/build/mobile/bottom-sheet/index.native.js +3 -6
- package/build/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build/mobile/global-styles-context/utils.native.js +4 -2
- package/build/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build/mobile/image/index.native.js +6 -26
- package/build/mobile/image/index.native.js.map +1 -1
- package/build/mobile/picker/index.android.js +3 -3
- package/build/mobile/picker/index.android.js.map +1 -1
- package/build/modal/index.js +1 -3
- package/build/modal/index.js.map +1 -1
- package/build/navigable-container/container.js +9 -8
- package/build/navigable-container/container.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/navigator/navigator-back-button/hook.js +0 -4
- package/build/navigator/navigator-back-button/hook.js.map +1 -1
- package/build/navigator/navigator-button/hook.js +0 -4
- package/build/navigator/navigator-button/hook.js.map +1 -1
- package/build/notice/list.js +10 -6
- package/build/notice/list.js.map +1 -1
- package/build/palette-edit/index.js +7 -2
- package/build/palette-edit/index.js.map +1 -1
- package/build/palette-edit/styles.js +10 -10
- package/build/palette-edit/styles.js.map +1 -1
- package/build/popover/index.js +93 -110
- package/build/popover/index.js.map +1 -1
- package/build/popover/utils.js +178 -0
- package/build/popover/utils.js.map +1 -0
- package/build/range-control/index.js +3 -0
- package/build/range-control/index.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +43 -37
- package/build/range-control/styles/range-control-styles.js.map +1 -1
- package/build/select-control/chevron-down.js +30 -0
- package/build/select-control/chevron-down.js.map +1 -0
- package/build/select-control/index.js +7 -7
- package/build/select-control/index.js.map +1 -1
- package/build/select-control/styles/select-control-styles.js +30 -15
- package/build/select-control/styles/select-control-styles.js.map +1 -1
- package/build/snackbar/list.js +5 -3
- package/build/snackbar/list.js.map +1 -1
- package/build/spinner/index.js +2 -0
- package/build/spinner/index.js.map +1 -1
- package/build/text/styles.js +7 -7
- package/build/text/styles.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 +17 -9
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/styles.js +24 -7
- package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option/component.js +15 -5
- package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/component.js +5 -1
- package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js +20 -7
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-icon/component.js +26 -7
- package/build/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
- package/build/tools-panel/styles.js +11 -11
- package/build/tools-panel/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/ui/context/context-connect.js +1 -3
- package/build/ui/context/context-connect.js.map +1 -1
- package/build/unit-control/index.js +2 -3
- package/build/unit-control/index.js.map +1 -1
- package/build/utils/colors-values.js +52 -142
- package/build/utils/colors-values.js.map +1 -1
- package/build/utils/config-values.js +1 -1
- package/build/utils/config-values.js.map +1 -1
- package/build/utils/input/input-control.js +1 -1
- package/build/utils/input/input-control.js.map +1 -1
- package/build/utils/rtl.js +6 -5
- package/build/utils/rtl.js.map +1 -1
- package/build/utils/strings.js +63 -0
- package/build/utils/strings.js.map +1 -0
- package/build-module/alignment-matrix-control/index.js +1 -1
- package/build-module/alignment-matrix-control/index.js.map +1 -1
- package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js +13 -13
- package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
- package/build-module/angle-picker-control/index.js +3 -0
- package/build-module/angle-picker-control/index.js.map +1 -1
- package/build-module/angle-picker-control/styles/angle-picker-control-styles.js +13 -4
- package/build-module/angle-picker-control/styles/angle-picker-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 +11 -11
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/base-control/styles/base-control-styles.js +8 -8
- package/build-module/base-control/styles/base-control-styles.js.map +1 -1
- package/build-module/base-field/styles.js +5 -5
- package/build-module/base-field/styles.js.map +1 -1
- package/build-module/box-control/styles/box-control-visualizer-styles.js +8 -8
- package/build-module/box-control/styles/box-control-visualizer-styles.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-list-picker/index.js +13 -5
- package/build-module/color-list-picker/index.js.map +1 -1
- package/build-module/color-palette/index.js +27 -13
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/color-palette/index.native.js +4 -4
- package/build-module/color-palette/index.native.js.map +1 -1
- package/build-module/combobox-control/index.js +6 -3
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/constants.js +0 -0
- package/build-module/custom-gradient-picker/gradient-bar/constants.js.map +1 -0
- package/build-module/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/control-points.js +34 -41
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -0
- package/build-module/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/index.js +0 -1
- package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -0
- package/build-module/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/utils.js +0 -0
- package/build-module/custom-gradient-picker/gradient-bar/utils.js.map +1 -0
- package/build-module/custom-gradient-picker/index.js +26 -3
- package/build-module/custom-gradient-picker/index.js.map +1 -1
- package/build-module/custom-select-control/index.js +20 -12
- package/build-module/custom-select-control/index.js.map +1 -1
- package/build-module/custom-select-control/styles.js +22 -0
- package/build-module/custom-select-control/styles.js.map +1 -0
- package/build-module/date-time/constants.js +2 -0
- package/build-module/date-time/constants.js.map +1 -0
- package/build-module/date-time/date/index.js +199 -186
- package/build-module/date-time/date/index.js.map +1 -1
- package/build-module/date-time/date/styles.js +61 -36
- package/build-module/date-time/date/styles.js.map +1 -1
- package/build-module/date-time/date-time/index.js +4 -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/index.js +20 -16
- package/build-module/date-time/time/index.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/date-time/utils.js +19 -0
- package/build-module/date-time/utils.js.map +1 -0
- package/build-module/dimension-control/index.js +1 -5
- package/build-module/dimension-control/index.js.map +1 -1
- package/build-module/disabled/index.js +28 -11
- package/build-module/disabled/index.js.map +1 -1
- package/build-module/disabled/styles/disabled-styles.js +3 -3
- package/build-module/disabled/styles/disabled-styles.js.map +1 -1
- package/build-module/{swatch → disabled}/types.js +0 -0
- package/build-module/{swatch → disabled}/types.js.map +0 -0
- package/build-module/drop-zone/index.js +2 -3
- package/build-module/drop-zone/index.js.map +1 -1
- package/build-module/dropdown/index.js +5 -6
- package/build-module/dropdown/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/duotone-picker/custom-duotone-bar.js +1 -1
- package/build-module/duotone-picker/custom-duotone-bar.js.map +1 -1
- package/build-module/duotone-picker/duotone-picker.js +7 -1
- package/build-module/duotone-picker/duotone-picker.js.map +1 -1
- package/build-module/duotone-picker/duotone-swatch.js +11 -3
- package/build-module/duotone-picker/duotone-swatch.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 +162 -330
- 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/styles/focal-point-style.js +4 -4
- package/build-module/focal-point-picker/styles/focal-point-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/font-size-picker/index.js +39 -14
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/font-size-picker/utils.js +31 -23
- package/build-module/font-size-picker/utils.js.map +1 -1
- package/build-module/form-token-field/index.js +30 -20
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/gradient-picker/index.js +23 -2
- package/build-module/gradient-picker/index.js.map +1 -1
- package/build-module/guide/index.js +13 -8
- package/build-module/guide/index.js.map +1 -1
- package/build-module/guide/page-control.js +3 -6
- package/build-module/guide/page-control.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/item-group/styles.js +10 -10
- package/build-module/item-group/styles.js.map +1 -1
- package/build-module/mobile/bottom-sheet/index.native.js +3 -5
- package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build-module/mobile/global-styles-context/utils.native.js +3 -2
- package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build-module/mobile/image/index.native.js +8 -28
- package/build-module/mobile/image/index.native.js.map +1 -1
- package/build-module/mobile/picker/index.android.js +3 -3
- package/build-module/mobile/picker/index.android.js.map +1 -1
- package/build-module/modal/index.js +1 -2
- package/build-module/modal/index.js.map +1 -1
- package/build-module/navigable-container/container.js +9 -7
- package/build-module/navigable-container/container.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/navigator/navigator-back-button/hook.js +0 -4
- package/build-module/navigator/navigator-back-button/hook.js.map +1 -1
- package/build-module/navigator/navigator-button/hook.js +0 -4
- package/build-module/navigator/navigator-button/hook.js.map +1 -1
- package/build-module/notice/list.js +10 -5
- package/build-module/notice/list.js.map +1 -1
- package/build-module/palette-edit/index.js +7 -2
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/palette-edit/styles.js +10 -10
- package/build-module/palette-edit/styles.js.map +1 -1
- package/build-module/popover/index.js +93 -111
- package/build-module/popover/index.js.map +1 -1
- package/build-module/popover/utils.js +164 -0
- package/build-module/popover/utils.js.map +1 -0
- package/build-module/range-control/index.js +3 -0
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +43 -37
- package/build-module/range-control/styles/range-control-styles.js.map +1 -1
- package/build-module/select-control/chevron-down.js +21 -0
- package/build-module/select-control/chevron-down.js.map +1 -0
- package/build-module/select-control/index.js +7 -7
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/select-control/styles/select-control-styles.js +24 -13
- package/build-module/select-control/styles/select-control-styles.js.map +1 -1
- package/build-module/snackbar/list.js +5 -2
- package/build-module/snackbar/list.js.map +1 -1
- package/build-module/spinner/index.js +2 -0
- package/build-module/spinner/index.js.map +1 -1
- package/build-module/text/styles.js +7 -7
- package/build-module/text/styles.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 +16 -8
- 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 -5
- package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option/component.js +17 -3
- package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +5 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +16 -6
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js +27 -5
- package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
- package/build-module/tools-panel/styles.js +11 -11
- package/build-module/tools-panel/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/ui/context/context-connect.js +1 -2
- package/build-module/ui/context/context-connect.js.map +1 -1
- package/build-module/unit-control/index.js +2 -2
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/utils/colors-values.js +52 -141
- package/build-module/utils/colors-values.js.map +1 -1
- package/build-module/utils/config-values.js +1 -1
- package/build-module/utils/config-values.js.map +1 -1
- package/build-module/utils/input/input-control.js +1 -1
- package/build-module/utils/input/input-control.js.map +1 -1
- package/build-module/utils/rtl.js +6 -4
- package/build-module/utils/rtl.js.map +1 -1
- package/build-module/utils/strings.js +48 -0
- package/build-module/utils/strings.js.map +1 -0
- package/build-style/style-rtl.css +202 -1272
- package/build-style/style.css +202 -1275
- package/build-types/animation/index.d.ts +2 -0
- package/build-types/{flyout → animation}/index.d.ts.map +1 -1
- 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/{flyout/flyout → card/test}/index.d.ts.map +1 -1
- 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 +2 -1
- package/build-types/color-palette/index.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +2 -2
- package/build-types/composite/index.d.ts +2 -0
- package/build-types/composite/index.d.ts.map +1 -0
- package/build-types/date-time/constants.d.ts +2 -0
- package/build-types/date-time/constants.d.ts.map +1 -0
- package/build-types/date-time/date/index.d.ts +4 -2
- package/build-types/date-time/date/index.d.ts.map +1 -1
- package/build-types/date-time/date/styles.d.ts +26 -8
- package/build-types/date-time/date/styles.d.ts.map +1 -1
- package/build-types/date-time/date/test/index.d.ts +1 -1
- package/build-types/date-time/date/test/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/index.d.ts.map +1 -1
- package/build-types/date-time/time/styles.d.ts.map +1 -1
- package/build-types/date-time/utils.d.ts +8 -0
- package/build-types/date-time/utils.d.ts.map +1 -0
- package/build-types/disabled/index.d.ts +35 -28
- package/build-types/disabled/index.d.ts.map +1 -1
- package/build-types/disabled/stories/index.d.ts +13 -0
- package/build-types/disabled/stories/index.d.ts.map +1 -0
- package/build-types/disabled/styles/disabled-styles.d.ts +2 -1
- package/build-types/disabled/styles/disabled-styles.d.ts.map +1 -1
- package/build-types/disabled/test/index.d.ts +2 -0
- package/build-types/disabled/test/index.d.ts.map +1 -0
- package/build-types/disabled/types.d.ts +14 -0
- package/build-types/disabled/types.d.ts.map +1 -0
- package/build-types/disclosure/index.d.ts +2 -0
- package/build-types/disclosure/index.d.ts.map +1 -0
- package/build-types/dropdown/index.d.ts.map +1 -1
- 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/stories/index.d.ts +1 -0
- package/build-types/form-token-field/stories/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/form-token-field/types.d.ts +7 -0
- package/build-types/form-token-field/types.d.ts.map +1 -1
- 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/navigator/navigator-back-button/hook.d.ts +0 -3
- package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-button/hook.d.ts +0 -3
- package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
- package/build-types/placeholder/test/index.d.ts +2 -0
- package/build-types/placeholder/test/index.d.ts.map +1 -0
- package/build-types/popover/index.d.ts +1 -2
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/popover/utils.d.ts +26 -69
- package/build-types/popover/utils.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/range-control/index.d.ts +2 -2
- package/build-types/range-control/index.d.ts.map +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts +5 -2
- package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
- package/build-types/range-control/types.d.ts +2 -2
- package/build-types/range-control/types.d.ts.map +1 -1
- package/build-types/select-control/chevron-down.d.ts +4 -0
- package/build-types/select-control/chevron-down.d.ts.map +1 -0
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/styles/select-control-styles.d.ts +8 -0
- package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
- package/build-types/spinner/index.d.ts.map +1 -1
- 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/stories/index.d.ts +25 -0
- package/build-types/toggle-group-control/stories/index.d.ts.map +1 -0
- package/build-types/toggle-group-control/test/index.d.ts +2 -0
- package/build-types/toggle-group-control/test/index.d.ts.map +1 -0
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts +6 -3
- 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 +5 -0
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +6 -7
- package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +4 -0
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +11 -9
- package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/types.d.ts +23 -10
- package/build-types/toggle-group-control/types.d.ts.map +1 -1
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/build-types/ui/context/context-connect.d.ts +3 -0
- package/build-types/ui/context/context-connect.d.ts.map +1 -1
- package/build-types/ui/form-group/use-form-group.d.ts +2 -2
- package/build-types/unit-control/index.d.ts +2 -1
- package/build-types/unit-control/index.d.ts.map +1 -1
- package/build-types/unit-control/types.d.ts +5 -1
- package/build-types/unit-control/types.d.ts.map +1 -1
- package/build-types/utils/colors-values.d.ts +18 -97
- package/build-types/utils/colors-values.d.ts.map +1 -1
- package/build-types/utils/rtl.d.ts.map +1 -1
- package/build-types/utils/strings.d.ts +10 -0
- package/build-types/utils/strings.d.ts.map +1 -0
- package/package.json +22 -21
- package/src/alignment-matrix-control/index.js +1 -1
- package/src/alignment-matrix-control/stories/index.js +49 -24
- package/src/alignment-matrix-control/styles/alignment-matrix-control-styles.js +2 -3
- package/src/angle-picker-control/index.js +7 -1
- package/src/angle-picker-control/stories/index.js +8 -5
- package/src/angle-picker-control/styles/angle-picker-control-styles.js +12 -3
- package/src/autocomplete/get-default-use-items.js +6 -1
- package/src/autocomplete/index.js +11 -19
- package/src/base-control/styles/base-control-styles.ts +1 -1
- package/src/base-field/styles.js +1 -1
- package/src/base-field/test/__snapshots__/index.js.snap +2 -2
- package/src/box-control/styles/box-control-visualizer-styles.js +0 -1
- package/src/box-control/test/index.js +8 -8
- package/src/button/test/index.js +188 -146
- 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-list-picker/index.js +15 -3
- package/src/color-list-picker/style.scss +11 -0
- package/src/color-palette/index.js +40 -21
- package/src/color-palette/index.native.js +10 -6
- package/src/color-palette/stories/index.js +1 -1
- package/src/color-palette/style.scss +0 -14
- package/src/color-palette/test/__snapshots__/index.js.snap +28 -7
- package/src/combobox-control/index.js +6 -5
- package/src/combobox-control/stories/index.js +9 -3
- package/src/combobox-control/style.scss +0 -1
- package/src/confirm-dialog/test/index.js +85 -62
- package/src/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/constants.js +0 -0
- package/src/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/control-points.js +54 -50
- package/src/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/index.js +0 -3
- package/src/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/test/utils.js +0 -0
- package/src/{custom-gradient-bar → custom-gradient-picker/gradient-bar}/utils.js +0 -0
- package/src/custom-gradient-picker/index.js +30 -3
- package/src/custom-gradient-picker/stories/index.js +6 -2
- package/src/custom-gradient-picker/style.scss +30 -27
- package/src/custom-select-control/README.md +10 -0
- package/src/custom-select-control/index.js +22 -16
- package/src/custom-select-control/stories/index.js +1 -1
- package/src/custom-select-control/style.scss +0 -12
- package/src/custom-select-control/styles.ts +28 -0
- package/src/custom-select-control/test/index.js +4 -1
- package/src/date-time/constants.ts +1 -0
- package/src/date-time/date/index.tsx +310 -185
- package/src/date-time/date/styles.ts +92 -27
- package/src/date-time/date/test/index.tsx +24 -30
- package/src/date-time/date-time/index.tsx +3 -3
- package/src/date-time/date-time/styles.ts +9 -0
- package/src/date-time/time/index.tsx +23 -19
- package/src/date-time/time/styles.ts +1 -0
- package/src/date-time/utils.ts +17 -0
- package/src/dimension-control/index.js +1 -5
- package/src/disabled/index.tsx +80 -0
- package/src/disabled/stories/index.tsx +87 -0
- package/src/disabled/styles/{disabled-styles.js → disabled-styles.tsx} +0 -0
- package/src/disabled/test/index.tsx +174 -0
- package/src/disabled/types.ts +13 -0
- package/src/drop-zone/index.js +2 -3
- package/src/dropdown/index.js +3 -5
- package/src/dropdown-menu/index.js +1 -2
- package/src/dropdown-menu/index.native.js +0 -13
- package/src/dropdown-menu/stories/index.js +13 -2
- package/src/dropdown-menu/test/index.js +54 -58
- package/src/duotone-picker/custom-duotone-bar.js +1 -1
- package/src/duotone-picker/duotone-picker.js +34 -26
- package/src/duotone-picker/duotone-swatch.js +12 -5
- package/src/duotone-picker/stories/duotone-picker.js +66 -0
- package/src/duotone-picker/stories/duotone-swatch.js +32 -0
- 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 +171 -308
- 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/styles/focal-point-style.js +0 -1
- package/src/focal-point-picker/test/index.js +79 -46
- package/src/focal-point-picker/utils.js +2 -6
- package/src/focusable-iframe/index.js +5 -0
- package/src/font-size-picker/index.js +161 -144
- package/src/font-size-picker/stories/index.js +1 -0
- package/src/font-size-picker/style.scss +8 -5
- package/src/font-size-picker/test/index.js +13 -6
- package/src/font-size-picker/test/{util.js → utils.js} +77 -1
- package/src/font-size-picker/utils.js +38 -23
- package/src/form-token-field/README.md +1 -0
- package/src/form-token-field/index.tsx +41 -33
- package/src/form-token-field/stories/index.tsx +8 -0
- package/src/form-token-field/test/index.tsx +2106 -0
- package/src/form-token-field/types.ts +7 -0
- package/src/gradient-picker/README.md +9 -0
- package/src/gradient-picker/index.js +31 -7
- package/src/gradient-picker/stories/index.js +57 -81
- package/src/guide/index.js +9 -4
- package/src/guide/page-control.js +1 -6
- package/src/guide/stories/index.js +12 -11
- package/src/guide/test/index.js +191 -37
- package/src/higher-order/with-constrained-tabbing/index.js +1 -1
- package/src/higher-order/with-notices/test/index.js +4 -2
- package/src/higher-order/with-spoken-messages/index.js +2 -0
- package/src/higher-order/with-spoken-messages/test/index.js +1 -1
- package/src/isolated-event-container/index.js +3 -0
- package/src/item-group/styles.ts +3 -3
- package/src/menu-group/test/index.js +18 -7
- package/src/mobile/bottom-sheet/index.native.js +2 -4
- package/src/mobile/global-styles-context/utils.native.js +8 -2
- package/src/mobile/image/index.native.js +9 -30
- package/src/mobile/picker/index.android.js +10 -4
- package/src/mobile/picker/styles.native.scss +4 -4
- package/src/modal/index.js +1 -2
- package/src/modal/test/index.js +11 -9
- package/src/navigable-container/container.js +12 -18
- package/src/navigable-container/menu.js +3 -7
- package/src/navigable-container/test/menu.js +14 -11
- package/src/navigation/menu/menu-title-search.js +1 -2
- package/src/navigator/navigator-back-button/hook.ts +0 -3
- package/src/navigator/navigator-button/hook.ts +0 -3
- package/src/notice/list.js +12 -10
- package/src/palette-edit/index.js +15 -10
- package/src/palette-edit/style.scss +3 -11
- package/src/palette-edit/styles.js +6 -5
- package/src/placeholder/README.md +1 -1
- package/src/placeholder/style.scss +62 -20
- package/src/placeholder/test/index.tsx +174 -0
- package/src/popover/index.js +129 -126
- package/src/popover/stories/index.js +17 -4
- package/src/popover/test/__snapshots__/index.js.snap +6 -6
- package/src/popover/test/index.js +129 -36
- package/src/popover/utils.js +107 -0
- package/src/range-control/index.tsx +3 -0
- package/src/range-control/styles/range-control-styles.ts +9 -4
- package/src/range-control/types.ts +5 -2
- package/src/select-control/chevron-down.tsx +25 -0
- package/src/select-control/index.tsx +6 -9
- package/src/select-control/styles/select-control-styles.ts +23 -14
- package/src/slot-fill/test/slot.js +5 -5
- package/src/snackbar/list.js +3 -2
- package/src/spinner/index.tsx +2 -0
- package/src/style.scss +0 -2
- package/src/text/styles.js +1 -1
- package/src/text/test/index.tsx +1 -1
- package/src/text-highlight/index.tsx +1 -5
- package/src/toggle-group-control/stories/index.tsx +127 -0
- package/src/toggle-group-control/test/__snapshots__/{index.js.snap → index.tsx.snap} +81 -57
- package/src/toggle-group-control/test/{index.js → index.tsx} +2 -4
- package/src/toggle-group-control/toggle-group-control/README.md +2 -0
- package/src/toggle-group-control/toggle-group-control/component.tsx +21 -11
- package/src/toggle-group-control/toggle-group-control/styles.ts +14 -6
- package/src/toggle-group-control/toggle-group-control-option/component.tsx +19 -3
- package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +3 -0
- package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +18 -0
- package/src/toggle-group-control/toggle-group-control-option-icon/README.md +6 -8
- package/src/toggle-group-control/toggle-group-control-option-icon/component.tsx +30 -7
- package/src/toggle-group-control/types.ts +74 -59
- package/src/toolbar/test/index.js +4 -4
- package/src/toolbar-group/test/index.js +9 -15
- package/src/tools-panel/styles.ts +2 -2
- package/src/tools-panel/test/index.js +3 -2
- package/src/tooltip/index.js +1 -5
- package/src/tooltip/test/index.js +188 -172
- package/src/tree-grid/index.js +4 -9
- package/src/ui/context/context-connect.ts +3 -2
- package/src/unit-control/index.tsx +2 -2
- package/src/unit-control/types.ts +10 -1
- package/src/utils/colors-values.js +42 -137
- package/src/utils/config-values.js +1 -1
- package/src/utils/input/input-control.js +6 -6
- package/src/utils/rtl.js +6 -2
- package/src/utils/strings.ts +83 -0
- package/src/utils/test/strings.js +15 -0
- package/tsconfig.json +45 -77
- package/tsconfig.tsbuildinfo +1 -1
- package/build/custom-gradient-bar/constants.js.map +0 -1
- package/build/custom-gradient-bar/control-points.js.map +0 -1
- package/build/custom-gradient-bar/index.js.map +0 -1
- package/build/custom-gradient-bar/utils.js.map +0 -1
- package/build/date-time/date/utils.js +0 -34
- package/build/date-time/date/utils.js.map +0 -1
- package/build/swatch/index.js +0 -41
- package/build/swatch/index.js.map +0 -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/custom-gradient-bar/constants.js.map +0 -1
- package/build-module/custom-gradient-bar/control-points.js.map +0 -1
- package/build-module/custom-gradient-bar/index.js.map +0 -1
- package/build-module/custom-gradient-bar/utils.js.map +0 -1
- package/build-module/date-time/date/utils.js +0 -22
- package/build-module/date-time/date/utils.js.map +0 -1
- package/build-module/swatch/index.js +0 -30
- package/build-module/swatch/index.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/color-picker/color-display.d.ts +0 -13
- package/build-types/color-picker/color-display.d.ts.map +0 -1
- package/build-types/date-time/date/test/utils.d.ts +0 -2
- package/build-types/date-time/date/test/utils.d.ts.map +0 -1
- package/build-types/date-time/date/utils.d.ts +0 -15
- package/build-types/date-time/date/utils.d.ts.map +0 -1
- package/build-types/flyout/context.d.ts +0 -6
- package/build-types/flyout/context.d.ts.map +0 -1
- package/build-types/flyout/flyout/component.d.ts +0 -21
- package/build-types/flyout/flyout/component.d.ts.map +0 -1
- package/build-types/flyout/flyout/hook.d.ts +0 -270
- package/build-types/flyout/flyout/hook.d.ts.map +0 -1
- package/build-types/flyout/flyout/index.d.ts +0 -3
- package/build-types/flyout/flyout-content/component.d.ts +0 -3
- package/build-types/flyout/flyout-content/component.d.ts.map +0 -1
- package/build-types/flyout/flyout-content/index.d.ts +0 -2
- package/build-types/flyout/flyout-content/index.d.ts.map +0 -1
- package/build-types/flyout/index.d.ts +0 -2
- package/build-types/flyout/styles.d.ts +0 -22
- package/build-types/flyout/styles.d.ts.map +0 -1
- package/build-types/flyout/types.d.ts +0 -80
- package/build-types/flyout/types.d.ts.map +0 -1
- package/build-types/flyout/utils.d.ts +0 -8
- package/build-types/flyout/utils.d.ts.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/swatch/index.d.ts +0 -5
- package/build-types/swatch/index.d.ts.map +0 -1
- package/build-types/swatch/types.d.ts +0 -11
- package/build-types/swatch/types.d.ts.map +0 -1
- package/build-types/utils/hooks/use-combined-ref.d.ts +0 -8
- package/build-types/utils/hooks/use-combined-ref.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/date-time/date/datepicker.scss +0 -863
- package/src/date-time/date/style.scss +0 -85
- package/src/date-time/date/test/utils.ts +0 -32
- package/src/date-time/date/utils.ts +0 -20
- package/src/date-time/style.scss +0 -1
- package/src/disabled/index.js +0 -55
- package/src/disabled/stories/index.js +0 -61
- package/src/disabled/test/index.js +0 -240
- package/src/form-token-field/test/index.js +0 -411
- 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 -43
- package/src/menu-group/test/__snapshots__/index.js.snap +0 -23
- package/src/placeholder/test/index.js +0 -163
- package/src/swatch/index.tsx +0 -22
- package/src/swatch/style.scss +0 -21
- package/src/swatch/types.ts +0 -11
- package/src/toggle-group-control/stories/index.js +0 -203
- package/src/tools-panel/test/__snapshots__/index.js.snap +0 -210
- 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,10 +5,10 @@ import { createElement } from "@wordpress/element";
|
|
|
5
5
|
* External dependencies
|
|
6
6
|
*/
|
|
7
7
|
import { css } from '@emotion/react';
|
|
8
|
+
|
|
8
9
|
/**
|
|
9
10
|
* WordPress dependencies
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
12
|
import { useMemo } from '@wordpress/element';
|
|
13
13
|
/**
|
|
14
14
|
* Internal dependencies
|
|
@@ -21,12 +21,8 @@ import * as styles from '../styles';
|
|
|
21
21
|
import { useCard } from './hook';
|
|
22
22
|
import CONFIG from '../../utils/config-values';
|
|
23
23
|
import { useCx } from '../../utils/hooks/use-cx';
|
|
24
|
-
/**
|
|
25
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').Props, 'div'>} props
|
|
26
|
-
* @param {import('react').ForwardedRef<any>} forwardedRef
|
|
27
|
-
*/
|
|
28
24
|
|
|
29
|
-
function
|
|
25
|
+
function UnconnectedCard(props, forwardedRef) {
|
|
30
26
|
const {
|
|
31
27
|
children,
|
|
32
28
|
elevation,
|
|
@@ -39,7 +35,7 @@ function Card(props, forwardedRef) {
|
|
|
39
35
|
const cx = useCx();
|
|
40
36
|
const elevationClassName = useMemo(() => cx( /*#__PURE__*/css({
|
|
41
37
|
borderRadius: elevationBorderRadius
|
|
42
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:elevationClassName;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
38
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:elevationClassName;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvY2FyZC9jYXJkL2NvbXBvbmVudC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNENZIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvY2FyZC9jYXJkL2NvbXBvbmVudC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgdHlwZSB7IEZvcndhcmRlZFJlZiB9IGZyb20gJ3JlYWN0JztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IHVzZU1lbW8gfSBmcm9tICdAd29yZHByZXNzL2VsZW1lbnQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQge1xuXHRjb250ZXh0Q29ubmVjdCxcblx0Q29udGV4dFN5c3RlbVByb3ZpZGVyLFxuXHRXb3JkUHJlc3NDb21wb25lbnRQcm9wcyxcbn0gZnJvbSAnLi4vLi4vdWkvY29udGV4dCc7XG5pbXBvcnQgeyBFbGV2YXRpb24gfSBmcm9tICcuLi8uLi9lbGV2YXRpb24nO1xuaW1wb3J0IHsgVmlldyB9IGZyb20gJy4uLy4uL3ZpZXcnO1xuaW1wb3J0ICogYXMgc3R5bGVzIGZyb20gJy4uL3N0eWxlcyc7XG5pbXBvcnQgeyB1c2VDYXJkIH0gZnJvbSAnLi9ob29rJztcbmltcG9ydCBDT05GSUcgZnJvbSAnLi4vLi4vdXRpbHMvY29uZmlnLXZhbHVlcyc7XG5pbXBvcnQgeyB1c2VDeCB9IGZyb20gJy4uLy4uL3V0aWxzL2hvb2tzL3VzZS1jeCc7XG5pbXBvcnQgdHlwZSB7IFByb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuXG5mdW5jdGlvbiBVbmNvbm5lY3RlZENhcmQoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczwgUHJvcHMsICdkaXYnID4sXG5cdGZvcndhcmRlZFJlZjogRm9yd2FyZGVkUmVmPCBhbnkgPlxuKSB7XG5cdGNvbnN0IHtcblx0XHRjaGlsZHJlbixcblx0XHRlbGV2YXRpb24sXG5cdFx0aXNCb3JkZXJsZXNzLFxuXHRcdGlzUm91bmRlZCxcblx0XHRzaXplLFxuXHRcdC4uLm90aGVyUHJvcHNcblx0fSA9IHVzZUNhcmQoIHByb3BzICk7XG5cdGNvbnN0IGVsZXZhdGlvbkJvcmRlclJhZGl1cyA9IGlzUm91bmRlZCA/IENPTkZJRy5jYXJkQm9yZGVyUmFkaXVzIDogMDtcblxuXHRjb25zdCBjeCA9IHVzZUN4KCk7XG5cblx0Y29uc3QgZWxldmF0aW9uQ2xhc3NOYW1lID0gdXNlTWVtbyhcblx0XHQoKSA9PiBjeCggY3NzKCB7IGJvcmRlclJhZGl1czogZWxldmF0aW9uQm9yZGVyUmFkaXVzIH0gKSApLFxuXHRcdFsgY3gsIGVsZXZhdGlvbkJvcmRlclJhZGl1cyBdXG5cdCk7XG5cblx0Y29uc3QgY29udGV4dFByb3ZpZGVyVmFsdWUgPSB1c2VNZW1vKCAoKSA9PiB7XG5cdFx0Y29uc3QgY29udGV4dFByb3BzID0ge1xuXHRcdFx0c2l6ZSxcblx0XHRcdGlzQm9yZGVybGVzcyxcblx0XHR9O1xuXHRcdHJldHVybiB7XG5cdFx0XHRDYXJkQm9keTogY29udGV4dFByb3BzLFxuXHRcdFx0Q2FyZEhlYWRlcjogY29udGV4dFByb3BzLFxuXHRcdFx0Q2FyZEZvb3RlcjogY29udGV4dFByb3BzLFxuXHRcdH07XG5cdH0sIFsgaXNCb3JkZXJsZXNzLCBzaXplIF0gKTtcblxuXHRyZXR1cm4gKFxuXHRcdDxDb250ZXh0U3lzdGVtUHJvdmlkZXIgdmFsdWU9eyBjb250ZXh0UHJvdmlkZXJWYWx1ZSB9PlxuXHRcdFx0PFZpZXcgeyAuLi5vdGhlclByb3BzIH0gcmVmPXsgZm9yd2FyZGVkUmVmIH0+XG5cdFx0XHRcdDxWaWV3IGNsYXNzTmFtZT17IGN4KCBzdHlsZXMuQ29udGVudCApIH0+eyBjaGlsZHJlbiB9PC9WaWV3PlxuXHRcdFx0XHQ8RWxldmF0aW9uXG5cdFx0XHRcdFx0Y2xhc3NOYW1lPXsgZWxldmF0aW9uQ2xhc3NOYW1lIH1cblx0XHRcdFx0XHRpc0ludGVyYWN0aXZlPXsgZmFsc2UgfVxuXHRcdFx0XHRcdHZhbHVlPXsgZWxldmF0aW9uID8gMSA6IDAgfVxuXHRcdFx0XHQvPlxuXHRcdFx0XHQ8RWxldmF0aW9uXG5cdFx0XHRcdFx0Y2xhc3NOYW1lPXsgZWxldmF0aW9uQ2xhc3NOYW1lIH1cblx0XHRcdFx0XHRpc0ludGVyYWN0aXZlPXsgZmFsc2UgfVxuXHRcdFx0XHRcdHZhbHVlPXsgZWxldmF0aW9uIH1cblx0XHRcdFx0Lz5cblx0XHRcdDwvVmlldz5cblx0XHQ8L0NvbnRleHRTeXN0ZW1Qcm92aWRlcj5cblx0KTtcbn1cblxuLyoqXG4gKiBgQ2FyZGAgcHJvdmlkZXMgYSBmbGV4aWJsZSBhbmQgZXh0ZW5zaWJsZSBjb250ZW50IGNvbnRhaW5lci5cbiAqIGBDYXJkYCBhbHNvIHByb3ZpZGVzIGEgY29udmVuaWVudCBzZXQgb2Ygc3ViLWNvbXBvbmVudHMgc3VjaCBhcyBgQ2FyZEJvZHlgLFxuICogYENhcmRIZWFkZXJgLCBgQ2FyZEZvb3RlcmAsIGFuZCBtb3JlLlxuICpcbiAqIGBgYGpzeFxuICogaW1wb3J0IHtcbiAqICAgQ2FyZCxcbiAqICAgQ2FyZEhlYWRlcixcbiAqICAgQ2FyZEJvZHksXG4gKiAgIENhcmRGb290ZXIsXG4gKiAgIFRleHQsXG4gKiAgIEhlYWRpbmcsXG4gKiB9IGZyb20gYEB3b3JkcHJlc3MvY29tcG9uZW50c2A7XG4gKlxuICogZnVuY3Rpb24gRXhhbXBsZSgpIHtcbiAqICAgcmV0dXJuIChcbiAqICAgICA8Q2FyZD5cbiAqICAgICAgIDxDYXJkSGVhZGVyPlxuICogICAgICAgICA8SGVhZGluZyBzaXplPXsgNCB9PkNhcmQgVGl0bGU8L0hlYWRpbmc+XG4gKiAgICAgICA8L0NhcmRIZWFkZXI+XG4gKiAgICAgICA8Q2FyZEJvZHk+XG4gKiAgICAgICAgIDxUZXh0PkNhcmQgQ29udGVudDwvVGV4dD5cbiAqICAgICAgIDwvQ2FyZEJvZHk+XG4gKiAgICAgICA8Q2FyZEZvb3Rlcj5cbiAqICAgICAgICAgPFRleHQ+Q2FyZCBGb290ZXI8L1RleHQ+XG4gKiAgICAgICA8L0NhcmRGb290ZXI+XG4gKiAgICAgPC9DYXJkPlxuICogICApO1xuICogfVxuICogYGBgXG4gKi9cbmV4cG9ydCBjb25zdCBDYXJkID0gY29udGV4dENvbm5lY3QoIFVuY29ubmVjdGVkQ2FyZCwgJ0NhcmQnICk7XG5cbmV4cG9ydCBkZWZhdWx0IENhcmQ7XG4iXX0= */")), [cx, elevationBorderRadius]);
|
|
43
39
|
const contextProviderValue = useMemo(() => {
|
|
44
40
|
const contextProps = {
|
|
45
41
|
size,
|
|
@@ -72,7 +68,6 @@ function Card(props, forwardedRef) {
|
|
|
72
68
|
* `Card` also provides a convenient set of sub-components such as `CardBody`,
|
|
73
69
|
* `CardHeader`, `CardFooter`, and more.
|
|
74
70
|
*
|
|
75
|
-
* @example
|
|
76
71
|
* ```jsx
|
|
77
72
|
* import {
|
|
78
73
|
* Card,
|
|
@@ -102,6 +97,6 @@ function Card(props, forwardedRef) {
|
|
|
102
97
|
*/
|
|
103
98
|
|
|
104
99
|
|
|
105
|
-
const
|
|
106
|
-
export default
|
|
100
|
+
export const Card = contextConnect(UnconnectedCard, 'Card');
|
|
101
|
+
export default Card;
|
|
107
102
|
//# 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":["css","useMemo","contextConnect","ContextSystemProvider","Elevation","View","styles","useCard","CONFIG","useCx","UnconnectedCard","props","forwardedRef","children","elevation","isBorderless","isRounded","size","otherProps","elevationBorderRadius","cardBorderRadius","cx","elevationClassName","borderRadius","contextProviderValue","contextProps","CardBody","CardHeader","CardFooter","Content","Card"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,GAAT,QAAoB,gBAApB;;AAGA;AACA;AACA;AACA,SAASC,OAAT,QAAwB,oBAAxB;AAEA;AACA;AACA;;AACA,SACCC,cADD,EAECC,qBAFD,QAIO,kBAJP;AAKA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,OAAO,KAAKC,MAAZ,MAAwB,WAAxB;AACA,SAASC,OAAT,QAAwB,QAAxB;AACA,OAAOC,MAAP,MAAmB,2BAAnB;AACA,SAASC,KAAT,QAAsB,0BAAtB;;AAGA,SAASC,eAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAM;AACLC,IAAAA,QADK;AAELC,IAAAA,SAFK;AAGLC,IAAAA,YAHK;AAILC,IAAAA,SAJK;AAKLC,IAAAA,IALK;AAML,OAAGC;AANE,MAOFX,OAAO,CAAEI,KAAF,CAPX;AAQA,QAAMQ,qBAAqB,GAAGH,SAAS,GAAGR,MAAM,CAACY,gBAAV,GAA6B,CAApE;AAEA,QAAMC,EAAE,GAAGZ,KAAK,EAAhB;AAEA,QAAMa,kBAAkB,GAAGrB,OAAO,CACjC,MAAMoB,EAAE,eAAErB,GAAG,CAAE;AAAEuB,IAAAA,YAAY,EAAEJ;AAAhB,GAAF,wiIAAL,CADyB,EAEjC,CAAEE,EAAF,EAAMF,qBAAN,CAFiC,CAAlC;AAKA,QAAMK,oBAAoB,GAAGvB,OAAO,CAAE,MAAM;AAC3C,UAAMwB,YAAY,GAAG;AACpBR,MAAAA,IADoB;AAEpBF,MAAAA;AAFoB,KAArB;AAIA,WAAO;AACNW,MAAAA,QAAQ,EAAED,YADJ;AAENE,MAAAA,UAAU,EAAEF,YAFN;AAGNG,MAAAA,UAAU,EAAEH;AAHN,KAAP;AAKA,GAVmC,EAUjC,CAAEV,YAAF,EAAgBE,IAAhB,CAViC,CAApC;AAYA,SACC,cAAC,qBAAD;AAAuB,IAAA,KAAK,EAAGO;AAA/B,KACC,cAAC,IAAD,eAAWN,UAAX;AAAwB,IAAA,GAAG,EAAGN;AAA9B,MACC,cAAC,IAAD;AAAM,IAAA,SAAS,EAAGS,EAAE,CAAEf,MAAM,CAACuB,OAAT;AAApB,KAA2ChB,QAA3C,CADD,EAEC,cAAC,SAAD;AACC,IAAA,SAAS,EAAGS,kBADb;AAEC,IAAA,aAAa,EAAG,KAFjB;AAGC,IAAA,KAAK,EAAGR,SAAS,GAAG,CAAH,GAAO;AAHzB,IAFD,EAOC,cAAC,SAAD;AACC,IAAA,SAAS,EAAGQ,kBADb;AAEC,IAAA,aAAa,EAAG,KAFjB;AAGC,IAAA,KAAK,EAAGR;AAHT,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;;;AACA,OAAO,MAAMgB,IAAI,GAAG5B,cAAc,CAAEQ,eAAF,EAAmB,MAAnB,CAA3B;AAEP,eAAeoB,IAAf","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"]}
|
|
@@ -11,9 +11,6 @@ import { useContextSystem } 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
|
-
/**
|
|
15
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').Props, 'div'>} props
|
|
16
|
-
*/
|
|
17
14
|
|
|
18
15
|
function useDeprecatedProps(_ref) {
|
|
19
16
|
let {
|
|
@@ -21,8 +18,6 @@ function useDeprecatedProps(_ref) {
|
|
|
21
18
|
isElevated,
|
|
22
19
|
...otherProps
|
|
23
20
|
} = _ref;
|
|
24
|
-
|
|
25
|
-
/**@type {import('../../ui/context').WordPressComponentProps<import('../types').Props, 'div'>} */
|
|
26
21
|
const propsToReturn = { ...otherProps
|
|
27
22
|
};
|
|
28
23
|
let computedElevation = elevation;
|
|
@@ -45,10 +40,6 @@ function useDeprecatedProps(_ref) {
|
|
|
45
40
|
|
|
46
41
|
return propsToReturn;
|
|
47
42
|
}
|
|
48
|
-
/**
|
|
49
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').Props, 'div'>} props
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
43
|
|
|
53
44
|
export function useCard(props) {
|
|
54
45
|
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":["deprecated","useMemo","useContextSystem","useSurface","styles","useCx","useDeprecatedProps","elevation","isElevated","otherProps","propsToReturn","computedElevation","since","alternative","useCard","props","className","isBorderless","isRounded","size","cx","classes","Card","boxShadowless","rounded","surfaceProps"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,uBAAvB;AACA,SAASC,OAAT,QAAwB,oBAAxB;AAEA;AACA;AACA;;AACA,SAASC,gBAAT,QAA0D,kBAA1D;AACA,SAASC,UAAT,QAA2B,eAA3B;AACA,OAAO,KAAKC,MAAZ,MAAwB,WAAxB;AACA,SAASC,KAAT,QAAsB,0BAAtB;;AAKA,SAASC,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;;AACjBR,IAAAA,UAAU,CAAE,sBAAF,EAA0B;AACnCY,MAAAA,KAAK,EAAE,KAD4B;AAEnCC,MAAAA,WAAW,EAAE;AAFsB,KAA1B,CAAV;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;;AAED,OAAO,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,MAOFP,gBAAgB,CAAEI,kBAAkB,CAAES,KAAF,CAApB,EAA+B,MAA/B,CAPpB;AASA,QAAMK,EAAE,GAAGf,KAAK,EAAhB;AAEA,QAAMgB,OAAO,GAAGpB,OAAO,CAAE,MAAM;AAC9B,WAAOmB,EAAE,CACRhB,MAAM,CAACkB,IADC,EAERL,YAAY,IAAIb,MAAM,CAACmB,aAFf,EAGRL,SAAS,IAAId,MAAM,CAACoB,OAHZ,EAIRR,SAJQ,CAAT;AAMA,GAPsB,EAOpB,CAAEA,SAAF,EAAaI,EAAb,EAAiBH,YAAjB,EAA+BC,SAA/B,CAPoB,CAAvB;AASA,QAAMO,YAAY,GAAGtB,UAAU,CAAE,EAAE,GAAGM,UAAL;AAAiBO,IAAAA,SAAS,EAAEK;AAA5B,GAAF,CAA/B;AAEA,SAAO,EACN,GAAGI,YADG;AAENlB,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":["default","useCard"],"mappings":"AAAA,SAASA,OAAT,QAAwB,aAAxB;AACA,SAASC,OAAT,QAAwB,QAAxB","sourcesContent":["export { default } from './component';\nexport { useCard } from './hook';\n"]}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { createElement } from "@wordpress/element";
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* External dependencies
|
|
6
|
+
*/
|
|
7
|
+
|
|
4
8
|
/**
|
|
5
9
|
* Internal dependencies
|
|
6
10
|
*/
|
|
@@ -8,12 +12,8 @@ import { contextConnect } from '../../ui/context';
|
|
|
8
12
|
import { Scrollable } from '../../scrollable';
|
|
9
13
|
import { View } from '../../view';
|
|
10
14
|
import { useCardBody } from './hook';
|
|
11
|
-
/**
|
|
12
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').BodyProps, 'div'>} props
|
|
13
|
-
* @param {import('react').ForwardedRef<any>} forwardedRef
|
|
14
|
-
*/
|
|
15
15
|
|
|
16
|
-
function
|
|
16
|
+
function UnconnectedCardBody(props, forwardedRef) {
|
|
17
17
|
const {
|
|
18
18
|
isScrollable,
|
|
19
19
|
...otherProps
|
|
@@ -33,7 +33,6 @@ function CardBody(props, forwardedRef) {
|
|
|
33
33
|
* `CardBody` renders an optional content area for a `Card`.
|
|
34
34
|
* Multiple `CardBody` components can be used within `Card` if needed.
|
|
35
35
|
*
|
|
36
|
-
* @example
|
|
37
36
|
* ```jsx
|
|
38
37
|
* import { Card, CardBody } from `@wordpress/components`;
|
|
39
38
|
*
|
|
@@ -46,6 +45,6 @@ function CardBody(props, forwardedRef) {
|
|
|
46
45
|
*/
|
|
47
46
|
|
|
48
47
|
|
|
49
|
-
const
|
|
50
|
-
export default
|
|
48
|
+
export const CardBody = contextConnect(UnconnectedCardBody, 'CardBody');
|
|
49
|
+
export default CardBody;
|
|
51
50
|
//# 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":["contextConnect","Scrollable","View","useCardBody","UnconnectedCardBody","props","forwardedRef","isScrollable","otherProps","CardBody"],"mappings":";;;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,cAAT,QAAwD,kBAAxD;AACA,SAASC,UAAT,QAA2B,kBAA3B;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,WAAT,QAA4B,QAA5B;;AAGA,SAASC,mBAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAM;AAAEC,IAAAA,YAAF;AAAgB,OAAGC;AAAnB,MAAkCL,WAAW,CAAEE,KAAF,CAAnD;;AAEA,MAAKE,YAAL,EAAoB;AACnB,WAAO,cAAC,UAAD,eAAiBC,UAAjB;AAA8B,MAAA,GAAG,EAAGF;AAApC,OAAP;AACA;;AAED,SAAO,cAAC,IAAD,eAAWE,UAAX;AAAwB,IAAA,GAAG,EAAGF;AAA9B,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,MAAMG,QAAQ,GAAGT,cAAc,CAAEI,mBAAF,EAAuB,UAAvB,CAA/B;AAEP,eAAeK,QAAf","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"]}
|
|
@@ -9,10 +9,6 @@ import { useMemo } from '@wordpress/element';
|
|
|
9
9
|
import { useContextSystem } from '../../ui/context';
|
|
10
10
|
import * as styles from '../styles';
|
|
11
11
|
import { useCx } from '../../utils/hooks/use-cx';
|
|
12
|
-
/**
|
|
13
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').BodyProps, 'div'>} props
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
12
|
export function useCardBody(props) {
|
|
17
13
|
const {
|
|
18
14
|
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":["useMemo","useContextSystem","styles","useCx","useCardBody","props","className","isScrollable","isShady","size","otherProps","cx","classes","Body","borderRadius","cardPaddings","shady"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,oBAAxB;AAEA;AACA;AACA;;AACA,SAASC,gBAAT,QAA0D,kBAA1D;AACA,OAAO,KAAKC,MAAZ,MAAwB,WAAxB;AACA,SAASC,KAAT,QAAsB,0BAAtB;AAGA,OAAO,SAASC,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,MAMFT,gBAAgB,CAAEI,KAAF,EAAS,UAAT,CANpB;AAQA,QAAMM,EAAE,GAAGR,KAAK,EAAhB;AAEA,QAAMS,OAAO,GAAGZ,OAAO,CACtB,MACCW,EAAE,CACDT,MAAM,CAACW,IADN,EAEDX,MAAM,CAACY,YAFN,EAGDZ,MAAM,CAACa,YAAP,CAAqBN,IAArB,CAHC,EAIDD,OAAO,IAAIN,MAAM,CAACc,KAJjB,EAKD;AACA,yBANC,EAODV,SAPC,CAFmB,EAWtB,CAAEA,SAAF,EAAaK,EAAb,EAAiBH,OAAjB,EAA0BC,IAA1B,CAXsB,CAAvB;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":["default","useCardBody"],"mappings":"AAAA,SAASA,OAAT,QAAwB,aAAxB;AACA,SAASC,WAAT,QAA4B,QAA5B","sourcesContent":["export { default } from './component';\nexport { useCardBody } from './hook';\n"]}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { createElement } from "@wordpress/element";
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* External dependencies
|
|
6
|
+
*/
|
|
7
|
+
|
|
4
8
|
/**
|
|
5
9
|
* Internal dependencies
|
|
6
10
|
*/
|
|
7
11
|
import { contextConnect } from '../../ui/context';
|
|
8
12
|
import { Divider } from '../../divider';
|
|
9
13
|
import { useCardDivider } from './hook';
|
|
10
|
-
/**
|
|
11
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../../divider').DividerProps, 'hr', false>} props
|
|
12
|
-
* @param {import('react').ForwardedRef<any>} forwardedRef
|
|
13
|
-
*/
|
|
14
14
|
|
|
15
|
-
function
|
|
15
|
+
function UnconnectedCardDivider(props, forwardedRef) {
|
|
16
16
|
const dividerProps = useCardDivider(props);
|
|
17
17
|
return createElement(Divider, _extends({}, dividerProps, {
|
|
18
18
|
ref: forwardedRef
|
|
@@ -22,7 +22,6 @@ function CardDivider(props, forwardedRef) {
|
|
|
22
22
|
* `CardDivider` renders an optional divider within a `Card`.
|
|
23
23
|
* It is typically used to divide multiple `CardBody` components from each other.
|
|
24
24
|
*
|
|
25
|
-
* @example
|
|
26
25
|
* ```jsx
|
|
27
26
|
* import { Card, CardBody, CardDivider } from `@wordpress/components`;
|
|
28
27
|
*
|
|
@@ -35,6 +34,6 @@ function CardDivider(props, forwardedRef) {
|
|
|
35
34
|
*/
|
|
36
35
|
|
|
37
36
|
|
|
38
|
-
const
|
|
39
|
-
export default
|
|
37
|
+
export const CardDivider = contextConnect(UnconnectedCardDivider, 'CardDivider');
|
|
38
|
+
export default CardDivider;
|
|
40
39
|
//# 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":["contextConnect","Divider","useCardDivider","UnconnectedCardDivider","props","forwardedRef","dividerProps","CardDivider"],"mappings":";;;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,cAAT,QAAwD,kBAAxD;AACA,SAASC,OAAT,QAAsC,eAAtC;AACA,SAASC,cAAT,QAA+B,QAA/B;;AAEA,SAASC,sBAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,YAAY,GAAGJ,cAAc,CAAEE,KAAF,CAAnC;AAEA,SAAO,cAAC,OAAD,eAAcE,YAAd;AAA6B,IAAA,GAAG,EAAGD;AAAnC,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,MAAME,WAAW,GAAGP,cAAc,CACxCG,sBADwC,EAExC,aAFwC,CAAlC;AAKP,eAAeI,WAAf","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"]}
|
|
@@ -9,10 +9,6 @@ import { useMemo } from '@wordpress/element';
|
|
|
9
9
|
import { useContextSystem } from '../../ui/context';
|
|
10
10
|
import * as styles from '../styles';
|
|
11
11
|
import { useCx } from '../../utils/hooks/use-cx';
|
|
12
|
-
/**
|
|
13
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../../divider').DividerProps, 'hr', false>} props
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
12
|
export function useCardDivider(props) {
|
|
17
13
|
const {
|
|
18
14
|
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":["useMemo","useContextSystem","styles","useCx","useCardDivider","props","className","otherProps","cx","classes","Divider","borderColor"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,oBAAxB;AAEA;AACA;AACA;;AACA,SAASC,gBAAT,QAA0D,kBAA1D;AACA,OAAO,KAAKC,MAAZ,MAAwB,WAAxB;AACA,SAASC,KAAT,QAAsB,0BAAtB;AAGA,OAAO,SAASC,cAAT,CACNC,KADM,EAEL;AACD,QAAM;AAAEC,IAAAA,SAAF;AAAa,OAAGC;AAAhB,MAA+BN,gBAAgB,CACpDI,KADoD,EAEpD,aAFoD,CAArD;AAKA,QAAMG,EAAE,GAAGL,KAAK,EAAhB;AAEA,QAAMM,OAAO,GAAGT,OAAO,CACtB,MACCQ,EAAE,CACDN,MAAM,CAACQ,OADN,EAEDR,MAAM,CAACS,WAFN,EAGD;AACA,4BAJC,EAKDL,SALC,CAFmB,EAStB,CAAEA,SAAF,EAAaE,EAAb,CATsB,CAAvB;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":["default","useCardDivider"],"mappings":"AAAA,SAASA,OAAT,QAAwB,aAAxB;AACA,SAASC,cAAT,QAA+B,QAA/B","sourcesContent":["export { default } from './component';\nexport { useCardDivider } from './hook';\n"]}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { createElement } from "@wordpress/element";
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* External dependencies
|
|
6
|
+
*/
|
|
7
|
+
|
|
4
8
|
/**
|
|
5
9
|
* Internal dependencies
|
|
6
10
|
*/
|
|
7
11
|
import { contextConnect } from '../../ui/context';
|
|
8
12
|
import { Flex } from '../../flex';
|
|
9
13
|
import { useCardFooter } from './hook';
|
|
10
|
-
/**
|
|
11
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').FooterProps, 'div'>} props
|
|
12
|
-
* @param {import('react').ForwardedRef<any>} forwardedRef
|
|
13
|
-
*/
|
|
14
14
|
|
|
15
|
-
function
|
|
15
|
+
function UnconnectedCardFooter(props, forwardedRef) {
|
|
16
16
|
const footerProps = useCardFooter(props);
|
|
17
17
|
return createElement(Flex, _extends({}, footerProps, {
|
|
18
18
|
ref: forwardedRef
|
|
@@ -21,7 +21,6 @@ function CardFooter(props, forwardedRef) {
|
|
|
21
21
|
/**
|
|
22
22
|
* `CardFooter` renders an optional footer within a `Card`.
|
|
23
23
|
*
|
|
24
|
-
* @example
|
|
25
24
|
* ```jsx
|
|
26
25
|
* import { Card, CardBody, CardFooter } from `@wordpress/components`;
|
|
27
26
|
*
|
|
@@ -33,6 +32,6 @@ function CardFooter(props, forwardedRef) {
|
|
|
33
32
|
*/
|
|
34
33
|
|
|
35
34
|
|
|
36
|
-
const
|
|
37
|
-
export default
|
|
35
|
+
export const CardFooter = contextConnect(UnconnectedCardFooter, 'CardFooter');
|
|
36
|
+
export default CardFooter;
|
|
38
37
|
//# 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":["contextConnect","Flex","useCardFooter","UnconnectedCardFooter","props","forwardedRef","footerProps","CardFooter"],"mappings":";;;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,cAAT,QAAwD,kBAAxD;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,aAAT,QAA8B,QAA9B;;AAGA,SAASC,qBAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,WAAW,GAAGJ,aAAa,CAAEE,KAAF,CAAjC;AAEA,SAAO,cAAC,IAAD,eAAWE,WAAX;AAAyB,IAAA,GAAG,EAAGD;AAA/B,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,MAAME,UAAU,GAAGP,cAAc,CAAEG,qBAAF,EAAyB,YAAzB,CAAjC;AAEP,eAAeI,UAAf","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"]}
|
|
@@ -9,10 +9,6 @@ import { useMemo } from '@wordpress/element';
|
|
|
9
9
|
import { useContextSystem } from '../../ui/context';
|
|
10
10
|
import * as styles from '../styles';
|
|
11
11
|
import { useCx } from '../../utils/hooks/use-cx';
|
|
12
|
-
/**
|
|
13
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').FooterProps, 'div'>} props
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
12
|
export function useCardFooter(props) {
|
|
17
13
|
const {
|
|
18
14
|
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":["useMemo","useContextSystem","styles","useCx","useCardFooter","props","className","justify","isBorderless","isShady","size","otherProps","cx","classes","Footer","borderRadius","borderColor","cardPaddings","borderless","shady"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,oBAAxB;AAEA;AACA;AACA;;AACA,SAASC,gBAAT,QAA0D,kBAA1D;AACA,OAAO,KAAKC,MAAZ,MAAwB,WAAxB;AACA,SAASC,KAAT,QAAsB,0BAAtB;AAGA,OAAO,SAASC,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,MAOFV,gBAAgB,CAAEI,KAAF,EAAS,YAAT,CAPpB;AASA,QAAMO,EAAE,GAAGT,KAAK,EAAhB;AAEA,QAAMU,OAAO,GAAGb,OAAO,CACtB,MACCY,EAAE,CACDV,MAAM,CAACY,MADN,EAEDZ,MAAM,CAACa,YAFN,EAGDb,MAAM,CAACc,WAHN,EAIDd,MAAM,CAACe,YAAP,CAAqBP,IAArB,CAJC,EAKDF,YAAY,IAAIN,MAAM,CAACgB,UALtB,EAMDT,OAAO,IAAIP,MAAM,CAACiB,KANjB,EAOD;AACA,2BARC,EASDb,SATC,CAFmB,EAatB,CAAEA,SAAF,EAAaM,EAAb,EAAiBJ,YAAjB,EAA+BC,OAA/B,EAAwCC,IAAxC,CAbsB,CAAvB;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":["default","useCardFooter"],"mappings":"AAAA,SAASA,OAAT,QAAwB,aAAxB;AACA,SAASC,aAAT,QAA8B,QAA9B","sourcesContent":["export { default } from './component';\nexport { useCardFooter } from './hook';\n"]}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { createElement } from "@wordpress/element";
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* External dependencies
|
|
6
|
+
*/
|
|
7
|
+
|
|
4
8
|
/**
|
|
5
9
|
* Internal dependencies
|
|
6
10
|
*/
|
|
7
11
|
import { contextConnect } from '../../ui/context';
|
|
8
12
|
import { Flex } from '../../flex';
|
|
9
13
|
import { useCardHeader } from './hook';
|
|
10
|
-
/**
|
|
11
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').HeaderProps, 'div'>} props
|
|
12
|
-
* @param {import('react').ForwardedRef<any>} forwardedRef
|
|
13
|
-
*/
|
|
14
14
|
|
|
15
|
-
function
|
|
15
|
+
function UnconnectedCardHeader(props, forwardedRef) {
|
|
16
16
|
const headerProps = useCardHeader(props);
|
|
17
17
|
return createElement(Flex, _extends({}, headerProps, {
|
|
18
18
|
ref: forwardedRef
|
|
@@ -21,7 +21,6 @@ function CardHeader(props, forwardedRef) {
|
|
|
21
21
|
/**
|
|
22
22
|
* `CardHeader` renders an optional header within a `Card`.
|
|
23
23
|
*
|
|
24
|
-
* @example
|
|
25
24
|
* ```jsx
|
|
26
25
|
* import { Card, CardBody, CardHeader } from `@wordpress/components`;
|
|
27
26
|
*
|
|
@@ -33,6 +32,6 @@ function CardHeader(props, forwardedRef) {
|
|
|
33
32
|
*/
|
|
34
33
|
|
|
35
34
|
|
|
36
|
-
const
|
|
37
|
-
export default
|
|
35
|
+
export const CardHeader = contextConnect(UnconnectedCardHeader, 'CardHeader');
|
|
36
|
+
export default CardHeader;
|
|
38
37
|
//# 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":["contextConnect","Flex","useCardHeader","UnconnectedCardHeader","props","forwardedRef","headerProps","CardHeader"],"mappings":";;;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,cAAT,QAAwD,kBAAxD;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,aAAT,QAA8B,QAA9B;;AAGA,SAASC,qBAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,WAAW,GAAGJ,aAAa,CAAEE,KAAF,CAAjC;AAEA,SAAO,cAAC,IAAD,eAAWE,WAAX;AAAyB,IAAA,GAAG,EAAGD;AAA/B,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,MAAME,UAAU,GAAGP,cAAc,CAAEG,qBAAF,EAAyB,YAAzB,CAAjC;AAEP,eAAeI,UAAf","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"]}
|
|
@@ -9,10 +9,6 @@ import { useMemo } from '@wordpress/element';
|
|
|
9
9
|
import { useContextSystem } from '../../ui/context';
|
|
10
10
|
import * as styles from '../styles';
|
|
11
11
|
import { useCx } from '../../utils/hooks/use-cx';
|
|
12
|
-
/**
|
|
13
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').HeaderProps, 'div'>} props
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
12
|
export function useCardHeader(props) {
|
|
17
13
|
const {
|
|
18
14
|
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":["useMemo","useContextSystem","styles","useCx","useCardHeader","props","className","isBorderless","isShady","size","otherProps","cx","classes","Header","borderRadius","borderColor","cardPaddings","borderless","shady"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,oBAAxB;AAEA;AACA;AACA;;AACA,SAASC,gBAAT,QAA0D,kBAA1D;AACA,OAAO,KAAKC,MAAZ,MAAwB,WAAxB;AACA,SAASC,KAAT,QAAsB,0BAAtB;AAGA,OAAO,SAASC,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,MAMFT,gBAAgB,CAAEI,KAAF,EAAS,YAAT,CANpB;AAQA,QAAMM,EAAE,GAAGR,KAAK,EAAhB;AAEA,QAAMS,OAAO,GAAGZ,OAAO,CACtB,MACCW,EAAE,CACDT,MAAM,CAACW,MADN,EAEDX,MAAM,CAACY,YAFN,EAGDZ,MAAM,CAACa,WAHN,EAIDb,MAAM,CAACc,YAAP,CAAqBP,IAArB,CAJC,EAKDF,YAAY,IAAIL,MAAM,CAACe,UALtB,EAMDT,OAAO,IAAIN,MAAM,CAACgB,KANjB,EAOD;AACA,2BARC,EASDZ,SATC,CAFmB,EAatB,CAAEA,SAAF,EAAaK,EAAb,EAAiBJ,YAAjB,EAA+BC,OAA/B,EAAwCC,IAAxC,CAbsB,CAAvB;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":["default","useCardHeader"],"mappings":"AAAA,SAASA,OAAT,QAAwB,aAAxB;AACA,SAASC,aAAT,QAA8B,QAA9B","sourcesContent":["export { default } from './component';\nexport { useCardHeader } from './hook';\n"]}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { createElement } from "@wordpress/element";
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* External dependencies
|
|
6
|
+
*/
|
|
7
|
+
|
|
4
8
|
/**
|
|
5
9
|
* Internal dependencies
|
|
6
10
|
*/
|
|
7
11
|
import { contextConnect } from '../../ui/context';
|
|
8
12
|
import { View } from '../../view';
|
|
9
13
|
import { useCardMedia } from './hook';
|
|
10
|
-
/**
|
|
11
|
-
* @param {import('../../ui/context').WordPressComponentProps<{ children: import('react').ReactNode }, 'div'>} props
|
|
12
|
-
* @param {import('react').ForwardedRef<any>} forwardedRef
|
|
13
|
-
*/
|
|
14
14
|
|
|
15
|
-
function
|
|
15
|
+
function UnconnectedCardMedia(props, forwardedRef) {
|
|
16
16
|
const cardMediaProps = useCardMedia(props);
|
|
17
17
|
return createElement(View, _extends({}, cardMediaProps, {
|
|
18
18
|
ref: forwardedRef
|
|
@@ -37,6 +37,6 @@ function CardMedia(props, forwardedRef) {
|
|
|
37
37
|
*/
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
const
|
|
41
|
-
export default
|
|
40
|
+
export const CardMedia = contextConnect(UnconnectedCardMedia, 'CardMedia');
|
|
41
|
+
export default CardMedia;
|
|
42
42
|
//# 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":["contextConnect","View","useCardMedia","UnconnectedCardMedia","props","forwardedRef","cardMediaProps","CardMedia"],"mappings":";;;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,cAAT,QAAwD,kBAAxD;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,YAAT,QAA6B,QAA7B;;AAGA,SAASC,oBAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,cAAc,GAAGJ,YAAY,CAAEE,KAAF,CAAnC;AAEA,SAAO,cAAC,IAAD,eAAWE,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;;;AACA,OAAO,MAAME,SAAS,GAAGP,cAAc,CAAEG,oBAAF,EAAwB,WAAxB,CAAhC;AAEP,eAAeI,SAAf","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"]}
|
|
@@ -9,10 +9,6 @@ import { useMemo } from '@wordpress/element';
|
|
|
9
9
|
import { useContextSystem } from '../../ui/context';
|
|
10
10
|
import * as styles from '../styles';
|
|
11
11
|
import { useCx } from '../../utils/hooks/use-cx';
|
|
12
|
-
/**
|
|
13
|
-
* @param {import('../../ui/context').WordPressComponentProps<{ children: import('react').ReactNode }, 'div'>} props
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
12
|
export function useCardMedia(props) {
|
|
17
13
|
const {
|
|
18
14
|
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":["useMemo","useContextSystem","styles","useCx","useCardMedia","props","className","otherProps","cx","classes","Media","borderRadius"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,oBAAxB;AAEA;AACA;AACA;;AACA,SAASC,gBAAT,QAA0D,kBAA1D;AACA,OAAO,KAAKC,MAAZ,MAAwB,WAAxB;AACA,SAASC,KAAT,QAAsB,0BAAtB;AAGA,OAAO,SAASC,YAAT,CACNC,KADM,EAEL;AACD,QAAM;AAAEC,IAAAA,SAAF;AAAa,OAAGC;AAAhB,MAA+BN,gBAAgB,CAAEI,KAAF,EAAS,WAAT,CAArD;AAEA,QAAMG,EAAE,GAAGL,KAAK,EAAhB;AAEA,QAAMM,OAAO,GAAGT,OAAO,CACtB,MACCQ,EAAE,CACDN,MAAM,CAACQ,KADN,EAEDR,MAAM,CAACS,YAFN,EAGD;AACA,0BAJC,EAKDL,SALC,CAFmB,EAStB,CAAEA,SAAF,EAAaE,EAAb,CATsB,CAAvB;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":["default","useCardMedia"],"mappings":"AAAA,SAASA,OAAT,QAAwB,aAAxB;AACA,SAASC,YAAT,QAA6B,QAA7B","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":["createContext","useContext","CardContext","useCardContext"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAT,EAAwBC,UAAxB,QAA0C,oBAA1C;AAEA,OAAO,MAAMC,WAAW,GAAGF,aAAa,CAAE,EAAF,CAAjC;AACP,OAAO,MAAMG,cAAc,GAAG,MAAMF,UAAU,CAAEC,WAAF,CAAvC","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\nexport const CardContext = createContext( {} );\nexport const useCardContext = () => useContext( CardContext );\n"]}
|