@wordpress/components 25.3.0 → 25.5.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 +31 -0
- package/build/border-control/border-control-dropdown/component.js +8 -10
- package/build/border-control/border-control-dropdown/component.js.map +1 -1
- package/build/button/index.native.js +9 -6
- package/build/button/index.native.js.map +1 -1
- package/build/color-palette/index.js +2 -2
- package/build/color-palette/index.js.map +1 -1
- package/build/focal-point-picker/index.native.js +6 -4
- package/build/focal-point-picker/index.native.js.map +1 -1
- package/build/form-token-field/styles.js +4 -2
- package/build/form-token-field/styles.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/item-group/styles.js +13 -10
- package/build/item-group/styles.js.map +1 -1
- package/build/menu-items-choice/index.js +1 -0
- package/build/menu-items-choice/index.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/bottom-sheet-navigation-context.native.js +3 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/bottom-sheet-navigation-context.native.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +50 -44
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +13 -20
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
- package/build/mobile/bottom-sheet/index.native.js +3 -1
- package/build/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build/mobile/image/index.native.js +4 -3
- package/build/mobile/image/index.native.js.map +1 -1
- package/build/mobile/link-picker/link-picker-results.native.js +2 -1
- package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
- package/build/mobile/segmented-control/index.native.js +7 -7
- package/build/mobile/segmented-control/index.native.js.map +1 -1
- package/build/modal/index.js +14 -1
- package/build/modal/index.js.map +1 -1
- package/build/navigator/navigator-provider/component.js +18 -10
- package/build/navigator/navigator-provider/component.js.map +1 -1
- package/build/private-apis.js +4 -1
- package/build/private-apis.js.map +1 -1
- package/build/progress-bar/index.js +54 -0
- package/build/progress-bar/index.js.map +1 -0
- package/build/progress-bar/styles.js +69 -0
- package/build/progress-bar/styles.js.map +1 -0
- package/build/progress-bar/types.js +6 -0
- package/build/progress-bar/types.js.map +1 -0
- package/build/query-controls/index.js +1 -0
- package/build/query-controls/index.js.map +1 -1
- package/build/query-controls/index.native.js +1 -0
- package/build/query-controls/index.native.js.map +1 -1
- package/build/tab-panel/index.js +91 -58
- package/build/tab-panel/index.js.map +1 -1
- package/build/text-control/index.js +2 -2
- package/build/text-control/index.js.map +1 -1
- package/build/toolbar/toolbar-group/toolbar-group-container.native.js +10 -7
- package/build/toolbar/toolbar-group/toolbar-group-container.native.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/component.js +8 -10
- package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
- package/build-module/button/index.native.js +8 -6
- package/build-module/button/index.native.js.map +1 -1
- package/build-module/color-palette/index.js +2 -2
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/focal-point-picker/index.native.js +6 -5
- package/build-module/focal-point-picker/index.native.js.map +1 -1
- package/build-module/form-token-field/styles.js +3 -2
- package/build-module/form-token-field/styles.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/item-group/styles.js +13 -11
- package/build-module/item-group/styles.js.map +1 -1
- package/build-module/menu-items-choice/index.js +1 -0
- package/build-module/menu-items-choice/index.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/bottom-sheet-navigation-context.native.js +3 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/bottom-sheet-navigation-context.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +43 -41
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +14 -20
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/index.native.js +3 -1
- package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build-module/mobile/image/index.native.js +4 -3
- package/build-module/mobile/image/index.native.js.map +1 -1
- package/build-module/mobile/link-picker/link-picker-results.native.js +2 -1
- package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
- package/build-module/mobile/segmented-control/index.native.js +7 -7
- package/build-module/mobile/segmented-control/index.native.js.map +1 -1
- package/build-module/modal/index.js +14 -1
- package/build-module/modal/index.js.map +1 -1
- package/build-module/navigator/navigator-provider/component.js +18 -10
- package/build-module/navigator/navigator-provider/component.js.map +1 -1
- package/build-module/private-apis.js +3 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-module/progress-bar/index.js +41 -0
- package/build-module/progress-bar/index.js.map +1 -0
- package/build-module/progress-bar/styles.js +61 -0
- package/build-module/progress-bar/styles.js.map +1 -0
- package/build-module/progress-bar/types.js +2 -0
- package/build-module/progress-bar/types.js.map +1 -0
- package/build-module/query-controls/index.js +1 -0
- package/build-module/query-controls/index.js.map +1 -1
- package/build-module/query-controls/index.native.js +1 -0
- package/build-module/query-controls/index.native.js.map +1 -1
- package/build-module/tab-panel/index.js +88 -59
- package/build-module/tab-panel/index.js.map +1 -1
- package/build-module/text-control/index.js +2 -2
- package/build-module/text-control/index.js.map +1 -1
- package/build-module/toolbar/toolbar-group/toolbar-group-container.native.js +11 -7
- package/build-module/toolbar/toolbar-group/toolbar-group-container.native.js.map +1 -1
- package/build-style/style-rtl.css +3 -0
- package/build-style/style.css +3 -0
- package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
- package/build-types/form-token-field/styles.d.ts.map +1 -1
- package/build-types/item-group/item/hook.d.ts.map +1 -1
- package/build-types/item-group/stories/index.d.ts.map +1 -1
- package/build-types/item-group/styles.d.ts +1 -1
- package/build-types/item-group/styles.d.ts.map +1 -1
- package/build-types/menu-items-choice/index.d.ts.map +1 -1
- package/build-types/menu-items-choice/types.d.ts +5 -0
- package/build-types/menu-items-choice/types.d.ts.map +1 -1
- package/build-types/modal/index.d.ts.map +1 -1
- package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
- package/build-types/navigator/types.d.ts +3 -1
- package/build-types/navigator/types.d.ts.map +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/progress-bar/index.d.ts +5 -0
- package/build-types/progress-bar/index.d.ts.map +1 -0
- package/build-types/progress-bar/stories/index.d.ts +12 -0
- package/build-types/progress-bar/stories/index.d.ts.map +1 -0
- package/build-types/progress-bar/styles.d.ts +18 -0
- package/build-types/progress-bar/styles.d.ts.map +1 -0
- package/build-types/progress-bar/test/index.d.ts +2 -0
- package/build-types/progress-bar/test/index.d.ts.map +1 -0
- package/build-types/progress-bar/types.d.ts +11 -0
- package/build-types/progress-bar/types.d.ts.map +1 -0
- package/build-types/query-controls/index.d.ts.map +1 -1
- package/build-types/tab-panel/index.d.ts.map +1 -1
- package/build-types/tab-panel/stories/index.d.ts +1 -0
- package/build-types/tab-panel/stories/index.d.ts.map +1 -1
- package/build-types/tab-panel/types.d.ts +1 -9
- package/build-types/tab-panel/types.d.ts.map +1 -1
- package/build-types/text-control/test/text-control.d.ts +2 -0
- package/build-types/text-control/test/text-control.d.ts.map +1 -0
- package/package.json +22 -22
- package/src/border-control/border-control-dropdown/component.tsx +7 -11
- package/src/border-control/test/index.js +6 -6
- package/src/button/index.native.js +9 -3
- package/src/button/style.native.scss +9 -0
- package/src/color-palette/index.tsx +2 -2
- package/src/color-palette/test/__snapshots__/index.tsx.snap +1 -1
- package/src/color-palette/test/index.tsx +1 -5
- package/src/draggable/test/index.native.js +4 -0
- package/src/focal-point-picker/index.native.js +6 -5
- package/src/form-token-field/styles.ts +2 -0
- package/src/item-group/item/hook.ts +2 -1
- package/src/item-group/stories/index.tsx +8 -3
- package/src/item-group/styles.ts +39 -28
- package/src/menu-item/README.md +7 -0
- package/src/menu-items-choice/index.tsx +1 -0
- package/src/menu-items-choice/types.ts +5 -0
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/bottom-sheet-navigation-context.native.js +1 -1
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +72 -53
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +15 -21
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/test/navigation-container.native.js +165 -119
- package/src/mobile/bottom-sheet/index.native.js +2 -0
- package/src/mobile/image/index.native.js +8 -6
- package/src/mobile/image/style.native.scss +5 -1
- package/src/mobile/link-picker/link-picker-results.native.js +1 -1
- package/src/mobile/link-settings/test/edit.native.js +37 -23
- package/src/mobile/segmented-control/index.native.js +11 -11
- package/src/modal/index.tsx +16 -0
- package/src/modal/test/index.tsx +33 -0
- package/src/navigator/navigator-provider/component.tsx +30 -23
- package/src/navigator/types.ts +4 -1
- package/src/placeholder/style.scss +5 -0
- package/src/private-apis.ts +2 -0
- package/src/progress-bar/README.md +30 -0
- package/src/progress-bar/index.tsx +45 -0
- package/src/progress-bar/stories/index.tsx +33 -0
- package/src/progress-bar/styles.ts +67 -0
- package/src/progress-bar/test/index.tsx +79 -0
- package/src/progress-bar/types.ts +11 -0
- package/src/query-controls/index.native.js +1 -0
- package/src/query-controls/index.tsx +1 -0
- package/src/tab-panel/index.tsx +121 -84
- package/src/tab-panel/stories/index.tsx +6 -0
- package/src/tab-panel/test/index.tsx +128 -109
- package/src/tab-panel/types.ts +1 -10
- package/src/text-control/index.tsx +2 -2
- package/src/text-control/test/text-control.tsx +61 -0
- package/src/toolbar/toolbar-group/style.native.scss +2 -3
- package/src/toolbar/toolbar-group/toolbar-group-container.native.js +12 -17
- package/src/tooltip/README.md +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/item-group/styles.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/item-group/styles.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,cAAc,OAAS,GAAG,GAAG,QAAQ,8CAoCjD,CAAC;AAEF,eAAO,MAAM,WAAW,2CAGvB,CAAC;AAEF,eAAO,MAAM,IAAI,2CAMhB,CAAC;AAEF,eAAO,MAAM,QAAQ,2CAEpB,CAAC;AAEF,eAAO,MAAM,SAAS,2CAQrB,CAAC;AAIF,eAAO,MAAM,YAAY,2CAExB,CAAC;AAEF,eAAO,MAAM,OAAO,2CAYnB,CAAC;AAeF,eAAO,MAAM,SAAS;;;;CAUrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/menu-items-choice/index.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAIpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,iBAAS,eAAe,CAAE,EACzB,OAAY,EACZ,OAAc,EACd,QAAQ,EACR,KAAK,GACL,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/menu-items-choice/index.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAIpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,iBAAS,eAAe,CAAE,EACzB,OAAY,EACZ,OAAc,EACd,QAAQ,EACR,KAAK,GACL,EAAE,oBAAoB,eA8BtB;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Internal dependencies
|
|
3
3
|
*/
|
|
4
4
|
import type { ShortcutProps } from '../shortcut/types';
|
|
5
|
+
import type { ButtonAsButtonProps } from '../button/types';
|
|
5
6
|
export type MenuItemsChoiceProps = {
|
|
6
7
|
/**
|
|
7
8
|
* Array of choices.
|
|
@@ -36,6 +37,10 @@ export type MenuItemChoice = {
|
|
|
36
37
|
* Unique value for choice.
|
|
37
38
|
*/
|
|
38
39
|
value: string;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the menu item is disabled.
|
|
42
|
+
*/
|
|
43
|
+
disabled?: ButtonAsButtonProps['disabled'];
|
|
39
44
|
/**
|
|
40
45
|
* Additional information which will be rendered below the given label.
|
|
41
46
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/menu-items-choice/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/menu-items-choice/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,MAAM,MAAM,oBAAoB,GAAG;IAClC;;;;OAIG;IACH,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IACnC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAE,KAAK,EAAE,MAAM,GAAI,IAAI,CAAC;IAChC;;;;;OAKG;IACH,OAAO,EAAE,CAAE,KAAK,EAAE,MAAM,GAAG,IAAI,KAAM,IAAI,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC5B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,mBAAmB,CAAE,UAAU,CAAE,CAAC;IAC7C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAE,UAAU,CAAE,CAAC;IACvC;;OAEG;IACH,CAAE,YAAY,CAAE,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/modal/index.tsx"],"names":[],"mappings":";AAoCA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/modal/index.tsx"],"names":[],"mappings":";AAoCA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAmP1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,KAAK,uGAAiC,CAAC;AAEpD,eAAe,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-provider/component.tsx"],"names":[],"mappings":";AA8BA,OAAO,KAAK,EACX,sBAAsB,EAItB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-provider/component.tsx"],"names":[],"mappings":";AA8BA,OAAO,KAAK,EACX,sBAAsB,EAItB,MAAM,UAAU,CAAC;AAwOlB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,iBAAiB,yHAG7B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -11,7 +11,9 @@ export type NavigateOptions = {
|
|
|
11
11
|
focusTargetSelector?: string;
|
|
12
12
|
isBack?: boolean;
|
|
13
13
|
skipFocus?: boolean;
|
|
14
|
+
replace?: boolean;
|
|
14
15
|
};
|
|
16
|
+
export type NavigateToParentOptions = Omit<NavigateOptions, 'isBack'>;
|
|
15
17
|
export type NavigatorLocation = NavigateOptions & {
|
|
16
18
|
isInitial?: boolean;
|
|
17
19
|
path?: string;
|
|
@@ -22,7 +24,7 @@ export type Navigator = {
|
|
|
22
24
|
params: MatchParams;
|
|
23
25
|
goTo: (path: string, options?: NavigateOptions) => void;
|
|
24
26
|
goBack: () => void;
|
|
25
|
-
goToParent: () => void;
|
|
27
|
+
goToParent: (options?: NavigateToParentOptions) => void;
|
|
26
28
|
};
|
|
27
29
|
export type NavigatorContext = Navigator & {
|
|
28
30
|
addScreen: (screen: Screen) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/navigator/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,MAAM,MAAM,WAAW,GAAG,MAAM,CAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAE,CAAC;AAE9D,MAAM,MAAM,eAAe,GAAG;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/navigator/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,MAAM,MAAM,WAAW,GAAG,MAAM,CAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAE,CAAC;AAE9D,MAAM,MAAM,eAAe,GAAG;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAE,eAAe,EAAE,QAAQ,CAAE,CAAC;AAExE,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAGF,MAAM,MAAM,SAAS,GAAG;IACvB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,CAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,KAAM,IAAI,CAAC;IAC1D,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,UAAU,EAAE,CAAE,OAAO,CAAC,EAAE,uBAAuB,KAAM,IAAI,CAAC;CAC1D,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG;IAC1C,SAAS,EAAE,CAAE,MAAM,EAAE,MAAM,KAAM,IAAI,CAAC;IACtC,YAAY,EAAE,CAAE,MAAM,EAAE,MAAM,KAAM,IAAI,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACpC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;AAE3D,MAAM,MAAM,4BAA4B,GAAG,wBAAwB,GAAG;IACrE;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,wBAAwB,CAAC;AAEpE,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,GAAG;IAC7D;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-apis.d.ts","sourceRoot":"","sources":["../src/private-apis.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"private-apis.d.ts","sourceRoot":"","sources":["../src/private-apis.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAQ,IAAI,2CAAE,MAAM,sBAIzB,CAAC;AAEH,eAAO,MAAM,WAAW,IAAK,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ProgressBarProps } from './types';
|
|
3
|
+
export declare const ProgressBar: import("react").ForwardRefExoticComponent<ProgressBarProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>, "key" | keyof import("react").ProgressHTMLAttributes<HTMLProgressElement>>, "children" | "as" | keyof ProgressBarProps> & import("react").RefAttributes<HTMLProgressElement>>;
|
|
4
|
+
export default ProgressBar;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/progress-bar/index.tsx"],"names":[],"mappings":";AAeA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AA2BhD,eAAO,MAAM,WAAW,2WAAuC,CAAC;AAEhE,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import { ProgressBar } from '..';
|
|
9
|
+
declare const meta: ComponentMeta<typeof ProgressBar>;
|
|
10
|
+
export default meta;
|
|
11
|
+
export declare const Default: ComponentStory<typeof ProgressBar>;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/progress-bar/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEtE;;GAEG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAEjC,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,WAAW,CAY5C,CAAC;AACF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,WAAW,CAEvD,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const INDETERMINATE_TRACK_WIDTH = 50;
|
|
3
|
+
export declare const Track: import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
as?: import("react").ElementType<any> | undefined;
|
|
6
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
|
+
export declare const Indicator: import("@emotion/styled").StyledComponent<{
|
|
8
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
+
as?: import("react").ElementType<any> | undefined;
|
|
10
|
+
} & {
|
|
11
|
+
isIndeterminate: boolean;
|
|
12
|
+
value?: number | undefined;
|
|
13
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
14
|
+
export declare const ProgressElement: import("@emotion/styled").StyledComponent<{
|
|
15
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
+
as?: import("react").ElementType<any> | undefined;
|
|
17
|
+
}, import("react").DetailedHTMLProps<import("react").ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>, {}>;
|
|
18
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/progress-bar/styles.ts"],"names":[],"mappings":";AAqBA,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,eAAO,MAAM,KAAK;;;yGAWjB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;qBACJ,OAAO;;yGAoBxB,CAAC;AAEF,eAAO,MAAM,eAAe;;;2HAO3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/progress-bar/test/index.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/progress-bar/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/query-controls/index.tsx"],"names":[],"mappings":";AAcA,OAAO,KAAK,EACX,kBAAkB,EAGlB,MAAM,SAAS,CAAC;AAkBjB;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAAE,EAC9B,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,KAAK,EACL,OAAO,EACP,QAA4B,EAC5B,QAA4B,EAC5B,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,eAAe,EAGf,GAAG,KAAK,EACR,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/query-controls/index.tsx"],"names":[],"mappings":";AAcA,OAAO,KAAK,EACX,kBAAkB,EAGlB,MAAM,SAAS,CAAC;AAkBjB;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAAE,EAC9B,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,KAAK,EACL,OAAO,EACP,QAA4B,EAC5B,QAA4B,EAC5B,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,eAAe,EAGf,GAAG,KAAK,EACR,EAAE,kBAAkB,eAoHpB;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tab-panel/index.tsx"],"names":[],"mappings":";AAuBA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tab-panel/index.tsx"],"names":[],"mappings":";AAuBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AA2N7C,eAAO,MAAM,QAAQ,ySAAoC,CAAC;AAC1D,eAAe,QAAQ,CAAC"}
|
|
@@ -12,4 +12,5 @@ export default meta;
|
|
|
12
12
|
export declare const Default: ComponentStory<import("react").ForwardRefExoticComponent<import("../types").TabPanelProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "as" | keyof import("../types").TabPanelProps> & import("react").RefAttributes<any>>>;
|
|
13
13
|
export declare const DisabledTab: ComponentStory<import("react").ForwardRefExoticComponent<import("../types").TabPanelProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "as" | keyof import("../types").TabPanelProps> & import("react").RefAttributes<any>>>;
|
|
14
14
|
export declare const WithTabIconsAndTooltips: ComponentStory<import("react").ForwardRefExoticComponent<import("../types").TabPanelProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "as" | keyof import("../types").TabPanelProps> & import("react").RefAttributes<any>>>;
|
|
15
|
+
export declare const ManualActivation: ComponentStory<import("react").ForwardRefExoticComponent<import("../types").TabPanelProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "as" | keyof import("../types").TabPanelProps> & import("react").RefAttributes<any>>>;
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tab-panel/stories/index.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOtE;;GAEG;AACH,OAAO,QAAQ,MAAM,IAAI,CAAC;AAI1B,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,QAAQ,CAQzC,CAAC;AACF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO,+VAAsB,CAAC;AAe3C,eAAO,MAAM,WAAW,+VAAsB,CAAC;AA8B/C,eAAO,MAAM,uBAAuB,+VAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tab-panel/stories/index.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOtE;;GAEG;AACH,OAAO,QAAQ,MAAM,IAAI,CAAC;AAI1B,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,QAAQ,CAQzC,CAAC;AACF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO,+VAAsB,CAAC;AAe3C,eAAO,MAAM,WAAW,+VAAsB,CAAC;AA8B/C,eAAO,MAAM,uBAAuB,+VAA8B,CAAC;AAsBnE,eAAO,MAAM,gBAAgB,+VAAsB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { ReactNode } from 'react';
|
|
5
5
|
/**
|
|
6
6
|
* Internal dependencies
|
|
7
7
|
*/
|
|
@@ -28,14 +28,6 @@ type Tab = {
|
|
|
28
28
|
*/
|
|
29
29
|
disabled?: boolean;
|
|
30
30
|
} & Record<any, any>;
|
|
31
|
-
export type TabButtonProps = {
|
|
32
|
-
children: ReactNode;
|
|
33
|
-
label?: string;
|
|
34
|
-
onClick: (event: MouseEvent) => void;
|
|
35
|
-
selected: boolean;
|
|
36
|
-
showTooltip?: boolean;
|
|
37
|
-
tabId: string;
|
|
38
|
-
} & Pick<Tab, 'className' | 'icon' | 'disabled'>;
|
|
39
31
|
export type TabPanelProps = {
|
|
40
32
|
/**
|
|
41
33
|
* The class name to add to the active tab.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tab-panel/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tab-panel/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,KAAK,GAAG,GAAG;IACV;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,MAAM,CAAE,GAAG,EAAE,GAAG,CAAE,CAAC;AAEvB,MAAM,MAAM,aAAa,GAAG;IAC3B;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,QAAQ,EAAE,CAAE,GAAG,EAAE,GAAG,KAAM,SAAS,CAAC;IACpC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAE,OAAO,EAAE,MAAM,KAAM,IAAI,CAAC;IACvC;;;;OAIG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC;;OAEG;IACH,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-control.d.ts","sourceRoot":"","sources":["../../../src/text-control/test/text-control.tsx"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/components",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.5.0",
|
|
4
4
|
"description": "UI components for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
],
|
|
31
31
|
"types": "build-types",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@ariakit/react": "^0.2.
|
|
33
|
+
"@ariakit/react": "^0.2.12",
|
|
34
34
|
"@babel/runtime": "^7.16.0",
|
|
35
35
|
"@emotion/cache": "^11.7.1",
|
|
36
36
|
"@emotion/css": "^11.7.1",
|
|
@@ -39,25 +39,25 @@
|
|
|
39
39
|
"@emotion/styled": "^11.6.0",
|
|
40
40
|
"@emotion/utils": "^1.0.0",
|
|
41
41
|
"@floating-ui/react-dom": "1.0.0",
|
|
42
|
-
"@radix-ui/react-dropdown-menu": "
|
|
42
|
+
"@radix-ui/react-dropdown-menu": "2.0.4",
|
|
43
43
|
"@use-gesture/react": "^10.2.24",
|
|
44
|
-
"@wordpress/a11y": "^3.
|
|
45
|
-
"@wordpress/compose": "^6.
|
|
46
|
-
"@wordpress/date": "^4.
|
|
47
|
-
"@wordpress/deprecated": "^3.
|
|
48
|
-
"@wordpress/dom": "^3.
|
|
49
|
-
"@wordpress/element": "^5.
|
|
50
|
-
"@wordpress/escape-html": "^2.
|
|
51
|
-
"@wordpress/hooks": "^3.
|
|
52
|
-
"@wordpress/html-entities": "^3.
|
|
53
|
-
"@wordpress/i18n": "^4.
|
|
54
|
-
"@wordpress/icons": "^9.
|
|
55
|
-
"@wordpress/is-shallow-equal": "^4.
|
|
56
|
-
"@wordpress/keycodes": "^3.
|
|
57
|
-
"@wordpress/primitives": "^3.
|
|
58
|
-
"@wordpress/private-apis": "^0.
|
|
59
|
-
"@wordpress/rich-text": "^6.
|
|
60
|
-
"@wordpress/warning": "^2.
|
|
44
|
+
"@wordpress/a11y": "^3.39.0",
|
|
45
|
+
"@wordpress/compose": "^6.16.0",
|
|
46
|
+
"@wordpress/date": "^4.39.0",
|
|
47
|
+
"@wordpress/deprecated": "^3.39.0",
|
|
48
|
+
"@wordpress/dom": "^3.39.0",
|
|
49
|
+
"@wordpress/element": "^5.16.0",
|
|
50
|
+
"@wordpress/escape-html": "^2.39.0",
|
|
51
|
+
"@wordpress/hooks": "^3.39.0",
|
|
52
|
+
"@wordpress/html-entities": "^3.39.0",
|
|
53
|
+
"@wordpress/i18n": "^4.39.0",
|
|
54
|
+
"@wordpress/icons": "^9.30.0",
|
|
55
|
+
"@wordpress/is-shallow-equal": "^4.39.0",
|
|
56
|
+
"@wordpress/keycodes": "^3.39.0",
|
|
57
|
+
"@wordpress/primitives": "^3.37.0",
|
|
58
|
+
"@wordpress/private-apis": "^0.21.0",
|
|
59
|
+
"@wordpress/rich-text": "^6.16.0",
|
|
60
|
+
"@wordpress/warning": "^2.39.0",
|
|
61
61
|
"change-case": "^4.1.2",
|
|
62
62
|
"classnames": "^2.3.1",
|
|
63
63
|
"colord": "^2.7.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"dom-scroll-into-view": "^1.2.1",
|
|
67
67
|
"downshift": "^6.0.15",
|
|
68
68
|
"fast-deep-equal": "^3.1.3",
|
|
69
|
-
"framer-motion": "
|
|
69
|
+
"framer-motion": "^10.13.0",
|
|
70
70
|
"gradient-parser": "^0.1.5",
|
|
71
71
|
"highlight-words-core": "^1.2.2",
|
|
72
72
|
"is-plain-object": "^5.0.0",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"publishConfig": {
|
|
88
88
|
"access": "public"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "b898cf1dc8e70841d1647ea0994ac6278acc18a7"
|
|
91
91
|
}
|
|
@@ -30,12 +30,8 @@ import type { DropdownProps as DropdownComponentProps } from '../../dropdown/typ
|
|
|
30
30
|
import type { ColorProps, DropdownProps } from '../types';
|
|
31
31
|
|
|
32
32
|
const getAriaLabelColorValue = ( colorValue: string ) => {
|
|
33
|
-
const isHex = colorValue.startsWith( '#' );
|
|
34
|
-
|
|
35
33
|
// Leave hex values as-is. Remove the `var()` wrapper from CSS vars.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return isHex ? displayValue.split( '' ).join( '-' ) : displayValue;
|
|
34
|
+
return colorValue.replace( /^var\((.+)\)$/, '$1' );
|
|
39
35
|
};
|
|
40
36
|
|
|
41
37
|
const getColorObject = (
|
|
@@ -79,14 +75,14 @@ const getToggleAriaLabel = (
|
|
|
79
75
|
const ariaLabelValue = getAriaLabelColorValue( colorObject.color );
|
|
80
76
|
return style
|
|
81
77
|
? sprintf(
|
|
82
|
-
// translators: %1$s: The name of the color e.g. "vivid red". %2$s: The color's hex code
|
|
78
|
+
// translators: %1$s: The name of the color e.g. "vivid red". %2$s: The color's hex code e.g.: "#f00:". %3$s: The current border style selection e.g. "solid".
|
|
83
79
|
'Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s". The currently selected style is "%3$s".',
|
|
84
80
|
colorObject.name,
|
|
85
81
|
ariaLabelValue,
|
|
86
82
|
style
|
|
87
83
|
)
|
|
88
84
|
: sprintf(
|
|
89
|
-
// translators: %1$s: The name of the color e.g. "vivid red". %2$s: The color's hex code
|
|
85
|
+
// translators: %1$s: The name of the color e.g. "vivid red". %2$s: The color's hex code e.g.: "#f00:".
|
|
90
86
|
'Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s".',
|
|
91
87
|
colorObject.name,
|
|
92
88
|
ariaLabelValue
|
|
@@ -97,13 +93,13 @@ const getToggleAriaLabel = (
|
|
|
97
93
|
const ariaLabelValue = getAriaLabelColorValue( colorValue );
|
|
98
94
|
return style
|
|
99
95
|
? sprintf(
|
|
100
|
-
// translators: %1$s: The color's hex code
|
|
96
|
+
// translators: %1$s: The color's hex code e.g.: "#f00:". %2$s: The current border style selection e.g. "solid".
|
|
101
97
|
'Border color and style picker. The currently selected color has a value of "%1$s". The currently selected style is "%2$s".',
|
|
102
98
|
ariaLabelValue,
|
|
103
99
|
style
|
|
104
100
|
)
|
|
105
101
|
: sprintf(
|
|
106
|
-
// translators: %1$s: The color's hex code
|
|
102
|
+
// translators: %1$s: The color's hex code e.g: "#f00".
|
|
107
103
|
'Border color and style picker. The currently selected color has a value of "%1$s".',
|
|
108
104
|
ariaLabelValue
|
|
109
105
|
);
|
|
@@ -114,7 +110,7 @@ const getToggleAriaLabel = (
|
|
|
114
110
|
|
|
115
111
|
if ( colorObject ) {
|
|
116
112
|
return sprintf(
|
|
117
|
-
// translators: %1$s: The name of the color e.g. "vivid red". %2$s: The color's hex code
|
|
113
|
+
// translators: %1$s: The name of the color e.g. "vivid red". %2$s: The color's hex code e.g: "#f00".
|
|
118
114
|
'Border color picker. The currently selected color is called "%1$s" and has a value of "%2$s".',
|
|
119
115
|
colorObject.name,
|
|
120
116
|
getAriaLabelColorValue( colorObject.color )
|
|
@@ -123,7 +119,7 @@ const getToggleAriaLabel = (
|
|
|
123
119
|
|
|
124
120
|
if ( colorValue ) {
|
|
125
121
|
return sprintf(
|
|
126
|
-
// translators: %1$s: The color's hex code
|
|
122
|
+
// translators: %1$s: The color's hex code e.g: "#f00".
|
|
127
123
|
'Border color picker. The currently selected color has a value of "%1$s".',
|
|
128
124
|
getAriaLabelColorValue( colorValue )
|
|
129
125
|
);
|
|
@@ -215,7 +215,7 @@ describe( 'BorderControl', () => {
|
|
|
215
215
|
|
|
216
216
|
expect(
|
|
217
217
|
screen.getByLabelText(
|
|
218
|
-
'Border color and style picker. The currently selected color is called "Blue" and has a value of "
|
|
218
|
+
'Border color and style picker. The currently selected color is called "Blue" and has a value of "#72aee6".'
|
|
219
219
|
)
|
|
220
220
|
).toBeInTheDocument();
|
|
221
221
|
} );
|
|
@@ -226,7 +226,7 @@ describe( 'BorderControl', () => {
|
|
|
226
226
|
|
|
227
227
|
expect(
|
|
228
228
|
screen.getByLabelText(
|
|
229
|
-
'Border color and style picker. The currently selected color has a value of "
|
|
229
|
+
'Border color and style picker. The currently selected color has a value of "#4b1d80".'
|
|
230
230
|
)
|
|
231
231
|
).toBeInTheDocument();
|
|
232
232
|
} );
|
|
@@ -239,7 +239,7 @@ describe( 'BorderControl', () => {
|
|
|
239
239
|
|
|
240
240
|
expect(
|
|
241
241
|
screen.getByLabelText(
|
|
242
|
-
'Border color and style picker. The currently selected color is called "Blue" and has a value of "
|
|
242
|
+
'Border color and style picker. The currently selected color is called "Blue" and has a value of "#72aee6". The currently selected style is "dotted".'
|
|
243
243
|
)
|
|
244
244
|
).toBeInTheDocument();
|
|
245
245
|
} );
|
|
@@ -252,7 +252,7 @@ describe( 'BorderControl', () => {
|
|
|
252
252
|
|
|
253
253
|
expect(
|
|
254
254
|
screen.getByLabelText(
|
|
255
|
-
'Border color and style picker. The currently selected color has a value of "
|
|
255
|
+
'Border color and style picker. The currently selected color has a value of "#4b1d80". The currently selected style is "dashed".'
|
|
256
256
|
)
|
|
257
257
|
).toBeInTheDocument();
|
|
258
258
|
} );
|
|
@@ -280,7 +280,7 @@ describe( 'BorderControl', () => {
|
|
|
280
280
|
|
|
281
281
|
expect(
|
|
282
282
|
screen.getByLabelText(
|
|
283
|
-
'Border color picker. The currently selected color is called "Blue" and has a value of "
|
|
283
|
+
'Border color picker. The currently selected color is called "Blue" and has a value of "#72aee6".'
|
|
284
284
|
)
|
|
285
285
|
).toBeInTheDocument();
|
|
286
286
|
} );
|
|
@@ -294,7 +294,7 @@ describe( 'BorderControl', () => {
|
|
|
294
294
|
|
|
295
295
|
expect(
|
|
296
296
|
screen.getByLabelText(
|
|
297
|
-
'Border color picker. The currently selected color has a value of "
|
|
297
|
+
'Border color picker. The currently selected color has a value of "#4b1d80".'
|
|
298
298
|
)
|
|
299
299
|
).toBeInTheDocument();
|
|
300
300
|
} );
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
*/
|
|
25
25
|
import Tooltip from '../tooltip';
|
|
26
26
|
import Icon from '../icon';
|
|
27
|
+
import style from './style.scss';
|
|
27
28
|
|
|
28
29
|
const isAndroid = Platform.OS === 'android';
|
|
29
30
|
const marginBottom = isAndroid ? -0.5 : 0;
|
|
@@ -51,8 +52,6 @@ const styles = StyleSheet.create( {
|
|
|
51
52
|
justifyContent: 'center',
|
|
52
53
|
alignItems: 'center',
|
|
53
54
|
borderRadius: 6,
|
|
54
|
-
borderColor: '#2e4453',
|
|
55
|
-
backgroundColor: '#2e4453',
|
|
56
55
|
},
|
|
57
56
|
subscriptInactive: {
|
|
58
57
|
color: '#7b9ab1', // $toolbar-button.
|
|
@@ -95,6 +94,7 @@ export function Button( props ) {
|
|
|
95
94
|
tooltipPosition,
|
|
96
95
|
isActiveStyle,
|
|
97
96
|
customContainerStyles,
|
|
97
|
+
hitSlop,
|
|
98
98
|
} = props;
|
|
99
99
|
const preferredColorScheme = usePreferredColorScheme();
|
|
100
100
|
|
|
@@ -105,10 +105,16 @@ export function Button( props ) {
|
|
|
105
105
|
customContainerStyles && { ...customContainerStyles },
|
|
106
106
|
];
|
|
107
107
|
|
|
108
|
+
const buttonActiveColorStyles = usePreferredColorSchemeStyle(
|
|
109
|
+
style[ 'components-button-light--active' ],
|
|
110
|
+
style[ 'components-button-dark--active' ]
|
|
111
|
+
);
|
|
112
|
+
|
|
108
113
|
const buttonViewStyle = {
|
|
109
114
|
opacity: isDisabled ? 0.3 : 1,
|
|
110
115
|
...( fixedRatio && styles.fixedRatio ),
|
|
111
116
|
...( isPressed ? styles.buttonActive : styles.buttonInactive ),
|
|
117
|
+
...( isPressed ? buttonActiveColorStyles : {} ),
|
|
112
118
|
...( isPressed &&
|
|
113
119
|
isActiveStyle?.borderRadius && {
|
|
114
120
|
borderRadius: isActiveStyle.borderRadius,
|
|
@@ -158,7 +164,6 @@ export function Button( props ) {
|
|
|
158
164
|
|
|
159
165
|
const newIcon = icon
|
|
160
166
|
? cloneElement( <Icon icon={ icon } size={ iconSize } />, {
|
|
161
|
-
colorScheme: preferredColorScheme,
|
|
162
167
|
isPressed,
|
|
163
168
|
} )
|
|
164
169
|
: null;
|
|
@@ -184,6 +189,7 @@ export function Button( props ) {
|
|
|
184
189
|
style={ containerStyle }
|
|
185
190
|
disabled={ isDisabled }
|
|
186
191
|
testID={ testID }
|
|
192
|
+
hitSlop={ hitSlop }
|
|
187
193
|
>
|
|
188
194
|
<LongPressGestureHandler
|
|
189
195
|
minDurationMs={ 500 }
|
|
@@ -224,12 +224,12 @@ function UnforwardedColorPalette(
|
|
|
224
224
|
const displayValue = value?.replace( /^var\((.+)\)$/, '$1' );
|
|
225
225
|
const customColorAccessibleLabel = !! displayValue
|
|
226
226
|
? sprintf(
|
|
227
|
-
// translators: %1$s: The name of the color e.g: "vivid red". %2$s: The color's hex code
|
|
227
|
+
// translators: %1$s: The name of the color e.g: "vivid red". %2$s: The color's hex code e.g: "#f00".
|
|
228
228
|
__(
|
|
229
229
|
'Custom color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'
|
|
230
230
|
),
|
|
231
231
|
buttonLabelName,
|
|
232
|
-
|
|
232
|
+
displayValue
|
|
233
233
|
)
|
|
234
234
|
: __( 'Custom color picker.' );
|
|
235
235
|
|
|
@@ -193,7 +193,7 @@ exports[`ColorPalette should render a dynamic toolbar of colors 1`] = `
|
|
|
193
193
|
<button
|
|
194
194
|
aria-expanded="false"
|
|
195
195
|
aria-haspopup="true"
|
|
196
|
-
aria-label="Custom color picker. The currently selected color is called "red" and has a value of "
|
|
196
|
+
aria-label="Custom color picker. The currently selected color is called "red" and has a value of "#f00"."
|
|
197
197
|
class="components-color-palette__custom-color-button"
|
|
198
198
|
style="background: rgb(255, 0, 0);"
|
|
199
199
|
/>
|
|
@@ -240,11 +240,7 @@ describe( 'ColorPalette', () => {
|
|
|
240
240
|
expect( screen.getByText( EXAMPLE_COLORS[ 0 ].color ) ).toBeVisible();
|
|
241
241
|
expect(
|
|
242
242
|
screen.getByRole( 'button', {
|
|
243
|
-
name: `Custom color picker. The currently selected color is called "${
|
|
244
|
-
EXAMPLE_COLORS[ 0 ].name
|
|
245
|
-
}" and has a value of "${ EXAMPLE_COLORS[ 0 ].color
|
|
246
|
-
.split( '' )
|
|
247
|
-
.join( '-' ) }".`,
|
|
243
|
+
name: `Custom color picker. The currently selected color is called "${ EXAMPLE_COLORS[ 0 ].name }" and has a value of "${ EXAMPLE_COLORS[ 0 ].color }".`,
|
|
248
244
|
expanded: false,
|
|
249
245
|
} )
|
|
250
246
|
).toBeInTheDocument();
|
|
@@ -110,6 +110,10 @@ describe( 'Draggable', () => {
|
|
|
110
110
|
},
|
|
111
111
|
{ state: State.END },
|
|
112
112
|
] );
|
|
113
|
+
// TODO(jest-console): Fix the warning and remove the expect below.
|
|
114
|
+
expect( console ).toHaveWarnedWith(
|
|
115
|
+
'[Reanimated] You can not use setGestureState in non-worklet function.'
|
|
116
|
+
);
|
|
113
117
|
|
|
114
118
|
expect( onDragStart ).toHaveBeenCalledTimes( 1 );
|
|
115
119
|
expect( onDragStart ).toHaveBeenCalledWith( {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { Animated, PanResponder, View } from 'react-native';
|
|
4
|
+
import { Animated, PanResponder, StyleSheet, View } from 'react-native';
|
|
5
5
|
import Video from 'react-native-video';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -164,7 +164,7 @@ function FocalPointPicker( props ) {
|
|
|
164
164
|
},
|
|
165
165
|
];
|
|
166
166
|
const FOCAL_POINT_SIZE = 50;
|
|
167
|
-
const focalPointStyles = [
|
|
167
|
+
const focalPointStyles = StyleSheet.flatten( [
|
|
168
168
|
styles.focalPoint,
|
|
169
169
|
{
|
|
170
170
|
height: FOCAL_POINT_SIZE,
|
|
@@ -172,7 +172,7 @@ function FocalPointPicker( props ) {
|
|
|
172
172
|
marginTop: -( FOCAL_POINT_SIZE / 2 ),
|
|
173
173
|
width: FOCAL_POINT_SIZE,
|
|
174
174
|
},
|
|
175
|
-
];
|
|
175
|
+
] );
|
|
176
176
|
|
|
177
177
|
const onTooltipPress = () => setTooltipVisible( false );
|
|
178
178
|
const onMediaLayout = ( event ) => {
|
|
@@ -243,9 +243,10 @@ function FocalPointPicker( props ) {
|
|
|
243
243
|
yOffset={ -( FOCAL_POINT_SIZE / 2 ) }
|
|
244
244
|
/>
|
|
245
245
|
<FocalPoint
|
|
246
|
-
height={
|
|
246
|
+
height={ focalPointStyles.height }
|
|
247
247
|
style={ focalPointStyles }
|
|
248
|
-
|
|
248
|
+
testID="focal-point-picker-handle"
|
|
249
|
+
width={ focalPointStyles.width }
|
|
249
250
|
/>
|
|
250
251
|
</Animated.View>
|
|
251
252
|
) }
|
|
@@ -9,6 +9,7 @@ import { css } from '@emotion/react';
|
|
|
9
9
|
*/
|
|
10
10
|
import { Flex } from '../flex';
|
|
11
11
|
import { space } from '../ui/utils/space';
|
|
12
|
+
import { boxSizingReset } from '../utils';
|
|
12
13
|
|
|
13
14
|
type TokensAndInputWrapperProps = {
|
|
14
15
|
__next40pxDefaultSize: boolean;
|
|
@@ -27,6 +28,7 @@ const deprecatedPaddings = ( {
|
|
|
27
28
|
|
|
28
29
|
export const TokensAndInputWrapperFlex = styled( Flex )`
|
|
29
30
|
padding: 7px;
|
|
31
|
+
${ boxSizingReset }
|
|
30
32
|
|
|
31
33
|
${ deprecatedPaddings }
|
|
32
34
|
`;
|
|
@@ -42,7 +42,8 @@ export function useItem( props: WordPressComponentProps< ItemProps, 'div' > ) {
|
|
|
42
42
|
const classes = useMemo(
|
|
43
43
|
() =>
|
|
44
44
|
cx(
|
|
45
|
-
as === 'button' &&
|
|
45
|
+
( as === 'button' || as === 'a' ) &&
|
|
46
|
+
styles.unstyledButton( as ),
|
|
46
47
|
styles.itemSizes[ size ] || styles.itemSizes.medium,
|
|
47
48
|
styles.item,
|
|
48
49
|
spacedAround && styles.spacedAround,
|