@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,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/ui/src/visually-hidden/visually-hidden.tsx
|
|
21
|
+
var visually_hidden_exports = {};
|
|
22
|
+
__export(visually_hidden_exports, {
|
|
23
|
+
VisuallyHidden: () => VisuallyHidden
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(visually_hidden_exports);
|
|
26
|
+
var import_react = require("@base-ui/react");
|
|
27
|
+
var import_element = require("@wordpress/element");
|
|
28
|
+
|
|
29
|
+
// packages/ui/src/visually-hidden/style.module.css
|
|
30
|
+
var css = `@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;
|
|
31
|
+
|
|
32
|
+
@layer wp-ui-components {
|
|
33
|
+
.style-module__visually-hidden__83ueL {
|
|
34
|
+
border: 0;
|
|
35
|
+
clip-path: inset(50%);
|
|
36
|
+
height: 1px;
|
|
37
|
+
margin: -1px;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
padding: 0;
|
|
40
|
+
position: absolute;
|
|
41
|
+
width: 1px;
|
|
42
|
+
word-wrap: normal;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
|
|
47
|
+
var style_default = {
|
|
48
|
+
"visually-hidden": "style-module__visually-hidden__83ueL"
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
// packages/ui/src/visually-hidden/visually-hidden.tsx
|
|
52
|
+
var VisuallyHidden = (0, import_element.forwardRef)(
|
|
53
|
+
function VisuallyHidden2({ render, ...restProps }, ref) {
|
|
54
|
+
const element = (0, import_react.useRender)({
|
|
55
|
+
render,
|
|
56
|
+
ref,
|
|
57
|
+
props: (0, import_react.mergeProps)(
|
|
58
|
+
{ className: style_default["visually-hidden"] },
|
|
59
|
+
restProps
|
|
60
|
+
)
|
|
61
|
+
});
|
|
62
|
+
return element;
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
66
|
+
0 && (module.exports = {
|
|
67
|
+
VisuallyHidden
|
|
68
|
+
});
|
|
69
|
+
//# sourceMappingURL=visually-hidden.cjs.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;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsC;AACtC,qBAA2B;;;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,qBAAiB;AAAA,EAC7B,SAASA,gBAAgB,EAAE,QAAQ,GAAG,UAAU,GAAG,KAAM;AACxD,UAAM,cAAU,wBAAW;AAAA,MAC1B;AAAA,MACA;AAAA,MACA,WAAO;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,70 @@
|
|
|
1
|
+
// packages/ui/src/badge/badge.tsx
|
|
2
|
+
import { forwardRef } from "@wordpress/element";
|
|
3
|
+
import { Box } from "../box/index.mjs";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
var DEFAULT_RENDER = (props) => /* @__PURE__ */ jsx("span", { ...props });
|
|
6
|
+
var getIntentStyles = (intent) => {
|
|
7
|
+
switch (intent) {
|
|
8
|
+
case "high":
|
|
9
|
+
return {
|
|
10
|
+
backgroundColor: "error",
|
|
11
|
+
color: "error"
|
|
12
|
+
};
|
|
13
|
+
case "medium":
|
|
14
|
+
return {
|
|
15
|
+
backgroundColor: "warning",
|
|
16
|
+
color: "warning"
|
|
17
|
+
};
|
|
18
|
+
case "low":
|
|
19
|
+
return {
|
|
20
|
+
backgroundColor: "caution",
|
|
21
|
+
color: "caution"
|
|
22
|
+
};
|
|
23
|
+
case "stable":
|
|
24
|
+
return {
|
|
25
|
+
backgroundColor: "success",
|
|
26
|
+
color: "success"
|
|
27
|
+
};
|
|
28
|
+
case "informational":
|
|
29
|
+
return {
|
|
30
|
+
backgroundColor: "info",
|
|
31
|
+
color: "info"
|
|
32
|
+
};
|
|
33
|
+
case "draft":
|
|
34
|
+
return {
|
|
35
|
+
backgroundColor: "neutral-weak",
|
|
36
|
+
color: "neutral"
|
|
37
|
+
};
|
|
38
|
+
case "none":
|
|
39
|
+
default:
|
|
40
|
+
return {
|
|
41
|
+
backgroundColor: "neutral",
|
|
42
|
+
color: "neutral-weak"
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
var Badge = forwardRef(function Badge2({ children, intent = "none", render = DEFAULT_RENDER, ...props }, ref) {
|
|
47
|
+
const intentStyles = getIntentStyles(intent);
|
|
48
|
+
return /* @__PURE__ */ jsx(
|
|
49
|
+
Box,
|
|
50
|
+
{
|
|
51
|
+
...intentStyles,
|
|
52
|
+
padding: { inline: "xs", block: "2xs" },
|
|
53
|
+
borderRadius: "lg",
|
|
54
|
+
render,
|
|
55
|
+
style: {
|
|
56
|
+
fontFamily: "var(--wpds-font-family-body)",
|
|
57
|
+
fontSize: "var(--wpds-font-size-sm)",
|
|
58
|
+
fontWeight: "var(--wpds-font-weight-regular)",
|
|
59
|
+
lineHeight: "var(--wpds-font-line-height-xs)",
|
|
60
|
+
...props.style
|
|
61
|
+
},
|
|
62
|
+
ref,
|
|
63
|
+
children
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
});
|
|
67
|
+
export {
|
|
68
|
+
Badge
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=badge.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/badge/badge.tsx"],
|
|
4
|
+
"sourcesContent": ["import { forwardRef } from '@wordpress/element';\nimport { Box } from '../box';\nimport { type BoxProps } from '../box/types';\nimport { type BadgeProps } from './types';\n\n/**\n * Default render function that renders a span element with the given props.\n */\nconst DEFAULT_RENDER = ( props: React.ComponentPropsWithoutRef< 'span' > ) => (\n\t<span { ...props } />\n);\n\n/**\n * Maps intent values to Box backgroundColor and color props.\n * Uses strong emphasis styles (as emphasis prop has been removed).\n */\nconst getIntentStyles = (\n\tintent: BadgeProps[ 'intent' ]\n): Partial< BoxProps > => {\n\tswitch ( intent ) {\n\t\tcase 'high':\n\t\t\treturn {\n\t\t\t\tbackgroundColor: 'error',\n\t\t\t\tcolor: 'error',\n\t\t\t};\n\t\tcase 'medium':\n\t\t\treturn {\n\t\t\t\tbackgroundColor: 'warning',\n\t\t\t\tcolor: 'warning',\n\t\t\t};\n\t\tcase 'low':\n\t\t\treturn {\n\t\t\t\tbackgroundColor: 'caution',\n\t\t\t\tcolor: 'caution',\n\t\t\t};\n\t\tcase 'stable':\n\t\t\treturn {\n\t\t\t\tbackgroundColor: 'success',\n\t\t\t\tcolor: 'success',\n\t\t\t};\n\t\tcase 'informational':\n\t\t\treturn {\n\t\t\t\tbackgroundColor: 'info',\n\t\t\t\tcolor: 'info',\n\t\t\t};\n\t\tcase 'draft':\n\t\t\treturn {\n\t\t\t\tbackgroundColor: 'neutral-weak',\n\t\t\t\tcolor: 'neutral',\n\t\t\t};\n\t\tcase 'none':\n\t\tdefault:\n\t\t\treturn {\n\t\t\t\tbackgroundColor: 'neutral',\n\t\t\t\tcolor: 'neutral-weak',\n\t\t\t};\n\t}\n};\n\n/**\n * A badge component for displaying labels with semantic intent.\n * Built on the Box primitive for consistent theming and accessibility.\n */\nexport const Badge = forwardRef< HTMLDivElement, BadgeProps >( function Badge(\n\t{ children, intent = 'none', render = DEFAULT_RENDER, ...props },\n\tref\n) {\n\tconst intentStyles = getIntentStyles( intent );\n\n\treturn (\n\t\t<Box\n\t\t\t{ ...intentStyles }\n\t\t\tpadding={ { inline: 'xs', block: '2xs' } }\n\t\t\tborderRadius=\"lg\"\n\t\t\trender={ render }\n\t\t\tstyle={ {\n\t\t\t\tfontFamily: 'var(--wpds-font-family-body)',\n\t\t\t\tfontSize: 'var(--wpds-font-size-sm)',\n\t\t\t\tfontWeight: 'var(--wpds-font-weight-regular)',\n\t\t\t\tlineHeight: 'var(--wpds-font-line-height-xs)',\n\t\t\t\t...props.style,\n\t\t\t} }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ children }\n\t\t</Box>\n\t);\n} );\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,kBAAkB;AAC3B,SAAS,WAAW;AAQnB;AADD,IAAM,iBAAiB,CAAE,UACxB,oBAAC,UAAO,GAAG,OAAQ;AAOpB,IAAM,kBAAkB,CACvB,WACyB;AACzB,UAAS,QAAS;AAAA,IACjB,KAAK;AACJ,aAAO;AAAA,QACN,iBAAiB;AAAA,QACjB,OAAO;AAAA,MACR;AAAA,IACD,KAAK;AACJ,aAAO;AAAA,QACN,iBAAiB;AAAA,QACjB,OAAO;AAAA,MACR;AAAA,IACD,KAAK;AACJ,aAAO;AAAA,QACN,iBAAiB;AAAA,QACjB,OAAO;AAAA,MACR;AAAA,IACD,KAAK;AACJ,aAAO;AAAA,QACN,iBAAiB;AAAA,QACjB,OAAO;AAAA,MACR;AAAA,IACD,KAAK;AACJ,aAAO;AAAA,QACN,iBAAiB;AAAA,QACjB,OAAO;AAAA,MACR;AAAA,IACD,KAAK;AACJ,aAAO;AAAA,QACN,iBAAiB;AAAA,QACjB,OAAO;AAAA,MACR;AAAA,IACD,KAAK;AAAA,IACL;AACC,aAAO;AAAA,QACN,iBAAiB;AAAA,QACjB,OAAO;AAAA,MACR;AAAA,EACF;AACD;AAMO,IAAM,QAAQ,WAA0C,SAASA,OACvE,EAAE,UAAU,SAAS,QAAQ,SAAS,gBAAgB,GAAG,MAAM,GAC/D,KACC;AACD,QAAM,eAAe,gBAAiB,MAAO;AAE7C,SACC;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACL,SAAU,EAAE,QAAQ,MAAM,OAAO,MAAM;AAAA,MACvC,cAAa;AAAA,MACb;AAAA,MACA,OAAQ;AAAA,QACP,YAAY;AAAA,QACZ,UAAU;AAAA,QACV,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,GAAG,MAAM;AAAA,MACV;AAAA,MACA;AAAA,MAEE;AAAA;AAAA,EACH;AAEF,CAAE;",
|
|
6
|
+
"names": ["Badge"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.mjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// packages/ui/src/box/box.tsx
|
|
2
|
+
import { useRender, mergeProps } from "@base-ui/react";
|
|
2
3
|
import { forwardRef } from "@wordpress/element";
|
|
3
|
-
import { renderElement } from "../utils/element";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
var DEFAULT_RENDER = (props) => /* @__PURE__ */ jsx("div", { ...props });
|
|
6
6
|
var capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
7
|
-
var getSpacingValue = (property, target, value) =>
|
|
7
|
+
var getSpacingValue = (property, target, value) => `var(--wpds-dimension-${property}-${target}-${value}, var(--wpds-dimension-${property}-surface-${value}))`;
|
|
8
8
|
var getDimensionVariantStyles = (property, target, value) => typeof value !== "object" ? { [property]: getSpacingValue(property, target, value) } : Object.keys(value).reduce(
|
|
9
9
|
(result, key) => ({
|
|
10
10
|
...result,
|
|
@@ -27,7 +27,7 @@ var Box = forwardRef(function Box2({
|
|
|
27
27
|
render = DEFAULT_RENDER,
|
|
28
28
|
...props
|
|
29
29
|
}, ref) {
|
|
30
|
-
const style = {
|
|
30
|
+
const style = {};
|
|
31
31
|
if (backgroundColor) {
|
|
32
32
|
style.backgroundColor = `var(--wpds-color-bg-${target}-${backgroundColor}, var(--wpds-color-bg-surface-${backgroundColor}))`;
|
|
33
33
|
}
|
|
@@ -50,13 +50,14 @@ var Box = forwardRef(function Box2({
|
|
|
50
50
|
if (borderColor) {
|
|
51
51
|
style.borderColor = `var(--wpds-color-stroke-${target}-${borderColor}, var(--wpds-color-stroke-surface-${borderColor}))`;
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
const element = useRender({
|
|
54
54
|
render,
|
|
55
55
|
ref,
|
|
56
|
-
props:
|
|
56
|
+
props: mergeProps(props, { style })
|
|
57
57
|
});
|
|
58
|
+
return element;
|
|
58
59
|
});
|
|
59
60
|
export {
|
|
60
61
|
Box
|
|
61
62
|
};
|
|
62
|
-
//# sourceMappingURL=box.
|
|
63
|
+
//# sourceMappingURL=box.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/box/box.tsx"],
|
|
4
|
+
"sourcesContent": ["import { useRender, mergeProps } from '@base-ui/react';\nimport { forwardRef } from '@wordpress/element';\nimport { type BoxProps } from './types';\n\n/**\n * Default render function that renders a div element with the given props.\n */\nconst DEFAULT_RENDER = ( props: React.ComponentPropsWithoutRef< 'div' > ) => (\n\t<div { ...props } />\n);\n\n/**\n * Capitalizes the first character of a string.\n */\nconst capitalize = ( str: string ): string =>\n\tstr.charAt( 0 ).toUpperCase() + str.slice( 1 );\n\n/**\n * Converts a size token name to a CSS design token property reference (with\n * fallback).\n *\n * @param property The CSS property name.\n * @param target The design system token target.\n * @param value The size token name.\n * @return A CSS value string with variable references.\n */\nconst getSpacingValue = (\n\tproperty: string,\n\ttarget: string,\n\tvalue: string\n): string =>\n\t`var(--wpds-dimension-${ property }-${ target }-${ value }, var(--wpds-dimension-${ property }-surface-${ value }))`;\n\n/**\n * Generates CSS styles for properties with optionally directional values,\n * normalizing single values and objects with directional keys for logical\n * properties.\n *\n * @param property The CSS property name from BoxProps.\n * @param target The design system token target.\n * @param value The property value (single or object with directional keys).\n * @return A CSSProperties object with the computed styles.\n */\nconst getDimensionVariantStyles = < T extends keyof BoxProps >(\n\tproperty: T,\n\ttarget: string,\n\tvalue: NonNullable< BoxProps[ T ] >\n): React.CSSProperties =>\n\ttypeof value !== 'object'\n\t\t? { [ property ]: getSpacingValue( property, target, value ) }\n\t\t: Object.keys( value ).reduce(\n\t\t\t\t( result, key ) => ( {\n\t\t\t\t\t...result,\n\t\t\t\t\t[ property + capitalize( key ) ]: getSpacingValue(\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\ttarget,\n\t\t\t\t\t\tvalue[ key ]\n\t\t\t\t\t),\n\t\t\t\t} ),\n\t\t\t\t{} as Record< string, string >\n\t\t );\n\n/**\n * A low-level visual primitive that provides an interface for applying design\n * token-based customization for background, text, padding, and more.\n */\nexport const Box = forwardRef< HTMLDivElement, BoxProps >( function Box(\n\t{\n\t\ttarget = 'surface',\n\t\tbackgroundColor,\n\t\tcolor,\n\t\tpadding,\n\t\tborderRadius,\n\t\tborderWidth,\n\t\tborderColor,\n\t\trender = DEFAULT_RENDER,\n\t\t...props\n\t},\n\tref\n) {\n\tconst style: React.CSSProperties = {};\n\n\tif ( backgroundColor ) {\n\t\tstyle.backgroundColor = `var(--wpds-color-bg-${ target }-${ backgroundColor }, var(--wpds-color-bg-surface-${ backgroundColor }))`;\n\t}\n\n\tif ( color ) {\n\t\tstyle.color = `var(--wpds-color-fg-${ target }-${ color }, var(--wpds-color-fg-content-${ color }))`;\n\t}\n\n\tif ( padding ) {\n\t\tObject.assign(\n\t\t\tstyle,\n\t\t\tgetDimensionVariantStyles( 'padding', target, padding )\n\t\t);\n\t}\n\n\tif ( borderRadius ) {\n\t\tstyle.borderRadius = `var(--wpds-border-radius-${ target }-${ borderRadius }, var(--wpds-border-radius-surface-${ borderRadius }))`;\n\t}\n\n\tif ( borderWidth ) {\n\t\tstyle.borderWidth = `var(--wpds-border-width-${ target }-${ borderWidth }, var(--wpds-border-width-surface-${ borderWidth }))`;\n\t\tstyle.borderStyle = 'solid';\n\t}\n\n\tif ( borderColor ) {\n\t\tstyle.borderColor = `var(--wpds-color-stroke-${ target }-${ borderColor }, var(--wpds-color-stroke-surface-${ borderColor }))`;\n\t}\n\n\tconst element = useRender( {\n\t\trender,\n\t\tref,\n\t\tprops: mergeProps< 'div' >( props, { style } ),\n\t} );\n\n\treturn element;\n} );\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,WAAW,kBAAkB;AACtC,SAAS,kBAAkB;AAO1B;AADD,IAAM,iBAAiB,CAAE,UACxB,oBAAC,SAAM,GAAG,OAAQ;AAMnB,IAAM,aAAa,CAAE,QACpB,IAAI,OAAQ,CAAE,EAAE,YAAY,IAAI,IAAI,MAAO,CAAE;AAW9C,IAAM,kBAAkB,CACvB,UACA,QACA,UAEA,wBAAyB,QAAS,IAAK,MAAO,IAAK,KAAM,0BAA2B,QAAS,YAAa,KAAM;AAYjH,IAAM,4BAA4B,CACjC,UACA,QACA,UAEA,OAAO,UAAU,WACd,EAAE,CAAE,QAAS,GAAG,gBAAiB,UAAU,QAAQ,KAAM,EAAE,IAC3D,OAAO,KAAM,KAAM,EAAE;AAAA,EACrB,CAAE,QAAQ,SAAW;AAAA,IACpB,GAAG;AAAA,IACH,CAAE,WAAW,WAAY,GAAI,CAAE,GAAG;AAAA,MACjC;AAAA,MACA;AAAA,MACA,MAAO,GAAI;AAAA,IACZ;AAAA,EACD;AAAA,EACA,CAAC;AACD;AAMG,IAAM,MAAM,WAAwC,SAASA,KACnE;AAAA,EACC,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT,GAAG;AACJ,GACA,KACC;AACD,QAAM,QAA6B,CAAC;AAEpC,MAAK,iBAAkB;AACtB,UAAM,kBAAkB,uBAAwB,MAAO,IAAK,eAAgB,iCAAkC,eAAgB;AAAA,EAC/H;AAEA,MAAK,OAAQ;AACZ,UAAM,QAAQ,uBAAwB,MAAO,IAAK,KAAM,iCAAkC,KAAM;AAAA,EACjG;AAEA,MAAK,SAAU;AACd,WAAO;AAAA,MACN;AAAA,MACA,0BAA2B,WAAW,QAAQ,OAAQ;AAAA,IACvD;AAAA,EACD;AAEA,MAAK,cAAe;AACnB,UAAM,eAAe,4BAA6B,MAAO,IAAK,YAAa,sCAAuC,YAAa;AAAA,EAChI;AAEA,MAAK,aAAc;AAClB,UAAM,cAAc,2BAA4B,MAAO,IAAK,WAAY,qCAAsC,WAAY;AAC1H,UAAM,cAAc;AAAA,EACrB;AAEA,MAAK,aAAc;AAClB,UAAM,cAAc,2BAA4B,MAAO,IAAK,WAAY,qCAAsC,WAAY;AAAA,EAC3H;AAEA,QAAM,UAAU,UAAW;AAAA,IAC1B;AAAA,IACA;AAAA,IACA,OAAO,WAAqB,OAAO,EAAE,MAAM,CAAE;AAAA,EAC9C,CAAE;AAEF,SAAO;AACR,CAAE;",
|
|
6
|
+
"names": ["Box"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.mjs.map
|
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
// packages/ui/src/button/button.tsx
|
|
2
|
+
import { Button as _Button } from "@base-ui/react/button";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { speak } from "@wordpress/a11y";
|
|
5
|
+
import { forwardRef, useEffect } from "@wordpress/element";
|
|
6
|
+
import { __ } from "@wordpress/i18n";
|
|
7
|
+
|
|
8
|
+
// packages/ui/src/button/style.module.css
|
|
9
|
+
var css = `@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;
|
|
10
|
+
|
|
11
|
+
@layer wp-ui-components {
|
|
12
|
+
.style-module__button__l7D8M,
|
|
13
|
+
.style-module__is-unstyled__q7snL {
|
|
14
|
+
appearance: none;
|
|
15
|
+
padding: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.style-module__button__l7D8M {
|
|
19
|
+
/* Internal variables */
|
|
20
|
+
--wp-ui-button-font-weight: 499;
|
|
21
|
+
|
|
22
|
+
--wp-ui-button-background-color: var(--wpds-color-bg-interactive-brand-strong);
|
|
23
|
+
--wp-ui-button-background-color-active: var(--wpds-color-bg-interactive-brand-strong-active);
|
|
24
|
+
--wp-ui-button-background-color-disabled: var(--wpds-color-bg-interactive-neutral-strong-disabled);
|
|
25
|
+
--wp-ui-button-foreground-color: var(--wpds-color-fg-interactive-brand-strong);
|
|
26
|
+
--wp-ui-button-foreground-color-active: var(--wpds-color-fg-interactive-brand-strong-active);
|
|
27
|
+
--wp-ui-button-foreground-color-disabled: var(--wpds-color-fg-interactive-neutral-strong-disabled);
|
|
28
|
+
--wp-ui-button-padding-inline: calc(3 * var(--wpds-dimension-base)); /* TODO: Create new interactive padding tokens */
|
|
29
|
+
--wp-ui-button-height: 40px;
|
|
30
|
+
--wp-ui-button-aspect-ratio: auto; /* Useful for overrides such as icon buttons */
|
|
31
|
+
--wp-ui-button-font-size: var(--wpds-font-size-md);
|
|
32
|
+
|
|
33
|
+
/* by default, borders have the same color as the background */
|
|
34
|
+
--wp-ui-button-border-color: var(--wp-ui-button-background-color);
|
|
35
|
+
--wp-ui-button-border-color-active: var(--wp-ui-button-background-color-active);
|
|
36
|
+
--wp-ui-button-border-color-disabled: var(--wp-ui-button-background-color-disabled);
|
|
37
|
+
|
|
38
|
+
/* Styles */
|
|
39
|
+
position: relative;
|
|
40
|
+
display: inline-flex;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: calc(2 * var(--wpds-dimension-base)); /* TODO: Consider new interactive/control gap tokens */
|
|
44
|
+
aspect-ratio: var(--wp-ui-button-aspect-ratio);
|
|
45
|
+
height: var(--wp-ui-button-height);
|
|
46
|
+
padding-inline: var(--wp-ui-button-padding-inline);
|
|
47
|
+
border-style: solid;
|
|
48
|
+
border-width: 1px;
|
|
49
|
+
border-color: var(--wp-ui-button-border-color);
|
|
50
|
+
border-radius: var(--wpds-border-radius-surface-sm);
|
|
51
|
+
background-color: var(--wp-ui-button-background-color);
|
|
52
|
+
background-clip: padding-box;
|
|
53
|
+
font-family: var(--wpds-font-family-body);
|
|
54
|
+
font-size: var(--wp-ui-button-font-size);
|
|
55
|
+
font-weight: var(--wp-ui-button-font-weight);
|
|
56
|
+
line-height: var(--wpds-font-line-height-sm);
|
|
57
|
+
text-decoration: none;
|
|
58
|
+
color: var(--wp-ui-button-foreground-color);
|
|
59
|
+
|
|
60
|
+
@media not ( prefers-reduced-motion ) {
|
|
61
|
+
transition: color 0.1s ease-out;
|
|
62
|
+
|
|
63
|
+
* {
|
|
64
|
+
transition: opacity 0.1s ease-out;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Use pointer cursor for buttons that are links */
|
|
69
|
+
&[href] {
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Make sure that links rendered as children of \`Button\` use button styles */
|
|
74
|
+
*[href] {
|
|
75
|
+
color: inherit;
|
|
76
|
+
text-decoration: inherit;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* States */
|
|
80
|
+
&:not([aria-disabled="true"]):is(:hover, :active, :focus) {
|
|
81
|
+
/* hover/active/focus states apply when the button is not disabled. A non
|
|
82
|
+
disabled, loading button will have hover/active/focus styles */
|
|
83
|
+
--wp-ui-button-background-color: var(--wp-ui-button-background-color-active);
|
|
84
|
+
--wp-ui-button-foreground-color: var(--wp-ui-button-foreground-color-active);
|
|
85
|
+
--wp-ui-button-border-color: var(--wp-ui-button-border-color-active);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&[aria-disabled="true"]:not(.style-module__is-loading__kUtC8) {
|
|
89
|
+
/* A loading button, even when disabled, won't "look" disabled */
|
|
90
|
+
--wp-ui-button-background-color: var(--wp-ui-button-background-color-disabled);
|
|
91
|
+
--wp-ui-button-foreground-color: var(--wp-ui-button-foreground-color-disabled);
|
|
92
|
+
--wp-ui-button-border-color: var(--wp-ui-button-border-color-disabled);
|
|
93
|
+
|
|
94
|
+
@media ( forced-colors: active ) {
|
|
95
|
+
border-color: GrayText;
|
|
96
|
+
color: GrayText;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* Loading spinner \u2014 not animated and hidden unless in loading state */
|
|
101
|
+
&::before {
|
|
102
|
+
content: "";
|
|
103
|
+
position: absolute;
|
|
104
|
+
top: 50%;
|
|
105
|
+
inset-inline-start: 50%;
|
|
106
|
+
transform: translate(-50%, -50%);
|
|
107
|
+
|
|
108
|
+
display: block;
|
|
109
|
+
box-sizing: border-box;
|
|
110
|
+
height: var(--wp-ui-button-font-size);
|
|
111
|
+
aspect-ratio: 1;
|
|
112
|
+
|
|
113
|
+
border: var(--wpds-border-width-interactive-focus) solid;
|
|
114
|
+
border-block-start-color: var(--wp-ui-button-foreground-color);
|
|
115
|
+
border-inline-end-color: var(--wp-ui-button-foreground-color);
|
|
116
|
+
border-block-end-color: transparent;
|
|
117
|
+
border-inline-start-color: transparent;
|
|
118
|
+
border-radius: 50%;
|
|
119
|
+
|
|
120
|
+
pointer-events: none;
|
|
121
|
+
opacity: 0;
|
|
122
|
+
|
|
123
|
+
@media not ( prefers-reduced-motion ) {
|
|
124
|
+
transition: opacity 0.1s ease-out;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.style-module__is-small__kIIFR {
|
|
130
|
+
--wp-ui-button-padding-inline: calc(2 * var(--wpds-dimension-base)); /* TODO: Create new interactive padding tokens */
|
|
131
|
+
--wp-ui-button-height: 24px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* Variants (\`tone\` + \`variant\`) overrides compared to default styles */
|
|
135
|
+
|
|
136
|
+
/* All outline buttons have a border */
|
|
137
|
+
.style-module__is-brand__3UYMl {
|
|
138
|
+
/* no need to redefine variables for .is-brand.is-solid as it's the default variant */
|
|
139
|
+
|
|
140
|
+
/* Outline and minimal buttons use the same foreground color */
|
|
141
|
+
&.style-module__is-outline__YtWne,
|
|
142
|
+
&.style-module__is-minimal__rQYZo {
|
|
143
|
+
--wp-ui-button-foreground-color: var(--wpds-color-fg-interactive-brand);
|
|
144
|
+
--wp-ui-button-foreground-color-active: var(--wpds-color-fg-interactive-brand-active);
|
|
145
|
+
--wp-ui-button-foreground-color-disabled: var(--wpds-color-fg-interactive-neutral-disabled);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&.style-module__is-outline__YtWne {
|
|
149
|
+
--wp-ui-button-background-color: var(--wpds-color-bg-interactive-brand-weak);
|
|
150
|
+
--wp-ui-button-background-color-active: var(--wpds-color-bg-interactive-brand-weak-active);
|
|
151
|
+
--wp-ui-button-background-color-disabled: var(--wpds-color-bg-interactive-neutral-weak-disabled);
|
|
152
|
+
--wp-ui-button-border-color: var(--wpds-color-stroke-interactive-brand);
|
|
153
|
+
--wp-ui-button-border-color-active: var(--wpds-color-stroke-interactive-brand-active);
|
|
154
|
+
--wp-ui-button-border-color-disabled: var(--wpds-color-stroke-interactive-neutral-disabled);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&.style-module__is-minimal__rQYZo {
|
|
158
|
+
--wp-ui-button-background-color: var(--wpds-color-bg-interactive-brand-weak);
|
|
159
|
+
--wp-ui-button-background-color-active: var(--wpds-color-bg-interactive-brand-weak-active);
|
|
160
|
+
--wp-ui-button-background-color-disabled: var(--wpds-color-bg-interactive-neutral-weak-disabled);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.style-module__is-neutral__5yKo- {
|
|
165
|
+
&.style-module__is-solid__tQszW {
|
|
166
|
+
--wp-ui-button-background-color: var(--wpds-color-bg-interactive-neutral-strong);
|
|
167
|
+
--wp-ui-button-background-color-active: var(--wpds-color-bg-interactive-neutral-strong-active);
|
|
168
|
+
--wp-ui-button-background-color-disabled: var(--wpds-color-bg-interactive-neutral-strong-disabled);
|
|
169
|
+
--wp-ui-button-foreground-color: var(--wpds-color-fg-interactive-neutral-strong);
|
|
170
|
+
--wp-ui-button-foreground-color-active: var(--wpds-color-fg-interactive-neutral-strong-active);
|
|
171
|
+
--wp-ui-button-foreground-color-disabled: var(--wpds-color-fg-interactive-neutral-strong-disabled);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* Outline and minimal buttons use the same foreground color */
|
|
175
|
+
&.style-module__is-outline__YtWne,
|
|
176
|
+
&.style-module__is-minimal__rQYZo {
|
|
177
|
+
--wp-ui-button-foreground-color: var(--wpds-color-fg-interactive-neutral);
|
|
178
|
+
--wp-ui-button-foreground-color-active: var(--wpds-color-fg-interactive-neutral-active);
|
|
179
|
+
--wp-ui-button-foreground-color-disabled: var(--wpds-color-fg-interactive-neutral-disabled);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&.style-module__is-outline__YtWne {
|
|
183
|
+
--wp-ui-button-background-color: var(--wpds-color-bg-interactive-neutral-weak);
|
|
184
|
+
--wp-ui-button-background-color-active: var(--wpds-color-bg-interactive-neutral-weak-active);
|
|
185
|
+
--wp-ui-button-background-color-disabled: var(--wpds-color-bg-interactive-neutral-weak-disabled);
|
|
186
|
+
--wp-ui-button-border-color: var(--wpds-color-stroke-interactive-neutral);
|
|
187
|
+
--wp-ui-button-border-color-active: var(--wpds-color-stroke-interactive-neutral-active);
|
|
188
|
+
--wp-ui-button-border-color-disabled: var(--wpds-color-stroke-interactive-neutral-disabled);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&.style-module__is-minimal__rQYZo {
|
|
192
|
+
--wp-ui-button-background-color: var(--wpds-color-bg-interactive-neutral-weak);
|
|
193
|
+
--wp-ui-button-background-color-active: var(--wpds-color-bg-interactive-neutral-weak-active);
|
|
194
|
+
--wp-ui-button-background-color-disabled: var(--wpds-color-bg-interactive-neutral-weak-disabled);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.style-module__is-unstyled__q7snL {
|
|
199
|
+
border: none;
|
|
200
|
+
background: none;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.style-module__is-compact__z1nPG {
|
|
204
|
+
--wp-ui-button-height: 32px;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.style-module__is-loading__kUtC8 {
|
|
208
|
+
color: transparent;
|
|
209
|
+
|
|
210
|
+
* {
|
|
211
|
+
opacity: 0;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&::before {
|
|
215
|
+
transition-delay: 0.05s;
|
|
216
|
+
opacity: 1;
|
|
217
|
+
|
|
218
|
+
@media not ( prefers-reduced-motion ) {
|
|
219
|
+
animation: style-module__loading-animation__Wh1T2 1s linear infinite;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
[aria-pressed="true"].style-module__is-minimal__rQYZo.style-module__is-neutral__5yKo- {
|
|
225
|
+
--wp-ui-button-background-color: var(--wpds-color-bg-interactive-neutral-strong);
|
|
226
|
+
--wp-ui-button-background-color-active: var(--wpds-color-bg-interactive-neutral-strong);
|
|
227
|
+
--wp-ui-button-foreground-color: var(--wpds-color-fg-interactive-neutral-strong);
|
|
228
|
+
--wp-ui-button-foreground-color-active: var(--wpds-color-fg-interactive-neutral-strong);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@keyframes style-module__loading-animation__Wh1T2 {
|
|
233
|
+
0% {
|
|
234
|
+
transform: translate(-50%, -50%) rotate(0deg);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
100% {
|
|
238
|
+
transform: translate(-50%, -50%) rotate(360deg);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
`;
|
|
242
|
+
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
|
|
243
|
+
var style_default = {
|
|
244
|
+
"button": "style-module__button__l7D8M",
|
|
245
|
+
"is-unstyled": "style-module__is-unstyled__q7snL",
|
|
246
|
+
"is-loading": "style-module__is-loading__kUtC8",
|
|
247
|
+
"is-small": "style-module__is-small__kIIFR",
|
|
248
|
+
"is-brand": "style-module__is-brand__3UYMl",
|
|
249
|
+
"is-outline": "style-module__is-outline__YtWne",
|
|
250
|
+
"is-minimal": "style-module__is-minimal__rQYZo",
|
|
251
|
+
"is-neutral": "style-module__is-neutral__5yKo-",
|
|
252
|
+
"is-solid": "style-module__is-solid__tQszW",
|
|
253
|
+
"is-compact": "style-module__is-compact__z1nPG",
|
|
254
|
+
"loading-animation": "style-module__loading-animation__Wh1T2"
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
// packages/ui/src/utils/css/resets.module.css
|
|
258
|
+
var css2 = `@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;
|
|
259
|
+
|
|
260
|
+
@layer wp-ui-utilities {
|
|
261
|
+
.resets-module__box-sizing__M2zT5 {
|
|
262
|
+
box-sizing: border-box;
|
|
263
|
+
|
|
264
|
+
*,
|
|
265
|
+
*::before,
|
|
266
|
+
*::after {
|
|
267
|
+
box-sizing: inherit;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
`;
|
|
272
|
+
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css2));
|
|
273
|
+
var resets_default = {
|
|
274
|
+
"box-sizing": "resets-module__box-sizing__M2zT5"
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
// packages/ui/src/utils/css/focus.module.css
|
|
278
|
+
var css3 = `@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;
|
|
279
|
+
|
|
280
|
+
@layer wp-ui-utilities {
|
|
281
|
+
.focus-module__outset-ring--focus__COii5,
|
|
282
|
+
.focus-module__outset-ring--focus-except-active__4lsr3,
|
|
283
|
+
.focus-module__outset-ring--focus-visible__0FQby,
|
|
284
|
+
.focus-module__outset-ring--focus-within__zYPfw,
|
|
285
|
+
.focus-module__outset-ring--focus-within-except-active__lw0E3,
|
|
286
|
+
.focus-module__outset-ring--focus-within-visible__xcs-5 {
|
|
287
|
+
@media not ( prefers-reduced-motion ) {
|
|
288
|
+
transition: outline 0.1s ease-out;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/* Outline width must be kept at 0 even with a transparent color,
|
|
292
|
+
or else the outline will be visible in forced-colors mode. */
|
|
293
|
+
outline-width: 0;
|
|
294
|
+
outline-style: solid;
|
|
295
|
+
outline-color: transparent;
|
|
296
|
+
outline-offset: 1px;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.focus-module__outset-ring--focus__COii5:focus,
|
|
300
|
+
.focus-module__outset-ring--focus-except-active__4lsr3:focus:not(:active),
|
|
301
|
+
.focus-module__outset-ring--focus-visible__0FQby:focus-visible,
|
|
302
|
+
.focus-module__outset-ring--focus-within__zYPfw:focus-within,
|
|
303
|
+
.focus-module__outset-ring--focus-within-except-active__lw0E3:focus-within:not(:has(:active)),
|
|
304
|
+
.focus-module__outset-ring--focus-within-visible__xcs-5:focus-within:has(:focus-visible) {
|
|
305
|
+
outline-width: var(--wpds-border-width-interactive-focus);
|
|
306
|
+
outline-color: var(--wpds-color-stroke-focus-brand);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
`;
|
|
310
|
+
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css3));
|
|
311
|
+
var focus_default = {
|
|
312
|
+
"outset-ring--focus": "focus-module__outset-ring--focus__COii5",
|
|
313
|
+
"outset-ring--focus-except-active": "focus-module__outset-ring--focus-except-active__4lsr3",
|
|
314
|
+
"outset-ring--focus-visible": "focus-module__outset-ring--focus-visible__0FQby",
|
|
315
|
+
"outset-ring--focus-within": "focus-module__outset-ring--focus-within__zYPfw",
|
|
316
|
+
"outset-ring--focus-within-except-active": "focus-module__outset-ring--focus-within-except-active__lw0E3",
|
|
317
|
+
"outset-ring--focus-within-visible": "focus-module__outset-ring--focus-within-visible__xcs-5"
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
// packages/ui/src/button/button.tsx
|
|
321
|
+
import { jsx } from "react/jsx-runtime";
|
|
322
|
+
var Button = forwardRef(
|
|
323
|
+
function Button2({
|
|
324
|
+
tone = "brand",
|
|
325
|
+
variant = "solid",
|
|
326
|
+
size = "default",
|
|
327
|
+
className,
|
|
328
|
+
focusableWhenDisabled = true,
|
|
329
|
+
disabled,
|
|
330
|
+
loading,
|
|
331
|
+
loadingAnnouncement = __("Loading"),
|
|
332
|
+
children,
|
|
333
|
+
...props
|
|
334
|
+
}, ref) {
|
|
335
|
+
const mergedClassName = clsx(
|
|
336
|
+
resets_default["box-sizing"],
|
|
337
|
+
focus_default["outset-ring--focus-except-active"],
|
|
338
|
+
variant !== "unstyled" && style_default.button,
|
|
339
|
+
style_default[`is-${tone}`],
|
|
340
|
+
style_default[`is-${variant}`],
|
|
341
|
+
style_default[`is-${size}`],
|
|
342
|
+
loading && style_default["is-loading"],
|
|
343
|
+
className
|
|
344
|
+
);
|
|
345
|
+
useEffect(() => {
|
|
346
|
+
if (loading && loadingAnnouncement) {
|
|
347
|
+
speak(loadingAnnouncement);
|
|
348
|
+
}
|
|
349
|
+
}, [loading, loadingAnnouncement]);
|
|
350
|
+
return /* @__PURE__ */ jsx(
|
|
351
|
+
_Button,
|
|
352
|
+
{
|
|
353
|
+
ref,
|
|
354
|
+
className: mergedClassName,
|
|
355
|
+
focusableWhenDisabled,
|
|
356
|
+
disabled: disabled ?? loading,
|
|
357
|
+
...props,
|
|
358
|
+
children
|
|
359
|
+
}
|
|
360
|
+
);
|
|
361
|
+
}
|
|
362
|
+
);
|
|
363
|
+
export {
|
|
364
|
+
Button
|
|
365
|
+
};
|
|
366
|
+
//# sourceMappingURL=button.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/button/button.tsx", "../../src/button/style.module.css", "../../src/utils/css/resets.module.css", "../../src/utils/css/focus.module.css"],
|
|
4
|
+
"sourcesContent": ["import { Button as _Button } from '@base-ui/react/button';\nimport clsx from 'clsx';\nimport { speak } from '@wordpress/a11y';\nimport { forwardRef, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { type ButtonProps } from './types';\nimport styles from './style.module.css';\nimport resetStyles from '../utils/css/resets.module.css';\nimport focusStyles from '../utils/css/focus.module.css';\n\nexport const Button = forwardRef< HTMLButtonElement, ButtonProps >(\n\tfunction Button(\n\t\t{\n\t\t\ttone = 'brand',\n\t\t\tvariant = 'solid',\n\t\t\tsize = 'default',\n\t\t\tclassName,\n\t\t\tfocusableWhenDisabled = true,\n\t\t\tdisabled,\n\t\t\tloading,\n\t\t\tloadingAnnouncement = __( 'Loading' ),\n\t\t\tchildren,\n\t\t\t...props\n\t\t},\n\t\tref\n\t) {\n\t\tconst mergedClassName = clsx(\n\t\t\tresetStyles[ 'box-sizing' ],\n\t\t\tfocusStyles[ 'outset-ring--focus-except-active' ],\n\t\t\tvariant !== 'unstyled' && styles.button,\n\t\t\tstyles[ `is-${ tone }` ],\n\t\t\tstyles[ `is-${ variant }` ],\n\t\t\tstyles[ `is-${ size }` ],\n\t\t\tloading && styles[ 'is-loading' ],\n\t\t\tclassName\n\t\t);\n\n\t\t// Announce loading state to assistive technology\n\t\tuseEffect( () => {\n\t\t\tif ( loading && loadingAnnouncement ) {\n\t\t\t\tspeak( loadingAnnouncement );\n\t\t\t}\n\t\t}, [ loading, loadingAnnouncement ] );\n\n\t\treturn (\n\t\t\t<_Button\n\t\t\t\tref={ ref }\n\t\t\t\tclassName={ mergedClassName }\n\t\t\t\tfocusableWhenDisabled={ focusableWhenDisabled }\n\t\t\t\tdisabled={ disabled ?? loading }\n\t\t\t\t{ ...props }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</_Button>\n\t\t);\n\t}\n);\n", "const css = `@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;\n\n@layer wp-ui-components {\n\t.style-module__button__l7D8M,\n\t.style-module__is-unstyled__q7snL {\n\t\tappearance: none;\n\t\tpadding: 0;\n\t}\n\n\t.style-module__button__l7D8M {\n\t\t/* Internal variables */\n\t\t--wp-ui-button-font-weight: 499;\n\n\t\t--wp-ui-button-background-color: var(--wpds-color-bg-interactive-brand-strong);\n\t\t--wp-ui-button-background-color-active: var(--wpds-color-bg-interactive-brand-strong-active);\n\t\t--wp-ui-button-background-color-disabled: var(--wpds-color-bg-interactive-neutral-strong-disabled);\n\t\t--wp-ui-button-foreground-color: var(--wpds-color-fg-interactive-brand-strong);\n\t\t--wp-ui-button-foreground-color-active: var(--wpds-color-fg-interactive-brand-strong-active);\n\t\t--wp-ui-button-foreground-color-disabled: var(--wpds-color-fg-interactive-neutral-strong-disabled);\n\t\t--wp-ui-button-padding-inline: calc(3 * var(--wpds-dimension-base)); /* TODO: Create new interactive padding tokens */\n\t\t--wp-ui-button-height: 40px;\n\t\t--wp-ui-button-aspect-ratio: auto; /* Useful for overrides such as icon buttons */\n\t\t--wp-ui-button-font-size: var(--wpds-font-size-md);\n\n\t\t/* by default, borders have the same color as the background */\n\t\t--wp-ui-button-border-color: var(--wp-ui-button-background-color);\n\t\t--wp-ui-button-border-color-active: var(--wp-ui-button-background-color-active);\n\t\t--wp-ui-button-border-color-disabled: var(--wp-ui-button-background-color-disabled);\n\n\t\t/* Styles */\n\t\tposition: relative;\n\t\tdisplay: inline-flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tgap: calc(2 * var(--wpds-dimension-base)); /* TODO: Consider new interactive/control gap tokens */\n\t\taspect-ratio: var(--wp-ui-button-aspect-ratio);\n\t\theight: var(--wp-ui-button-height);\n\t\tpadding-inline: var(--wp-ui-button-padding-inline);\n\t\tborder-style: solid;\n\t\tborder-width: 1px;\n\t\tborder-color: var(--wp-ui-button-border-color);\n\t\tborder-radius: var(--wpds-border-radius-surface-sm);\n\t\tbackground-color: var(--wp-ui-button-background-color);\n\t\tbackground-clip: padding-box;\n\t\tfont-family: var(--wpds-font-family-body);\n\t\tfont-size: var(--wp-ui-button-font-size);\n\t\tfont-weight: var(--wp-ui-button-font-weight);\n\t\tline-height: var(--wpds-font-line-height-sm);\n\t\ttext-decoration: none;\n\t\tcolor: var(--wp-ui-button-foreground-color);\n\n\t\t@media not ( prefers-reduced-motion ) {\n\t\t\ttransition: color 0.1s ease-out;\n\n\t\t\t* {\n\t\t\t\ttransition: opacity 0.1s ease-out;\n\t\t\t}\n\t\t}\n\n\t\t/* Use pointer cursor for buttons that are links */\n\t\t&[href] {\n\t\t\tcursor: pointer;\n\t\t}\n\n\t\t/* Make sure that links rendered as children of \\`Button\\` use button styles */\n\t\t*[href] {\n\t\t\tcolor: inherit;\n\t\t\ttext-decoration: inherit;\n\t\t}\n\n\t\t/* States */\n\t\t&:not([aria-disabled=\"true\"]):is(:hover, :active, :focus) {\n\t\t\t/* hover/active/focus states apply when the button is not disabled. A non\n\t\t\tdisabled, loading button will have hover/active/focus styles */\n\t\t\t--wp-ui-button-background-color: var(--wp-ui-button-background-color-active);\n\t\t\t--wp-ui-button-foreground-color: var(--wp-ui-button-foreground-color-active);\n\t\t\t--wp-ui-button-border-color: var(--wp-ui-button-border-color-active);\n\t\t}\n\n\t\t&[aria-disabled=\"true\"]:not(.style-module__is-loading__kUtC8) {\n\t\t\t/* A loading button, even when disabled, won't \"look\" disabled */\n\t\t\t--wp-ui-button-background-color: var(--wp-ui-button-background-color-disabled);\n\t\t\t--wp-ui-button-foreground-color: var(--wp-ui-button-foreground-color-disabled);\n\t\t\t--wp-ui-button-border-color: var(--wp-ui-button-border-color-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/* Loading spinner \u2014 not animated and hidden unless in loading state */\n\t\t&::before {\n\t\t\tcontent: \"\";\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\tinset-inline-start: 50%;\n\t\t\ttransform: translate(-50%, -50%);\n\n\t\t\tdisplay: block;\n\t\t\tbox-sizing: border-box;\n\t\t\theight: var(--wp-ui-button-font-size);\n\t\t\taspect-ratio: 1;\n\n\t\t\tborder: var(--wpds-border-width-interactive-focus) solid;\n\t\t\tborder-block-start-color: var(--wp-ui-button-foreground-color);\n\t\t\tborder-inline-end-color: var(--wp-ui-button-foreground-color);\n\t\t\tborder-block-end-color: transparent;\n\t\t\tborder-inline-start-color: transparent;\n\t\t\tborder-radius: 50%;\n\n\t\t\tpointer-events: none;\n\t\t\topacity: 0;\n\n\t\t\t@media not ( prefers-reduced-motion ) {\n\t\t\t\ttransition: opacity 0.1s ease-out;\n\t\t\t}\n\t\t}\n\t}\n\n\t.style-module__is-small__kIIFR {\n\t\t--wp-ui-button-padding-inline: calc(2 * var(--wpds-dimension-base)); /* TODO: Create new interactive padding tokens */\n\t\t--wp-ui-button-height: 24px;\n\t}\n\n\t/* Variants (\\`tone\\` + \\`variant\\`) overrides compared to default styles */\n\n\t/* All outline buttons have a border */\n\t.style-module__is-brand__3UYMl {\n\t\t/* no need to redefine variables for .is-brand.is-solid as it's the default variant */\n\n\t\t/* Outline and minimal buttons use the same foreground color */\n\t\t&.style-module__is-outline__YtWne,\n\t\t&.style-module__is-minimal__rQYZo {\n\t\t\t--wp-ui-button-foreground-color: var(--wpds-color-fg-interactive-brand);\n\t\t\t--wp-ui-button-foreground-color-active: var(--wpds-color-fg-interactive-brand-active);\n\t\t\t--wp-ui-button-foreground-color-disabled: var(--wpds-color-fg-interactive-neutral-disabled);\n\t\t}\n\n\t\t&.style-module__is-outline__YtWne {\n\t\t\t--wp-ui-button-background-color: var(--wpds-color-bg-interactive-brand-weak);\n\t\t\t--wp-ui-button-background-color-active: var(--wpds-color-bg-interactive-brand-weak-active);\n\t\t\t--wp-ui-button-background-color-disabled: var(--wpds-color-bg-interactive-neutral-weak-disabled);\n\t\t\t--wp-ui-button-border-color: var(--wpds-color-stroke-interactive-brand);\n\t\t\t--wp-ui-button-border-color-active: var(--wpds-color-stroke-interactive-brand-active);\n\t\t\t--wp-ui-button-border-color-disabled: var(--wpds-color-stroke-interactive-neutral-disabled);\n\t\t}\n\n\t\t&.style-module__is-minimal__rQYZo {\n\t\t\t--wp-ui-button-background-color: var(--wpds-color-bg-interactive-brand-weak);\n\t\t\t--wp-ui-button-background-color-active: var(--wpds-color-bg-interactive-brand-weak-active);\n\t\t\t--wp-ui-button-background-color-disabled: var(--wpds-color-bg-interactive-neutral-weak-disabled);\n\t\t}\n\t}\n\n\t.style-module__is-neutral__5yKo- {\n\t\t&.style-module__is-solid__tQszW {\n\t\t\t--wp-ui-button-background-color: var(--wpds-color-bg-interactive-neutral-strong);\n\t\t\t--wp-ui-button-background-color-active: var(--wpds-color-bg-interactive-neutral-strong-active);\n\t\t\t--wp-ui-button-background-color-disabled: var(--wpds-color-bg-interactive-neutral-strong-disabled);\n\t\t\t--wp-ui-button-foreground-color: var(--wpds-color-fg-interactive-neutral-strong);\n\t\t\t--wp-ui-button-foreground-color-active: var(--wpds-color-fg-interactive-neutral-strong-active);\n\t\t\t--wp-ui-button-foreground-color-disabled: var(--wpds-color-fg-interactive-neutral-strong-disabled);\n\t\t}\n\n\t\t/* Outline and minimal buttons use the same foreground color */\n\t\t&.style-module__is-outline__YtWne,\n\t\t&.style-module__is-minimal__rQYZo {\n\t\t\t--wp-ui-button-foreground-color: var(--wpds-color-fg-interactive-neutral);\n\t\t\t--wp-ui-button-foreground-color-active: var(--wpds-color-fg-interactive-neutral-active);\n\t\t\t--wp-ui-button-foreground-color-disabled: var(--wpds-color-fg-interactive-neutral-disabled);\n\t\t}\n\n\t\t&.style-module__is-outline__YtWne {\n\t\t\t--wp-ui-button-background-color: var(--wpds-color-bg-interactive-neutral-weak);\n\t\t\t--wp-ui-button-background-color-active: var(--wpds-color-bg-interactive-neutral-weak-active);\n\t\t\t--wp-ui-button-background-color-disabled: var(--wpds-color-bg-interactive-neutral-weak-disabled);\n\t\t\t--wp-ui-button-border-color: var(--wpds-color-stroke-interactive-neutral);\n\t\t\t--wp-ui-button-border-color-active: var(--wpds-color-stroke-interactive-neutral-active);\n\t\t\t--wp-ui-button-border-color-disabled: var(--wpds-color-stroke-interactive-neutral-disabled);\n\t\t}\n\n\t\t&.style-module__is-minimal__rQYZo {\n\t\t\t--wp-ui-button-background-color: var(--wpds-color-bg-interactive-neutral-weak);\n\t\t\t--wp-ui-button-background-color-active: var(--wpds-color-bg-interactive-neutral-weak-active);\n\t\t\t--wp-ui-button-background-color-disabled: var(--wpds-color-bg-interactive-neutral-weak-disabled);\n\t\t}\n\t}\n\n\t.style-module__is-unstyled__q7snL {\n\t\tborder: none;\n\t\tbackground: none;\n\t}\n\n\t.style-module__is-compact__z1nPG {\n\t\t--wp-ui-button-height: 32px;\n\t}\n\n\t.style-module__is-loading__kUtC8 {\n\t\tcolor: transparent;\n\n\t\t* {\n\t\t\topacity: 0;\n\t\t}\n\n\t\t&::before {\n\t\t\ttransition-delay: 0.05s;\n\t\t\topacity: 1;\n\n\t\t\t@media not ( prefers-reduced-motion ) {\n\t\t\t\tanimation: style-module__loading-animation__Wh1T2 1s linear infinite;\n\t\t\t}\n\t\t}\n\t}\n\n\t[aria-pressed=\"true\"].style-module__is-minimal__rQYZo.style-module__is-neutral__5yKo- {\n\t\t--wp-ui-button-background-color: var(--wpds-color-bg-interactive-neutral-strong);\n\t\t--wp-ui-button-background-color-active: var(--wpds-color-bg-interactive-neutral-strong);\n\t\t--wp-ui-button-foreground-color: var(--wpds-color-fg-interactive-neutral-strong);\n\t\t--wp-ui-button-foreground-color-active: var(--wpds-color-fg-interactive-neutral-strong);\n\t}\n}\n\n@keyframes style-module__loading-animation__Wh1T2 {\n\t0% {\n\t\ttransform: translate(-50%, -50%) rotate(0deg);\n\t}\n\n\t100% {\n\t\ttransform: translate(-50%, -50%) rotate(360deg);\n\t}\n}\n`;\ndocument.head\n .appendChild(document.createElement(\"style\"))\n .appendChild(document.createTextNode(css));\nexport {css};\nexport default {\n \"button\": \"style-module__button__l7D8M\",\n \"is-unstyled\": \"style-module__is-unstyled__q7snL\",\n \"is-loading\": \"style-module__is-loading__kUtC8\",\n \"is-small\": \"style-module__is-small__kIIFR\",\n \"is-brand\": \"style-module__is-brand__3UYMl\",\n \"is-outline\": \"style-module__is-outline__YtWne\",\n \"is-minimal\": \"style-module__is-minimal__rQYZo\",\n \"is-neutral\": \"style-module__is-neutral__5yKo-\",\n \"is-solid\": \"style-module__is-solid__tQszW\",\n \"is-compact\": \"style-module__is-compact__z1nPG\",\n \"loading-animation\": \"style-module__loading-animation__Wh1T2\"\n};", "const css = `@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;\n\n@layer wp-ui-utilities {\n\t.resets-module__box-sizing__M2zT5 {\n\t\tbox-sizing: border-box;\n\n\t\t*,\n\t\t*::before,\n\t\t*::after {\n\t\t\tbox-sizing: inherit;\n\t\t}\n\t}\n}\n`;\ndocument.head\n .appendChild(document.createElement(\"style\"))\n .appendChild(document.createTextNode(css));\nexport {css};\nexport default {\n \"box-sizing\": \"resets-module__box-sizing__M2zT5\"\n};", "const css = `@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;\n\n@layer wp-ui-utilities {\n\t.focus-module__outset-ring--focus__COii5,\n\t.focus-module__outset-ring--focus-except-active__4lsr3,\n\t.focus-module__outset-ring--focus-visible__0FQby,\n\t.focus-module__outset-ring--focus-within__zYPfw,\n\t.focus-module__outset-ring--focus-within-except-active__lw0E3,\n\t.focus-module__outset-ring--focus-within-visible__xcs-5 {\n\t\t@media not ( prefers-reduced-motion ) {\n\t\t\ttransition: outline 0.1s ease-out;\n\t\t}\n\n\t\t/* Outline width must be kept at 0 even with a transparent color,\n\t\tor else the outline will be visible in forced-colors mode. */\n\t\toutline-width: 0;\n\t\toutline-style: solid;\n\t\toutline-color: transparent;\n\t\toutline-offset: 1px;\n\t}\n\n\t.focus-module__outset-ring--focus__COii5:focus,\n\t.focus-module__outset-ring--focus-except-active__4lsr3:focus:not(:active),\n\t.focus-module__outset-ring--focus-visible__0FQby:focus-visible,\n\t.focus-module__outset-ring--focus-within__zYPfw:focus-within,\n\t.focus-module__outset-ring--focus-within-except-active__lw0E3:focus-within:not(:has(:active)),\n\t.focus-module__outset-ring--focus-within-visible__xcs-5:focus-within:has(:focus-visible) {\n\t\toutline-width: var(--wpds-border-width-interactive-focus);\n\t\toutline-color: var(--wpds-color-stroke-focus-brand);\n\t}\n}\n`;\ndocument.head\n .appendChild(document.createElement(\"style\"))\n .appendChild(document.createTextNode(css));\nexport {css};\nexport default {\n \"outset-ring--focus\": \"focus-module__outset-ring--focus__COii5\",\n \"outset-ring--focus-except-active\": \"focus-module__outset-ring--focus-except-active__4lsr3\",\n \"outset-ring--focus-visible\": \"focus-module__outset-ring--focus-visible__0FQby\",\n \"outset-ring--focus-within\": \"focus-module__outset-ring--focus-within__zYPfw\",\n \"outset-ring--focus-within-except-active\": \"focus-module__outset-ring--focus-within-except-active__lw0E3\",\n \"outset-ring--focus-within-visible\": \"focus-module__outset-ring--focus-within-visible__xcs-5\"\n};"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,UAAU,eAAe;AAClC,OAAO,UAAU;AACjB,SAAS,aAAa;AACtB,SAAS,YAAY,iBAAiB;AACtC,SAAS,UAAU;;;ACJnB,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;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;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;AAyOZ,SAAS,KACJ,YAAY,SAAS,cAAc,OAAO,CAAC,EAC3C,YAAY,SAAS,eAAe,GAAG,CAAC;AAE7C,IAAO,gBAAQ;AAAA,EACb,UAAU;AAAA,EACV,eAAe;AAAA,EACf,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,qBAAqB;AACvB;;;ACzPA,IAAMA,OAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcZ,SAAS,KACJ,YAAY,SAAS,cAAc,OAAO,CAAC,EAC3C,YAAY,SAAS,eAAeA,IAAG,CAAC;AAE7C,IAAO,iBAAQ;AAAA,EACb,cAAc;AAChB;;;ACpBA,IAAMC,OAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgCZ,SAAS,KACJ,YAAY,SAAS,cAAc,OAAO,CAAC,EAC3C,YAAY,SAAS,eAAeA,IAAG,CAAC;AAE7C,IAAO,gBAAQ;AAAA,EACb,sBAAsB;AAAA,EACtB,oCAAoC;AAAA,EACpC,8BAA8B;AAAA,EAC9B,6BAA6B;AAAA,EAC7B,2CAA2C;AAAA,EAC3C,qCAAqC;AACvC;;;AHEG;AAnCI,IAAM,SAAS;AAAA,EACrB,SAASC,QACR;AAAA,IACC,OAAO;AAAA,IACP,UAAU;AAAA,IACV,OAAO;AAAA,IACP;AAAA,IACA,wBAAwB;AAAA,IACxB;AAAA,IACA;AAAA,IACA,sBAAsB,GAAI,SAAU;AAAA,IACpC;AAAA,IACA,GAAG;AAAA,EACJ,GACA,KACC;AACD,UAAM,kBAAkB;AAAA,MACvB,eAAa,YAAa;AAAA,MAC1B,cAAa,kCAAmC;AAAA,MAChD,YAAY,cAAc,cAAO;AAAA,MACjC,cAAQ,MAAO,IAAK,EAAG;AAAA,MACvB,cAAQ,MAAO,OAAQ,EAAG;AAAA,MAC1B,cAAQ,MAAO,IAAK,EAAG;AAAA,MACvB,WAAW,cAAQ,YAAa;AAAA,MAChC;AAAA,IACD;AAGA,cAAW,MAAM;AAChB,UAAK,WAAW,qBAAsB;AACrC,cAAO,mBAAoB;AAAA,MAC5B;AAAA,IACD,GAAG,CAAE,SAAS,mBAAoB,CAAE;AAEpC,WACC;AAAA,MAAC;AAAA;AAAA,QACA;AAAA,QACA,WAAY;AAAA,QACZ;AAAA,QACA,UAAW,YAAY;AAAA,QACrB,GAAG;AAAA,QAEH;AAAA;AAAA,IACH;AAAA,EAEF;AACD;",
|
|
6
|
+
"names": ["css", "css", "Button"]
|
|
7
|
+
}
|