@wordpress/components 29.6.0 → 29.8.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 +34 -0
- package/build/angle-picker-control/index.js +1 -1
- package/build/angle-picker-control/index.js.map +1 -1
- package/build/autocomplete/index.js +5 -30
- package/build/autocomplete/index.js.map +1 -1
- package/build/custom-select-control-v2/styles.js +9 -9
- package/build/custom-select-control-v2/styles.js.map +1 -1
- package/build/number-control/index.js +6 -4
- package/build/number-control/index.js.map +1 -1
- package/build/popover/index.js +29 -17
- package/build/popover/index.js.map +1 -1
- package/build/popover/types.js.map +1 -1
- package/build/range-control/index.js +6 -5
- package/build/range-control/index.js.map +1 -1
- package/build/toolbar/toolbar-dropdown-menu/index.js +4 -3
- package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
- package/build/toolbar/toolbar-item/index.js +4 -3
- package/build/toolbar/toolbar-item/index.js.map +1 -1
- package/build/utils/get-node-text.js +30 -0
- package/build/utils/get-node-text.js.map +1 -0
- package/build/utils/math.js +18 -15
- package/build/utils/math.js.map +1 -1
- package/build-module/angle-picker-control/index.js +1 -1
- package/build-module/angle-picker-control/index.js.map +1 -1
- package/build-module/autocomplete/index.js +3 -28
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/custom-select-control-v2/styles.js +9 -9
- package/build-module/custom-select-control-v2/styles.js.map +1 -1
- package/build-module/number-control/index.js +7 -5
- package/build-module/number-control/index.js.map +1 -1
- package/build-module/popover/index.js +28 -16
- package/build-module/popover/index.js.map +1 -1
- package/build-module/popover/types.js.map +1 -1
- package/build-module/range-control/index.js +6 -5
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/toolbar/toolbar-dropdown-menu/index.js +3 -2
- package/build-module/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
- package/build-module/toolbar/toolbar-item/index.js +3 -2
- package/build-module/toolbar/toolbar-item/index.js.map +1 -1
- package/build-module/utils/get-node-text.js +24 -0
- package/build-module/utils/get-node-text.js.map +1 -0
- package/build-module/utils/math.js +17 -14
- package/build-module/utils/math.js.map +1 -1
- package/build-style/style-rtl.css +15 -13
- package/build-style/style.css +15 -13
- package/build-types/angle-picker-control/index.d.ts +1 -1
- package/build-types/autocomplete/index.d.ts +2 -2
- package/build-types/autocomplete/index.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
- package/build-types/number-control/index.d.ts.map +1 -1
- package/build-types/popover/index.d.ts +18 -2
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/popover/stories/e2e/index.story.d.ts +8 -1
- package/build-types/popover/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/popover/stories/index.story.d.ts +1 -0
- package/build-types/popover/stories/index.story.d.ts.map +1 -1
- package/build-types/popover/test/utils/index.d.ts.map +1 -1
- package/build-types/popover/types.d.ts +9 -0
- package/build-types/popover/types.d.ts.map +1 -1
- package/build-types/range-control/index.d.ts +6 -5
- package/build-types/range-control/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts +2 -2
- package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-item/index.d.ts +2 -2
- package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
- package/build-types/utils/get-node-text.d.ts +3 -0
- package/build-types/utils/get-node-text.d.ts.map +1 -0
- package/build-types/utils/math.d.ts +10 -11
- package/build-types/utils/math.d.ts.map +1 -1
- package/package.json +20 -20
- package/src/angle-picker-control/README.md +1 -1
- package/src/angle-picker-control/index.tsx +1 -1
- package/src/autocomplete/index.tsx +3 -30
- package/src/button/style.scss +1 -1
- package/src/combobox-control/style.scss +4 -2
- package/src/custom-select-control-v2/styles.ts +1 -0
- package/src/form-token-field/style.scss +6 -6
- package/src/number-control/index.tsx +8 -7
- package/src/number-control/test/index.tsx +15 -2
- package/src/popover/index.tsx +34 -20
- package/src/popover/stories/index.story.tsx +83 -2
- package/src/popover/test/utils/index.tsx +0 -1
- package/src/popover/types.ts +10 -0
- package/src/range-control/index.tsx +6 -5
- package/src/toolbar/toolbar-dropdown-menu/index.tsx +3 -2
- package/src/toolbar/toolbar-item/index.tsx +3 -2
- package/src/utils/get-node-text.ts +24 -0
- package/src/utils/math.js +17 -22
- package/src/utils/test/get-node-text.js +37 -0
- package/src/utils/test/math.js +28 -32
- package/src/utils/theme-variables.scss +0 -4
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","useContext","ToolbarItem","ToolbarContext","DropdownMenu","jsx","_jsx","
|
|
1
|
+
{"version":3,"names":["forwardRef","useContext","ToolbarItem","ToolbarContext","DropdownMenu","jsx","_jsx","UnforwardedToolbarDropdownMenu","props","ref","accessibleToolbarState","toggleProps","children","toolbarItemProps","popoverProps","ToolbarDropdownMenu"],"sources":["@wordpress/components/src/toolbar/toolbar-dropdown-menu/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport ToolbarItem from '../toolbar-item';\nimport ToolbarContext from '../toolbar-context';\nimport DropdownMenu from '../../dropdown-menu';\nimport type { DropdownMenuProps } from '../../dropdown-menu/types';\n\nfunction UnforwardedToolbarDropdownMenu(\n\tprops: DropdownMenuProps,\n\tref: ForwardedRef< any >\n) {\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( ! accessibleToolbarState ) {\n\t\treturn <DropdownMenu { ...props } />;\n\t}\n\n\t// ToolbarItem will pass all props to the render prop child, which will pass\n\t// all props to the toggle of DropdownMenu. This means that ToolbarDropdownMenu\n\t// has the same API as DropdownMenu.\n\treturn (\n\t\t<ToolbarItem ref={ ref } { ...props.toggleProps }>\n\t\t\t{ ( toolbarItemProps ) => (\n\t\t\t\t<DropdownMenu\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tpopoverProps={ {\n\t\t\t\t\t\t...props.popoverProps,\n\t\t\t\t\t} }\n\t\t\t\t\ttoggleProps={ toolbarItemProps }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</ToolbarItem>\n\t);\n}\n\nexport const ToolbarDropdownMenu = forwardRef( UnforwardedToolbarDropdownMenu );\nexport default ToolbarDropdownMenu;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,UAAU,EAAEC,UAAU,QAAQ,oBAAoB;;AAE3D;AACA;AACA;;AAGA;AACA;AACA;AACA,OAAOC,WAAW,MAAM,iBAAiB;AACzC,OAAOC,cAAc,MAAM,oBAAoB;AAC/C,OAAOC,YAAY,MAAM,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAG/C,SAASC,8BAA8BA,CACtCC,KAAwB,EACxBC,GAAwB,EACvB;EACD,MAAMC,sBAAsB,GAAGT,UAAU,CAAEE,cAAe,CAAC;EAE3D,IAAK,CAAEO,sBAAsB,EAAG;IAC/B,oBAAOJ,IAAA,CAACF,YAAY;MAAA,GAAMI;IAAK,CAAI,CAAC;EACrC;;EAEA;EACA;EACA;EACA,oBACCF,IAAA,CAACJ,WAAW;IAACO,GAAG,EAAGA,GAAK;IAAA,GAAMD,KAAK,CAACG,WAAW;IAAAC,QAAA,EAC1CC,gBAAgB,iBACnBP,IAAA,CAACF,YAAY;MAAA,GACPI,KAAK;MACVM,YAAY,EAAG;QACd,GAAGN,KAAK,CAACM;MACV,CAAG;MACHH,WAAW,EAAGE;IAAkB,CAChC;EACD,CACW,CAAC;AAEhB;AAEA,OAAO,MAAME,mBAAmB,GAAGf,UAAU,CAAEO,8BAA+B,CAAC;AAC/E,eAAeQ,mBAAmB","ignoreList":[]}
|
|
@@ -13,7 +13,7 @@ import warning from '@wordpress/warning';
|
|
|
13
13
|
*/
|
|
14
14
|
import ToolbarContext from '../toolbar-context';
|
|
15
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
-
function
|
|
16
|
+
function UnforwardedToolbarItem({
|
|
17
17
|
children,
|
|
18
18
|
as: Component,
|
|
19
19
|
...props
|
|
@@ -51,5 +51,6 @@ function ToolbarItem({
|
|
|
51
51
|
render: render
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
export
|
|
54
|
+
export const ToolbarItem = forwardRef(UnforwardedToolbarItem);
|
|
55
|
+
export default ToolbarItem;
|
|
55
56
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Ariakit","forwardRef","useContext","warning","ToolbarContext","jsx","_jsx","
|
|
1
|
+
{"version":3,"names":["Ariakit","forwardRef","useContext","warning","ToolbarContext","jsx","_jsx","UnforwardedToolbarItem","children","as","Component","props","ref","accessibleToolbarStore","isRenderProp","globalThis","SCRIPT_DEBUG","allProps","render","ToolbarItem","accessibleWhenDisabled","store"],"sources":["@wordpress/components/src/toolbar/toolbar-item/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport ToolbarContext from '../toolbar-context';\nimport type { ToolbarItemProps } from './types';\n\nfunction UnforwardedToolbarItem(\n\t{ children, as: Component, ...props }: ToolbarItemProps,\n\tref: ForwardedRef< any >\n) {\n\tconst accessibleToolbarStore = useContext( ToolbarContext );\n\tconst isRenderProp = typeof children === 'function';\n\n\tif ( ! isRenderProp && ! Component ) {\n\t\twarning(\n\t\t\t'`ToolbarItem` is a generic headless component. You must pass either a `children` prop as a function or an `as` prop as a component. ' +\n\t\t\t\t'See https://developer.wordpress.org/block-editor/components/toolbar-item/'\n\t\t);\n\t\treturn null;\n\t}\n\n\tconst allProps = { ...props, ref, 'data-toolbar-item': true };\n\n\tif ( ! accessibleToolbarStore ) {\n\t\tif ( Component ) {\n\t\t\treturn <Component { ...allProps }>{ children }</Component>;\n\t\t}\n\t\tif ( ! isRenderProp ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn children( allProps );\n\t}\n\n\tconst render = isRenderProp\n\t\t? children\n\t\t: Component && <Component>{ children }</Component>;\n\n\treturn (\n\t\t<Ariakit.ToolbarItem\n\t\t\taccessibleWhenDisabled\n\t\t\t{ ...allProps }\n\t\t\tstore={ accessibleToolbarStore }\n\t\t\trender={ render }\n\t\t/>\n\t);\n}\n\nexport const ToolbarItem = forwardRef( UnforwardedToolbarItem );\nexport default ToolbarItem;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;AAGzC;AACA;AACA;AACA,SAASC,UAAU,EAAEC,UAAU,QAAQ,oBAAoB;AAC3D,OAAOC,OAAO,MAAM,oBAAoB;;AAExC;AACA;AACA;AACA,OAAOC,cAAc,MAAM,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGhD,SAASC,sBAAsBA,CAC9B;EAAEC,QAAQ;EAAEC,EAAE,EAAEC,SAAS;EAAE,GAAGC;AAAwB,CAAC,EACvDC,GAAwB,EACvB;EACD,MAAMC,sBAAsB,GAAGX,UAAU,CAAEE,cAAe,CAAC;EAC3D,MAAMU,YAAY,GAAG,OAAON,QAAQ,KAAK,UAAU;EAEnD,IAAK,CAAEM,YAAY,IAAI,CAAEJ,SAAS,EAAG;IACpCK,UAAA,CAAAC,YAAA,YAAAb,OAAO,CACN,sIAAsI,GACrI,2EACF,CAAC;IACD,OAAO,IAAI;EACZ;EAEA,MAAMc,QAAQ,GAAG;IAAE,GAAGN,KAAK;IAAEC,GAAG;IAAE,mBAAmB,EAAE;EAAK,CAAC;EAE7D,IAAK,CAAEC,sBAAsB,EAAG;IAC/B,IAAKH,SAAS,EAAG;MAChB,oBAAOJ,IAAA,CAACI,SAAS;QAAA,GAAMO,QAAQ;QAAAT,QAAA,EAAKA;MAAQ,CAAa,CAAC;IAC3D;IACA,IAAK,CAAEM,YAAY,EAAG;MACrB,OAAO,IAAI;IACZ;IACA,OAAON,QAAQ,CAAES,QAAS,CAAC;EAC5B;EAEA,MAAMC,MAAM,GAAGJ,YAAY,GACxBN,QAAQ,GACRE,SAAS,iBAAIJ,IAAA,CAACI,SAAS;IAAAF,QAAA,EAAGA;EAAQ,CAAa,CAAC;EAEnD,oBACCF,IAAA,CAACN,OAAO,CAACmB,WAAW;IACnBC,sBAAsB;IAAA,GACjBH,QAAQ;IACbI,KAAK,EAAGR,sBAAwB;IAChCK,MAAM,EAAGA;EAAQ,CACjB,CAAC;AAEJ;AAEA,OAAO,MAAMC,WAAW,GAAGlB,UAAU,CAAEM,sBAAuB,CAAC;AAC/D,eAAeY,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const getNodeText = node => {
|
|
2
|
+
if (node === null) {
|
|
3
|
+
return '';
|
|
4
|
+
}
|
|
5
|
+
switch (typeof node) {
|
|
6
|
+
case 'string':
|
|
7
|
+
case 'number':
|
|
8
|
+
return node.toString();
|
|
9
|
+
case 'object':
|
|
10
|
+
{
|
|
11
|
+
if (node instanceof Array) {
|
|
12
|
+
return node.map(getNodeText).join('');
|
|
13
|
+
}
|
|
14
|
+
if ('props' in node) {
|
|
15
|
+
return getNodeText(node.props.children);
|
|
16
|
+
}
|
|
17
|
+
return '';
|
|
18
|
+
}
|
|
19
|
+
default:
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
export default getNodeText;
|
|
24
|
+
//# sourceMappingURL=get-node-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getNodeText","node","toString","Array","map","join","props","children"],"sources":["@wordpress/components/src/utils/get-node-text.ts"],"sourcesContent":["const getNodeText = ( node: React.ReactNode ): string => {\n\tif ( node === null ) {\n\t\treturn '';\n\t}\n\n\tswitch ( typeof node ) {\n\t\tcase 'string':\n\t\tcase 'number':\n\t\t\treturn node.toString();\n\t\tcase 'object': {\n\t\t\tif ( node instanceof Array ) {\n\t\t\t\treturn node.map( getNodeText ).join( '' );\n\t\t\t}\n\t\t\tif ( 'props' in node ) {\n\t\t\t\treturn getNodeText( node.props.children );\n\t\t\t}\n\t\t\treturn '';\n\t\t}\n\t\tdefault:\n\t\t\treturn '';\n\t}\n};\n\nexport default getNodeText;\n"],"mappings":"AAAA,MAAMA,WAAW,GAAKC,IAAqB,IAAc;EACxD,IAAKA,IAAI,KAAK,IAAI,EAAG;IACpB,OAAO,EAAE;EACV;EAEA,QAAS,OAAOA,IAAI;IACnB,KAAK,QAAQ;IACb,KAAK,QAAQ;MACZ,OAAOA,IAAI,CAACC,QAAQ,CAAC,CAAC;IACvB,KAAK,QAAQ;MAAE;QACd,IAAKD,IAAI,YAAYE,KAAK,EAAG;UAC5B,OAAOF,IAAI,CAACG,GAAG,CAAEJ,WAAY,CAAC,CAACK,IAAI,CAAE,EAAG,CAAC;QAC1C;QACA,IAAK,OAAO,IAAIJ,IAAI,EAAG;UACtB,OAAOD,WAAW,CAAEC,IAAI,CAACK,KAAK,CAACC,QAAS,CAAC;QAC1C;QACA,OAAO,EAAE;MACV;IACA;MACC,OAAO,EAAE;EACX;AACD,CAAC;AAED,eAAeP,WAAW","ignoreList":[]}
|
|
@@ -52,9 +52,9 @@ function getPrecision(value) {
|
|
|
52
52
|
/**
|
|
53
53
|
* Clamps a value based on a min/max range.
|
|
54
54
|
*
|
|
55
|
-
* @param {number} value The value.
|
|
56
|
-
* @param {number}
|
|
57
|
-
* @param {number}
|
|
55
|
+
* @param {number|string} value The value.
|
|
56
|
+
* @param {number} min The minimum range.
|
|
57
|
+
* @param {number} max The maximum range.
|
|
58
58
|
*
|
|
59
59
|
* @return {number} The clamped value.
|
|
60
60
|
*/
|
|
@@ -64,21 +64,24 @@ export function clamp(value, min, max) {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
|
-
*
|
|
67
|
+
* Rounds a value to the nearest step offset by a minimum.
|
|
68
68
|
*
|
|
69
|
-
* @param {number
|
|
70
|
-
* @param {number}
|
|
71
|
-
* @param {number}
|
|
72
|
-
* @param {number} step A multiplier for the value.
|
|
69
|
+
* @param {number|string} value The value.
|
|
70
|
+
* @param {number} min The minimum range.
|
|
71
|
+
* @param {number} step The increment for the value.
|
|
73
72
|
*
|
|
74
|
-
* @return {number} The
|
|
73
|
+
* @return {number} The value as a valid step.
|
|
75
74
|
*/
|
|
76
|
-
export function
|
|
75
|
+
export function ensureValidStep(value, min, step) {
|
|
77
76
|
const baseValue = getNumber(value);
|
|
78
77
|
const stepValue = getNumber(step);
|
|
79
|
-
const precision = getPrecision(step);
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
const precision = Math.max(getPrecision(step), getPrecision(min));
|
|
79
|
+
const realMin = Math.abs(min) === Infinity ? 0 : min;
|
|
80
|
+
// If the step is not a factor of the minimum then the step must be
|
|
81
|
+
// offset by the minimum.
|
|
82
|
+
const tare = realMin % stepValue ? realMin : 0;
|
|
83
|
+
const rounded = Math.round((baseValue - tare) / stepValue) * stepValue;
|
|
84
|
+
const fromMin = rounded + tare;
|
|
85
|
+
return precision ? getNumber(fromMin.toFixed(precision)) : fromMin;
|
|
83
86
|
}
|
|
84
87
|
//# sourceMappingURL=math.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getNumber","value","number","Number","isNaN","add","args","reduce","sum","arg","subtract","diff","index","getPrecision","split","undefined","length","clamp","min","max","baseValue","Math","
|
|
1
|
+
{"version":3,"names":["getNumber","value","number","Number","isNaN","add","args","reduce","sum","arg","subtract","diff","index","getPrecision","split","undefined","length","clamp","min","max","baseValue","Math","ensureValidStep","step","stepValue","precision","realMin","abs","Infinity","tare","rounded","round","fromMin","toFixed"],"sources":["@wordpress/components/src/utils/math.js"],"sourcesContent":["/**\n * Parses and retrieves a number value.\n *\n * @param {unknown} value The incoming value.\n *\n * @return {number} The parsed number value.\n */\nexport function getNumber( value ) {\n\tconst number = Number( value );\n\n\treturn isNaN( number ) ? 0 : number;\n}\n\n/**\n * Safely adds 2 values.\n *\n * @param {Array<number|string>} args Values to add together.\n *\n * @return {number} The sum of values.\n */\nexport function add( ...args ) {\n\treturn args.reduce(\n\t\t/** @type {(sum:number, arg: number|string) => number} */\n\t\t( sum, arg ) => sum + getNumber( arg ),\n\t\t0\n\t);\n}\n\n/**\n * Safely subtracts 2 values.\n *\n * @param {Array<number|string>} args Values to subtract together.\n *\n * @return {number} The difference of the values.\n */\nexport function subtract( ...args ) {\n\treturn args.reduce(\n\t\t/** @type {(diff:number, arg: number|string, index:number) => number} */\n\t\t( diff, arg, index ) => {\n\t\t\tconst value = getNumber( arg );\n\t\t\treturn index === 0 ? value : diff - value;\n\t\t},\n\t\t0\n\t);\n}\n\n/**\n * Determines the decimal position of a number value.\n *\n * @param {number} value The number to evaluate.\n *\n * @return {number} The number of decimal places.\n */\nfunction getPrecision( value ) {\n\tconst split = ( value + '' ).split( '.' );\n\treturn split[ 1 ] !== undefined ? split[ 1 ].length : 0;\n}\n\n/**\n * Clamps a value based on a min/max range.\n *\n * @param {number|string} value The value.\n * @param {number} min The minimum range.\n * @param {number} max The maximum range.\n *\n * @return {number} The clamped value.\n */\nexport function clamp( value, min, max ) {\n\tconst baseValue = getNumber( value );\n\treturn Math.max( min, Math.min( baseValue, max ) );\n}\n\n/**\n * Rounds a value to the nearest step offset by a minimum.\n *\n * @param {number|string} value The value.\n * @param {number} min The minimum range.\n * @param {number} step The increment for the value.\n *\n * @return {number} The value as a valid step.\n */\nexport function ensureValidStep( value, min, step ) {\n\tconst baseValue = getNumber( value );\n\tconst stepValue = getNumber( step );\n\tconst precision = Math.max( getPrecision( step ), getPrecision( min ) );\n\tconst realMin = Math.abs( min ) === Infinity ? 0 : min;\n\t// If the step is not a factor of the minimum then the step must be\n\t// offset by the minimum.\n\tconst tare = realMin % stepValue ? realMin : 0;\n\tconst rounded = Math.round( ( baseValue - tare ) / stepValue ) * stepValue;\n\tconst fromMin = rounded + tare;\n\treturn precision ? getNumber( fromMin.toFixed( precision ) ) : fromMin;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,SAASA,CAAEC,KAAK,EAAG;EAClC,MAAMC,MAAM,GAAGC,MAAM,CAAEF,KAAM,CAAC;EAE9B,OAAOG,KAAK,CAAEF,MAAO,CAAC,GAAG,CAAC,GAAGA,MAAM;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,GAAGA,CAAE,GAAGC,IAAI,EAAG;EAC9B,OAAOA,IAAI,CAACC,MAAM,CACjB;EACA,CAAEC,GAAG,EAAEC,GAAG,KAAMD,GAAG,GAAGR,SAAS,CAAES,GAAI,CAAC,EACtC,CACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,QAAQA,CAAE,GAAGJ,IAAI,EAAG;EACnC,OAAOA,IAAI,CAACC,MAAM,CACjB;EACA,CAAEI,IAAI,EAAEF,GAAG,EAAEG,KAAK,KAAM;IACvB,MAAMX,KAAK,GAAGD,SAAS,CAAES,GAAI,CAAC;IAC9B,OAAOG,KAAK,KAAK,CAAC,GAAGX,KAAK,GAAGU,IAAI,GAAGV,KAAK;EAC1C,CAAC,EACD,CACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASY,YAAYA,CAAEZ,KAAK,EAAG;EAC9B,MAAMa,KAAK,GAAG,CAAEb,KAAK,GAAG,EAAE,EAAGa,KAAK,CAAE,GAAI,CAAC;EACzC,OAAOA,KAAK,CAAE,CAAC,CAAE,KAAKC,SAAS,GAAGD,KAAK,CAAE,CAAC,CAAE,CAACE,MAAM,GAAG,CAAC;AACxD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,KAAKA,CAAEhB,KAAK,EAAEiB,GAAG,EAAEC,GAAG,EAAG;EACxC,MAAMC,SAAS,GAAGpB,SAAS,CAAEC,KAAM,CAAC;EACpC,OAAOoB,IAAI,CAACF,GAAG,CAAED,GAAG,EAAEG,IAAI,CAACH,GAAG,CAAEE,SAAS,EAAED,GAAI,CAAE,CAAC;AACnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,eAAeA,CAAErB,KAAK,EAAEiB,GAAG,EAAEK,IAAI,EAAG;EACnD,MAAMH,SAAS,GAAGpB,SAAS,CAAEC,KAAM,CAAC;EACpC,MAAMuB,SAAS,GAAGxB,SAAS,CAAEuB,IAAK,CAAC;EACnC,MAAME,SAAS,GAAGJ,IAAI,CAACF,GAAG,CAAEN,YAAY,CAAEU,IAAK,CAAC,EAAEV,YAAY,CAAEK,GAAI,CAAE,CAAC;EACvE,MAAMQ,OAAO,GAAGL,IAAI,CAACM,GAAG,CAAET,GAAI,CAAC,KAAKU,QAAQ,GAAG,CAAC,GAAGV,GAAG;EACtD;EACA;EACA,MAAMW,IAAI,GAAGH,OAAO,GAAGF,SAAS,GAAGE,OAAO,GAAG,CAAC;EAC9C,MAAMI,OAAO,GAAGT,IAAI,CAACU,KAAK,CAAE,CAAEX,SAAS,GAAGS,IAAI,IAAKL,SAAU,CAAC,GAAGA,SAAS;EAC1E,MAAMQ,OAAO,GAAGF,OAAO,GAAGD,IAAI;EAC9B,OAAOJ,SAAS,GAAGzB,SAAS,CAAEgC,OAAO,CAACC,OAAO,CAAER,SAAU,CAAE,CAAC,GAAGO,OAAO;AACvE","ignoreList":[]}
|
|
@@ -396,7 +396,7 @@
|
|
|
396
396
|
color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
397
397
|
background: transparent;
|
|
398
398
|
}
|
|
399
|
-
.components-button.is-tertiary:hover:not(:disabled, [aria-disabled=true]) {
|
|
399
|
+
.components-button.is-tertiary:hover:not(:disabled, [aria-disabled=true], .is-pressed) {
|
|
400
400
|
background: color-mix(in srgb, var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)) 4%, transparent);
|
|
401
401
|
color: var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6));
|
|
402
402
|
}
|
|
@@ -894,6 +894,8 @@ input.components-combobox-control__input[type=text] {
|
|
|
894
894
|
margin: 0;
|
|
895
895
|
line-height: inherit;
|
|
896
896
|
min-height: auto;
|
|
897
|
+
background: var(--wp-components-color-background, #fff);
|
|
898
|
+
color: var(--wp-components-color-foreground, #1e1e1e);
|
|
897
899
|
}
|
|
898
900
|
@media (min-width: 600px) {
|
|
899
901
|
input.components-combobox-control__input[type=text] {
|
|
@@ -934,8 +936,8 @@ input.components-combobox-control__input[type=text]:focus {
|
|
|
934
936
|
}
|
|
935
937
|
}
|
|
936
938
|
.components-combobox-control__suggestions-container:focus {
|
|
937
|
-
border-color: var(--wp-admin-theme-color);
|
|
938
|
-
box-shadow: 0 0 0 0.5px var(--wp-admin-theme-color);
|
|
939
|
+
border-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
940
|
+
box-shadow: 0 0 0 0.5px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
939
941
|
outline: 2px solid transparent;
|
|
940
942
|
}
|
|
941
943
|
.components-combobox-control__suggestions-container::-webkit-input-placeholder {
|
|
@@ -948,8 +950,8 @@ input.components-combobox-control__input[type=text]:focus {
|
|
|
948
950
|
color: rgba(30, 30, 30, 0.62);
|
|
949
951
|
}
|
|
950
952
|
.components-combobox-control__suggestions-container:focus-within {
|
|
951
|
-
border-color: var(--wp-admin-theme-color);
|
|
952
|
-
box-shadow: 0 0 0 0.5px var(--wp-admin-theme-color);
|
|
953
|
+
border-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
954
|
+
box-shadow: 0 0 0 0.5px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
953
955
|
outline: 2px solid transparent;
|
|
954
956
|
}
|
|
955
957
|
.components-combobox-control__suggestions-container .components-spinner {
|
|
@@ -1450,8 +1452,8 @@ body.is-dragging-components-draggable {
|
|
|
1450
1452
|
}
|
|
1451
1453
|
}
|
|
1452
1454
|
.components-form-token-field__input-container:focus {
|
|
1453
|
-
border-color: var(--wp-admin-theme-color);
|
|
1454
|
-
box-shadow: 0 0 0 0.5px var(--wp-admin-theme-color);
|
|
1455
|
+
border-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1456
|
+
box-shadow: 0 0 0 0.5px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1455
1457
|
outline: 2px solid transparent;
|
|
1456
1458
|
}
|
|
1457
1459
|
.components-form-token-field__input-container::-webkit-input-placeholder {
|
|
@@ -1468,8 +1470,8 @@ body.is-dragging-components-draggable {
|
|
|
1468
1470
|
border-color: #ddd;
|
|
1469
1471
|
}
|
|
1470
1472
|
.components-form-token-field__input-container.is-active {
|
|
1471
|
-
border-color: var(--wp-admin-theme-color);
|
|
1472
|
-
box-shadow: 0 0 0 0.5px var(--wp-admin-theme-color);
|
|
1473
|
+
border-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1474
|
+
box-shadow: 0 0 0 0.5px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1473
1475
|
outline: 2px solid transparent;
|
|
1474
1476
|
}
|
|
1475
1477
|
.components-form-token-field__input-container input[type=text].components-form-token-field__input {
|
|
@@ -1485,7 +1487,7 @@ body.is-dragging-components-draggable {
|
|
|
1485
1487
|
min-width: 50px;
|
|
1486
1488
|
background: inherit;
|
|
1487
1489
|
border: 0;
|
|
1488
|
-
color: #1e1e1e;
|
|
1490
|
+
color: var(--wp-components-color-foreground, #1e1e1e);
|
|
1489
1491
|
box-shadow: none;
|
|
1490
1492
|
}
|
|
1491
1493
|
@media (min-width: 600px) {
|
|
@@ -1597,7 +1599,7 @@ body.is-dragging-components-draggable {
|
|
|
1597
1599
|
}
|
|
1598
1600
|
|
|
1599
1601
|
.components-form-token-field__suggestion {
|
|
1600
|
-
color: #1e1e1e;
|
|
1602
|
+
color: var(--wp-components-color-foreground, #1e1e1e);
|
|
1601
1603
|
display: block;
|
|
1602
1604
|
font-size: 13px;
|
|
1603
1605
|
padding: 8px 12px;
|
|
@@ -1607,14 +1609,14 @@ body.is-dragging-components-draggable {
|
|
|
1607
1609
|
}
|
|
1608
1610
|
.components-form-token-field__suggestion.is-selected {
|
|
1609
1611
|
background: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1610
|
-
color: #fff;
|
|
1612
|
+
color: var(--wp-components-color-foreground-inverted, #fff);
|
|
1611
1613
|
}
|
|
1612
1614
|
.components-form-token-field__suggestion[aria-disabled=true] {
|
|
1613
1615
|
pointer-events: none;
|
|
1614
1616
|
color: #949494;
|
|
1615
1617
|
}
|
|
1616
1618
|
.components-form-token-field__suggestion[aria-disabled=true].is-selected {
|
|
1617
|
-
background
|
|
1619
|
+
background: color-mix(in srgb, var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)) 4%, transparent);
|
|
1618
1620
|
}
|
|
1619
1621
|
.components-form-token-field__suggestion:not(.is-empty) {
|
|
1620
1622
|
cursor: pointer;
|
package/build-style/style.css
CHANGED
|
@@ -396,7 +396,7 @@
|
|
|
396
396
|
color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
397
397
|
background: transparent;
|
|
398
398
|
}
|
|
399
|
-
.components-button.is-tertiary:hover:not(:disabled, [aria-disabled=true]) {
|
|
399
|
+
.components-button.is-tertiary:hover:not(:disabled, [aria-disabled=true], .is-pressed) {
|
|
400
400
|
background: color-mix(in srgb, var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)) 4%, transparent);
|
|
401
401
|
color: var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6));
|
|
402
402
|
}
|
|
@@ -894,6 +894,8 @@ input.components-combobox-control__input[type=text] {
|
|
|
894
894
|
margin: 0;
|
|
895
895
|
line-height: inherit;
|
|
896
896
|
min-height: auto;
|
|
897
|
+
background: var(--wp-components-color-background, #fff);
|
|
898
|
+
color: var(--wp-components-color-foreground, #1e1e1e);
|
|
897
899
|
}
|
|
898
900
|
@media (min-width: 600px) {
|
|
899
901
|
input.components-combobox-control__input[type=text] {
|
|
@@ -934,8 +936,8 @@ input.components-combobox-control__input[type=text]:focus {
|
|
|
934
936
|
}
|
|
935
937
|
}
|
|
936
938
|
.components-combobox-control__suggestions-container:focus {
|
|
937
|
-
border-color: var(--wp-admin-theme-color);
|
|
938
|
-
box-shadow: 0 0 0 0.5px var(--wp-admin-theme-color);
|
|
939
|
+
border-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
940
|
+
box-shadow: 0 0 0 0.5px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
939
941
|
outline: 2px solid transparent;
|
|
940
942
|
}
|
|
941
943
|
.components-combobox-control__suggestions-container::-webkit-input-placeholder {
|
|
@@ -948,8 +950,8 @@ input.components-combobox-control__input[type=text]:focus {
|
|
|
948
950
|
color: rgba(30, 30, 30, 0.62);
|
|
949
951
|
}
|
|
950
952
|
.components-combobox-control__suggestions-container:focus-within {
|
|
951
|
-
border-color: var(--wp-admin-theme-color);
|
|
952
|
-
box-shadow: 0 0 0 0.5px var(--wp-admin-theme-color);
|
|
953
|
+
border-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
954
|
+
box-shadow: 0 0 0 0.5px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
953
955
|
outline: 2px solid transparent;
|
|
954
956
|
}
|
|
955
957
|
.components-combobox-control__suggestions-container .components-spinner {
|
|
@@ -1455,8 +1457,8 @@ body.is-dragging-components-draggable {
|
|
|
1455
1457
|
}
|
|
1456
1458
|
}
|
|
1457
1459
|
.components-form-token-field__input-container:focus {
|
|
1458
|
-
border-color: var(--wp-admin-theme-color);
|
|
1459
|
-
box-shadow: 0 0 0 0.5px var(--wp-admin-theme-color);
|
|
1460
|
+
border-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1461
|
+
box-shadow: 0 0 0 0.5px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1460
1462
|
outline: 2px solid transparent;
|
|
1461
1463
|
}
|
|
1462
1464
|
.components-form-token-field__input-container::-webkit-input-placeholder {
|
|
@@ -1473,8 +1475,8 @@ body.is-dragging-components-draggable {
|
|
|
1473
1475
|
border-color: #ddd;
|
|
1474
1476
|
}
|
|
1475
1477
|
.components-form-token-field__input-container.is-active {
|
|
1476
|
-
border-color: var(--wp-admin-theme-color);
|
|
1477
|
-
box-shadow: 0 0 0 0.5px var(--wp-admin-theme-color);
|
|
1478
|
+
border-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1479
|
+
box-shadow: 0 0 0 0.5px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1478
1480
|
outline: 2px solid transparent;
|
|
1479
1481
|
}
|
|
1480
1482
|
.components-form-token-field__input-container input[type=text].components-form-token-field__input {
|
|
@@ -1490,7 +1492,7 @@ body.is-dragging-components-draggable {
|
|
|
1490
1492
|
min-width: 50px;
|
|
1491
1493
|
background: inherit;
|
|
1492
1494
|
border: 0;
|
|
1493
|
-
color: #1e1e1e;
|
|
1495
|
+
color: var(--wp-components-color-foreground, #1e1e1e);
|
|
1494
1496
|
box-shadow: none;
|
|
1495
1497
|
}
|
|
1496
1498
|
@media (min-width: 600px) {
|
|
@@ -1602,7 +1604,7 @@ body.is-dragging-components-draggable {
|
|
|
1602
1604
|
}
|
|
1603
1605
|
|
|
1604
1606
|
.components-form-token-field__suggestion {
|
|
1605
|
-
color: #1e1e1e;
|
|
1607
|
+
color: var(--wp-components-color-foreground, #1e1e1e);
|
|
1606
1608
|
display: block;
|
|
1607
1609
|
font-size: 13px;
|
|
1608
1610
|
padding: 8px 12px;
|
|
@@ -1612,14 +1614,14 @@ body.is-dragging-components-draggable {
|
|
|
1612
1614
|
}
|
|
1613
1615
|
.components-form-token-field__suggestion.is-selected {
|
|
1614
1616
|
background: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1615
|
-
color: #fff;
|
|
1617
|
+
color: var(--wp-components-color-foreground-inverted, #fff);
|
|
1616
1618
|
}
|
|
1617
1619
|
.components-form-token-field__suggestion[aria-disabled=true] {
|
|
1618
1620
|
pointer-events: none;
|
|
1619
1621
|
color: #949494;
|
|
1620
1622
|
}
|
|
1621
1623
|
.components-form-token-field__suggestion[aria-disabled=true].is-selected {
|
|
1622
|
-
background
|
|
1624
|
+
background: color-mix(in srgb, var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)) 4%, transparent);
|
|
1623
1625
|
}
|
|
1624
1626
|
.components-form-token-field__suggestion:not(.is-empty) {
|
|
1625
1627
|
cursor: pointer;
|
|
@@ -3,7 +3,7 @@ export declare function useAutocomplete({ record, onChange, onReplace, completer
|
|
|
3
3
|
listBoxId: string | undefined;
|
|
4
4
|
activeId: string | null;
|
|
5
5
|
onKeyDown: (event: KeyboardEvent) => void;
|
|
6
|
-
popover: false | import("react").JSX.Element
|
|
6
|
+
popover: false | import("react").JSX.Element;
|
|
7
7
|
};
|
|
8
8
|
export declare function useAutocompleteProps(options: UseAutocompleteProps): {
|
|
9
9
|
ref: (instance: HTMLElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES];
|
|
@@ -13,7 +13,7 @@ export declare function useAutocompleteProps(options: UseAutocompleteProps): {
|
|
|
13
13
|
'aria-activedescendant'?: undefined;
|
|
14
14
|
} | {
|
|
15
15
|
ref: (instance: HTMLElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES];
|
|
16
|
-
children: false | import("react").JSX.Element
|
|
16
|
+
children: false | import("react").JSX.Element;
|
|
17
17
|
'aria-autocomplete': string | undefined;
|
|
18
18
|
'aria-owns': string | undefined;
|
|
19
19
|
'aria-activedescendant': string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/autocomplete/index.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EACX,iBAAiB,EAMjB,oBAAoB,EAEpB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/autocomplete/index.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EACX,iBAAiB,EAMjB,oBAAoB,EAEpB,MAAM,SAAS,CAAC;AAQjB,wBAAgB,eAAe,CAAE,EAChC,MAAM,EACN,QAAQ,EACR,SAAS,EACT,UAAU,EACV,UAAU,GACV,EAAE,oBAAoB;;;;;EA8UtB;AAeD,wBAAgB,oBAAoB,CAAE,OAAO,EAAE,oBAAoB;;;;;;;;;;;;EAsClE;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,EACrC,QAAQ,EACR,UAAU,EACV,GAAG,OAAO,EACV,EAAE,iBAAiB,+BAQnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/custom-select-control-v2/styles.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAU1C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AA+DtD,eAAO,MAAM,MAAM;;;;;;;UAQX,WAAW,CAAE,sBAAsB,CAAE,MAAM,CAAE,CAAE;yBAChC,OAAO;UAoB7B,CAAC;AAUF,eAAO,MAAM,aAAa;;;;;;UAiCzB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;UAIf,WAAW,CAAE,sBAAsB,CAAE,MAAM,CAAE,CAAE;UAuBtD,CAAC;AAQF,eAAO,MAAM,+BAA+B;;SA1Kd,MAAO,WAAW;yGA4K/C,CAAC;AAEF,eAAO,MAAM,4BAA4B;;SA9KX,MAAO,WAAW;2GAiL/C,CAAC;AAEF,eAAO,MAAM,mBAAmB;;SAnLF,MAAO,WAAW;yGA0L/C,CAAC;AAEF,eAAO,MAAM,gBAAgB;;SA5LC,MAAO,WAAW;2GAkM/C,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/custom-select-control-v2/styles.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAU1C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AA+DtD,eAAO,MAAM,MAAM;;;;;;;UAQX,WAAW,CAAE,sBAAsB,CAAE,MAAM,CAAE,CAAE;yBAChC,OAAO;UAoB7B,CAAC;AAUF,eAAO,MAAM,aAAa;;;;;;UAiCzB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;UAIf,WAAW,CAAE,sBAAsB,CAAE,MAAM,CAAE,CAAE;UAuBtD,CAAC;AAQF,eAAO,MAAM,+BAA+B;;SA1Kd,MAAO,WAAW;yGA4K/C,CAAC;AAEF,eAAO,MAAM,4BAA4B;;SA9KX,MAAO,WAAW;2GAiL/C,CAAC;AAEF,eAAO,MAAM,mBAAmB;;SAnLF,MAAO,WAAW;yGA0L/C,CAAC;AAEF,eAAO,MAAM,gBAAgB;;SA5LC,MAAO,WAAW;2GAkM/C,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;UAoB7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/number-control/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/number-control/index.tsx"],"names":[],"mappings":"AA0RA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;8iLAAyC,CAAC;AAEpE,eAAe,aAAa,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { WordPressComponentProps } from '../context';
|
|
2
|
-
import type { PopoverProps } from './types';
|
|
2
|
+
import type { PopoverProps, PopoverSlotProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Name of slot in which popover should fill.
|
|
5
5
|
*
|
|
6
6
|
* @type {string}
|
|
7
7
|
*/
|
|
8
8
|
export declare const SLOT_NAME = "Popover";
|
|
9
|
+
export declare const PopoverSlot: import("react").ForwardRefExoticComponent<PopoverSlotProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
10
|
/**
|
|
10
11
|
* `Popover` renders its content in a floating modal. If no explicit anchor is passed via props, it anchors to its parent element by default.
|
|
11
12
|
*
|
|
@@ -29,6 +30,21 @@ export declare const SLOT_NAME = "Popover";
|
|
|
29
30
|
* ```
|
|
30
31
|
*
|
|
31
32
|
*/
|
|
32
|
-
export declare const Popover: import("../context").WordPressComponent<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | null, Omit<WordPressComponentProps<PopoverProps, "div", false>, "inherit" | "initial" | "layout" | "drag" | "transition" | "onDrag" | "onDragEnd" | "onDragStart" | "onAnimationStart" | "viewport" | "exit" | "whileHover" | "whileTap" | "whileDrag" | "whileFocus" | "whileInView" | "transformTemplate" | "data-framer-appear-id" | "variants" | "onBeforeLayoutMeasure" | "onLayoutMeasure" | "onUpdate" | "onAnimationComplete" | "onPan" | "onPanStart" | "onPanSessionStart" | "onPanEnd" | "onTap" | "onTapStart" | "onTapCancel" | "globalTapTarget" | "onHoverStart" | "onHoverEnd" | "onViewportEnter" | "onViewportLeave" | "dragDirectionLock" | "dragPropagation" | "dragConstraints" | "dragElastic" | "dragMomentum" | "dragTransition" | "dragControls" | "dragSnapToOrigin" | "dragListener" | "onMeasureDragConstraints" | "_dragX" | "_dragY" | "onDirectionLock" | "onDragTransitionEnd" | "layoutId" | "onLayoutAnimationStart" | "onLayoutAnimationComplete" | "layoutDependency" | "layoutScroll" | "layoutRoot" | "custom" | "ignoreStrict"> & import("react").RefAttributes<any>, boolean
|
|
33
|
+
export declare const Popover: import("../context").WordPressComponent<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | null, Omit<WordPressComponentProps<PopoverProps, "div", false>, "inherit" | "initial" | "layout" | "drag" | "transition" | "onDrag" | "onDragEnd" | "onDragStart" | "onAnimationStart" | "viewport" | "exit" | "whileHover" | "whileTap" | "whileDrag" | "whileFocus" | "whileInView" | "transformTemplate" | "data-framer-appear-id" | "variants" | "onBeforeLayoutMeasure" | "onLayoutMeasure" | "onUpdate" | "onAnimationComplete" | "onPan" | "onPanStart" | "onPanSessionStart" | "onPanEnd" | "onTap" | "onTapStart" | "onTapCancel" | "globalTapTarget" | "onHoverStart" | "onHoverEnd" | "onViewportEnter" | "onViewportLeave" | "dragDirectionLock" | "dragPropagation" | "dragConstraints" | "dragElastic" | "dragMomentum" | "dragTransition" | "dragControls" | "dragSnapToOrigin" | "dragListener" | "onMeasureDragConstraints" | "_dragX" | "_dragY" | "onDirectionLock" | "onDragTransitionEnd" | "layoutId" | "onLayoutAnimationStart" | "onLayoutAnimationComplete" | "layoutDependency" | "layoutScroll" | "layoutRoot" | "custom" | "ignoreStrict"> & import("react").RefAttributes<any>, boolean> & {
|
|
34
|
+
/**
|
|
35
|
+
* Renders a slot that is used internally by Popover for rendering content.
|
|
36
|
+
*/
|
|
37
|
+
Slot: import("react").ForwardRefExoticComponent<PopoverSlotProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
38
|
+
displayName: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Provides a context to manage popover slot names.
|
|
42
|
+
*
|
|
43
|
+
* This is marked as unstable and should not be used directly.
|
|
44
|
+
*/
|
|
45
|
+
__unstableSlotNameProvider: import("react").Provider<string | undefined> & {
|
|
46
|
+
displayName: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
33
49
|
export default Popover;
|
|
34
50
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/popover/index.tsx"],"names":[],"mappings":"AAwDA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EACX,YAAY,EAGZ,MAAM,SAAS,CAAC;AAIjB;;;;GAIG;AACH,eAAO,MAAM,SAAS,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/popover/index.tsx"],"names":[],"mappings":"AAwDA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EACX,YAAY,EAGZ,gBAAgB,EAChB,MAAM,SAAS,CAAC;AAIjB;;;;GAIG;AACH,eAAO,MAAM,SAAS,YAAY,CAAC;AA2ZnC,eAAO,MAAM,WAAW,6GAWvB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,OAAO;IAGlB;;OAEG;;;;IAIH;;;;OAIG;;;;CAKJ,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
title: string;
|
|
3
|
-
component: import("../../../context").WordPressComponent<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | null, Omit<import("../../../context").WordPressComponentProps<import("../../types").PopoverProps, "div", false>, "inherit" | "initial" | "layout" | "drag" | "transition" | "onDrag" | "onDragEnd" | "onDragStart" | "onAnimationStart" | "viewport" | "exit" | "whileHover" | "whileTap" | "whileDrag" | "whileFocus" | "whileInView" | "transformTemplate" | "data-framer-appear-id" | "variants" | "onBeforeLayoutMeasure" | "onLayoutMeasure" | "onUpdate" | "onAnimationComplete" | "onPan" | "onPanStart" | "onPanSessionStart" | "onPanEnd" | "onTap" | "onTapStart" | "onTapCancel" | "globalTapTarget" | "onHoverStart" | "onHoverEnd" | "onViewportEnter" | "onViewportLeave" | "dragDirectionLock" | "dragPropagation" | "dragConstraints" | "dragElastic" | "dragMomentum" | "dragTransition" | "dragControls" | "dragSnapToOrigin" | "dragListener" | "onMeasureDragConstraints" | "_dragX" | "_dragY" | "onDirectionLock" | "onDragTransitionEnd" | "layoutId" | "onLayoutAnimationStart" | "onLayoutAnimationComplete" | "layoutDependency" | "layoutScroll" | "layoutRoot" | "custom" | "ignoreStrict"> & import("react").RefAttributes<any>, boolean
|
|
3
|
+
component: import("../../../context").WordPressComponent<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | null, Omit<import("../../../context").WordPressComponentProps<import("../../types").PopoverProps, "div", false>, "inherit" | "initial" | "layout" | "drag" | "transition" | "onDrag" | "onDragEnd" | "onDragStart" | "onAnimationStart" | "viewport" | "exit" | "whileHover" | "whileTap" | "whileDrag" | "whileFocus" | "whileInView" | "transformTemplate" | "data-framer-appear-id" | "variants" | "onBeforeLayoutMeasure" | "onLayoutMeasure" | "onUpdate" | "onAnimationComplete" | "onPan" | "onPanStart" | "onPanSessionStart" | "onPanEnd" | "onTap" | "onTapStart" | "onTapCancel" | "globalTapTarget" | "onHoverStart" | "onHoverEnd" | "onViewportEnter" | "onViewportLeave" | "dragDirectionLock" | "dragPropagation" | "dragConstraints" | "dragElastic" | "dragMomentum" | "dragTransition" | "dragControls" | "dragSnapToOrigin" | "dragListener" | "onMeasureDragConstraints" | "_dragX" | "_dragY" | "onDirectionLock" | "onDragTransitionEnd" | "layoutId" | "onLayoutAnimationStart" | "onLayoutAnimationComplete" | "layoutDependency" | "layoutScroll" | "layoutRoot" | "custom" | "ignoreStrict"> & import("react").RefAttributes<any>, boolean> & {
|
|
4
|
+
Slot: import("react").ForwardRefExoticComponent<import("../../types").PopoverSlotProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
__unstableSlotNameProvider: import("react").Provider<string | undefined> & {
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
4
11
|
};
|
|
5
12
|
export default _default;
|
|
6
13
|
export declare const Default: () => import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../src/popover/stories/e2e/index.story.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../src/popover/stories/e2e/index.story.tsx"],"names":[],"mappings":";;;;;;;;;;;AAUA,wBAGE;AAEF,eAAO,MAAM,OAAO,mCASnB,CAAC"}
|
|
@@ -10,4 +10,5 @@ export declare const Unstyled: StoryObj<typeof Popover>;
|
|
|
10
10
|
export declare const AllPlacements: StoryObj<typeof Popover>;
|
|
11
11
|
export declare const DynamicHeight: StoryObj<typeof Popover>;
|
|
12
12
|
export declare const WithSlotOutsideIframe: StoryObj<typeof Popover>;
|
|
13
|
+
export declare const WithCloseHandlers: StoryObj<typeof Popover>;
|
|
13
14
|
//# sourceMappingURL=index.story.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/popover/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAoB7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,OAAO,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/popover/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAoB7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,OAAO,CAyB/B,CAAC;AAEF,eAAe,IAAI,CAAC;AA2BpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,OAAO,CAkD7C,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAE,OAAO,OAAO,CAO9C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAE,OAAO,OAAO,CAkDnD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAE,OAAO,OAAO,CAqDnD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAE,OAAO,OAAO,CAO3D,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAE,OAAO,OAAO,CAwEvD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/popover/test/utils/index.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,OAAO,MAAM,OAAO,CAAC;AA8B5B,eAAO,MAAM,yCAAyC,UAC9C,KAAK,CAAC,cAAc,CAAE,OAAO,OAAO,CAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/popover/test/utils/index.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,OAAO,MAAM,OAAO,CAAC;AA8B5B,eAAO,MAAM,yCAAyC,UAC9C,KAAK,CAAC,cAAc,CAAE,OAAO,OAAO,CAAE,gCA8C7C,CAAC"}
|
|
@@ -191,5 +191,14 @@ export type PopoverProps = {
|
|
|
191
191
|
*/
|
|
192
192
|
isAlternate?: boolean;
|
|
193
193
|
};
|
|
194
|
+
export type PopoverSlotProps = {
|
|
195
|
+
/**
|
|
196
|
+
* The name of the Slot in which the popover should be rendered. It should
|
|
197
|
+
* be also passed to the corresponding `PopoverSlot` component.
|
|
198
|
+
*
|
|
199
|
+
* @default 'Popover'
|
|
200
|
+
*/
|
|
201
|
+
name?: string;
|
|
202
|
+
};
|
|
194
203
|
export {};
|
|
195
204
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/popover/types.ts"],"names":[],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/popover/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -6,17 +6,18 @@
|
|
|
6
6
|
* import { useState } from '@wordpress/element';
|
|
7
7
|
*
|
|
8
8
|
* const MyRangeControl = () => {
|
|
9
|
-
* const [
|
|
9
|
+
* const [ value, setValue ] = useState();
|
|
10
10
|
* return (
|
|
11
11
|
* <RangeControl
|
|
12
12
|
* __nextHasNoMarginBottom
|
|
13
13
|
* __next40pxDefaultSize
|
|
14
14
|
* help="Please select how transparent you would like this."
|
|
15
|
-
* initialPosition={50}
|
|
15
|
+
* initialPosition={ 50 }
|
|
16
16
|
* label="Opacity"
|
|
17
|
-
* max={100}
|
|
18
|
-
* min={0}
|
|
19
|
-
*
|
|
17
|
+
* max={ 100 }
|
|
18
|
+
* min={ 0 }
|
|
19
|
+
* value={ value }
|
|
20
|
+
* onChange={ setValue }
|
|
20
21
|
* />
|
|
21
22
|
* );
|
|
22
23
|
* };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/range-control/index.tsx"],"names":[],"mappings":"AAiYA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/range-control/index.tsx"],"names":[],"mappings":"AAiYA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,YAAY;;;;aAlXuB,CAAC;;;;;;;;;;;;;;qBAiHmB,CAAC;;;;;iCAwBzC,CAAA;;;;;;;;;;8uBAyOqC,CAAC;AAElE,eAAe,YAAY,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { DropdownMenuProps } from '../../dropdown-menu/types';
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
export declare const ToolbarDropdownMenu: import("react").ForwardRefExoticComponent<DropdownMenuProps & import("react").RefAttributes<any>>;
|
|
3
|
+
export default ToolbarDropdownMenu;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/toolbar/toolbar-dropdown-menu/index.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/toolbar/toolbar-dropdown-menu/index.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AA8BnE,eAAO,MAAM,mBAAmB,mGAA+C,CAAC;AAChF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
export declare const ToolbarItem: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<any>, "children"> & {
|
|
2
2
|
as?: import("react").ElementType;
|
|
3
3
|
children?: import("react").ReactNode | ((props: import("react").HTMLAttributes<any> & import("react").RefAttributes<any>) => import("react").ReactElement | null);
|
|
4
4
|
} & import("react").RefAttributes<any>>;
|
|
5
|
-
export default
|
|
5
|
+
export default ToolbarItem;
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/toolbar/toolbar-item/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/toolbar/toolbar-item/index.tsx"],"names":[],"mappings":"AA2DA,eAAO,MAAM,WAAW;;;uCAAuC,CAAC;AAChE,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-node-text.d.ts","sourceRoot":"","sources":["../../src/utils/get-node-text.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW,SAAW,KAAK,CAAC,SAAS,KAAI,MAqB9C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|