@wordpress/components 29.7.0 → 29.9.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/.stylelintrc.js +1 -1
- package/CHANGELOG.md +37 -0
- package/build/guide/index.js +4 -2
- package/build/guide/index.js.map +1 -1
- package/build/guide/types.js.map +1 -1
- package/build/item-group/styles.js +10 -10
- package/build/item-group/styles.js.map +1 -1
- package/build/popover/index.js +38 -18
- package/build/popover/index.js.map +1 -1
- package/build/popover/types.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/component.js +1 -1
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/unit-control/utils.js +9 -8
- package/build/unit-control/utils.js.map +1 -1
- package/build-module/guide/index.js +4 -2
- package/build-module/guide/index.js.map +1 -1
- package/build-module/guide/types.js.map +1 -1
- package/build-module/item-group/styles.js +10 -10
- package/build-module/item-group/styles.js.map +1 -1
- package/build-module/popover/index.js +37 -17
- package/build-module/popover/index.js.map +1 -1
- package/build-module/popover/types.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/component.js +1 -1
- package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build-module/unit-control/utils.js +9 -8
- package/build-module/unit-control/utils.js.map +1 -1
- package/build-style/style-rtl.css +17 -12
- package/build-style/style.css +17 -12
- package/build-types/guide/index.d.ts +1 -1
- package/build-types/guide/index.d.ts.map +1 -1
- package/build-types/guide/stories/index.story.d.ts.map +1 -1
- package/build-types/guide/types.d.ts +12 -0
- package/build-types/guide/types.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/unit-control/utils.d.ts.map +1 -1
- package/package.json +20 -20
- package/src/button/style.scss +1 -1
- package/src/color-picker/test/index.tsx +103 -26
- package/src/combobox-control/style.scss +4 -2
- package/src/duotone-picker/style.scss +4 -0
- package/src/form-token-field/style.scss +5 -5
- package/src/guide/README.md +16 -0
- package/src/guide/index.tsx +4 -2
- package/src/guide/stories/index.story.tsx +2 -0
- package/src/guide/types.ts +12 -0
- package/src/item-group/styles.ts +1 -1
- package/src/item-group/test/__snapshots__/index.js.snap +1 -1
- package/src/popover/index.tsx +46 -21
- 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/toggle-group-control/toggle-group-control/component.tsx +1 -1
- package/src/unit-control/test/utils.ts +36 -0
- package/src/unit-control/utils.ts +8 -11
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","useState","contextConnect","useContextSystem","useCx","BaseControl","VisualLabelWrapper","styles","ToggleGroupControlAsRadioGroup","ToggleGroupControlAsButtonGroup","useTrackElementOffsetRect","useMergeRefs","useAnimatedOffsetRect","maybeWarnDeprecated36pxSize","jsx","_jsx","jsxs","_jsxs","UnconnectedToggleGroupControl","props","forwardedRef","__nextHasNoMarginBottom","__next40pxDefaultSize","__shouldNotWarnDeprecated36pxSize","className","isAdaptiveWidth","isBlock","isDeselectable","label","hideLabelFromVision","help","onChange","size","value","children","otherProps","normalizedSize","selectedElement","setSelectedElement","controlElement","setControlElement","refs","selectedRect","undefined","prefix","dataAttribute","transitionEndFilter","event","pseudoElement","roundRect","cx","classes","toggleGroupControl","block","MainControl","componentName","__associatedWPComponentName","VisualLabel","ref","ToggleGroupControl"],"sources":["@wordpress/components/src/toggle-group-control/toggle-group-control/component.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect, useContextSystem } from '../../context';\nimport { useCx } from '../../utils/hooks';\nimport BaseControl from '../../base-control';\nimport type { ToggleGroupControlProps } from '../types';\nimport { VisualLabelWrapper } from './styles';\nimport * as styles from './styles';\nimport { ToggleGroupControlAsRadioGroup } from './as-radio-group';\nimport { ToggleGroupControlAsButtonGroup } from './as-button-group';\nimport { useTrackElementOffsetRect } from '../../utils/element-rect';\nimport { useMergeRefs } from '@wordpress/compose';\nimport { useAnimatedOffsetRect } from '../../utils/hooks/use-animated-offset-rect';\nimport { maybeWarnDeprecated36pxSize } from '../../utils/deprecated-36px-size';\n\nfunction UnconnectedToggleGroupControl(\n\tprops: WordPressComponentProps< ToggleGroupControlProps, 'div', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\t__next40pxDefaultSize = false,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t\tclassName,\n\t\tisAdaptiveWidth = false,\n\t\tisBlock = false,\n\t\tisDeselectable = false,\n\t\tlabel,\n\t\thideLabelFromVision = false,\n\t\thelp,\n\t\tonChange,\n\t\tsize = 'default',\n\t\tvalue,\n\t\tchildren,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ToggleGroupControl' );\n\n\tconst normalizedSize =\n\t\t__next40pxDefaultSize && size === 'default' ? '__unstable-large' : size;\n\n\tconst [ selectedElement, setSelectedElement ] = useState< HTMLElement >();\n\tconst [ controlElement, setControlElement ] = useState< HTMLElement >();\n\tconst refs = useMergeRefs( [ setControlElement, forwardedRef ] );\n\tconst selectedRect = useTrackElementOffsetRect(\n\t\tvalue
|
|
1
|
+
{"version":3,"names":["useMemo","useState","contextConnect","useContextSystem","useCx","BaseControl","VisualLabelWrapper","styles","ToggleGroupControlAsRadioGroup","ToggleGroupControlAsButtonGroup","useTrackElementOffsetRect","useMergeRefs","useAnimatedOffsetRect","maybeWarnDeprecated36pxSize","jsx","_jsx","jsxs","_jsxs","UnconnectedToggleGroupControl","props","forwardedRef","__nextHasNoMarginBottom","__next40pxDefaultSize","__shouldNotWarnDeprecated36pxSize","className","isAdaptiveWidth","isBlock","isDeselectable","label","hideLabelFromVision","help","onChange","size","value","children","otherProps","normalizedSize","selectedElement","setSelectedElement","controlElement","setControlElement","refs","selectedRect","undefined","prefix","dataAttribute","transitionEndFilter","event","pseudoElement","roundRect","cx","classes","toggleGroupControl","block","MainControl","componentName","__associatedWPComponentName","VisualLabel","ref","ToggleGroupControl"],"sources":["@wordpress/components/src/toggle-group-control/toggle-group-control/component.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect, useContextSystem } from '../../context';\nimport { useCx } from '../../utils/hooks';\nimport BaseControl from '../../base-control';\nimport type { ToggleGroupControlProps } from '../types';\nimport { VisualLabelWrapper } from './styles';\nimport * as styles from './styles';\nimport { ToggleGroupControlAsRadioGroup } from './as-radio-group';\nimport { ToggleGroupControlAsButtonGroup } from './as-button-group';\nimport { useTrackElementOffsetRect } from '../../utils/element-rect';\nimport { useMergeRefs } from '@wordpress/compose';\nimport { useAnimatedOffsetRect } from '../../utils/hooks/use-animated-offset-rect';\nimport { maybeWarnDeprecated36pxSize } from '../../utils/deprecated-36px-size';\n\nfunction UnconnectedToggleGroupControl(\n\tprops: WordPressComponentProps< ToggleGroupControlProps, 'div', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\t__next40pxDefaultSize = false,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t\tclassName,\n\t\tisAdaptiveWidth = false,\n\t\tisBlock = false,\n\t\tisDeselectable = false,\n\t\tlabel,\n\t\thideLabelFromVision = false,\n\t\thelp,\n\t\tonChange,\n\t\tsize = 'default',\n\t\tvalue,\n\t\tchildren,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ToggleGroupControl' );\n\n\tconst normalizedSize =\n\t\t__next40pxDefaultSize && size === 'default' ? '__unstable-large' : size;\n\n\tconst [ selectedElement, setSelectedElement ] = useState< HTMLElement >();\n\tconst [ controlElement, setControlElement ] = useState< HTMLElement >();\n\tconst refs = useMergeRefs( [ setControlElement, forwardedRef ] );\n\tconst selectedRect = useTrackElementOffsetRect(\n\t\tvalue !== null && value !== undefined ? selectedElement : undefined\n\t);\n\tuseAnimatedOffsetRect( controlElement, selectedRect, {\n\t\tprefix: 'selected',\n\t\tdataAttribute: 'indicator-animated',\n\t\ttransitionEndFilter: ( event ) => event.pseudoElement === '::before',\n\t\troundRect: true,\n\t} );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.toggleGroupControl( {\n\t\t\t\t\tisBlock,\n\t\t\t\t\tisDeselectable,\n\t\t\t\t\tsize: normalizedSize,\n\t\t\t\t} ),\n\t\t\t\tisBlock && styles.block,\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx, isBlock, isDeselectable, normalizedSize ]\n\t);\n\n\tconst MainControl = isDeselectable\n\t\t? ToggleGroupControlAsButtonGroup\n\t\t: ToggleGroupControlAsRadioGroup;\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'ToggleGroupControl',\n\t\tsize,\n\t\t__next40pxDefaultSize,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t} );\n\n\treturn (\n\t\t<BaseControl\n\t\t\thelp={ help }\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t__associatedWPComponentName=\"ToggleGroupControl\"\n\t\t>\n\t\t\t{ ! hideLabelFromVision && (\n\t\t\t\t<VisualLabelWrapper>\n\t\t\t\t\t<BaseControl.VisualLabel>{ label }</BaseControl.VisualLabel>\n\t\t\t\t</VisualLabelWrapper>\n\t\t\t) }\n\t\t\t<MainControl\n\t\t\t\t{ ...otherProps }\n\t\t\t\tsetSelectedElement={ setSelectedElement }\n\t\t\t\tclassName={ classes }\n\t\t\t\tisAdaptiveWidth={ isAdaptiveWidth }\n\t\t\t\tlabel={ label }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tref={ refs }\n\t\t\t\tsize={ normalizedSize }\n\t\t\t\tvalue={ value }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</MainControl>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * `ToggleGroupControl` is a form component that lets users choose options\n * represented in horizontal segments. To render options for this control use\n * `ToggleGroupControlOption` component.\n *\n * This component is intended for selecting a single persistent value from a set of options,\n * similar to a how a radio button group would work. If you simply want a toggle to switch between views,\n * use a `TabPanel` instead.\n *\n * Only use this control when you know for sure the labels of items inside won't\n * wrap. For items with longer labels, you can consider a `SelectControl` or a\n * `CustomSelectControl` component instead.\n *\n * ```jsx\n * import {\n * __experimentalToggleGroupControl as ToggleGroupControl,\n * __experimentalToggleGroupControlOption as ToggleGroupControlOption,\n * } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <ToggleGroupControl\n * label=\"my label\"\n * value=\"vertical\"\n * isBlock\n * __nextHasNoMarginBottom\n * __next40pxDefaultSize\n * >\n * <ToggleGroupControlOption value=\"horizontal\" label=\"Horizontal\" />\n * <ToggleGroupControlOption value=\"vertical\" label=\"Vertical\" />\n * </ToggleGroupControl>\n * );\n * }\n * ```\n */\nexport const ToggleGroupControl = contextConnect(\n\tUnconnectedToggleGroupControl,\n\t'ToggleGroupControl'\n);\n\nexport default ToggleGroupControl;\n"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,OAAO,EAAEC,QAAQ,QAAQ,oBAAoB;;AAEtD;AACA;AACA;;AAEA,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,eAAe;AAChE,SAASC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AAGA,QAAU;MACrB2B,GAAG,EAAGjB,IAAM;MACZT,IAAI,EAAGI,cAAgB;MACvBH,KAAK,EAAGA,KAAO;MAAAC,QAAA,EAEbA;IAAQ,CACE,CAAC;EAAA,CACF,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMyB,kBAAkB,GAAGzD,cAAc,CAC/CgB,6BAA6B,EAC7B,oBACD,CAAC;AAED,eAAeyC,kBAAkB","ignoreList":[]}
|
|
@@ -358,15 +358,16 @@ export const useCustomUnits = ({
|
|
|
358
358
|
defaultValues
|
|
359
359
|
}) => {
|
|
360
360
|
const customUnitsToReturn = filterUnitsWithSettings(availableUnits, units);
|
|
361
|
-
if (defaultValues) {
|
|
362
|
-
customUnitsToReturn
|
|
363
|
-
if (defaultValues[unit.value]) {
|
|
364
|
-
const [parsedDefaultValue] = parseQuantityAndUnitFromRawValue(defaultValues[unit.value]);
|
|
365
|
-
customUnitsToReturn[i].default = parsedDefaultValue;
|
|
366
|
-
}
|
|
367
|
-
});
|
|
361
|
+
if (!defaultValues) {
|
|
362
|
+
return customUnitsToReturn;
|
|
368
363
|
}
|
|
369
|
-
return customUnitsToReturn
|
|
364
|
+
return customUnitsToReturn.map(unit => {
|
|
365
|
+
const [defaultValue] = defaultValues[unit.value] ? parseQuantityAndUnitFromRawValue(defaultValues[unit.value]) : [];
|
|
366
|
+
return {
|
|
367
|
+
...unit,
|
|
368
|
+
default: defaultValue
|
|
369
|
+
};
|
|
370
|
+
});
|
|
370
371
|
};
|
|
371
372
|
|
|
372
373
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","_x","Platform","isWeb","OS","allUnits","px","value","label","a11yLabel","step","em","rem","vw","vh","vmin","vmax","ch","ex","cm","mm","in","pc","pt","svw","svh","svi","svb","svmin","lvw","lvh","lvi","lvb","lvmin","dvw","dvh","dvi","dvb","dvmin","dvmax","svmax","lvmax","ALL_CSS_UNITS","Object","values","CSS_UNITS","DEFAULT_UNIT","getParsedQuantityAndUnit","rawValue","fallbackUnit","allowedUnits","initialValue","parseQuantityAndUnitFromRawValue","hasUnits","units","Array","isArray","length","trimmedValue","quantityToReturn","trim","parsedQuantity","parseFloat","isFinite","undefined","unitMatch","match","matchedUnit","toLowerCase","unitToReturn","find","item","getValidParsedQuantityAndUnit","fallbackQuantity","parsedUnit","getAccessibleLabelForUnit","unit","filterUnitsWithSettings","allowedUnitValues","availableUnits","filter","includes","useCustomUnits","defaultValues","customUnitsToReturn","forEach","i","parsedDefaultValue","default","getUnitsWithCurrentUnit","legacyUnit","unitsToReturn","currentUnit","some","unshift"],"sources":["@wordpress/components/src/unit-control/utils.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WPUnitControlUnit } from './types';\n\nconst isWeb = Platform.OS === 'web';\n\nconst allUnits: Record< string, WPUnitControlUnit > = {\n\tpx: {\n\t\tvalue: 'px',\n\t\tlabel: isWeb ? 'px' : __( 'Pixels (px)' ),\n\t\ta11yLabel: __( 'Pixels (px)' ),\n\t\tstep: 1,\n\t},\n\t'%': {\n\t\tvalue: '%',\n\t\tlabel: isWeb ? '%' : __( 'Percentage (%)' ),\n\t\ta11yLabel: __( 'Percent (%)' ),\n\t\tstep: 0.1,\n\t},\n\tem: {\n\t\tvalue: 'em',\n\t\tlabel: isWeb ? 'em' : __( 'Relative to parent font size (em)' ),\n\t\ta11yLabel: _x( 'ems', 'Relative to parent font size (em)' ),\n\t\tstep: 0.01,\n\t},\n\trem: {\n\t\tvalue: 'rem',\n\t\tlabel: isWeb ? 'rem' : __( 'Relative to root font size (rem)' ),\n\t\ta11yLabel: _x( 'rems', 'Relative to root font size (rem)' ),\n\t\tstep: 0.01,\n\t},\n\tvw: {\n\t\tvalue: 'vw',\n\t\tlabel: isWeb ? 'vw' : __( 'Viewport width (vw)' ),\n\t\ta11yLabel: __( 'Viewport width (vw)' ),\n\t\tstep: 0.1,\n\t},\n\tvh: {\n\t\tvalue: 'vh',\n\t\tlabel: isWeb ? 'vh' : __( 'Viewport height (vh)' ),\n\t\ta11yLabel: __( 'Viewport height (vh)' ),\n\t\tstep: 0.1,\n\t},\n\tvmin: {\n\t\tvalue: 'vmin',\n\t\tlabel: isWeb ? 'vmin' : __( 'Viewport smallest dimension (vmin)' ),\n\t\ta11yLabel: __( 'Viewport smallest dimension (vmin)' ),\n\t\tstep: 0.1,\n\t},\n\tvmax: {\n\t\tvalue: 'vmax',\n\t\tlabel: isWeb ? 'vmax' : __( 'Viewport largest dimension (vmax)' ),\n\t\ta11yLabel: __( 'Viewport largest dimension (vmax)' ),\n\t\tstep: 0.1,\n\t},\n\tch: {\n\t\tvalue: 'ch',\n\t\tlabel: isWeb ? 'ch' : __( 'Width of the zero (0) character (ch)' ),\n\t\ta11yLabel: __( 'Width of the zero (0) character (ch)' ),\n\t\tstep: 0.01,\n\t},\n\tex: {\n\t\tvalue: 'ex',\n\t\tlabel: isWeb ? 'ex' : __( 'x-height of the font (ex)' ),\n\t\ta11yLabel: __( 'x-height of the font (ex)' ),\n\t\tstep: 0.01,\n\t},\n\tcm: {\n\t\tvalue: 'cm',\n\t\tlabel: isWeb ? 'cm' : __( 'Centimeters (cm)' ),\n\t\ta11yLabel: __( 'Centimeters (cm)' ),\n\t\tstep: 0.001,\n\t},\n\tmm: {\n\t\tvalue: 'mm',\n\t\tlabel: isWeb ? 'mm' : __( 'Millimeters (mm)' ),\n\t\ta11yLabel: __( 'Millimeters (mm)' ),\n\t\tstep: 0.1,\n\t},\n\tin: {\n\t\tvalue: 'in',\n\t\tlabel: isWeb ? 'in' : __( 'Inches (in)' ),\n\t\ta11yLabel: __( 'Inches (in)' ),\n\t\tstep: 0.001,\n\t},\n\tpc: {\n\t\tvalue: 'pc',\n\t\tlabel: isWeb ? 'pc' : __( 'Picas (pc)' ),\n\t\ta11yLabel: __( 'Picas (pc)' ),\n\t\tstep: 1,\n\t},\n\tpt: {\n\t\tvalue: 'pt',\n\t\tlabel: isWeb ? 'pt' : __( 'Points (pt)' ),\n\t\ta11yLabel: __( 'Points (pt)' ),\n\t\tstep: 1,\n\t},\n\tsvw: {\n\t\tvalue: 'svw',\n\t\tlabel: isWeb ? 'svw' : __( 'Small viewport width (svw)' ),\n\t\ta11yLabel: __( 'Small viewport width (svw)' ),\n\t\tstep: 0.1,\n\t},\n\tsvh: {\n\t\tvalue: 'svh',\n\t\tlabel: isWeb ? 'svh' : __( 'Small viewport height (svh)' ),\n\t\ta11yLabel: __( 'Small viewport height (svh)' ),\n\t\tstep: 0.1,\n\t},\n\tsvi: {\n\t\tvalue: 'svi',\n\t\tlabel: isWeb\n\t\t\t? 'svi'\n\t\t\t: __( 'Viewport smallest size in the inline direction (svi)' ),\n\t\ta11yLabel: __( 'Small viewport width or height (svi)' ),\n\t\tstep: 0.1,\n\t},\n\tsvb: {\n\t\tvalue: 'svb',\n\t\tlabel: isWeb\n\t\t\t? 'svb'\n\t\t\t: __( 'Viewport smallest size in the block direction (svb)' ),\n\t\ta11yLabel: __( 'Small viewport width or height (svb)' ),\n\t\tstep: 0.1,\n\t},\n\tsvmin: {\n\t\tvalue: 'svmin',\n\t\tlabel: isWeb\n\t\t\t? 'svmin'\n\t\t\t: __( 'Small viewport smallest dimension (svmin)' ),\n\t\ta11yLabel: __( 'Small viewport smallest dimension (svmin)' ),\n\t\tstep: 0.1,\n\t},\n\tlvw: {\n\t\tvalue: 'lvw',\n\t\tlabel: isWeb ? 'lvw' : __( 'Large viewport width (lvw)' ),\n\t\ta11yLabel: __( 'Large viewport width (lvw)' ),\n\t\tstep: 0.1,\n\t},\n\tlvh: {\n\t\tvalue: 'lvh',\n\t\tlabel: isWeb ? 'lvh' : __( 'Large viewport height (lvh)' ),\n\t\ta11yLabel: __( 'Large viewport height (lvh)' ),\n\t\tstep: 0.1,\n\t},\n\tlvi: {\n\t\tvalue: 'lvi',\n\t\tlabel: isWeb ? 'lvi' : __( 'Large viewport width or height (lvi)' ),\n\t\ta11yLabel: __( 'Large viewport width or height (lvi)' ),\n\t\tstep: 0.1,\n\t},\n\tlvb: {\n\t\tvalue: 'lvb',\n\t\tlabel: isWeb ? 'lvb' : __( 'Large viewport width or height (lvb)' ),\n\t\ta11yLabel: __( 'Large viewport width or height (lvb)' ),\n\t\tstep: 0.1,\n\t},\n\tlvmin: {\n\t\tvalue: 'lvmin',\n\t\tlabel: isWeb\n\t\t\t? 'lvmin'\n\t\t\t: __( 'Large viewport smallest dimension (lvmin)' ),\n\t\ta11yLabel: __( 'Large viewport smallest dimension (lvmin)' ),\n\t\tstep: 0.1,\n\t},\n\tdvw: {\n\t\tvalue: 'dvw',\n\t\tlabel: isWeb ? 'dvw' : __( 'Dynamic viewport width (dvw)' ),\n\t\ta11yLabel: __( 'Dynamic viewport width (dvw)' ),\n\t\tstep: 0.1,\n\t},\n\tdvh: {\n\t\tvalue: 'dvh',\n\t\tlabel: isWeb ? 'dvh' : __( 'Dynamic viewport height (dvh)' ),\n\t\ta11yLabel: __( 'Dynamic viewport height (dvh)' ),\n\t\tstep: 0.1,\n\t},\n\tdvi: {\n\t\tvalue: 'dvi',\n\t\tlabel: isWeb ? 'dvi' : __( 'Dynamic viewport width or height (dvi)' ),\n\t\ta11yLabel: __( 'Dynamic viewport width or height (dvi)' ),\n\t\tstep: 0.1,\n\t},\n\tdvb: {\n\t\tvalue: 'dvb',\n\t\tlabel: isWeb ? 'dvb' : __( 'Dynamic viewport width or height (dvb)' ),\n\t\ta11yLabel: __( 'Dynamic viewport width or height (dvb)' ),\n\t\tstep: 0.1,\n\t},\n\tdvmin: {\n\t\tvalue: 'dvmin',\n\t\tlabel: isWeb\n\t\t\t? 'dvmin'\n\t\t\t: __( 'Dynamic viewport smallest dimension (dvmin)' ),\n\t\ta11yLabel: __( 'Dynamic viewport smallest dimension (dvmin)' ),\n\t\tstep: 0.1,\n\t},\n\tdvmax: {\n\t\tvalue: 'dvmax',\n\t\tlabel: isWeb\n\t\t\t? 'dvmax'\n\t\t\t: __( 'Dynamic viewport largest dimension (dvmax)' ),\n\t\ta11yLabel: __( 'Dynamic viewport largest dimension (dvmax)' ),\n\t\tstep: 0.1,\n\t},\n\tsvmax: {\n\t\tvalue: 'svmax',\n\t\tlabel: isWeb\n\t\t\t? 'svmax'\n\t\t\t: __( 'Small viewport largest dimension (svmax)' ),\n\t\ta11yLabel: __( 'Small viewport largest dimension (svmax)' ),\n\t\tstep: 0.1,\n\t},\n\tlvmax: {\n\t\tvalue: 'lvmax',\n\t\tlabel: isWeb\n\t\t\t? 'lvmax'\n\t\t\t: __( 'Large viewport largest dimension (lvmax)' ),\n\t\ta11yLabel: __( 'Large viewport largest dimension (lvmax)' ),\n\t\tstep: 0.1,\n\t},\n};\n\n/**\n * An array of all available CSS length units.\n */\nexport const ALL_CSS_UNITS = Object.values( allUnits );\n\n/**\n * Units of measurements. `a11yLabel` is used by screenreaders.\n */\nexport const CSS_UNITS = [\n\tallUnits.px,\n\tallUnits[ '%' ],\n\tallUnits.em,\n\tallUnits.rem,\n\tallUnits.vw,\n\tallUnits.vh,\n];\n\nexport const DEFAULT_UNIT = allUnits.px;\n\n/**\n * Handles legacy value + unit handling.\n * This component use to manage both incoming value and units separately.\n *\n * Moving forward, ideally the value should be a string that contains both\n * the value and unit, example: '10px'\n *\n * @param rawValue The raw value as a string (may or may not contain the unit)\n * @param fallbackUnit The unit used as a fallback, if not unit is detected in the `value`\n * @param allowedUnits Units to derive from.\n * @return The extracted quantity and unit. The quantity can be `undefined` in case the raw value\n * could not be parsed to a number correctly. The unit can be `undefined` in case the unit parse\n * from the raw value could not be matched against the list of allowed units.\n */\nexport function getParsedQuantityAndUnit(\n\trawValue?: string | number,\n\tfallbackUnit?: string,\n\tallowedUnits?: WPUnitControlUnit[]\n): [ number | undefined, string | undefined ] {\n\tconst initialValue = fallbackUnit\n\t\t? `${ rawValue ?? '' }${ fallbackUnit }`\n\t\t: rawValue;\n\n\treturn parseQuantityAndUnitFromRawValue( initialValue, allowedUnits );\n}\n\n/**\n * Checks if units are defined.\n *\n * @param units List of units.\n * @return Whether the list actually contains any units.\n */\nexport function hasUnits(\n\tunits?: WPUnitControlUnit[]\n): units is WPUnitControlUnit[] {\n\t// Although the `isArray` check shouldn't be necessary (given the signature of\n\t// this typed function), it's better to stay on the side of caution, since\n\t// this function may be called from un-typed environments.\n\treturn Array.isArray( units ) && !! units.length;\n}\n\n/**\n * Parses a quantity and unit from a raw string value, given a list of allowed\n * units and otherwise falling back to the default unit.\n *\n * @param rawValue The raw value as a string (may or may not contain the unit)\n * @param allowedUnits Units to derive from.\n * @return The extracted quantity and unit. The quantity can be `undefined` in case the raw value\n * could not be parsed to a number correctly. The unit can be `undefined` in case the unit parsed\n * from the raw value could not be matched against the list of allowed units.\n */\nexport function parseQuantityAndUnitFromRawValue(\n\trawValue?: string | number,\n\tallowedUnits: WPUnitControlUnit[] = ALL_CSS_UNITS\n): [ number | undefined, string | undefined ] {\n\tlet trimmedValue;\n\tlet quantityToReturn;\n\n\tif ( typeof rawValue !== 'undefined' || rawValue === null ) {\n\t\ttrimmedValue = `${ rawValue }`.trim();\n\t\tconst parsedQuantity = parseFloat( trimmedValue );\n\t\tquantityToReturn = ! isFinite( parsedQuantity )\n\t\t\t? undefined\n\t\t\t: parsedQuantity;\n\t}\n\n\tconst unitMatch = trimmedValue?.match( /[\\d.\\-\\+]*\\s*(.*)/ );\n\tconst matchedUnit = unitMatch?.[ 1 ]?.toLowerCase();\n\tlet unitToReturn: string | undefined;\n\tif ( hasUnits( allowedUnits ) ) {\n\t\tconst match = allowedUnits.find(\n\t\t\t( item ) => item.value === matchedUnit\n\t\t);\n\t\tunitToReturn = match?.value;\n\t} else {\n\t\tunitToReturn = DEFAULT_UNIT.value;\n\t}\n\n\treturn [ quantityToReturn, unitToReturn ];\n}\n\n/**\n * Parses quantity and unit from a raw value. Validates parsed value, using fallback\n * value if invalid.\n *\n * @param rawValue The next value.\n * @param allowedUnits Units to derive from.\n * @param fallbackQuantity The fallback quantity, used in case it's not possible to parse a valid quantity from the raw value.\n * @param fallbackUnit The fallback unit, used in case it's not possible to parse a valid unit from the raw value.\n * @return The extracted quantity and unit. The quantity can be `undefined` in case the raw value\n * could not be parsed to a number correctly, and the `fallbackQuantity` was also `undefined`. The\n * unit can be `undefined` only if the unit parsed from the raw value could not be matched against\n * the list of allowed units, the `fallbackQuantity` is also `undefined` and the list of\n * `allowedUnits` is passed empty.\n */\nexport function getValidParsedQuantityAndUnit(\n\trawValue: string | number,\n\tallowedUnits?: WPUnitControlUnit[],\n\tfallbackQuantity?: number,\n\tfallbackUnit?: string\n): [ number | undefined, string | undefined ] {\n\tconst [ parsedQuantity, parsedUnit ] = parseQuantityAndUnitFromRawValue(\n\t\trawValue,\n\t\tallowedUnits\n\t);\n\n\t// The parsed value from `parseQuantityAndUnitFromRawValue` should now be\n\t// either a real number or undefined. If undefined, use the fallback value.\n\tconst quantityToReturn = parsedQuantity ?? fallbackQuantity;\n\n\t// If no unit is parsed from the raw value, or if the fallback unit is not\n\t// defined, use the first value from the list of allowed units as fallback.\n\tlet unitToReturn = parsedUnit || fallbackUnit;\n\n\tif ( ! unitToReturn && hasUnits( allowedUnits ) ) {\n\t\tunitToReturn = allowedUnits[ 0 ].value;\n\t}\n\n\treturn [ quantityToReturn, unitToReturn ];\n}\n\n/**\n * Takes a unit value and finds the matching accessibility label for the\n * unit abbreviation.\n *\n * @param unit Unit value (example: `px`)\n * @return a11y label for the unit abbreviation\n */\nexport function getAccessibleLabelForUnit( unit: string ): string | undefined {\n\tconst match = ALL_CSS_UNITS.find( ( item ) => item.value === unit );\n\treturn match?.a11yLabel ? match?.a11yLabel : match?.value;\n}\n\n/**\n * Filters available units based on values defined a list of allowed unit values.\n *\n * @param allowedUnitValues Collection of allowed unit value strings.\n * @param availableUnits Collection of available unit objects.\n * @return Filtered units.\n */\nexport function filterUnitsWithSettings(\n\tallowedUnitValues: string[] = [],\n\tavailableUnits: WPUnitControlUnit[]\n): WPUnitControlUnit[] {\n\t// Although the `isArray` check shouldn't be necessary (given the signature of\n\t// this typed function), it's better to stay on the side of caution, since\n\t// this function may be called from un-typed environments.\n\treturn Array.isArray( availableUnits )\n\t\t? availableUnits.filter( ( unit ) =>\n\t\t\t\tallowedUnitValues.includes( unit.value )\n\t\t )\n\t\t: [];\n}\n\n/**\n * Custom hook to retrieve and consolidate units setting from add_theme_support().\n * TODO: ideally this hook shouldn't be needed\n * https://github.com/WordPress/gutenberg/pull/31822#discussion_r633280823\n *\n * @param args An object containing units, settingPath & defaultUnits.\n * @param args.units Collection of all potentially available units.\n * @param args.availableUnits Collection of unit value strings for filtering available units.\n * @param args.defaultValues Collection of default values for defined units. Example: `{ px: 350, em: 15 }`.\n *\n * @return Filtered list of units, with their default values updated following the `defaultValues`\n * argument's property.\n */\nexport const useCustomUnits = ( {\n\tunits = ALL_CSS_UNITS,\n\tavailableUnits = [],\n\tdefaultValues,\n}: {\n\tunits?: WPUnitControlUnit[];\n\tavailableUnits?: string[];\n\tdefaultValues?: Record< string, number >;\n} ): WPUnitControlUnit[] => {\n\tconst customUnitsToReturn = filterUnitsWithSettings(\n\t\tavailableUnits,\n\t\tunits\n\t);\n\n\tif ( defaultValues ) {\n\t\tcustomUnitsToReturn.forEach( ( unit, i ) => {\n\t\t\tif ( defaultValues[ unit.value ] ) {\n\t\t\t\tconst [ parsedDefaultValue ] = parseQuantityAndUnitFromRawValue(\n\t\t\t\t\tdefaultValues[ unit.value ]\n\t\t\t\t);\n\n\t\t\t\tcustomUnitsToReturn[ i ].default = parsedDefaultValue;\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn customUnitsToReturn;\n};\n\n/**\n * Get available units with the unit for the currently selected value\n * prepended if it is not available in the list of units.\n *\n * This is useful to ensure that the current value's unit is always\n * accurately displayed in the UI, even if the intention is to hide\n * the availability of that unit.\n *\n * @param rawValue Selected value to parse.\n * @param legacyUnit Legacy unit value, if rawValue needs it appended.\n * @param units List of available units.\n *\n * @return A collection of units containing the unit for the current value.\n */\nexport function getUnitsWithCurrentUnit(\n\trawValue?: string | number,\n\tlegacyUnit?: string,\n\tunits: WPUnitControlUnit[] = ALL_CSS_UNITS\n): WPUnitControlUnit[] {\n\tconst unitsToReturn = Array.isArray( units ) ? [ ...units ] : [];\n\tconst [ , currentUnit ] = getParsedQuantityAndUnit(\n\t\trawValue,\n\t\tlegacyUnit,\n\t\tALL_CSS_UNITS\n\t);\n\n\tif (\n\t\tcurrentUnit &&\n\t\t! unitsToReturn.some( ( unit ) => unit.value === currentUnit )\n\t) {\n\t\tif ( allUnits[ currentUnit ] ) {\n\t\t\tunitsToReturn.unshift( allUnits[ currentUnit ] );\n\t\t}\n\t}\n\n\treturn unitsToReturn;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,QAAQ,QAAQ,oBAAoB;;AAE7C;AACA;AACA;;AAGA,MAAMC,KAAK,GAAGD,QAAQ,CAACE,EAAE,KAAK,KAAK;AAEnC,MAAMC,QAA6C,GAAG;EACrDC,EAAE,EAAE;IACHC,KAAK,EAAE,IAAI;IACXC,KAAK,EAAEL,KAAK,GAAG,IAAI,GAAGH,EAAE,CAAE,aAAc,CAAC;IACzCS,SAAS,EAAET,EAAE,CAAE,aAAc,CAAC;IAC9BU,IAAI,EAAE;EACP,CAAC;EACD,GAAG,EAAE;IACJH,KAAK,EAAE,GAAG;IACVC,KAAK,EAAEL,KAAK,GAAG,GAAG,GAAGH,EAAE,CAAE,gBAAiB,CAAC;IAC3CS,SAAS,EAAET,EAAE,CAAE,aAAc,CAAC;IAC9BU,IAAI,EAAE;EACP,CAAC;EACDC,EAAE,EAAE;IACHJ,KAAK,EA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C,QAAQ,EACR0C,UAAU,EACVhD,aACD,CAAC;EAED,IACCkD,WAAW,IACX,CAAED,aAAa,CAACE,IAAI,CAAIjB,IAAI,IAAMA,IAAI,CAACrE,KAAK,KAAKqF,WAAY,CAAC,EAC7D;IACD,IAAKvF,QAAQ,CAAEuF,WAAW,CAAE,EAAG;MAC9BD,aAAa,CAACG,OAAO,CAAEzF,QAAQ,CAAEuF,WAAW,CAAG,CAAC;IACjD;EACD;EAEA,OAAOD,aAAa;AACrB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["__","_x","Platform","isWeb","OS","allUnits","px","value","label","a11yLabel","step","em","rem","vw","vh","vmin","vmax","ch","ex","cm","mm","in","pc","pt","svw","svh","svi","svb","svmin","lvw","lvh","lvi","lvb","lvmin","dvw","dvh","dvi","dvb","dvmin","dvmax","svmax","lvmax","ALL_CSS_UNITS","Object","values","CSS_UNITS","DEFAULT_UNIT","getParsedQuantityAndUnit","rawValue","fallbackUnit","allowedUnits","initialValue","parseQuantityAndUnitFromRawValue","hasUnits","units","Array","isArray","length","trimmedValue","quantityToReturn","trim","parsedQuantity","parseFloat","isFinite","undefined","unitMatch","match","matchedUnit","toLowerCase","unitToReturn","find","item","getValidParsedQuantityAndUnit","fallbackQuantity","parsedUnit","getAccessibleLabelForUnit","unit","filterUnitsWithSettings","allowedUnitValues","availableUnits","filter","includes","useCustomUnits","defaultValues","customUnitsToReturn","map","defaultValue","default","getUnitsWithCurrentUnit","legacyUnit","unitsToReturn","currentUnit","some","unshift"],"sources":["@wordpress/components/src/unit-control/utils.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WPUnitControlUnit } from './types';\n\nconst isWeb = Platform.OS === 'web';\n\nconst allUnits: Record< string, WPUnitControlUnit > = {\n\tpx: {\n\t\tvalue: 'px',\n\t\tlabel: isWeb ? 'px' : __( 'Pixels (px)' ),\n\t\ta11yLabel: __( 'Pixels (px)' ),\n\t\tstep: 1,\n\t},\n\t'%': {\n\t\tvalue: '%',\n\t\tlabel: isWeb ? '%' : __( 'Percentage (%)' ),\n\t\ta11yLabel: __( 'Percent (%)' ),\n\t\tstep: 0.1,\n\t},\n\tem: {\n\t\tvalue: 'em',\n\t\tlabel: isWeb ? 'em' : __( 'Relative to parent font size (em)' ),\n\t\ta11yLabel: _x( 'ems', 'Relative to parent font size (em)' ),\n\t\tstep: 0.01,\n\t},\n\trem: {\n\t\tvalue: 'rem',\n\t\tlabel: isWeb ? 'rem' : __( 'Relative to root font size (rem)' ),\n\t\ta11yLabel: _x( 'rems', 'Relative to root font size (rem)' ),\n\t\tstep: 0.01,\n\t},\n\tvw: {\n\t\tvalue: 'vw',\n\t\tlabel: isWeb ? 'vw' : __( 'Viewport width (vw)' ),\n\t\ta11yLabel: __( 'Viewport width (vw)' ),\n\t\tstep: 0.1,\n\t},\n\tvh: {\n\t\tvalue: 'vh',\n\t\tlabel: isWeb ? 'vh' : __( 'Viewport height (vh)' ),\n\t\ta11yLabel: __( 'Viewport height (vh)' ),\n\t\tstep: 0.1,\n\t},\n\tvmin: {\n\t\tvalue: 'vmin',\n\t\tlabel: isWeb ? 'vmin' : __( 'Viewport smallest dimension (vmin)' ),\n\t\ta11yLabel: __( 'Viewport smallest dimension (vmin)' ),\n\t\tstep: 0.1,\n\t},\n\tvmax: {\n\t\tvalue: 'vmax',\n\t\tlabel: isWeb ? 'vmax' : __( 'Viewport largest dimension (vmax)' ),\n\t\ta11yLabel: __( 'Viewport largest dimension (vmax)' ),\n\t\tstep: 0.1,\n\t},\n\tch: {\n\t\tvalue: 'ch',\n\t\tlabel: isWeb ? 'ch' : __( 'Width of the zero (0) character (ch)' ),\n\t\ta11yLabel: __( 'Width of the zero (0) character (ch)' ),\n\t\tstep: 0.01,\n\t},\n\tex: {\n\t\tvalue: 'ex',\n\t\tlabel: isWeb ? 'ex' : __( 'x-height of the font (ex)' ),\n\t\ta11yLabel: __( 'x-height of the font (ex)' ),\n\t\tstep: 0.01,\n\t},\n\tcm: {\n\t\tvalue: 'cm',\n\t\tlabel: isWeb ? 'cm' : __( 'Centimeters (cm)' ),\n\t\ta11yLabel: __( 'Centimeters (cm)' ),\n\t\tstep: 0.001,\n\t},\n\tmm: {\n\t\tvalue: 'mm',\n\t\tlabel: isWeb ? 'mm' : __( 'Millimeters (mm)' ),\n\t\ta11yLabel: __( 'Millimeters (mm)' ),\n\t\tstep: 0.1,\n\t},\n\tin: {\n\t\tvalue: 'in',\n\t\tlabel: isWeb ? 'in' : __( 'Inches (in)' ),\n\t\ta11yLabel: __( 'Inches (in)' ),\n\t\tstep: 0.001,\n\t},\n\tpc: {\n\t\tvalue: 'pc',\n\t\tlabel: isWeb ? 'pc' : __( 'Picas (pc)' ),\n\t\ta11yLabel: __( 'Picas (pc)' ),\n\t\tstep: 1,\n\t},\n\tpt: {\n\t\tvalue: 'pt',\n\t\tlabel: isWeb ? 'pt' : __( 'Points (pt)' ),\n\t\ta11yLabel: __( 'Points (pt)' ),\n\t\tstep: 1,\n\t},\n\tsvw: {\n\t\tvalue: 'svw',\n\t\tlabel: isWeb ? 'svw' : __( 'Small viewport width (svw)' ),\n\t\ta11yLabel: __( 'Small viewport width (svw)' ),\n\t\tstep: 0.1,\n\t},\n\tsvh: {\n\t\tvalue: 'svh',\n\t\tlabel: isWeb ? 'svh' : __( 'Small viewport height (svh)' ),\n\t\ta11yLabel: __( 'Small viewport height (svh)' ),\n\t\tstep: 0.1,\n\t},\n\tsvi: {\n\t\tvalue: 'svi',\n\t\tlabel: isWeb\n\t\t\t? 'svi'\n\t\t\t: __( 'Viewport smallest size in the inline direction (svi)' ),\n\t\ta11yLabel: __( 'Small viewport width or height (svi)' ),\n\t\tstep: 0.1,\n\t},\n\tsvb: {\n\t\tvalue: 'svb',\n\t\tlabel: isWeb\n\t\t\t? 'svb'\n\t\t\t: __( 'Viewport smallest size in the block direction (svb)' ),\n\t\ta11yLabel: __( 'Small viewport width or height (svb)' ),\n\t\tstep: 0.1,\n\t},\n\tsvmin: {\n\t\tvalue: 'svmin',\n\t\tlabel: isWeb\n\t\t\t? 'svmin'\n\t\t\t: __( 'Small viewport smallest dimension (svmin)' ),\n\t\ta11yLabel: __( 'Small viewport smallest dimension (svmin)' ),\n\t\tstep: 0.1,\n\t},\n\tlvw: {\n\t\tvalue: 'lvw',\n\t\tlabel: isWeb ? 'lvw' : __( 'Large viewport width (lvw)' ),\n\t\ta11yLabel: __( 'Large viewport width (lvw)' ),\n\t\tstep: 0.1,\n\t},\n\tlvh: {\n\t\tvalue: 'lvh',\n\t\tlabel: isWeb ? 'lvh' : __( 'Large viewport height (lvh)' ),\n\t\ta11yLabel: __( 'Large viewport height (lvh)' ),\n\t\tstep: 0.1,\n\t},\n\tlvi: {\n\t\tvalue: 'lvi',\n\t\tlabel: isWeb ? 'lvi' : __( 'Large viewport width or height (lvi)' ),\n\t\ta11yLabel: __( 'Large viewport width or height (lvi)' ),\n\t\tstep: 0.1,\n\t},\n\tlvb: {\n\t\tvalue: 'lvb',\n\t\tlabel: isWeb ? 'lvb' : __( 'Large viewport width or height (lvb)' ),\n\t\ta11yLabel: __( 'Large viewport width or height (lvb)' ),\n\t\tstep: 0.1,\n\t},\n\tlvmin: {\n\t\tvalue: 'lvmin',\n\t\tlabel: isWeb\n\t\t\t? 'lvmin'\n\t\t\t: __( 'Large viewport smallest dimension (lvmin)' ),\n\t\ta11yLabel: __( 'Large viewport smallest dimension (lvmin)' ),\n\t\tstep: 0.1,\n\t},\n\tdvw: {\n\t\tvalue: 'dvw',\n\t\tlabel: isWeb ? 'dvw' : __( 'Dynamic viewport width (dvw)' ),\n\t\ta11yLabel: __( 'Dynamic viewport width (dvw)' ),\n\t\tstep: 0.1,\n\t},\n\tdvh: {\n\t\tvalue: 'dvh',\n\t\tlabel: isWeb ? 'dvh' : __( 'Dynamic viewport height (dvh)' ),\n\t\ta11yLabel: __( 'Dynamic viewport height (dvh)' ),\n\t\tstep: 0.1,\n\t},\n\tdvi: {\n\t\tvalue: 'dvi',\n\t\tlabel: isWeb ? 'dvi' : __( 'Dynamic viewport width or height (dvi)' ),\n\t\ta11yLabel: __( 'Dynamic viewport width or height (dvi)' ),\n\t\tstep: 0.1,\n\t},\n\tdvb: {\n\t\tvalue: 'dvb',\n\t\tlabel: isWeb ? 'dvb' : __( 'Dynamic viewport width or height (dvb)' ),\n\t\ta11yLabel: __( 'Dynamic viewport width or height (dvb)' ),\n\t\tstep: 0.1,\n\t},\n\tdvmin: {\n\t\tvalue: 'dvmin',\n\t\tlabel: isWeb\n\t\t\t? 'dvmin'\n\t\t\t: __( 'Dynamic viewport smallest dimension (dvmin)' ),\n\t\ta11yLabel: __( 'Dynamic viewport smallest dimension (dvmin)' ),\n\t\tstep: 0.1,\n\t},\n\tdvmax: {\n\t\tvalue: 'dvmax',\n\t\tlabel: isWeb\n\t\t\t? 'dvmax'\n\t\t\t: __( 'Dynamic viewport largest dimension (dvmax)' ),\n\t\ta11yLabel: __( 'Dynamic viewport largest dimension (dvmax)' ),\n\t\tstep: 0.1,\n\t},\n\tsvmax: {\n\t\tvalue: 'svmax',\n\t\tlabel: isWeb\n\t\t\t? 'svmax'\n\t\t\t: __( 'Small viewport largest dimension (svmax)' ),\n\t\ta11yLabel: __( 'Small viewport largest dimension (svmax)' ),\n\t\tstep: 0.1,\n\t},\n\tlvmax: {\n\t\tvalue: 'lvmax',\n\t\tlabel: isWeb\n\t\t\t? 'lvmax'\n\t\t\t: __( 'Large viewport largest dimension (lvmax)' ),\n\t\ta11yLabel: __( 'Large viewport largest dimension (lvmax)' ),\n\t\tstep: 0.1,\n\t},\n};\n\n/**\n * An array of all available CSS length units.\n */\nexport const ALL_CSS_UNITS = Object.values( allUnits );\n\n/**\n * Units of measurements. `a11yLabel` is used by screenreaders.\n */\nexport const CSS_UNITS = [\n\tallUnits.px,\n\tallUnits[ '%' ],\n\tallUnits.em,\n\tallUnits.rem,\n\tallUnits.vw,\n\tallUnits.vh,\n];\n\nexport const DEFAULT_UNIT = allUnits.px;\n\n/**\n * Handles legacy value + unit handling.\n * This component use to manage both incoming value and units separately.\n *\n * Moving forward, ideally the value should be a string that contains both\n * the value and unit, example: '10px'\n *\n * @param rawValue The raw value as a string (may or may not contain the unit)\n * @param fallbackUnit The unit used as a fallback, if not unit is detected in the `value`\n * @param allowedUnits Units to derive from.\n * @return The extracted quantity and unit. The quantity can be `undefined` in case the raw value\n * could not be parsed to a number correctly. The unit can be `undefined` in case the unit parse\n * from the raw value could not be matched against the list of allowed units.\n */\nexport function getParsedQuantityAndUnit(\n\trawValue?: string | number,\n\tfallbackUnit?: string,\n\tallowedUnits?: WPUnitControlUnit[]\n): [ number | undefined, string | undefined ] {\n\tconst initialValue = fallbackUnit\n\t\t? `${ rawValue ?? '' }${ fallbackUnit }`\n\t\t: rawValue;\n\n\treturn parseQuantityAndUnitFromRawValue( initialValue, allowedUnits );\n}\n\n/**\n * Checks if units are defined.\n *\n * @param units List of units.\n * @return Whether the list actually contains any units.\n */\nexport function hasUnits(\n\tunits?: WPUnitControlUnit[]\n): units is WPUnitControlUnit[] {\n\t// Although the `isArray` check shouldn't be necessary (given the signature of\n\t// this typed function), it's better to stay on the side of caution, since\n\t// this function may be called from un-typed environments.\n\treturn Array.isArray( units ) && !! units.length;\n}\n\n/**\n * Parses a quantity and unit from a raw string value, given a list of allowed\n * units and otherwise falling back to the default unit.\n *\n * @param rawValue The raw value as a string (may or may not contain the unit)\n * @param allowedUnits Units to derive from.\n * @return The extracted quantity and unit. The quantity can be `undefined` in case the raw value\n * could not be parsed to a number correctly. The unit can be `undefined` in case the unit parsed\n * from the raw value could not be matched against the list of allowed units.\n */\nexport function parseQuantityAndUnitFromRawValue(\n\trawValue?: string | number,\n\tallowedUnits: WPUnitControlUnit[] = ALL_CSS_UNITS\n): [ number | undefined, string | undefined ] {\n\tlet trimmedValue;\n\tlet quantityToReturn;\n\n\tif ( typeof rawValue !== 'undefined' || rawValue === null ) {\n\t\ttrimmedValue = `${ rawValue }`.trim();\n\t\tconst parsedQuantity = parseFloat( trimmedValue );\n\t\tquantityToReturn = ! isFinite( parsedQuantity )\n\t\t\t? undefined\n\t\t\t: parsedQuantity;\n\t}\n\n\tconst unitMatch = trimmedValue?.match( /[\\d.\\-\\+]*\\s*(.*)/ );\n\tconst matchedUnit = unitMatch?.[ 1 ]?.toLowerCase();\n\tlet unitToReturn: string | undefined;\n\tif ( hasUnits( allowedUnits ) ) {\n\t\tconst match = allowedUnits.find(\n\t\t\t( item ) => item.value === matchedUnit\n\t\t);\n\t\tunitToReturn = match?.value;\n\t} else {\n\t\tunitToReturn = DEFAULT_UNIT.value;\n\t}\n\n\treturn [ quantityToReturn, unitToReturn ];\n}\n\n/**\n * Parses quantity and unit from a raw value. Validates parsed value, using fallback\n * value if invalid.\n *\n * @param rawValue The next value.\n * @param allowedUnits Units to derive from.\n * @param fallbackQuantity The fallback quantity, used in case it's not possible to parse a valid quantity from the raw value.\n * @param fallbackUnit The fallback unit, used in case it's not possible to parse a valid unit from the raw value.\n * @return The extracted quantity and unit. The quantity can be `undefined` in case the raw value\n * could not be parsed to a number correctly, and the `fallbackQuantity` was also `undefined`. The\n * unit can be `undefined` only if the unit parsed from the raw value could not be matched against\n * the list of allowed units, the `fallbackQuantity` is also `undefined` and the list of\n * `allowedUnits` is passed empty.\n */\nexport function getValidParsedQuantityAndUnit(\n\trawValue: string | number,\n\tallowedUnits?: WPUnitControlUnit[],\n\tfallbackQuantity?: number,\n\tfallbackUnit?: string\n): [ number | undefined, string | undefined ] {\n\tconst [ parsedQuantity, parsedUnit ] = parseQuantityAndUnitFromRawValue(\n\t\trawValue,\n\t\tallowedUnits\n\t);\n\n\t// The parsed value from `parseQuantityAndUnitFromRawValue` should now be\n\t// either a real number or undefined. If undefined, use the fallback value.\n\tconst quantityToReturn = parsedQuantity ?? fallbackQuantity;\n\n\t// If no unit is parsed from the raw value, or if the fallback unit is not\n\t// defined, use the first value from the list of allowed units as fallback.\n\tlet unitToReturn = parsedUnit || fallbackUnit;\n\n\tif ( ! unitToReturn && hasUnits( allowedUnits ) ) {\n\t\tunitToReturn = allowedUnits[ 0 ].value;\n\t}\n\n\treturn [ quantityToReturn, unitToReturn ];\n}\n\n/**\n * Takes a unit value and finds the matching accessibility label for the\n * unit abbreviation.\n *\n * @param unit Unit value (example: `px`)\n * @return a11y label for the unit abbreviation\n */\nexport function getAccessibleLabelForUnit( unit: string ): string | undefined {\n\tconst match = ALL_CSS_UNITS.find( ( item ) => item.value === unit );\n\treturn match?.a11yLabel ? match?.a11yLabel : match?.value;\n}\n\n/**\n * Filters available units based on values defined a list of allowed unit values.\n *\n * @param allowedUnitValues Collection of allowed unit value strings.\n * @param availableUnits Collection of available unit objects.\n * @return Filtered units.\n */\nexport function filterUnitsWithSettings(\n\tallowedUnitValues: string[] = [],\n\tavailableUnits: WPUnitControlUnit[]\n): WPUnitControlUnit[] {\n\t// Although the `isArray` check shouldn't be necessary (given the signature of\n\t// this typed function), it's better to stay on the side of caution, since\n\t// this function may be called from un-typed environments.\n\treturn Array.isArray( availableUnits )\n\t\t? availableUnits.filter( ( unit ) =>\n\t\t\t\tallowedUnitValues.includes( unit.value )\n\t\t )\n\t\t: [];\n}\n\n/**\n * Custom hook to retrieve and consolidate units setting from add_theme_support().\n * TODO: ideally this hook shouldn't be needed\n * https://github.com/WordPress/gutenberg/pull/31822#discussion_r633280823\n *\n * @param args An object containing units, settingPath & defaultUnits.\n * @param args.units Collection of all potentially available units.\n * @param args.availableUnits Collection of unit value strings for filtering available units.\n * @param args.defaultValues Collection of default values for defined units. Example: `{ px: 350, em: 15 }`.\n *\n * @return Filtered list of units, with their default values updated following the `defaultValues`\n * argument's property.\n */\nexport const useCustomUnits = ( {\n\tunits = ALL_CSS_UNITS,\n\tavailableUnits = [],\n\tdefaultValues,\n}: {\n\tunits?: WPUnitControlUnit[];\n\tavailableUnits?: string[];\n\tdefaultValues?: Record< string, number >;\n} ): WPUnitControlUnit[] => {\n\tconst customUnitsToReturn = filterUnitsWithSettings(\n\t\tavailableUnits,\n\t\tunits\n\t);\n\n\tif ( ! defaultValues ) {\n\t\treturn customUnitsToReturn;\n\t}\n\n\treturn customUnitsToReturn.map( ( unit ) => {\n\t\tconst [ defaultValue ] = defaultValues[ unit.value ]\n\t\t\t? parseQuantityAndUnitFromRawValue( defaultValues[ unit.value ] )\n\t\t\t: [];\n\t\treturn { ...unit, default: defaultValue };\n\t} );\n};\n\n/**\n * Get available units with the unit for the currently selected value\n * prepended if it is not available in the list of units.\n *\n * This is useful to ensure that the current value's unit is always\n * accurately displayed in the UI, even if the intention is to hide\n * the availability of that unit.\n *\n * @param rawValue Selected value to parse.\n * @param legacyUnit Legacy unit value, if rawValue needs it appended.\n * @param units List of available units.\n *\n * @return A collection of units containing the unit for the current value.\n */\nexport function getUnitsWithCurrentUnit(\n\trawValue?: string | number,\n\tlegacyUnit?: string,\n\tunits: WPUnitControlUnit[] = ALL_CSS_UNITS\n): WPUnitControlUnit[] {\n\tconst unitsToReturn = Array.isArray( units ) ? [ ...units ] : [];\n\tconst [ , currentUnit ] = getParsedQuantityAndUnit(\n\t\trawValue,\n\t\tlegacyUnit,\n\t\tALL_CSS_UNITS\n\t);\n\n\tif (\n\t\tcurrentUnit &&\n\t\t! unitsToReturn.some( ( unit ) => unit.value === currentUnit )\n\t) {\n\t\tif ( allUnits[ currentUnit ] ) {\n\t\t\tunitsToReturn.unshift( allUnits[ currentUnit ] );\n\t\t}\n\t}\n\n\treturn unitsToReturn;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,QAAQ,QAAQ,oBAAoB;;AAE7C;AACA;AACA;;AAGA,MAAMC,KAAK,GAAGD,QAAQ,CAACE,EAAE,KAAK,KAAK;AAEnC,MAAMC,QAA6C,GAAG;EACrDC,EAAE,EAAE;IACHC,KAAK,EAAE,IAAI;IACXC,KAAK,EAAEL,KAAK,GA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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,uBAAuBA,CACtCxC,QAA0B,EAC1ByC,UAAmB,EACnBnC,KAA0B,GAAGZ,aAAa,EACpB;EACtB,MAAMgD,aAAa,GAAGnC,KAAK,CAACC,OAAO,CAAEF,KAAM,CAAC,GAAG,CAAE,GAAGA,KAAK,CAAE,GAAG,EAAE;EAChE,MAAM,GAAIqC,WAAW,CAAE,GAAG5C,wBAAwB,CACjDC,QAAQ,EACRyC,UAAU,EACV/C,aACD,CAAC;EAED,IACCiD,WAAW,IACX,CAAED,aAAa,CAACE,IAAI,CAAIhB,IAAI,IAAMA,IAAI,CAACrE,KAAK,KAAKoF,WAAY,CAAC,EAC7D;IACD,IAAKtF,QAAQ,CAAEsF,WAAW,CAAE,EAAG;MAC9BD,aAAa,CAACG,OAAO,CAAExF,QAAQ,CAAEsF,WAAW,CAAG,CAAC;IACjD;EACD;EAEA,OAAOD,aAAa;AACrB","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 {
|
|
@@ -1296,6 +1298,9 @@ body.is-dragging-components-draggable {
|
|
|
1296
1298
|
background: linear-gradient(45deg, transparent 48%, #ddd 48%, #ddd 52%, transparent 52%);
|
|
1297
1299
|
color: transparent;
|
|
1298
1300
|
}
|
|
1301
|
+
.components-duotone-picker__color-indicator > .components-button:hover:not(:disabled):not([aria-disabled=true]) {
|
|
1302
|
+
color: transparent;
|
|
1303
|
+
}
|
|
1299
1304
|
.components-duotone-picker__color-indicator > .components-button:not([aria-disabled=true]):active {
|
|
1300
1305
|
color: transparent;
|
|
1301
1306
|
}
|
|
@@ -1450,8 +1455,8 @@ body.is-dragging-components-draggable {
|
|
|
1450
1455
|
}
|
|
1451
1456
|
}
|
|
1452
1457
|
.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);
|
|
1458
|
+
border-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1459
|
+
box-shadow: 0 0 0 0.5px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1455
1460
|
outline: 2px solid transparent;
|
|
1456
1461
|
}
|
|
1457
1462
|
.components-form-token-field__input-container::-webkit-input-placeholder {
|
|
@@ -1468,8 +1473,8 @@ body.is-dragging-components-draggable {
|
|
|
1468
1473
|
border-color: #ddd;
|
|
1469
1474
|
}
|
|
1470
1475
|
.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);
|
|
1476
|
+
border-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1477
|
+
box-shadow: 0 0 0 0.5px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1473
1478
|
outline: 2px solid transparent;
|
|
1474
1479
|
}
|
|
1475
1480
|
.components-form-token-field__input-container input[type=text].components-form-token-field__input {
|
|
@@ -1485,7 +1490,7 @@ body.is-dragging-components-draggable {
|
|
|
1485
1490
|
min-width: 50px;
|
|
1486
1491
|
background: inherit;
|
|
1487
1492
|
border: 0;
|
|
1488
|
-
color: #1e1e1e;
|
|
1493
|
+
color: var(--wp-components-color-foreground, #1e1e1e);
|
|
1489
1494
|
box-shadow: none;
|
|
1490
1495
|
}
|
|
1491
1496
|
@media (min-width: 600px) {
|
|
@@ -1597,7 +1602,7 @@ body.is-dragging-components-draggable {
|
|
|
1597
1602
|
}
|
|
1598
1603
|
|
|
1599
1604
|
.components-form-token-field__suggestion {
|
|
1600
|
-
color: #1e1e1e;
|
|
1605
|
+
color: var(--wp-components-color-foreground, #1e1e1e);
|
|
1601
1606
|
display: block;
|
|
1602
1607
|
font-size: 13px;
|
|
1603
1608
|
padding: 8px 12px;
|
|
@@ -1607,7 +1612,7 @@ body.is-dragging-components-draggable {
|
|
|
1607
1612
|
}
|
|
1608
1613
|
.components-form-token-field__suggestion.is-selected {
|
|
1609
1614
|
background: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1610
|
-
color: #fff;
|
|
1615
|
+
color: var(--wp-components-color-foreground-inverted, #fff);
|
|
1611
1616
|
}
|
|
1612
1617
|
.components-form-token-field__suggestion[aria-disabled=true] {
|
|
1613
1618
|
pointer-events: none;
|
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 {
|
|
@@ -1301,6 +1303,9 @@ body.is-dragging-components-draggable {
|
|
|
1301
1303
|
background: linear-gradient(-45deg, transparent 48%, #ddd 48%, #ddd 52%, transparent 52%);
|
|
1302
1304
|
color: transparent;
|
|
1303
1305
|
}
|
|
1306
|
+
.components-duotone-picker__color-indicator > .components-button:hover:not(:disabled):not([aria-disabled=true]) {
|
|
1307
|
+
color: transparent;
|
|
1308
|
+
}
|
|
1304
1309
|
.components-duotone-picker__color-indicator > .components-button:not([aria-disabled=true]):active {
|
|
1305
1310
|
color: transparent;
|
|
1306
1311
|
}
|
|
@@ -1455,8 +1460,8 @@ body.is-dragging-components-draggable {
|
|
|
1455
1460
|
}
|
|
1456
1461
|
}
|
|
1457
1462
|
.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);
|
|
1463
|
+
border-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1464
|
+
box-shadow: 0 0 0 0.5px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1460
1465
|
outline: 2px solid transparent;
|
|
1461
1466
|
}
|
|
1462
1467
|
.components-form-token-field__input-container::-webkit-input-placeholder {
|
|
@@ -1473,8 +1478,8 @@ body.is-dragging-components-draggable {
|
|
|
1473
1478
|
border-color: #ddd;
|
|
1474
1479
|
}
|
|
1475
1480
|
.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);
|
|
1481
|
+
border-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1482
|
+
box-shadow: 0 0 0 0.5px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1478
1483
|
outline: 2px solid transparent;
|
|
1479
1484
|
}
|
|
1480
1485
|
.components-form-token-field__input-container input[type=text].components-form-token-field__input {
|
|
@@ -1490,7 +1495,7 @@ body.is-dragging-components-draggable {
|
|
|
1490
1495
|
min-width: 50px;
|
|
1491
1496
|
background: inherit;
|
|
1492
1497
|
border: 0;
|
|
1493
|
-
color: #1e1e1e;
|
|
1498
|
+
color: var(--wp-components-color-foreground, #1e1e1e);
|
|
1494
1499
|
box-shadow: none;
|
|
1495
1500
|
}
|
|
1496
1501
|
@media (min-width: 600px) {
|
|
@@ -1602,7 +1607,7 @@ body.is-dragging-components-draggable {
|
|
|
1602
1607
|
}
|
|
1603
1608
|
|
|
1604
1609
|
.components-form-token-field__suggestion {
|
|
1605
|
-
color: #1e1e1e;
|
|
1610
|
+
color: var(--wp-components-color-foreground, #1e1e1e);
|
|
1606
1611
|
display: block;
|
|
1607
1612
|
font-size: 13px;
|
|
1608
1613
|
padding: 8px 12px;
|
|
@@ -1612,7 +1617,7 @@ body.is-dragging-components-draggable {
|
|
|
1612
1617
|
}
|
|
1613
1618
|
.components-form-token-field__suggestion.is-selected {
|
|
1614
1619
|
background: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
1615
|
-
color: #fff;
|
|
1620
|
+
color: var(--wp-components-color-foreground-inverted, #fff);
|
|
1616
1621
|
}
|
|
1617
1622
|
.components-form-token-field__suggestion[aria-disabled=true] {
|
|
1618
1623
|
pointer-events: none;
|
|
@@ -31,6 +31,6 @@ import type { GuideProps } from './types';
|
|
|
31
31
|
* }
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
|
-
declare function Guide({ children, className, contentLabel, finishButtonText, onFinish, pages, }: GuideProps): import("react").JSX.Element | null;
|
|
34
|
+
declare function Guide({ children, className, contentLabel, finishButtonText, nextButtonText, previousButtonText, onFinish, pages, }: GuideProps): import("react").JSX.Element | null;
|
|
35
35
|
export default Guide;
|
|
36
36
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/guide/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,iBAAS,KAAK,CAAE,EACf,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,gBAAiC,EACjC,QAAQ,EACR,KAAU,GACV,EAAE,UAAU,sCAoHZ;AAED,eAAe,KAAK,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/guide/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,iBAAS,KAAK,CAAE,EACf,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,gBAAiC,EACjC,cAA6B,EAC7B,kBAAqC,EACrC,QAAQ,EACR,KAAU,GACV,EAAE,UAAU,sCAoHZ;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/guide/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAWtD,OAAO,KAAK,MAAM,IAAI,CAAC;AAEvB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/guide/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAWtD,OAAO,KAAK,MAAM,IAAI,CAAC;AAEvB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,KAAK,CAU7B,CAAC;AACF,eAAe,IAAI,CAAC;AA0BpB,eAAO,MAAM,OAAO,oHAAsB,CAAC"}
|
|
@@ -37,6 +37,18 @@ export type GuideProps = {
|
|
|
37
37
|
* @default 'Finish'
|
|
38
38
|
*/
|
|
39
39
|
finishButtonText?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Use this to customize the label of the _Next_ button shown on each page of the guide.
|
|
42
|
+
*
|
|
43
|
+
* @default 'Next'
|
|
44
|
+
*/
|
|
45
|
+
nextButtonText?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Use this to customize the label of the _Previous_ button shown on each page of the guide except the first.
|
|
48
|
+
*
|
|
49
|
+
* @default 'Previous'
|
|
50
|
+
*/
|
|
51
|
+
previousButtonText?: string;
|
|
40
52
|
/**
|
|
41
53
|
* A function which is called when the guide is finished.
|
|
42
54
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/guide/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,MAAM,IAAI,GAAG;IAClB;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACxB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,YAAY,EAAE,UAAU,CAAE,cAAc,CAAE,CAAC;IAC3C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,QAAQ,EAAE,UAAU,CAAE,gBAAgB,CAAE,CAAC;IACzC;;;;OAIG;IACH,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC9B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,cAAc,EAAE,CAAE,IAAI,EAAE,MAAM,KAAM,IAAI,CAAC;CACzC,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/guide/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,MAAM,IAAI,GAAG;IAClB;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACxB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,YAAY,EAAE,UAAU,CAAE,cAAc,CAAE,CAAC;IAC3C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,QAAQ,EAAE,UAAU,CAAE,gBAAgB,CAAE,CAAC;IACzC;;;;OAIG;IACH,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC9B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,cAAc,EAAE,CAAE,IAAI,EAAE,MAAM,KAAM,IAAI,CAAC;CACzC,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;AAsanC,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":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,KAAK,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACjD,KAAK,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AACjD,KAAK,cAAc,GAAG,KAAK,GAAG,OAA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