@wordpress/ui 0.7.2-next.v.202602200903.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -1
- package/CONTRIBUTING.md +51 -0
- package/build/badge/badge.cjs +2 -2
- package/build/badge/badge.cjs.map +2 -2
- package/build/button/button.cjs +5 -5
- package/build/button/button.cjs.map +2 -2
- package/build/dialog/footer.cjs +3 -3
- package/build/dialog/footer.cjs.map +2 -2
- package/build/dialog/header.cjs +3 -3
- package/build/dialog/header.cjs.map +2 -2
- package/build/dialog/popup.cjs +3 -3
- package/build/dialog/popup.cjs.map +2 -2
- package/build/dialog/title.cjs +3 -3
- package/build/dialog/title.cjs.map +2 -2
- package/build/form/primitives/field/description.cjs +2 -2
- package/build/form/primitives/field/description.cjs.map +2 -2
- package/build/form/primitives/field/details.cjs +2 -2
- package/build/form/primitives/field/details.cjs.map +2 -2
- package/build/form/primitives/field/label.cjs +2 -2
- package/build/form/primitives/field/label.cjs.map +2 -2
- package/build/form/primitives/field/root.cjs +1 -1
- package/build/form/primitives/field/root.cjs.map +2 -2
- package/build/form/primitives/fieldset/description.cjs +2 -2
- package/build/form/primitives/fieldset/description.cjs.map +2 -2
- package/build/form/primitives/fieldset/details.cjs +2 -2
- package/build/form/primitives/fieldset/details.cjs.map +2 -2
- package/build/form/primitives/fieldset/legend.cjs +2 -2
- package/build/form/primitives/fieldset/legend.cjs.map +2 -2
- package/build/form/primitives/fieldset/root.cjs +2 -2
- package/build/form/primitives/fieldset/root.cjs.map +2 -2
- package/build/form/primitives/input/input.cjs +4 -4
- package/build/form/primitives/input/input.cjs.map +2 -2
- package/build/form/primitives/input-layout/input-layout.cjs +21 -8
- package/build/form/primitives/input-layout/input-layout.cjs.map +2 -2
- package/build/form/primitives/input-layout/slot.cjs +5 -14
- package/build/form/primitives/input-layout/slot.cjs.map +2 -2
- package/build/form/primitives/input-layout/types.cjs.map +1 -1
- package/build/form/primitives/select/item.cjs +3 -3
- package/build/form/primitives/select/item.cjs.map +2 -2
- package/build/form/primitives/select/popup.cjs +4 -4
- package/build/form/primitives/select/popup.cjs.map +2 -2
- package/build/form/primitives/select/trigger.cjs +4 -4
- package/build/form/primitives/select/trigger.cjs.map +2 -2
- package/build/form/primitives/textarea/textarea.cjs +1 -1
- package/build/form/primitives/textarea/textarea.cjs.map +2 -2
- package/build/icon-button/icon-button.cjs +7 -2
- package/build/icon-button/icon-button.cjs.map +2 -2
- package/build/index.cjs +3 -0
- package/build/index.cjs.map +2 -2
- package/build/notice/action-button.cjs +76 -0
- package/build/notice/action-button.cjs.map +7 -0
- package/build/notice/action-link.cjs +70 -0
- package/build/notice/action-link.cjs.map +7 -0
- package/build/notice/actions.cjs +59 -0
- package/build/notice/actions.cjs.map +7 -0
- package/build/notice/close-icon.cjs +74 -0
- package/build/notice/close-icon.cjs.map +7 -0
- package/build/notice/description.cjs +57 -0
- package/build/notice/description.cjs.map +7 -0
- package/build/notice/index.cjs +49 -0
- package/build/notice/index.cjs.map +7 -0
- package/build/notice/root.cjs +137 -0
- package/build/notice/root.cjs.map +7 -0
- package/build/notice/title.cjs +54 -0
- package/build/notice/title.cjs.map +7 -0
- package/build/notice/types.cjs +19 -0
- package/build/notice/types.cjs.map +7 -0
- package/build/stack/stack.cjs +11 -2
- package/build/stack/stack.cjs.map +2 -2
- package/build/tabs/list.cjs +2 -2
- package/build/tabs/list.cjs.map +2 -2
- package/build/tabs/panel.cjs +2 -2
- package/build/tabs/panel.cjs.map +2 -2
- package/build/tabs/tab.cjs +2 -2
- package/build/tabs/tab.cjs.map +2 -2
- package/build/tooltip/popup.cjs +3 -3
- package/build/tooltip/popup.cjs.map +2 -2
- package/build/visually-hidden/visually-hidden.cjs +1 -1
- package/build/visually-hidden/visually-hidden.cjs.map +2 -2
- package/build-module/badge/badge.mjs +2 -2
- package/build-module/badge/badge.mjs.map +2 -2
- package/build-module/button/button.mjs +5 -5
- package/build-module/button/button.mjs.map +2 -2
- package/build-module/dialog/footer.mjs +3 -3
- package/build-module/dialog/footer.mjs.map +2 -2
- package/build-module/dialog/header.mjs +3 -3
- package/build-module/dialog/header.mjs.map +2 -2
- package/build-module/dialog/popup.mjs +3 -3
- package/build-module/dialog/popup.mjs.map +2 -2
- package/build-module/dialog/title.mjs +3 -3
- package/build-module/dialog/title.mjs.map +2 -2
- package/build-module/form/primitives/field/description.mjs +2 -2
- package/build-module/form/primitives/field/description.mjs.map +2 -2
- package/build-module/form/primitives/field/details.mjs +2 -2
- package/build-module/form/primitives/field/details.mjs.map +2 -2
- package/build-module/form/primitives/field/label.mjs +2 -2
- package/build-module/form/primitives/field/label.mjs.map +2 -2
- package/build-module/form/primitives/field/root.mjs +1 -1
- package/build-module/form/primitives/field/root.mjs.map +2 -2
- package/build-module/form/primitives/fieldset/description.mjs +2 -2
- package/build-module/form/primitives/fieldset/description.mjs.map +2 -2
- package/build-module/form/primitives/fieldset/details.mjs +2 -2
- package/build-module/form/primitives/fieldset/details.mjs.map +2 -2
- package/build-module/form/primitives/fieldset/legend.mjs +2 -2
- package/build-module/form/primitives/fieldset/legend.mjs.map +2 -2
- package/build-module/form/primitives/fieldset/root.mjs +2 -2
- package/build-module/form/primitives/fieldset/root.mjs.map +2 -2
- package/build-module/form/primitives/input/input.mjs +4 -4
- package/build-module/form/primitives/input/input.mjs.map +2 -2
- package/build-module/form/primitives/input-layout/input-layout.mjs +22 -9
- package/build-module/form/primitives/input-layout/input-layout.mjs.map +2 -2
- package/build-module/form/primitives/input-layout/slot.mjs +5 -14
- package/build-module/form/primitives/input-layout/slot.mjs.map +2 -2
- package/build-module/form/primitives/select/item.mjs +3 -3
- package/build-module/form/primitives/select/item.mjs.map +2 -2
- package/build-module/form/primitives/select/popup.mjs +4 -4
- package/build-module/form/primitives/select/popup.mjs.map +2 -2
- package/build-module/form/primitives/select/trigger.mjs +4 -4
- package/build-module/form/primitives/select/trigger.mjs.map +2 -2
- package/build-module/form/primitives/textarea/textarea.mjs +1 -1
- package/build-module/form/primitives/textarea/textarea.mjs.map +2 -2
- package/build-module/icon-button/icon-button.mjs +7 -2
- package/build-module/icon-button/icon-button.mjs.map +2 -2
- package/build-module/index.mjs +2 -0
- package/build-module/index.mjs.map +2 -2
- package/build-module/notice/action-button.mjs +41 -0
- package/build-module/notice/action-button.mjs.map +7 -0
- package/build-module/notice/action-link.mjs +35 -0
- package/build-module/notice/action-link.mjs.map +7 -0
- package/build-module/notice/actions.mjs +34 -0
- package/build-module/notice/actions.mjs.map +7 -0
- package/build-module/notice/close-icon.mjs +39 -0
- package/build-module/notice/close-icon.mjs.map +7 -0
- package/build-module/notice/description.mjs +32 -0
- package/build-module/notice/description.mjs.map +7 -0
- package/build-module/notice/index.mjs +18 -0
- package/build-module/notice/index.mjs.map +7 -0
- package/build-module/notice/root.mjs +102 -0
- package/build-module/notice/root.mjs.map +7 -0
- package/build-module/notice/title.mjs +29 -0
- package/build-module/notice/title.mjs.map +7 -0
- package/build-module/notice/types.mjs +1 -0
- package/build-module/notice/types.mjs.map +7 -0
- package/build-module/stack/stack.mjs +11 -2
- package/build-module/stack/stack.mjs.map +2 -2
- package/build-module/tabs/list.mjs +2 -2
- package/build-module/tabs/list.mjs.map +2 -2
- package/build-module/tabs/panel.mjs +2 -2
- package/build-module/tabs/panel.mjs.map +2 -2
- package/build-module/tabs/tab.mjs +2 -2
- package/build-module/tabs/tab.mjs.map +2 -2
- package/build-module/tooltip/popup.mjs +3 -3
- package/build-module/tooltip/popup.mjs.map +2 -2
- package/build-module/visually-hidden/visually-hidden.mjs +1 -1
- package/build-module/visually-hidden/visually-hidden.mjs.map +2 -2
- package/build-types/dialog/stories/index.story.d.ts +10 -0
- package/build-types/dialog/stories/index.story.d.ts.map +1 -1
- package/build-types/form/primitives/input-layout/input-layout.d.ts.map +1 -1
- package/build-types/form/primitives/input-layout/slot.d.ts.map +1 -1
- package/build-types/form/primitives/input-layout/types.d.ts +1 -9
- package/build-types/form/primitives/input-layout/types.d.ts.map +1 -1
- package/build-types/icon-button/icon-button.d.ts.map +1 -1
- package/build-types/index.d.ts +1 -0
- package/build-types/index.d.ts.map +1 -1
- package/build-types/notice/action-button.d.ts +6 -0
- package/build-types/notice/action-button.d.ts.map +1 -0
- package/build-types/notice/action-link.d.ts +8 -0
- package/build-types/notice/action-link.d.ts.map +1 -0
- package/build-types/notice/actions.d.ts +6 -0
- package/build-types/notice/actions.d.ts.map +1 -0
- package/build-types/notice/close-icon.d.ts +6 -0
- package/build-types/notice/close-icon.d.ts.map +1 -0
- package/build-types/notice/description.d.ts +6 -0
- package/build-types/notice/description.d.ts.map +1 -0
- package/build-types/notice/index.d.ts +10 -0
- package/build-types/notice/index.d.ts.map +1 -0
- package/build-types/notice/root.d.ts +23 -0
- package/build-types/notice/root.d.ts.map +1 -0
- package/build-types/notice/stories/index.story.d.ts +28 -0
- package/build-types/notice/stories/index.story.d.ts.map +1 -0
- package/build-types/notice/test/index.test.d.ts +2 -0
- package/build-types/notice/test/index.test.d.ts.map +1 -0
- package/build-types/notice/title.d.ts +6 -0
- package/build-types/notice/title.d.ts.map +1 -0
- package/build-types/notice/types.d.ts +77 -0
- package/build-types/notice/types.d.ts.map +1 -0
- package/build-types/stack/stack.d.ts.map +1 -1
- package/package.json +11 -11
- package/src/dialog/stories/index.story.tsx +14 -0
- package/src/dialog/style.module.css +2 -0
- package/src/form/primitives/input-layout/input-layout.tsx +17 -8
- package/src/form/primitives/input-layout/slot.tsx +1 -15
- package/src/form/primitives/input-layout/style.module.css +6 -2
- package/src/form/primitives/input-layout/test/index.test.tsx +34 -1
- package/src/form/primitives/input-layout/types.ts +1 -10
- package/src/icon-button/icon-button.tsx +5 -0
- package/src/icon-button/test/index.test.tsx +33 -0
- package/src/index.ts +1 -0
- package/src/notice/action-button.tsx +36 -0
- package/src/notice/action-link.tsx +28 -0
- package/src/notice/actions.tsx +25 -0
- package/src/notice/close-icon.tsx +30 -0
- package/src/notice/description.tsx +23 -0
- package/src/notice/index.ts +19 -0
- package/src/notice/root.tsx +132 -0
- package/src/notice/stories/index.story.tsx +157 -0
- package/src/notice/style.module.css +147 -0
- package/src/notice/test/index.test.tsx +206 -0
- package/src/notice/title.tsx +20 -0
- package/src/notice/types.ts +100 -0
- package/src/stack/stack.tsx +14 -1
- package/build/form/primitives/input-layout/context.cjs +0 -49
- package/build/form/primitives/input-layout/context.cjs.map +0 -7
- package/build-module/form/primitives/input-layout/context.mjs +0 -22
- package/build-module/form/primitives/input-layout/context.mjs.map +0 -7
- package/build-types/form/primitives/input-layout/context.d.ts +0 -17
- package/build-types/form/primitives/input-layout/context.d.ts.map +0 -1
- package/src/form/primitives/input-layout/context.tsx +0 -36
|
@@ -39,10 +39,10 @@ var import_element = require("@wordpress/element");
|
|
|
39
39
|
var import_i18n = require("@wordpress/i18n");
|
|
40
40
|
|
|
41
41
|
// packages/ui/src/utils/css/field.module.css
|
|
42
|
-
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='04c8f253c6']")) {
|
|
42
|
+
if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='04c8f253c6']")) {
|
|
43
43
|
const style = document.createElement("style");
|
|
44
44
|
style.setAttribute("data-wp-hash", "04c8f253c6");
|
|
45
|
-
style.appendChild(document.createTextNode(
|
|
45
|
+
style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-font-line-height-xs,16px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-xs,11px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-font-size-md,13px);text-transform:none}}._08a3750500e0233f__description{color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);line-height:var(--wpds-font-line-height-xs,16px);margin:0}}'));
|
|
46
46
|
document.head.appendChild(style);
|
|
47
47
|
}
|
|
48
48
|
var field_default = { "label": "_2d5ad850b2f90964__label", "is-plain": "_17c4214649230bea__is-plain", "description": "_08a3750500e0233f__description" };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/form/primitives/field/details.tsx", "../../../../src/utils/css/field.module.css"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport { Field as _Field } from '@base-ui/react/field';\nimport { forwardRef } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport fieldStyles from '../../../utils/css/field.module.css';\nimport type { FieldDetailsProps } from './types';\nimport { VisuallyHidden } from '../../../visually-hidden';\n\n/**\n * A component for showing additional information about the field,\n * styled similarly to a normal `Field.Description`.\n * Unlike a normal description, it can include links and other semantic elements.\n *\n * Although this content is not associated with the field using direct semantics,\n * it is made discoverable to screen reader users via a visually hidden description,\n * alerting them to the presence of additional information below.\n *\n * If the content only includes plain text, use `Field.Description` instead,\n * so the readout is not unnecessarily verbose for screen reader users.\n */\nexport const Details = forwardRef< HTMLDivElement, FieldDetailsProps >(\n\tfunction Details( { className, ...restProps }, ref ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<_Field.Description render={ <VisuallyHidden /> }>\n\t\t\t\t\t{ __( 'More details follow the field.' ) }\n\t\t\t\t</_Field.Description>\n\t\t\t\t<div\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tclassName={ clsx( fieldStyles.description, className ) }\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t></div>\n\t\t\t</>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='04c8f253c6']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"04c8f253c6\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-font-line-height-xs);color:var(--wpds-color-fg-content-neutral);font-family:var(--wpds-font-family-body);font-size:var(--wpds-font-size-xs);font-weight:var(--wpds-font-weight-medium);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-font-size-md);text-transform:none}}._08a3750500e0233f__description{color:var(--wpds-color-fg-content-neutral-weak);font-family:var(--wpds-font-family-body);font-size:var(--wpds-font-size-sm);line-height:var(--wpds-font-line-height-xs);margin:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"label\":\"_2d5ad850b2f90964__label\",\"is-plain\":\"_17c4214649230bea__is-plain\",\"description\":\"_08a3750500e0233f__description\"};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,mBAAgC;AAChC,qBAA2B;AAC3B,kBAAmB;;;ACHnB,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport { Field as _Field } from '@base-ui/react/field';\nimport { forwardRef } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport fieldStyles from '../../../utils/css/field.module.css';\nimport type { FieldDetailsProps } from './types';\nimport { VisuallyHidden } from '../../../visually-hidden';\n\n/**\n * A component for showing additional information about the field,\n * styled similarly to a normal `Field.Description`.\n * Unlike a normal description, it can include links and other semantic elements.\n *\n * Although this content is not associated with the field using direct semantics,\n * it is made discoverable to screen reader users via a visually hidden description,\n * alerting them to the presence of additional information below.\n *\n * If the content only includes plain text, use `Field.Description` instead,\n * so the readout is not unnecessarily verbose for screen reader users.\n */\nexport const Details = forwardRef< HTMLDivElement, FieldDetailsProps >(\n\tfunction Details( { className, ...restProps }, ref ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<_Field.Description render={ <VisuallyHidden /> }>\n\t\t\t\t\t{ __( 'More details follow the field.' ) }\n\t\t\t\t</_Field.Description>\n\t\t\t\t<div\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tclassName={ clsx( fieldStyles.description, className ) }\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t></div>\n\t\t\t</>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='04c8f253c6']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"04c8f253c6\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-font-line-height-xs,16px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-font-size-xs,11px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-font-size-md,13px);text-transform:none}}._08a3750500e0233f__description{color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d);font-family:var(--wpds-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-font-size-sm,12px);line-height:var(--wpds-font-line-height-xs,16px);margin:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"label\":\"_2d5ad850b2f90964__label\",\"is-plain\":\"_17c4214649230bea__is-plain\",\"description\":\"_08a3750500e0233f__description\"};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,mBAAgC;AAChC,qBAA2B;AAC3B,kBAAmB;;;ACHnB,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,w9BAAg/B,CAAC;AAC3hC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,SAAQ,4BAA2B,YAAW,+BAA8B,eAAc,iCAAgC;;;ADA1I,6BAA+B;AAiB5B;AAHI,IAAM,cAAU;AAAA,EACtB,SAASA,SAAS,EAAE,WAAW,GAAG,UAAU,GAAG,KAAM;AACpD,WACC,4EACC;AAAA,kDAAC,aAAAC,MAAO,aAAP,EAAmB,QAAS,4CAAC,yCAAe,GAC1C,8BAAI,gCAAiC,GACxC;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACA;AAAA,UACA,eAAY,YAAAC,SAAM,cAAY,aAAa,SAAU;AAAA,UACnD,GAAG;AAAA;AAAA,MACL;AAAA,OACF;AAAA,EAEF;AACD;",
|
|
6
6
|
"names": ["Details", "_Field", "clsx"]
|
|
7
7
|
}
|
|
@@ -38,10 +38,10 @@ var import_field = require("@base-ui/react/field");
|
|
|
38
38
|
var import_element = require("@wordpress/element");
|
|
39
39
|
|
|
40
40
|
// packages/ui/src/utils/css/field.module.css
|
|
41
|
-
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='04c8f253c6']")) {
|
|
41
|
+
if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='04c8f253c6']")) {
|
|
42
42
|
const style = document.createElement("style");
|
|
43
43
|
style.setAttribute("data-wp-hash", "04c8f253c6");
|
|
44
|
-
style.appendChild(document.createTextNode(
|
|
44
|
+
style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-font-line-height-xs,16px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-xs,11px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-font-size-md,13px);text-transform:none}}._08a3750500e0233f__description{color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);line-height:var(--wpds-font-line-height-xs,16px);margin:0}}'));
|
|
45
45
|
document.head.appendChild(style);
|
|
46
46
|
}
|
|
47
47
|
var field_default = { "label": "_2d5ad850b2f90964__label", "is-plain": "_17c4214649230bea__is-plain", "description": "_08a3750500e0233f__description" };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/form/primitives/field/label.tsx", "../../../../src/utils/css/field.module.css"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport { Field as _Field } from '@base-ui/react/field';\nimport { forwardRef } from '@wordpress/element';\nimport fieldStyles from '../../../utils/css/field.module.css';\nimport type { FieldLabelProps } from './types';\n\nexport const Label = forwardRef< HTMLLabelElement, FieldLabelProps >(\n\tfunction Label( { className, variant, ...restProps }, ref ) {\n\t\treturn (\n\t\t\t<_Field.Label\n\t\t\t\tref={ ref }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\tfieldStyles.label,\n\t\t\t\t\tvariant && fieldStyles[ `is-${ variant }` ],\n\t\t\t\t\tclassName\n\t\t\t\t) }\n\t\t\t\t{ ...restProps }\n\t\t\t/>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='04c8f253c6']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"04c8f253c6\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-font-line-height-xs);color:var(--wpds-color-fg-content-neutral);font-family:var(--wpds-font-family-body);font-size:var(--wpds-font-size-xs);font-weight:var(--wpds-font-weight-medium);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-font-size-md);text-transform:none}}._08a3750500e0233f__description{color:var(--wpds-color-fg-content-neutral-weak);font-family:var(--wpds-font-family-body);font-size:var(--wpds-font-size-sm);line-height:var(--wpds-font-line-height-xs);margin:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"label\":\"_2d5ad850b2f90964__label\",\"is-plain\":\"_17c4214649230bea__is-plain\",\"description\":\"_08a3750500e0233f__description\"};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,mBAAgC;AAChC,qBAA2B;;;ACF3B,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport { Field as _Field } from '@base-ui/react/field';\nimport { forwardRef } from '@wordpress/element';\nimport fieldStyles from '../../../utils/css/field.module.css';\nimport type { FieldLabelProps } from './types';\n\nexport const Label = forwardRef< HTMLLabelElement, FieldLabelProps >(\n\tfunction Label( { className, variant, ...restProps }, ref ) {\n\t\treturn (\n\t\t\t<_Field.Label\n\t\t\t\tref={ ref }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\tfieldStyles.label,\n\t\t\t\t\tvariant && fieldStyles[ `is-${ variant }` ],\n\t\t\t\t\tclassName\n\t\t\t\t) }\n\t\t\t\t{ ...restProps }\n\t\t\t/>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='04c8f253c6']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"04c8f253c6\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-font-line-height-xs,16px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-font-size-xs,11px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-font-size-md,13px);text-transform:none}}._08a3750500e0233f__description{color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d);font-family:var(--wpds-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-font-size-sm,12px);line-height:var(--wpds-font-line-height-xs,16px);margin:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"label\":\"_2d5ad850b2f90964__label\",\"is-plain\":\"_17c4214649230bea__is-plain\",\"description\":\"_08a3750500e0233f__description\"};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,mBAAgC;AAChC,qBAA2B;;;ACF3B,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,w9BAAg/B,CAAC;AAC3hC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,SAAQ,4BAA2B,YAAW,+BAA8B,eAAc,iCAAgC;;;ADGvI;AAHI,IAAM,YAAQ;AAAA,EACpB,SAASA,OAAO,EAAE,WAAW,SAAS,GAAG,UAAU,GAAG,KAAM;AAC3D,WACC;AAAA,MAAC,aAAAC,MAAO;AAAA,MAAP;AAAA,QACA;AAAA,QACA,eAAY,YAAAC;AAAA,UACX,cAAY;AAAA,UACZ,WAAW,cAAa,MAAO,OAAQ,EAAG;AAAA,UAC1C;AAAA,QACD;AAAA,QACE,GAAG;AAAA;AAAA,IACN;AAAA,EAEF;AACD;",
|
|
6
6
|
"names": ["Label", "_Field", "clsx"]
|
|
7
7
|
}
|
|
@@ -38,7 +38,7 @@ var import_field = require("@base-ui/react/field");
|
|
|
38
38
|
var import_element = require("@wordpress/element");
|
|
39
39
|
|
|
40
40
|
// packages/ui/src/utils/css/resets.module.css
|
|
41
|
-
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='671ebfc62d']")) {
|
|
41
|
+
if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='671ebfc62d']")) {
|
|
42
42
|
const style = document.createElement("style");
|
|
43
43
|
style.setAttribute("data-wp-hash", "671ebfc62d");
|
|
44
44
|
style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}"));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/form/primitives/field/root.tsx", "../../../../src/utils/css/resets.module.css"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport { Field as _Field } from '@base-ui/react/field';\nimport { forwardRef } from '@wordpress/element';\nimport resetStyles from '../../../utils/css/resets.module.css';\nimport type { FieldRootProps } from './types';\nimport { Stack } from '../../../stack';\n\nconst DEFAULT_RENDER = ( props: React.ComponentProps< typeof Stack > ) => (\n\t<Stack { ...props } direction=\"column\" gap=\"sm\" />\n);\n\n/**\n * A low-level component that associates an accessible label and description\n * with a single form control element.\n *\n * To label a group of multiple form control elements, use the `Fieldset` component instead.\n *\n * Simply wrapping a control with this component does not guarantee\n * accessible labeling. See examples for how to associate the label in different cases.\n */\nexport const Root = forwardRef< HTMLDivElement, FieldRootProps >( function Root(\n\t{ className, render = DEFAULT_RENDER, ...restProps },\n\tref\n) {\n\treturn (\n\t\t<_Field.Root\n\t\t\tref={ ref }\n\t\t\tclassName={ clsx( resetStyles[ 'box-sizing' ], className ) }\n\t\t\trender={ render }\n\t\t\t{ ...restProps }\n\t\t/>\n\t);\n} );\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='671ebfc62d']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"671ebfc62d\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"box-sizing\":\"_336cd3e4e743482f__box-sizing\"};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,mBAAgC;AAChC,qBAA2B;;;ACF3B,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport { Field as _Field } from '@base-ui/react/field';\nimport { forwardRef } from '@wordpress/element';\nimport resetStyles from '../../../utils/css/resets.module.css';\nimport type { FieldRootProps } from './types';\nimport { Stack } from '../../../stack';\n\nconst DEFAULT_RENDER = ( props: React.ComponentProps< typeof Stack > ) => (\n\t<Stack { ...props } direction=\"column\" gap=\"sm\" />\n);\n\n/**\n * A low-level component that associates an accessible label and description\n * with a single form control element.\n *\n * To label a group of multiple form control elements, use the `Fieldset` component instead.\n *\n * Simply wrapping a control with this component does not guarantee\n * accessible labeling. See examples for how to associate the label in different cases.\n */\nexport const Root = forwardRef< HTMLDivElement, FieldRootProps >( function Root(\n\t{ className, render = DEFAULT_RENDER, ...restProps },\n\tref\n) {\n\treturn (\n\t\t<_Field.Root\n\t\t\tref={ ref }\n\t\t\tclassName={ clsx( resetStyles[ 'box-sizing' ], className ) }\n\t\t\trender={ render }\n\t\t\t{ ...restProps }\n\t\t/>\n\t);\n} );\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='671ebfc62d']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"671ebfc62d\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"box-sizing\":\"_336cd3e4e743482f__box-sizing\"};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,mBAAgC;AAChC,qBAA2B;;;ACF3B,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,kMAAkM,CAAC;AAC7O,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,iBAAQ,EAAC,cAAa,gCAA+B;;;ADD5D,mBAAsB;AAGrB;AADD,IAAM,iBAAiB,CAAE,UACxB,4CAAC,sBAAQ,GAAG,OAAQ,WAAU,UAAS,KAAI,MAAK;AAY1C,IAAM,WAAO,2BAA8C,SAASA,MAC1E,EAAE,WAAW,SAAS,gBAAgB,GAAG,UAAU,GACnD,KACC;AACD,SACC;AAAA,IAAC,aAAAC,MAAO;AAAA,IAAP;AAAA,MACA;AAAA,MACA,eAAY,YAAAC,SAAM,eAAa,YAAa,GAAG,SAAU;AAAA,MACzD;AAAA,MACE,GAAG;AAAA;AAAA,EACN;AAEF,CAAE;",
|
|
6
6
|
"names": ["Root", "_Field", "clsx"]
|
|
7
7
|
}
|
|
@@ -38,10 +38,10 @@ var import_react = require("@base-ui/react");
|
|
|
38
38
|
var import_element = require("@wordpress/element");
|
|
39
39
|
|
|
40
40
|
// packages/ui/src/utils/css/field.module.css
|
|
41
|
-
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='04c8f253c6']")) {
|
|
41
|
+
if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='04c8f253c6']")) {
|
|
42
42
|
const style = document.createElement("style");
|
|
43
43
|
style.setAttribute("data-wp-hash", "04c8f253c6");
|
|
44
|
-
style.appendChild(document.createTextNode(
|
|
44
|
+
style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-font-line-height-xs,16px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-xs,11px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-font-size-md,13px);text-transform:none}}._08a3750500e0233f__description{color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);line-height:var(--wpds-font-line-height-xs,16px);margin:0}}'));
|
|
45
45
|
document.head.appendChild(style);
|
|
46
46
|
}
|
|
47
47
|
var field_default = { "label": "_2d5ad850b2f90964__label", "is-plain": "_17c4214649230bea__is-plain", "description": "_08a3750500e0233f__description" };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/form/primitives/fieldset/description.tsx", "../../../../src/utils/css/field.module.css"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport { mergeProps, useRender } from '@base-ui/react';\nimport { forwardRef, useEffect, useId } from '@wordpress/element';\nimport fieldStyles from '../../../utils/css/field.module.css';\nimport { useFieldsetContext } from './context';\nimport type { FieldsetDescriptionProps } from './types';\n\nexport const FieldsetDescription = forwardRef<\n\tHTMLParagraphElement,\n\tFieldsetDescriptionProps\n>( function FieldsetDescription(\n\t{ className, id: idProp, render, ...restProps },\n\tref\n) {\n\tconst generatedId = useId();\n\tconst id = idProp ?? generatedId;\n\tconst { registerDescriptionId, unregisterDescriptionId } =\n\t\tuseFieldsetContext();\n\n\tuseEffect( () => {\n\t\tregisterDescriptionId( id );\n\t\treturn unregisterDescriptionId;\n\t}, [ registerDescriptionId, unregisterDescriptionId, id ] );\n\n\tconst element = useRender( {\n\t\tdefaultTagName: 'p',\n\t\trender,\n\t\tref,\n\t\tprops: mergeProps< 'p' >(\n\t\t\t{ className: clsx( fieldStyles.description, className ), id },\n\t\t\trestProps\n\t\t),\n\t} );\n\n\treturn element;\n} );\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='04c8f253c6']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"04c8f253c6\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-font-line-height-xs);color:var(--wpds-color-fg-content-neutral);font-family:var(--wpds-font-family-body);font-size:var(--wpds-font-size-xs);font-weight:var(--wpds-font-weight-medium);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-font-size-md);text-transform:none}}._08a3750500e0233f__description{color:var(--wpds-color-fg-content-neutral-weak);font-family:var(--wpds-font-family-body);font-size:var(--wpds-font-size-sm);line-height:var(--wpds-font-line-height-xs);margin:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"label\":\"_2d5ad850b2f90964__label\",\"is-plain\":\"_17c4214649230bea__is-plain\",\"description\":\"_08a3750500e0233f__description\"};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,mBAAsC;AACtC,qBAA6C;;;ACF7C,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport { mergeProps, useRender } from '@base-ui/react';\nimport { forwardRef, useEffect, useId } from '@wordpress/element';\nimport fieldStyles from '../../../utils/css/field.module.css';\nimport { useFieldsetContext } from './context';\nimport type { FieldsetDescriptionProps } from './types';\n\nexport const FieldsetDescription = forwardRef<\n\tHTMLParagraphElement,\n\tFieldsetDescriptionProps\n>( function FieldsetDescription(\n\t{ className, id: idProp, render, ...restProps },\n\tref\n) {\n\tconst generatedId = useId();\n\tconst id = idProp ?? generatedId;\n\tconst { registerDescriptionId, unregisterDescriptionId } =\n\t\tuseFieldsetContext();\n\n\tuseEffect( () => {\n\t\tregisterDescriptionId( id );\n\t\treturn unregisterDescriptionId;\n\t}, [ registerDescriptionId, unregisterDescriptionId, id ] );\n\n\tconst element = useRender( {\n\t\tdefaultTagName: 'p',\n\t\trender,\n\t\tref,\n\t\tprops: mergeProps< 'p' >(\n\t\t\t{ className: clsx( fieldStyles.description, className ), id },\n\t\t\trestProps\n\t\t),\n\t} );\n\n\treturn element;\n} );\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='04c8f253c6']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"04c8f253c6\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-font-line-height-xs,16px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-font-size-xs,11px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-font-size-md,13px);text-transform:none}}._08a3750500e0233f__description{color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d);font-family:var(--wpds-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-font-size-sm,12px);line-height:var(--wpds-font-line-height-xs,16px);margin:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"label\":\"_2d5ad850b2f90964__label\",\"is-plain\":\"_17c4214649230bea__is-plain\",\"description\":\"_08a3750500e0233f__description\"};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,mBAAsC;AACtC,qBAA6C;;;ACF7C,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,w9BAAg/B,CAAC;AAC3hC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,SAAQ,4BAA2B,YAAW,+BAA8B,eAAc,iCAAgC;;;ADF1I,qBAAmC;AAG5B,IAAM,0BAAsB,2BAGhC,SAASA,qBACX,EAAE,WAAW,IAAI,QAAQ,QAAQ,GAAG,UAAU,GAC9C,KACC;AACD,QAAM,kBAAc,sBAAM;AAC1B,QAAM,KAAK,UAAU;AACrB,QAAM,EAAE,uBAAuB,wBAAwB,QACtD,mCAAmB;AAEpB,gCAAW,MAAM;AAChB,0BAAuB,EAAG;AAC1B,WAAO;AAAA,EACR,GAAG,CAAE,uBAAuB,yBAAyB,EAAG,CAAE;AAE1D,QAAM,cAAU,wBAAW;AAAA,IAC1B,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,IACA,WAAO;AAAA,MACN,EAAE,eAAW,YAAAC,SAAM,cAAY,aAAa,SAAU,GAAG,GAAG;AAAA,MAC5D;AAAA,IACD;AAAA,EACD,CAAE;AAEF,SAAO;AACR,CAAE;",
|
|
6
6
|
"names": ["FieldsetDescription", "clsx"]
|
|
7
7
|
}
|
|
@@ -38,10 +38,10 @@ var import_element = require("@wordpress/element");
|
|
|
38
38
|
var import_i18n = require("@wordpress/i18n");
|
|
39
39
|
|
|
40
40
|
// packages/ui/src/utils/css/field.module.css
|
|
41
|
-
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='04c8f253c6']")) {
|
|
41
|
+
if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='04c8f253c6']")) {
|
|
42
42
|
const style = document.createElement("style");
|
|
43
43
|
style.setAttribute("data-wp-hash", "04c8f253c6");
|
|
44
|
-
style.appendChild(document.createTextNode(
|
|
44
|
+
style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-font-line-height-xs,16px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-xs,11px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-font-size-md,13px);text-transform:none}}._08a3750500e0233f__description{color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);line-height:var(--wpds-font-line-height-xs,16px);margin:0}}'));
|
|
45
45
|
document.head.appendChild(style);
|
|
46
46
|
}
|
|
47
47
|
var field_default = { "label": "_2d5ad850b2f90964__label", "is-plain": "_17c4214649230bea__is-plain", "description": "_08a3750500e0233f__description" };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/form/primitives/fieldset/details.tsx", "../../../../src/utils/css/field.module.css"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport { forwardRef, useEffect, useId } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport fieldStyles from '../../../utils/css/field.module.css';\nimport { useFieldsetContext } from './context';\nimport { VisuallyHidden } from '../../../visually-hidden';\nimport type { FieldsetDetailsProps } from './types';\n\n/**\n * A component for showing additional information about the fieldset,\n * styled similarly to a normal `Fieldset.Description`.\n * Unlike a normal description, it can include links and other semantic elements.\n *\n * Although this content is not associated with the fieldset using direct semantics,\n * it is made discoverable to screen reader users via a visually hidden description,\n * alerting them to the presence of additional information below.\n *\n * If the content only includes plain text, use `Fieldset.Description` instead,\n * so the readout is not unnecessarily verbose for screen reader users.\n */\nexport const FieldsetDetails = forwardRef<\n\tHTMLDivElement,\n\tFieldsetDetailsProps\n>( function FieldsetDetails( { className, ...restProps }, ref ) {\n\tconst id = useId();\n\tconst { registerDescriptionId, unregisterDescriptionId } =\n\t\tuseFieldsetContext();\n\n\tuseEffect( () => {\n\t\tregisterDescriptionId( id );\n\t\treturn unregisterDescriptionId;\n\t}, [ registerDescriptionId, unregisterDescriptionId, id ] );\n\n\treturn (\n\t\t<>\n\t\t\t<VisuallyHidden id={ id }>\n\t\t\t\t{ __( 'More details follow.' ) }\n\t\t\t</VisuallyHidden>\n\t\t\t<div\n\t\t\t\tref={ ref }\n\t\t\t\tclassName={ clsx( fieldStyles.description, className ) }\n\t\t\t\t{ ...restProps }\n\t\t\t/>\n\t\t</>\n\t);\n} );\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='04c8f253c6']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"04c8f253c6\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-font-line-height-xs);color:var(--wpds-color-fg-content-neutral);font-family:var(--wpds-font-family-body);font-size:var(--wpds-font-size-xs);font-weight:var(--wpds-font-weight-medium);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-font-size-md);text-transform:none}}._08a3750500e0233f__description{color:var(--wpds-color-fg-content-neutral-weak);font-family:var(--wpds-font-family-body);font-size:var(--wpds-font-size-sm);line-height:var(--wpds-font-line-height-xs);margin:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"label\":\"_2d5ad850b2f90964__label\",\"is-plain\":\"_17c4214649230bea__is-plain\",\"description\":\"_08a3750500e0233f__description\"};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,qBAA6C;AAC7C,kBAAmB;;;ACFnB,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport { forwardRef, useEffect, useId } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport fieldStyles from '../../../utils/css/field.module.css';\nimport { useFieldsetContext } from './context';\nimport { VisuallyHidden } from '../../../visually-hidden';\nimport type { FieldsetDetailsProps } from './types';\n\n/**\n * A component for showing additional information about the fieldset,\n * styled similarly to a normal `Fieldset.Description`.\n * Unlike a normal description, it can include links and other semantic elements.\n *\n * Although this content is not associated with the fieldset using direct semantics,\n * it is made discoverable to screen reader users via a visually hidden description,\n * alerting them to the presence of additional information below.\n *\n * If the content only includes plain text, use `Fieldset.Description` instead,\n * so the readout is not unnecessarily verbose for screen reader users.\n */\nexport const FieldsetDetails = forwardRef<\n\tHTMLDivElement,\n\tFieldsetDetailsProps\n>( function FieldsetDetails( { className, ...restProps }, ref ) {\n\tconst id = useId();\n\tconst { registerDescriptionId, unregisterDescriptionId } =\n\t\tuseFieldsetContext();\n\n\tuseEffect( () => {\n\t\tregisterDescriptionId( id );\n\t\treturn unregisterDescriptionId;\n\t}, [ registerDescriptionId, unregisterDescriptionId, id ] );\n\n\treturn (\n\t\t<>\n\t\t\t<VisuallyHidden id={ id }>\n\t\t\t\t{ __( 'More details follow.' ) }\n\t\t\t</VisuallyHidden>\n\t\t\t<div\n\t\t\t\tref={ ref }\n\t\t\t\tclassName={ clsx( fieldStyles.description, className ) }\n\t\t\t\t{ ...restProps }\n\t\t\t/>\n\t\t</>\n\t);\n} );\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='04c8f253c6']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"04c8f253c6\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-font-line-height-xs,16px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-font-size-xs,11px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-font-size-md,13px);text-transform:none}}._08a3750500e0233f__description{color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d);font-family:var(--wpds-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-font-size-sm,12px);line-height:var(--wpds-font-line-height-xs,16px);margin:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"label\":\"_2d5ad850b2f90964__label\",\"is-plain\":\"_17c4214649230bea__is-plain\",\"description\":\"_08a3750500e0233f__description\"};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,qBAA6C;AAC7C,kBAAmB;;;ACFnB,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,w9BAAg/B,CAAC;AAC3hC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,SAAQ,4BAA2B,YAAW,+BAA8B,eAAc,iCAAgC;;;ADF1I,qBAAmC;AACnC,6BAA+B;AA6B7B;AAdK,IAAM,sBAAkB,2BAG5B,SAASA,iBAAiB,EAAE,WAAW,GAAG,UAAU,GAAG,KAAM;AAC/D,QAAM,SAAK,sBAAM;AACjB,QAAM,EAAE,uBAAuB,wBAAwB,QACtD,mCAAmB;AAEpB,gCAAW,MAAM;AAChB,0BAAuB,EAAG;AAC1B,WAAO;AAAA,EACR,GAAG,CAAE,uBAAuB,yBAAyB,EAAG,CAAE;AAE1D,SACC,4EACC;AAAA,gDAAC,yCAAe,IACb,8BAAI,sBAAuB,GAC9B;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACA;AAAA,QACA,eAAY,YAAAC,SAAM,cAAY,aAAa,SAAU;AAAA,QACnD,GAAG;AAAA;AAAA,IACN;AAAA,KACD;AAEF,CAAE;",
|
|
6
6
|
"names": ["FieldsetDetails", "clsx"]
|
|
7
7
|
}
|
|
@@ -38,10 +38,10 @@ var import_fieldset = require("@base-ui/react/fieldset");
|
|
|
38
38
|
var import_element = require("@wordpress/element");
|
|
39
39
|
|
|
40
40
|
// packages/ui/src/utils/css/field.module.css
|
|
41
|
-
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='04c8f253c6']")) {
|
|
41
|
+
if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='04c8f253c6']")) {
|
|
42
42
|
const style = document.createElement("style");
|
|
43
43
|
style.setAttribute("data-wp-hash", "04c8f253c6");
|
|
44
|
-
style.appendChild(document.createTextNode(
|
|
44
|
+
style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-font-line-height-xs,16px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-xs,11px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-font-size-md,13px);text-transform:none}}._08a3750500e0233f__description{color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);line-height:var(--wpds-font-line-height-xs,16px);margin:0}}'));
|
|
45
45
|
document.head.appendChild(style);
|
|
46
46
|
}
|
|
47
47
|
var field_default = { "label": "_2d5ad850b2f90964__label", "is-plain": "_17c4214649230bea__is-plain", "description": "_08a3750500e0233f__description" };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/form/primitives/fieldset/legend.tsx", "../../../../src/utils/css/field.module.css"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport { Fieldset as _Fieldset } from '@base-ui/react/fieldset';\nimport { forwardRef } from '@wordpress/element';\nimport fieldStyles from '../../../utils/css/field.module.css';\nimport type { FieldsetLegendProps } from './types';\n\nexport const FieldsetLegend = forwardRef< HTMLDivElement, FieldsetLegendProps >(\n\tfunction FieldsetLegend( { className, ...restProps }, ref ) {\n\t\treturn (\n\t\t\t<_Fieldset.Legend\n\t\t\t\tref={ ref }\n\t\t\t\tclassName={ clsx( fieldStyles.label, className ) }\n\t\t\t\t{ ...restProps }\n\t\t\t/>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='04c8f253c6']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"04c8f253c6\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-font-line-height-xs);color:var(--wpds-color-fg-content-neutral);font-family:var(--wpds-font-family-body);font-size:var(--wpds-font-size-xs);font-weight:var(--wpds-font-weight-medium);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-font-size-md);text-transform:none}}._08a3750500e0233f__description{color:var(--wpds-color-fg-content-neutral-weak);font-family:var(--wpds-font-family-body);font-size:var(--wpds-font-size-sm);line-height:var(--wpds-font-line-height-xs);margin:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"label\":\"_2d5ad850b2f90964__label\",\"is-plain\":\"_17c4214649230bea__is-plain\",\"description\":\"_08a3750500e0233f__description\"};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,sBAAsC;AACtC,qBAA2B;;;ACF3B,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport { Fieldset as _Fieldset } from '@base-ui/react/fieldset';\nimport { forwardRef } from '@wordpress/element';\nimport fieldStyles from '../../../utils/css/field.module.css';\nimport type { FieldsetLegendProps } from './types';\n\nexport const FieldsetLegend = forwardRef< HTMLDivElement, FieldsetLegendProps >(\n\tfunction FieldsetLegend( { className, ...restProps }, ref ) {\n\t\treturn (\n\t\t\t<_Fieldset.Legend\n\t\t\t\tref={ ref }\n\t\t\t\tclassName={ clsx( fieldStyles.label, className ) }\n\t\t\t\t{ ...restProps }\n\t\t\t/>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='04c8f253c6']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"04c8f253c6\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-font-line-height-xs,16px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-font-size-xs,11px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-font-size-md,13px);text-transform:none}}._08a3750500e0233f__description{color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d);font-family:var(--wpds-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-font-size-sm,12px);line-height:var(--wpds-font-line-height-xs,16px);margin:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"label\":\"_2d5ad850b2f90964__label\",\"is-plain\":\"_17c4214649230bea__is-plain\",\"description\":\"_08a3750500e0233f__description\"};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,sBAAsC;AACtC,qBAA2B;;;ACF3B,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,w9BAAg/B,CAAC;AAC3hC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,SAAQ,4BAA2B,YAAW,+BAA8B,eAAc,iCAAgC;;;ADGvI;AAHI,IAAM,qBAAiB;AAAA,EAC7B,SAASA,gBAAgB,EAAE,WAAW,GAAG,UAAU,GAAG,KAAM;AAC3D,WACC;AAAA,MAAC,gBAAAC,SAAU;AAAA,MAAV;AAAA,QACA;AAAA,QACA,eAAY,YAAAC,SAAM,cAAY,OAAO,SAAU;AAAA,QAC7C,GAAG;AAAA;AAAA,IACN;AAAA,EAEF;AACD;",
|
|
6
6
|
"names": ["FieldsetLegend", "_Fieldset", "clsx"]
|
|
7
7
|
}
|
|
@@ -38,10 +38,10 @@ var import_fieldset = require("@base-ui/react/fieldset");
|
|
|
38
38
|
var import_element = require("@wordpress/element");
|
|
39
39
|
|
|
40
40
|
// packages/ui/src/form/primitives/fieldset/style.module.css
|
|
41
|
-
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='04ece4d23e']")) {
|
|
41
|
+
if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='04ece4d23e']")) {
|
|
42
42
|
const style = document.createElement("style");
|
|
43
43
|
style.setAttribute("data-wp-hash", "04ece4d23e");
|
|
44
|
-
style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.a946d12d3d763c87__root{border:0;display:flex;flex-direction:column;gap:var(--wpds-dimension-gap-xs);margin:0;padding:0}}"));
|
|
44
|
+
style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.a946d12d3d763c87__root{border:0;display:flex;flex-direction:column;gap:var(--wpds-dimension-gap-xs,4px);margin:0;padding:0}}"));
|
|
45
45
|
document.head.appendChild(style);
|
|
46
46
|
}
|
|
47
47
|
var style_default = { "root": "a946d12d3d763c87__root" };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/form/primitives/fieldset/root.tsx", "../../../../src/form/primitives/fieldset/style.module.css"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport { Fieldset as _Fieldset } from '@base-ui/react/fieldset';\nimport { forwardRef, useState, useMemo } from '@wordpress/element';\nimport styles from './style.module.css';\nimport { FieldsetContext } from './context';\nimport type { FieldsetRootProps } from './types';\n\n/**\n * A low-level component that associates an accessible legend and description with\n * a group of multiple form control elements.\n *\n * To label a single form control element, use the `Field` component instead.\n */\nexport const FieldsetRoot = forwardRef<\n\tHTMLFieldSetElement,\n\tFieldsetRootProps\n>( function FieldsetRoot( { className, children, ...restProps }, ref ) {\n\tconst [ descriptionId, setDescriptionId ] = useState< string >();\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\tregisterDescriptionId: ( id: string ) => setDescriptionId( id ),\n\t\t\tunregisterDescriptionId: () => setDescriptionId( undefined ),\n\t\t} ),\n\t\t[]\n\t);\n\n\treturn (\n\t\t<FieldsetContext.Provider value={ contextValue }>\n\t\t\t<_Fieldset.Root\n\t\t\t\tref={ ref }\n\t\t\t\tclassName={ clsx( styles.root, className ) }\n\t\t\t\t// Certain screen readers may not read a fieldset's description\n\t\t\t\t// https://w3c.github.io/using-aria/#label-support\n\t\t\t\taria-describedby={ descriptionId }\n\t\t\t\t{ ...restProps }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</_Fieldset.Root>\n\t\t</FieldsetContext.Provider>\n\t);\n} );\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='04ece4d23e']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"04ece4d23e\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.a946d12d3d763c87__root{border:0;display:flex;flex-direction:column;gap:var(--wpds-dimension-gap-xs);margin:0;padding:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"root\":\"a946d12d3d763c87__root\"};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,sBAAsC;AACtC,qBAA8C;;;ACF9C,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport { Fieldset as _Fieldset } from '@base-ui/react/fieldset';\nimport { forwardRef, useState, useMemo } from '@wordpress/element';\nimport styles from './style.module.css';\nimport { FieldsetContext } from './context';\nimport type { FieldsetRootProps } from './types';\n\n/**\n * A low-level component that associates an accessible legend and description with\n * a group of multiple form control elements.\n *\n * To label a single form control element, use the `Field` component instead.\n */\nexport const FieldsetRoot = forwardRef<\n\tHTMLFieldSetElement,\n\tFieldsetRootProps\n>( function FieldsetRoot( { className, children, ...restProps }, ref ) {\n\tconst [ descriptionId, setDescriptionId ] = useState< string >();\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\tregisterDescriptionId: ( id: string ) => setDescriptionId( id ),\n\t\t\tunregisterDescriptionId: () => setDescriptionId( undefined ),\n\t\t} ),\n\t\t[]\n\t);\n\n\treturn (\n\t\t<FieldsetContext.Provider value={ contextValue }>\n\t\t\t<_Fieldset.Root\n\t\t\t\tref={ ref }\n\t\t\t\tclassName={ clsx( styles.root, className ) }\n\t\t\t\t// Certain screen readers may not read a fieldset's description\n\t\t\t\t// https://w3c.github.io/using-aria/#label-support\n\t\t\t\taria-describedby={ descriptionId }\n\t\t\t\t{ ...restProps }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</_Fieldset.Root>\n\t\t</FieldsetContext.Provider>\n\t);\n} );\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='04ece4d23e']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"04ece4d23e\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.a946d12d3d763c87__root{border:0;display:flex;flex-direction:column;gap:var(--wpds-dimension-gap-xs,4px);margin:0;padding:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"root\":\"a946d12d3d763c87__root\"};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,sBAAsC;AACtC,qBAA8C;;;ACF9C,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,qOAAqO,CAAC;AAChR,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,QAAO,yBAAwB;;;ADF/C,qBAAgC;AAyB7B;AAhBI,IAAM,mBAAe,2BAGzB,SAASA,cAAc,EAAE,WAAW,UAAU,GAAG,UAAU,GAAG,KAAM;AACtE,QAAM,CAAE,eAAe,gBAAiB,QAAI,yBAAmB;AAE/D,QAAM,mBAAe;AAAA,IACpB,OAAQ;AAAA,MACP,uBAAuB,CAAE,OAAgB,iBAAkB,EAAG;AAAA,MAC9D,yBAAyB,MAAM,iBAAkB,MAAU;AAAA,IAC5D;AAAA,IACA,CAAC;AAAA,EACF;AAEA,SACC,4CAAC,+BAAgB,UAAhB,EAAyB,OAAQ,cACjC;AAAA,IAAC,gBAAAC,SAAU;AAAA,IAAV;AAAA,MACA;AAAA,MACA,eAAY,YAAAC,SAAM,cAAO,MAAM,SAAU;AAAA,MAGzC,oBAAmB;AAAA,MACjB,GAAG;AAAA,MAEH;AAAA;AAAA,EACH,GACD;AAEF,CAAE;",
|
|
6
6
|
"names": ["FieldsetRoot", "_Fieldset", "clsx"]
|
|
7
7
|
}
|
|
@@ -38,19 +38,19 @@ var import_clsx = __toESM(require("clsx"));
|
|
|
38
38
|
var import_element = require("@wordpress/element");
|
|
39
39
|
|
|
40
40
|
// packages/ui/src/utils/css/focus.module.css
|
|
41
|
-
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='28ad59e2e3']")) {
|
|
41
|
+
if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='28ad59e2e3']")) {
|
|
42
42
|
const style = document.createElement("style");
|
|
43
43
|
style.setAttribute("data-wp-hash", "28ad59e2e3");
|
|
44
|
-
style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active{@media not (prefers-reduced-motion){transition:outline .1s ease-out}outline-color:#0000;outline-offset:1px;outline-style:solid;outline-width:0}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active){outline-color:var(--wpds-color-stroke-focus-brand);outline-width:var(--wpds-border-width-focus)}}"));
|
|
44
|
+
style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active{@media not (prefers-reduced-motion){transition:outline .1s ease-out}outline-color:#0000;outline-offset:1px;outline-style:solid;outline-width:0}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active){outline-color:var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-width:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}"));
|
|
45
45
|
document.head.appendChild(style);
|
|
46
46
|
}
|
|
47
47
|
var focus_default = { "outset-ring--focus": "_08e8a2e44959f892__outset-ring--focus", "outset-ring--focus-except-active": "e25b2bdd7aa21721__outset-ring--focus-except-active", "outset-ring--focus-visible": "d0541bc9dd9dc7b6__outset-ring--focus-visible", "outset-ring--focus-within": "cd83dfc2126a0846__outset-ring--focus-within", "outset-ring--focus-within-except-active": "_970d04df7376df67__outset-ring--focus-within-except-active", "outset-ring--focus-within-visible": "c5cb3ee4bddaa8e4__outset-ring--focus-within-visible" };
|
|
48
48
|
|
|
49
49
|
// packages/ui/src/form/primitives/input/style.module.css
|
|
50
|
-
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='03d76ef49c']")) {
|
|
50
|
+
if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='03d76ef49c']")) {
|
|
51
51
|
const style = document.createElement("style");
|
|
52
52
|
style.setAttribute("data-wp-hash", "03d76ef49c");
|
|
53
|
-
style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._2ae7be2fc1bb17a3__input{background:#0000;border:none;color:var(--wpds-color-fg-interactive-neutral);font-family:inherit;font-size:inherit;line-height:inherit;outline:none;padding-block:var(--wp-ui-input-padding-block,0);padding-inline:var(--wp-ui-input-layout-padding-inline,0);width:100%;&::placeholder{color:var(--wpds-color-fg-interactive-neutral-disabled)}&:disabled,&[aria-disabled=true]{color:var(--wpds-color-fg-interactive-neutral-disabled);@media (forced-colors:active){color:GrayText}}&[type=email],&[type=url]{direction:ltr}}}"));
|
|
53
|
+
style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._2ae7be2fc1bb17a3__input{background:#0000;border:none;color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);font-family:inherit;font-size:inherit;line-height:inherit;outline:none;padding-block:var(--wp-ui-input-padding-block,0);padding-inline:var(--wp-ui-input-layout-padding-inline,0);width:100%;&::placeholder{color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a)}&:disabled,&[aria-disabled=true]{color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a);@media (forced-colors:active){color:GrayText}}&[type=email],&[type=url]{direction:ltr}}}"));
|
|
54
54
|
document.head.appendChild(style);
|
|
55
55
|
}
|
|
56
56
|
var style_default = { "input": "_2ae7be2fc1bb17a3__input" };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/form/primitives/input/input.tsx", "../../../../src/utils/css/focus.module.css", "../../../../src/form/primitives/input/style.module.css"],
|
|
4
|
-
"sourcesContent": ["import { Input as _Input } from '@base-ui/react/input';\nimport clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport focusStyles from '../../../utils/css/focus.module.css';\nimport styles from './style.module.css';\nimport type { InputProps } from './types';\nimport { InputLayout } from '../input-layout';\n\nexport const Input = forwardRef< HTMLElement, InputProps >( function Input(\n\t{ className, size = 'default', prefix, suffix, style, ...restProps },\n\tref\n) {\n\treturn (\n\t\t<InputLayout\n\t\t\tclassName={ clsx(\n\t\t\t\tfocusStyles[ 'outset-ring--focus-within' ],\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tstyle={ style }\n\t\t\tsize={ size }\n\t\t\tvisuallyDisabled={ restProps.disabled }\n\t\t\tprefix={ prefix }\n\t\t\tsuffix={ suffix }\n\t\t>\n\t\t\t<_Input ref={ ref } className={ styles.input } { ...restProps } />\n\t\t</InputLayout>\n\t);\n} );\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='28ad59e2e3']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"28ad59e2e3\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active{@media not (prefers-reduced-motion){transition:outline .1s ease-out}outline-color:#0000;outline-offset:1px;outline-style:solid;outline-width:0}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active){outline-color:var(--wpds-color-stroke-focus-brand);outline-width:var(--wpds-border-width-focus)}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"outset-ring--focus\":\"_08e8a2e44959f892__outset-ring--focus\",\"outset-ring--focus-except-active\":\"e25b2bdd7aa21721__outset-ring--focus-except-active\",\"outset-ring--focus-visible\":\"d0541bc9dd9dc7b6__outset-ring--focus-visible\",\"outset-ring--focus-within\":\"cd83dfc2126a0846__outset-ring--focus-within\",\"outset-ring--focus-within-except-active\":\"_970d04df7376df67__outset-ring--focus-within-except-active\",\"outset-ring--focus-within-visible\":\"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible\"};\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='03d76ef49c']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"03d76ef49c\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._2ae7be2fc1bb17a3__input{background:#0000;border:none;color:var(--wpds-color-fg-interactive-neutral);font-family:inherit;font-size:inherit;line-height:inherit;outline:none;padding-block:var(--wp-ui-input-padding-block,0);padding-inline:var(--wp-ui-input-layout-padding-inline,0);width:100%;&::placeholder{color:var(--wpds-color-fg-interactive-neutral-disabled)}&:disabled,&[aria-disabled=true]{color:var(--wpds-color-fg-interactive-neutral-disabled);@media (forced-colors:active){color:GrayText}}&[type=email],&[type=url]{direction:ltr}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"input\":\"_2ae7be2fc1bb17a3__input\"};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAgC;AAChC,kBAAiB;AACjB,qBAA2B;;;ACF3B,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;
|
|
4
|
+
"sourcesContent": ["import { Input as _Input } from '@base-ui/react/input';\nimport clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport focusStyles from '../../../utils/css/focus.module.css';\nimport styles from './style.module.css';\nimport type { InputProps } from './types';\nimport { InputLayout } from '../input-layout';\n\nexport const Input = forwardRef< HTMLElement, InputProps >( function Input(\n\t{ className, size = 'default', prefix, suffix, style, ...restProps },\n\tref\n) {\n\treturn (\n\t\t<InputLayout\n\t\t\tclassName={ clsx(\n\t\t\t\tfocusStyles[ 'outset-ring--focus-within' ],\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tstyle={ style }\n\t\t\tsize={ size }\n\t\t\tvisuallyDisabled={ restProps.disabled }\n\t\t\tprefix={ prefix }\n\t\t\tsuffix={ suffix }\n\t\t>\n\t\t\t<_Input ref={ ref } className={ styles.input } { ...restProps } />\n\t\t</InputLayout>\n\t);\n} );\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='28ad59e2e3']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"28ad59e2e3\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active{@media not (prefers-reduced-motion){transition:outline .1s ease-out}outline-color:#0000;outline-offset:1px;outline-style:solid;outline-width:0}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active){outline-color:var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-width:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"outset-ring--focus\":\"_08e8a2e44959f892__outset-ring--focus\",\"outset-ring--focus-except-active\":\"e25b2bdd7aa21721__outset-ring--focus-except-active\",\"outset-ring--focus-visible\":\"d0541bc9dd9dc7b6__outset-ring--focus-visible\",\"outset-ring--focus-within\":\"cd83dfc2126a0846__outset-ring--focus-within\",\"outset-ring--focus-within-except-active\":\"_970d04df7376df67__outset-ring--focus-within-except-active\",\"outset-ring--focus-within-visible\":\"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible\"};\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='03d76ef49c']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"03d76ef49c\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._2ae7be2fc1bb17a3__input{background:#0000;border:none;color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);font-family:inherit;font-size:inherit;line-height:inherit;outline:none;padding-block:var(--wp-ui-input-padding-block,0);padding-inline:var(--wp-ui-input-layout-padding-inline,0);width:100%;&::placeholder{color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a)}&:disabled,&[aria-disabled=true]{color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a);@media (forced-colors:active){color:GrayText}}&[type=email],&[type=url]{direction:ltr}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"input\":\"_2ae7be2fc1bb17a3__input\"};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAgC;AAChC,kBAAiB;AACjB,qBAA2B;;;ACF3B,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,qmCAAqmC,CAAC;AAChpC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,sBAAqB,yCAAwC,oCAAmC,sDAAqD,8BAA6B,gDAA+C,6BAA4B,+CAA8C,2CAA0C,8DAA6D,qCAAoC,sDAAqD;;;ACN3f,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,2pBAA2pB,CAAC;AACtsB,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,SAAQ,2BAA0B;;;AFAlD,0BAA4B;AAkBzB;AAhBI,IAAM,YAAQ,2BAAuC,SAASA,OACpE,EAAE,WAAW,OAAO,WAAW,QAAQ,QAAQ,OAAO,GAAG,UAAU,GACnE,KACC;AACD,SACC;AAAA,IAAC;AAAA;AAAA,MACA,eAAY,YAAAC;AAAA,QACX,cAAa,2BAA4B;AAAA,QACzC;AAAA,MACD;AAAA,MACA;AAAA,MACA;AAAA,MACA,kBAAmB,UAAU;AAAA,MAC7B;AAAA,MACA;AAAA,MAEA,sDAAC,aAAAC,OAAA,EAAO,KAAY,WAAY,cAAO,OAAU,GAAG,WAAY;AAAA;AAAA,EACjE;AAEF,CAAE;",
|
|
6
6
|
"names": ["Input", "clsx", "_Input"]
|
|
7
7
|
}
|
|
@@ -37,7 +37,7 @@ var import_clsx = __toESM(require("clsx"));
|
|
|
37
37
|
var import_element = require("@wordpress/element");
|
|
38
38
|
|
|
39
39
|
// packages/ui/src/utils/css/resets.module.css
|
|
40
|
-
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='671ebfc62d']")) {
|
|
40
|
+
if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='671ebfc62d']")) {
|
|
41
41
|
const style = document.createElement("style");
|
|
42
42
|
style.setAttribute("data-wp-hash", "671ebfc62d");
|
|
43
43
|
style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}"));
|
|
@@ -46,16 +46,15 @@ if (typeof document !== "undefined" && !document.head.querySelector("style[data-
|
|
|
46
46
|
var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
|
|
47
47
|
|
|
48
48
|
// packages/ui/src/form/primitives/input-layout/style.module.css
|
|
49
|
-
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='
|
|
49
|
+
if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='0ea68b6338']")) {
|
|
50
50
|
const style = document.createElement("style");
|
|
51
|
-
style.setAttribute("data-wp-hash", "
|
|
52
|
-
style.appendChild(document.createTextNode(
|
|
51
|
+
style.setAttribute("data-wp-hash", "0ea68b6338");
|
|
52
|
+
style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.cb2baafdc08746bb__input-layout{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-md,12px);background-color:var(--wpds-color-bg-interactive-neutral-weak,#0000);border-color:var(--wpds-color-stroke-interactive-neutral,#8a8a8a);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:var(--wpds-border-width-xs,1px);color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);display:flex;font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:max(var(--wpds-font-size-md,13px),16px);height:40px;line-height:1;@media (min-width:600px){font-size:var(--wpds-font-size-md,13px)}&._0c807a84cbb94e0c__is-size-compact{height:32px}&._0c807a84cbb94e0c__is-size-compact,&.ed67cda122dc1e7b__is-size-small{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-sm,8px)}&.ed67cda122dc1e7b__is-size-small{height:24px}&._6fb7104732387680__is-disabled,&:has([data-can-disable-input-layout][data-disabled]){background-color:var(--wpds-color-bg-interactive-neutral-weak-disabled,#0000);border-color:var(--wpds-color-stroke-interactive-neutral-disabled,#d8d8d8);color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&._8097270636ca6100__is-borderless{border-color:#0000}&:has(._0d7afad74a057888__input-layout-slot:focus-within){outline:none}&:hover:not(._6fb7104732387680__is-disabled,:has([data-can-disable-input-layout][data-disabled]),._8097270636ca6100__is-borderless){border-color:var(--wpds-color-stroke-interactive-neutral-active,#6c6c6c)}}.c192b41a12b4387b__slot-wrapper{display:contents}._0d7afad74a057888__input-layout-slot{align-items:center;display:flex;&._0c952682762ca288__is-padding-minimal{--wp-ui-input-layout-prefix-padding-start:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px));--wp-ui-input-layout-suffix-padding-end:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}[data-slot-type=prefix] &{padding-inline-start:var(--wp-ui-input-layout-prefix-padding-start,var(--wp-ui-input-layout-padding-inline))}[data-slot-type=suffix] &{padding-inline-end:var(--wp-ui-input-layout-suffix-padding-end,var(--wp-ui-input-layout-padding-inline))}}}'));
|
|
53
53
|
document.head.appendChild(style);
|
|
54
54
|
}
|
|
55
|
-
var style_default = { "input-layout": "cb2baafdc08746bb__input-layout", "is-size-compact": "_0c807a84cbb94e0c__is-size-compact", "is-size-small": "ed67cda122dc1e7b__is-size-small", "is-disabled": "_6fb7104732387680__is-disabled", "is-borderless": "_8097270636ca6100__is-borderless", "input-layout-slot": "_0d7afad74a057888__input-layout-slot", "
|
|
55
|
+
var style_default = { "input-layout": "cb2baafdc08746bb__input-layout", "is-size-compact": "_0c807a84cbb94e0c__is-size-compact", "is-size-small": "ed67cda122dc1e7b__is-size-small", "is-disabled": "_6fb7104732387680__is-disabled", "is-borderless": "_8097270636ca6100__is-borderless", "input-layout-slot": "_0d7afad74a057888__input-layout-slot", "slot-wrapper": "c192b41a12b4387b__slot-wrapper", "is-padding-minimal": "_0c952682762ca288__is-padding-minimal" };
|
|
56
56
|
|
|
57
57
|
// packages/ui/src/form/primitives/input-layout/input-layout.tsx
|
|
58
|
-
var import_context = require("./context.cjs");
|
|
59
58
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
60
59
|
var InputLayout = (0, import_element.forwardRef)(
|
|
61
60
|
function InputLayout2({
|
|
@@ -82,9 +81,23 @@ var InputLayout = (0, import_element.forwardRef)(
|
|
|
82
81
|
),
|
|
83
82
|
...restProps,
|
|
84
83
|
children: [
|
|
85
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
84
|
+
import_element.Children.count(prefix) > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
className: style_default["slot-wrapper"],
|
|
88
|
+
"data-slot-type": "prefix",
|
|
89
|
+
children: prefix
|
|
90
|
+
}
|
|
91
|
+
),
|
|
86
92
|
children,
|
|
87
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
93
|
+
import_element.Children.count(suffix) > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
94
|
+
"div",
|
|
95
|
+
{
|
|
96
|
+
className: style_default["slot-wrapper"],
|
|
97
|
+
"data-slot-type": "suffix",
|
|
98
|
+
children: suffix
|
|
99
|
+
}
|
|
100
|
+
)
|
|
88
101
|
]
|
|
89
102
|
}
|
|
90
103
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/form/primitives/input-layout/input-layout.tsx", "../../../../src/utils/css/resets.module.css", "../../../../src/form/primitives/input-layout/style.module.css"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport resetStyles from '../../../utils/css/resets.module.css';\nimport styles from './style.module.css';\nimport type { InputLayoutProps } from './types';\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport { Children, forwardRef } from '@wordpress/element';\nimport resetStyles from '../../../utils/css/resets.module.css';\nimport styles from './style.module.css';\nimport type { InputLayoutProps } from './types';\n\n/**\n * A low-level component that handles the visual layout of an input-like field,\n * including disabled states and standard prefix/suffix slots.\n */\nexport const InputLayout = forwardRef< HTMLDivElement, InputLayoutProps >(\n\tfunction InputLayout(\n\t\t{\n\t\t\tclassName,\n\t\t\tchildren,\n\t\t\tvisuallyDisabled,\n\t\t\tsize = 'default',\n\t\t\tisBorderless,\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\t...restProps\n\t\t},\n\t\tref\n\t) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ ref }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\tresetStyles[ 'box-sizing' ],\n\t\t\t\t\tstyles[ 'input-layout' ],\n\t\t\t\t\tstyles[ `is-size-${ size }` ],\n\t\t\t\t\tvisuallyDisabled && styles[ 'is-disabled' ],\n\t\t\t\t\tisBorderless && styles[ 'is-borderless' ],\n\t\t\t\t\tclassName\n\t\t\t\t) }\n\t\t\t\t{ ...restProps }\n\t\t\t>\n\t\t\t\t{ Children.count( prefix ) > 0 && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ styles[ 'slot-wrapper' ] }\n\t\t\t\t\t\tdata-slot-type=\"prefix\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ prefix }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t\t{ Children.count( suffix ) > 0 && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ styles[ 'slot-wrapper' ] }\n\t\t\t\t\t\tdata-slot-type=\"suffix\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='671ebfc62d']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"671ebfc62d\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"box-sizing\":\"_336cd3e4e743482f__box-sizing\"};\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='0ea68b6338']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"0ea68b6338\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.cb2baafdc08746bb__input-layout{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-md,12px);background-color:var(--wpds-color-bg-interactive-neutral-weak,#0000);border-color:var(--wpds-color-stroke-interactive-neutral,#8a8a8a);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:var(--wpds-border-width-xs,1px);color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);display:flex;font-family:var(--wpds-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:max(var(--wpds-font-size-md,13px),16px);height:40px;line-height:1;@media (min-width:600px){font-size:var(--wpds-font-size-md,13px)}&._0c807a84cbb94e0c__is-size-compact{height:32px}&._0c807a84cbb94e0c__is-size-compact,&.ed67cda122dc1e7b__is-size-small{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-sm,8px)}&.ed67cda122dc1e7b__is-size-small{height:24px}&._6fb7104732387680__is-disabled,&:has([data-can-disable-input-layout][data-disabled]){background-color:var(--wpds-color-bg-interactive-neutral-weak-disabled,#0000);border-color:var(--wpds-color-stroke-interactive-neutral-disabled,#d8d8d8);color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&._8097270636ca6100__is-borderless{border-color:#0000}&:has(._0d7afad74a057888__input-layout-slot:focus-within){outline:none}&:hover:not(._6fb7104732387680__is-disabled,:has([data-can-disable-input-layout][data-disabled]),._8097270636ca6100__is-borderless){border-color:var(--wpds-color-stroke-interactive-neutral-active,#6c6c6c)}}.c192b41a12b4387b__slot-wrapper{display:contents}._0d7afad74a057888__input-layout-slot{align-items:center;display:flex;&._0c952682762ca288__is-padding-minimal{--wp-ui-input-layout-prefix-padding-start:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px));--wp-ui-input-layout-suffix-padding-end:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}[data-slot-type=prefix] &{padding-inline-start:var(--wp-ui-input-layout-prefix-padding-start,var(--wp-ui-input-layout-padding-inline))}[data-slot-type=suffix] &{padding-inline-end:var(--wp-ui-input-layout-suffix-padding-end,var(--wp-ui-input-layout-padding-inline))}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"input-layout\":\"cb2baafdc08746bb__input-layout\",\"is-size-compact\":\"_0c807a84cbb94e0c__is-size-compact\",\"is-size-small\":\"ed67cda122dc1e7b__is-size-small\",\"is-disabled\":\"_6fb7104732387680__is-disabled\",\"is-borderless\":\"_8097270636ca6100__is-borderless\",\"input-layout-slot\":\"_0d7afad74a057888__input-layout-slot\",\"slot-wrapper\":\"c192b41a12b4387b__slot-wrapper\",\"is-padding-minimal\":\"_0c952682762ca288__is-padding-minimal\"};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,qBAAqC;;;ACDrC,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,kMAAkM,CAAC;AAC7O,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,iBAAQ,EAAC,cAAa,gCAA+B;;;ACN5D,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,89EAA0+E,CAAC;AACrhF,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,gBAAe,kCAAiC,mBAAkB,sCAAqC,iBAAgB,mCAAkC,eAAc,kCAAiC,iBAAgB,oCAAmC,qBAAoB,wCAAuC,gBAAe,kCAAiC,sBAAqB,wCAAuC;;;AFmB/a;AAfI,IAAM,kBAAc;AAAA,EAC1B,SAASA,aACR;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACJ,GACA,KACC;AACD,WACC;AAAA,MAAC;AAAA;AAAA,QACA;AAAA,QACA,eAAY,YAAAC;AAAA,UACX,eAAa,YAAa;AAAA,UAC1B,cAAQ,cAAe;AAAA,UACvB,cAAQ,WAAY,IAAK,EAAG;AAAA,UAC5B,oBAAoB,cAAQ,aAAc;AAAA,UAC1C,gBAAgB,cAAQ,eAAgB;AAAA,UACxC;AAAA,QACD;AAAA,QACE,GAAG;AAAA,QAEH;AAAA,kCAAS,MAAO,MAAO,IAAI,KAC5B;AAAA,YAAC;AAAA;AAAA,cACA,WAAY,cAAQ,cAAe;AAAA,cACnC,kBAAe;AAAA,cAEb;AAAA;AAAA,UACH;AAAA,UAEC;AAAA,UACA,wBAAS,MAAO,MAAO,IAAI,KAC5B;AAAA,YAAC;AAAA;AAAA,cACA,WAAY,cAAQ,cAAe;AAAA,cACnC,kBAAe;AAAA,cAEb;AAAA;AAAA,UACH;AAAA;AAAA;AAAA,IAEF;AAAA,EAEF;AACD;",
|
|
6
6
|
"names": ["InputLayout", "clsx"]
|
|
7
7
|
}
|
|
@@ -37,32 +37,23 @@ var import_clsx = __toESM(require("clsx"));
|
|
|
37
37
|
var import_element = require("@wordpress/element");
|
|
38
38
|
|
|
39
39
|
// packages/ui/src/form/primitives/input-layout/style.module.css
|
|
40
|
-
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='
|
|
40
|
+
if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='0ea68b6338']")) {
|
|
41
41
|
const style = document.createElement("style");
|
|
42
|
-
style.setAttribute("data-wp-hash", "
|
|
43
|
-
style.appendChild(document.createTextNode(
|
|
42
|
+
style.setAttribute("data-wp-hash", "0ea68b6338");
|
|
43
|
+
style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.cb2baafdc08746bb__input-layout{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-md,12px);background-color:var(--wpds-color-bg-interactive-neutral-weak,#0000);border-color:var(--wpds-color-stroke-interactive-neutral,#8a8a8a);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:var(--wpds-border-width-xs,1px);color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);display:flex;font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:max(var(--wpds-font-size-md,13px),16px);height:40px;line-height:1;@media (min-width:600px){font-size:var(--wpds-font-size-md,13px)}&._0c807a84cbb94e0c__is-size-compact{height:32px}&._0c807a84cbb94e0c__is-size-compact,&.ed67cda122dc1e7b__is-size-small{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-sm,8px)}&.ed67cda122dc1e7b__is-size-small{height:24px}&._6fb7104732387680__is-disabled,&:has([data-can-disable-input-layout][data-disabled]){background-color:var(--wpds-color-bg-interactive-neutral-weak-disabled,#0000);border-color:var(--wpds-color-stroke-interactive-neutral-disabled,#d8d8d8);color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&._8097270636ca6100__is-borderless{border-color:#0000}&:has(._0d7afad74a057888__input-layout-slot:focus-within){outline:none}&:hover:not(._6fb7104732387680__is-disabled,:has([data-can-disable-input-layout][data-disabled]),._8097270636ca6100__is-borderless){border-color:var(--wpds-color-stroke-interactive-neutral-active,#6c6c6c)}}.c192b41a12b4387b__slot-wrapper{display:contents}._0d7afad74a057888__input-layout-slot{align-items:center;display:flex;&._0c952682762ca288__is-padding-minimal{--wp-ui-input-layout-prefix-padding-start:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px));--wp-ui-input-layout-suffix-padding-end:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}[data-slot-type=prefix] &{padding-inline-start:var(--wp-ui-input-layout-prefix-padding-start,var(--wp-ui-input-layout-padding-inline))}[data-slot-type=suffix] &{padding-inline-end:var(--wp-ui-input-layout-suffix-padding-end,var(--wp-ui-input-layout-padding-inline))}}}'));
|
|
44
44
|
document.head.appendChild(style);
|
|
45
45
|
}
|
|
46
|
-
var style_default = { "input-layout": "cb2baafdc08746bb__input-layout", "is-size-compact": "_0c807a84cbb94e0c__is-size-compact", "is-size-small": "ed67cda122dc1e7b__is-size-small", "is-disabled": "_6fb7104732387680__is-disabled", "is-borderless": "_8097270636ca6100__is-borderless", "input-layout-slot": "_0d7afad74a057888__input-layout-slot", "
|
|
46
|
+
var style_default = { "input-layout": "cb2baafdc08746bb__input-layout", "is-size-compact": "_0c807a84cbb94e0c__is-size-compact", "is-size-small": "ed67cda122dc1e7b__is-size-small", "is-disabled": "_6fb7104732387680__is-disabled", "is-borderless": "_8097270636ca6100__is-borderless", "input-layout-slot": "_0d7afad74a057888__input-layout-slot", "slot-wrapper": "c192b41a12b4387b__slot-wrapper", "is-padding-minimal": "_0c952682762ca288__is-padding-minimal" };
|
|
47
47
|
|
|
48
48
|
// packages/ui/src/form/primitives/input-layout/slot.tsx
|
|
49
|
-
var import_context = require("./context.cjs");
|
|
50
49
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
51
|
-
var InputLayoutSlot = (0, import_element.forwardRef)(function InputLayoutSlot2({
|
|
52
|
-
const typeContext = (0, import_context.useInputLayoutSlotContext)();
|
|
53
|
-
const type = typeProp ?? typeContext;
|
|
54
|
-
if (!type) {
|
|
55
|
-
throw new Error(
|
|
56
|
-
"InputLayoutSlot requires a `type` prop or must be used within an InputLayout prefix/suffix slot."
|
|
57
|
-
);
|
|
58
|
-
}
|
|
50
|
+
var InputLayoutSlot = (0, import_element.forwardRef)(function InputLayoutSlot2({ padding = "default", ...restProps }, ref) {
|
|
59
51
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
52
|
"div",
|
|
61
53
|
{
|
|
62
54
|
ref,
|
|
63
55
|
className: (0, import_clsx.default)(
|
|
64
56
|
style_default["input-layout-slot"],
|
|
65
|
-
style_default[`is-${type}`],
|
|
66
57
|
style_default[`is-padding-${padding}`]
|
|
67
58
|
),
|
|
68
59
|
...restProps
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/form/primitives/input-layout/slot.tsx", "../../../../src/form/primitives/input-layout/style.module.css"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport styles from './style.module.css';\nimport type { InputLayoutSlotProps } from './types';\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,qBAA2B;;;ACD3B,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport styles from './style.module.css';\nimport type { InputLayoutSlotProps } from './types';\n\n/**\n * A layout helper to add paddings in a prefix or suffix.\n */\nexport const InputLayoutSlot = forwardRef<\n\tHTMLDivElement,\n\tInputLayoutSlotProps\n>( function InputLayoutSlot( { padding = 'default', ...restProps }, ref ) {\n\treturn (\n\t\t<div\n\t\t\tref={ ref }\n\t\t\tclassName={ clsx(\n\t\t\t\tstyles[ 'input-layout-slot' ],\n\t\t\t\tstyles[ `is-padding-${ padding }` ]\n\t\t\t) }\n\t\t\t{ ...restProps }\n\t\t/>\n\t);\n} );\n\nInputLayoutSlot.displayName = 'InputLayout.Slot';\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='0ea68b6338']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"0ea68b6338\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.cb2baafdc08746bb__input-layout{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-md,12px);background-color:var(--wpds-color-bg-interactive-neutral-weak,#0000);border-color:var(--wpds-color-stroke-interactive-neutral,#8a8a8a);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:var(--wpds-border-width-xs,1px);color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);display:flex;font-family:var(--wpds-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:max(var(--wpds-font-size-md,13px),16px);height:40px;line-height:1;@media (min-width:600px){font-size:var(--wpds-font-size-md,13px)}&._0c807a84cbb94e0c__is-size-compact{height:32px}&._0c807a84cbb94e0c__is-size-compact,&.ed67cda122dc1e7b__is-size-small{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-sm,8px)}&.ed67cda122dc1e7b__is-size-small{height:24px}&._6fb7104732387680__is-disabled,&:has([data-can-disable-input-layout][data-disabled]){background-color:var(--wpds-color-bg-interactive-neutral-weak-disabled,#0000);border-color:var(--wpds-color-stroke-interactive-neutral-disabled,#d8d8d8);color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&._8097270636ca6100__is-borderless{border-color:#0000}&:has(._0d7afad74a057888__input-layout-slot:focus-within){outline:none}&:hover:not(._6fb7104732387680__is-disabled,:has([data-can-disable-input-layout][data-disabled]),._8097270636ca6100__is-borderless){border-color:var(--wpds-color-stroke-interactive-neutral-active,#6c6c6c)}}.c192b41a12b4387b__slot-wrapper{display:contents}._0d7afad74a057888__input-layout-slot{align-items:center;display:flex;&._0c952682762ca288__is-padding-minimal{--wp-ui-input-layout-prefix-padding-start:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px));--wp-ui-input-layout-suffix-padding-end:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}[data-slot-type=prefix] &{padding-inline-start:var(--wp-ui-input-layout-prefix-padding-start,var(--wp-ui-input-layout-padding-inline))}[data-slot-type=suffix] &{padding-inline-end:var(--wp-ui-input-layout-suffix-padding-end,var(--wp-ui-input-layout-padding-inline))}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"input-layout\":\"cb2baafdc08746bb__input-layout\",\"is-size-compact\":\"_0c807a84cbb94e0c__is-size-compact\",\"is-size-small\":\"ed67cda122dc1e7b__is-size-small\",\"is-disabled\":\"_6fb7104732387680__is-disabled\",\"is-borderless\":\"_8097270636ca6100__is-borderless\",\"input-layout-slot\":\"_0d7afad74a057888__input-layout-slot\",\"slot-wrapper\":\"c192b41a12b4387b__slot-wrapper\",\"is-padding-minimal\":\"_0c952682762ca288__is-padding-minimal\"};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,qBAA2B;;;ACD3B,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,89EAA0+E,CAAC;AACrhF,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,gBAAe,kCAAiC,mBAAkB,sCAAqC,iBAAgB,mCAAkC,eAAc,kCAAiC,iBAAgB,oCAAmC,qBAAoB,wCAAuC,gBAAe,kCAAiC,sBAAqB,wCAAuC;;;ADOhb;AALK,IAAM,sBAAkB,2BAG5B,SAASA,iBAAiB,EAAE,UAAU,WAAW,GAAG,UAAU,GAAG,KAAM;AACzE,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,eAAY,YAAAC;AAAA,QACX,cAAQ,mBAAoB;AAAA,QAC5B,cAAQ,cAAe,OAAQ,EAAG;AAAA,MACnC;AAAA,MACE,GAAG;AAAA;AAAA,EACN;AAEF,CAAE;AAEF,gBAAgB,cAAc;",
|
|
6
6
|
"names": ["InputLayoutSlot", "clsx"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/form/primitives/input-layout/types.ts"],
|
|
4
|
-
"sourcesContent": ["export interface InputLayoutProps\n\textends Omit< React.HTMLAttributes< HTMLDivElement >, 'prefix' > {\n\t/**\n\t * Whether the field should be visually styled as disabled.\n\t */\n\tvisuallyDisabled?: boolean;\n\t/**\n\t * The size of the field.\n\t *\n\t * @default 'default'\n\t */\n\tsize?: 'default' | 'compact' | 'small';\n\t/**\n\t * Whether the field should hide the border.\n\t */\n\tisBorderless?: boolean;\n\t/**\n\t * Element to render before the input.\n\t */\n\tprefix?: React.ReactNode;\n\t/**\n\t * Element to render after the input.\n\t */\n\tsuffix?: React.ReactNode;\n}\n\nexport
|
|
4
|
+
"sourcesContent": ["export interface InputLayoutProps\n\textends Omit< React.HTMLAttributes< HTMLDivElement >, 'prefix' > {\n\t/**\n\t * Whether the field should be visually styled as disabled.\n\t */\n\tvisuallyDisabled?: boolean;\n\t/**\n\t * The size of the field.\n\t *\n\t * @default 'default'\n\t */\n\tsize?: 'default' | 'compact' | 'small';\n\t/**\n\t * Whether the field should hide the border.\n\t */\n\tisBorderless?: boolean;\n\t/**\n\t * Element to render before the input.\n\t */\n\tprefix?: React.ReactNode;\n\t/**\n\t * Element to render after the input.\n\t */\n\tsuffix?: React.ReactNode;\n}\n\nexport interface InputLayoutSlotProps\n\textends React.HTMLAttributes< HTMLDivElement > {\n\t/**\n\t * The padding of the slot.\n\t *\n\t * `minimal` will work best when the slot content is a button or icon.\n\t */\n\tpadding?: 'default' | 'minimal';\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|