@wordpress/ui 0.4.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 +20 -0
- package/LICENSE.md +1 -1
- package/README.md +18 -0
- package/build/badge/badge.cjs +95 -0
- package/build/badge/badge.cjs.map +7 -0
- package/build/{lock-unlock.js → badge/index.cjs} +8 -14
- package/build/badge/index.cjs.map +7 -0
- package/build/badge/types.cjs +19 -0
- package/build/badge/types.cjs.map +7 -0
- package/build/box/{box.js → box.cjs} +7 -6
- package/build/box/box.cjs.map +7 -0
- package/build/box/{index.js → index.cjs} +2 -2
- package/build/box/{types.js → types.cjs} +1 -1
- package/build/box/types.cjs.map +7 -0
- package/build/button/button.cjs +401 -0
- package/build/button/button.cjs.map +7 -0
- package/build/{utils/element.js → button/icon.cjs} +22 -20
- 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/control.cjs +38 -0
- package/build/form/primitives/field/control.cjs.map +7 -0
- package/build/form/primitives/field/description.cjs +92 -0
- package/build/form/primitives/field/description.cjs.map +7 -0
- package/build/form/primitives/field/details.cjs +99 -0
- package/build/form/primitives/field/details.cjs.map +7 -0
- package/build/form/primitives/field/index.cjs +46 -0
- package/build/form/primitives/field/index.cjs.map +7 -0
- package/build/form/primitives/field/item.cjs +36 -0
- package/build/form/primitives/field/item.cjs.map +7 -0
- package/build/form/primitives/field/label.cjs +98 -0
- package/build/form/primitives/field/label.cjs.map +7 -0
- package/build/form/primitives/field/root.cjs +79 -0
- package/build/form/primitives/field/root.cjs.map +7 -0
- package/build/form/primitives/field/types.cjs +19 -0
- package/build/form/primitives/field/types.cjs.map +7 -0
- 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 +50 -0
- package/build/form/primitives/index.cjs.map +7 -0
- 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/{index.js → icon/index.cjs} +13 -7
- 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 +37 -0
- package/build/index.cjs.map +7 -0
- package/build/stack/{index.js → index.cjs} +2 -2
- package/build/stack/index.cjs.map +7 -0
- package/build/stack/{stack.js → stack.cjs} +6 -18
- package/build/stack/stack.cjs.map +7 -0
- package/build/stack/{types.js → types.cjs} +1 -1
- package/build/stack/types.cjs.map +7 -0
- package/build/types/css-modules.d.cjs +2 -0
- package/build/types/css-modules.d.cjs.map +7 -0
- package/build/types/{react.d.js → react.d.cjs} +1 -1
- package/build/utils/{types.js → types.cjs} +1 -1
- package/build/visually-hidden/index.cjs +31 -0
- package/build/visually-hidden/index.cjs.map +7 -0
- package/build/visually-hidden/types.cjs +19 -0
- package/build/visually-hidden/types.cjs.map +7 -0
- package/build/visually-hidden/visually-hidden.cjs +69 -0
- package/build/visually-hidden/visually-hidden.cjs.map +7 -0
- package/build-module/badge/badge.mjs +70 -0
- package/build-module/badge/badge.mjs.map +7 -0
- package/build-module/badge/index.mjs +6 -0
- package/build-module/badge/index.mjs.map +7 -0
- package/build-module/badge/types.mjs +1 -0
- package/build-module/box/{box.js → box.mjs} +7 -6
- package/build-module/box/box.mjs.map +7 -0
- package/build-module/box/index.mjs +6 -0
- package/build-module/box/types.mjs +1 -0
- 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/form/primitives/field/control.mjs +13 -0
- package/build-module/form/primitives/field/control.mjs.map +7 -0
- package/build-module/form/primitives/field/description.mjs +57 -0
- package/build-module/form/primitives/field/description.mjs.map +7 -0
- package/build-module/form/primitives/field/details.mjs +64 -0
- package/build-module/form/primitives/field/details.mjs.map +7 -0
- package/build-module/form/primitives/field/index.mjs +16 -0
- package/build-module/form/primitives/field/index.mjs.map +7 -0
- package/build-module/form/primitives/field/item.mjs +11 -0
- package/build-module/form/primitives/field/item.mjs.map +7 -0
- package/build-module/form/primitives/field/label.mjs +63 -0
- package/build-module/form/primitives/field/label.mjs.map +7 -0
- package/build-module/form/primitives/field/root.mjs +44 -0
- package/build-module/form/primitives/field/root.mjs.map +7 -0
- package/build-module/form/primitives/field/types.mjs +1 -0
- 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/index.mjs +12 -0
- package/build-module/form/primitives/index.mjs.map +7 -0
- 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 +9 -0
- package/build-module/index.mjs.map +7 -0
- package/build-module/stack/index.mjs +6 -0
- package/build-module/stack/index.mjs.map +7 -0
- package/build-module/stack/{stack.js → stack.mjs} +6 -8
- package/build-module/stack/stack.mjs.map +7 -0
- package/build-module/stack/types.mjs +1 -0
- package/build-module/stack/types.mjs.map +7 -0
- package/build-module/types/css-modules.d.mjs +1 -0
- package/build-module/types/css-modules.d.mjs.map +7 -0
- package/build-module/types/{react.d.js → react.d.mjs} +1 -1
- package/build-module/utils/types.mjs +1 -0
- package/build-module/utils/types.mjs.map +7 -0
- package/build-module/visually-hidden/index.mjs +6 -0
- package/build-module/visually-hidden/index.mjs.map +7 -0
- package/build-module/visually-hidden/types.mjs +1 -0
- package/build-module/visually-hidden/types.mjs.map +7 -0
- package/build-module/visually-hidden/visually-hidden.mjs +44 -0
- package/build-module/visually-hidden/visually-hidden.mjs.map +7 -0
- package/build-types/badge/badge.d.ts +7 -0
- package/build-types/badge/badge.d.ts.map +1 -0
- package/build-types/badge/index.d.ts +2 -0
- package/build-types/badge/index.d.ts.map +1 -0
- package/build-types/badge/stories/index.story.d.ts +15 -0
- package/build-types/badge/stories/index.story.d.ts.map +1 -0
- package/build-types/badge/types.d.ts +14 -0
- package/build-types/badge/types.d.ts.map +1 -0
- package/build-types/box/box.d.ts +0 -3
- package/build-types/box/box.d.ts.map +1 -1
- package/build-types/box/stories/index.story.d.ts +1 -11
- package/build-types/box/stories/index.story.d.ts.map +1 -1
- package/build-types/box/types.d.ts +8 -15
- package/build-types/box/types.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 +6 -0
- package/build-types/form/primitives/field/control.d.ts.map +1 -0
- package/build-types/form/primitives/field/description.d.ts +9 -0
- package/build-types/form/primitives/field/description.d.ts.map +1 -0
- package/build-types/form/primitives/field/details.d.ts +21 -0
- package/build-types/form/primitives/field/details.d.ts.map +1 -0
- package/build-types/form/primitives/field/index.d.ts +8 -0
- package/build-types/form/primitives/field/index.d.ts.map +1 -0
- package/build-types/form/primitives/field/item.d.ts +3 -0
- package/build-types/form/primitives/field/item.d.ts.map +1 -0
- package/build-types/form/primitives/field/label.d.ts +11 -0
- package/build-types/form/primitives/field/label.d.ts.map +1 -0
- package/build-types/form/primitives/field/root.d.ts +15 -0
- package/build-types/form/primitives/field/root.d.ts.map +1 -0
- package/build-types/form/primitives/field/stories/index.story.d.ts +39 -0
- package/build-types/form/primitives/field/stories/index.story.d.ts.map +1 -0
- package/build-types/form/primitives/field/test/index.test.d.ts +2 -0
- package/build-types/form/primitives/field/test/index.test.d.ts.map +1 -0
- package/build-types/form/primitives/field/types.d.ts +62 -0
- package/build-types/form/primitives/field/types.d.ts.map +1 -0
- 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 +5 -0
- package/build-types/form/primitives/index.d.ts.map +1 -0
- 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 +6 -0
- package/build-types/index.d.ts.map +1 -1
- package/build-types/stack/index.d.ts +0 -3
- package/build-types/stack/index.d.ts.map +1 -1
- package/build-types/stack/stack.d.ts.map +1 -1
- package/build-types/stack/stories/index.story.d.ts +1 -11
- package/build-types/stack/stories/index.story.d.ts.map +1 -1
- package/build-types/stack/types.d.ts +2 -5
- package/build-types/stack/types.d.ts.map +1 -1
- package/build-types/test/index.test.d.ts +2 -0
- package/build-types/test/index.test.d.ts.map +1 -0
- package/build-types/visually-hidden/index.d.ts +2 -0
- package/build-types/visually-hidden/index.d.ts.map +1 -0
- package/build-types/visually-hidden/stories/index.story.d.ts +7 -0
- package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -0
- package/build-types/visually-hidden/test/visually-hidden.test.d.ts +2 -0
- package/build-types/visually-hidden/test/visually-hidden.test.d.ts.map +1 -0
- package/build-types/visually-hidden/types.d.ts +8 -0
- package/build-types/visually-hidden/types.d.ts.map +1 -0
- package/build-types/visually-hidden/visually-hidden.d.ts +7 -0
- package/build-types/visually-hidden/visually-hidden.d.ts.map +1 -0
- package/package.json +26 -9
- package/src/badge/badge.tsx +88 -0
- package/src/badge/index.ts +1 -0
- package/src/badge/stories/choosing-intent.mdx +112 -0
- package/src/badge/stories/index.story.tsx +120 -0
- package/src/badge/types.ts +22 -0
- package/src/box/box.tsx +11 -23
- package/src/box/stories/index.story.tsx +3 -15
- package/src/box/types.ts +16 -59
- 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/control.tsx +9 -0
- package/src/form/primitives/field/description.tsx +18 -0
- package/src/form/primitives/field/details.tsx +36 -0
- package/src/form/primitives/field/index.ts +8 -0
- package/src/form/primitives/field/item.tsx +9 -0
- package/src/form/primitives/field/label.tsx +21 -0
- package/src/form/primitives/field/root.tsx +33 -0
- package/src/form/primitives/field/stories/index.story.tsx +132 -0
- package/src/form/primitives/field/test/index.test.tsx +36 -0
- package/src/form/primitives/field/types.ts +82 -0
- 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 +4 -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 +6 -0
- package/src/stack/index.ts +0 -3
- package/src/stack/stack.tsx +5 -18
- package/src/stack/stories/index.story.tsx +1 -14
- package/src/stack/test/stack.test.tsx +22 -12
- package/src/stack/types.ts +2 -6
- package/src/stories/introduction.mdx +6 -0
- package/src/test/index.test.ts +22 -0
- package/src/utils/css/field.module.css +27 -0
- package/src/utils/css/focus.module.css +31 -0
- package/src/utils/css/resets.module.css +13 -0
- package/src/visually-hidden/index.ts +1 -0
- package/src/visually-hidden/stories/index.story.tsx +22 -0
- package/src/visually-hidden/style.module.css +15 -0
- package/src/visually-hidden/test/visually-hidden.test.tsx +59 -0
- package/src/visually-hidden/types.ts +8 -0
- package/src/visually-hidden/visually-hidden.tsx +23 -0
- package/build/box/box.js.map +0 -7
- package/build/box/types.js.map +0 -7
- package/build/index.js.map +0 -7
- package/build/lock-unlock.js.map +0 -7
- package/build/stack/index.js.map +0 -7
- package/build/stack/stack.js.map +0 -7
- package/build/stack/types.js.map +0 -7
- package/build/types/css-modules.d.js +0 -2
- package/build/utils/element.js.map +0 -7
- package/build-module/box/box.js.map +0 -7
- package/build-module/box/index.js +0 -6
- package/build-module/box/types.js +0 -1
- package/build-module/index.js +0 -3
- package/build-module/index.js.map +0 -7
- package/build-module/lock-unlock.js +0 -11
- package/build-module/lock-unlock.js.map +0 -7
- package/build-module/stack/index.js +0 -6
- package/build-module/stack/index.js.map +0 -7
- package/build-module/stack/stack.js.map +0 -7
- package/build-module/stack/types.js +0 -1
- package/build-module/types/css-modules.d.js +0 -1
- package/build-module/utils/element.js +0 -20
- package/build-module/utils/element.js.map +0 -7
- package/build-module/utils/types.js +0 -1
- package/build-types/lock-unlock.d.ts +0 -2
- package/build-types/lock-unlock.d.ts.map +0 -1
- package/build-types/utils/element.d.ts +0 -25
- package/build-types/utils/element.d.ts.map +0 -1
- package/src/lock-unlock.ts +0 -10
- package/src/utils/element.ts +0 -51
- package/tsconfig.json +0 -13
- package/tsconfig.tsbuildinfo +0 -1
- /package/build/box/{index.js.map → index.cjs.map} +0 -0
- /package/build/types/{react.d.js.map → react.d.cjs.map} +0 -0
- /package/build/utils/{types.js.map → types.cjs.map} +0 -0
- /package/build-module/{box/types.js.map → badge/types.mjs.map} +0 -0
- /package/build-module/box/{index.js.map → index.mjs.map} +0 -0
- /package/build-module/{stack/types.js.map → box/types.mjs.map} +0 -0
- /package/build-module/{types/css-modules.d.js.map → button/types.mjs.map} +0 -0
- /package/build-module/{utils/types.js.map → form/primitives/field/types.mjs.map} +0 -0
- /package/{build/types/css-modules.d.js.map → build-module/form/primitives/fieldset/types.mjs.map} +0 -0
- /package/build-module/types/{react.d.js.map → react.d.mjs.map} +0 -0
|
@@ -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
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// packages/ui/src/index.ts
|
|
2
|
+
export * from "./badge/index.mjs";
|
|
3
|
+
export * from "./box/index.mjs";
|
|
4
|
+
export * from "./button/index.mjs";
|
|
5
|
+
export * from "./form/primitives/index.mjs";
|
|
6
|
+
export * from "./icon/index.mjs";
|
|
7
|
+
export * from "./stack/index.mjs";
|
|
8
|
+
export * from "./visually-hidden/index.mjs";
|
|
9
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/index.ts"],
|
|
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
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// packages/ui/src/stack/stack.tsx
|
|
2
|
-
import
|
|
2
|
+
import { useRender, mergeProps } from "@base-ui/react";
|
|
3
3
|
import { forwardRef } from "@wordpress/element";
|
|
4
|
-
import { renderElement } from "../utils/element";
|
|
5
4
|
|
|
6
5
|
// packages/ui/src/stack/style.module.css
|
|
7
6
|
var css = `@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;
|
|
@@ -19,22 +18,21 @@ var style_default = {
|
|
|
19
18
|
|
|
20
19
|
// packages/ui/src/stack/stack.tsx
|
|
21
20
|
var Stack = forwardRef(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
|
|
22
|
-
const className = clsx(props.className, style_default.stack);
|
|
23
21
|
const style = {
|
|
24
22
|
gap: gap && `var(--wpds-dimension-gap-${gap})`,
|
|
25
23
|
alignItems: align,
|
|
26
24
|
justifyContent: justify,
|
|
27
25
|
flexDirection: direction,
|
|
28
|
-
flexWrap: wrap
|
|
29
|
-
...props.style
|
|
26
|
+
flexWrap: wrap
|
|
30
27
|
};
|
|
31
|
-
|
|
28
|
+
const element = useRender({
|
|
32
29
|
render,
|
|
33
30
|
ref,
|
|
34
|
-
props:
|
|
31
|
+
props: mergeProps(props, { style, className: style_default.stack })
|
|
35
32
|
});
|
|
33
|
+
return element;
|
|
36
34
|
});
|
|
37
35
|
export {
|
|
38
36
|
Stack
|
|
39
37
|
};
|
|
40
|
-
//# sourceMappingURL=stack.
|
|
38
|
+
//# sourceMappingURL=stack.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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", "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__stack__Gc4EG {\n\t\tdisplay: flex;\n\t}\n}\n`;\ndocument.head\n .appendChild(document.createElement(\"style\"))\n .appendChild(document.createTextNode(css));\nexport {css};\nexport default {\n \"stack\": \"style-module__stack__Gc4EG\"\n};"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,WAAW,kBAAkB;AACtC,SAAS,kBAAkB;;;ACD3B,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQZ,SAAS,KACJ,YAAY,SAAS,cAAc,OAAO,CAAC,EAC3C,YAAY,SAAS,eAAe,GAAG,CAAC;AAE7C,IAAO,gBAAQ;AAAA,EACb,SAAS;AACX;;;ADLO,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
|
+
"names": ["Stack"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=css-modules.d.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.mjs.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// packages/ui/src/visually-hidden/visually-hidden.tsx
|
|
2
|
+
import { mergeProps, useRender } from "@base-ui/react";
|
|
3
|
+
import { forwardRef } from "@wordpress/element";
|
|
4
|
+
|
|
5
|
+
// packages/ui/src/visually-hidden/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__visually-hidden__83ueL {
|
|
10
|
+
border: 0;
|
|
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
|
+
}
|
|
20
|
+
}
|
|
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
|
+
};
|
|
26
|
+
|
|
27
|
+
// packages/ui/src/visually-hidden/visually-hidden.tsx
|
|
28
|
+
var VisuallyHidden = forwardRef(
|
|
29
|
+
function VisuallyHidden2({ render, ...restProps }, ref) {
|
|
30
|
+
const element = useRender({
|
|
31
|
+
render,
|
|
32
|
+
ref,
|
|
33
|
+
props: mergeProps(
|
|
34
|
+
{ className: style_default["visually-hidden"] },
|
|
35
|
+
restProps
|
|
36
|
+
)
|
|
37
|
+
});
|
|
38
|
+
return element;
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
export {
|
|
42
|
+
VisuallyHidden
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=visually-hidden.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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", "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__visually-hidden__83ueL {\n\t\tborder: 0;\n\t\tclip-path: inset(50%);\n\t\theight: 1px;\n\t\tmargin: -1px;\n\t\toverflow: hidden;\n\t\tpadding: 0;\n\t\tposition: absolute;\n\t\twidth: 1px;\n\t\tword-wrap: normal;\n\t}\n}\n`;\ndocument.head\n .appendChild(document.createElement(\"style\"))\n .appendChild(document.createTextNode(css));\nexport {css};\nexport default {\n \"visually-hidden\": \"style-module__visually-hidden__83ueL\"\n};"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,YAAY,iBAAiB;AACtC,SAAS,kBAAkB;;;ACD3B,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBZ,SAAS,KACJ,YAAY,SAAS,cAAc,OAAO,CAAC,EAC3C,YAAY,SAAS,eAAe,GAAG,CAAC;AAE7C,IAAO,gBAAQ;AAAA,EACb,mBAAmB;AACrB;;;ADbO,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
|
+
"names": ["VisuallyHidden"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type BadgeProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* A badge component for displaying labels with semantic intent.
|
|
4
|
+
* Built on the Box primitive for consistent theming and accessibility.
|
|
5
|
+
*/
|
|
6
|
+
export declare const Badge: import("react").ForwardRefExoticComponent<BadgeProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/badge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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 Default: Story;
|
|
7
|
+
export declare const High: Story;
|
|
8
|
+
export declare const Medium: Story;
|
|
9
|
+
export declare const Low: Story;
|
|
10
|
+
export declare const Stable: Story;
|
|
11
|
+
export declare const Informational: Story;
|
|
12
|
+
export declare const Draft: Story;
|
|
13
|
+
export declare const None: Story;
|
|
14
|
+
export declare const AllIntents: Story;
|
|
15
|
+
//# sourceMappingURL=index.story.d.ts.map
|
|
@@ -0,0 +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,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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ComponentProps } from '../utils/types';
|
|
2
|
+
export interface BadgeProps extends ComponentProps<'span'> {
|
|
3
|
+
/**
|
|
4
|
+
* The text to display in the badge.
|
|
5
|
+
*/
|
|
6
|
+
children: string;
|
|
7
|
+
/**
|
|
8
|
+
* The semantic intent of the badge, communicating its meaning through color.
|
|
9
|
+
*
|
|
10
|
+
* @default "none"
|
|
11
|
+
*/
|
|
12
|
+
intent?: 'high' | 'medium' | 'low' | 'stable' | 'informational' | 'draft' | 'none';
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
package/build-types/box/box.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../src/box/box.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../src/box/box.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AA4DxC;;;GAGG;AACH,eAAO,MAAM,GAAG,qGAmDb,CAAC"}
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { type Meta, type StoryObj } from '@storybook/react';
|
|
5
|
-
/**
|
|
6
|
-
* WordPress dependencies
|
|
7
|
-
*/
|
|
8
|
-
import '@wordpress/theme/design-tokens.css';
|
|
9
|
-
/**
|
|
10
|
-
* Internal dependencies
|
|
11
|
-
*/
|
|
1
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
12
2
|
import { Box } from '../box';
|
|
13
3
|
declare const meta: Meta<typeof Box>;
|
|
14
4
|
export default meta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/box/stories/index.story.tsx"],"names":[],"mappings":"AAAA
|
|
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,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
* Internal dependencies
|
|
3
|
-
*/
|
|
1
|
+
import { type PaddingSize, type BorderRadiusSize, type BorderWidthSize, type Target, type SurfaceBackgroundColor, type ContentForegroundColor, type SurfaceStrokeColor } from '@wordpress/theme';
|
|
4
2
|
import { type ComponentProps } from '../utils/types';
|
|
5
|
-
type SizeToken = '2xs' | 'xs' | 'sm' | 'md' | 'lg';
|
|
6
|
-
type Size = number | SizeToken;
|
|
7
|
-
type BackgroundColor = 'neutral' | 'neutral-strong' | 'neutral-weak' | 'brand' | 'success' | 'success-weak' | 'info' | 'info-weak' | 'warning' | 'warning-weak' | 'caution' | 'caution-weak' | 'error' | 'error-weak';
|
|
8
|
-
type ForegroundColor = 'neutral' | 'neutral-weak' | 'success' | 'success-weak' | 'info' | 'info-weak' | 'warning' | 'warning-weak' | 'caution' | 'caution-weak' | 'error' | 'error-weak';
|
|
9
|
-
type StrokeColor = 'brand' | 'brand-strong' | 'error' | 'error-strong' | 'info' | 'info-strong' | 'neutral' | 'neutral-strong' | 'neutral-weak' | 'success' | 'success-strong' | 'warning' | 'warning-strong';
|
|
10
3
|
type DimensionVariant<T> = {
|
|
11
4
|
block?: T;
|
|
12
5
|
blockStart?: T;
|
|
@@ -19,31 +12,31 @@ export interface BoxProps extends ComponentProps<'div'> {
|
|
|
19
12
|
/**
|
|
20
13
|
* The target rendering element design token grouping to use for the box.
|
|
21
14
|
*/
|
|
22
|
-
target?:
|
|
15
|
+
target?: Target;
|
|
23
16
|
/**
|
|
24
17
|
* The surface background design token for box background color.
|
|
25
18
|
*/
|
|
26
|
-
backgroundColor?:
|
|
19
|
+
backgroundColor?: SurfaceBackgroundColor;
|
|
27
20
|
/**
|
|
28
21
|
* The surface foreground design token for box text color.
|
|
29
22
|
*/
|
|
30
|
-
color?:
|
|
23
|
+
color?: ContentForegroundColor;
|
|
31
24
|
/**
|
|
32
25
|
* The surface spacing design token or base unit multiplier for box padding.
|
|
33
26
|
*/
|
|
34
|
-
padding?:
|
|
27
|
+
padding?: PaddingSize | DimensionVariant<PaddingSize>;
|
|
35
28
|
/**
|
|
36
29
|
* The surface border radius design token.
|
|
37
30
|
*/
|
|
38
|
-
borderRadius?:
|
|
31
|
+
borderRadius?: BorderRadiusSize;
|
|
39
32
|
/**
|
|
40
33
|
* The surface border width design token.
|
|
41
34
|
*/
|
|
42
|
-
borderWidth?:
|
|
35
|
+
borderWidth?: BorderWidthSize;
|
|
43
36
|
/**
|
|
44
37
|
* The surface border stroke color design token.
|
|
45
38
|
*/
|
|
46
|
-
borderColor?:
|
|
39
|
+
borderColor?: SurfaceStrokeColor;
|
|
47
40
|
/**
|
|
48
41
|
* The content to be rendered inside the component.
|
|
49
42
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/box/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/box/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,MAAM,EACX,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,KAAK,gBAAgB,CAAE,CAAC,IAAK;IAC5B,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,UAAU,CAAC,EAAE,CAAC,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,CAAC;IACb,MAAM,CAAC,EAAE,CAAC,CAAC;IACX,WAAW,CAAC,EAAE,CAAC,CAAC;IAChB,SAAS,CAAC,EAAE,CAAC,CAAC;CACd,CAAC;AAEF,MAAM,WAAW,QAAS,SAAQ,cAAc,CAAE,KAAK,CAAE;IACxD;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,eAAe,CAAC,EAAE,sBAAsB,CAAC;IAEzC;;OAEG;IACH,KAAK,CAAC,EAAE,sBAAsB,CAAC;IAE/B;;OAEG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,gBAAgB,CAAE,WAAW,CAAE,CAAC;IAExD;;OAEG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAEhC;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;IAE9B;;OAEG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;IAEjC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B"}
|
|
@@ -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"}
|