@wordpress/components 19.3.0 → 19.4.1
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 +27 -0
- package/CONTRIBUTING.md +1 -1
- package/README.md +8 -4
- package/build/base-field/hook.js +1 -1
- package/build/base-field/hook.js.map +1 -1
- package/build/button/deprecated.js +2 -1
- package/build/button/deprecated.js.map +1 -1
- package/build/button/index.js +2 -1
- package/build/button/index.js.map +1 -1
- package/build/card/card/component.js +1 -1
- package/build/card/card/component.js.map +1 -1
- package/build/card/card/hook.js +1 -1
- package/build/card/card/hook.js.map +1 -1
- package/build/card/card-body/hook.js +1 -1
- package/build/card/card-body/hook.js.map +1 -1
- package/build/card/card-divider/hook.js +1 -1
- package/build/card/card-divider/hook.js.map +1 -1
- package/build/card/card-footer/hook.js +1 -1
- package/build/card/card-footer/hook.js.map +1 -1
- package/build/card/card-header/hook.js +1 -1
- package/build/card/card-header/hook.js.map +1 -1
- package/build/card/card-media/hook.js +1 -1
- package/build/card/card-media/hook.js.map +1 -1
- package/build/circular-option-picker/index.js +2 -0
- package/build/circular-option-picker/index.js.map +1 -1
- package/build/color-indicator/index.js +2 -0
- package/build/color-indicator/index.js.map +1 -1
- package/build/color-palette/index.js +2 -0
- package/build/color-palette/index.js.map +1 -1
- package/build/color-picker/color-display.js.map +1 -1
- package/build/color-picker/color-input.js.map +1 -1
- package/build/color-picker/component.js +1 -1
- package/build/color-picker/component.js.map +1 -1
- package/build/color-picker/use-deprecated-props.js +2 -0
- package/build/color-picker/use-deprecated-props.js.map +1 -1
- package/build/date-time/time.js +1 -1
- package/build/date-time/time.js.map +1 -1
- package/build/dropdown/index.js +3 -3
- package/build/dropdown/index.js.map +1 -1
- package/build/elevation/hook.js +5 -5
- package/build/elevation/hook.js.map +1 -1
- package/build/flex/flex/hook.js +4 -4
- package/build/flex/flex/hook.js.map +1 -1
- package/build/grid/hook.js +2 -2
- package/build/grid/hook.js.map +1 -1
- package/build/item-group/item/hook.js +1 -1
- package/build/item-group/item/hook.js.map +1 -1
- package/build/mobile/inserter-button/index.native.js +3 -3
- package/build/mobile/inserter-button/index.native.js.map +1 -1
- package/build/mobile/inserter-button/sparkles.js +25 -0
- package/build/mobile/inserter-button/sparkles.js.map +1 -0
- package/build/modal/index.js +1 -12
- package/build/modal/index.js.map +1 -1
- package/build/navigator/context.js +2 -2
- package/build/navigator/context.js.map +1 -1
- package/build/navigator/navigator-provider/component.js +18 -25
- package/build/navigator/navigator-provider/component.js.map +1 -1
- package/build/navigator/navigator-screen/component.js +39 -13
- package/build/navigator/navigator-screen/component.js.map +1 -1
- package/build/navigator/use-navigator.js +4 -4
- package/build/navigator/use-navigator.js.map +1 -1
- package/build/placeholder/index.js +4 -4
- package/build/placeholder/index.js.map +1 -1
- package/build/scrollable/hook.js +1 -1
- package/build/scrollable/hook.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/fill.js +11 -2
- package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build/spinner/index.js +44 -5
- package/build/spinner/index.js.map +1 -1
- package/build/spinner/styles.js +56 -0
- package/build/spinner/styles.js.map +1 -0
- package/build/surface/hook.js +1 -1
- package/build/surface/hook.js.map +1 -1
- package/build/text/hook.js +5 -5
- package/build/text/hook.js.map +1 -1
- package/build/tip/index.js +4 -8
- package/build/tip/index.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/component.js +1 -1
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/tools-panel/tools-panel/hook.js +7 -7
- package/build/tools-panel/tools-panel/hook.js.map +1 -1
- package/build/tools-panel/tools-panel-header/hook.js +3 -3
- package/build/tools-panel/tools-panel-header/hook.js.map +1 -1
- package/build/tools-panel/tools-panel-item/hook.js +1 -1
- package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build/tree-grid/index.js +13 -6
- package/build/tree-grid/index.js.map +1 -1
- package/build/truncate/hook.js +2 -2
- package/build/truncate/hook.js.map +1 -1
- package/build/utils/config-values.js +1 -1
- package/build/utils/config-values.js.map +1 -1
- package/build-module/base-field/hook.js +1 -1
- package/build-module/base-field/hook.js.map +1 -1
- package/build-module/button/deprecated.js +2 -1
- package/build-module/button/deprecated.js.map +1 -1
- package/build-module/button/index.js +2 -1
- package/build-module/button/index.js.map +1 -1
- package/build-module/card/card/component.js +1 -1
- package/build-module/card/card/component.js.map +1 -1
- package/build-module/card/card/hook.js +1 -1
- package/build-module/card/card/hook.js.map +1 -1
- package/build-module/card/card-body/hook.js +1 -1
- package/build-module/card/card-body/hook.js.map +1 -1
- package/build-module/card/card-divider/hook.js +1 -1
- package/build-module/card/card-divider/hook.js.map +1 -1
- package/build-module/card/card-footer/hook.js +1 -1
- package/build-module/card/card-footer/hook.js.map +1 -1
- package/build-module/card/card-header/hook.js +1 -1
- package/build-module/card/card-header/hook.js.map +1 -1
- package/build-module/card/card-media/hook.js +1 -1
- package/build-module/card/card-media/hook.js.map +1 -1
- package/build-module/circular-option-picker/index.js +1 -0
- package/build-module/circular-option-picker/index.js.map +1 -1
- package/build-module/color-indicator/index.js +1 -0
- package/build-module/color-indicator/index.js.map +1 -1
- package/build-module/color-palette/index.js +1 -0
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/color-picker/color-display.js.map +1 -1
- package/build-module/color-picker/color-input.js.map +1 -1
- package/build-module/color-picker/component.js +1 -1
- package/build-module/color-picker/component.js.map +1 -1
- package/build-module/color-picker/use-deprecated-props.js +2 -0
- package/build-module/color-picker/use-deprecated-props.js.map +1 -1
- package/build-module/date-time/time.js +1 -1
- package/build-module/date-time/time.js.map +1 -1
- package/build-module/dropdown/index.js +3 -3
- package/build-module/dropdown/index.js.map +1 -1
- package/build-module/elevation/hook.js +5 -5
- package/build-module/elevation/hook.js.map +1 -1
- package/build-module/flex/flex/hook.js +4 -4
- package/build-module/flex/flex/hook.js.map +1 -1
- package/build-module/grid/hook.js +2 -2
- package/build-module/grid/hook.js.map +1 -1
- package/build-module/item-group/item/hook.js +1 -1
- package/build-module/item-group/item/hook.js.map +1 -1
- package/build-module/mobile/inserter-button/index.native.js +1 -1
- package/build-module/mobile/inserter-button/index.native.js.map +1 -1
- package/build-module/mobile/inserter-button/sparkles.js +16 -0
- package/build-module/mobile/inserter-button/sparkles.js.map +1 -0
- package/build-module/modal/index.js +1 -11
- package/build-module/modal/index.js.map +1 -1
- package/build-module/navigator/context.js +2 -2
- package/build-module/navigator/context.js.map +1 -1
- package/build-module/navigator/navigator-provider/component.js +18 -25
- package/build-module/navigator/navigator-provider/component.js.map +1 -1
- package/build-module/navigator/navigator-screen/component.js +39 -15
- package/build-module/navigator/navigator-screen/component.js.map +1 -1
- package/build-module/navigator/use-navigator.js +4 -4
- package/build-module/navigator/use-navigator.js.map +1 -1
- package/build-module/placeholder/index.js +4 -4
- package/build-module/placeholder/index.js.map +1 -1
- package/build-module/scrollable/hook.js +1 -1
- package/build-module/scrollable/hook.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/fill.js +11 -2
- package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build-module/spinner/index.js +40 -5
- package/build-module/spinner/index.js.map +1 -1
- package/build-module/spinner/styles.js +49 -0
- package/build-module/spinner/styles.js.map +1 -0
- package/build-module/surface/hook.js +1 -1
- package/build-module/surface/hook.js.map +1 -1
- package/build-module/text/hook.js +5 -5
- package/build-module/text/hook.js.map +1 -1
- package/build-module/tip/index.js +4 -8
- package/build-module/tip/index.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/component.js +1 -1
- package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel/hook.js +7 -7
- package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/hook.js +3 -3
- package/build-module/tools-panel/tools-panel-header/hook.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/hook.js +1 -1
- package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build-module/tree-grid/index.js +12 -6
- package/build-module/tree-grid/index.js.map +1 -1
- package/build-module/truncate/hook.js +2 -2
- package/build-module/truncate/hook.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-style/style-rtl.css +12 -2
- package/build-style/style.css +12 -2
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/circular-option-picker/index.d.ts +31 -0
- package/build-types/circular-option-picker/index.d.ts.map +1 -0
- package/build-types/color-palette/index.d.ts +16 -0
- package/build-types/color-palette/index.d.ts.map +1 -0
- package/build-types/color-palette/styles.d.ts +8 -0
- package/build-types/color-palette/styles.d.ts.map +1 -0
- package/build-types/color-picker/color-display.d.ts +14 -0
- package/build-types/color-picker/color-display.d.ts.map +1 -0
- package/build-types/color-picker/color-input.d.ts +14 -0
- package/build-types/color-picker/color-input.d.ts.map +1 -0
- package/build-types/color-picker/component.d.ts +11 -0
- package/build-types/color-picker/component.d.ts.map +1 -0
- package/build-types/color-picker/hex-input.d.ts +13 -0
- package/build-types/color-picker/hex-input.d.ts.map +1 -0
- package/build-types/color-picker/hsl-input.d.ts +13 -0
- package/build-types/color-picker/hsl-input.d.ts.map +1 -0
- package/build-types/color-picker/index.d.ts +5 -0
- package/build-types/color-picker/index.d.ts.map +1 -0
- package/build-types/color-picker/input-with-slider.d.ts +12 -0
- package/build-types/color-picker/input-with-slider.d.ts.map +1 -0
- package/build-types/color-picker/legacy-adapter.d.ts +6 -0
- package/build-types/color-picker/legacy-adapter.d.ts.map +1 -0
- package/build-types/color-picker/picker.d.ts +10 -0
- package/build-types/color-picker/picker.d.ts.map +1 -0
- package/build-types/color-picker/rgb-input.d.ts +13 -0
- package/build-types/color-picker/rgb-input.d.ts.map +1 -0
- package/build-types/color-picker/styles.d.ts +76 -0
- package/build-types/color-picker/styles.d.ts.map +1 -0
- package/build-types/color-picker/types.d.ts +2 -0
- package/build-types/color-picker/types.d.ts.map +1 -0
- package/build-types/color-picker/use-deprecated-props.d.ts +49 -0
- package/build-types/color-picker/use-deprecated-props.d.ts.map +1 -0
- package/build-types/dropdown/index.d.ts +1 -13
- package/build-types/dropdown/index.d.ts.map +1 -1
- package/build-types/elevation/hook.d.ts.map +1 -1
- package/build-types/flex/flex/hook.d.ts.map +1 -1
- package/build-types/grid/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-provider/component.d.ts +4 -4
- package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-screen/component.d.ts +4 -4
- package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
- package/build-types/navigator/types.d.ts +5 -3
- package/build-types/navigator/types.d.ts.map +1 -1
- package/build-types/resizable-box/index.d.ts +1 -1
- package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
- package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
- package/build-types/spinner/index.d.ts +18 -1
- package/build-types/spinner/index.d.ts.map +1 -1
- package/build-types/spinner/styles.d.ts +13 -0
- package/build-types/spinner/styles.d.ts.map +1 -0
- package/build-types/surface/hook.d.ts.map +1 -1
- package/build-types/text/hook.d.ts.map +1 -1
- package/build-types/tip/index.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
- package/build-types/unit-control/index.d.ts +3 -2
- package/build-types/unit-control/index.d.ts.map +1 -1
- package/build-types/unit-control/types.d.ts +2 -1
- package/build-types/unit-control/types.d.ts.map +1 -1
- package/build-types/utils/config-values.d.ts +1 -1
- package/package.json +16 -17
- package/src/base-field/hook.js +1 -1
- package/src/button/deprecated.js +1 -0
- package/src/button/index.js +1 -0
- package/src/card/card/component.js +1 -1
- package/src/card/card/hook.js +1 -1
- package/src/card/card-body/hook.js +1 -1
- package/src/card/card-divider/hook.js +1 -1
- package/src/card/card-footer/hook.js +1 -1
- package/src/card/card-header/hook.js +1 -1
- package/src/card/card-media/hook.js +1 -1
- package/src/circular-option-picker/index.js +1 -0
- package/src/color-indicator/index.js +2 -0
- package/src/color-palette/index.js +1 -0
- package/src/color-palette/test/__snapshots__/index.js.snap +0 -1
- package/src/color-picker/color-display.tsx +1 -1
- package/src/color-picker/color-input.tsx +1 -1
- package/src/color-picker/component.tsx +1 -1
- package/src/color-picker/use-deprecated-props.ts +2 -0
- package/src/combobox-control/stories/index.js +6 -2
- package/src/combobox-control/style.scss +2 -2
- package/src/date-time/README.md +4 -4
- package/src/date-time/test/time.js +2 -2
- package/src/date-time/time.js +2 -2
- package/src/dropdown/index.js +14 -13
- package/src/elevation/hook.js +1 -0
- package/src/flex/flex/hook.js +1 -0
- package/src/grid/hook.js +1 -0
- package/src/item-group/item/hook.ts +1 -1
- package/src/item-group/stories/index.js +2 -2
- package/src/mobile/inserter-button/index.native.js +1 -2
- package/src/mobile/inserter-button/sparkles.js +15 -0
- package/src/mobile/link-settings/test/edit.native.js +5 -5
- package/src/modal/index.js +1 -10
- package/src/navigator/context.ts +2 -2
- package/src/navigator/navigator-provider/README.md +11 -9
- package/src/navigator/navigator-provider/component.tsx +16 -25
- package/src/navigator/navigator-screen/component.tsx +55 -15
- package/src/navigator/stories/index.js +19 -5
- package/src/navigator/test/index.js +77 -25
- package/src/navigator/types.ts +5 -3
- package/src/navigator/use-navigator.ts +3 -3
- package/src/placeholder/index.js +8 -6
- package/src/placeholder/style.scss +12 -0
- package/src/placeholder/test/index.js +18 -1
- package/src/scrollable/hook.js +1 -1
- package/src/slot-fill/bubbles-virtually/fill.js +12 -1
- package/src/spinner/README.md +10 -10
- package/src/spinner/index.js +42 -3
- package/src/spinner/stories/index.js +36 -3
- package/src/spinner/styles.js +47 -0
- package/src/surface/hook.js +1 -0
- package/src/text/hook.js +1 -0
- package/src/tip/index.js +2 -4
- package/src/toggle-group-control/toggle-group-control/component.tsx +1 -1
- package/src/tools-panel/stories/index.js +20 -1
- package/src/tools-panel/test/__snapshots__/index.js.snap +0 -1
- package/src/tools-panel/test/index.js +31 -1
- package/src/tools-panel/tools-panel/hook.ts +14 -9
- package/src/tools-panel/tools-panel-header/hook.ts +3 -3
- package/src/tools-panel/tools-panel-item/hook.ts +1 -0
- package/src/tree-grid/index.js +19 -5
- package/src/truncate/hook.js +1 -1
- package/src/unit-control/types.ts +2 -1
- package/src/utils/config-values.js +1 -1
- package/src/utils/hooks/stories/use-cx.js +121 -44
- package/tsconfig.json +3 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/spinner/styles/spinner-styles.js +0 -40
- package/build/spinner/styles/spinner-styles.js.map +0 -1
- package/build-module/spinner/styles/spinner-styles.js +0 -28
- package/build-module/spinner/styles/spinner-styles.js.map +0 -1
- package/build-types/spinner/styles/spinner-styles.d.ts +0 -5
- package/build-types/spinner/styles/spinner-styles.d.ts.map +0 -1
- package/src/spinner/styles/spinner-styles.js +0 -47
- package/src/ui/visually-hidden/README.md +0 -21
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/unit-control/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/unit-control/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE3D;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EACX,mBAAmB,EACnB,IAAI,IAAI,SAAS,EACjB,MAAM,wBAAwB,CAAC;AAEhC,oBAAY,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpC,oBAAY,UAAU,GAAG,SAAS,CAAC;AAEnC,oBAAY,iBAAiB,GAAG;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,qBAAqB,GAAG,KAAK,CAAE,iBAAiB,CAAE,GAAG,KAAK,CAAC;AAEvE,oBAAY,2BAA2B,GAAG,mBAAmB,CAC5D,cAAc,CAAE,iBAAiB,GAAG,gBAAgB,CAAE,EACtD;IAAE,IAAI,CAAC,EAAE,iBAAiB,CAAA;CAAE,CAC5B,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IACpC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,2BAA2B,CAAC;IACvC;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,qBAAqB,CAAC;CAC9B,CAAC;AAEF,oBAAY,gBAAgB,GAAG,sBAAsB,GAAG;IACvD,sBAAsB,CAAC,EAAE,YAAY,CAAC;IACtC,oBAAoB,CAAC,EAAE,aAAa,CAAE,OAAO,CAAE,CAAC;IAChD;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAC3C;;;OAGG;IACH,KAAK,EAAE,KAAK,CAAC;CACb,CAAC"}
|
|
@@ -8,7 +8,7 @@ declare namespace _default {
|
|
|
8
8
|
export const borderWidth: string;
|
|
9
9
|
export const borderWidthFocus: string;
|
|
10
10
|
export const borderWidthTab: string;
|
|
11
|
-
export const spinnerSize:
|
|
11
|
+
export const spinnerSize: number;
|
|
12
12
|
export const fontSize: string;
|
|
13
13
|
export const fontSizeH1: string;
|
|
14
14
|
export const fontSizeH2: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/components",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.4.1",
|
|
4
4
|
"description": "UI components for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -36,20 +36,20 @@
|
|
|
36
36
|
"@emotion/serialize": "^1.0.2",
|
|
37
37
|
"@emotion/styled": "^11.6.0",
|
|
38
38
|
"@emotion/utils": "1.0.0",
|
|
39
|
-
"@wordpress/a11y": "^3.3.
|
|
40
|
-
"@wordpress/compose": "^5.1.
|
|
41
|
-
"@wordpress/date": "^4.3.
|
|
42
|
-
"@wordpress/deprecated": "^3.3.
|
|
43
|
-
"@wordpress/dom": "^3.3.
|
|
44
|
-
"@wordpress/element": "^4.1.
|
|
45
|
-
"@wordpress/hooks": "^3.3.
|
|
46
|
-
"@wordpress/i18n": "^4.3.
|
|
47
|
-
"@wordpress/icons": "^
|
|
48
|
-
"@wordpress/is-shallow-equal": "^4.3.
|
|
49
|
-
"@wordpress/keycodes": "^3.3.
|
|
50
|
-
"@wordpress/primitives": "^3.1.
|
|
51
|
-
"@wordpress/rich-text": "^5.1.
|
|
52
|
-
"@wordpress/warning": "^2.3.
|
|
39
|
+
"@wordpress/a11y": "^3.3.1",
|
|
40
|
+
"@wordpress/compose": "^5.1.1",
|
|
41
|
+
"@wordpress/date": "^4.3.1",
|
|
42
|
+
"@wordpress/deprecated": "^3.3.1",
|
|
43
|
+
"@wordpress/dom": "^3.3.1",
|
|
44
|
+
"@wordpress/element": "^4.1.1",
|
|
45
|
+
"@wordpress/hooks": "^3.3.1",
|
|
46
|
+
"@wordpress/i18n": "^4.3.1",
|
|
47
|
+
"@wordpress/icons": "^7.0.0",
|
|
48
|
+
"@wordpress/is-shallow-equal": "^4.3.1",
|
|
49
|
+
"@wordpress/keycodes": "^3.3.1",
|
|
50
|
+
"@wordpress/primitives": "^3.1.1",
|
|
51
|
+
"@wordpress/rich-text": "^5.1.1",
|
|
52
|
+
"@wordpress/warning": "^2.3.1",
|
|
53
53
|
"classnames": "^2.3.1",
|
|
54
54
|
"colord": "^2.7.0",
|
|
55
55
|
"dom-scroll-into-view": "^1.2.1",
|
|
@@ -66,7 +66,6 @@
|
|
|
66
66
|
"react-resize-aware": "^3.1.0",
|
|
67
67
|
"react-use-gesture": "^9.0.0",
|
|
68
68
|
"reakit": "^1.3.8",
|
|
69
|
-
"rememo": "^3.0.0",
|
|
70
69
|
"uuid": "^8.3.0"
|
|
71
70
|
},
|
|
72
71
|
"peerDependencies": {
|
|
@@ -76,5 +75,5 @@
|
|
|
76
75
|
"publishConfig": {
|
|
77
76
|
"access": "public"
|
|
78
77
|
},
|
|
79
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "0f838547f37472e46e6d5a9d2e84b6c61f4bd3f0"
|
|
80
79
|
}
|
package/src/base-field/hook.js
CHANGED
package/src/button/deprecated.js
CHANGED
package/src/button/index.js
CHANGED
|
@@ -38,7 +38,7 @@ function Card( props, forwardedRef ) {
|
|
|
38
38
|
|
|
39
39
|
const elevationClassName = useMemo(
|
|
40
40
|
() => cx( css( { borderRadius: elevationBorderRadius } ) ),
|
|
41
|
-
[ elevationBorderRadius ]
|
|
41
|
+
[ cx, elevationBorderRadius ]
|
|
42
42
|
);
|
|
43
43
|
|
|
44
44
|
const contextProviderValue = useMemo( () => {
|
package/src/card/card/hook.js
CHANGED
|
@@ -61,7 +61,7 @@ export function useCard( props ) {
|
|
|
61
61
|
isRounded && styles.rounded,
|
|
62
62
|
className
|
|
63
63
|
);
|
|
64
|
-
}, [ className, isBorderless, isRounded ] );
|
|
64
|
+
}, [ className, cx, isBorderless, isRounded ] );
|
|
65
65
|
|
|
66
66
|
const surfaceProps = useSurface( { ...otherProps, className: classes } );
|
|
67
67
|
|
|
@@ -266,7 +266,7 @@ const mapCountryOption = ( country ) => ( {
|
|
|
266
266
|
|
|
267
267
|
const countryOptions = countries.map( mapCountryOption );
|
|
268
268
|
|
|
269
|
-
function CountryCodeComboboxControl() {
|
|
269
|
+
function CountryCodeComboboxControl( { allowReset } ) {
|
|
270
270
|
const [ value, setValue ] = useState( null );
|
|
271
271
|
|
|
272
272
|
return (
|
|
@@ -276,9 +276,13 @@ function CountryCodeComboboxControl() {
|
|
|
276
276
|
onChange={ setValue }
|
|
277
277
|
label="Select a country"
|
|
278
278
|
options={ countryOptions }
|
|
279
|
+
allowReset={ allowReset }
|
|
279
280
|
/>
|
|
280
281
|
<p>Value: { value }</p>
|
|
281
282
|
</>
|
|
282
283
|
);
|
|
283
284
|
}
|
|
284
|
-
export const _default = (
|
|
285
|
+
export const _default = CountryCodeComboboxControl.bind( {} );
|
|
286
|
+
_default.args = {
|
|
287
|
+
allowReset: false,
|
|
288
|
+
};
|
|
@@ -40,7 +40,7 @@ input.components-combobox-control__input[type="text"] {
|
|
|
40
40
|
|
|
41
41
|
.components-combobox-control__reset.components-button {
|
|
42
42
|
display: flex;
|
|
43
|
-
height: $grid-unit-
|
|
44
|
-
min-width: $grid-unit-
|
|
43
|
+
height: $grid-unit-20;
|
|
44
|
+
min-width: $grid-unit-20;
|
|
45
45
|
padding: 0;
|
|
46
46
|
}
|
package/src/date-time/README.md
CHANGED
|
@@ -28,7 +28,7 @@ const MyDateTimePicker = () => {
|
|
|
28
28
|
is12Hour={ true }
|
|
29
29
|
/>
|
|
30
30
|
);
|
|
31
|
-
}
|
|
31
|
+
};
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
## Props
|
|
@@ -52,7 +52,7 @@ The function called when a new date or time has been selected. It is passed the
|
|
|
52
52
|
|
|
53
53
|
### is12Hour
|
|
54
54
|
|
|
55
|
-
Whether we use a 12-hour clock. With a 12-hour clock, an AM/PM widget is displayed and the time format is assumed to be MM-DD-YYYY.
|
|
55
|
+
Whether we use a 12-hour clock. With a 12-hour clock, an AM/PM widget is displayed and the time format is assumed to be `MM-DD-YYYY` (as opposed to the default format `DD-MM-YYYY`).
|
|
56
56
|
|
|
57
57
|
- Type: `bool`
|
|
58
58
|
- Required: No
|
|
@@ -69,5 +69,5 @@ A callback function which receives a Date object representing a day as an argume
|
|
|
69
69
|
|
|
70
70
|
A callback invoked when selecting the previous/next month in the date picker. The callback receives the new month date in the ISO format as an argument.
|
|
71
71
|
|
|
72
|
-
-
|
|
73
|
-
-
|
|
72
|
+
- Type: `Function`
|
|
73
|
+
- Required: No
|
|
@@ -278,7 +278,7 @@ describe( 'TimePicker', () => {
|
|
|
278
278
|
screen.getByLabelText( 'Day' )
|
|
279
279
|
);
|
|
280
280
|
|
|
281
|
-
expect( monthInputIndex
|
|
281
|
+
expect( monthInputIndex > dayInputIndex ).toBe( true );
|
|
282
282
|
|
|
283
283
|
rerender(
|
|
284
284
|
<form aria-label="form">
|
|
@@ -299,7 +299,7 @@ describe( 'TimePicker', () => {
|
|
|
299
299
|
screen.getByLabelText( 'Day' )
|
|
300
300
|
);
|
|
301
301
|
|
|
302
|
-
expect( monthInputIndex
|
|
302
|
+
expect( monthInputIndex < dayInputIndex ).toBe( true );
|
|
303
303
|
} );
|
|
304
304
|
|
|
305
305
|
it( 'Should set a time when passed a null currentTime', () => {
|
package/src/date-time/time.js
CHANGED
|
@@ -196,13 +196,13 @@ export function TimePicker( { is12Hour, currentTime, onChange } ) {
|
|
|
196
196
|
|
|
197
197
|
const dayMonthFormat = is12Hour ? (
|
|
198
198
|
<>
|
|
199
|
-
{ dayFormat }
|
|
200
199
|
{ monthFormat }
|
|
200
|
+
{ dayFormat }
|
|
201
201
|
</>
|
|
202
202
|
) : (
|
|
203
203
|
<>
|
|
204
|
-
{ monthFormat }
|
|
205
204
|
{ dayFormat }
|
|
205
|
+
{ monthFormat }
|
|
206
206
|
</>
|
|
207
207
|
);
|
|
208
208
|
|
package/src/dropdown/index.js
CHANGED
|
@@ -27,19 +27,20 @@ function useObservableState( initialState, onStateChange ) {
|
|
|
27
27
|
];
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
export default function Dropdown( {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
export default function Dropdown( props ) {
|
|
31
|
+
const {
|
|
32
|
+
renderContent,
|
|
33
|
+
renderToggle,
|
|
34
|
+
position = 'bottom right',
|
|
35
|
+
className,
|
|
36
|
+
contentClassName,
|
|
37
|
+
expandOnMobile,
|
|
38
|
+
headerTitle,
|
|
39
|
+
focusOnMount,
|
|
40
|
+
popoverProps,
|
|
41
|
+
onClose,
|
|
42
|
+
onToggle,
|
|
43
|
+
} = props;
|
|
43
44
|
const containerRef = useRef();
|
|
44
45
|
const [ isOpen, setIsOpen ] = useObservableState( false, onToggle );
|
|
45
46
|
|
package/src/elevation/hook.js
CHANGED
package/src/flex/flex/hook.js
CHANGED
package/src/grid/hook.js
CHANGED
|
@@ -48,7 +48,7 @@ export function useItem( props: WordPressComponentProps< ItemProps, 'div' > ) {
|
|
|
48
48
|
spacedAround && styles.spacedAround,
|
|
49
49
|
className
|
|
50
50
|
),
|
|
51
|
-
[ as, className, size, spacedAround ]
|
|
51
|
+
[ as, className, cx, size, spacedAround ]
|
|
52
52
|
);
|
|
53
53
|
|
|
54
54
|
const wrapperClassName = cx( styles.itemWrapper );
|
|
@@ -145,7 +145,7 @@ const ItemWithChevron = ( {
|
|
|
145
145
|
|
|
146
146
|
const itemClassName = useMemo(
|
|
147
147
|
() => cx( ! alwaysVisible && appearingChevron, className ),
|
|
148
|
-
[ alwaysVisible, className ]
|
|
148
|
+
[ alwaysVisible, className, cx ]
|
|
149
149
|
);
|
|
150
150
|
|
|
151
151
|
const chevronIconClassName = useMemo(
|
|
@@ -155,7 +155,7 @@ const ItemWithChevron = ( {
|
|
|
155
155
|
fill: currentColor;
|
|
156
156
|
transform: ${ isRtlLayout ? 'scaleX( -100% )' : 'none' };
|
|
157
157
|
` ),
|
|
158
|
-
[ isRtlLayout ]
|
|
158
|
+
[ cx, isRtlLayout ]
|
|
159
159
|
);
|
|
160
160
|
|
|
161
161
|
return (
|
|
@@ -10,14 +10,13 @@ import { Component } from '@wordpress/element';
|
|
|
10
10
|
import { Icon } from '@wordpress/components';
|
|
11
11
|
import { withPreferredColorScheme } from '@wordpress/compose';
|
|
12
12
|
import { __, sprintf } from '@wordpress/i18n';
|
|
13
|
-
import { sparkles } from '@wordpress/icons';
|
|
14
13
|
import { BlockIcon } from '@wordpress/block-editor';
|
|
15
14
|
|
|
16
15
|
/**
|
|
17
16
|
* Internal dependencies
|
|
18
17
|
*/
|
|
19
18
|
import styles from './style.scss';
|
|
20
|
-
|
|
19
|
+
import sparkles from './sparkles';
|
|
21
20
|
class MenuItem extends Component {
|
|
22
21
|
constructor() {
|
|
23
22
|
super( ...arguments );
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { SVG, Path } from '@wordpress/primitives';
|
|
5
|
+
|
|
6
|
+
const sparkles = (
|
|
7
|
+
<SVG viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
8
|
+
<Path
|
|
9
|
+
d="M10 11c-1.588-.479-4-.91-4-.91s2-.241 4-.454c1.8-.191 3.365-.502 4-3.181C14.635 3.775 15 1 15 1s.365 2.775 1 5.455c.635 2.679 2 2.969 4 3.181 2 .213 4 .455 4 .455s-2.412.43-4 .909c-1.588.479-3 1-4 4.546-.746 2.643-.893 4.948-1 5.454-.107-.506-.167-2.5-1-5.454C13 12 11.588 11.479 10 11zM7.333 3.5C6.803 3.333 6 3.182 6 3.182s.667-.085 1.333-.16c.6-.066 1.122-.175 1.334-1.113C8.878.971 9 0 9 0s.122.971.333 1.91c.212.937.667 1.038 1.334 1.113.666.074 1.333.159 1.333.159s-.804.15-1.333.318c-.53.167-1 .35-1.334 1.59C9.085 6.017 9.036 6.824 9 7c-.036-.177-.056-.875-.333-1.91-.334-1.24-.804-1.423-1.334-1.59zM2.444 18C1.474 17.713 0 17.454 0 17.454s1.222-.145 2.444-.272c1.1-.115 2.057-.302 2.445-1.91C5.277 13.666 5.5 12 5.5 12s.223 1.665.611 3.273c.388 1.607 1.222 1.781 2.445 1.909 1.222.127 2.444.273 2.444.273s-1.474.258-2.444.545c-.971.287-1.834.6-2.445 2.727-.456 1.586-.546 2.97-.611 3.273-.065-.304-.102-1.5-.611-3.273C4.278 18.6 3.415 18.287 2.444 18z"
|
|
10
|
+
fill="#F0C930"
|
|
11
|
+
/>
|
|
12
|
+
</SVG>
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
export default sparkles;
|
|
@@ -72,7 +72,7 @@ describe.each( [
|
|
|
72
72
|
it( 'should display the LINK SETTINGS with an EMPTY LINK TO field.', async () => {
|
|
73
73
|
// Arrange
|
|
74
74
|
const url = 'https://tonytahmouchtest.files.wordpress.com';
|
|
75
|
-
const subject = initializeEditor( { initialHtml } );
|
|
75
|
+
const subject = await initializeEditor( { initialHtml } );
|
|
76
76
|
Clipboard.getString.mockReturnValue( url );
|
|
77
77
|
|
|
78
78
|
// Act
|
|
@@ -109,7 +109,7 @@ describe.each( [
|
|
|
109
109
|
it( 'should display the LINK PICKER with NO FROM CLIPBOARD CELL.', async () => {
|
|
110
110
|
// Arrange
|
|
111
111
|
const url = 'tonytahmouchtest.files.wordpress.com';
|
|
112
|
-
const subject = initializeEditor( { initialHtml } );
|
|
112
|
+
const subject = await initializeEditor( { initialHtml } );
|
|
113
113
|
Clipboard.getString.mockReturnValue( url );
|
|
114
114
|
|
|
115
115
|
// Act
|
|
@@ -162,7 +162,7 @@ describe.each( [
|
|
|
162
162
|
it( 'should display the LINK PICKER with NO FROM CLIPBOARD CELL.', async () => {
|
|
163
163
|
// Arrange
|
|
164
164
|
const url = 'https://tonytahmouchtest.files.wordpress.com';
|
|
165
|
-
const subject = initializeEditor( { initialHtml } );
|
|
165
|
+
const subject = await initializeEditor( { initialHtml } );
|
|
166
166
|
Clipboard.getString.mockReturnValue( url );
|
|
167
167
|
|
|
168
168
|
// Act
|
|
@@ -241,7 +241,7 @@ describe.each( [
|
|
|
241
241
|
async () => {
|
|
242
242
|
// Arrange
|
|
243
243
|
const url = 'https://tonytahmouchtest.files.wordpress.com';
|
|
244
|
-
const subject = initializeEditor( { initialHtml } );
|
|
244
|
+
const subject = await initializeEditor( { initialHtml } );
|
|
245
245
|
Clipboard.getString.mockReturnValue( url );
|
|
246
246
|
|
|
247
247
|
// Act
|
|
@@ -308,7 +308,7 @@ describe.each( [
|
|
|
308
308
|
async () => {
|
|
309
309
|
// Arrange
|
|
310
310
|
const url = 'https://tonytahmouchtest.files.wordpress.com';
|
|
311
|
-
const subject = initializeEditor( { initialHtml } );
|
|
311
|
+
const subject = await initializeEditor( { initialHtml } );
|
|
312
312
|
Clipboard.getString.mockReturnValue( url );
|
|
313
313
|
|
|
314
314
|
// Act
|
package/src/modal/index.js
CHANGED
|
@@ -22,7 +22,6 @@ import {
|
|
|
22
22
|
useConstrainedTabbing,
|
|
23
23
|
useMergeRefs,
|
|
24
24
|
} from '@wordpress/compose';
|
|
25
|
-
import deprecated from '@wordpress/deprecated';
|
|
26
25
|
import { ESCAPE } from '@wordpress/keycodes';
|
|
27
26
|
import { __ } from '@wordpress/i18n';
|
|
28
27
|
import { closeSmall } from '@wordpress/icons';
|
|
@@ -45,8 +44,7 @@ function Modal( props, forwardedRef ) {
|
|
|
45
44
|
focusOnMount = true,
|
|
46
45
|
shouldCloseOnEsc = true,
|
|
47
46
|
shouldCloseOnClickOutside = true,
|
|
48
|
-
|
|
49
|
-
isDismissible = isDismissable || true,
|
|
47
|
+
isDismissible = true,
|
|
50
48
|
/* accessibility */
|
|
51
49
|
aria = {
|
|
52
50
|
labelledby: null,
|
|
@@ -93,13 +91,6 @@ function Modal( props, forwardedRef ) {
|
|
|
93
91
|
};
|
|
94
92
|
}, [] );
|
|
95
93
|
|
|
96
|
-
if ( isDismissable ) {
|
|
97
|
-
deprecated( 'isDismissable prop of the Modal component', {
|
|
98
|
-
since: '5.4',
|
|
99
|
-
alternative: 'isDismissible prop (renamed) of the Modal component',
|
|
100
|
-
} );
|
|
101
|
-
}
|
|
102
|
-
|
|
103
94
|
function handleEscapeKeyDown( event ) {
|
|
104
95
|
if (
|
|
105
96
|
shouldCloseOnEsc &&
|
package/src/navigator/context.ts
CHANGED
|
@@ -10,7 +10,7 @@ import type { NavigatorContext as NavigatorContextType } from './types';
|
|
|
10
10
|
|
|
11
11
|
const initialContextValue: NavigatorContextType = {
|
|
12
12
|
location: {},
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
goTo: () => {},
|
|
14
|
+
goBack: () => {},
|
|
15
15
|
};
|
|
16
16
|
export const NavigatorContext = createContext( initialContextValue );
|
|
@@ -16,19 +16,19 @@ import {
|
|
|
16
16
|
} from '@wordpress/components';
|
|
17
17
|
|
|
18
18
|
function NavigatorButton( { path, ...props } ) {
|
|
19
|
-
const {
|
|
19
|
+
const { goTo } = useNavigator();
|
|
20
20
|
return (
|
|
21
21
|
<Button
|
|
22
22
|
variant="primary"
|
|
23
|
-
onClick={ () =>
|
|
23
|
+
onClick={ () => goTo( path ) }
|
|
24
24
|
{ ...props }
|
|
25
25
|
/>
|
|
26
26
|
);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
function NavigatorBackButton( props ) {
|
|
30
|
-
const {
|
|
31
|
-
return <Button variant="secondary" onClick={ () =>
|
|
30
|
+
const { goBack } = useNavigator();
|
|
31
|
+
return <Button variant="secondary" onClick={ () => goBack() } { ...props } />;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
const MyNavigation = () => (
|
|
@@ -64,15 +64,17 @@ You can retrieve a `navigator` instance by using the `useNavigator` hook.
|
|
|
64
64
|
|
|
65
65
|
The `navigator` instance has a few properties:
|
|
66
66
|
|
|
67
|
-
### `
|
|
67
|
+
### `goTo`: `( path: string, options: NavigateOptions ) => void`
|
|
68
68
|
|
|
69
|
-
The `
|
|
69
|
+
The `goTo` function allows navigating to a given path. The second argument can augment the navigation operations with different options.
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
The available options are:
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
- `focusTargetSelector`: `string`. An optional property used to specify the CSS selector used to restore focus on the matching element when navigating back.
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
### `goBack`: `() => void`
|
|
76
|
+
|
|
77
|
+
The `goBack` function allows navigating to the previous path.
|
|
76
78
|
|
|
77
79
|
### `location`: `NavigatorLocation`
|
|
78
80
|
|