@wordpress/ui 0.5.1-next.ba3aee3a2.0 → 0.6.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 +7 -2
- package/build/box/box.cjs +2 -2
- package/build/box/box.cjs.map +2 -2
- package/build/button/button.cjs +22 -305
- package/build/button/button.cjs.map +3 -3
- package/build/button/types.cjs.map +1 -1
- package/build/form/primitives/constants.cjs +35 -0
- package/build/form/primitives/constants.cjs.map +7 -0
- package/build/form/primitives/field/description.cjs +6 -33
- package/build/form/primitives/field/description.cjs.map +2 -2
- package/build/form/primitives/field/details.cjs +6 -33
- package/build/form/primitives/field/details.cjs.map +2 -2
- package/build/form/primitives/field/label.cjs +6 -33
- package/build/form/primitives/field/label.cjs.map +2 -2
- package/build/form/primitives/field/root.cjs +6 -17
- package/build/form/primitives/field/root.cjs.map +2 -2
- package/build/form/primitives/fieldset/description.cjs +6 -33
- package/build/form/primitives/fieldset/description.cjs.map +2 -2
- package/build/form/primitives/fieldset/details.cjs +6 -33
- package/build/form/primitives/fieldset/details.cjs.map +2 -2
- package/build/form/primitives/fieldset/legend.cjs +6 -33
- package/build/form/primitives/fieldset/legend.cjs.map +2 -2
- package/build/form/primitives/fieldset/root.cjs +6 -16
- package/build/form/primitives/fieldset/root.cjs.map +2 -2
- 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 +82 -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 +97 -0
- package/build/form/primitives/input-layout/input-layout.cjs.map +7 -0
- package/build/form/primitives/input-layout/slot.cjs +77 -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/form/primitives/select/index.cjs +40 -0
- package/build/form/primitives/select/index.cjs.map +7 -0
- package/build/form/primitives/select/item.cjs +98 -0
- package/build/form/primitives/select/item.cjs.map +7 -0
- package/build/form/primitives/select/popup.cjs +109 -0
- package/build/form/primitives/select/popup.cjs.map +7 -0
- package/build/form/primitives/select/root.cjs +35 -0
- package/build/form/primitives/select/root.cjs.map +7 -0
- package/build/form/primitives/select/trigger.cjs +116 -0
- package/build/form/primitives/select/trigger.cjs.map +7 -0
- package/build/form/primitives/select/types.cjs +19 -0
- package/build/form/primitives/select/types.cjs.map +7 -0
- package/build/index.cjs +19 -0
- package/build/index.cjs.map +2 -2
- package/build/lock-unlock.cjs +37 -0
- package/build/lock-unlock.cjs.map +7 -0
- package/build/stack/stack.cjs +6 -11
- package/build/stack/stack.cjs.map +2 -2
- package/build/tooltip/index.cjs +40 -0
- package/build/tooltip/index.cjs.map +7 -0
- package/build/tooltip/popup.cjs +100 -0
- package/build/tooltip/popup.cjs.map +7 -0
- package/build/tooltip/provider.cjs +35 -0
- package/build/tooltip/provider.cjs.map +7 -0
- package/build/tooltip/root.cjs +35 -0
- package/build/tooltip/root.cjs.map +7 -0
- package/build/tooltip/trigger.cjs +38 -0
- package/build/tooltip/trigger.cjs.map +7 -0
- package/build/tooltip/types.cjs +19 -0
- package/build/tooltip/types.cjs.map +7 -0
- package/build/utils/types.cjs.map +1 -1
- package/build/visually-hidden/visually-hidden.cjs +6 -19
- package/build/visually-hidden/visually-hidden.cjs.map +2 -2
- package/build-module/box/box.mjs +2 -2
- package/build-module/box/box.mjs.map +2 -2
- package/build-module/button/button.mjs +22 -305
- package/build-module/button/button.mjs.map +3 -3
- package/build-module/form/primitives/constants.mjs +10 -0
- package/build-module/form/primitives/constants.mjs.map +7 -0
- package/build-module/form/primitives/field/description.mjs +6 -33
- package/build-module/form/primitives/field/description.mjs.map +2 -2
- package/build-module/form/primitives/field/details.mjs +6 -33
- package/build-module/form/primitives/field/details.mjs.map +2 -2
- package/build-module/form/primitives/field/label.mjs +6 -33
- package/build-module/form/primitives/field/label.mjs.map +2 -2
- package/build-module/form/primitives/field/root.mjs +6 -17
- package/build-module/form/primitives/field/root.mjs.map +2 -2
- package/build-module/form/primitives/fieldset/description.mjs +6 -33
- package/build-module/form/primitives/fieldset/description.mjs.map +2 -2
- package/build-module/form/primitives/fieldset/details.mjs +6 -33
- package/build-module/form/primitives/fieldset/details.mjs.map +2 -2
- package/build-module/form/primitives/fieldset/legend.mjs +6 -33
- package/build-module/form/primitives/fieldset/legend.mjs.map +2 -2
- package/build-module/form/primitives/fieldset/root.mjs +6 -16
- package/build-module/form/primitives/fieldset/root.mjs.map +2 -2
- 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 +47 -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 +62 -0
- package/build-module/form/primitives/input-layout/input-layout.mjs.map +7 -0
- package/build-module/form/primitives/input-layout/slot.mjs +42 -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/form/primitives/select/index.mjs +12 -0
- package/build-module/form/primitives/select/index.mjs.map +7 -0
- package/build-module/form/primitives/select/item.mjs +63 -0
- package/build-module/form/primitives/select/item.mjs.map +7 -0
- package/build-module/form/primitives/select/popup.mjs +76 -0
- package/build-module/form/primitives/select/popup.mjs.map +7 -0
- package/build-module/form/primitives/select/root.mjs +10 -0
- package/build-module/form/primitives/select/root.mjs.map +7 -0
- package/build-module/form/primitives/select/trigger.mjs +81 -0
- package/build-module/form/primitives/select/trigger.mjs.map +7 -0
- package/build-module/form/primitives/select/types.mjs +1 -0
- package/build-module/form/primitives/select/types.mjs.map +7 -0
- package/build-module/index.mjs +4 -0
- package/build-module/index.mjs.map +2 -2
- package/build-module/lock-unlock.mjs +11 -0
- package/build-module/lock-unlock.mjs.map +7 -0
- package/build-module/stack/stack.mjs +6 -11
- package/build-module/stack/stack.mjs.map +2 -2
- package/build-module/tooltip/index.mjs +12 -0
- package/build-module/tooltip/index.mjs.map +7 -0
- package/build-module/tooltip/popup.mjs +67 -0
- package/build-module/tooltip/popup.mjs.map +7 -0
- package/build-module/tooltip/provider.mjs +10 -0
- package/build-module/tooltip/provider.mjs.map +7 -0
- package/build-module/tooltip/root.mjs +10 -0
- package/build-module/tooltip/root.mjs.map +7 -0
- package/build-module/tooltip/trigger.mjs +13 -0
- package/build-module/tooltip/trigger.mjs.map +7 -0
- package/build-module/tooltip/types.mjs +1 -0
- package/build-module/tooltip/types.mjs.map +7 -0
- package/build-module/visually-hidden/visually-hidden.mjs +6 -19
- package/build-module/visually-hidden/visually-hidden.mjs.map +2 -2
- package/build-types/badge/stories/choosing-intent.story.d.ts +17 -0
- package/build-types/badge/stories/choosing-intent.story.d.ts.map +1 -0
- package/build-types/badge/stories/index.story.d.ts +1 -1
- package/build-types/badge/stories/index.story.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/stories/index.story.d.ts +1 -2
- package/build-types/button/stories/index.story.d.ts.map +1 -1
- package/build-types/button/types.d.ts +10 -5
- package/build-types/button/types.d.ts.map +1 -1
- package/build-types/form/primitives/constants.d.ts +9 -0
- package/build-types/form/primitives/constants.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 +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/legend.d.ts +1 -1
- package/build-types/form/primitives/fieldset/root.d.ts +1 -1
- package/build-types/form/primitives/fieldset/stories/index.story.d.ts +1 -1
- package/build-types/form/primitives/fieldset/stories/index.story.d.ts.map +1 -1
- 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/form/primitives/select/index.d.ts +5 -0
- package/build-types/form/primitives/select/index.d.ts.map +1 -0
- package/build-types/form/primitives/select/item.d.ts +7 -0
- package/build-types/form/primitives/select/item.d.ts.map +1 -0
- package/build-types/form/primitives/select/popup.d.ts +2 -0
- package/build-types/form/primitives/select/popup.d.ts.map +1 -0
- package/build-types/form/primitives/select/root.d.ts +3 -0
- package/build-types/form/primitives/select/root.d.ts.map +1 -0
- package/build-types/form/primitives/select/stories/index.story.d.ts +50 -0
- package/build-types/form/primitives/select/stories/index.story.d.ts.map +1 -0
- package/build-types/form/primitives/select/test/index.test.d.ts +2 -0
- package/build-types/form/primitives/select/test/index.test.d.ts.map +1 -0
- package/build-types/form/primitives/select/trigger.d.ts +7 -0
- package/build-types/form/primitives/select/trigger.d.ts.map +1 -0
- package/build-types/form/primitives/select/types.d.ts +42 -0
- package/build-types/form/primitives/select/types.d.ts.map +1 -0
- package/build-types/icon/stories/index.story.d.ts +1 -1
- package/build-types/icon/stories/index.story.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/lock-unlock.d.ts +2 -0
- package/build-types/lock-unlock.d.ts.map +1 -0
- 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/tooltip/index.d.ts +6 -0
- package/build-types/tooltip/index.d.ts.map +1 -0
- package/build-types/tooltip/popup.d.ts +4 -0
- package/build-types/tooltip/popup.d.ts.map +1 -0
- package/build-types/tooltip/provider.d.ts +4 -0
- package/build-types/tooltip/provider.d.ts.map +1 -0
- package/build-types/tooltip/root.d.ts +4 -0
- package/build-types/tooltip/root.d.ts.map +1 -0
- package/build-types/tooltip/stories/index.story.d.ts +23 -0
- package/build-types/tooltip/stories/index.story.d.ts.map +1 -0
- package/build-types/tooltip/test/index.test.d.ts +2 -0
- package/build-types/tooltip/test/index.test.d.ts.map +1 -0
- package/build-types/tooltip/trigger.d.ts +4 -0
- package/build-types/tooltip/trigger.d.ts.map +1 -0
- package/build-types/tooltip/types.d.ts +18 -0
- package/build-types/tooltip/types.d.ts.map +1 -0
- package/build-types/utils/types.d.ts +0 -3
- package/build-types/utils/types.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 +12 -11
- package/src/badge/stories/choosing-intent.mdx +29 -32
- package/src/badge/stories/choosing-intent.story.tsx +129 -0
- package/src/badge/stories/index.story.tsx +1 -3
- package/src/box/box.tsx +2 -2
- package/src/box/stories/index.story.tsx +1 -2
- package/src/box/test/box.test.tsx +0 -11
- package/src/button/button.tsx +5 -5
- package/src/button/stories/index.story.tsx +1 -17
- package/src/button/style.module.css +14 -12
- package/src/button/test/button.test.tsx +4 -16
- package/src/button/types.ts +10 -5
- package/src/form/primitives/constants.ts +10 -0
- package/src/form/primitives/field/stories/index.story.tsx +1 -1
- package/src/form/primitives/fieldset/stories/index.story.tsx +1 -1
- 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 +83 -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/form/primitives/select/index.ts +4 -0
- package/src/form/primitives/select/item.tsx +39 -0
- package/src/form/primitives/select/popup.tsx +55 -0
- package/src/form/primitives/select/root.tsx +6 -0
- package/src/form/primitives/select/stories/index.story.tsx +276 -0
- package/src/form/primitives/select/style.module.css +7 -0
- package/src/form/primitives/select/test/index.test.tsx +35 -0
- package/src/form/primitives/select/trigger.tsx +58 -0
- package/src/form/primitives/select/types.ts +52 -0
- package/src/icon/stories/index.story.tsx +1 -1
- package/src/index.ts +1 -0
- package/src/lock-unlock.ts +7 -0
- package/src/stack/stories/index.story.tsx +1 -2
- package/src/stories/introduction.mdx +6 -0
- package/src/tooltip/index.ts +6 -0
- package/src/tooltip/popup.tsx +64 -0
- package/src/tooltip/provider.tsx +8 -0
- package/src/tooltip/root.tsx +8 -0
- package/src/tooltip/stories/index.story.tsx +97 -0
- package/src/tooltip/style.module.css +20 -0
- package/src/tooltip/test/index.test.tsx +87 -0
- package/src/tooltip/trigger.tsx +15 -0
- package/src/tooltip/types.ts +26 -0
- package/src/utils/css/dropdown-motion.module.css +47 -0
- package/src/utils/css/focus.module.css +1 -1
- package/src/utils/css/item-popup.module.css +127 -0
- package/src/utils/css/select-trigger.module.css +58 -0
- package/src/utils/types.ts +0 -3
- package/src/visually-hidden/stories/index.story.tsx +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/stack/stack.tsx", "../../src/stack/style.module.css"],
|
|
4
|
-
"sourcesContent": ["import { useRender, mergeProps } from '@base-ui/react';\nimport { forwardRef } from '@wordpress/element';\nimport { type StackProps } from './types';\nimport styles from './style.module.css';\n\n/**\n * A flexible layout component using CSS Flexbox for consistent spacing and alignment.\n * Built on design tokens for predictable spacing values.\n */\nexport const Stack = forwardRef< HTMLDivElement, StackProps >( function Stack(\n\t{ direction, gap, align, justify, wrap, render, ...props },\n\tref\n) {\n\tconst style: React.CSSProperties = {\n\t\tgap: gap && `var(--wpds-dimension-gap-${ gap })`,\n\t\talignItems: align,\n\t\tjustifyContent: justify,\n\t\tflexDirection: direction,\n\t\tflexWrap: wrap,\n\t};\n\n\tconst element = useRender( {\n\t\trender,\n\t\tref,\n\t\tprops: mergeProps< 'div' >( props, { style, className: styles.stack } ),\n\t} );\n\n\treturn element;\n} );\n", "
|
|
5
|
-
"mappings": ";AAAA,SAAS,WAAW,kBAAkB;AACtC,SAAS,kBAAkB;;;ACD3B,
|
|
4
|
+
"sourcesContent": ["import { useRender, mergeProps } from '@base-ui/react';\nimport { forwardRef } from '@wordpress/element';\nimport { type StackProps } from './types';\nimport styles from './style.module.css';\n\n/**\n * A flexible layout component using CSS Flexbox for consistent spacing and alignment.\n * Built on design tokens for predictable spacing values.\n */\nexport const Stack = forwardRef< HTMLDivElement, StackProps >( function Stack(\n\t{ direction, gap, align, justify, wrap, render, ...props },\n\tref\n) {\n\tconst style: React.CSSProperties = {\n\t\tgap: gap && `var(--wpds-dimension-gap-${ gap })`,\n\t\talignItems: align,\n\t\tjustifyContent: justify,\n\t\tflexDirection: direction,\n\t\tflexWrap: wrap,\n\t};\n\n\tconst element = useRender( {\n\t\trender,\n\t\tref,\n\t\tprops: mergeProps< 'div' >( props, { style, className: styles.stack } ),\n\t} );\n\n\treturn element;\n} );\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='71d20935c2']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"71d20935c2\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"stack\":\"_19ce0419607e1896__stack\"};\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,WAAW,kBAAkB;AACtC,SAAS,kBAAkB;;;ACD3B,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AACxG,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,gJAAgJ,CAAC;AAC3L,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,SAAQ,2BAA0B;;;ADG3C,IAAM,QAAQ,WAA0C,SAASA,OACvE,EAAE,WAAW,KAAK,OAAO,SAAS,MAAM,QAAQ,GAAG,MAAM,GACzD,KACC;AACD,QAAM,QAA6B;AAAA,IAClC,KAAK,OAAO,4BAA6B,GAAI;AAAA,IAC7C,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,UAAU;AAAA,EACX;AAEA,QAAM,UAAU,UAAW;AAAA,IAC1B;AAAA,IACA;AAAA,IACA,OAAO,WAAqB,OAAO,EAAE,OAAO,WAAW,cAAO,MAAM,CAAE;AAAA,EACvE,CAAE;AAEF,SAAO;AACR,CAAE;",
|
|
6
6
|
"names": ["Stack"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// packages/ui/src/tooltip/index.ts
|
|
2
|
+
import { Popup } from "./popup.mjs";
|
|
3
|
+
import { Trigger } from "./trigger.mjs";
|
|
4
|
+
import { Root } from "./root.mjs";
|
|
5
|
+
import { Provider } from "./provider.mjs";
|
|
6
|
+
export {
|
|
7
|
+
Popup,
|
|
8
|
+
Provider,
|
|
9
|
+
Root,
|
|
10
|
+
Trigger
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/tooltip/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { Popup } from './popup';\nimport { Trigger } from './trigger';\nimport { Root } from './root';\nimport { Provider } from './provider';\n\nexport { Provider, Root, Trigger, Popup };\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,aAAa;AACtB,SAAS,eAAe;AACxB,SAAS,YAAY;AACrB,SAAS,gBAAgB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// packages/ui/src/tooltip/popup.tsx
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { Tooltip } from "@base-ui/react/tooltip";
|
|
4
|
+
import { forwardRef } from "@wordpress/element";
|
|
5
|
+
import {
|
|
6
|
+
privateApis as themePrivateApis
|
|
7
|
+
} from "@wordpress/theme";
|
|
8
|
+
import { unlock } from "../lock-unlock.mjs";
|
|
9
|
+
|
|
10
|
+
// packages/ui/src/utils/css/resets.module.css
|
|
11
|
+
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='671ebfc62d']")) {
|
|
12
|
+
const style = document.createElement("style");
|
|
13
|
+
style.setAttribute("data-wp-hash", "671ebfc62d");
|
|
14
|
+
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}}}"));
|
|
15
|
+
document.head.appendChild(style);
|
|
16
|
+
}
|
|
17
|
+
var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
|
|
18
|
+
|
|
19
|
+
// packages/ui/src/tooltip/style.module.css
|
|
20
|
+
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='6a5779ba18']")) {
|
|
21
|
+
const style = document.createElement("style");
|
|
22
|
+
style.setAttribute("data-wp-hash", "6a5779ba18");
|
|
23
|
+
style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{background-color:var(--wpds-color-bg-surface-neutral-strong);border-radius:var(--wpds-border-radius-sm);box-shadow:var(--wpds-elevation-small);color:var(--wpds-color-fg-content-neutral);font-family:var(--wpds-font-family-body);font-size:var(--wpds-font-size-sm);line-height:1.4;padding:var(--wpds-dimension-padding-surface-2xs) var(--wpds-dimension-padding-surface-xs)}}"));
|
|
24
|
+
document.head.appendChild(style);
|
|
25
|
+
}
|
|
26
|
+
var style_default = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
|
|
27
|
+
|
|
28
|
+
// packages/ui/src/tooltip/popup.tsx
|
|
29
|
+
import { jsx } from "react/jsx-runtime";
|
|
30
|
+
var ThemeProvider = unlock(themePrivateApis).ThemeProvider;
|
|
31
|
+
var Popup = forwardRef(function TooltipPopup({
|
|
32
|
+
align = "center",
|
|
33
|
+
side = "bottom",
|
|
34
|
+
sideOffset = 4,
|
|
35
|
+
children,
|
|
36
|
+
className,
|
|
37
|
+
style,
|
|
38
|
+
...props
|
|
39
|
+
}, ref) {
|
|
40
|
+
return /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(
|
|
41
|
+
Tooltip.Positioner,
|
|
42
|
+
{
|
|
43
|
+
align,
|
|
44
|
+
side,
|
|
45
|
+
sideOffset,
|
|
46
|
+
style,
|
|
47
|
+
className: clsx(
|
|
48
|
+
resets_default["box-sizing"],
|
|
49
|
+
className,
|
|
50
|
+
style_default.positioner
|
|
51
|
+
),
|
|
52
|
+
children: /* @__PURE__ */ jsx(ThemeProvider, { color: { bg: "#1e1e1e" }, children: /* @__PURE__ */ jsx(
|
|
53
|
+
Tooltip.Popup,
|
|
54
|
+
{
|
|
55
|
+
ref,
|
|
56
|
+
className: style_default.popup,
|
|
57
|
+
...props,
|
|
58
|
+
children
|
|
59
|
+
}
|
|
60
|
+
) })
|
|
61
|
+
}
|
|
62
|
+
) });
|
|
63
|
+
});
|
|
64
|
+
export {
|
|
65
|
+
Popup
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=popup.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/tooltip/popup.tsx", "../../src/utils/css/resets.module.css", "../../src/tooltip/style.module.css"],
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport { Tooltip } from '@base-ui/react/tooltip';\nimport { forwardRef } from '@wordpress/element';\nimport {\n\ttype ThemeProvider as ThemeProviderType,\n\tprivateApis as themePrivateApis,\n} from '@wordpress/theme';\nimport type { PopupProps } from './types';\nimport { unlock } from '../lock-unlock';\nimport resetStyles from '../utils/css/resets.module.css';\nimport styles from './style.module.css';\n\nconst ThemeProvider: typeof ThemeProviderType =\n\tunlock( themePrivateApis ).ThemeProvider;\n\nconst Popup = forwardRef< HTMLDivElement, PopupProps >( function TooltipPopup(\n\t{\n\t\talign = 'center',\n\t\tside = 'bottom',\n\t\tsideOffset = 4,\n\t\tchildren,\n\t\tclassName,\n\t\tstyle,\n\t\t...props\n\t},\n\tref\n) {\n\treturn (\n\t\t<Tooltip.Portal>\n\t\t\t<Tooltip.Positioner\n\t\t\t\talign={ align }\n\t\t\t\tside={ side }\n\t\t\t\tsideOffset={ sideOffset }\n\t\t\t\tstyle={ style }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\tresetStyles[ 'box-sizing' ],\n\t\t\t\t\tclassName,\n\t\t\t\t\tstyles.positioner\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t{ /* This should ideally use whatever dark color makes sense,\n\t\t\t\tand not be hardcoded to #1e1e1e. The solutions would be to:\n\t\t\t\t - review the design of the tooltip, in case we want to stop\n\t\t\t\t hardcoding it to a dark background\n\t\t\t\t - create new semantic tokens as needed (aliasing either the \"inverted\n\t\t\t\t\t bg\" or \"perma-dark bg\" private tokens) and have Tooltip.Popup use\n\t\t\t\t them;\n\t\t\t\t - remove the hardcoded `bg` setting from the `ThemeProvider` below\n\t\t\t\t\t*/ }\n\t\t\t\t<ThemeProvider color={ { bg: '#1e1e1e' } }>\n\t\t\t\t\t<Tooltip.Popup\n\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\tclassName={ styles.popup }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</Tooltip.Popup>\n\t\t\t\t</ThemeProvider>\n\t\t\t</Tooltip.Positioner>\n\t\t</Tooltip.Portal>\n\t);\n} );\n\nexport { Popup };\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", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='6a5779ba18']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"6a5779ba18\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{background-color:var(--wpds-color-bg-surface-neutral-strong);border-radius:var(--wpds-border-radius-sm);box-shadow:var(--wpds-elevation-small);color:var(--wpds-color-fg-content-neutral);font-family:var(--wpds-font-family-body);font-size:var(--wpds-font-size-sm);line-height:1.4;padding:var(--wpds-dimension-padding-surface-2xs) var(--wpds-dimension-padding-surface-xs)}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"positioner\":\"_480b748dd3510e64__positioner\",\"popup\":\"_50096b232db7709d__popup\"};\n"],
|
|
5
|
+
"mappings": ";AAAA,OAAO,UAAU;AACjB,SAAS,eAAe;AACxB,SAAS,kBAAkB;AAC3B;AAAA,EAEC,eAAe;AAAA,OACT;AAEP,SAAS,cAAc;;;ACRvB,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AACxG,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,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AACxG,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,gkBAAgkB,CAAC;AAC3mB,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,cAAa,iCAAgC,SAAQ,2BAA0B;;;AF4C1F;AAtCL,IAAM,gBACL,OAAQ,gBAAiB,EAAE;AAE5B,IAAM,QAAQ,WAA0C,SAAS,aAChE;AAAA,EACC,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GACA,KACC;AACD,SACC,oBAAC,QAAQ,QAAR,EACA;AAAA,IAAC,QAAQ;AAAA,IAAR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAY;AAAA,QACX,eAAa,YAAa;AAAA,QAC1B;AAAA,QACA,cAAO;AAAA,MACR;AAAA,MAWA,8BAAC,iBAAc,OAAQ,EAAE,IAAI,UAAU,GACtC;AAAA,QAAC,QAAQ;AAAA,QAAR;AAAA,UACA;AAAA,UACA,WAAY,cAAO;AAAA,UACjB,GAAG;AAAA,UAEH;AAAA;AAAA,MACH,GACD;AAAA;AAAA,EACD,GACD;AAEF,CAAE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// packages/ui/src/tooltip/provider.tsx
|
|
2
|
+
import { Tooltip } from "@base-ui/react/tooltip";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
function Provider({ children, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx(Tooltip.Provider, { ...props, children });
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
Provider
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=provider.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/tooltip/provider.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Tooltip } from '@base-ui/react/tooltip';\nimport type { ProviderProps } from './types';\n\nfunction Provider( { children, ...props }: ProviderProps ) {\n\treturn <Tooltip.Provider { ...props }>{ children }</Tooltip.Provider>;\n}\n\nexport { Provider };\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,eAAe;AAIhB;AADR,SAAS,SAAU,EAAE,UAAU,GAAG,MAAM,GAAmB;AAC1D,SAAO,oBAAC,QAAQ,UAAR,EAAmB,GAAG,OAAU,UAAU;AACnD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// packages/ui/src/tooltip/root.tsx
|
|
2
|
+
import { Tooltip } from "@base-ui/react/tooltip";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
function Root(props) {
|
|
5
|
+
return /* @__PURE__ */ jsx(Tooltip.Root, { ...props });
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
Root
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=root.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/tooltip/root.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Tooltip } from '@base-ui/react/tooltip';\nimport type { RootProps } from './types';\n\nfunction Root( props: RootProps ) {\n\treturn <Tooltip.Root { ...props } />;\n}\n\nexport { Root };\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,eAAe;AAIhB;AADR,SAAS,KAAM,OAAmB;AACjC,SAAO,oBAAC,QAAQ,MAAR,EAAe,GAAG,OAAQ;AACnC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// packages/ui/src/tooltip/trigger.tsx
|
|
2
|
+
import { Tooltip } from "@base-ui/react/tooltip";
|
|
3
|
+
import { forwardRef } from "@wordpress/element";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
var Trigger = forwardRef(
|
|
6
|
+
function TooltipTrigger({ children, ...props }, ref) {
|
|
7
|
+
return /* @__PURE__ */ jsx(Tooltip.Trigger, { ref, ...props, children });
|
|
8
|
+
}
|
|
9
|
+
);
|
|
10
|
+
export {
|
|
11
|
+
Trigger
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=trigger.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/tooltip/trigger.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Tooltip } from '@base-ui/react/tooltip';\nimport { forwardRef } from '@wordpress/element';\nimport type { TriggerProps } from './types';\n\nconst Trigger = forwardRef< HTMLButtonElement, TriggerProps >(\n\tfunction TooltipTrigger( { children, ...props }, ref ) {\n\t\treturn (\n\t\t\t<Tooltip.Trigger ref={ ref } { ...props }>\n\t\t\t\t{ children }\n\t\t\t</Tooltip.Trigger>\n\t\t);\n\t}\n);\n\nexport { Trigger };\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,eAAe;AACxB,SAAS,kBAAkB;AAMxB;AAHH,IAAM,UAAU;AAAA,EACf,SAAS,eAAgB,EAAE,UAAU,GAAG,MAAM,GAAG,KAAM;AACtD,WACC,oBAAC,QAAQ,SAAR,EAAgB,KAAc,GAAG,OAC/B,UACH;AAAA,EAEF;AACD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.mjs.map
|
|
@@ -3,26 +3,13 @@ import { mergeProps, useRender } from "@base-ui/react";
|
|
|
3
3
|
import { forwardRef } from "@wordpress/element";
|
|
4
4
|
|
|
5
5
|
// packages/ui/src/visually-hidden/style.module.css
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
clip-path: inset(50%);
|
|
12
|
-
height: 1px;
|
|
13
|
-
margin: -1px;
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
padding: 0;
|
|
16
|
-
position: absolute;
|
|
17
|
-
width: 1px;
|
|
18
|
-
word-wrap: normal;
|
|
19
|
-
}
|
|
6
|
+
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='451a4f1fb9']")) {
|
|
7
|
+
const style = document.createElement("style");
|
|
8
|
+
style.setAttribute("data-wp-hash", "451a4f1fb9");
|
|
9
|
+
style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.f37b9e2e191ebd66__visually-hidden{word-wrap:normal;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}}"));
|
|
10
|
+
document.head.appendChild(style);
|
|
20
11
|
}
|
|
21
|
-
|
|
22
|
-
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
|
|
23
|
-
var style_default = {
|
|
24
|
-
"visually-hidden": "style-module__visually-hidden__83ueL"
|
|
25
|
-
};
|
|
12
|
+
var style_default = { "visually-hidden": "f37b9e2e191ebd66__visually-hidden" };
|
|
26
13
|
|
|
27
14
|
// packages/ui/src/visually-hidden/visually-hidden.tsx
|
|
28
15
|
var VisuallyHidden = forwardRef(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/visually-hidden/visually-hidden.tsx", "../../src/visually-hidden/style.module.css"],
|
|
4
|
-
"sourcesContent": ["import { mergeProps, useRender } from '@base-ui/react';\nimport { forwardRef } from '@wordpress/element';\nimport type { VisuallyHiddenProps } from './types';\nimport styles from './style.module.css';\n\n/**\n * Visually hides content while keeping it accessible to screen readers.\n * Useful when providing context that's only meaningful to assistive technology.\n */\nexport const VisuallyHidden = forwardRef< HTMLDivElement, VisuallyHiddenProps >(\n\tfunction VisuallyHidden( { render, ...restProps }, ref ) {\n\t\tconst element = useRender( {\n\t\t\trender,\n\t\t\tref,\n\t\t\tprops: mergeProps< 'div' >(\n\t\t\t\t{ className: styles[ 'visually-hidden' ] },\n\t\t\t\trestProps\n\t\t\t),\n\t\t} );\n\n\t\treturn element;\n\t}\n);\n", "
|
|
5
|
-
"mappings": ";AAAA,SAAS,YAAY,iBAAiB;AACtC,SAAS,kBAAkB;;;ACD3B,
|
|
4
|
+
"sourcesContent": ["import { mergeProps, useRender } from '@base-ui/react';\nimport { forwardRef } from '@wordpress/element';\nimport type { VisuallyHiddenProps } from './types';\nimport styles from './style.module.css';\n\n/**\n * Visually hides content while keeping it accessible to screen readers.\n * Useful when providing context that's only meaningful to assistive technology.\n */\nexport const VisuallyHidden = forwardRef< HTMLDivElement, VisuallyHiddenProps >(\n\tfunction VisuallyHidden( { render, ...restProps }, ref ) {\n\t\tconst element = useRender( {\n\t\t\trender,\n\t\t\tref,\n\t\t\tprops: mergeProps< 'div' >(\n\t\t\t\t{ className: styles[ 'visually-hidden' ] },\n\t\t\t\trestProps\n\t\t\t),\n\t\t} );\n\n\t\treturn element;\n\t}\n);\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='451a4f1fb9']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"451a4f1fb9\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.f37b9e2e191ebd66__visually-hidden{word-wrap:normal;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"visually-hidden\":\"f37b9e2e191ebd66__visually-hidden\"};\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,YAAY,iBAAiB;AACtC,SAAS,kBAAkB;;;ACD3B,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AACxG,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,wQAAwQ,CAAC;AACnT,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,mBAAkB,oCAAmC;;;ADG9D,IAAM,iBAAiB;AAAA,EAC7B,SAASA,gBAAgB,EAAE,QAAQ,GAAG,UAAU,GAAG,KAAM;AACxD,UAAM,UAAU,UAAW;AAAA,MAC1B;AAAA,MACA;AAAA,MACA,OAAO;AAAA,QACN,EAAE,WAAW,cAAQ,iBAAkB,EAAE;AAAA,QACzC;AAAA,MACD;AAAA,IACD,CAAE;AAEF,WAAO;AAAA,EACR;AACD;",
|
|
6
6
|
"names": ["VisuallyHidden"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Badge } from '../index';
|
|
3
|
+
declare const meta: Meta<typeof Badge>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Badge>;
|
|
6
|
+
export declare const AllIntents: Story;
|
|
7
|
+
export declare const High: Story;
|
|
8
|
+
export declare const Medium: Story;
|
|
9
|
+
export declare const Low: Story;
|
|
10
|
+
export declare const Informational: Story;
|
|
11
|
+
export declare const Draft: Story;
|
|
12
|
+
export declare const Stable: Story;
|
|
13
|
+
export declare const None: Story;
|
|
14
|
+
export declare const CommentStatus: Story;
|
|
15
|
+
export declare const PageStatus: Story;
|
|
16
|
+
export declare const PluginStatus: Story;
|
|
17
|
+
//# sourceMappingURL=choosing-intent.story.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"choosing-intent.story.d.ts","sourceRoot":"","sources":["../../../src/badge/stories/choosing-intent.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGjC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,KAAK,CAc7B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,KAAK,CAAE,CAAC;AAEtC,eAAO,MAAM,UAAU,EAAE,KAYxB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAOlB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAOpB,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,KAOjB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAO3B,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAOnB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAOpB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAOlB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAO3B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAO1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import { Button } from '../index';
|
|
3
3
|
declare const meta: Meta<typeof Button>;
|
|
4
4
|
export default meta;
|
|
@@ -12,7 +12,6 @@ export declare const Neutral: Story;
|
|
|
12
12
|
export declare const NeutralOutline: Story;
|
|
13
13
|
export declare const Unstyled: Story;
|
|
14
14
|
export declare const AllTonesAndVariants: Story;
|
|
15
|
-
export declare const LinkStyledAsButton: Story;
|
|
16
15
|
export declare const WithIcon: Story;
|
|
17
16
|
export declare const Loading: Story;
|
|
18
17
|
/**
|
|
@@ -1 +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,
|
|
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"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type ReactNode, type HTMLAttributes } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
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'> {
|
|
5
6
|
/**
|
|
6
7
|
* The variant of the button. Variants describe the visual style treatment
|
|
7
8
|
* of the button.
|
|
@@ -10,7 +11,10 @@ export interface ButtonProps extends Omit<ComponentProps<'button'>, 'disabled' |
|
|
|
10
11
|
*/
|
|
11
12
|
variant?: 'solid' | 'outline' | 'minimal' | 'unstyled';
|
|
12
13
|
/**
|
|
13
|
-
* The tone of the button
|
|
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.
|
|
14
18
|
*
|
|
15
19
|
* @default "brand"
|
|
16
20
|
*/
|
|
@@ -34,7 +38,7 @@ export interface ButtonProps extends Omit<ComponentProps<'button'>, 'disabled' |
|
|
|
34
38
|
*
|
|
35
39
|
* @default true
|
|
36
40
|
*/
|
|
37
|
-
|
|
41
|
+
focusableWhenDisabled?: _ButtonProps['focusableWhenDisabled'];
|
|
38
42
|
/**
|
|
39
43
|
* Indicates the current "pressed" state of toggle buttons. This should only
|
|
40
44
|
* be used with neutral minimal buttons.
|
|
@@ -55,4 +59,5 @@ export interface ButtonProps extends Omit<ComponentProps<'button'>, 'disabled' |
|
|
|
55
59
|
*/
|
|
56
60
|
loadingAnnouncement?: string;
|
|
57
61
|
}
|
|
62
|
+
export {};
|
|
58
63
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +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,EAAE,
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/form/primitives/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;CAIO,CAAC"}
|
|
@@ -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;
|
|
@@ -8,7 +8,7 @@ import { Field as _Field } from '@base-ui/react/field';
|
|
|
8
8
|
* Simply wrapping a control with this component does not guarantee
|
|
9
9
|
* accessible labeling. See examples for how to associate the label in different cases.
|
|
10
10
|
*/
|
|
11
|
-
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"> & {
|
|
12
12
|
children?: _Field.Root.Props["children"];
|
|
13
13
|
disabled?: _Field.Root.Props["disabled"];
|
|
14
14
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const FieldsetLegend: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react
|
|
1
|
+
export declare const FieldsetLegend: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").FieldsetLegendProps & import("react").RefAttributes<HTMLDivElement>, "ref">, "className" | "children" | "render"> & {
|
|
2
2
|
className?: string;
|
|
3
3
|
render?: ((props: import("react").HTMLAttributes<any> & {
|
|
4
4
|
ref?: import("react").Ref<any> | undefined;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* To label a single form control element, use the `Field` component instead.
|
|
6
6
|
*/
|
|
7
|
-
export declare const FieldsetRoot: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react
|
|
7
|
+
export declare const FieldsetRoot: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").FieldsetRootProps & import("react").RefAttributes<HTMLElement>, "ref">, "className" | "children" | "render"> & {
|
|
8
8
|
className?: string;
|
|
9
9
|
render?: ((props: import("react").HTMLAttributes<any> & {
|
|
10
10
|
ref?: import("react").Ref<any> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../../src/form/primitives/fieldset/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/fieldset/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,QAAQ,CAAC,IAAI,CAQrC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,QAAQ,CAAC,IAAI,CAAE,CAAC;AAE9C,eAAO,MAAM,OAAO,EAAE,KAiBrB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,EAAE,KAqBzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/form/primitives/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/form/primitives/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Input as _Input } from '@base-ui/react/input';
|
|
2
|
+
export declare const Input: import("react").ForwardRefExoticComponent<Omit<import("../../../utils/types").ComponentProps<import("react").ForwardRefExoticComponent<import("@base-ui/react").InputProps & import("react").RefAttributes<HTMLInputElement>>>, "defaultValue" | "prefix" | "size" | "disabled" | "type" | "value"> & Pick<import("../input-layout/types").InputLayoutProps, "prefix" | "suffix"> & {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
} & {
|
|
5
|
+
type?: _Input.Props["type"];
|
|
6
|
+
defaultValue?: _Input.Props["defaultValue"];
|
|
7
|
+
value?: _Input.Props["value"];
|
|
8
|
+
size?: Exclude<import("../input-layout/types").InputLayoutProps["size"], "small">;
|
|
9
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
10
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAQvD,eAAO,MAAM,KAAK;;;;;;;oDAmBf,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Input } from '../../../..';
|
|
3
|
+
declare const meta: Meta<typeof Input>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Input>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
/**
|
|
8
|
+
* The `InputLayout.Slot` component can be used to add standard padding in
|
|
9
|
+
* the `prefix` or `suffix` slot.
|
|
10
|
+
*/
|
|
11
|
+
export declare const WithPrefix: Story;
|
|
12
|
+
export declare const Disabled: Story;
|
|
13
|
+
//# sourceMappingURL=index.story.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../../src/form/primitives/input/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAe,MAAM,aAAa,CAAC;AAEjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,KAAK,CAS7B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,KAAK,CAAE,CAAC;AAEtC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../../../src/form/primitives/input/test/index.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Input } from '@base-ui/react/input';
|
|
2
|
+
import type { InputLayoutProps } from '../input-layout/types';
|
|
3
|
+
import type { ComponentProps } from '../../../utils/types';
|
|
4
|
+
export type InputProps = Omit<ComponentProps<typeof Input>, 'value' | 'defaultValue' | 'type' | 'disabled' | 'prefix' | 'size'> & Pick<InputLayoutProps, 'prefix' | 'suffix'> & {
|
|
5
|
+
/**
|
|
6
|
+
* Whether the field is disabled.
|
|
7
|
+
*/
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
} & {
|
|
10
|
+
/**
|
|
11
|
+
* The type of the input element.
|
|
12
|
+
*/
|
|
13
|
+
type?: Input.Props['type'];
|
|
14
|
+
/**
|
|
15
|
+
* The default value to use in uncontrolled mode.
|
|
16
|
+
*/
|
|
17
|
+
defaultValue?: Input.Props['defaultValue'];
|
|
18
|
+
/**
|
|
19
|
+
* The value to use in controlled mode.
|
|
20
|
+
*/
|
|
21
|
+
value?: Input.Props['value'];
|
|
22
|
+
/**
|
|
23
|
+
* The size of the field.
|
|
24
|
+
*/
|
|
25
|
+
size?: Exclude<InputLayoutProps['size'], 'small'>;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,MAAM,UAAU,GAAG,IAAI,CAC5B,cAAc,CAAE,OAAO,KAAK,CAAE,EAC9B,OAAO,GAAG,cAAc,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAClE,GACA,IAAI,CAAE,gBAAgB,EAAE,QAAQ,GAAG,QAAQ,CAAE,GAAG;IAC/C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG;IACH;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,KAAK,CAAE,MAAM,CAAE,CAAC;IAC7B;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,KAAK,CAAE,cAAc,CAAE,CAAC;IAC7C;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,KAAK,CAAE,OAAO,CAAE,CAAC;IAC/B;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAE,gBAAgB,CAAE,MAAM,CAAE,EAAE,OAAO,CAAE,CAAC;CACtD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { InputLayoutSlotType } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Context for providing slot type information to child components.
|
|
4
|
+
*/
|
|
5
|
+
export declare const InputLayoutSlotTypeContext: import("react").Context<InputLayoutSlotType | null>;
|
|
6
|
+
/**
|
|
7
|
+
* Hook to access the current slot context.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useInputLayoutSlotContext(): InputLayoutSlotType | null;
|
|
10
|
+
/**
|
|
11
|
+
* Wrapper component that provides slot type context for prefix and suffix slots.
|
|
12
|
+
*/
|
|
13
|
+
export declare function SlotContextProvider({ type, children, }: {
|
|
14
|
+
type: InputLayoutSlotType;
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
}): import("react").JSX.Element | null;
|
|
17
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/input-layout/context.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,0BAA0B,qDACa,CAAC;AAErD;;GAEG;AACH,wBAAgB,yBAAyB,+BAExC;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAE,EACpC,IAAI,EACJ,QAAQ,GACR,EAAE;IACF,IAAI,EAAE,mBAAmB,CAAC;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,sCAUA"}
|