@poppy-ui/vue 0.0.0-dev.36.93ba5b2
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/README.md +103 -0
- package/dist/ClassWrapper-BNZO3mhP.cjs +2 -0
- package/dist/ClassWrapper-BNZO3mhP.cjs.map +1 -0
- package/dist/ClassWrapper-DdnnHfAj.js +24 -0
- package/dist/ClassWrapper-DdnnHfAj.js.map +1 -0
- package/dist/Toast-DuytECg8.cjs +2 -0
- package/dist/Toast-DuytECg8.cjs.map +1 -0
- package/dist/Toast-fSQWLl0R.js +63 -0
- package/dist/Toast-fSQWLl0R.js.map +1 -0
- package/dist/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
- package/dist/_plugin-vue_export-helper-BTmtiIyf.cjs +1 -0
- package/dist/build-class.util-Cp-ZBFgO.js +1730 -0
- package/dist/build-class.util-Cp-ZBFgO.js.map +1 -0
- package/dist/build-class.util-Lo1-M_t1.cjs +2 -0
- package/dist/build-class.util-Lo1-M_t1.cjs.map +1 -0
- package/dist/components/ClassWrapper.d.ts +27 -0
- package/dist/components/ClassWrapper.d.ts.map +1 -0
- package/dist/components/actions/button/Button.d.ts +21 -0
- package/dist/components/actions/button/Button.d.ts.map +1 -0
- package/dist/components/actions/button/button.context.d.ts +2 -0
- package/dist/components/actions/button/button.context.d.ts.map +1 -0
- package/dist/components/actions/button/button.props.d.ts +58 -0
- package/dist/components/actions/button/button.props.d.ts.map +1 -0
- package/dist/components/actions/button/button.types.d.ts +7 -0
- package/dist/components/actions/button/button.types.d.ts.map +1 -0
- package/dist/components/actions/dropdown/Dropdown.d.ts +25 -0
- package/dist/components/actions/dropdown/Dropdown.d.ts.map +1 -0
- package/dist/components/actions/dropdown/dropdown.context.d.ts +2 -0
- package/dist/components/actions/dropdown/dropdown.context.d.ts.map +1 -0
- package/dist/components/actions/dropdown/dropdown.props.d.ts +60 -0
- package/dist/components/actions/dropdown/dropdown.props.d.ts.map +1 -0
- package/dist/components/actions/dropdown/dropdown.types.d.ts +4 -0
- package/dist/components/actions/dropdown/dropdown.types.d.ts.map +1 -0
- package/dist/components/actions/fab/Fab.d.ts +16 -0
- package/dist/components/actions/fab/Fab.d.ts.map +1 -0
- package/dist/components/actions/fab/fab.context.d.ts +2 -0
- package/dist/components/actions/fab/fab.context.d.ts.map +1 -0
- package/dist/components/actions/fab/fab.props.d.ts +11 -0
- package/dist/components/actions/fab/fab.props.d.ts.map +1 -0
- package/dist/components/actions/fab/fab.types.d.ts +2 -0
- package/dist/components/actions/fab/fab.types.d.ts.map +1 -0
- package/dist/components/actions/modal/Modal.d.ts +42 -0
- package/dist/components/actions/modal/Modal.d.ts.map +1 -0
- package/dist/components/actions/modal/modal.context.d.ts +2 -0
- package/dist/components/actions/modal/modal.context.d.ts.map +1 -0
- package/dist/components/actions/modal/modal.props.d.ts +31 -0
- package/dist/components/actions/modal/modal.props.d.ts.map +1 -0
- package/dist/components/actions/modal/modal.types.d.ts +2 -0
- package/dist/components/actions/modal/modal.types.d.ts.map +1 -0
- package/dist/components/actions/public.d.ts +6 -0
- package/dist/components/actions/public.d.ts.map +1 -0
- package/dist/components/actions/public.es.js +323 -0
- package/dist/components/actions/public.es.js.map +1 -0
- package/dist/components/actions/public.types.d.ts +11 -0
- package/dist/components/actions/public.types.d.ts.map +1 -0
- package/dist/components/actions/public.umd.js +2 -0
- package/dist/components/actions/public.umd.js.map +1 -0
- package/dist/components/actions/swap/Swap.d.ts +36 -0
- package/dist/components/actions/swap/Swap.d.ts.map +1 -0
- package/dist/components/actions/swap/swap.context.d.ts +2 -0
- package/dist/components/actions/swap/swap.context.d.ts.map +1 -0
- package/dist/components/actions/swap/swap.props.d.ts +18 -0
- package/dist/components/actions/swap/swap.props.d.ts.map +1 -0
- package/dist/components/actions/swap/swap.types.d.ts +2 -0
- package/dist/components/actions/swap/swap.types.d.ts.map +1 -0
- package/dist/components/app/PoppyApp.d.ts +14 -0
- package/dist/components/app/PoppyApp.d.ts.map +1 -0
- package/dist/components/app/public.d.ts +2 -0
- package/dist/components/app/public.d.ts.map +1 -0
- package/dist/components/app/public.es.js +42 -0
- package/dist/components/app/public.es.js.map +1 -0
- package/dist/components/app/public.umd.js +2 -0
- package/dist/components/app/public.umd.js.map +1 -0
- package/dist/components/data/checkbox/Checkbox.d.ts +25 -0
- package/dist/components/data/checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/data/checkbox/checkbox.context.d.ts +2 -0
- package/dist/components/data/checkbox/checkbox.context.d.ts.map +1 -0
- package/dist/components/data/checkbox/checkbox.props.d.ts +44 -0
- package/dist/components/data/checkbox/checkbox.props.d.ts.map +1 -0
- package/dist/components/data/checkbox/checkbox.types.d.ts +4 -0
- package/dist/components/data/checkbox/checkbox.types.d.ts.map +1 -0
- package/dist/components/data/field-set/FieldSet.d.ts +21 -0
- package/dist/components/data/field-set/FieldSet.d.ts.map +1 -0
- package/dist/components/data/field-set/field-set.props.d.ts +20 -0
- package/dist/components/data/field-set/field-set.props.d.ts.map +1 -0
- package/dist/components/data/form/Form.d.ts +37 -0
- package/dist/components/data/form/Form.d.ts.map +1 -0
- package/dist/components/data/form/form.context.d.ts +57 -0
- package/dist/components/data/form/form.context.d.ts.map +1 -0
- package/dist/components/data/form/form.props.d.ts +28 -0
- package/dist/components/data/form/form.props.d.ts.map +1 -0
- package/dist/components/data/form/form.types.d.ts +25 -0
- package/dist/components/data/form/form.types.d.ts.map +1 -0
- package/dist/components/data/form-field/FormField.d.ts +28 -0
- package/dist/components/data/form-field/FormField.d.ts.map +1 -0
- package/dist/components/data/form-field/form-field.context.d.ts +53 -0
- package/dist/components/data/form-field/form-field.context.d.ts.map +1 -0
- package/dist/components/data/form-field/form-field.props.d.ts +37 -0
- package/dist/components/data/form-field/form-field.props.d.ts.map +1 -0
- package/dist/components/data/form-field/form-field.types.d.ts +2 -0
- package/dist/components/data/form-field/form-field.types.d.ts.map +1 -0
- package/dist/components/data/input/Input.d.ts +31 -0
- package/dist/components/data/input/Input.d.ts.map +1 -0
- package/dist/components/data/input/input.context.d.ts +2 -0
- package/dist/components/data/input/input.context.d.ts.map +1 -0
- package/dist/components/data/input/input.props.d.ts +78 -0
- package/dist/components/data/input/input.props.d.ts.map +1 -0
- package/dist/components/data/input/input.types.d.ts +6 -0
- package/dist/components/data/input/input.types.d.ts.map +1 -0
- package/dist/components/data/public.d.ts +13 -0
- package/dist/components/data/public.d.ts.map +1 -0
- package/dist/components/data/public.es.js +1816 -0
- package/dist/components/data/public.es.js.map +1 -0
- package/dist/components/data/public.types.d.ts +21 -0
- package/dist/components/data/public.types.d.ts.map +1 -0
- package/dist/components/data/public.umd.js +2 -0
- package/dist/components/data/public.umd.js.map +1 -0
- package/dist/components/data/radio/Radio.d.ts +25 -0
- package/dist/components/data/radio/Radio.d.ts.map +1 -0
- package/dist/components/data/radio/radio.context.d.ts +2 -0
- package/dist/components/data/radio/radio.context.d.ts.map +1 -0
- package/dist/components/data/radio/radio.props.d.ts +47 -0
- package/dist/components/data/radio/radio.props.d.ts.map +1 -0
- package/dist/components/data/radio/radio.types.d.ts +4 -0
- package/dist/components/data/radio/radio.types.d.ts.map +1 -0
- package/dist/components/data/radio-group/RadioGroup.d.ts +28 -0
- package/dist/components/data/radio-group/RadioGroup.d.ts.map +1 -0
- package/dist/components/data/radio-group/radio-group.context.d.ts +13 -0
- package/dist/components/data/radio-group/radio-group.context.d.ts.map +1 -0
- package/dist/components/data/radio-group/radio-group.props.d.ts +12 -0
- package/dist/components/data/radio-group/radio-group.props.d.ts.map +1 -0
- package/dist/components/data/rating/Rating.d.ts +26 -0
- package/dist/components/data/rating/Rating.d.ts.map +1 -0
- package/dist/components/data/rating/rating.context.d.ts +2 -0
- package/dist/components/data/rating/rating.context.d.ts.map +1 -0
- package/dist/components/data/rating/rating.props.d.ts +44 -0
- package/dist/components/data/rating/rating.props.d.ts.map +1 -0
- package/dist/components/data/rating/rating.types.d.ts +6 -0
- package/dist/components/data/rating/rating.types.d.ts.map +1 -0
- package/dist/components/data/select/Select.d.ts +79 -0
- package/dist/components/data/select/Select.d.ts.map +1 -0
- package/dist/components/data/select/select.context.d.ts +2 -0
- package/dist/components/data/select/select.context.d.ts.map +1 -0
- package/dist/components/data/select/select.props.d.ts +99 -0
- package/dist/components/data/select/select.props.d.ts.map +1 -0
- package/dist/components/data/select/select.types.d.ts +20 -0
- package/dist/components/data/select/select.types.d.ts.map +1 -0
- package/dist/components/data/slider/Slider.d.ts +29 -0
- package/dist/components/data/slider/Slider.d.ts.map +1 -0
- package/dist/components/data/slider/slider.context.d.ts +2 -0
- package/dist/components/data/slider/slider.context.d.ts.map +1 -0
- package/dist/components/data/slider/slider.props.d.ts +70 -0
- package/dist/components/data/slider/slider.props.d.ts.map +1 -0
- package/dist/components/data/slider/slider.types.d.ts +7 -0
- package/dist/components/data/slider/slider.types.d.ts.map +1 -0
- package/dist/components/data/textarea/Textarea.d.ts +22 -0
- package/dist/components/data/textarea/Textarea.d.ts.map +1 -0
- package/dist/components/data/textarea/textarea.context.d.ts +2 -0
- package/dist/components/data/textarea/textarea.context.d.ts.map +1 -0
- package/dist/components/data/textarea/textarea.props.d.ts +64 -0
- package/dist/components/data/textarea/textarea.props.d.ts.map +1 -0
- package/dist/components/data/textarea/textarea.types.d.ts +5 -0
- package/dist/components/data/textarea/textarea.types.d.ts.map +1 -0
- package/dist/components/data/toggle/Toggle.d.ts +31 -0
- package/dist/components/data/toggle/Toggle.d.ts.map +1 -0
- package/dist/components/data/toggle/toggle.context.d.ts +2 -0
- package/dist/components/data/toggle/toggle.context.d.ts.map +1 -0
- package/dist/components/data/toggle/toggle.props.d.ts +38 -0
- package/dist/components/data/toggle/toggle.props.d.ts.map +1 -0
- package/dist/components/data/toggle/toggle.types.d.ts +4 -0
- package/dist/components/data/toggle/toggle.types.d.ts.map +1 -0
- package/dist/components/display/accordion/Accordion.d.ts +42 -0
- package/dist/components/display/accordion/Accordion.d.ts.map +1 -0
- package/dist/components/display/accordion/AccordionItem.d.ts +35 -0
- package/dist/components/display/accordion/AccordionItem.d.ts.map +1 -0
- package/dist/components/display/accordion/accordion-item.context.d.ts +2 -0
- package/dist/components/display/accordion/accordion-item.context.d.ts.map +1 -0
- package/dist/components/display/accordion/accordion-item.props.d.ts +19 -0
- package/dist/components/display/accordion/accordion-item.props.d.ts.map +1 -0
- package/dist/components/display/accordion/accordion-item.types.d.ts +2 -0
- package/dist/components/display/accordion/accordion-item.types.d.ts.map +1 -0
- package/dist/components/display/accordion/accordion.context.d.ts +9 -0
- package/dist/components/display/accordion/accordion.context.d.ts.map +1 -0
- package/dist/components/display/accordion/accordion.props.d.ts +15 -0
- package/dist/components/display/accordion/accordion.props.d.ts.map +1 -0
- package/dist/components/display/avatar/Avatar.d.ts +14 -0
- package/dist/components/display/avatar/Avatar.d.ts.map +1 -0
- package/dist/components/display/avatar/avatar.context.d.ts +2 -0
- package/dist/components/display/avatar/avatar.context.d.ts.map +1 -0
- package/dist/components/display/avatar/avatar.props.d.ts +45 -0
- package/dist/components/display/avatar/avatar.props.d.ts.map +1 -0
- package/dist/components/display/avatar/avatar.types.d.ts +5 -0
- package/dist/components/display/avatar/avatar.types.d.ts.map +1 -0
- package/dist/components/display/badge/Badge.d.ts +12 -0
- package/dist/components/display/badge/Badge.d.ts.map +1 -0
- package/dist/components/display/badge/badge.context.d.ts +2 -0
- package/dist/components/display/badge/badge.context.d.ts.map +1 -0
- package/dist/components/display/badge/badge.props.d.ts +20 -0
- package/dist/components/display/badge/badge.props.d.ts.map +1 -0
- package/dist/components/display/badge/badge.types.d.ts +5 -0
- package/dist/components/display/badge/badge.types.d.ts.map +1 -0
- package/dist/components/display/card/Card.d.ts +12 -0
- package/dist/components/display/card/Card.d.ts.map +1 -0
- package/dist/components/display/card/CardActions.d.ts +12 -0
- package/dist/components/display/card/CardActions.d.ts.map +1 -0
- package/dist/components/display/card/CardBody.d.ts +14 -0
- package/dist/components/display/card/CardBody.d.ts.map +1 -0
- package/dist/components/display/card/CardTitle.d.ts +14 -0
- package/dist/components/display/card/CardTitle.d.ts.map +1 -0
- package/dist/components/display/card/card-actions.context.d.ts +2 -0
- package/dist/components/display/card/card-actions.context.d.ts.map +1 -0
- package/dist/components/display/card/card-actions.props.d.ts +15 -0
- package/dist/components/display/card/card-actions.props.d.ts.map +1 -0
- package/dist/components/display/card/card-actions.types.d.ts +2 -0
- package/dist/components/display/card/card-actions.types.d.ts.map +1 -0
- package/dist/components/display/card/card.context.d.ts +2 -0
- package/dist/components/display/card/card.context.d.ts.map +1 -0
- package/dist/components/display/card/card.props.d.ts +30 -0
- package/dist/components/display/card/card.props.d.ts.map +1 -0
- package/dist/components/display/card/card.types.d.ts +4 -0
- package/dist/components/display/card/card.types.d.ts.map +1 -0
- package/dist/components/display/carousel/Carousel.d.ts +16 -0
- package/dist/components/display/carousel/Carousel.d.ts.map +1 -0
- package/dist/components/display/carousel/carousel.context.d.ts +2 -0
- package/dist/components/display/carousel/carousel.context.d.ts.map +1 -0
- package/dist/components/display/carousel/carousel.props.d.ts +52 -0
- package/dist/components/display/carousel/carousel.props.d.ts.map +1 -0
- package/dist/components/display/carousel/carousel.types.d.ts +3 -0
- package/dist/components/display/carousel/carousel.types.d.ts.map +1 -0
- package/dist/components/display/chat/Chat.d.ts +20 -0
- package/dist/components/display/chat/Chat.d.ts.map +1 -0
- package/dist/components/display/chat/chat.context.d.ts +2 -0
- package/dist/components/display/chat/chat.context.d.ts.map +1 -0
- package/dist/components/display/chat/chat.props.d.ts +18 -0
- package/dist/components/display/chat/chat.props.d.ts.map +1 -0
- package/dist/components/display/chat/chat.types.d.ts +3 -0
- package/dist/components/display/chat/chat.types.d.ts.map +1 -0
- package/dist/components/display/countdown/Countdown.d.ts +38 -0
- package/dist/components/display/countdown/Countdown.d.ts.map +1 -0
- package/dist/components/display/countdown/countdown.context.d.ts +2 -0
- package/dist/components/display/countdown/countdown.context.d.ts.map +1 -0
- package/dist/components/display/countdown/countdown.props.d.ts +25 -0
- package/dist/components/display/countdown/countdown.props.d.ts.map +1 -0
- package/dist/components/display/countdown/countdown.types.d.ts +23 -0
- package/dist/components/display/countdown/countdown.types.d.ts.map +1 -0
- package/dist/components/display/diff/Diff.d.ts +16 -0
- package/dist/components/display/diff/Diff.d.ts.map +1 -0
- package/dist/components/display/hover-3d/Hover3d.d.ts +12 -0
- package/dist/components/display/hover-3d/Hover3d.d.ts.map +1 -0
- package/dist/components/display/hover-3d/hover-3d.props.d.ts +9 -0
- package/dist/components/display/hover-3d/hover-3d.props.d.ts.map +1 -0
- package/dist/components/display/hover-gallery/HoverGallery.d.ts +14 -0
- package/dist/components/display/hover-gallery/HoverGallery.d.ts.map +1 -0
- package/dist/components/display/kbd/Kbd.d.ts +12 -0
- package/dist/components/display/kbd/Kbd.d.ts.map +1 -0
- package/dist/components/display/kbd/kbd.context.d.ts +2 -0
- package/dist/components/display/kbd/kbd.context.d.ts.map +1 -0
- package/dist/components/display/kbd/kbd.props.d.ts +12 -0
- package/dist/components/display/kbd/kbd.props.d.ts.map +1 -0
- package/dist/components/display/kbd/kbd.types.d.ts +3 -0
- package/dist/components/display/kbd/kbd.types.d.ts.map +1 -0
- package/dist/components/display/list/List.d.ts +17 -0
- package/dist/components/display/list/List.d.ts.map +1 -0
- package/dist/components/display/list/ListItem.d.ts +22 -0
- package/dist/components/display/list/ListItem.d.ts.map +1 -0
- package/dist/components/display/list/list-item.props.d.ts +17 -0
- package/dist/components/display/list/list-item.props.d.ts.map +1 -0
- package/dist/components/display/list/list.props.d.ts +8 -0
- package/dist/components/display/list/list.props.d.ts.map +1 -0
- package/dist/components/display/public.d.ts +21 -0
- package/dist/components/display/public.d.ts.map +1 -0
- package/dist/components/display/public.es.js +2 -0
- package/dist/components/display/public.types.d.ts +28 -0
- package/dist/components/display/public.types.d.ts.map +1 -0
- package/dist/components/display/public.umd.js +1 -0
- package/dist/components/display/stat/Stat.d.ts +22 -0
- package/dist/components/display/stat/Stat.d.ts.map +1 -0
- package/dist/components/display/stat/Stats.d.ts +12 -0
- package/dist/components/display/stat/Stats.d.ts.map +1 -0
- package/dist/components/display/stat/stat.context.d.ts +2 -0
- package/dist/components/display/stat/stat.context.d.ts.map +1 -0
- package/dist/components/display/stat/stat.props.d.ts +42 -0
- package/dist/components/display/stat/stat.props.d.ts.map +1 -0
- package/dist/components/display/stat/stat.types.d.ts +2 -0
- package/dist/components/display/stat/stat.types.d.ts.map +1 -0
- package/dist/components/display/stat/stats.context.d.ts +2 -0
- package/dist/components/display/stat/stats.context.d.ts.map +1 -0
- package/dist/components/display/stat/stats.props.d.ts +11 -0
- package/dist/components/display/stat/stats.props.d.ts.map +1 -0
- package/dist/components/display/stat/stats.types.d.ts +2 -0
- package/dist/components/display/stat/stats.types.d.ts.map +1 -0
- package/dist/components/display/status/Status.d.ts +5 -0
- package/dist/components/display/status/Status.d.ts.map +1 -0
- package/dist/components/display/status/status.context.d.ts +2 -0
- package/dist/components/display/status/status.context.d.ts.map +1 -0
- package/dist/components/display/status/status.props.d.ts +27 -0
- package/dist/components/display/status/status.props.d.ts.map +1 -0
- package/dist/components/display/status/status.types.d.ts +5 -0
- package/dist/components/display/status/status.types.d.ts.map +1 -0
- package/dist/components/feedback/alert/Alert.d.ts +14 -0
- package/dist/components/feedback/alert/Alert.d.ts.map +1 -0
- package/dist/components/feedback/alert/alert.context.d.ts +2 -0
- package/dist/components/feedback/alert/alert.context.d.ts.map +1 -0
- package/dist/components/feedback/alert/alert.props.d.ts +27 -0
- package/dist/components/feedback/alert/alert.props.d.ts.map +1 -0
- package/dist/components/feedback/alert/alert.types.d.ts +4 -0
- package/dist/components/feedback/alert/alert.types.d.ts.map +1 -0
- package/dist/components/feedback/loading/Loading.d.ts +5 -0
- package/dist/components/feedback/loading/Loading.d.ts.map +1 -0
- package/dist/components/feedback/loading/loading.context.d.ts +2 -0
- package/dist/components/feedback/loading/loading.context.d.ts.map +1 -0
- package/dist/components/feedback/loading/loading.props.d.ts +23 -0
- package/dist/components/feedback/loading/loading.props.d.ts.map +1 -0
- package/dist/components/feedback/loading/loading.types.d.ts +5 -0
- package/dist/components/feedback/loading/loading.types.d.ts.map +1 -0
- package/dist/components/feedback/progress/Progress.d.ts +5 -0
- package/dist/components/feedback/progress/Progress.d.ts.map +1 -0
- package/dist/components/feedback/progress/progress.context.d.ts +2 -0
- package/dist/components/feedback/progress/progress.context.d.ts.map +1 -0
- package/dist/components/feedback/progress/progress.props.d.ts +28 -0
- package/dist/components/feedback/progress/progress.props.d.ts.map +1 -0
- package/dist/components/feedback/progress/progress.types.d.ts +2 -0
- package/dist/components/feedback/progress/progress.types.d.ts.map +1 -0
- package/dist/components/feedback/public.d.ts +6 -0
- package/dist/components/feedback/public.d.ts.map +1 -0
- package/dist/components/feedback/public.es.js +128 -0
- package/dist/components/feedback/public.es.js.map +1 -0
- package/dist/components/feedback/public.types.d.ts +13 -0
- package/dist/components/feedback/public.types.d.ts.map +1 -0
- package/dist/components/feedback/public.umd.js +2 -0
- package/dist/components/feedback/public.umd.js.map +1 -0
- package/dist/components/feedback/radial-progress/radial-progress.context.d.ts +2 -0
- package/dist/components/feedback/radial-progress/radial-progress.context.d.ts.map +1 -0
- package/dist/components/feedback/radial-progress/radial-progress.props.d.ts +32 -0
- package/dist/components/feedback/radial-progress/radial-progress.props.d.ts.map +1 -0
- package/dist/components/feedback/radial-progress/radial-progress.types.d.ts +2 -0
- package/dist/components/feedback/radial-progress/radial-progress.types.d.ts.map +1 -0
- package/dist/components/feedback/toast/Toast.d.ts +12 -0
- package/dist/components/feedback/toast/Toast.d.ts.map +1 -0
- package/dist/components/feedback/toast/toast.context.d.ts +9 -0
- package/dist/components/feedback/toast/toast.context.d.ts.map +1 -0
- package/dist/components/feedback/toast/toast.props.d.ts +31 -0
- package/dist/components/feedback/toast/toast.props.d.ts.map +1 -0
- package/dist/components/feedback/toast/toast.types.d.ts +5 -0
- package/dist/components/feedback/toast/toast.types.d.ts.map +1 -0
- package/dist/components/feedback/tooltip/Tooltip.d.ts +14 -0
- package/dist/components/feedback/tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/feedback/tooltip/tooltip.context.d.ts +2 -0
- package/dist/components/feedback/tooltip/tooltip.context.d.ts.map +1 -0
- package/dist/components/feedback/tooltip/tooltip.props.d.ts +39 -0
- package/dist/components/feedback/tooltip/tooltip.props.d.ts.map +1 -0
- package/dist/components/feedback/tooltip/tooltip.types.d.ts +3 -0
- package/dist/components/feedback/tooltip/tooltip.types.d.ts.map +1 -0
- package/dist/components/layout/divider/Divider.d.ts +12 -0
- package/dist/components/layout/divider/Divider.d.ts.map +1 -0
- package/dist/components/layout/divider/divider.context.d.ts +2 -0
- package/dist/components/layout/divider/divider.context.d.ts.map +1 -0
- package/dist/components/layout/divider/divider.props.d.ts +26 -0
- package/dist/components/layout/divider/divider.props.d.ts.map +1 -0
- package/dist/components/layout/divider/divider.types.d.ts +4 -0
- package/dist/components/layout/divider/divider.types.d.ts.map +1 -0
- package/dist/components/layout/drawer/Drawer.d.ts +39 -0
- package/dist/components/layout/drawer/Drawer.d.ts.map +1 -0
- package/dist/components/layout/drawer/drawer.context.d.ts +2 -0
- package/dist/components/layout/drawer/drawer.context.d.ts.map +1 -0
- package/dist/components/layout/drawer/drawer.props.d.ts +27 -0
- package/dist/components/layout/drawer/drawer.props.d.ts.map +1 -0
- package/dist/components/layout/drawer/drawer.types.d.ts +6 -0
- package/dist/components/layout/drawer/drawer.types.d.ts.map +1 -0
- package/dist/components/layout/indicator/Indicator.d.ts +14 -0
- package/dist/components/layout/indicator/Indicator.d.ts.map +1 -0
- package/dist/components/layout/indicator/indicator.context.d.ts +2 -0
- package/dist/components/layout/indicator/indicator.context.d.ts.map +1 -0
- package/dist/components/layout/indicator/indicator.props.d.ts +28 -0
- package/dist/components/layout/indicator/indicator.props.d.ts.map +1 -0
- package/dist/components/layout/indicator/indicator.types.d.ts +3 -0
- package/dist/components/layout/indicator/indicator.types.d.ts.map +1 -0
- package/dist/components/layout/join/Join.d.ts +12 -0
- package/dist/components/layout/join/Join.d.ts.map +1 -0
- package/dist/components/layout/join/join.context.d.ts +2 -0
- package/dist/components/layout/join/join.context.d.ts.map +1 -0
- package/dist/components/layout/join/join.props.d.ts +14 -0
- package/dist/components/layout/join/join.props.d.ts.map +1 -0
- package/dist/components/layout/join/join.types.d.ts +2 -0
- package/dist/components/layout/join/join.types.d.ts.map +1 -0
- package/dist/components/layout/mask/Mask.d.ts +12 -0
- package/dist/components/layout/mask/Mask.d.ts.map +1 -0
- package/dist/components/layout/mask/mask.context.d.ts +2 -0
- package/dist/components/layout/mask/mask.context.d.ts.map +1 -0
- package/dist/components/layout/mask/mask.props.d.ts +37 -0
- package/dist/components/layout/mask/mask.props.d.ts.map +1 -0
- package/dist/components/layout/mask/mask.types.d.ts +3 -0
- package/dist/components/layout/mask/mask.types.d.ts.map +1 -0
- package/dist/components/layout/public.d.ts +7 -0
- package/dist/components/layout/public.d.ts.map +1 -0
- package/dist/components/layout/public.es.js +206 -0
- package/dist/components/layout/public.es.js.map +1 -0
- package/dist/components/layout/public.types.d.ts +13 -0
- package/dist/components/layout/public.types.d.ts.map +1 -0
- package/dist/components/layout/public.umd.js +2 -0
- package/dist/components/layout/public.umd.js.map +1 -0
- package/dist/components/layout/stack/Stack.d.ts +12 -0
- package/dist/components/layout/stack/Stack.d.ts.map +1 -0
- package/dist/components/layout/stack/stack.context.d.ts +2 -0
- package/dist/components/layout/stack/stack.context.d.ts.map +1 -0
- package/dist/components/layout/stack/stack.props.d.ts +12 -0
- package/dist/components/layout/stack/stack.props.d.ts.map +1 -0
- package/dist/components/layout/stack/stack.types.d.ts +2 -0
- package/dist/components/layout/stack/stack.types.d.ts.map +1 -0
- package/dist/components/media/img/Img.d.ts +15 -0
- package/dist/components/media/img/Img.d.ts.map +1 -0
- package/dist/components/media/img/img.context.d.ts +2 -0
- package/dist/components/media/img/img.context.d.ts.map +1 -0
- package/dist/components/media/img/img.props.d.ts +76 -0
- package/dist/components/media/img/img.props.d.ts.map +1 -0
- package/dist/components/media/img/img.types.d.ts +33 -0
- package/dist/components/media/img/img.types.d.ts.map +1 -0
- package/dist/components/media/public.d.ts +2 -0
- package/dist/components/media/public.d.ts.map +1 -0
- package/dist/components/media/public.es.js +143 -0
- package/dist/components/media/public.es.js.map +1 -0
- package/dist/components/media/public.types.d.ts +3 -0
- package/dist/components/media/public.types.d.ts.map +1 -0
- package/dist/components/media/public.umd.js +2 -0
- package/dist/components/media/public.umd.js.map +1 -0
- package/dist/components/navigation/breadcrumbs/Breadcrumbs.d.ts +5 -0
- package/dist/components/navigation/breadcrumbs/Breadcrumbs.d.ts.map +1 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.context.d.ts +2 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.context.d.ts.map +1 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.props.d.ts +17 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.props.d.ts.map +1 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.types.d.ts +11 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.types.d.ts.map +1 -0
- package/dist/components/navigation/dock/Dock.d.ts +12 -0
- package/dist/components/navigation/dock/Dock.d.ts.map +1 -0
- package/dist/components/navigation/dock/DockItem.d.ts +5 -0
- package/dist/components/navigation/dock/DockItem.d.ts.map +1 -0
- package/dist/components/navigation/dock/dock.context.d.ts +3 -0
- package/dist/components/navigation/dock/dock.context.d.ts.map +1 -0
- package/dist/components/navigation/dock/dock.props.d.ts +30 -0
- package/dist/components/navigation/dock/dock.props.d.ts.map +1 -0
- package/dist/components/navigation/dock/dock.types.d.ts +3 -0
- package/dist/components/navigation/dock/dock.types.d.ts.map +1 -0
- package/dist/components/navigation/link/Link.d.ts +12 -0
- package/dist/components/navigation/link/Link.d.ts.map +1 -0
- package/dist/components/navigation/link/link.context.d.ts +2 -0
- package/dist/components/navigation/link/link.context.d.ts.map +1 -0
- package/dist/components/navigation/link/link.props.d.ts +21 -0
- package/dist/components/navigation/link/link.props.d.ts.map +1 -0
- package/dist/components/navigation/link/link.types.d.ts +2 -0
- package/dist/components/navigation/link/link.types.d.ts.map +1 -0
- package/dist/components/navigation/menu/Menu.d.ts +12 -0
- package/dist/components/navigation/menu/Menu.d.ts.map +1 -0
- package/dist/components/navigation/menu/MenuItem.d.ts +36 -0
- package/dist/components/navigation/menu/MenuItem.d.ts.map +1 -0
- package/dist/components/navigation/menu/menu.context.d.ts +3 -0
- package/dist/components/navigation/menu/menu.context.d.ts.map +1 -0
- package/dist/components/navigation/menu/menu.props.d.ts +61 -0
- package/dist/components/navigation/menu/menu.props.d.ts.map +1 -0
- package/dist/components/navigation/menu/menu.types.d.ts +4 -0
- package/dist/components/navigation/menu/menu.types.d.ts.map +1 -0
- package/dist/components/navigation/navbar/Navbar.d.ts +4 -0
- package/dist/components/navigation/navbar/Navbar.d.ts.map +1 -0
- package/dist/components/navigation/public.d.ts +10 -0
- package/dist/components/navigation/public.d.ts.map +1 -0
- package/dist/components/navigation/public.es.js +2 -0
- package/dist/components/navigation/public.types.d.ts +11 -0
- package/dist/components/navigation/public.types.d.ts.map +1 -0
- package/dist/components/navigation/public.umd.js +1 -0
- package/dist/components/navigation/tab/Tab.d.ts +19 -0
- package/dist/components/navigation/tab/Tab.d.ts.map +1 -0
- package/dist/components/navigation/tab/Tabs.d.ts +20 -0
- package/dist/components/navigation/tab/Tabs.d.ts.map +1 -0
- package/dist/components/navigation/tab/tab.context.d.ts +10 -0
- package/dist/components/navigation/tab/tab.context.d.ts.map +1 -0
- package/dist/components/navigation/tab/tab.props.d.ts +59 -0
- package/dist/components/navigation/tab/tab.props.d.ts.map +1 -0
- package/dist/components/navigation/tab/tab.types.d.ts +5 -0
- package/dist/components/navigation/tab/tab.types.d.ts.map +1 -0
- package/dist/composables/public.d.ts +6 -0
- package/dist/composables/public.d.ts.map +1 -0
- package/dist/composables/public.es.js +39 -0
- package/dist/composables/public.es.js.map +1 -0
- package/dist/composables/public.umd.js +2 -0
- package/dist/composables/public.umd.js.map +1 -0
- package/dist/composables/use-component-config.d.ts +27 -0
- package/dist/composables/use-component-config.d.ts.map +1 -0
- package/dist/composables/use-config.d.ts +2 -0
- package/dist/composables/use-config.d.ts.map +1 -0
- package/dist/composables/use-form-field.d.ts +24 -0
- package/dist/composables/use-form-field.d.ts.map +1 -0
- package/dist/composables/use-select-counter.d.ts +13 -0
- package/dist/composables/use-select-counter.d.ts.map +1 -0
- package/dist/composables/use-toast.d.ts +36 -0
- package/dist/composables/use-toast.d.ts.map +1 -0
- package/dist/config/config.type.d.ts +96 -0
- package/dist/config/config.type.d.ts.map +1 -0
- package/dist/config/public.d.ts +3 -0
- package/dist/config/public.d.ts.map +1 -0
- package/dist/config/public.es.js +2 -0
- package/dist/config/public.types.d.ts +2 -0
- package/dist/config/public.types.d.ts.map +1 -0
- package/dist/config/public.umd.js +1 -0
- package/dist/config/size.context.d.ts +4 -0
- package/dist/config/size.context.d.ts.map +1 -0
- package/dist/config/symbol.d.ts +4 -0
- package/dist/config/symbol.d.ts.map +1 -0
- package/dist/plugin-vue.d.ts +33 -0
- package/dist/plugin-vue.d.ts.map +1 -0
- package/dist/public-1PFjXgZ6.cjs +2 -0
- package/dist/public-1PFjXgZ6.cjs.map +1 -0
- package/dist/public-D_MhbTxP.cjs +2 -0
- package/dist/public-D_MhbTxP.cjs.map +1 -0
- package/dist/public-Dqelew6J.js +615 -0
- package/dist/public-Dqelew6J.js.map +1 -0
- package/dist/public-H9TCdoJr.js +296 -0
- package/dist/public-H9TCdoJr.js.map +1 -0
- package/dist/public.d.ts +12 -0
- package/dist/public.d.ts.map +1 -0
- package/dist/public.es.js +15 -0
- package/dist/public.es.js.map +1 -0
- package/dist/public.umd.js +2 -0
- package/dist/public.umd.js.map +1 -0
- package/dist/style.css +2 -0
- package/dist/symbol-Cleu4XHu.cjs +2 -0
- package/dist/symbol-Cleu4XHu.cjs.map +1 -0
- package/dist/symbol-CziS7Pho.js +13 -0
- package/dist/symbol-CziS7Pho.js.map +1 -0
- package/dist/toast.context-BNg0Zn09.cjs +2 -0
- package/dist/toast.context-BNg0Zn09.cjs.map +1 -0
- package/dist/toast.context-CTPY2imu.js +7 -0
- package/dist/toast.context-CTPY2imu.js.map +1 -0
- package/dist/types/public.d.ts +3 -0
- package/dist/types/public.d.ts.map +1 -0
- package/dist/types/public.es.js +0 -0
- package/dist/types/public.umd.js +1 -0
- package/dist/types/size.type.d.ts +2 -0
- package/dist/types/size.type.d.ts.map +1 -0
- package/dist/types/utils.type.d.ts +5 -0
- package/dist/types/utils.type.d.ts.map +1 -0
- package/dist/use-component-config-C-IlXF0W.cjs +2 -0
- package/dist/use-component-config-C-IlXF0W.cjs.map +1 -0
- package/dist/use-component-config-CaJQbJOW.js +20 -0
- package/dist/use-component-config-CaJQbJOW.js.map +1 -0
- package/dist/use-select-counter-CgQha-_T.cjs +2 -0
- package/dist/use-select-counter-CgQha-_T.cjs.map +1 -0
- package/dist/use-select-counter-D_-Qwz61.js +72 -0
- package/dist/use-select-counter-D_-Qwz61.js.map +1 -0
- package/dist/utils/build-class.util.d.ts +4 -0
- package/dist/utils/build-class.util.d.ts.map +1 -0
- package/dist/utils/get-validation-message.d.ts +22 -0
- package/dist/utils/get-validation-message.d.ts.map +1 -0
- package/dist/utils/path.d.ts +20 -0
- package/dist/utils/path.d.ts.map +1 -0
- package/dist/utils/props.util.d.ts +2 -0
- package/dist/utils/props.util.d.ts.map +1 -0
- package/dist/utils/public.d.ts +2 -0
- package/dist/utils/public.d.ts.map +1 -0
- package/package.json +138 -0
- package/src/components/ClassWrapper.vue +42 -0
- package/src/components/actions/button/Button.story.vue +184 -0
- package/src/components/actions/button/Button.vue +110 -0
- package/src/components/actions/button/button.context.ts +3 -0
- package/src/components/actions/button/button.props.ts +56 -0
- package/src/components/actions/button/button.types.ts +7 -0
- package/src/components/actions/dropdown/Dropdown.story.vue +360 -0
- package/src/components/actions/dropdown/Dropdown.vue +218 -0
- package/src/components/actions/dropdown/dropdown.context.ts +3 -0
- package/src/components/actions/dropdown/dropdown.props.ts +59 -0
- package/src/components/actions/dropdown/dropdown.types.ts +4 -0
- package/src/components/actions/fab/Fab.story.vue +227 -0
- package/src/components/actions/fab/Fab.vue +33 -0
- package/src/components/actions/fab/fab.context.ts +3 -0
- package/src/components/actions/fab/fab.props.ts +11 -0
- package/src/components/actions/fab/fab.types.ts +1 -0
- package/src/components/actions/modal/Modal.story.vue +285 -0
- package/src/components/actions/modal/Modal.vue +106 -0
- package/src/components/actions/modal/modal.context.ts +3 -0
- package/src/components/actions/modal/modal.props.ts +29 -0
- package/src/components/actions/modal/modal.types.ts +1 -0
- package/src/components/actions/public.ts +5 -0
- package/src/components/actions/public.types.ts +15 -0
- package/src/components/actions/swap/Swap.story.vue +302 -0
- package/src/components/actions/swap/Swap.vue +59 -0
- package/src/components/actions/swap/swap.context.ts +3 -0
- package/src/components/actions/swap/swap.props.ts +17 -0
- package/src/components/actions/swap/swap.types.ts +1 -0
- package/src/components/app/PoppyApp.vue +48 -0
- package/src/components/app/public.ts +1 -0
- package/src/components/data/checkbox/Checkbox.story.vue +206 -0
- package/src/components/data/checkbox/Checkbox.vue +139 -0
- package/src/components/data/checkbox/checkbox.context.ts +3 -0
- package/src/components/data/checkbox/checkbox.props.ts +42 -0
- package/src/components/data/checkbox/checkbox.types.ts +5 -0
- package/src/components/data/field-set/FieldSet.story.vue +163 -0
- package/src/components/data/field-set/FieldSet.vue +22 -0
- package/src/components/data/field-set/field-set.props.ts +21 -0
- package/src/components/data/form/Form.story.vue +144 -0
- package/src/components/data/form/Form.vue +235 -0
- package/src/components/data/form/form.context.ts +82 -0
- package/src/components/data/form/form.props.ts +30 -0
- package/src/components/data/form/form.types.ts +25 -0
- package/src/components/data/form-field/FormField.vue +176 -0
- package/src/components/data/form-field/form-field.context.ts +71 -0
- package/src/components/data/form-field/form-field.props.ts +42 -0
- package/src/components/data/form-field/form-field.types.ts +1 -0
- package/src/components/data/input/Input.story.vue +276 -0
- package/src/components/data/input/Input.vue +233 -0
- package/src/components/data/input/input.context.ts +3 -0
- package/src/components/data/input/input.props.ts +87 -0
- package/src/components/data/input/input.types.ts +10 -0
- package/src/components/data/public.ts +12 -0
- package/src/components/data/public.types.ts +30 -0
- package/src/components/data/radio/Radio.story.vue +228 -0
- package/src/components/data/radio/Radio.vue +152 -0
- package/src/components/data/radio/radio.context.ts +3 -0
- package/src/components/data/radio/radio.props.ts +53 -0
- package/src/components/data/radio/radio.types.ts +5 -0
- package/src/components/data/radio-group/RadioGroup.story.vue +155 -0
- package/src/components/data/radio-group/RadioGroup.vue +65 -0
- package/src/components/data/radio-group/radio-group.context.ts +14 -0
- package/src/components/data/radio-group/radio-group.props.ts +12 -0
- package/src/components/data/rating/Rating.story.vue +150 -0
- package/src/components/data/rating/Rating.vue +190 -0
- package/src/components/data/rating/rating.context.ts +3 -0
- package/src/components/data/rating/rating.props.ts +43 -0
- package/src/components/data/rating/rating.types.ts +8 -0
- package/src/components/data/select/Select.story.vue +317 -0
- package/src/components/data/select/Select.vue +747 -0
- package/src/components/data/select/select.context.ts +3 -0
- package/src/components/data/select/select.props.ts +110 -0
- package/src/components/data/select/select.types.ts +24 -0
- package/src/components/data/slider/Slider.story.vue +276 -0
- package/src/components/data/slider/Slider.vue +802 -0
- package/src/components/data/slider/slider.context.ts +3 -0
- package/src/components/data/slider/slider.props.ts +69 -0
- package/src/components/data/slider/slider.types.ts +11 -0
- package/src/components/data/textarea/Textarea.story.vue +222 -0
- package/src/components/data/textarea/Textarea.vue +168 -0
- package/src/components/data/textarea/textarea.context.ts +3 -0
- package/src/components/data/textarea/textarea.props.ts +71 -0
- package/src/components/data/textarea/textarea.types.ts +7 -0
- package/src/components/data/toggle/Toggle.story.vue +195 -0
- package/src/components/data/toggle/Toggle.vue +136 -0
- package/src/components/data/toggle/toggle.context.ts +3 -0
- package/src/components/data/toggle/toggle.props.ts +40 -0
- package/src/components/data/toggle/toggle.types.ts +5 -0
- package/src/components/display/accordion/Accordion.story.vue +482 -0
- package/src/components/display/accordion/Accordion.vue +112 -0
- package/src/components/display/accordion/AccordionItem.vue +111 -0
- package/src/components/display/accordion/accordion-item.context.ts +3 -0
- package/src/components/display/accordion/accordion-item.props.ts +20 -0
- package/src/components/display/accordion/accordion-item.types.ts +1 -0
- package/src/components/display/accordion/accordion.context.ts +10 -0
- package/src/components/display/accordion/accordion.props.ts +16 -0
- package/src/components/display/avatar/Avatar.story.vue +341 -0
- package/src/components/display/avatar/Avatar.vue +57 -0
- package/src/components/display/avatar/avatar.context.ts +3 -0
- package/src/components/display/avatar/avatar.props.ts +44 -0
- package/src/components/display/avatar/avatar.types.ts +5 -0
- package/src/components/display/badge/Badge.story.vue +156 -0
- package/src/components/display/badge/Badge.vue +51 -0
- package/src/components/display/badge/badge.context.ts +3 -0
- package/src/components/display/badge/badge.props.ts +22 -0
- package/src/components/display/badge/badge.types.ts +5 -0
- package/src/components/display/card/Card.story.vue +312 -0
- package/src/components/display/card/Card.vue +40 -0
- package/src/components/display/card/CardActions.vue +30 -0
- package/src/components/display/card/CardBody.vue +5 -0
- package/src/components/display/card/CardTitle.vue +5 -0
- package/src/components/display/card/card-actions.context.ts +3 -0
- package/src/components/display/card/card-actions.props.ts +15 -0
- package/src/components/display/card/card-actions.types.ts +1 -0
- package/src/components/display/card/card.context.ts +3 -0
- package/src/components/display/card/card.props.ts +29 -0
- package/src/components/display/card/card.types.ts +4 -0
- package/src/components/display/carousel/Carousel.story.vue +216 -0
- package/src/components/display/carousel/Carousel.vue +156 -0
- package/src/components/display/carousel/carousel.context.ts +3 -0
- package/src/components/display/carousel/carousel.props.ts +51 -0
- package/src/components/display/carousel/carousel.types.ts +2 -0
- package/src/components/display/chat/Chat.story.vue +251 -0
- package/src/components/display/chat/Chat.vue +56 -0
- package/src/components/display/chat/chat.context.ts +3 -0
- package/src/components/display/chat/chat.props.ts +19 -0
- package/src/components/display/chat/chat.types.ts +2 -0
- package/src/components/display/countdown/Countdown.story.vue +285 -0
- package/src/components/display/countdown/Countdown.vue +114 -0
- package/src/components/display/countdown/countdown.context.ts +3 -0
- package/src/components/display/countdown/countdown.props.ts +26 -0
- package/src/components/display/countdown/countdown.types.ts +24 -0
- package/src/components/display/diff/Diff.story.vue +118 -0
- package/src/components/display/diff/Diff.vue +13 -0
- package/src/components/display/hover-3d/Hover3d.story.vue +154 -0
- package/src/components/display/hover-3d/Hover3d.vue +37 -0
- package/src/components/display/hover-3d/hover-3d.props.ts +9 -0
- package/src/components/display/hover-gallery/HoverGallery.story.vue +121 -0
- package/src/components/display/hover-gallery/HoverGallery.vue +5 -0
- package/src/components/display/kbd/Kbd.story.vue +214 -0
- package/src/components/display/kbd/Kbd.vue +32 -0
- package/src/components/display/kbd/kbd.context.ts +3 -0
- package/src/components/display/kbd/kbd.props.ts +12 -0
- package/src/components/display/kbd/kbd.types.ts +3 -0
- package/src/components/display/list/List.story.vue +381 -0
- package/src/components/display/list/List.vue +14 -0
- package/src/components/display/list/ListItem.vue +53 -0
- package/src/components/display/list/list-item.props.ts +19 -0
- package/src/components/display/list/list.props.ts +7 -0
- package/src/components/display/public.ts +20 -0
- package/src/components/display/public.types.ts +40 -0
- package/src/components/display/stat/Stat.story.vue +181 -0
- package/src/components/display/stat/Stat.vue +43 -0
- package/src/components/display/stat/Stats.vue +29 -0
- package/src/components/display/stat/stat.context.ts +3 -0
- package/src/components/display/stat/stat.props.ts +50 -0
- package/src/components/display/stat/stat.types.ts +1 -0
- package/src/components/display/stat/stats.context.ts +3 -0
- package/src/components/display/stat/stats.props.ts +11 -0
- package/src/components/display/stat/stats.types.ts +1 -0
- package/src/components/display/status/Status.story.vue +195 -0
- package/src/components/display/status/Status.vue +70 -0
- package/src/components/display/status/status.context.ts +3 -0
- package/src/components/display/status/status.props.ts +30 -0
- package/src/components/display/status/status.types.ts +5 -0
- package/src/components/feedback/alert/Alert.story.vue +243 -0
- package/src/components/feedback/alert/Alert.vue +46 -0
- package/src/components/feedback/alert/alert.context.ts +3 -0
- package/src/components/feedback/alert/alert.props.ts +29 -0
- package/src/components/feedback/alert/alert.types.ts +3 -0
- package/src/components/feedback/loading/Loading.story.vue +156 -0
- package/src/components/feedback/loading/Loading.vue +55 -0
- package/src/components/feedback/loading/loading.context.ts +3 -0
- package/src/components/feedback/loading/loading.props.ts +25 -0
- package/src/components/feedback/loading/loading.types.ts +5 -0
- package/src/components/feedback/progress/Progress.story.vue +96 -0
- package/src/components/feedback/progress/Progress.vue +36 -0
- package/src/components/feedback/progress/progress.context.ts +3 -0
- package/src/components/feedback/progress/progress.props.ts +27 -0
- package/src/components/feedback/progress/progress.types.ts +1 -0
- package/src/components/feedback/public.ts +5 -0
- package/src/components/feedback/public.types.ts +18 -0
- package/src/components/feedback/radial-progress/RadialProgress.story.vue +118 -0
- package/src/components/feedback/radial-progress/RadialProgress.vue +46 -0
- package/src/components/feedback/radial-progress/radial-progress.context.ts +3 -0
- package/src/components/feedback/radial-progress/radial-progress.props.ts +35 -0
- package/src/components/feedback/radial-progress/radial-progress.types.ts +9 -0
- package/src/components/feedback/toast/Toast.story.vue +356 -0
- package/src/components/feedback/toast/Toast.vue +40 -0
- package/src/components/feedback/toast/toast.context.ts +12 -0
- package/src/components/feedback/toast/toast.props.ts +33 -0
- package/src/components/feedback/toast/toast.types.ts +5 -0
- package/src/components/feedback/tooltip/Tooltip.story.vue +256 -0
- package/src/components/feedback/tooltip/Tooltip.vue +123 -0
- package/src/components/feedback/tooltip/tooltip.context.ts +3 -0
- package/src/components/feedback/tooltip/tooltip.props.ts +44 -0
- package/src/components/feedback/tooltip/tooltip.types.ts +2 -0
- package/src/components/layout/divider/Divider.story.vue +217 -0
- package/src/components/layout/divider/Divider.vue +48 -0
- package/src/components/layout/divider/divider.context.ts +3 -0
- package/src/components/layout/divider/divider.props.ts +28 -0
- package/src/components/layout/divider/divider.types.ts +3 -0
- package/src/components/layout/drawer/Drawer.story.vue +301 -0
- package/src/components/layout/drawer/Drawer.vue +88 -0
- package/src/components/layout/drawer/drawer.context.ts +3 -0
- package/src/components/layout/drawer/drawer.props.ts +25 -0
- package/src/components/layout/drawer/drawer.types.ts +6 -0
- package/src/components/layout/indicator/Indicator.story.vue +264 -0
- package/src/components/layout/indicator/Indicator.vue +43 -0
- package/src/components/layout/indicator/indicator.context.ts +3 -0
- package/src/components/layout/indicator/indicator.props.ts +27 -0
- package/src/components/layout/indicator/indicator.types.ts +2 -0
- package/src/components/layout/join/Join.story.vue +147 -0
- package/src/components/layout/join/Join.vue +32 -0
- package/src/components/layout/join/join.context.ts +3 -0
- package/src/components/layout/join/join.props.ts +14 -0
- package/src/components/layout/join/join.types.ts +1 -0
- package/src/components/layout/mask/Mask.story.vue +181 -0
- package/src/components/layout/mask/Mask.vue +49 -0
- package/src/components/layout/mask/mask.context.ts +3 -0
- package/src/components/layout/mask/mask.props.ts +36 -0
- package/src/components/layout/mask/mask.types.ts +18 -0
- package/src/components/layout/public.ts +6 -0
- package/src/components/layout/public.types.ts +18 -0
- package/src/components/layout/stack/Stack.story.vue +170 -0
- package/src/components/layout/stack/Stack.vue +29 -0
- package/src/components/layout/stack/stack.context.ts +3 -0
- package/src/components/layout/stack/stack.props.ts +12 -0
- package/src/components/layout/stack/stack.types.ts +1 -0
- package/src/components/media/img/Img.story.vue +214 -0
- package/src/components/media/img/Img.vue +189 -0
- package/src/components/media/img/img.context.ts +3 -0
- package/src/components/media/img/img.props.ts +88 -0
- package/src/components/media/img/img.types.ts +35 -0
- package/src/components/media/public.ts +1 -0
- package/src/components/media/public.types.ts +3 -0
- package/src/components/navigation/breadcrumbs/Breadcrumbs.story.vue +94 -0
- package/src/components/navigation/breadcrumbs/Breadcrumbs.vue +53 -0
- package/src/components/navigation/breadcrumbs/breadcrumbs.context.ts +3 -0
- package/src/components/navigation/breadcrumbs/breadcrumbs.props.ts +18 -0
- package/src/components/navigation/breadcrumbs/breadcrumbs.types.ts +13 -0
- package/src/components/navigation/dock/Dock.story.vue +109 -0
- package/src/components/navigation/dock/Dock.vue +32 -0
- package/src/components/navigation/dock/DockItem.vue +50 -0
- package/src/components/navigation/dock/dock.context.ts +4 -0
- package/src/components/navigation/dock/dock.props.ts +34 -0
- package/src/components/navigation/dock/dock.types.ts +3 -0
- package/src/components/navigation/link/Link.story.vue +129 -0
- package/src/components/navigation/link/Link.vue +57 -0
- package/src/components/navigation/link/link.context.ts +3 -0
- package/src/components/navigation/link/link.props.ts +20 -0
- package/src/components/navigation/link/link.types.ts +1 -0
- package/src/components/navigation/menu/Menu.story.vue +284 -0
- package/src/components/navigation/menu/Menu.vue +41 -0
- package/src/components/navigation/menu/MenuItem.vue +106 -0
- package/src/components/navigation/menu/menu.context.ts +4 -0
- package/src/components/navigation/menu/menu.props.ts +59 -0
- package/src/components/navigation/menu/menu.types.ts +4 -0
- package/src/components/navigation/navbar/Navbar.story.vue +154 -0
- package/src/components/navigation/navbar/Navbar.vue +8 -0
- package/src/components/navigation/public.ts +9 -0
- package/src/components/navigation/public.types.ts +15 -0
- package/src/components/navigation/tab/Tab.story.vue +186 -0
- package/src/components/navigation/tab/Tab.vue +106 -0
- package/src/components/navigation/tab/Tabs.vue +76 -0
- package/src/components/navigation/tab/tab.context.ts +13 -0
- package/src/components/navigation/tab/tab.props.ts +57 -0
- package/src/components/navigation/tab/tab.types.ts +5 -0
- package/src/composables/public.ts +5 -0
- package/src/composables/use-component-config.ts +44 -0
- package/src/composables/use-config.ts +6 -0
- package/src/composables/use-form-field.ts +99 -0
- package/src/composables/use-select-counter.ts +58 -0
- package/src/composables/use-toast.ts +47 -0
- package/src/config/config.type.ts +109 -0
- package/src/config/public.ts +2 -0
- package/src/config/public.types.ts +1 -0
- package/src/config/size.context.ts +4 -0
- package/src/config/symbol.ts +15 -0
- package/src/histoire.css +8 -0
- package/src/plugin-vue.ts +54 -0
- package/src/public.ts +12 -0
- package/src/stories/Configuration.story.md +55 -0
- package/src/types/public.ts +2 -0
- package/src/types/size.type.ts +1 -0
- package/src/types/utils.type.ts +5 -0
- package/src/utils/build-class.util.ts +38 -0
- package/src/utils/get-validation-message.ts +61 -0
- package/src/utils/path.ts +102 -0
- package/src/utils/props.util.ts +11 -0
- package/src/utils/public.ts +1 -0
- package/src/vite-env.d.ts +11 -0
- package/src/vue.d.ts +15 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Button from '@/components/actions/button/Button.vue'
|
|
3
|
+
import Alert from '@/components/feedback/alert/Alert.vue'
|
|
4
|
+
import { reactive, ref, shallowRef, useTemplateRef } from 'vue'
|
|
5
|
+
import { createI18n } from 'vue-i18n'
|
|
6
|
+
import Form from './Form.vue'
|
|
7
|
+
import type { FormProps } from './form.props'
|
|
8
|
+
import type { FormSerializer } from './form.types'
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
const model = ref<Record<string, unknown>>({
|
|
13
|
+
email: '',
|
|
14
|
+
name: '',
|
|
15
|
+
age: '',
|
|
16
|
+
bio: '',
|
|
17
|
+
agree: false,
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
const state = reactive<Omit<FormProps, 'serializer'>>({
|
|
21
|
+
counter: false,
|
|
22
|
+
counterFormat: '{current} / {max}',
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
const serverErrorModel = ref<Record<string, unknown>>({ email: '', password: '' })
|
|
26
|
+
|
|
27
|
+
const serializedOutput = shallowRef<string>('')
|
|
28
|
+
|
|
29
|
+
const serializer: FormSerializer = (data) => ({
|
|
30
|
+
...data,
|
|
31
|
+
age: Number(data.age),
|
|
32
|
+
submittedAt: new Date().toISOString(),
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
function onSubmit(data: Record<string, unknown>) {
|
|
36
|
+
serializedOutput.value = JSON.stringify(data, null, 2)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const formErrorEl = useTemplateRef('form-error')
|
|
40
|
+
function onFormErrorSubmit() {
|
|
41
|
+
formErrorEl.value?.setFieldError('$', 'Global Error')
|
|
42
|
+
}
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<Story group="components" title="Data/Form" auto-props-disabled :setup-app="({ app }) => {
|
|
47
|
+
app.use(createI18n({}))
|
|
48
|
+
}">
|
|
49
|
+
<!-- ── Default / playground ─────────────────────────────────────────── -->
|
|
50
|
+
<Variant title="Default" id="default">
|
|
51
|
+
<template #controls>
|
|
52
|
+
<HstCheckbox v-model="(state.counter as boolean)" title="counter" />
|
|
53
|
+
<HstText v-model="(state.counterFormat as string)" title="counterFormat" />
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<Form v-model="model" v-bind="state" @submit="onSubmit">
|
|
57
|
+
<pre v-if="serializedOutput" class="text-xs bg-base-200 p-2 rounded mb-4">{{ serializedOutput }}</pre>
|
|
58
|
+
<Button type="submit" class="btn btn-primary w-full mt-4">Submit</Button>
|
|
59
|
+
<Button type="reset" class="btn btn-ghost w-full mt-2">Reset</Button>
|
|
60
|
+
</Form>
|
|
61
|
+
</Variant>
|
|
62
|
+
|
|
63
|
+
<!-- ── With serializer ──────────────────────────────────────────────── -->
|
|
64
|
+
<Variant title="With Serializer" id="serializer">
|
|
65
|
+
<Form
|
|
66
|
+
v-model="model"
|
|
67
|
+
:serializer="serializer"
|
|
68
|
+
@submit="onSubmit"
|
|
69
|
+
>
|
|
70
|
+
<pre v-if="serializedOutput" class="text-xs bg-base-200 p-2 rounded mb-4">{{ serializedOutput }}</pre>
|
|
71
|
+
<Button type="submit" class="btn btn-primary mt-4">Submit (age coerced to number)</Button>
|
|
72
|
+
</Form>
|
|
73
|
+
</Variant>
|
|
74
|
+
|
|
75
|
+
<!-- ── Global form error ─────────────────────────────────────────────── -->
|
|
76
|
+
<Variant title="Global Error" id="global-error">
|
|
77
|
+
<div id="top-error"></div>
|
|
78
|
+
|
|
79
|
+
<Form ref="form-error" v-model="serverErrorModel" @submit="onFormErrorSubmit">
|
|
80
|
+
<template #error="{ error }">
|
|
81
|
+
<Teleport to="#top-error">
|
|
82
|
+
<Alert color="error" class="mt-2">
|
|
83
|
+
<span>{{ error }}</span>
|
|
84
|
+
</Alert>
|
|
85
|
+
</Teleport>
|
|
86
|
+
</template>
|
|
87
|
+
<Button type="submit" class="btn btn-primary mt-4">Submit</Button>
|
|
88
|
+
</Form>
|
|
89
|
+
</Variant>
|
|
90
|
+
</Story>
|
|
91
|
+
</template>
|
|
92
|
+
|
|
93
|
+
<docs lang="md">
|
|
94
|
+
# Form
|
|
95
|
+
|
|
96
|
+
## Description
|
|
97
|
+
|
|
98
|
+
The `Form` component is the root of the form system.
|
|
99
|
+
It provides a `FormContext` to all descendant `FormField` and input components via Vue's `provide/inject`.
|
|
100
|
+
It owns the form data object, the errors record, and all field state.
|
|
101
|
+
It handles programmatic validation, serialization, and emits `submit` / `reset` events.
|
|
102
|
+
|
|
103
|
+
`novalidate` is always set on the `<form />` element to suppress native browser popups. Validation is handled programmatically via the HTML5 Constraint Validation API.
|
|
104
|
+
|
|
105
|
+
## API
|
|
106
|
+
|
|
107
|
+
### v-model
|
|
108
|
+
|
|
109
|
+
| Name | Type | Modifiers | Description |
|
|
110
|
+
|--------------|------------------------------|-----------|----------------------------------|
|
|
111
|
+
| `modelValue` | `{ [key: string]: unknown }` | - | The form data object (required). |
|
|
112
|
+
|
|
113
|
+
### Props
|
|
114
|
+
|
|
115
|
+
| Prop | Type | Default | Configurable | Description |
|
|
116
|
+
|-----------------|----------------------|-----------------------|--------------|-------------------------------------------------|
|
|
117
|
+
| `counter` | `boolean` | `false` | :x: | Propagates counter display to all child inputs. |
|
|
118
|
+
| `counterFormat` | `string \| Function` | `'{current} / {max}'` | :x: | Default counter format for all child inputs. |
|
|
119
|
+
| `serializer` | `FormSerializer` | `undefined` | :x: | Transforms data before the `submit` event. |
|
|
120
|
+
|
|
121
|
+
### Events
|
|
122
|
+
|
|
123
|
+
| Event | Payload | Description |
|
|
124
|
+
|----------|------------------------------|------------------------------------------------------|
|
|
125
|
+
| `submit` | `{ [key: string]: unknown }` | Fired after successful validation and serialization. |
|
|
126
|
+
| `reset` | `undefined` | Fired when the form is reset. |
|
|
127
|
+
|
|
128
|
+
### Slots
|
|
129
|
+
|
|
130
|
+
| Slot | Bindings | Description |
|
|
131
|
+
|-----------|----------------------------------|------------------------------------------------------------|
|
|
132
|
+
| `default` | - | Form content undefined FormField components, buttons, etc. |
|
|
133
|
+
| `error` | `{ error: string \| undefined }` | Global error rendering. |
|
|
134
|
+
|
|
135
|
+
## Usage
|
|
136
|
+
```vue
|
|
137
|
+
<Form v-model="formData" :serializer="mySerializer" @submit="onSubmit">
|
|
138
|
+
<FormField name="email" label="Email">
|
|
139
|
+
<Input type="email" required />
|
|
140
|
+
</FormField>
|
|
141
|
+
<button type="submit" class="btn btn-primary">Submit</button>
|
|
142
|
+
</Form>
|
|
143
|
+
```
|
|
144
|
+
</docs>
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { CounterFn } from '@/types/utils.type'
|
|
3
|
+
import { getByPath, setByPath } from '@/utils/path'
|
|
4
|
+
import { provide, shallowReactive, shallowRef, watch } from 'vue'
|
|
5
|
+
import type { FormContext } from './form.context'
|
|
6
|
+
import { FORM_CONTEXT_KEY } from './form.context'
|
|
7
|
+
import type { FormProps } from './form.props'
|
|
8
|
+
import type { FieldState } from './form.types'
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
const props = defineProps<FormProps>()
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The form data object. All field values are stored under their name/path key.
|
|
16
|
+
* Supports nested paths and arrays via dot-notation.
|
|
17
|
+
*/
|
|
18
|
+
const model = defineModel<Record<string, unknown>>({ required: true })
|
|
19
|
+
|
|
20
|
+
const emit = defineEmits<{
|
|
21
|
+
/**
|
|
22
|
+
* Fired on form submit after serialization.
|
|
23
|
+
* The payload is the raw data (or serialized data if `serializer` is set).
|
|
24
|
+
*/
|
|
25
|
+
submit: [data: Record<string, unknown>]
|
|
26
|
+
/** Fired on form reset. Data is restored to the initial model value. */
|
|
27
|
+
reset: []
|
|
28
|
+
}>()
|
|
29
|
+
|
|
30
|
+
// Internal state
|
|
31
|
+
|
|
32
|
+
const initialData: Record<string, unknown> = JSON.parse(JSON.stringify(model.value ?? {}))
|
|
33
|
+
|
|
34
|
+
// Shallow reactive copy — mutations here don't affect the model until emitted
|
|
35
|
+
const data = shallowReactive<Record<string, unknown>>({ ...model.value })
|
|
36
|
+
|
|
37
|
+
const errors = shallowRef<Record<string, string | undefined>>({})
|
|
38
|
+
|
|
39
|
+
const fieldStates = shallowReactive<Record<string, FieldState>>({})
|
|
40
|
+
|
|
41
|
+
// Keep data in sync when the model is updated externally
|
|
42
|
+
watch(model, val => Object.assign(data, val))
|
|
43
|
+
|
|
44
|
+
// Counter — stored as raw boolean | undefined.
|
|
45
|
+
// undefined = "no opinion": mergeProps in useComponentConfig skips it,
|
|
46
|
+
// letting pluginConfig / defaults take over.
|
|
47
|
+
// false = explicitly disabled: mergeProps propagates it, overriding any lower-priority true.
|
|
48
|
+
|
|
49
|
+
const counter = shallowRef<boolean | undefined>(
|
|
50
|
+
props.counter !== undefined ? props.counter : undefined,
|
|
51
|
+
)
|
|
52
|
+
const counterFormat = shallowRef<string | CounterFn | undefined>(props.counterFormat)
|
|
53
|
+
|
|
54
|
+
watch(() => props.counter, val => {
|
|
55
|
+
counter.value = val !== undefined ? val : undefined
|
|
56
|
+
})
|
|
57
|
+
watch(() => props.counterFormat, (val) => { counterFormat.value = val })
|
|
58
|
+
|
|
59
|
+
// Field state helpers
|
|
60
|
+
|
|
61
|
+
function ensureFieldState(path: string): FieldState {
|
|
62
|
+
if (!fieldStates[path]) {
|
|
63
|
+
fieldStates[path] = {
|
|
64
|
+
value: getByPath(data, path),
|
|
65
|
+
isDirty: false,
|
|
66
|
+
isTouched: false,
|
|
67
|
+
isValid: true,
|
|
68
|
+
hasError: false,
|
|
69
|
+
error: undefined,
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return fieldStates[path]
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// FormContext implementation
|
|
76
|
+
|
|
77
|
+
function setFieldValue(path: string, value: unknown): void {
|
|
78
|
+
setByPath(data, path, value)
|
|
79
|
+
const state = ensureFieldState(path)
|
|
80
|
+
state.value = value
|
|
81
|
+
model.value = { ...data }
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function getFieldValue(path: string): unknown {
|
|
85
|
+
return getByPath(data, path)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function setValues(values: Record<string, unknown>): void {
|
|
89
|
+
Object.assign(data, values)
|
|
90
|
+
model.value = { ...data }
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function getFieldError(path: string): string | undefined {
|
|
94
|
+
return errors.value[path]
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function setFieldError(path: string, message: string | undefined): void {
|
|
98
|
+
errors.value = { ...errors.value, [path]: message }
|
|
99
|
+
const state = ensureFieldState(path)
|
|
100
|
+
state.error = message
|
|
101
|
+
state.isValid = !message
|
|
102
|
+
state.hasError = !!message
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function setErrors(newErrors: Record<string, string | undefined>): void {
|
|
106
|
+
errors.value = { ...newErrors }
|
|
107
|
+
for (const [path, message] of Object.entries(newErrors)) {
|
|
108
|
+
const state = ensureFieldState(path)
|
|
109
|
+
state.error = message
|
|
110
|
+
state.isValid = !message
|
|
111
|
+
state.hasError = !!message
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function clearErrors(path?: string): void {
|
|
116
|
+
if (path != null) {
|
|
117
|
+
const { [path]: _removed, ...rest } = errors.value
|
|
118
|
+
errors.value = rest
|
|
119
|
+
const state = fieldStates[path]
|
|
120
|
+
if (state) {
|
|
121
|
+
state.error = undefined
|
|
122
|
+
state.isValid = true
|
|
123
|
+
state.hasError = false
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
errors.value = {}
|
|
127
|
+
for (const state of Object.values(fieldStates)) {
|
|
128
|
+
state.error = undefined
|
|
129
|
+
state.isValid = true
|
|
130
|
+
state.hasError = false
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function getFieldState(path: string): FieldState {
|
|
136
|
+
return ensureFieldState(path)
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function setDirty(path: string, value = true): void {
|
|
140
|
+
ensureFieldState(path).isDirty = value
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function setTouched(path: string, value = true): void {
|
|
144
|
+
ensureFieldState(path).isTouched = value
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Registered validate callbacks from child inputs (via useFormField)
|
|
148
|
+
const validators: Map<symbol, () => boolean> = new Map()
|
|
149
|
+
|
|
150
|
+
function registerValidator(key: symbol, fn: () => boolean): void {
|
|
151
|
+
validators.set(key, fn)
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function unregisterValidator(key: symbol): void {
|
|
155
|
+
validators.delete(key)
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function validate(): boolean {
|
|
159
|
+
let allValid = true
|
|
160
|
+
for (const [, validateFn] of validators) {
|
|
161
|
+
if (!validateFn()) allValid = false
|
|
162
|
+
}
|
|
163
|
+
return allValid
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function reset(): void {
|
|
167
|
+
// Clear all current keys, then restore snapshot taken at component creation
|
|
168
|
+
for (const key of Object.keys(data)) {
|
|
169
|
+
delete data[key]
|
|
170
|
+
}
|
|
171
|
+
Object.assign(data, JSON.parse(JSON.stringify(initialData)))
|
|
172
|
+
model.value = { ...data }
|
|
173
|
+
clearErrors()
|
|
174
|
+
for (const path of Object.keys(fieldStates)) {
|
|
175
|
+
fieldStates[path] = {
|
|
176
|
+
value: getByPath(data, path),
|
|
177
|
+
isDirty: false,
|
|
178
|
+
isTouched: false,
|
|
179
|
+
isValid: true,
|
|
180
|
+
hasError: false,
|
|
181
|
+
error: undefined,
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
emit('reset')
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Provide context
|
|
188
|
+
|
|
189
|
+
const formContext: FormContext = {
|
|
190
|
+
errors,
|
|
191
|
+
data,
|
|
192
|
+
counter,
|
|
193
|
+
counterFormat,
|
|
194
|
+
setFieldValue,
|
|
195
|
+
getFieldValue,
|
|
196
|
+
setValues,
|
|
197
|
+
getFieldError,
|
|
198
|
+
setFieldError,
|
|
199
|
+
setErrors,
|
|
200
|
+
clearErrors,
|
|
201
|
+
getFieldState,
|
|
202
|
+
setDirty,
|
|
203
|
+
setTouched,
|
|
204
|
+
validate,
|
|
205
|
+
reset,
|
|
206
|
+
registerValidator,
|
|
207
|
+
unregisterValidator,
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
provide(FORM_CONTEXT_KEY, formContext)
|
|
211
|
+
defineExpose(formContext)
|
|
212
|
+
|
|
213
|
+
// Submit handler
|
|
214
|
+
|
|
215
|
+
function handleSubmit(): void {
|
|
216
|
+
const isValid = validate()
|
|
217
|
+
if (!isValid) return
|
|
218
|
+
|
|
219
|
+
const serialized = props.serializer?.({ ...data }) ?? { ...data }
|
|
220
|
+
emit('submit', serialized)
|
|
221
|
+
}
|
|
222
|
+
</script>
|
|
223
|
+
|
|
224
|
+
<template>
|
|
225
|
+
<form novalidate @submit.prevent="handleSubmit" @reset.prevent="reset">
|
|
226
|
+
<slot />
|
|
227
|
+
<slot
|
|
228
|
+
v-if="errors['$']"
|
|
229
|
+
name="error"
|
|
230
|
+
:error="errors['$']"
|
|
231
|
+
>
|
|
232
|
+
<p class="text-error text-sm mt-2" role="alert">{{ errors['$'] }}</p>
|
|
233
|
+
</slot>
|
|
234
|
+
</form>
|
|
235
|
+
</template>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { InjectionKey, ShallowRef } from 'vue'
|
|
2
|
+
import type { FieldState } from './form.types'
|
|
3
|
+
|
|
4
|
+
export interface FormContext {
|
|
5
|
+
/**
|
|
6
|
+
* Unified error record.
|
|
7
|
+
* Global form error is stored under the `"$"` key.
|
|
8
|
+
* Per-field errors are stored under their dot-notation field name/path.
|
|
9
|
+
*
|
|
10
|
+
* @example { '$': 'Server error', 'email': 'Invalid email', 'address.street': 'Required' }
|
|
11
|
+
*/
|
|
12
|
+
errors: ShallowRef<Record<string, string | undefined>>
|
|
13
|
+
|
|
14
|
+
/** Shallow reactive mirror of the form's v-model data. */
|
|
15
|
+
data: Record<string, unknown>
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Counter config — exposed as raw `boolean | undefined`.
|
|
19
|
+
* `undefined` means "no opinion" — inputs resolve the final value themselves
|
|
20
|
+
* via `mergeProps` in `useComponentConfig`.
|
|
21
|
+
*/
|
|
22
|
+
counter: ShallowRef<boolean | undefined>
|
|
23
|
+
counterFormat: ShallowRef<string | ((c: number, min?: number, max?: number) => string) | undefined>
|
|
24
|
+
|
|
25
|
+
// ── Field value methods ─────────────────────────────────────────────────
|
|
26
|
+
|
|
27
|
+
/** Sets a single field value by dot-notation path. Supports nested objects and arrays. */
|
|
28
|
+
setFieldValue: (path: string, value: unknown) => void
|
|
29
|
+
|
|
30
|
+
/** Returns the current value at a dot-notation path. */
|
|
31
|
+
getFieldValue: (path: string) => unknown
|
|
32
|
+
|
|
33
|
+
/** Replaces the entire data record and emits update:modelValue. */
|
|
34
|
+
setValues: (values: Record<string, unknown>) => void
|
|
35
|
+
|
|
36
|
+
// ── Field error methods ─────────────────────────────────────────────────
|
|
37
|
+
|
|
38
|
+
/** Returns the error string for a path, or "$" for the global error. */
|
|
39
|
+
getFieldError: (path: string) => string | undefined
|
|
40
|
+
|
|
41
|
+
/** Sets an error on a specific field (or "$" for global). */
|
|
42
|
+
setFieldError: (path: string, message: string | undefined) => void
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Replaces the entire errors record.
|
|
46
|
+
* Use "$" key for the global error.
|
|
47
|
+
*/
|
|
48
|
+
setErrors: (errors: Record<string, string | undefined>) => void
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Clears all errors, or a specific field's error if `path` is provided.
|
|
52
|
+
* Pass `"$"` to clear only the global error.
|
|
53
|
+
*/
|
|
54
|
+
clearErrors: (path?: string) => void
|
|
55
|
+
|
|
56
|
+
// ── Field state methods ─────────────────────────────────────────────────
|
|
57
|
+
|
|
58
|
+
/** Returns the full FieldState for a given path. */
|
|
59
|
+
getFieldState: (path: string) => FieldState
|
|
60
|
+
|
|
61
|
+
/** Marks a field as dirty (user has changed its value). */
|
|
62
|
+
setDirty: (path: string, value?: boolean) => void
|
|
63
|
+
|
|
64
|
+
/** Marks a field as touched (user has blurred the input). */
|
|
65
|
+
setTouched: (path: string, value?: boolean) => void
|
|
66
|
+
|
|
67
|
+
// ── Form-level methods ──────────────────────────────────────────────────
|
|
68
|
+
|
|
69
|
+
/** Triggers validation on all registered fields. Returns true if all valid. */
|
|
70
|
+
validate: () => boolean
|
|
71
|
+
|
|
72
|
+
/** Resets data to initial values, clears all errors and field states. */
|
|
73
|
+
reset: () => void
|
|
74
|
+
|
|
75
|
+
/** Registers a field validator (called on form submit). Key must be unique per input instance. */
|
|
76
|
+
registerValidator: (key: symbol, fn: () => boolean) => void
|
|
77
|
+
|
|
78
|
+
/** Removes a previously registered field validator. */
|
|
79
|
+
unregisterValidator: (key: symbol) => void
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export const FORM_CONTEXT_KEY: InjectionKey<FormContext> = Symbol('FormContext')
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { CounterFn } from '@/types/utils.type'
|
|
2
|
+
import type { FormSerializer } from './form.types'
|
|
3
|
+
|
|
4
|
+
export interface FormConfigurableProps {
|
|
5
|
+
/**
|
|
6
|
+
* Propagates a counter display to all child inputs that support it.
|
|
7
|
+
* Can be overridden at FormField or input level.
|
|
8
|
+
*
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
counter?: boolean
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Default counter format applied to all child inputs.
|
|
15
|
+
* Can be overridden at FormField or input level.
|
|
16
|
+
*
|
|
17
|
+
* @default (current, min, max) => `${current} / ${max}`
|
|
18
|
+
*/
|
|
19
|
+
counterFormat?: string | CounterFn
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface FormProps extends FormConfigurableProps {
|
|
23
|
+
/**
|
|
24
|
+
* Transforms the form data before it is passed to the `submit` event.
|
|
25
|
+
* If not provided, the raw data object is emitted as-is.
|
|
26
|
+
*
|
|
27
|
+
* @example (data) => ({ ...data, createdAt: new Date().toISOString() })
|
|
28
|
+
*/
|
|
29
|
+
serializer?: FormSerializer
|
|
30
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Full state for a single registered field in the form.
|
|
3
|
+
*/
|
|
4
|
+
export interface FieldState {
|
|
5
|
+
/** Current value. */
|
|
6
|
+
value: unknown
|
|
7
|
+
/** True after the user has changed the value at least once. */
|
|
8
|
+
isDirty: boolean
|
|
9
|
+
/** True after the input has lost focus at least once. */
|
|
10
|
+
isTouched: boolean
|
|
11
|
+
/** True when the field has no active error. */
|
|
12
|
+
isValid: boolean
|
|
13
|
+
/** True when there is an active error string. */
|
|
14
|
+
hasError: boolean
|
|
15
|
+
/** The current error string, or undefined. */
|
|
16
|
+
error: string | undefined
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Transforms the raw form data before it is emitted in the submit event.
|
|
21
|
+
* Use to parse, rename, or restructure fields.
|
|
22
|
+
*
|
|
23
|
+
* @example (data) => ({ ...data, age: Number(data.age) })
|
|
24
|
+
*/
|
|
25
|
+
export type FormSerializer<T = Record<string, unknown>> = (data: Record<string, unknown>) => T
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { computed, inject, provide, shallowRef, watch } from 'vue'
|
|
3
|
+
import { FORM_CONTEXT_KEY } from '../form/form.context'
|
|
4
|
+
import type { FieldState } from '../form/form.types'
|
|
5
|
+
import type { FormFieldContext } from './form-field.context'
|
|
6
|
+
import { FORM_FIELD_CONTEXT_KEY } from './form-field.context'
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts">
|
|
10
|
+
import type { FormFieldProps } from './form-field.props'
|
|
11
|
+
|
|
12
|
+
const props = defineProps<FormFieldProps>()
|
|
13
|
+
|
|
14
|
+
// Inject parent Form context (optional)
|
|
15
|
+
|
|
16
|
+
const formCtx = inject(FORM_CONTEXT_KEY, null)
|
|
17
|
+
|
|
18
|
+
// Required state — pushed by child inputs via setRequired()
|
|
19
|
+
|
|
20
|
+
const required = shallowRef<boolean>(false)
|
|
21
|
+
|
|
22
|
+
// Counter config — same lazy-undefined logic as Form.
|
|
23
|
+
|
|
24
|
+
const counter = shallowRef<boolean | undefined>(
|
|
25
|
+
props.counter !== undefined ? props.counter : undefined,
|
|
26
|
+
)
|
|
27
|
+
const counterFormat = shallowRef<
|
|
28
|
+
string | ((c: number, min?: number, max?: number) => string) | undefined
|
|
29
|
+
>(props.counterFormat)
|
|
30
|
+
|
|
31
|
+
watch(() => props.counter, (val) => {
|
|
32
|
+
counter.value = val !== undefined ? val : undefined
|
|
33
|
+
})
|
|
34
|
+
watch(() => props.counterFormat, (val) => { counterFormat.value = val })
|
|
35
|
+
|
|
36
|
+
// Counter display — pushed up by child inputs
|
|
37
|
+
|
|
38
|
+
const counterText = shallowRef('')
|
|
39
|
+
const counterColor = shallowRef('')
|
|
40
|
+
|
|
41
|
+
function setCounterText(text: string, colorClass: string): void {
|
|
42
|
+
counterText.value = text
|
|
43
|
+
counterColor.value = colorClass
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Computed field state from FormContext
|
|
47
|
+
|
|
48
|
+
const fieldValue = computed<unknown>(() => formCtx?.getFieldValue(props.name))
|
|
49
|
+
|
|
50
|
+
const fieldError = computed<string | undefined>(() => formCtx?.getFieldError(props.name))
|
|
51
|
+
|
|
52
|
+
const fieldState = computed<FieldState>(() =>
|
|
53
|
+
formCtx?.getFieldState(props.name) ?? {
|
|
54
|
+
value: undefined,
|
|
55
|
+
isDirty: false,
|
|
56
|
+
isTouched: false,
|
|
57
|
+
isValid: true,
|
|
58
|
+
hasError: false,
|
|
59
|
+
error: undefined,
|
|
60
|
+
},
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
// FormFieldContext implementation
|
|
64
|
+
|
|
65
|
+
function setValue(value: unknown): void {
|
|
66
|
+
formCtx?.setFieldValue(props.name, value)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function setRequired(value: boolean): void {
|
|
70
|
+
required.value = value
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function setDirty(value = true): void {
|
|
74
|
+
formCtx?.setDirty(props.name, value)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function setTouched(value = true): void {
|
|
78
|
+
formCtx?.setTouched(props.name, value)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function setError(message: string | undefined): void {
|
|
82
|
+
formCtx?.setFieldError(props.name, message)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function registerValidator(key: symbol, fn: () => boolean): void {
|
|
86
|
+
formCtx?.registerValidator(key, fn)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function unregisterValidator(key: symbol): void {
|
|
90
|
+
formCtx?.unregisterValidator(key)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const fieldContext: FormFieldContext = {
|
|
94
|
+
name: props.name,
|
|
95
|
+
required,
|
|
96
|
+
value: fieldValue,
|
|
97
|
+
error: fieldError,
|
|
98
|
+
state: fieldState,
|
|
99
|
+
counter,
|
|
100
|
+
counterFormat,
|
|
101
|
+
counterText,
|
|
102
|
+
counterColor,
|
|
103
|
+
setValue,
|
|
104
|
+
setRequired,
|
|
105
|
+
setDirty,
|
|
106
|
+
setTouched,
|
|
107
|
+
setError,
|
|
108
|
+
setCounterText,
|
|
109
|
+
registerValidator,
|
|
110
|
+
unregisterValidator,
|
|
111
|
+
} satisfies FormFieldContext
|
|
112
|
+
|
|
113
|
+
provide(FORM_FIELD_CONTEXT_KEY, fieldContext)
|
|
114
|
+
|
|
115
|
+
// Bottom row visibility
|
|
116
|
+
|
|
117
|
+
const showBottom = computed(() =>
|
|
118
|
+
!!(fieldError.value || props.hint || counterText.value),
|
|
119
|
+
)
|
|
120
|
+
</script>
|
|
121
|
+
|
|
122
|
+
<template>
|
|
123
|
+
<fieldset class="fieldset w-full">
|
|
124
|
+
<!-- Floating label mode: label floats over the input -->
|
|
125
|
+
<template v-if="floating">
|
|
126
|
+
<label class="floating-label">
|
|
127
|
+
<span v-if="label || $slots.label">
|
|
128
|
+
<slot name="label" :required="required">
|
|
129
|
+
{{ label }}<span v-if="required" class="text-error ml-0.5" aria-hidden="true">*</span>
|
|
130
|
+
</slot>
|
|
131
|
+
</span>
|
|
132
|
+
<slot />
|
|
133
|
+
</label>
|
|
134
|
+
</template>
|
|
135
|
+
|
|
136
|
+
<!-- Default mode: legend above the field -->
|
|
137
|
+
<template v-else>
|
|
138
|
+
<legend v-if="label || $slots.label" class="fieldset-legend">
|
|
139
|
+
<slot name="label" :required="required">
|
|
140
|
+
{{ label }}<span v-if="required" class="text-error ml-0.5" aria-hidden="true">*</span>
|
|
141
|
+
</slot>
|
|
142
|
+
</legend>
|
|
143
|
+
<slot />
|
|
144
|
+
</template>
|
|
145
|
+
|
|
146
|
+
<!-- Bottom row: error/hint left, counter right -->
|
|
147
|
+
<div v-if="showBottom" class="flex items-center justify-between gap-2 mt-1">
|
|
148
|
+
<Transition name="field-message" mode="out-in">
|
|
149
|
+
<p v-if="fieldError" key="error" class="label text-error text-xs" role="alert">
|
|
150
|
+
<slot name="error" :error="fieldError">{{ fieldError }}</slot>
|
|
151
|
+
</p>
|
|
152
|
+
<p v-else-if="hint" key="hint" class="label text-xs">
|
|
153
|
+
<slot name="hint">{{ hint }}</slot>
|
|
154
|
+
</p>
|
|
155
|
+
<span v-else key="empty" />
|
|
156
|
+
</Transition>
|
|
157
|
+
<span
|
|
158
|
+
v-if="counterText"
|
|
159
|
+
class="label text-xs shrink-0"
|
|
160
|
+
:class="counterColor"
|
|
161
|
+
>{{ counterText }}</span>
|
|
162
|
+
</div>
|
|
163
|
+
</fieldset>
|
|
164
|
+
</template>
|
|
165
|
+
|
|
166
|
+
<style scoped>
|
|
167
|
+
.field-message-enter-active,
|
|
168
|
+
.field-message-leave-active {
|
|
169
|
+
transition: opacity 0.2s ease, transform 0.2s ease;
|
|
170
|
+
}
|
|
171
|
+
.field-message-enter-from,
|
|
172
|
+
.field-message-leave-to {
|
|
173
|
+
opacity: 0;
|
|
174
|
+
transform: translateY(-4px);
|
|
175
|
+
}
|
|
176
|
+
</style>
|