@wordpress/block-editor
Version:
8 lines (7 loc) • 1.56 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../../../src/components/responsive-block-control/label.js"],
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { VisuallyHidden } from '@wordpress/components';\nimport { _x, sprintf } from '@wordpress/i18n';\n\nexport default function ResponsiveBlockControlLabel( {\n\tproperty,\n\tviewport,\n\tdesc,\n} ) {\n\tconst instanceId = useInstanceId( ResponsiveBlockControlLabel );\n\tconst accessibleLabel =\n\t\tdesc ||\n\t\tsprintf(\n\t\t\t/* translators: 1: property name. 2: viewport name. */\n\t\t\t_x(\n\t\t\t\t'Controls the %1$s property for %2$s viewports.',\n\t\t\t\t'Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size.'\n\t\t\t),\n\t\t\tproperty,\n\t\t\tviewport.label\n\t\t);\n\treturn (\n\t\t<>\n\t\t\t<span aria-describedby={ `rbc-desc-${ instanceId }` }>\n\t\t\t\t{ viewport.label }\n\t\t\t</span>\n\t\t\t<VisuallyHidden as=\"span\" id={ `rbc-desc-${ instanceId }` }>\n\t\t\t\t{ accessibleLabel }\n\t\t\t</VisuallyHidden>\n\t\t</>\n\t);\n}\n"],
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA8B;AAC9B,wBAA+B;AAC/B,kBAA4B;AAoB1B;AAlBa,SAAR,4BAA8C;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM,iBAAa,8BAAe,2BAA4B;AAC9D,QAAM,kBACL,YACA;AAAA;AAAA,QAEC;AAAA,MACC;AAAA,MACA;AAAA,IACD;AAAA,IACA;AAAA,IACA,SAAS;AAAA,EACV;AACD,SACC,4EACC;AAAA,gDAAC,UAAK,oBAAmB,YAAa,UAAW,IAC9C,mBAAS,OACZ;AAAA,IACA,4CAAC,oCAAe,IAAG,QAAO,IAAK,YAAa,UAAW,IACpD,2BACH;AAAA,KACD;AAEF;",
"names": []
}