@pithyjs/ui-kit 0.1.0-beta.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/LICENSE +21 -0
- package/dist/animation/animate-in.d.ts +35 -0
- package/dist/animation/animate-in.d.ts.map +1 -0
- package/dist/animation/animate-in.js +71 -0
- package/dist/animation/animate-in.js.map +1 -0
- package/dist/atoms/actions/_icon-control.scss +53 -0
- package/dist/atoms/actions/button/Button.d.ts +93 -0
- package/dist/atoms/actions/button/Button.d.ts.map +1 -0
- package/dist/atoms/actions/button/Button.js +332 -0
- package/dist/atoms/actions/button/Button.js.map +1 -0
- package/dist/atoms/actions/button/button.scss +342 -0
- package/dist/atoms/actions/icon-button/IconButton.d.ts +47 -0
- package/dist/atoms/actions/icon-button/IconButton.d.ts.map +1 -0
- package/dist/atoms/actions/icon-button/IconButton.js +81 -0
- package/dist/atoms/actions/icon-button/IconButton.js.map +1 -0
- package/dist/atoms/actions/icon-button/icon-button.scss +20 -0
- package/dist/atoms/actions/icon-group/IconGroup.d.ts +60 -0
- package/dist/atoms/actions/icon-group/IconGroup.d.ts.map +1 -0
- package/dist/atoms/actions/icon-group/IconGroup.js +191 -0
- package/dist/atoms/actions/icon-group/IconGroup.js.map +1 -0
- package/dist/atoms/actions/icon-group/icon-group.scss +36 -0
- package/dist/atoms/actions/segmented-control/SegmentedControl.d.ts +49 -0
- package/dist/atoms/actions/segmented-control/SegmentedControl.d.ts.map +1 -0
- package/dist/atoms/actions/segmented-control/SegmentedControl.js +107 -0
- package/dist/atoms/actions/segmented-control/SegmentedControl.js.map +1 -0
- package/dist/atoms/actions/segmented-control/segmented-control.scss +90 -0
- package/dist/atoms/content/_mixins.scss +79 -0
- package/dist/atoms/content/action-tile/ActionTile.d.ts +27 -0
- package/dist/atoms/content/action-tile/ActionTile.d.ts.map +1 -0
- package/dist/atoms/content/action-tile/ActionTile.js +98 -0
- package/dist/atoms/content/action-tile/ActionTile.js.map +1 -0
- package/dist/atoms/content/action-tile/action-tile.scss +150 -0
- package/dist/atoms/content/badge/Badge.d.ts +57 -0
- package/dist/atoms/content/badge/Badge.d.ts.map +1 -0
- package/dist/atoms/content/badge/Badge.js +177 -0
- package/dist/atoms/content/badge/Badge.js.map +1 -0
- package/dist/atoms/content/badge/badge.scss +198 -0
- package/dist/atoms/content/heading/Heading.d.ts +53 -0
- package/dist/atoms/content/heading/Heading.d.ts.map +1 -0
- package/dist/atoms/content/heading/Heading.js +142 -0
- package/dist/atoms/content/heading/Heading.js.map +1 -0
- package/dist/atoms/content/heading/heading.scss +43 -0
- package/dist/atoms/content/icon/Icon.d.ts +68 -0
- package/dist/atoms/content/icon/Icon.d.ts.map +1 -0
- package/dist/atoms/content/icon/Icon.js +137 -0
- package/dist/atoms/content/icon/Icon.js.map +1 -0
- package/dist/atoms/content/icon/icon.scss +66 -0
- package/dist/atoms/content/icon/resolveIconSvg.d.ts +21 -0
- package/dist/atoms/content/icon/resolveIconSvg.d.ts.map +1 -0
- package/dist/atoms/content/icon/resolveIconSvg.js +73 -0
- package/dist/atoms/content/icon/resolveIconSvg.js.map +1 -0
- package/dist/atoms/content/image/Image.d.ts +81 -0
- package/dist/atoms/content/image/Image.d.ts.map +1 -0
- package/dist/atoms/content/image/Image.js +293 -0
- package/dist/atoms/content/image/Image.js.map +1 -0
- package/dist/atoms/content/image/image.scss +77 -0
- package/dist/atoms/content/text/Text.d.ts +58 -0
- package/dist/atoms/content/text/Text.d.ts.map +1 -0
- package/dist/atoms/content/text/Text.js +158 -0
- package/dist/atoms/content/text/Text.js.map +1 -0
- package/dist/atoms/content/text/text.scss +98 -0
- package/dist/atoms/content/tile/Tile.d.ts +66 -0
- package/dist/atoms/content/tile/Tile.d.ts.map +1 -0
- package/dist/atoms/content/tile/Tile.js +125 -0
- package/dist/atoms/content/tile/Tile.js.map +1 -0
- package/dist/atoms/content/tile/tile.scss +122 -0
- package/dist/atoms/feedback/tooltip/Tooltip.d.ts +44 -0
- package/dist/atoms/feedback/tooltip/Tooltip.d.ts.map +1 -0
- package/dist/atoms/feedback/tooltip/Tooltip.js +121 -0
- package/dist/atoms/feedback/tooltip/Tooltip.js.map +1 -0
- package/dist/atoms/feedback/tooltip/tooltip.scss +96 -0
- package/dist/atoms/forms/checkbox/Checkbox.d.ts +49 -0
- package/dist/atoms/forms/checkbox/Checkbox.d.ts.map +1 -0
- package/dist/atoms/forms/checkbox/Checkbox.js +269 -0
- package/dist/atoms/forms/checkbox/Checkbox.js.map +1 -0
- package/dist/atoms/forms/checkbox/CheckboxGroup.d.ts +50 -0
- package/dist/atoms/forms/checkbox/CheckboxGroup.d.ts.map +1 -0
- package/dist/atoms/forms/checkbox/CheckboxGroup.js +132 -0
- package/dist/atoms/forms/checkbox/CheckboxGroup.js.map +1 -0
- package/dist/atoms/forms/checkbox/checkbox.scss +506 -0
- package/dist/atoms/forms/file-picker/FilePicker.d.ts +23 -0
- package/dist/atoms/forms/file-picker/FilePicker.d.ts.map +1 -0
- package/dist/atoms/forms/file-picker/FilePicker.js +103 -0
- package/dist/atoms/forms/file-picker/FilePicker.js.map +1 -0
- package/dist/atoms/forms/file-picker/file-picker.scss +84 -0
- package/dist/atoms/forms/form-field/FormField.d.ts +39 -0
- package/dist/atoms/forms/form-field/FormField.d.ts.map +1 -0
- package/dist/atoms/forms/form-field/FormField.js +139 -0
- package/dist/atoms/forms/form-field/FormField.js.map +1 -0
- package/dist/atoms/forms/form-field/form-field.scss +46 -0
- package/dist/atoms/forms/input/Input.d.ts +81 -0
- package/dist/atoms/forms/input/Input.d.ts.map +1 -0
- package/dist/atoms/forms/input/Input.js +417 -0
- package/dist/atoms/forms/input/Input.js.map +1 -0
- package/dist/atoms/forms/input/input.scss +547 -0
- package/dist/atoms/forms/radio/Radio.d.ts +54 -0
- package/dist/atoms/forms/radio/Radio.d.ts.map +1 -0
- package/dist/atoms/forms/radio/Radio.js +278 -0
- package/dist/atoms/forms/radio/Radio.js.map +1 -0
- package/dist/atoms/forms/radio/RadioGroup.d.ts +54 -0
- package/dist/atoms/forms/radio/RadioGroup.d.ts.map +1 -0
- package/dist/atoms/forms/radio/RadioGroup.js +137 -0
- package/dist/atoms/forms/radio/RadioGroup.js.map +1 -0
- package/dist/atoms/forms/radio/radio.scss +459 -0
- package/dist/atoms/forms/select/Select.d.ts +57 -0
- package/dist/atoms/forms/select/Select.d.ts.map +1 -0
- package/dist/atoms/forms/select/Select.js +457 -0
- package/dist/atoms/forms/select/Select.js.map +1 -0
- package/dist/atoms/forms/select/select-dropdown.d.ts +49 -0
- package/dist/atoms/forms/select/select-dropdown.d.ts.map +1 -0
- package/dist/atoms/forms/select/select-dropdown.js +305 -0
- package/dist/atoms/forms/select/select-dropdown.js.map +1 -0
- package/dist/atoms/forms/select/select-keyboard.d.ts +14 -0
- package/dist/atoms/forms/select/select-keyboard.d.ts.map +1 -0
- package/dist/atoms/forms/select/select-keyboard.js +182 -0
- package/dist/atoms/forms/select/select-keyboard.js.map +1 -0
- package/dist/atoms/forms/select/select.scss +630 -0
- package/dist/atoms/forms/textarea/Textarea.d.ts +69 -0
- package/dist/atoms/forms/textarea/Textarea.d.ts.map +1 -0
- package/dist/atoms/forms/textarea/Textarea.js +394 -0
- package/dist/atoms/forms/textarea/Textarea.js.map +1 -0
- package/dist/atoms/forms/textarea/textarea.scss +486 -0
- package/dist/atoms/forms/toggle/Toggle.d.ts +47 -0
- package/dist/atoms/forms/toggle/Toggle.d.ts.map +1 -0
- package/dist/atoms/forms/toggle/Toggle.js +243 -0
- package/dist/atoms/forms/toggle/Toggle.js.map +1 -0
- package/dist/atoms/forms/toggle/toggle.scss +561 -0
- package/dist/compiler.d.ts +7 -0
- package/dist/compiler.d.ts.map +1 -0
- package/dist/compiler.js +18 -0
- package/dist/compiler.js.map +1 -0
- package/dist/icons/index.d.ts +14 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +14 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/icons/registry.d.ts +65 -0
- package/dist/icons/registry.d.ts.map +1 -0
- package/dist/icons/registry.js +126 -0
- package/dist/icons/registry.js.map +1 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +64 -0
- package/dist/index.js.map +1 -0
- package/dist/layout/Grid.d.ts +78 -0
- package/dist/layout/Grid.d.ts.map +1 -0
- package/dist/layout/Grid.js +272 -0
- package/dist/layout/Grid.js.map +1 -0
- package/dist/layout/GridItem.d.ts +52 -0
- package/dist/layout/GridItem.d.ts.map +1 -0
- package/dist/layout/GridItem.js +99 -0
- package/dist/layout/GridItem.js.map +1 -0
- package/dist/layout/PageSection.d.ts +43 -0
- package/dist/layout/PageSection.d.ts.map +1 -0
- package/dist/layout/PageSection.js +75 -0
- package/dist/layout/PageSection.js.map +1 -0
- package/dist/layout/SmartContainer.d.ts +66 -0
- package/dist/layout/SmartContainer.d.ts.map +1 -0
- package/dist/layout/SmartContainer.js +194 -0
- package/dist/layout/SmartContainer.js.map +1 -0
- package/dist/layout/Stack.d.ts +65 -0
- package/dist/layout/Stack.d.ts.map +1 -0
- package/dist/layout/Stack.js +114 -0
- package/dist/layout/Stack.js.map +1 -0
- package/dist/organisms/content/Card.d.ts +93 -0
- package/dist/organisms/content/Card.d.ts.map +1 -0
- package/dist/organisms/content/Card.js +353 -0
- package/dist/organisms/content/Card.js.map +1 -0
- package/dist/organisms/content/_card-horizontal.scss +88 -0
- package/dist/organisms/content/_card-link.scss +49 -0
- package/dist/organisms/content/_card-overlay.scss +91 -0
- package/dist/organisms/content/_card-root.scss +99 -0
- package/dist/organisms/content/_card-slots.scss +143 -0
- package/dist/organisms/content/_card-states.scss +166 -0
- package/dist/organisms/content/_card-tokens.scss +22 -0
- package/dist/organisms/content/_card-variants.scss +31 -0
- package/dist/organisms/content/card.scss +15 -0
- package/dist/organisms/feedback/Modal.d.ts +39 -0
- package/dist/organisms/feedback/Modal.d.ts.map +1 -0
- package/dist/organisms/feedback/Modal.js +120 -0
- package/dist/organisms/feedback/Modal.js.map +1 -0
- package/dist/organisms/feedback/Popover.d.ts +30 -0
- package/dist/organisms/feedback/Popover.d.ts.map +1 -0
- package/dist/organisms/feedback/Popover.js +151 -0
- package/dist/organisms/feedback/Popover.js.map +1 -0
- package/dist/organisms/feedback/modal.scss +66 -0
- package/dist/organisms/feedback/popover.scss +27 -0
- package/dist/organisms/forms/DynamicForm.d.ts +118 -0
- package/dist/organisms/forms/DynamicForm.d.ts.map +1 -0
- package/dist/organisms/forms/DynamicForm.js +546 -0
- package/dist/organisms/forms/DynamicForm.js.map +1 -0
- package/dist/organisms/forms/Form.d.ts +62 -0
- package/dist/organisms/forms/Form.d.ts.map +1 -0
- package/dist/organisms/forms/Form.js +131 -0
- package/dist/organisms/forms/Form.js.map +1 -0
- package/dist/organisms/forms/dynamic-form.scss +91 -0
- package/dist/organisms/forms/form-helpers.d.ts +21 -0
- package/dist/organisms/forms/form-helpers.d.ts.map +1 -0
- package/dist/organisms/forms/form-helpers.js +57 -0
- package/dist/organisms/forms/form-helpers.js.map +1 -0
- package/dist/organisms/forms/form-state.d.ts +66 -0
- package/dist/organisms/forms/form-state.d.ts.map +1 -0
- package/dist/organisms/forms/form-state.js +156 -0
- package/dist/organisms/forms/form-state.js.map +1 -0
- package/dist/organisms/forms/form.scss +23 -0
- package/dist/organisms/forms/validation.d.ts +32 -0
- package/dist/organisms/forms/validation.d.ts.map +1 -0
- package/dist/organisms/forms/validation.js +118 -0
- package/dist/organisms/forms/validation.js.map +1 -0
- package/dist/organisms/navigation/Navbar.d.ts +66 -0
- package/dist/organisms/navigation/Navbar.d.ts.map +1 -0
- package/dist/organisms/navigation/Navbar.js +881 -0
- package/dist/organisms/navigation/Navbar.js.map +1 -0
- package/dist/organisms/navigation/_navbar-announcement.scss +62 -0
- package/dist/organisms/navigation/_navbar-brand.scss +69 -0
- package/dist/organisms/navigation/_navbar-container.scss +37 -0
- package/dist/organisms/navigation/_navbar-desktop.scss +116 -0
- package/dist/organisms/navigation/_navbar-drawer.scss +97 -0
- package/dist/organisms/navigation/_navbar-links.scss +143 -0
- package/dist/organisms/navigation/_navbar-menu.scss +193 -0
- package/dist/organisms/navigation/_navbar-root.scss +107 -0
- package/dist/organisms/navigation/_navbar-search.scss +83 -0
- package/dist/organisms/navigation/_navbar-toggle.scss +91 -0
- package/dist/organisms/navigation/_navbar-tokens.scss +15 -0
- package/dist/organisms/navigation/navbar.scss +17 -0
- package/dist/registry/categories.d.ts +6 -0
- package/dist/registry/categories.d.ts.map +1 -0
- package/dist/registry/categories.js +13 -0
- package/dist/registry/categories.js.map +1 -0
- package/dist/registry/components.d.ts +5 -0
- package/dist/registry/components.d.ts.map +1 -0
- package/dist/registry/components.js +95 -0
- package/dist/registry/components.js.map +1 -0
- package/dist/registry/index.d.ts +59 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +79 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/levels.d.ts +6 -0
- package/dist/registry/levels.d.ts.map +1 -0
- package/dist/registry/levels.js +9 -0
- package/dist/registry/levels.js.map +1 -0
- package/dist/registry/registry-meta-types.d.ts +67 -0
- package/dist/registry/registry-meta-types.d.ts.map +1 -0
- package/dist/registry/registry-meta-types.js +6 -0
- package/dist/registry/registry-meta-types.js.map +1 -0
- package/dist/registry/registry-meta.d.ts +5 -0
- package/dist/registry/registry-meta.d.ts.map +1 -0
- package/dist/registry/registry-meta.js +731 -0
- package/dist/registry/registry-meta.js.map +1 -0
- package/dist/registry/renderer.d.ts +69 -0
- package/dist/registry/renderer.d.ts.map +1 -0
- package/dist/registry/renderer.js +311 -0
- package/dist/registry/renderer.js.map +1 -0
- package/dist/sections/_section-base.scss +204 -0
- package/dist/sections/contact/ContactSection.d.ts +55 -0
- package/dist/sections/contact/ContactSection.d.ts.map +1 -0
- package/dist/sections/contact/ContactSection.js +142 -0
- package/dist/sections/contact/ContactSection.js.map +1 -0
- package/dist/sections/contact/contact-section.scss +142 -0
- package/dist/sections/cta/CTASection.d.ts +52 -0
- package/dist/sections/cta/CTASection.d.ts.map +1 -0
- package/dist/sections/cta/CTASection.js +130 -0
- package/dist/sections/cta/CTASection.js.map +1 -0
- package/dist/sections/cta/cta-section.scss +131 -0
- package/dist/sections/entrance.d.ts +29 -0
- package/dist/sections/entrance.d.ts.map +1 -0
- package/dist/sections/entrance.js +69 -0
- package/dist/sections/entrance.js.map +1 -0
- package/dist/sections/features/FeaturesSection.d.ts +54 -0
- package/dist/sections/features/FeaturesSection.d.ts.map +1 -0
- package/dist/sections/features/FeaturesSection.js +139 -0
- package/dist/sections/features/FeaturesSection.js.map +1 -0
- package/dist/sections/features/features-section.scss +140 -0
- package/dist/sections/footer/FooterSection.d.ts +53 -0
- package/dist/sections/footer/FooterSection.d.ts.map +1 -0
- package/dist/sections/footer/FooterSection.js +147 -0
- package/dist/sections/footer/FooterSection.js.map +1 -0
- package/dist/sections/footer/footer-section.scss +131 -0
- package/dist/sections/hero/HeroSection.d.ts +66 -0
- package/dist/sections/hero/HeroSection.d.ts.map +1 -0
- package/dist/sections/hero/HeroSection.js +156 -0
- package/dist/sections/hero/HeroSection.js.map +1 -0
- package/dist/sections/hero/hero-section.scss +211 -0
- package/dist/shared/_form-animations.scss +283 -0
- package/dist/shared/_media-fit.scss +63 -0
- package/dist/shared/_mixins.scss +69 -0
- package/dist/shared/_tokens.scss +116 -0
- package/dist/shared/badge.d.ts +15 -0
- package/dist/shared/badge.d.ts.map +1 -0
- package/dist/shared/badge.js +15 -0
- package/dist/shared/badge.js.map +1 -0
- package/dist/shared/button.d.ts +22 -0
- package/dist/shared/button.d.ts.map +1 -0
- package/dist/shared/button.js +22 -0
- package/dist/shared/button.js.map +1 -0
- package/dist/shared/card.d.ts +21 -0
- package/dist/shared/card.d.ts.map +1 -0
- package/dist/shared/card.js +38 -0
- package/dist/shared/card.js.map +1 -0
- package/dist/shared/checkbox.d.ts +10 -0
- package/dist/shared/checkbox.d.ts.map +1 -0
- package/dist/shared/checkbox.js +28 -0
- package/dist/shared/checkbox.js.map +1 -0
- package/dist/shared/clickable.d.ts +34 -0
- package/dist/shared/clickable.d.ts.map +1 -0
- package/dist/shared/clickable.js +54 -0
- package/dist/shared/clickable.js.map +1 -0
- package/dist/shared/common.d.ts +31 -0
- package/dist/shared/common.d.ts.map +1 -0
- package/dist/shared/common.js +92 -0
- package/dist/shared/common.js.map +1 -0
- package/dist/shared/entrance-config.d.ts +46 -0
- package/dist/shared/entrance-config.d.ts.map +1 -0
- package/dist/shared/entrance-config.js +54 -0
- package/dist/shared/entrance-config.js.map +1 -0
- package/dist/shared/focusable.d.ts +8 -0
- package/dist/shared/focusable.d.ts.map +1 -0
- package/dist/shared/focusable.js +17 -0
- package/dist/shared/focusable.js.map +1 -0
- package/dist/shared/form-elements.d.ts +57 -0
- package/dist/shared/form-elements.d.ts.map +1 -0
- package/dist/shared/form-elements.js +95 -0
- package/dist/shared/form-elements.js.map +1 -0
- package/dist/shared/form-state.d.ts +52 -0
- package/dist/shared/form-state.d.ts.map +1 -0
- package/dist/shared/form-state.js +151 -0
- package/dist/shared/form-state.js.map +1 -0
- package/dist/shared/grid.d.ts +21 -0
- package/dist/shared/grid.d.ts.map +1 -0
- package/dist/shared/grid.js +187 -0
- package/dist/shared/grid.js.map +1 -0
- package/dist/shared/icon-slot.d.ts +22 -0
- package/dist/shared/icon-slot.d.ts.map +1 -0
- package/dist/shared/icon-slot.js +38 -0
- package/dist/shared/icon-slot.js.map +1 -0
- package/dist/shared/icon.d.ts +17 -0
- package/dist/shared/icon.d.ts.map +1 -0
- package/dist/shared/icon.js +18 -0
- package/dist/shared/icon.js.map +1 -0
- package/dist/shared/icons.d.ts +19 -0
- package/dist/shared/icons.d.ts.map +1 -0
- package/dist/shared/icons.js +22 -0
- package/dist/shared/icons.js.map +1 -0
- package/dist/shared/image.d.ts +35 -0
- package/dist/shared/image.d.ts.map +1 -0
- package/dist/shared/image.js +46 -0
- package/dist/shared/image.js.map +1 -0
- package/dist/shared/input.d.ts +12 -0
- package/dist/shared/input.d.ts.map +1 -0
- package/dist/shared/input.js +29 -0
- package/dist/shared/input.js.map +1 -0
- package/dist/shared/radio.d.ts +10 -0
- package/dist/shared/radio.d.ts.map +1 -0
- package/dist/shared/radio.js +29 -0
- package/dist/shared/radio.js.map +1 -0
- package/dist/shared/reconcile-list.d.ts +37 -0
- package/dist/shared/reconcile-list.d.ts.map +1 -0
- package/dist/shared/reconcile-list.js +95 -0
- package/dist/shared/reconcile-list.js.map +1 -0
- package/dist/shared/section.d.ts +23 -0
- package/dist/shared/section.d.ts.map +1 -0
- package/dist/shared/section.js +65 -0
- package/dist/shared/section.js.map +1 -0
- package/dist/shared/segmented.d.ts +17 -0
- package/dist/shared/segmented.d.ts.map +1 -0
- package/dist/shared/segmented.js +53 -0
- package/dist/shared/segmented.js.map +1 -0
- package/dist/shared/select.d.ts +18 -0
- package/dist/shared/select.d.ts.map +1 -0
- package/dist/shared/select.js +14 -0
- package/dist/shared/select.js.map +1 -0
- package/dist/shared/slots.d.ts +11 -0
- package/dist/shared/slots.d.ts.map +1 -0
- package/dist/shared/slots.js +33 -0
- package/dist/shared/slots.js.map +1 -0
- package/dist/shared/smart-container.d.ts +19 -0
- package/dist/shared/smart-container.d.ts.map +1 -0
- package/dist/shared/smart-container.js +29 -0
- package/dist/shared/smart-container.js.map +1 -0
- package/dist/shared/text.d.ts +29 -0
- package/dist/shared/text.d.ts.map +1 -0
- package/dist/shared/text.js +72 -0
- package/dist/shared/text.js.map +1 -0
- package/dist/shared/textarea.d.ts +6 -0
- package/dist/shared/textarea.d.ts.map +1 -0
- package/dist/shared/textarea.js +18 -0
- package/dist/shared/textarea.js.map +1 -0
- package/dist/shared/toggle.d.ts +6 -0
- package/dist/shared/toggle.d.ts.map +1 -0
- package/dist/shared/toggle.js +19 -0
- package/dist/shared/toggle.js.map +1 -0
- package/dist/shared/types.d.ts +41 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.js +20 -0
- package/dist/shared/types.js.map +1 -0
- package/dist/structural/ErrorBoundary.d.ts +18 -0
- package/dist/structural/ErrorBoundary.d.ts.map +1 -0
- package/dist/structural/ErrorBoundary.js +119 -0
- package/dist/structural/ErrorBoundary.js.map +1 -0
- package/dist/structural/For.d.ts +37 -0
- package/dist/structural/For.d.ts.map +1 -0
- package/dist/structural/For.js +129 -0
- package/dist/structural/For.js.map +1 -0
- package/dist/structural/Lazy.d.ts +43 -0
- package/dist/structural/Lazy.d.ts.map +1 -0
- package/dist/structural/Lazy.js +47 -0
- package/dist/structural/Lazy.js.map +1 -0
- package/dist/structural/NavLink.d.ts +45 -0
- package/dist/structural/NavLink.d.ts.map +1 -0
- package/dist/structural/NavLink.js +37 -0
- package/dist/structural/NavLink.js.map +1 -0
- package/dist/structural/Show.d.ts +35 -0
- package/dist/structural/Show.d.ts.map +1 -0
- package/dist/structural/Show.js +34 -0
- package/dist/structural/Show.js.map +1 -0
- package/dist/structural/nav-link.scss +54 -0
- package/dist/styles/index.scss +58 -0
- package/package.json +64 -0
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
/// Input component styles
|
|
2
|
+
/// Wrapper div pattern with floating label, error shake, success state,
|
|
3
|
+
/// character counter, clear button, loading spinner, and polished prefix/suffix.
|
|
4
|
+
///
|
|
5
|
+
/// Uses stable border-width to prevent layout shift on hover/focus.
|
|
6
|
+
/// State changes only modify border-color; focus emphasis via box-shadow ring().
|
|
7
|
+
///
|
|
8
|
+
/// @group atoms/forms
|
|
9
|
+
|
|
10
|
+
@use 'sass:map';
|
|
11
|
+
@use '@pithyjs/design-system/a11y/styles/mixins' as a11y;
|
|
12
|
+
@use '@pithyjs/design-system/borders/styles/tokens' as borders;
|
|
13
|
+
@use '../../../shared/tokens' as shared;
|
|
14
|
+
@use '../../../shared/form-animations' as form-anim;
|
|
15
|
+
|
|
16
|
+
// ============================================
|
|
17
|
+
// Base wrapper
|
|
18
|
+
// ============================================
|
|
19
|
+
|
|
20
|
+
.ui-input {
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: var(--space-xs);
|
|
24
|
+
cursor: text;
|
|
25
|
+
position: relative;
|
|
26
|
+
inline-size: 100%;
|
|
27
|
+
--_scroll-bg: var(--color-surface);
|
|
28
|
+
background-color: var(--_scroll-bg);
|
|
29
|
+
|
|
30
|
+
// Stable border — width never changes across states to prevent layout shift.
|
|
31
|
+
border: borders.border(control);
|
|
32
|
+
|
|
33
|
+
// Motion-safe transitions — entrance easing on shadow for smooth focus ring
|
|
34
|
+
@include a11y.motion-safe {
|
|
35
|
+
transition:
|
|
36
|
+
var(--motion-transition-border),
|
|
37
|
+
box-shadow var(--motion-duration-normal) var(--motion-easing-entrance),
|
|
38
|
+
var(--motion-transition-color),
|
|
39
|
+
background-color var(--motion-duration-fast) var(--motion-easing-standard);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Caret color, error background wash, adaptive selection color
|
|
43
|
+
@include form-anim.form-field-polish('.ui-input-field');
|
|
44
|
+
|
|
45
|
+
// Spinner inherits error/success color
|
|
46
|
+
@include form-anim.form-spinner-adaptive('.ui-input-loading');
|
|
47
|
+
|
|
48
|
+
// Required asterisk on floating label
|
|
49
|
+
@include form-anim.form-required-indicator('.ui-input-label');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// ============================================
|
|
53
|
+
// Inner input — fully reset
|
|
54
|
+
// ============================================
|
|
55
|
+
|
|
56
|
+
.ui-input-field {
|
|
57
|
+
appearance: none;
|
|
58
|
+
border: none;
|
|
59
|
+
background: none;
|
|
60
|
+
outline: none;
|
|
61
|
+
margin: 0;
|
|
62
|
+
padding: 0;
|
|
63
|
+
font: inherit;
|
|
64
|
+
color: inherit;
|
|
65
|
+
flex: 1;
|
|
66
|
+
min-inline-size: 0;
|
|
67
|
+
inline-size: 100%;
|
|
68
|
+
|
|
69
|
+
&::placeholder {
|
|
70
|
+
color: var(--color-text-muted);
|
|
71
|
+
opacity: shared.$placeholder-opacity;
|
|
72
|
+
|
|
73
|
+
@include a11y.motion-safe {
|
|
74
|
+
transition: opacity var(--motion-duration-fast)
|
|
75
|
+
var(--motion-easing-standard);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// On-brand text selection
|
|
80
|
+
&::selection {
|
|
81
|
+
background-color: color-mix(
|
|
82
|
+
in oklch,
|
|
83
|
+
var(--color-primary) calc(var(--state-selected-opacity) * 100%),
|
|
84
|
+
transparent
|
|
85
|
+
);
|
|
86
|
+
color: inherit;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Override browser autofill yellow/blue background.
|
|
90
|
+
// Uses explicit tokens instead of inherit — browser autofill pseudo-element
|
|
91
|
+
// resolves inherit against its own forced style, not the element's computed style.
|
|
92
|
+
// Hardcoded box-shadow spread (1000px) and transition delay (5000s) are
|
|
93
|
+
// intentional browser hacks — no design token equivalents exist for these.
|
|
94
|
+
&:-webkit-autofill,
|
|
95
|
+
&:-webkit-autofill:hover,
|
|
96
|
+
&:-webkit-autofill:focus {
|
|
97
|
+
-webkit-text-fill-color: var(--color-text);
|
|
98
|
+
-webkit-box-shadow: 0 0 0 1000px var(--color-surface) inset;
|
|
99
|
+
transition: background-color 5000s ease-in-out 0s;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Hide number input spinners — cleaner look
|
|
103
|
+
&[type='number'] {
|
|
104
|
+
appearance: textfield;
|
|
105
|
+
-moz-appearance: textfield; // Firefox
|
|
106
|
+
|
|
107
|
+
&::-webkit-inner-spin-button,
|
|
108
|
+
&::-webkit-outer-spin-button {
|
|
109
|
+
appearance: none;
|
|
110
|
+
-webkit-appearance: none;
|
|
111
|
+
margin: 0;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// ============================================
|
|
117
|
+
// Focus — bridge inner input focus to wrapper
|
|
118
|
+
// Subtle background tint so active field stands out from siblings.
|
|
119
|
+
// Excluded on readonly — readonly inputs are focusable but shouldn't
|
|
120
|
+
// visually react like editable ones.
|
|
121
|
+
// ============================================
|
|
122
|
+
|
|
123
|
+
.ui-input:not([data-readonly]):focus-within {
|
|
124
|
+
border-color: var(--color-focus-ring);
|
|
125
|
+
outline: none;
|
|
126
|
+
// Zero offset — ring hugs the border (no double-border gap)
|
|
127
|
+
--ring-offset: 0px;
|
|
128
|
+
// Ring + soft colored glow behind it for depth (Stripe/Linear style).
|
|
129
|
+
// Glow spread matches ring-width, intensity from state-selected-opacity.
|
|
130
|
+
box-shadow:
|
|
131
|
+
borders.ring(),
|
|
132
|
+
0 0 var(--shadow-base-blur) var(--ring-width)
|
|
133
|
+
color-mix(
|
|
134
|
+
in oklch,
|
|
135
|
+
var(--ring-color) calc(var(--state-selected-opacity) * 100%),
|
|
136
|
+
transparent
|
|
137
|
+
);
|
|
138
|
+
background-color: var(--color-surface-bright);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// ============================================
|
|
142
|
+
// Hover (not disabled, not readonly)
|
|
143
|
+
// ============================================
|
|
144
|
+
|
|
145
|
+
.ui-input:hover:not([data-disabled]):not([data-readonly]):not(:focus-within) {
|
|
146
|
+
background-color: var(--color-surface-bright);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.ui-input:hover:not([data-disabled]):not([data-readonly]):not(
|
|
150
|
+
:focus-within
|
|
151
|
+
):not([data-error]):not([data-success]) {
|
|
152
|
+
border-color: var(--color-primary);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// ============================================
|
|
156
|
+
// Sizes — font one step below control size
|
|
157
|
+
// ============================================
|
|
158
|
+
|
|
159
|
+
@each $size in shared.$control-sizes {
|
|
160
|
+
.ui-input[data-size='#{$size}'] {
|
|
161
|
+
font-size: map.get(shared.$control-font-sizes, $size);
|
|
162
|
+
min-block-size: var(--control-min-height-#{$size});
|
|
163
|
+
--_input-icon-size: #{map.get(shared.$control-icon-sizes, $size)};
|
|
164
|
+
--_form-btn-size: #{map.get(shared.$control-btn-sizes, $size)};
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// ============================================
|
|
169
|
+
// Success state
|
|
170
|
+
// ============================================
|
|
171
|
+
|
|
172
|
+
.ui-input[data-success] {
|
|
173
|
+
border-color: var(--color-success);
|
|
174
|
+
|
|
175
|
+
&:focus-within {
|
|
176
|
+
border-color: var(--color-success);
|
|
177
|
+
--ring-color: var(--color-success);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// ============================================
|
|
182
|
+
// Error state (after success — source order wins)
|
|
183
|
+
// ============================================
|
|
184
|
+
|
|
185
|
+
.ui-input[data-error] {
|
|
186
|
+
border-color: var(--color-danger);
|
|
187
|
+
|
|
188
|
+
&:focus-within {
|
|
189
|
+
border-color: var(--color-danger);
|
|
190
|
+
--ring-color: var(--color-danger);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// ============================================
|
|
195
|
+
// Error shake animation (shared keyframe)
|
|
196
|
+
// ============================================
|
|
197
|
+
|
|
198
|
+
@include form-anim.form-shake('.ui-input-shake');
|
|
199
|
+
|
|
200
|
+
// ============================================
|
|
201
|
+
// Helper + Error text — sit below the input in normal flow
|
|
202
|
+
// (wrapped in a container div by Input.ts when needed)
|
|
203
|
+
// ============================================
|
|
204
|
+
|
|
205
|
+
// Helper + error text use shared .ui-form-helper / .ui-form-error classes
|
|
206
|
+
// from _form-animations.scss — no component-specific overrides needed.
|
|
207
|
+
|
|
208
|
+
// ============================================
|
|
209
|
+
// Disabled state
|
|
210
|
+
// ============================================
|
|
211
|
+
|
|
212
|
+
.ui-input[data-disabled] {
|
|
213
|
+
opacity: var(--state-disabled-opacity);
|
|
214
|
+
cursor: not-allowed;
|
|
215
|
+
|
|
216
|
+
.ui-input-field {
|
|
217
|
+
cursor: not-allowed;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// ============================================
|
|
222
|
+
// Readonly state
|
|
223
|
+
// ============================================
|
|
224
|
+
|
|
225
|
+
.ui-input[data-readonly] {
|
|
226
|
+
background-color: var(--color-surface-variant);
|
|
227
|
+
|
|
228
|
+
.ui-input-field {
|
|
229
|
+
cursor: default;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// ============================================
|
|
234
|
+
// Floating Label — Inner Float Pattern
|
|
235
|
+
// Label starts centered inside the input (like a placeholder), then
|
|
236
|
+
// floats to the top-inside of the container on focus/fill.
|
|
237
|
+
// The label NEVER leaves the container — no border interaction, no
|
|
238
|
+
// notch, no background-color hack, no font-alignment fragility.
|
|
239
|
+
//
|
|
240
|
+
// Layout: extra padding-top makes room for the floated label.
|
|
241
|
+
// Animation: `inset-block-start` + `transform` animate together so the label
|
|
242
|
+
// visually rises from the placeholder position to the top of the field.
|
|
243
|
+
// ============================================
|
|
244
|
+
|
|
245
|
+
.ui-input[data-floating-label] {
|
|
246
|
+
// Asymmetric padding: extra top to make room for the floated mini-label,
|
|
247
|
+
// tighter bottom so input text sits lower. Uses the shorthand `padding`
|
|
248
|
+
// to guarantee it overrides the utility class (.u-control-*).
|
|
249
|
+
position: relative;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// Asymmetric padding per size — floating label needs extra block-start for the
|
|
253
|
+
// mini-label and tighter block-end. The u-control-* utility class is NOT applied
|
|
254
|
+
// to floating-label inputs (skipped in Input.ts), so no specificity battle here.
|
|
255
|
+
@each $size in shared.$control-sizes {
|
|
256
|
+
.ui-input[data-floating-label][data-size='#{$size}'] {
|
|
257
|
+
padding: calc(var(--control-padding-y-#{$size}) + 1em)
|
|
258
|
+
var(--control-padding-x-#{$size})
|
|
259
|
+
calc(var(--control-padding-y-#{$size}) * 0.4)
|
|
260
|
+
var(--control-padding-x-#{$size});
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.ui-input-label {
|
|
265
|
+
position: absolute;
|
|
266
|
+
// Resting: vertically centered in the full container
|
|
267
|
+
inset-block-start: 50%;
|
|
268
|
+
transform: translateY(-50%);
|
|
269
|
+
transform-origin: inline-start top;
|
|
270
|
+
font-size: inherit;
|
|
271
|
+
color: var(--color-text-muted);
|
|
272
|
+
pointer-events: none;
|
|
273
|
+
white-space: nowrap;
|
|
274
|
+
line-height: 1;
|
|
275
|
+
|
|
276
|
+
@include a11y.motion-safe {
|
|
277
|
+
transition:
|
|
278
|
+
inset-block-start var(--motion-duration-normal)
|
|
279
|
+
var(--motion-easing-entrance),
|
|
280
|
+
transform var(--motion-duration-normal) var(--motion-easing-entrance),
|
|
281
|
+
padding-block-start var(--motion-duration-normal)
|
|
282
|
+
var(--motion-easing-entrance),
|
|
283
|
+
font-size var(--motion-duration-normal) var(--motion-easing-entrance),
|
|
284
|
+
color var(--motion-duration-fast) var(--motion-easing-standard);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// Label horizontal position per size
|
|
289
|
+
@each $size in shared.$control-sizes {
|
|
290
|
+
.ui-input[data-size='#{$size}'] .ui-input-label {
|
|
291
|
+
inset-inline-start: var(--control-padding-x-#{$size});
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// Floating state — label anchors to top-inside of the container.
|
|
296
|
+
// Uses inset-block-start instead of translateY so it's padding-relative,
|
|
297
|
+
// not height-relative — immune to font metric variance.
|
|
298
|
+
.ui-input:not([data-readonly]):focus-within .ui-input-label,
|
|
299
|
+
.ui-input[data-filled] .ui-input-label,
|
|
300
|
+
.ui-input[data-readonly] .ui-input-label {
|
|
301
|
+
// Move to the top of the padding area
|
|
302
|
+
inset-block-start: 0;
|
|
303
|
+
transform: none;
|
|
304
|
+
font-size: var(--font-size-xs);
|
|
305
|
+
color: var(--color-primary);
|
|
306
|
+
letter-spacing: var(--body-letter-spacing);
|
|
307
|
+
// Small vertical nudge so label text aligns with the top padding area
|
|
308
|
+
padding-block-start: var(--space-xs);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// Filled but not focused — muted label color
|
|
312
|
+
.ui-input[data-filled]:not(:focus-within) .ui-input-label,
|
|
313
|
+
.ui-input[data-readonly] .ui-input-label {
|
|
314
|
+
color: var(--color-text-muted);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// Error overrides label color
|
|
318
|
+
.ui-input[data-error]:not([data-readonly]):focus-within .ui-input-label,
|
|
319
|
+
.ui-input[data-error][data-filled] .ui-input-label {
|
|
320
|
+
color: var(--color-danger);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// Success overrides label color (error wins when both present)
|
|
324
|
+
// Darkened via color-mix for WCAG 1.4.3 text contrast (≥4.5:1 vs surface)
|
|
325
|
+
.ui-input[data-success]:not([data-error]):not([data-readonly]):focus-within
|
|
326
|
+
.ui-input-label,
|
|
327
|
+
.ui-input[data-success]:not([data-error])[data-filled] .ui-input-label {
|
|
328
|
+
color: var(
|
|
329
|
+
--color-success-text,
|
|
330
|
+
color-mix(in oklch, var(--color-success) 66%, var(--color-text))
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// Hide placeholder when label is in resting position (label covers it).
|
|
335
|
+
// Readonly is excluded — label is always floated so placeholder is always visible.
|
|
336
|
+
.ui-input[data-floating-label]:not(:focus-within):not([data-filled]):not(
|
|
337
|
+
[data-readonly]
|
|
338
|
+
)
|
|
339
|
+
.ui-input-field::placeholder {
|
|
340
|
+
opacity: 0;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// ============================================
|
|
344
|
+
// Prefix / Suffix — polished grouping
|
|
345
|
+
// ============================================
|
|
346
|
+
|
|
347
|
+
.ui-input-prefix,
|
|
348
|
+
.ui-input-suffix {
|
|
349
|
+
display: inline-flex;
|
|
350
|
+
align-items: center;
|
|
351
|
+
flex-shrink: 0;
|
|
352
|
+
color: var(--color-text-muted);
|
|
353
|
+
line-height: 1;
|
|
354
|
+
background-color: var(--color-surface-variant);
|
|
355
|
+
align-self: stretch;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// Size-specific padding and negative margins for edge-to-edge grouping
|
|
359
|
+
@each $size in shared.$control-sizes {
|
|
360
|
+
.ui-input[data-size='#{$size}'] {
|
|
361
|
+
> .ui-input-prefix {
|
|
362
|
+
margin-inline-start: calc(-1 * var(--control-padding-x-#{$size}));
|
|
363
|
+
margin-block: calc(-1 * var(--control-padding-y-#{$size}));
|
|
364
|
+
padding-inline: var(--space-sm);
|
|
365
|
+
border-inline-end: var(--border-width-hairline) solid var(--color-border);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
> .ui-input-suffix {
|
|
369
|
+
margin-inline-end: calc(-1 * var(--control-padding-x-#{$size}));
|
|
370
|
+
margin-block: calc(-1 * var(--control-padding-y-#{$size}));
|
|
371
|
+
padding-inline: var(--space-sm);
|
|
372
|
+
border-inline-start: var(--border-width-hairline)
|
|
373
|
+
solid
|
|
374
|
+
var(--color-border);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
// Border radius on exposed corners
|
|
380
|
+
.ui-input-prefix {
|
|
381
|
+
border-start-start-radius: var(--radius-md);
|
|
382
|
+
border-end-start-radius: var(--radius-md);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.ui-input-suffix {
|
|
386
|
+
border-start-end-radius: var(--radius-md);
|
|
387
|
+
border-end-end-radius: var(--radius-md);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// ============================================
|
|
391
|
+
// Character Counter
|
|
392
|
+
// ============================================
|
|
393
|
+
|
|
394
|
+
.ui-input-counter {
|
|
395
|
+
font-size: var(--font-size-xs);
|
|
396
|
+
font-variant-numeric: tabular-nums;
|
|
397
|
+
color: var(--color-text-muted);
|
|
398
|
+
flex-shrink: 0;
|
|
399
|
+
padding-inline-start: var(--space-xs);
|
|
400
|
+
white-space: nowrap;
|
|
401
|
+
// Hidden until input has value — "0/50" on empty field is noise
|
|
402
|
+
opacity: 0;
|
|
403
|
+
|
|
404
|
+
@include a11y.motion-safe {
|
|
405
|
+
transition:
|
|
406
|
+
color var(--motion-duration-fast) var(--motion-easing-standard),
|
|
407
|
+
opacity var(--motion-duration-normal) var(--motion-easing-standard);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
// Fade in when wrapper has value or is focused (not readonly)
|
|
411
|
+
.ui-input[data-filled] &,
|
|
412
|
+
.ui-input:not([data-readonly]):focus-within & {
|
|
413
|
+
opacity: 1;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.ui-input-counter-warn {
|
|
418
|
+
color: var(--color-warning);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.ui-input-counter-danger {
|
|
422
|
+
color: var(--color-danger);
|
|
423
|
+
font-weight: var(--font-weight-medium);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
// ============================================
|
|
427
|
+
// Clear Button
|
|
428
|
+
// ============================================
|
|
429
|
+
|
|
430
|
+
.ui-input-clear {
|
|
431
|
+
@include form-anim.form-inline-button(var(--color-text));
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
// ============================================
|
|
435
|
+
// State Icons (success / error)
|
|
436
|
+
// ============================================
|
|
437
|
+
|
|
438
|
+
.ui-input-state-icon {
|
|
439
|
+
display: inline-flex;
|
|
440
|
+
align-items: center;
|
|
441
|
+
justify-content: center;
|
|
442
|
+
flex-shrink: 0;
|
|
443
|
+
inline-size: var(--_input-icon-size);
|
|
444
|
+
block-size: var(--_input-icon-size);
|
|
445
|
+
line-height: 1;
|
|
446
|
+
|
|
447
|
+
@include a11y.motion-safe {
|
|
448
|
+
transition: var(--motion-transition-color);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.ui-input-state-icon-success {
|
|
453
|
+
color: var(--color-success);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
// Applied on false→true transition (JS toggles this class)
|
|
457
|
+
@include a11y.motion-safe {
|
|
458
|
+
.ui-input-state-icon-pop {
|
|
459
|
+
animation: var(--motion-animation-fade-scale-in)
|
|
460
|
+
var(--motion-duration-normal) var(--motion-easing-entrance);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.ui-input-state-icon-error {
|
|
465
|
+
color: var(--color-danger);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
// ============================================
|
|
469
|
+
// Password Toggle
|
|
470
|
+
// ============================================
|
|
471
|
+
|
|
472
|
+
.ui-input-password-toggle {
|
|
473
|
+
@include form-anim.form-inline-button(var(--color-text));
|
|
474
|
+
|
|
475
|
+
// Override border-radius — password toggle is rectangular, not circular
|
|
476
|
+
& {
|
|
477
|
+
border-radius: var(--radius-sm);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
// ============================================
|
|
482
|
+
// Loading Spinner
|
|
483
|
+
// ============================================
|
|
484
|
+
|
|
485
|
+
.ui-input.ui-input-loading::after {
|
|
486
|
+
content: '';
|
|
487
|
+
flex-shrink: 0;
|
|
488
|
+
inline-size: var(--_input-icon-size);
|
|
489
|
+
block-size: var(--_input-icon-size);
|
|
490
|
+
border: var(--border-width-thin) solid var(--color-text-muted);
|
|
491
|
+
border-inline-end-color: transparent;
|
|
492
|
+
border-radius: 50%;
|
|
493
|
+
|
|
494
|
+
@include a11y.motion-safe {
|
|
495
|
+
animation: var(--motion-animation-spin) var(--motion-duration-deliberate)
|
|
496
|
+
linear infinite;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
@include a11y.motion-reduced {
|
|
500
|
+
border-inline-end-color: var(--color-text-muted);
|
|
501
|
+
opacity: shared.$spinner-reduced-opacity;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
// Loading state: truly hide action buttons (not just opacity:0)
|
|
506
|
+
// so they don't receive focus or occupy space while spinner shows.
|
|
507
|
+
.ui-input.ui-input-loading > .ui-input-clear,
|
|
508
|
+
.ui-input.ui-input-loading > .ui-input-password-toggle {
|
|
509
|
+
display: none;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
// Disabled / readonly: truly hide clear button.
|
|
513
|
+
// Users cannot interact, so the button should not be visible or focusable.
|
|
514
|
+
.ui-input[data-disabled] > .ui-input-clear,
|
|
515
|
+
.ui-input[data-readonly] > .ui-input-clear {
|
|
516
|
+
display: none;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
// ============================================
|
|
520
|
+
// High Contrast / Forced Colors
|
|
521
|
+
// ============================================
|
|
522
|
+
|
|
523
|
+
@include a11y.forced-colors {
|
|
524
|
+
.ui-input {
|
|
525
|
+
border: var(--border-width-hairline) solid ButtonText;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.ui-input[data-disabled] {
|
|
529
|
+
border-color: GrayText;
|
|
530
|
+
color: GrayText;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.ui-input:not([data-readonly]):focus-within {
|
|
534
|
+
@include a11y.focus-outline(Highlight);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.ui-input-label {
|
|
538
|
+
color: inherit;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
.ui-input-clear,
|
|
542
|
+
.ui-input-password-toggle {
|
|
543
|
+
border: var(--border-width-hairline) solid ButtonText;
|
|
544
|
+
color: ButtonText;
|
|
545
|
+
background: Field;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** @codex
|
|
2
|
+
{
|
|
3
|
+
"id": "pithy.ui-kit.radio",
|
|
4
|
+
"title": "<Radio> Form Atom",
|
|
5
|
+
"category": "feature"
|
|
6
|
+
}
|
|
7
|
+
*/
|
|
8
|
+
import { type FormControlBaseProps } from '../../../shared/types';
|
|
9
|
+
/** @codexApi {"parent":"pithy.ui-kit.radio","name":"RadioProps","stability":"stable","signature":"interface RadioProps extends FormControlBaseProps"} */
|
|
10
|
+
export interface RadioProps extends FormControlBaseProps {
|
|
11
|
+
/** Radio name attribute — required for grouping (mutual exclusion + arrow nav) */
|
|
12
|
+
name: string;
|
|
13
|
+
/** Submitted value when this radio is selected */
|
|
14
|
+
value: string;
|
|
15
|
+
/** Checked state — static boolean or signal accessor for controlled radio */
|
|
16
|
+
checked?: boolean | (() => boolean);
|
|
17
|
+
/** Fires whenever the checked state changes to true */
|
|
18
|
+
onChange?: (checked: boolean, e: Event) => void;
|
|
19
|
+
/** Fires when the radio loses focus */
|
|
20
|
+
onBlur?: (e: FocusEvent) => void;
|
|
21
|
+
/** Fires when the radio gains focus */
|
|
22
|
+
onFocus?: (e: FocusEvent) => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Accessible radio button atom.
|
|
26
|
+
*
|
|
27
|
+
* Renders a `<label class="ui-radio">` wrapping a native `<input type="radio">`,
|
|
28
|
+
* a custom `<span class="ui-radio-circle">` (with an inner dot drawn from inline
|
|
29
|
+
* SVG), and a visible `<span class="ui-radio-label">`. Supports error/success
|
|
30
|
+
* states (with shake), helper/error text, loading, and full a11y wiring.
|
|
31
|
+
*
|
|
32
|
+
* Unlike checkboxes, a radio cannot be un-checked by the user — selecting
|
|
33
|
+
* another radio in the same `name` group un-checks the previous one. The
|
|
34
|
+
* native input is visually hidden (sr-only) but kept focusable so
|
|
35
|
+
* `<label>`-forwarded clicks and keyboard interaction still work. Arrow-key
|
|
36
|
+
* navigation across siblings with the same `name` is handled explicitly here
|
|
37
|
+
* because the sr-only technique prevents the UA from finding siblings via
|
|
38
|
+
* default tab-stops.
|
|
39
|
+
*
|
|
40
|
+
* This is a pure visual atom — no validation logic. Error/success are driven
|
|
41
|
+
* externally via props.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```html
|
|
45
|
+
* <Radio label="'Cheese'" name="'topping'" value="'cheese'" />
|
|
46
|
+
* <Radio label="'Subscribe'" name="'plan'" value="'pro'" checked="isPro" onChange="select" />
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
/** @codexApi {"parent":"pithy.ui-kit.radio","name":"Radio","stability":"stable","signature":"(props: RadioProps) => { el: HTMLElement | DocumentFragment; destroy: () => void }"} */
|
|
50
|
+
export declare function Radio({ id: externalId, name, value, checked, disabled, readonly: readonlyProp, required, error, errorMessage, helperText, success, size: rawSize, label, loading, onChange, onBlur, onFocus, }: RadioProps): {
|
|
51
|
+
el: HTMLElement | DocumentFragment;
|
|
52
|
+
destroy: () => void;
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=Radio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../../src/atoms/forms/radio/Radio.ts"],"names":[],"mappings":"AAAA;;;;;;EAME;AAGF,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,uBAAuB,CAAC;AAc/B,yJAAyJ;AACzJ,MAAM,WAAW,UAAW,SAAQ,oBAAoB;IACtD,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,OAAO,CAAC,EAAE,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,CAAC;IACpC,uDAAuD;IACvD,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IAChD,uCAAuC;IACvC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACjC,uCAAuC;IACvC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CACnC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qLAAqL;AACrL,wBAAgB,KAAK,CAAC,EACpB,EAAE,EAAE,UAAU,EACd,IAAI,EACJ,KAAK,EACL,OAAe,EACf,QAAgB,EAChB,QAAQ,EAAE,YAAoB,EAC9B,QAAgB,EAChB,KAAa,EACb,YAAY,EACZ,UAAU,EACV,OAAe,EACf,IAAI,EAAE,OAAc,EACpB,KAAK,EACL,OAAe,EACf,QAAQ,EACR,MAAM,EACN,OAAO,GACR,EAAE,UAAU,GAAG;IAAE,EAAE,EAAE,WAAW,GAAG,gBAAgB,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CA4R1E"}
|