@wordpress/primitives 3.48.0 → 3.49.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 +2 -0
- package/build/block-quotation/index.js +1 -2
- package/build/block-quotation/index.js.map +1 -1
- package/build/block-quotation/index.native.js +1 -2
- package/build/block-quotation/index.native.js.map +1 -1
- package/build/horizontal-rule/index.js +1 -2
- package/build/horizontal-rule/index.js.map +1 -1
- package/build/horizontal-rule/index.native.js +1 -2
- package/build/horizontal-rule/index.native.js.map +1 -1
- package/build/svg/index.js +1 -2
- package/build/svg/index.js.map +1 -1
- package/build/view/index.js +1 -2
- package/build/view/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BlockQuotation = void 0;
|
|
7
|
-
const BlockQuotation = 'blockquote';
|
|
8
|
-
exports.BlockQuotation = BlockQuotation;
|
|
7
|
+
const BlockQuotation = exports.BlockQuotation = 'blockquote';
|
|
9
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BlockQuotation","exports"],"sources":["@wordpress/primitives/src/block-quotation/index.js"],"sourcesContent":["export const BlockQuotation = 'blockquote';\n"],"mappings":";;;;;;AAAO,MAAMA,cAAc,
|
|
1
|
+
{"version":3,"names":["BlockQuotation","exports"],"sources":["@wordpress/primitives/src/block-quotation/index.js"],"sourcesContent":["export const BlockQuotation = 'blockquote';\n"],"mappings":";;;;;;AAAO,MAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,YAAY"}
|
|
@@ -22,7 +22,7 @@ var _style = _interopRequireDefault(require("./style.scss"));
|
|
|
22
22
|
* Internal dependencies
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
const BlockQuotation = (0, _element.forwardRef)(({
|
|
25
|
+
const BlockQuotation = exports.BlockQuotation = (0, _element.forwardRef)(({
|
|
26
26
|
...props
|
|
27
27
|
}, ref) => {
|
|
28
28
|
const {
|
|
@@ -58,5 +58,4 @@ const BlockQuotation = (0, _element.forwardRef)(({
|
|
|
58
58
|
style: blockQuoteStyle
|
|
59
59
|
}, newChildren);
|
|
60
60
|
});
|
|
61
|
-
exports.BlockQuotation = BlockQuotation;
|
|
62
61
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_element","_compose","_style","_interopRequireDefault","BlockQuotation","forwardRef","props","ref","style","blockQuoteStyle","usePreferredColorSchemeStyle","styles","wpBlockQuoteLight","wpBlockQuoteDark","baseColors","color","text","borderLeftColor","backgroundColor","paddingWithBackground","colorStyle","newChildren","Children","map","children","child","identifier","cloneElement","wpBlockQuoteCitation","tagsToEliminate","_react","createElement","View"
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_element","_compose","_style","_interopRequireDefault","BlockQuotation","exports","forwardRef","props","ref","style","blockQuoteStyle","usePreferredColorSchemeStyle","styles","wpBlockQuoteLight","wpBlockQuoteDark","baseColors","color","text","borderLeftColor","backgroundColor","paddingWithBackground","colorStyle","newChildren","Children","map","children","child","identifier","cloneElement","wpBlockQuoteCitation","tagsToEliminate","_react","createElement","View"],"sources":["@wordpress/primitives/src/block-quotation/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { Children, cloneElement, forwardRef } from '@wordpress/element';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nexport const BlockQuotation = forwardRef( ( { ...props }, ref ) => {\n\tconst { style } = props;\n\n\tconst blockQuoteStyle = [\n\t\tusePreferredColorSchemeStyle(\n\t\t\tstyles.wpBlockQuoteLight,\n\t\t\tstyles.wpBlockQuoteDark\n\t\t),\n\t\tstyle?.baseColors?.color?.text && {\n\t\t\tborderLeftColor: style.baseColors.color.text,\n\t\t},\n\t\tstyle?.color && {\n\t\t\tborderLeftColor: style.color,\n\t\t},\n\t\tstyle,\n\t\tstyle?.backgroundColor && styles.paddingWithBackground,\n\t];\n\tconst colorStyle = style?.color ? { color: style.color } : {};\n\n\tconst newChildren = Children.map( props.children, ( child ) => {\n\t\tif ( child && child.props.identifier === 'citation' ) {\n\t\t\treturn cloneElement( child, {\n\t\t\t\tstyle: {\n\t\t\t\t\t...styles.wpBlockQuoteCitation,\n\t\t\t\t\t...colorStyle,\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\t\tif ( child && child.props.identifier === 'value' ) {\n\t\t\treturn cloneElement( child, {\n\t\t\t\ttagsToEliminate: [ 'div' ],\n\t\t\t\tstyle: colorStyle,\n\t\t\t} );\n\t\t}\n\t\treturn child;\n\t} );\n\treturn (\n\t\t<View ref={ ref } style={ blockQuoteStyle }>\n\t\t\t{ newChildren }\n\t\t</View>\n\t);\n} );\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAIA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAIA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAZA;AACA;AACA;;AAEA;AACA;AACA;;AAGA;AACA;AACA;;AAGO,MAAMK,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,IAAAE,mBAAU,EAAE,CAAE;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAM;EAClE,MAAM;IAAEC;EAAM,CAAC,GAAGF,KAAK;EAEvB,MAAMG,eAAe,GAAG,CACvB,IAAAC,qCAA4B,EAC3BC,cAAM,CAACC,iBAAiB,EACxBD,cAAM,CAACE,gBACR,CAAC,EACDL,KAAK,EAAEM,UAAU,EAAEC,KAAK,EAAEC,IAAI,IAAI;IACjCC,eAAe,EAAET,KAAK,CAACM,UAAU,CAACC,KAAK,CAACC;EACzC,CAAC,EACDR,KAAK,EAAEO,KAAK,IAAI;IACfE,eAAe,EAAET,KAAK,CAACO;EACxB,CAAC,EACDP,KAAK,EACLA,KAAK,EAAEU,eAAe,IAAIP,cAAM,CAACQ,qBAAqB,CACtD;EACD,MAAMC,UAAU,GAAGZ,KAAK,EAAEO,KAAK,GAAG;IAAEA,KAAK,EAAEP,KAAK,CAACO;EAAM,CAAC,GAAG,CAAC,CAAC;EAE7D,MAAMM,WAAW,GAAGC,iBAAQ,CAACC,GAAG,CAAEjB,KAAK,CAACkB,QAAQ,EAAIC,KAAK,IAAM;IAC9D,IAAKA,KAAK,IAAIA,KAAK,CAACnB,KAAK,CAACoB,UAAU,KAAK,UAAU,EAAG;MACrD,OAAO,IAAAC,qBAAY,EAAEF,KAAK,EAAE;QAC3BjB,KAAK,EAAE;UACN,GAAGG,cAAM,CAACiB,oBAAoB;UAC9B,GAAGR;QACJ;MACD,CAAE,CAAC;IACJ;IACA,IAAKK,KAAK,IAAIA,KAAK,CAACnB,KAAK,CAACoB,UAAU,KAAK,OAAO,EAAG;MAClD,OAAO,IAAAC,qBAAY,EAAEF,KAAK,EAAE;QAC3BI,eAAe,EAAE,CAAE,KAAK,CAAE;QAC1BrB,KAAK,EAAEY;MACR,CAAE,CAAC;IACJ;IACA,OAAOK,KAAK;EACb,CAAE,CAAC;EACH,OACC,IAAAK,MAAA,CAAAC,aAAA,EAAClC,YAAA,CAAAmC,IAAI;IAACzB,GAAG,EAAGA,GAAK;IAACC,KAAK,EAAGC;EAAiB,GACxCY,WACG,CAAC;AAET,CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["HorizontalRule","exports"],"sources":["@wordpress/primitives/src/horizontal-rule/index.js"],"sourcesContent":["export const HorizontalRule = 'hr';\n"],"mappings":";;;;;;AAAO,MAAMA,cAAc,
|
|
1
|
+
{"version":3,"names":["HorizontalRule","exports"],"sources":["@wordpress/primitives/src/horizontal-rule/index.js"],"sourcesContent":["export const HorizontalRule = 'hr';\n"],"mappings":";;;;;;AAAO,MAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,IAAI"}
|
|
@@ -55,6 +55,5 @@ const HR = ({
|
|
|
55
55
|
...props
|
|
56
56
|
}, renderInner());
|
|
57
57
|
};
|
|
58
|
-
const HorizontalRule = (0, _compose.withPreferredColorScheme)(HR);
|
|
59
|
-
exports.HorizontalRule = HorizontalRule;
|
|
58
|
+
const HorizontalRule = exports.HorizontalRule = (0, _compose.withPreferredColorScheme)(HR);
|
|
60
59
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_compose","_styles","_interopRequireDefault","HR","getStylesFromColorScheme","lineStyle","marginLeft","marginRight","style","textStyle","text","props","renderLine","key","_react","createElement","View","styles","line","lineDark","renderText","textContainer","Text","renderInner","container","HorizontalRule","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_compose","_styles","_interopRequireDefault","HR","getStylesFromColorScheme","lineStyle","marginLeft","marginRight","style","textStyle","text","props","renderLine","key","_react","createElement","View","styles","line","lineDark","renderText","textContainer","Text","renderInner","container","HorizontalRule","exports","withPreferredColorScheme"],"sources":["@wordpress/primitives/src/horizontal-rule/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Text, View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { withPreferredColorScheme } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './styles.scss';\n\nconst HR = ( {\n\tgetStylesFromColorScheme,\n\tlineStyle,\n\tmarginLeft,\n\tmarginRight,\n\tstyle,\n\ttextStyle,\n\ttext,\n\t...props\n} ) => {\n\tconst renderLine = ( key ) => (\n\t\t<View\n\t\t\tkey={ key }\n\t\t\tstyle={ [\n\t\t\t\tgetStylesFromColorScheme( styles.line, styles.lineDark ),\n\t\t\t\tlineStyle,\n\t\t\t] }\n\t\t/>\n\t);\n\n\tconst renderText = ( key ) => (\n\t\t<View key={ key } style={ styles.textContainer }>\n\t\t\t<Text style={ [ styles.text, textStyle ] }>{ text }</Text>\n\t\t</View>\n\t);\n\n\tconst renderInner = () => {\n\t\tif ( ! text ) {\n\t\t\treturn renderLine();\n\t\t}\n\t\treturn [ renderLine( 1 ), renderText( 2 ), renderLine( 3 ) ];\n\t};\n\n\treturn (\n\t\t<View\n\t\t\tstyle={ [ styles.container, { marginLeft, marginRight }, style ] }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ renderInner() }\n\t\t</View>\n\t);\n};\n\nexport const HorizontalRule = withPreferredColorScheme( HR );\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AAbA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,MAAMI,EAAE,GAAGA,CAAE;EACZC,wBAAwB;EACxBC,SAAS;EACTC,UAAU;EACVC,WAAW;EACXC,KAAK;EACLC,SAAS;EACTC,IAAI;EACJ,GAAGC;AACJ,CAAC,KAAM;EACN,MAAMC,UAAU,GAAKC,GAAG,IACvB,IAAAC,MAAA,CAAAC,aAAA,EAACjB,YAAA,CAAAkB,IAAI;IACJH,GAAG,EAAGA,GAAK;IACXL,KAAK,EAAG,CACPJ,wBAAwB,CAAEa,eAAM,CAACC,IAAI,EAAED,eAAM,CAACE,QAAS,CAAC,EACxDd,SAAS;EACP,CACH,CACD;EAED,MAAMe,UAAU,GAAKP,GAAG,IACvB,IAAAC,MAAA,CAAAC,aAAA,EAACjB,YAAA,CAAAkB,IAAI;IAACH,GAAG,EAAGA,GAAK;IAACL,KAAK,EAAGS,eAAM,CAACI;EAAe,GAC/C,IAAAP,MAAA,CAAAC,aAAA,EAACjB,YAAA,CAAAwB,IAAI;IAACd,KAAK,EAAG,CAAES,eAAM,CAACP,IAAI,EAAED,SAAS;EAAI,GAAGC,IAAY,CACpD,CACN;EAED,MAAMa,WAAW,GAAGA,CAAA,KAAM;IACzB,IAAK,CAAEb,IAAI,EAAG;MACb,OAAOE,UAAU,CAAC,CAAC;IACpB;IACA,OAAO,CAAEA,UAAU,CAAE,CAAE,CAAC,EAAEQ,UAAU,CAAE,CAAE,CAAC,EAAER,UAAU,CAAE,CAAE,CAAC,CAAE;EAC7D,CAAC;EAED,OACC,IAAAE,MAAA,CAAAC,aAAA,EAACjB,YAAA,CAAAkB,IAAI;IACJR,KAAK,EAAG,CAAES,eAAM,CAACO,SAAS,EAAE;MAAElB,UAAU;MAAEC;IAAY,CAAC,EAAEC,KAAK,CAAI;IAAA,GAC7DG;EAAK,GAERY,WAAW,CAAC,CACT,CAAC;AAET,CAAC;AAEM,MAAME,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,IAAAE,iCAAwB,EAAExB,EAAG,CAAC"}
|
package/build/svg/index.js
CHANGED
|
@@ -96,7 +96,7 @@ const LinearGradient = props => (0, _element.createElement)('linearGradient', pr
|
|
|
96
96
|
exports.LinearGradient = LinearGradient;
|
|
97
97
|
const Stop = props => (0, _element.createElement)('stop', props);
|
|
98
98
|
exports.Stop = Stop;
|
|
99
|
-
const SVG = (0, _element.forwardRef)(
|
|
99
|
+
const SVG = exports.SVG = (0, _element.forwardRef)(
|
|
100
100
|
/**
|
|
101
101
|
* @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed.
|
|
102
102
|
* Other props will be passed through to svg component.
|
|
@@ -125,6 +125,5 @@ const SVG = (0, _element.forwardRef)(
|
|
|
125
125
|
ref: ref
|
|
126
126
|
});
|
|
127
127
|
});
|
|
128
|
-
exports.SVG = SVG;
|
|
129
128
|
SVG.displayName = 'SVG';
|
|
130
129
|
//# sourceMappingURL=index.js.map
|
package/build/svg/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classnames","_interopRequireDefault","require","_element","Circle","props","createElement","exports","G","Line","Path","Polygon","Rect","Defs","RadialGradient","LinearGradient","Stop","SVG","forwardRef","className","isPressed","ref","appliedProps","classnames","undefined","focusable","displayName"],"sources":["@wordpress/primitives/src/svg/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { createElement, forwardRef } from '@wordpress/element';\n\n/** @typedef {{isPressed?: boolean} & import('react').ComponentPropsWithoutRef<'svg'>} SVGProps */\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'circle'>} props\n *\n * @return {JSX.Element} Circle component\n */\nexport const Circle = ( props ) => createElement( 'circle', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'g'>} props\n *\n * @return {JSX.Element} G component\n */\nexport const G = ( props ) => createElement( 'g', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'line'>} props\n *\n * @return {JSX.Element} Path component\n */\nexport const Line = ( props ) => createElement( 'line', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'path'>} props\n *\n * @return {JSX.Element} Path component\n */\nexport const Path = ( props ) => createElement( 'path', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'polygon'>} props\n *\n * @return {JSX.Element} Polygon component\n */\nexport const Polygon = ( props ) => createElement( 'polygon', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'rect'>} props\n *\n * @return {JSX.Element} Rect component\n */\nexport const Rect = ( props ) => createElement( 'rect', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'defs'>} props\n *\n * @return {JSX.Element} Defs component\n */\nexport const Defs = ( props ) => createElement( 'defs', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'radialGradient'>} props\n *\n * @return {JSX.Element} RadialGradient component\n */\nexport const RadialGradient = ( props ) =>\n\tcreateElement( 'radialGradient', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'linearGradient'>} props\n *\n * @return {JSX.Element} LinearGradient component\n */\nexport const LinearGradient = ( props ) =>\n\tcreateElement( 'linearGradient', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'stop'>} props\n *\n * @return {JSX.Element} Stop component\n */\nexport const Stop = ( props ) => createElement( 'stop', props );\n\nexport const SVG = forwardRef(\n\t/**\n\t * @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed.\n\t * Other props will be passed through to svg component.\n\t * @param {import('react').ForwardedRef<SVGSVGElement>} ref The forwarded ref to the SVG element.\n\t *\n\t * @return {JSX.Element} Stop component\n\t */\n\t( { className, isPressed, ...props }, ref ) => {\n\t\tconst appliedProps = {\n\t\t\t...props,\n\t\t\tclassName:\n\t\t\t\tclassnames( className, { 'is-pressed': isPressed } ) ||\n\t\t\t\tundefined,\n\t\t\t'aria-hidden': true,\n\t\t\tfocusable: false,\n\t\t};\n\n\t\t// Disable reason: We need to have a way to render HTML tag for web.\n\t\t// eslint-disable-next-line react/forbid-elements\n\t\treturn <svg { ...appliedProps } ref={ ref } />;\n\t}\n);\nSVG.displayName = 'SVG';\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACO,MAAME,MAAM,GAAKC,KAAK,IAAM,IAAAC,sBAAa,EAAE,QAAQ,EAAED,KAAM,CAAC;;AAEnE;AACA;AACA;AACA;AACA;AAJAE,OAAA,CAAAH,MAAA,GAAAA,MAAA;AAKO,MAAMI,CAAC,GAAKH,KAAK,IAAM,IAAAC,sBAAa,EAAE,GAAG,EAAED,KAAM,CAAC;;AAEzD;AACA;AACA;AACA;AACA;AAJAE,OAAA,CAAAC,CAAA,GAAAA,CAAA;AAKO,MAAMC,IAAI,GAAKJ,KAAK,IAAM,IAAAC,sBAAa,EAAE,MAAM,EAAED,KAAM,CAAC;;AAE/D;AACA;AACA;AACA;AACA;AAJAE,OAAA,CAAAE,IAAA,GAAAA,IAAA;AAKO,MAAMC,IAAI,GAAKL,KA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BAAU,EAAEJ,SAAS,EAAE;MAAE,YAAY,EAAEC;IAAU,CAAE,CAAC,IACpDI,SAAS;IACV,aAAa,EAAE,IAAI;IACnBC,SAAS,EAAE;EACZ,CAAC;;EAED;EACA;EACA,OAAO,IAAAtB,QAAA,CAAAG,aAAA;IAAA,GAAUgB,YAAY;IAAGD,GAAG,EAAGA;EAAK,CAAE,CAAC;AAC/C,CACD,CAAC;
|
|
1
|
+
{"version":3,"names":["_classnames","_interopRequireDefault","require","_element","Circle","props","createElement","exports","G","Line","Path","Polygon","Rect","Defs","RadialGradient","LinearGradient","Stop","SVG","forwardRef","className","isPressed","ref","appliedProps","classnames","undefined","focusable","displayName"],"sources":["@wordpress/primitives/src/svg/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { createElement, forwardRef } from '@wordpress/element';\n\n/** @typedef {{isPressed?: boolean} & import('react').ComponentPropsWithoutRef<'svg'>} SVGProps */\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'circle'>} props\n *\n * @return {JSX.Element} Circle component\n */\nexport const Circle = ( props ) => createElement( 'circle', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'g'>} props\n *\n * @return {JSX.Element} G component\n */\nexport const G = ( props ) => createElement( 'g', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'line'>} props\n *\n * @return {JSX.Element} Path component\n */\nexport const Line = ( props ) => createElement( 'line', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'path'>} props\n *\n * @return {JSX.Element} Path component\n */\nexport const Path = ( props ) => createElement( 'path', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'polygon'>} props\n *\n * @return {JSX.Element} Polygon component\n */\nexport const Polygon = ( props ) => createElement( 'polygon', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'rect'>} props\n *\n * @return {JSX.Element} Rect component\n */\nexport const Rect = ( props ) => createElement( 'rect', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'defs'>} props\n *\n * @return {JSX.Element} Defs component\n */\nexport const Defs = ( props ) => createElement( 'defs', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'radialGradient'>} props\n *\n * @return {JSX.Element} RadialGradient component\n */\nexport const RadialGradient = ( props ) =>\n\tcreateElement( 'radialGradient', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'linearGradient'>} props\n *\n * @return {JSX.Element} LinearGradient component\n */\nexport const LinearGradient = ( props ) =>\n\tcreateElement( 'linearGradient', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'stop'>} props\n *\n * @return {JSX.Element} Stop component\n */\nexport const Stop = ( props ) => createElement( 'stop', props );\n\nexport const SVG = forwardRef(\n\t/**\n\t * @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed.\n\t * Other props will be passed through to svg component.\n\t * @param {import('react').ForwardedRef<SVGSVGElement>} ref The forwarded ref to the SVG element.\n\t *\n\t * @return {JSX.Element} Stop component\n\t */\n\t( { className, isPressed, ...props }, ref ) => {\n\t\tconst appliedProps = {\n\t\t\t...props,\n\t\t\tclassName:\n\t\t\t\tclassnames( className, { 'is-pressed': isPressed } ) ||\n\t\t\t\tundefined,\n\t\t\t'aria-hidden': true,\n\t\t\tfocusable: false,\n\t\t};\n\n\t\t// Disable reason: We need to have a way to render HTML tag for web.\n\t\t// eslint-disable-next-line react/forbid-elements\n\t\treturn <svg { ...appliedProps } ref={ ref } />;\n\t}\n);\nSVG.displayName = 'SVG';\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACO,MAAME,MAAM,GAAKC,KAAK,IAAM,IAAAC,sBAAa,EAAE,QAAQ,EAAED,KAAM,CAAC;;AAEnE;AACA;AACA;AACA;AACA;AAJAE,OAAA,C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A;AAKO,MAAMC,IAAI,GAAKX,KAAK,IAAM,IAAAC,sBAAa,EAAE,MAAM,EAAED,KAAM,CAAC;AAACE,OAAA,CAAAS,IAAA,GAAAA,IAAA;AAEzD,MAAMC,GAAG,GAAAV,OAAA,CAAAU,GAAA,GAAG,IAAAC,mBAAU;AAC5B;AACD;AACA;AACA;AACA;AACA;AACA;AACC,CAAE;EAAEC,SAAS;EAAEC,SAAS;EAAE,GAAGf;AAAM,CAAC,EAAEgB,GAAG,KAAM;EAC9C,MAAMC,YAAY,GAAG;IACpB,GAAGjB,KAAK;IACRc,SAAS,EACR,IAAAI,mBAAU,EAAEJ,SAAS,EAAE;MAAE,YAAY,EAAEC;IAAU,CAAE,CAAC,IACpDI,SAAS;IACV,aAAa,EAAE,IAAI;IACnBC,SAAS,EAAE;EACZ,CAAC;;EAED;EACA;EACA,OAAO,IAAAtB,QAAA,CAAAG,aAAA;IAAA,GAAUgB,YAAY;IAAGD,GAAG,EAAGA;EAAK,CAAE,CAAC;AAC/C,CACD,CAAC;AACDJ,GAAG,CAACS,WAAW,GAAG,KAAK"}
|
package/build/view/index.js
CHANGED
package/build/view/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","exports"],"sources":["@wordpress/primitives/src/view/index.js"],"sourcesContent":["export const View = 'div';\n"],"mappings":";;;;;;AAAO,MAAMA,IAAI,
|
|
1
|
+
{"version":3,"names":["View","exports"],"sources":["@wordpress/primitives/src/view/index.js"],"sourcesContent":["export const View = 'div';\n"],"mappings":";;;;;;AAAO,MAAMA,IAAI,GAAAC,OAAA,CAAAD,IAAA,GAAG,KAAK"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/primitives",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.49.0",
|
|
4
4
|
"description": "WordPress cross-platform primitives.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"types": "build-types",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.16.0",
|
|
34
|
-
"@wordpress/element": "^5.
|
|
34
|
+
"@wordpress/element": "^5.28.0",
|
|
35
35
|
"classnames": "^2.3.1"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "eb796371e9630636a4a8837033807b0c4a06ed67"
|
|
41
41
|
}
|