@wordpress/ui 0.4.1-next.76cff8c98.0 → 0.5.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 +6 -1
- package/build/badge/badge.cjs.map +2 -2
- package/build/badge/types.cjs.map +1 -1
- package/build/button/button.cjs +401 -0
- package/build/button/button.cjs.map +7 -0
- package/build/button/icon.cjs +47 -0
- package/build/button/icon.cjs.map +7 -0
- package/build/button/index.cjs +39 -0
- package/build/button/index.cjs.map +7 -0
- package/build/button/types.cjs +19 -0
- package/build/button/types.cjs.map +7 -0
- package/build/form/primitives/field/root.cjs.map +2 -2
- package/build/form/primitives/fieldset/context.cjs +40 -0
- package/build/form/primitives/fieldset/context.cjs.map +7 -0
- package/build/form/primitives/fieldset/description.cjs +101 -0
- package/build/form/primitives/fieldset/description.cjs.map +7 -0
- package/build/form/primitives/fieldset/details.cjs +103 -0
- package/build/form/primitives/fieldset/details.cjs.map +7 -0
- package/build/form/primitives/fieldset/index.cjs +40 -0
- package/build/form/primitives/fieldset/index.cjs.map +7 -0
- package/build/form/primitives/fieldset/legend.cjs +94 -0
- package/build/form/primitives/fieldset/legend.cjs.map +7 -0
- package/build/form/primitives/fieldset/root.cjs +86 -0
- package/build/form/primitives/fieldset/root.cjs.map +7 -0
- package/build/form/primitives/fieldset/types.cjs +19 -0
- package/build/form/primitives/fieldset/types.cjs.map +7 -0
- package/build/form/primitives/index.cjs +11 -2
- package/build/form/primitives/index.cjs.map +2 -2
- package/build/form/primitives/input/index.cjs +31 -0
- package/build/form/primitives/input/index.cjs.map +7 -0
- package/build/form/primitives/input/input.cjs +148 -0
- package/build/form/primitives/input/input.cjs.map +7 -0
- package/build/form/primitives/input/types.cjs +19 -0
- package/build/form/primitives/input/types.cjs.map +7 -0
- package/build/form/primitives/input-layout/context.cjs +49 -0
- package/build/form/primitives/input-layout/context.cjs.map +7 -0
- package/build/form/primitives/input-layout/index.cjs +35 -0
- package/build/form/primitives/input-layout/index.cjs.map +7 -0
- package/build/form/primitives/input-layout/input-layout.cjs +196 -0
- package/build/form/primitives/input-layout/input-layout.cjs.map +7 -0
- package/build/form/primitives/input-layout/slot.cjs +165 -0
- package/build/form/primitives/input-layout/slot.cjs.map +7 -0
- package/build/form/primitives/input-layout/types.cjs +19 -0
- package/build/form/primitives/input-layout/types.cjs.map +7 -0
- package/build/icon/icon.cjs +46 -0
- package/build/icon/icon.cjs.map +7 -0
- package/build/icon/index.cjs +31 -0
- package/build/icon/index.cjs.map +7 -0
- package/build/icon/types.cjs +19 -0
- package/build/icon/types.cjs.map +7 -0
- package/build/index.cjs +4 -0
- package/build/index.cjs.map +2 -2
- package/build-module/badge/badge.mjs.map +2 -2
- package/build-module/button/button.mjs +366 -0
- package/build-module/button/button.mjs.map +7 -0
- package/build-module/button/icon.mjs +22 -0
- package/build-module/button/icon.mjs.map +7 -0
- package/build-module/button/index.mjs +14 -0
- package/build-module/button/index.mjs.map +7 -0
- package/build-module/button/types.mjs +1 -0
- package/build-module/button/types.mjs.map +7 -0
- package/build-module/form/primitives/field/root.mjs.map +2 -2
- package/build-module/form/primitives/fieldset/context.mjs +14 -0
- package/build-module/form/primitives/fieldset/context.mjs.map +7 -0
- package/build-module/form/primitives/fieldset/description.mjs +66 -0
- package/build-module/form/primitives/fieldset/description.mjs.map +7 -0
- package/build-module/form/primitives/fieldset/details.mjs +68 -0
- package/build-module/form/primitives/fieldset/details.mjs.map +7 -0
- package/build-module/form/primitives/fieldset/index.mjs +12 -0
- package/build-module/form/primitives/fieldset/index.mjs.map +7 -0
- package/build-module/form/primitives/fieldset/legend.mjs +59 -0
- package/build-module/form/primitives/fieldset/legend.mjs.map +7 -0
- package/build-module/form/primitives/fieldset/root.mjs +51 -0
- package/build-module/form/primitives/fieldset/root.mjs.map +7 -0
- package/build-module/form/primitives/fieldset/types.mjs +1 -0
- package/build-module/form/primitives/fieldset/types.mjs.map +7 -0
- package/build-module/form/primitives/index.mjs +7 -1
- package/build-module/form/primitives/index.mjs.map +2 -2
- package/build-module/form/primitives/input/index.mjs +6 -0
- package/build-module/form/primitives/input/index.mjs.map +7 -0
- package/build-module/form/primitives/input/input.mjs +113 -0
- package/build-module/form/primitives/input/input.mjs.map +7 -0
- package/build-module/form/primitives/input/types.mjs +1 -0
- package/build-module/form/primitives/input/types.mjs.map +7 -0
- package/build-module/form/primitives/input-layout/context.mjs +22 -0
- package/build-module/form/primitives/input-layout/context.mjs.map +7 -0
- package/build-module/form/primitives/input-layout/index.mjs +10 -0
- package/build-module/form/primitives/input-layout/index.mjs.map +7 -0
- package/build-module/form/primitives/input-layout/input-layout.mjs +161 -0
- package/build-module/form/primitives/input-layout/input-layout.mjs.map +7 -0
- package/build-module/form/primitives/input-layout/slot.mjs +130 -0
- package/build-module/form/primitives/input-layout/slot.mjs.map +7 -0
- package/build-module/form/primitives/input-layout/types.mjs +1 -0
- package/build-module/form/primitives/input-layout/types.mjs.map +7 -0
- package/build-module/icon/icon.mjs +21 -0
- package/build-module/icon/icon.mjs.map +7 -0
- package/build-module/icon/index.mjs +6 -0
- package/build-module/icon/index.mjs.map +7 -0
- package/build-module/icon/types.mjs +1 -0
- package/build-module/icon/types.mjs.map +7 -0
- package/build-module/index.mjs +2 -0
- package/build-module/index.mjs.map +2 -2
- package/build-types/badge/badge.d.ts.map +1 -1
- package/build-types/badge/stories/index.story.d.ts +1 -7
- package/build-types/badge/stories/index.story.d.ts.map +1 -1
- package/build-types/badge/types.d.ts +0 -3
- package/build-types/badge/types.d.ts.map +1 -1
- package/build-types/box/stories/index.story.d.ts +1 -1
- package/build-types/box/stories/index.story.d.ts.map +1 -1
- package/build-types/button/button.d.ts +3 -0
- package/build-types/button/button.d.ts.map +1 -0
- package/build-types/button/icon.d.ts +10 -0
- package/build-types/button/icon.d.ts.map +1 -0
- package/build-types/button/index.d.ts +10 -0
- package/build-types/button/index.d.ts.map +1 -0
- package/build-types/button/stories/index.story.d.ts +23 -0
- package/build-types/button/stories/index.story.d.ts.map +1 -0
- package/build-types/button/test/button.test.d.ts +2 -0
- package/build-types/button/test/button.test.d.ts.map +1 -0
- package/build-types/button/test/icon.test.d.ts +2 -0
- package/build-types/button/test/icon.test.d.ts.map +1 -0
- package/build-types/button/types.d.ts +63 -0
- package/build-types/button/types.d.ts.map +1 -0
- package/build-types/form/primitives/field/control.d.ts +1 -1
- package/build-types/form/primitives/field/description.d.ts +1 -1
- package/build-types/form/primitives/field/label.d.ts +1 -1
- package/build-types/form/primitives/field/root.d.ts +3 -1
- package/build-types/form/primitives/field/root.d.ts.map +1 -1
- package/build-types/form/primitives/field/stories/index.story.d.ts +1 -1
- package/build-types/form/primitives/field/stories/index.story.d.ts.map +1 -1
- package/build-types/form/primitives/fieldset/context.d.ts +8 -0
- package/build-types/form/primitives/fieldset/context.d.ts.map +1 -0
- package/build-types/form/primitives/fieldset/description.d.ts +9 -0
- package/build-types/form/primitives/fieldset/description.d.ts.map +1 -0
- package/build-types/form/primitives/fieldset/details.d.ts +21 -0
- package/build-types/form/primitives/fieldset/details.d.ts.map +1 -0
- package/build-types/form/primitives/fieldset/index.d.ts +6 -0
- package/build-types/form/primitives/fieldset/index.d.ts.map +1 -0
- package/build-types/form/primitives/fieldset/legend.d.ts +9 -0
- package/build-types/form/primitives/fieldset/legend.d.ts.map +1 -0
- package/build-types/form/primitives/fieldset/root.d.ts +15 -0
- package/build-types/form/primitives/fieldset/root.d.ts.map +1 -0
- package/build-types/form/primitives/fieldset/stories/index.story.d.ts +18 -0
- package/build-types/form/primitives/fieldset/stories/index.story.d.ts.map +1 -0
- package/build-types/form/primitives/fieldset/test/index.test.d.ts +2 -0
- package/build-types/form/primitives/fieldset/test/index.test.d.ts.map +1 -0
- package/build-types/form/primitives/fieldset/types.d.ts +32 -0
- package/build-types/form/primitives/fieldset/types.d.ts.map +1 -0
- package/build-types/form/primitives/index.d.ts +3 -0
- package/build-types/form/primitives/index.d.ts.map +1 -1
- package/build-types/form/primitives/input/index.d.ts +2 -0
- package/build-types/form/primitives/input/index.d.ts.map +1 -0
- package/build-types/form/primitives/input/input.d.ts +10 -0
- package/build-types/form/primitives/input/input.d.ts.map +1 -0
- package/build-types/form/primitives/input/stories/index.story.d.ts +13 -0
- package/build-types/form/primitives/input/stories/index.story.d.ts.map +1 -0
- package/build-types/form/primitives/input/test/index.test.d.ts +2 -0
- package/build-types/form/primitives/input/test/index.test.d.ts.map +1 -0
- package/build-types/form/primitives/input/types.d.ts +27 -0
- package/build-types/form/primitives/input/types.d.ts.map +1 -0
- package/build-types/form/primitives/input-layout/context.d.ts +17 -0
- package/build-types/form/primitives/input-layout/context.d.ts.map +1 -0
- package/build-types/form/primitives/input-layout/index.d.ts +4 -0
- package/build-types/form/primitives/input-layout/index.d.ts.map +1 -0
- package/build-types/form/primitives/input-layout/input-layout.d.ts +7 -0
- package/build-types/form/primitives/input-layout/input-layout.d.ts.map +1 -0
- package/build-types/form/primitives/input-layout/slot.d.ts +6 -0
- package/build-types/form/primitives/input-layout/slot.d.ts.map +1 -0
- package/build-types/form/primitives/input-layout/stories/index.story.d.ts +24 -0
- package/build-types/form/primitives/input-layout/stories/index.story.d.ts.map +1 -0
- package/build-types/form/primitives/input-layout/test/index.test.d.ts +2 -0
- package/build-types/form/primitives/input-layout/test/index.test.d.ts.map +1 -0
- package/build-types/form/primitives/input-layout/types.d.ts +41 -0
- package/build-types/form/primitives/input-layout/types.d.ts.map +1 -0
- package/build-types/icon/icon.d.ts +14 -0
- package/build-types/icon/icon.d.ts.map +1 -0
- package/build-types/icon/index.d.ts +2 -0
- package/build-types/icon/index.d.ts.map +1 -0
- package/build-types/icon/stories/index.story.d.ts +11 -0
- package/build-types/icon/stories/index.story.d.ts.map +1 -0
- package/build-types/icon/test/icon.test.d.ts +2 -0
- package/build-types/icon/test/icon.test.d.ts.map +1 -0
- package/build-types/icon/types.d.ts +15 -0
- package/build-types/icon/types.d.ts.map +1 -0
- package/build-types/index.d.ts +2 -0
- package/build-types/index.d.ts.map +1 -1
- package/build-types/stack/stories/index.story.d.ts +1 -1
- package/build-types/stack/stories/index.story.d.ts.map +1 -1
- package/build-types/visually-hidden/stories/index.story.d.ts +1 -1
- package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
- package/package.json +14 -5
- package/src/badge/badge.tsx +0 -7
- package/src/badge/stories/index.story.tsx +1 -14
- package/src/badge/types.ts +0 -3
- package/src/box/stories/index.story.tsx +1 -2
- package/src/button/button.tsx +57 -0
- package/src/button/icon.tsx +24 -0
- package/src/button/index.ts +16 -0
- package/src/button/stories/index.story.tsx +192 -0
- package/src/button/style.module.css +232 -0
- package/src/button/test/button.test.tsx +89 -0
- package/src/button/test/icon.test.tsx +13 -0
- package/src/button/types.ts +72 -0
- package/src/form/primitives/field/root.tsx +2 -0
- package/src/form/primitives/field/stories/index.story.tsx +1 -1
- package/src/form/primitives/fieldset/context.tsx +13 -0
- package/src/form/primitives/fieldset/description.tsx +36 -0
- package/src/form/primitives/fieldset/details.tsx +46 -0
- package/src/form/primitives/fieldset/index.ts +6 -0
- package/src/form/primitives/fieldset/legend.tsx +17 -0
- package/src/form/primitives/fieldset/root.tsx +42 -0
- package/src/form/primitives/fieldset/stories/index.story.tsx +67 -0
- package/src/form/primitives/fieldset/style.module.css +12 -0
- package/src/form/primitives/fieldset/test/index.test.tsx +135 -0
- package/src/form/primitives/fieldset/types.ts +35 -0
- package/src/form/primitives/index.ts +3 -0
- package/src/form/primitives/input/index.ts +1 -0
- package/src/form/primitives/input/input.tsx +28 -0
- package/src/form/primitives/input/stories/index.story.tsx +40 -0
- package/src/form/primitives/input/style.module.css +34 -0
- package/src/form/primitives/input/test/index.test.tsx +13 -0
- package/src/form/primitives/input/types.ts +31 -0
- package/src/form/primitives/input-layout/context.tsx +36 -0
- package/src/form/primitives/input-layout/index.ts +6 -0
- package/src/form/primitives/input-layout/input-layout.tsx +49 -0
- package/src/form/primitives/input-layout/slot.tsx +39 -0
- package/src/form/primitives/input-layout/stories/index.story.tsx +67 -0
- package/src/form/primitives/input-layout/style.module.css +82 -0
- package/src/form/primitives/input-layout/test/index.test.tsx +23 -0
- package/src/form/primitives/input-layout/types.ts +44 -0
- package/src/icon/icon.tsx +30 -0
- package/src/icon/index.ts +1 -0
- package/src/icon/stories/index.story.tsx +47 -0
- package/src/icon/test/icon.test.tsx +13 -0
- package/src/icon/types.ts +14 -0
- package/src/index.ts +2 -0
- package/src/stack/stories/index.story.tsx +1 -2
- package/src/stories/introduction.mdx +6 -0
- package/src/utils/css/focus.module.css +31 -0
- package/src/visually-hidden/stories/index.story.tsx +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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';\nimport { SlotContextProvider } from './context';\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<SlotContextProvider type=\"prefix\">\n\t\t\t\t\t{ prefix }\n\t\t\t\t</SlotContextProvider>\n\t\t\t\t{ children }\n\t\t\t\t<SlotContextProvider type=\"suffix\">\n\t\t\t\t\t{ suffix }\n\t\t\t\t</SlotContextProvider>\n\t\t\t</div>\n\t\t);\n\t}\n);\n", "const css = `@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;\n\n@layer wp-ui-utilities {\n\t.resets-module__box-sizing__M2zT5 {\n\t\tbox-sizing: border-box;\n\n\t\t*,\n\t\t*::before,\n\t\t*::after {\n\t\t\tbox-sizing: inherit;\n\t\t}\n\t}\n}\n`;\ndocument.head\n .appendChild(document.createElement(\"style\"))\n .appendChild(document.createTextNode(css));\nexport {css};\nexport default {\n \"box-sizing\": \"resets-module__box-sizing__M2zT5\"\n};", "const css = `@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;\n\n@layer wp-ui-components {\n\t.style-module__input-layout__yyuq- {\n\t\t/* TODO: Use padding tokens */\n\t\t--wp-ui-input-layout-padding-inline: calc(var(--wpds-dimension-base) * 3);\n\n\t\tdisplay: flex;\n\t\theight: 40px;\n\t\tbackground-color: var(--wpds-color-bg-interactive-neutral-weak);\n\t\tborder-width: var(--wpds-border-width-surface-xs);\n\t\tborder-style: solid;\n\t\tborder-color: var(--wpds-color-stroke-interactive-neutral);\n\t\tborder-radius: var(--wpds-border-radius-surface-sm);\n\t\tfont-family: var(--wpds-font-family-body);\n\t\tfont-size: max(var(--wpds-font-size-md), 16px); /* avoid mobile zoom */\n\t\tline-height: 1;\n\t\tcolor: var(--wpds-color-fg-interactive-neutral);\n\n\t\t@media (min-width: 600px) {\n\t\t\tfont-size: var(--wpds-font-size-md);\n\t\t}\n\n\t\t&.style-module__is-size-compact__DIB6h {\n\t\t\t/* TODO: Use padding tokens */\n\t\t\t--wp-ui-input-layout-padding-inline: calc(var(--wpds-dimension-base) * 2);\n\t\t\theight: 32px;\n\t\t}\n\n\t\t&.style-module__is-size-small__7WfNo {\n\t\t\t/* TODO: Use padding tokens */\n\t\t\t--wp-ui-input-layout-padding-inline: calc(var(--wpds-dimension-base) * 2);\n\t\t\theight: 24px;\n\t\t}\n\n\t\t&.style-module__is-disabled__b7cQR {\n\t\t\tbackground-color: var(--wpds-color-bg-interactive-neutral-weak-disabled);\n\t\t\tborder-color: var(--wpds-color-stroke-interactive-neutral-disabled);\n\t\t\tcolor: var(--wpds-color-fg-interactive-neutral-disabled);\n\n\t\t\t@media (forced-colors: active) {\n\t\t\t\tborder-color: GrayText;\n\t\t\t\tcolor: GrayText;\n\t\t\t}\n\t\t}\n\n\t\t&.style-module__is-borderless__gJcnB {\n\t\t\tborder-color: transparent;\n\t\t}\n\n\t\t/* Don't show focus ring when the focus is in the prefix or suffix slots */\n\t\t&:has(.style-module__input-layout-slot__DXr61:focus-within) {\n\t\t\toutline: none;\n\t\t}\n\n\t\t&:hover:not(.style-module__is-disabled__b7cQR, .style-module__is-borderless__gJcnB) {\n\t\t\tborder-color: var(--wpds-color-stroke-interactive-neutral-active);\n\t\t}\n\t}\n\n\t.style-module__input-layout-slot__DXr61 {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\n\t\t&.style-module__is-padding-minimal__DJUmg {\n\t\t\t--wp-ui-input-layout-prefix-padding-start:\n\t\t\t\tcalc(var(--wp-ui-input-layout-padding-inline) -\n\t\t\t\tvar(--wpds-dimension-base));\n\t\t\t--wp-ui-input-layout-suffix-padding-end:\n\t\t\t\tcalc(var(--wp-ui-input-layout-padding-inline) -\n\t\t\t\tvar(--wpds-dimension-base));\n\t\t}\n\n\t\t&.style-module__is-prefix__ezQzb {\n\t\t\tpadding-inline-start: var(--wp-ui-input-layout-prefix-padding-start, var(--wp-ui-input-layout-padding-inline));\n\t\t}\n\n\t\t&.style-module__is-suffix__R6el3 {\n\t\t\tpadding-inline-end: var(--wp-ui-input-layout-suffix-padding-end, var(--wp-ui-input-layout-padding-inline));\n\t\t}\n\t}\n}\n`;\ndocument.head\n .appendChild(document.createElement(\"style\"))\n .appendChild(document.createTextNode(css));\nexport {css};\nexport default {\n \"input-layout\": \"style-module__input-layout__yyuq-\",\n \"is-size-compact\": \"style-module__is-size-compact__DIB6h\",\n \"is-size-small\": \"style-module__is-size-small__7WfNo\",\n \"is-disabled\": \"style-module__is-disabled__b7cQR\",\n \"is-borderless\": \"style-module__is-borderless__gJcnB\",\n \"input-layout-slot\": \"style-module__input-layout-slot__DXr61\",\n \"is-padding-minimal\": \"style-module__is-padding-minimal__DJUmg\",\n \"is-prefix\": \"style-module__is-prefix__ezQzb\",\n \"is-suffix\": \"style-module__is-suffix__R6el3\"\n};"],
|
|
5
|
+
"mappings": ";AAAA,OAAO,UAAU;AACjB,SAAS,kBAAkB;;;ACD3B,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcZ,SAAS,KACJ,YAAY,SAAS,cAAc,OAAO,CAAC,EAC3C,YAAY,SAAS,eAAe,GAAG,CAAC;AAE7C,IAAO,iBAAQ;AAAA,EACb,cAAc;AAChB;;;ACpBA,IAAMA,OAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmFZ,SAAS,KACJ,YAAY,SAAS,cAAc,OAAO,CAAC,EAC3C,YAAY,SAAS,eAAeA,IAAG,CAAC;AAE7C,IAAO,gBAAQ;AAAA,EACb,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,aAAa;AAAA,EACb,aAAa;AACf;;;AF5FA,SAAS,2BAA2B;AAqBjC,SAYC,KAZD;AAfI,IAAM,cAAc;AAAA,EAC1B,SAASC,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,WAAY;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,QAEL;AAAA,8BAAC,uBAAoB,MAAK,UACvB,kBACH;AAAA,UACE;AAAA,UACF,oBAAC,uBAAoB,MAAK,UACvB,kBACH;AAAA;AAAA;AAAA,IACD;AAAA,EAEF;AACD;",
|
|
6
|
+
"names": ["css", "InputLayout"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
// packages/ui/src/form/primitives/input-layout/slot.tsx
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { forwardRef } from "@wordpress/element";
|
|
4
|
+
|
|
5
|
+
// packages/ui/src/form/primitives/input-layout/style.module.css
|
|
6
|
+
var css = `@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;
|
|
7
|
+
|
|
8
|
+
@layer wp-ui-components {
|
|
9
|
+
.style-module__input-layout__yyuq- {
|
|
10
|
+
/* TODO: Use padding tokens */
|
|
11
|
+
--wp-ui-input-layout-padding-inline: calc(var(--wpds-dimension-base) * 3);
|
|
12
|
+
|
|
13
|
+
display: flex;
|
|
14
|
+
height: 40px;
|
|
15
|
+
background-color: var(--wpds-color-bg-interactive-neutral-weak);
|
|
16
|
+
border-width: var(--wpds-border-width-surface-xs);
|
|
17
|
+
border-style: solid;
|
|
18
|
+
border-color: var(--wpds-color-stroke-interactive-neutral);
|
|
19
|
+
border-radius: var(--wpds-border-radius-surface-sm);
|
|
20
|
+
font-family: var(--wpds-font-family-body);
|
|
21
|
+
font-size: max(var(--wpds-font-size-md), 16px); /* avoid mobile zoom */
|
|
22
|
+
line-height: 1;
|
|
23
|
+
color: var(--wpds-color-fg-interactive-neutral);
|
|
24
|
+
|
|
25
|
+
@media (min-width: 600px) {
|
|
26
|
+
font-size: var(--wpds-font-size-md);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.style-module__is-size-compact__DIB6h {
|
|
30
|
+
/* TODO: Use padding tokens */
|
|
31
|
+
--wp-ui-input-layout-padding-inline: calc(var(--wpds-dimension-base) * 2);
|
|
32
|
+
height: 32px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.style-module__is-size-small__7WfNo {
|
|
36
|
+
/* TODO: Use padding tokens */
|
|
37
|
+
--wp-ui-input-layout-padding-inline: calc(var(--wpds-dimension-base) * 2);
|
|
38
|
+
height: 24px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&.style-module__is-disabled__b7cQR {
|
|
42
|
+
background-color: var(--wpds-color-bg-interactive-neutral-weak-disabled);
|
|
43
|
+
border-color: var(--wpds-color-stroke-interactive-neutral-disabled);
|
|
44
|
+
color: var(--wpds-color-fg-interactive-neutral-disabled);
|
|
45
|
+
|
|
46
|
+
@media (forced-colors: active) {
|
|
47
|
+
border-color: GrayText;
|
|
48
|
+
color: GrayText;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&.style-module__is-borderless__gJcnB {
|
|
53
|
+
border-color: transparent;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Don't show focus ring when the focus is in the prefix or suffix slots */
|
|
57
|
+
&:has(.style-module__input-layout-slot__DXr61:focus-within) {
|
|
58
|
+
outline: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&:hover:not(.style-module__is-disabled__b7cQR, .style-module__is-borderless__gJcnB) {
|
|
62
|
+
border-color: var(--wpds-color-stroke-interactive-neutral-active);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.style-module__input-layout-slot__DXr61 {
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
|
|
70
|
+
&.style-module__is-padding-minimal__DJUmg {
|
|
71
|
+
--wp-ui-input-layout-prefix-padding-start:
|
|
72
|
+
calc(var(--wp-ui-input-layout-padding-inline) -
|
|
73
|
+
var(--wpds-dimension-base));
|
|
74
|
+
--wp-ui-input-layout-suffix-padding-end:
|
|
75
|
+
calc(var(--wp-ui-input-layout-padding-inline) -
|
|
76
|
+
var(--wpds-dimension-base));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&.style-module__is-prefix__ezQzb {
|
|
80
|
+
padding-inline-start: var(--wp-ui-input-layout-prefix-padding-start, var(--wp-ui-input-layout-padding-inline));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&.style-module__is-suffix__R6el3 {
|
|
84
|
+
padding-inline-end: var(--wp-ui-input-layout-suffix-padding-end, var(--wp-ui-input-layout-padding-inline));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
`;
|
|
89
|
+
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
|
|
90
|
+
var style_default = {
|
|
91
|
+
"input-layout": "style-module__input-layout__yyuq-",
|
|
92
|
+
"is-size-compact": "style-module__is-size-compact__DIB6h",
|
|
93
|
+
"is-size-small": "style-module__is-size-small__7WfNo",
|
|
94
|
+
"is-disabled": "style-module__is-disabled__b7cQR",
|
|
95
|
+
"is-borderless": "style-module__is-borderless__gJcnB",
|
|
96
|
+
"input-layout-slot": "style-module__input-layout-slot__DXr61",
|
|
97
|
+
"is-padding-minimal": "style-module__is-padding-minimal__DJUmg",
|
|
98
|
+
"is-prefix": "style-module__is-prefix__ezQzb",
|
|
99
|
+
"is-suffix": "style-module__is-suffix__R6el3"
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// packages/ui/src/form/primitives/input-layout/slot.tsx
|
|
103
|
+
import { useInputLayoutSlotContext } from "./context.mjs";
|
|
104
|
+
import { jsx } from "react/jsx-runtime";
|
|
105
|
+
var InputLayoutSlot = forwardRef(function InputLayoutSlot2({ type: typeProp, padding = "default", ...restProps }, ref) {
|
|
106
|
+
const typeContext = useInputLayoutSlotContext();
|
|
107
|
+
const type = typeProp ?? typeContext;
|
|
108
|
+
if (!type) {
|
|
109
|
+
throw new Error(
|
|
110
|
+
"InputLayoutSlot requires a `type` prop or must be used within an InputLayout prefix/suffix slot."
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
return /* @__PURE__ */ jsx(
|
|
114
|
+
"div",
|
|
115
|
+
{
|
|
116
|
+
ref,
|
|
117
|
+
className: clsx(
|
|
118
|
+
style_default["input-layout-slot"],
|
|
119
|
+
style_default[`is-${type}`],
|
|
120
|
+
style_default[`is-padding-${padding}`]
|
|
121
|
+
),
|
|
122
|
+
...restProps
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
});
|
|
126
|
+
InputLayoutSlot.displayName = "InputLayout.Slot";
|
|
127
|
+
export {
|
|
128
|
+
InputLayoutSlot
|
|
129
|
+
};
|
|
130
|
+
//# sourceMappingURL=slot.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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';\nimport { useInputLayoutSlotContext } from './context';\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(\n\t{ type: typeProp, padding = 'default', ...restProps },\n\tref\n) {\n\tconst typeContext = useInputLayoutSlotContext();\n\tconst type = typeProp ?? typeContext;\n\n\tif ( ! type ) {\n\t\tthrow new Error(\n\t\t\t'InputLayoutSlot requires a `type` prop or must be used within an InputLayout prefix/suffix slot.'\n\t\t);\n\t}\n\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-${ type }` ],\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", "const css = `@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;\n\n@layer wp-ui-components {\n\t.style-module__input-layout__yyuq- {\n\t\t/* TODO: Use padding tokens */\n\t\t--wp-ui-input-layout-padding-inline: calc(var(--wpds-dimension-base) * 3);\n\n\t\tdisplay: flex;\n\t\theight: 40px;\n\t\tbackground-color: var(--wpds-color-bg-interactive-neutral-weak);\n\t\tborder-width: var(--wpds-border-width-surface-xs);\n\t\tborder-style: solid;\n\t\tborder-color: var(--wpds-color-stroke-interactive-neutral);\n\t\tborder-radius: var(--wpds-border-radius-surface-sm);\n\t\tfont-family: var(--wpds-font-family-body);\n\t\tfont-size: max(var(--wpds-font-size-md), 16px); /* avoid mobile zoom */\n\t\tline-height: 1;\n\t\tcolor: var(--wpds-color-fg-interactive-neutral);\n\n\t\t@media (min-width: 600px) {\n\t\t\tfont-size: var(--wpds-font-size-md);\n\t\t}\n\n\t\t&.style-module__is-size-compact__DIB6h {\n\t\t\t/* TODO: Use padding tokens */\n\t\t\t--wp-ui-input-layout-padding-inline: calc(var(--wpds-dimension-base) * 2);\n\t\t\theight: 32px;\n\t\t}\n\n\t\t&.style-module__is-size-small__7WfNo {\n\t\t\t/* TODO: Use padding tokens */\n\t\t\t--wp-ui-input-layout-padding-inline: calc(var(--wpds-dimension-base) * 2);\n\t\t\theight: 24px;\n\t\t}\n\n\t\t&.style-module__is-disabled__b7cQR {\n\t\t\tbackground-color: var(--wpds-color-bg-interactive-neutral-weak-disabled);\n\t\t\tborder-color: var(--wpds-color-stroke-interactive-neutral-disabled);\n\t\t\tcolor: var(--wpds-color-fg-interactive-neutral-disabled);\n\n\t\t\t@media (forced-colors: active) {\n\t\t\t\tborder-color: GrayText;\n\t\t\t\tcolor: GrayText;\n\t\t\t}\n\t\t}\n\n\t\t&.style-module__is-borderless__gJcnB {\n\t\t\tborder-color: transparent;\n\t\t}\n\n\t\t/* Don't show focus ring when the focus is in the prefix or suffix slots */\n\t\t&:has(.style-module__input-layout-slot__DXr61:focus-within) {\n\t\t\toutline: none;\n\t\t}\n\n\t\t&:hover:not(.style-module__is-disabled__b7cQR, .style-module__is-borderless__gJcnB) {\n\t\t\tborder-color: var(--wpds-color-stroke-interactive-neutral-active);\n\t\t}\n\t}\n\n\t.style-module__input-layout-slot__DXr61 {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\n\t\t&.style-module__is-padding-minimal__DJUmg {\n\t\t\t--wp-ui-input-layout-prefix-padding-start:\n\t\t\t\tcalc(var(--wp-ui-input-layout-padding-inline) -\n\t\t\t\tvar(--wpds-dimension-base));\n\t\t\t--wp-ui-input-layout-suffix-padding-end:\n\t\t\t\tcalc(var(--wp-ui-input-layout-padding-inline) -\n\t\t\t\tvar(--wpds-dimension-base));\n\t\t}\n\n\t\t&.style-module__is-prefix__ezQzb {\n\t\t\tpadding-inline-start: var(--wp-ui-input-layout-prefix-padding-start, var(--wp-ui-input-layout-padding-inline));\n\t\t}\n\n\t\t&.style-module__is-suffix__R6el3 {\n\t\t\tpadding-inline-end: var(--wp-ui-input-layout-suffix-padding-end, var(--wp-ui-input-layout-padding-inline));\n\t\t}\n\t}\n}\n`;\ndocument.head\n .appendChild(document.createElement(\"style\"))\n .appendChild(document.createTextNode(css));\nexport {css};\nexport default {\n \"input-layout\": \"style-module__input-layout__yyuq-\",\n \"is-size-compact\": \"style-module__is-size-compact__DIB6h\",\n \"is-size-small\": \"style-module__is-size-small__7WfNo\",\n \"is-disabled\": \"style-module__is-disabled__b7cQR\",\n \"is-borderless\": \"style-module__is-borderless__gJcnB\",\n \"input-layout-slot\": \"style-module__input-layout-slot__DXr61\",\n \"is-padding-minimal\": \"style-module__is-padding-minimal__DJUmg\",\n \"is-prefix\": \"style-module__is-prefix__ezQzb\",\n \"is-suffix\": \"style-module__is-suffix__R6el3\"\n};"],
|
|
5
|
+
"mappings": ";AAAA,OAAO,UAAU;AACjB,SAAS,kBAAkB;;;ACD3B,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmFZ,SAAS,KACJ,YAAY,SAAS,cAAc,OAAO,CAAC,EAC3C,YAAY,SAAS,eAAe,GAAG,CAAC;AAE7C,IAAO,gBAAQ;AAAA,EACb,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,aAAa;AAAA,EACb,aAAa;AACf;;;AD7FA,SAAS,iCAAiC;AAsBxC;AAjBK,IAAM,kBAAkB,WAG5B,SAASA,iBACX,EAAE,MAAM,UAAU,UAAU,WAAW,GAAG,UAAU,GACpD,KACC;AACD,QAAM,cAAc,0BAA0B;AAC9C,QAAM,OAAO,YAAY;AAEzB,MAAK,CAAE,MAAO;AACb,UAAM,IAAI;AAAA,MACT;AAAA,IACD;AAAA,EACD;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,WAAY;AAAA,QACX,cAAQ,mBAAoB;AAAA,QAC5B,cAAQ,MAAO,IAAK,EAAG;AAAA,QACvB,cAAQ,cAAe,OAAQ,EAAG;AAAA,MACnC;AAAA,MACE,GAAG;AAAA;AAAA,EACN;AAEF,CAAE;AAEF,gBAAgB,cAAc;",
|
|
6
|
+
"names": ["InputLayoutSlot"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.mjs.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// packages/ui/src/icon/icon.tsx
|
|
2
|
+
import { forwardRef } from "@wordpress/element";
|
|
3
|
+
import { SVG } from "@wordpress/primitives";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
var Icon = forwardRef(function Icon2({ icon, size = 24, ...restProps }, ref) {
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
SVG,
|
|
8
|
+
{
|
|
9
|
+
ref,
|
|
10
|
+
fill: "currentColor",
|
|
11
|
+
...icon.props,
|
|
12
|
+
...restProps,
|
|
13
|
+
width: size,
|
|
14
|
+
height: size
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
Icon
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=icon.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/icon/icon.tsx"],
|
|
4
|
+
"sourcesContent": ["import { forwardRef } from '@wordpress/element';\nimport { SVG } from '@wordpress/primitives';\nimport type { IconProps } from './types';\n\n/**\n * Renders an SVG icon with a 24px default size.\n *\n * If no `fill` colors are explicitly set on the icon itself, it will be rendered with a `currentColor` fill.\n *\n * ```jsx\n * import { wordpress } from '@wordpress/icons';\n *\n * <Icon icon={ wordpress } />\n * ```\n */\nexport const Icon = forwardRef< SVGSVGElement, IconProps >( function Icon(\n\t{ icon, size = 24, ...restProps },\n\tref\n) {\n\treturn (\n\t\t<SVG\n\t\t\tref={ ref }\n\t\t\tfill=\"currentColor\"\n\t\t\t{ ...icon.props }\n\t\t\t{ ...restProps }\n\t\t\twidth={ size }\n\t\t\theight={ size }\n\t\t/>\n\t);\n} );\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,kBAAkB;AAC3B,SAAS,WAAW;AAmBlB;AALK,IAAM,OAAO,WAAwC,SAASA,MACpE,EAAE,MAAM,OAAO,IAAI,GAAG,UAAU,GAChC,KACC;AACD,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,MAAK;AAAA,MACH,GAAG,KAAK;AAAA,MACR,GAAG;AAAA,MACL,OAAQ;AAAA,MACR,QAAS;AAAA;AAAA,EACV;AAEF,CAAE;",
|
|
6
|
+
"names": ["Icon"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.mjs.map
|
package/build-module/index.mjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// packages/ui/src/index.ts
|
|
2
2
|
export * from "./badge/index.mjs";
|
|
3
3
|
export * from "./box/index.mjs";
|
|
4
|
+
export * from "./button/index.mjs";
|
|
4
5
|
export * from "./form/primitives/index.mjs";
|
|
6
|
+
export * from "./icon/index.mjs";
|
|
5
7
|
export * from "./stack/index.mjs";
|
|
6
8
|
export * from "./visually-hidden/index.mjs";
|
|
7
9
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from './badge';\nexport * from './box';\nexport * from './form/primitives';\nexport * from './stack';\nexport * from './visually-hidden';\n"],
|
|
5
|
-
"mappings": ";AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
4
|
+
"sourcesContent": ["export * from './badge';\nexport * from './box';\nexport * from './button';\nexport * from './form/primitives';\nexport * from './icon';\nexport * from './stack';\nexport * from './visually-hidden';\n"],
|
|
5
|
+
"mappings": ";AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/badge/badge.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/badge/badge.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAwD1C;;;GAGG;AACH,eAAO,MAAM,KAAK,uGAwBf,CAAC"}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
5
|
-
/**
|
|
6
|
-
* Internal dependencies
|
|
7
|
-
*/
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
8
2
|
import { Badge } from '../index';
|
|
9
3
|
declare const meta: Meta<typeof Badge>;
|
|
10
4
|
export default meta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/badge/stories/index.story.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/badge/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,KAAK,CAG7B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,KAAK,CAAE,CAAC;AAEtC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAMlB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAMpB,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,KAMjB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAMpB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAM3B,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAMlB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KA6CxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/badge/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/badge/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAE,MAAM,CAAE;IAC3D;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,MAAM,CAAC,EACJ,MAAM,GACN,QAAQ,GACR,KAAK,GACL,QAAQ,GACR,eAAe,GACf,OAAO,GACP,MAAM,CAAC;CACV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/box/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/box/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAE7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,GAAG,CAG3B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,GAAG,CAAE,CAAC;AAEpC,eAAO,MAAM,OAAO,EAAE,KAgBrB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAUhC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/button/button.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAK3C,eAAO,MAAM,MAAM,2GA8ClB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type IconProps } from '../icon/types';
|
|
2
|
+
interface ButtonIconProps extends IconProps {
|
|
3
|
+
/**
|
|
4
|
+
* The icon to display, from the `@wordpress/icons` package.
|
|
5
|
+
*/
|
|
6
|
+
icon: IconProps['icon'];
|
|
7
|
+
}
|
|
8
|
+
export declare const ButtonIcon: import("react").ForwardRefExoticComponent<Omit<ButtonIconProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/button/icon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAG/C,UAAU,eAAgB,SAAQ,SAAS;IAC1C;;OAEG;IACH,IAAI,EAAE,SAAS,CAAE,MAAM,CAAE,CAAC;CAC1B;AAED,eAAO,MAAM,UAAU,wHAYtB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Button as ButtonButton } from './button';
|
|
2
|
+
import { ButtonIcon } from './icon';
|
|
3
|
+
/**
|
|
4
|
+
* A versatile button component with multiple variants, tones, and sizes.
|
|
5
|
+
* Built on design tokens for consistent theming and accessibility.
|
|
6
|
+
*/
|
|
7
|
+
export declare const Button: typeof ButtonButton & {
|
|
8
|
+
Icon: typeof ButtonIcon;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC;;;GAGG;AACH,eAAO,MAAM,MAAM,EAMZ,OAAO,YAAY,GAAG;IAC5B,IAAI,EAAE,OAAO,UAAU,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Button } from '../index';
|
|
3
|
+
declare const meta: Meta<typeof Button>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Button>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Outline: Story;
|
|
8
|
+
export declare const Minimal: Story;
|
|
9
|
+
export declare const Compact: Story;
|
|
10
|
+
export declare const Small: Story;
|
|
11
|
+
export declare const Neutral: Story;
|
|
12
|
+
export declare const NeutralOutline: Story;
|
|
13
|
+
export declare const Unstyled: Story;
|
|
14
|
+
export declare const AllTonesAndVariants: Story;
|
|
15
|
+
export declare const WithIcon: Story;
|
|
16
|
+
export declare const Loading: Story;
|
|
17
|
+
/**
|
|
18
|
+
* The pressed state is only available for buttons with `tone="neutral"` and
|
|
19
|
+
* `variant="minimal"`. This represents a toggle button that is currently in an
|
|
20
|
+
* active/pressed state.
|
|
21
|
+
*/
|
|
22
|
+
export declare const Pressed: Story;
|
|
23
|
+
//# sourceMappingURL=index.story.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/button/stories/index.story.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,MAAM,CAQ9B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,MAAM,CAAE,CAAC;AAEvC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAO5B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KA6DjC,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,KAoBrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.test.d.ts","sourceRoot":"","sources":["../../../src/button/test/button.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.test.d.ts","sourceRoot":"","sources":["../../../src/button/test/icon.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type ReactNode, type HTMLAttributes } from 'react';
|
|
2
|
+
import type { Button as _Button } from '@base-ui/react/button';
|
|
3
|
+
import type { ComponentProps } from '../utils/types';
|
|
4
|
+
type _ButtonProps = ComponentProps<typeof _Button>;
|
|
5
|
+
export interface ButtonProps extends Omit<_ButtonProps, 'disabled' | 'aria-pressed'> {
|
|
6
|
+
/**
|
|
7
|
+
* The variant of the button. Variants describe the visual style treatment
|
|
8
|
+
* of the button.
|
|
9
|
+
*
|
|
10
|
+
* @default "solid"
|
|
11
|
+
*/
|
|
12
|
+
variant?: 'solid' | 'outline' | 'minimal' | 'unstyled';
|
|
13
|
+
/**
|
|
14
|
+
* The tone of the button, describing a semantic color intent:
|
|
15
|
+
*
|
|
16
|
+
* - `'brand': for the most prominent actions, using the brand colors.
|
|
17
|
+
* - `'neutral'` for less prominent actions.
|
|
18
|
+
*
|
|
19
|
+
* @default "brand"
|
|
20
|
+
*/
|
|
21
|
+
tone?: 'brand' | 'neutral';
|
|
22
|
+
/**
|
|
23
|
+
* The size of the button.
|
|
24
|
+
*
|
|
25
|
+
* - `'default'`: For normal text-label buttons, unless it is a toggle button.
|
|
26
|
+
* - `'compact'`: For toggle buttons, icon buttons, and buttons when used in context of either.
|
|
27
|
+
* - `'small'`: For icon buttons associated with more advanced or auxiliary features.
|
|
28
|
+
*
|
|
29
|
+
* @default "default"
|
|
30
|
+
*/
|
|
31
|
+
size?: 'default' | 'compact' | 'small';
|
|
32
|
+
/**
|
|
33
|
+
* Whether the button is disabled.
|
|
34
|
+
*/
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Whether the element should be focusable even when it is disabled.
|
|
38
|
+
*
|
|
39
|
+
* @default true
|
|
40
|
+
*/
|
|
41
|
+
focusableWhenDisabled?: _ButtonProps['focusableWhenDisabled'];
|
|
42
|
+
/**
|
|
43
|
+
* Indicates the current "pressed" state of toggle buttons. This should only
|
|
44
|
+
* be used with neutral minimal buttons.
|
|
45
|
+
*/
|
|
46
|
+
'aria-pressed'?: HTMLAttributes<HTMLButtonElement>['aria-pressed'];
|
|
47
|
+
/**
|
|
48
|
+
* The content of the button.
|
|
49
|
+
*/
|
|
50
|
+
children?: ReactNode;
|
|
51
|
+
/**
|
|
52
|
+
* Whether the button is in a loading state, such as when an action is being
|
|
53
|
+
* performed.
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
loading?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* The text used for assistive technology to indicate the loading state.
|
|
59
|
+
*/
|
|
60
|
+
loadingAnnouncement?: string;
|
|
61
|
+
}
|
|
62
|
+
export {};
|
|
63
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/button/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,KAAK,YAAY,GAAG,cAAc,CAAE,OAAO,OAAO,CAAE,CAAC;AAErD,MAAM,WAAW,WAChB,SAAQ,IAAI,CAAE,YAAY,EAAE,UAAU,GAAG,cAAc,CAAE;IACzD;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IAEvD;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE3B;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,YAAY,CAAE,uBAAuB,CAAE,CAAC;IAEhE;;;OAGG;IACH,cAAc,CAAC,EAAE,cAAc,CAAE,iBAAiB,CAAE,CAAE,cAAc,CAAE,CAAC;IAEvE;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Field as _Field } from '@base-ui/react/field';
|
|
2
|
-
export declare const Control: import("react").ForwardRefExoticComponent<Omit<import("../../../utils/types").ComponentProps<import("react").ForwardRefExoticComponent<import("@base-ui/react
|
|
2
|
+
export declare const Control: import("react").ForwardRefExoticComponent<Omit<import("../../../utils/types").ComponentProps<import("react").ForwardRefExoticComponent<import("@base-ui/react").FieldControlProps & import("react").RefAttributes<HTMLInputElement>>>, "defaultValue"> & {
|
|
3
3
|
children?: _Field.Control.Props["children"];
|
|
4
4
|
defaultValue?: _Field.Control.Props["defaultValue"];
|
|
5
5
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const Description: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react
|
|
1
|
+
export declare const Description: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").FieldDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref">, "className" | "children" | "render"> & {
|
|
2
2
|
className?: string;
|
|
3
3
|
render?: ((props: import("react").HTMLAttributes<any> & {
|
|
4
4
|
ref?: import("react").Ref<any> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Field as _Field } from '@base-ui/react/field';
|
|
2
|
-
export declare const Label: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react
|
|
2
|
+
export declare const Label: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").FieldLabelProps & import("react").RefAttributes<any>, "ref">, "className" | "children" | "render"> & {
|
|
3
3
|
className?: string;
|
|
4
4
|
render?: ((props: import("react").HTMLAttributes<any> & {
|
|
5
5
|
ref?: import("react").Ref<any> | undefined;
|
|
@@ -3,10 +3,12 @@ import { Field as _Field } from '@base-ui/react/field';
|
|
|
3
3
|
* A low-level component that associates an accessible label and description
|
|
4
4
|
* with a single form control element.
|
|
5
5
|
*
|
|
6
|
+
* To label a group of multiple form control elements, use the `Fieldset` component instead.
|
|
7
|
+
*
|
|
6
8
|
* Simply wrapping a control with this component does not guarantee
|
|
7
9
|
* accessible labeling. See examples for how to associate the label in different cases.
|
|
8
10
|
*/
|
|
9
|
-
export declare const Root: import("react").ForwardRefExoticComponent<Omit<import("../../../utils/types").ComponentProps<import("react").ForwardRefExoticComponent<import("@base-ui/react
|
|
11
|
+
export declare const Root: import("react").ForwardRefExoticComponent<Omit<import("../../../utils/types").ComponentProps<import("react").ForwardRefExoticComponent<import("@base-ui/react").FieldRootProps & import("react").RefAttributes<HTMLDivElement>>>, "disabled" | "validate" | "validationMode" | "validationDebounceTime" | "invalid" | "dirty" | "touched"> & {
|
|
10
12
|
children?: _Field.Root.Props["children"];
|
|
11
13
|
disabled?: _Field.Root.Props["disabled"];
|
|
12
14
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/field/root.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAUvD
|
|
1
|
+
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/field/root.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAUvD;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI;;;kDAYd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../../src/form/primitives/field/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../../src/form/primitives/field/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,KAAK,CAAC,IAAI,CAUlC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,KAAK,CAAC,IAAI,CAchD,CAAC;AAQF;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAE,OAAO,KAAK,CAAC,IAAI,CAoBrD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAE,OAAO,KAAK,CAAC,IAAI,CAoB5D,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAE,OAAO,KAAK,CAAC,IAAI,CAkBpD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type FieldsetContextType = {
|
|
2
|
+
registerDescriptionId: (id: string) => void;
|
|
3
|
+
unregisterDescriptionId: () => void;
|
|
4
|
+
};
|
|
5
|
+
export declare const FieldsetContext: import("react").Context<FieldsetContextType>;
|
|
6
|
+
export declare const useFieldsetContext: () => FieldsetContextType;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/fieldset/context.tsx"],"names":[],"mappings":"AAEA,KAAK,mBAAmB,GAAG;IAC1B,qBAAqB,EAAE,CAAE,EAAE,EAAE,MAAM,KAAM,IAAI,CAAC;IAC9C,uBAAuB,EAAE,MAAM,IAAI,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,eAAe,8CAGzB,CAAC;AAEJ,eAAO,MAAM,kBAAkB,2BAAsC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const FieldsetDescription: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, "className" | "children" | "render"> & {
|
|
2
|
+
className?: string;
|
|
3
|
+
render?: ((props: import("react").HTMLAttributes<any> & {
|
|
4
|
+
ref?: import("react").Ref<any> | undefined;
|
|
5
|
+
}) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
|
|
6
|
+
} & {
|
|
7
|
+
children?: string;
|
|
8
|
+
} & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
9
|
+
//# sourceMappingURL=description.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/fieldset/description.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB;;;;;;;wDA4B7B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A component for showing additional information about the fieldset,
|
|
3
|
+
* styled similarly to a normal `Fieldset.Description`.
|
|
4
|
+
* Unlike a normal description, it can include links and other semantic elements.
|
|
5
|
+
*
|
|
6
|
+
* Although this content is not associated with the fieldset using direct semantics,
|
|
7
|
+
* it is made discoverable to screen reader users via a visually hidden description,
|
|
8
|
+
* alerting them to the presence of additional information below.
|
|
9
|
+
*
|
|
10
|
+
* If the content only includes plain text, use `Fieldset.Description` instead,
|
|
11
|
+
* so the readout is not unnecessarily verbose for screen reader users.
|
|
12
|
+
*/
|
|
13
|
+
export declare const FieldsetDetails: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className" | "children" | "render"> & {
|
|
14
|
+
className?: string;
|
|
15
|
+
render?: ((props: import("react").HTMLAttributes<any> & {
|
|
16
|
+
ref?: import("react").Ref<any> | undefined;
|
|
17
|
+
}) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
|
|
18
|
+
} & {
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
|
+
//# sourceMappingURL=details.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/fieldset/details.tsx"],"names":[],"mappings":"AAQA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe;;;;;;;kDAyBzB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FieldsetRoot as Root } from './root';
|
|
2
|
+
import { FieldsetLegend as Legend } from './legend';
|
|
3
|
+
import { FieldsetDescription as Description } from './description';
|
|
4
|
+
import { FieldsetDetails as Details } from './details';
|
|
5
|
+
export { Root, Legend, Description, Details };
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/fieldset/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,cAAc,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,mBAAmB,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,eAAe,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const FieldsetLegend: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").FieldsetLegendProps & import("react").RefAttributes<HTMLDivElement>, "ref">, "className" | "children" | "render"> & {
|
|
2
|
+
className?: string;
|
|
3
|
+
render?: ((props: import("react").HTMLAttributes<any> & {
|
|
4
|
+
ref?: import("react").Ref<any> | undefined;
|
|
5
|
+
}) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
|
|
6
|
+
} & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
//# sourceMappingURL=legend.d.ts.map
|