@poppy-ui/vue 0.5.5 → 0.5.7-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/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-BEnfZApB.cjs +2 -0
- package/dist/Toast-BEnfZApB.cjs.map +1 -0
- package/dist/Toast-BWTVE5_U.js +62 -0
- package/dist/Toast-BWTVE5_U.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 +18 -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 +59 -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 +61 -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 +39 -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 +32 -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 +319 -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 +19 -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 +41 -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 +20 -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 +35 -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/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 +53 -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 +26 -0
- package/dist/components/data/form-field/FormField.d.ts.map +1 -0
- package/dist/components/data/form-field/form-field.context.d.ts +37 -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 +30 -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 +44 -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 +73 -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 +11 -0
- package/dist/components/data/public.d.ts.map +1 -0
- package/dist/components/data/public.es.js +1355 -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 +20 -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 +41 -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/rating/Rating.d.ts +23 -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 +45 -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 +48 -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 +60 -0
- package/dist/components/data/select/select.props.d.ts.map +1 -0
- package/dist/components/data/select/select.types.d.ts +11 -0
- package/dist/components/data/select/select.types.d.ts.map +1 -0
- package/dist/components/data/slider/Slider.d.ts +26 -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 +71 -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 +44 -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 +66 -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 +28 -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 +28 -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 +46 -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 +31 -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 +53 -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.props.d.ts +23 -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 +19 -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 +24 -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/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 +29 -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 +129 -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 +28 -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 +29 -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 +38 -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 +207 -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/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 +22 -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/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 +62 -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/public.d.ts +6 -0
- package/dist/components/navigation/public.d.ts.map +1 -0
- package/dist/components/navigation/public.es.js +128 -0
- package/dist/components/navigation/public.es.js.map +1 -0
- package/dist/components/navigation/public.types.d.ts +9 -0
- package/dist/components/navigation/public.types.d.ts.map +1 -0
- package/dist/components/navigation/public.umd.js +2 -0
- package/dist/components/navigation/public.umd.js.map +1 -0
- package/dist/composables/public.d.ts +4 -0
- package/dist/composables/public.d.ts.map +1 -0
- package/dist/composables/public.es.js +12 -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/favicon.svg +1 -0
- package/dist/icons.svg +24 -0
- package/dist/is-true-B9ixxcRp.js +8 -0
- package/dist/is-true-B9ixxcRp.js.map +1 -0
- package/dist/is-true-D7MXJ1b7.cjs +2 -0
- package/dist/is-true-D7MXJ1b7.cjs.map +1 -0
- package/dist/plugin-vue.d.ts +33 -0
- package/dist/plugin-vue.d.ts.map +1 -0
- package/dist/public-CsUi4LK8.cjs +2 -0
- package/dist/public-CsUi4LK8.cjs.map +1 -0
- package/dist/public-D8Z0iHnm.js +563 -0
- package/dist/public-D8Z0iHnm.js.map +1 -0
- package/dist/public.d.ts +9 -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/symbol-6E8gXxBa.cjs +2 -0
- package/dist/symbol-6E8gXxBa.cjs.map +1 -0
- package/dist/symbol-Dy7mXgB5.js +14 -0
- package/dist/symbol-Dy7mXgB5.js.map +1 -0
- package/dist/symbol.d.ts +6 -0
- package/dist/symbol.d.ts.map +1 -0
- package/dist/types/config.type.d.ts +85 -0
- package/dist/types/config.type.d.ts.map +1 -0
- package/dist/types/public.d.ts +4 -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 +6 -0
- package/dist/types/utils.type.d.ts.map +1 -0
- package/dist/use-component-config-DX0jSicI.cjs +2 -0
- package/dist/use-component-config-DX0jSicI.cjs.map +1 -0
- package/dist/use-component-config-DfXvZ0-o.js +20 -0
- package/dist/use-component-config-DfXvZ0-o.js.map +1 -0
- package/dist/use-form-field-CHsU-LtQ.js +57 -0
- package/dist/use-form-field-CHsU-LtQ.js.map +1 -0
- package/dist/use-form-field-Zw9_0CVq.cjs +2 -0
- package/dist/use-form-field-Zw9_0CVq.cjs.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/is-true.d.ts +3 -0
- package/dist/utils/is-true.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/dist/vue.css +2 -0
- package/package.json +106 -56
- package/src/assets/hero.png +0 -0
- package/src/assets/vite.svg +1 -0
- package/src/assets/vue.svg +1 -0
- package/src/components/ClassWrapper.vue +42 -0
- package/src/components/actions/button/Button.story.vue +187 -0
- package/src/components/actions/button/Button.vue +103 -0
- package/src/components/actions/button/button.context.ts +3 -0
- package/src/components/actions/button/button.props.ts +67 -0
- package/src/components/actions/button/button.types.ts +7 -0
- package/src/components/actions/dropdown/Dropdown.story.vue +349 -0
- package/src/components/actions/dropdown/Dropdown.vue +219 -0
- package/src/components/actions/dropdown/dropdown.context.ts +3 -0
- package/src/components/actions/dropdown/dropdown.props.ts +67 -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 +284 -0
- package/src/components/actions/modal/Modal.vue +104 -0
- package/src/components/actions/modal/modal.context.ts +3 -0
- package/src/components/actions/modal/modal.props.ts +34 -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 +60 -0
- package/src/components/actions/swap/swap.context.ts +3 -0
- package/src/components/actions/swap/swap.props.ts +20 -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 +156 -0
- package/src/components/data/checkbox/Checkbox.vue +119 -0
- package/src/components/data/checkbox/checkbox.context.ts +3 -0
- package/src/components/data/checkbox/checkbox.props.ts +38 -0
- package/src/components/data/checkbox/checkbox.types.ts +5 -0
- package/src/components/data/form/Form.story.vue +144 -0
- package/src/components/data/form/Form.vue +222 -0
- package/src/components/data/form/form.context.ts +76 -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 +133 -0
- package/src/components/data/form-field/form-field.context.ts +51 -0
- package/src/components/data/form-field/form-field.props.ts +34 -0
- package/src/components/data/form-field/form-field.types.ts +1 -0
- package/src/components/data/input/Input.story.vue +219 -0
- package/src/components/data/input/Input.vue +196 -0
- package/src/components/data/input/input.context.ts +3 -0
- package/src/components/data/input/input.props.ts +83 -0
- package/src/components/data/input/input.types.ts +10 -0
- package/src/components/data/public.ts +10 -0
- package/src/components/data/public.types.ts +30 -0
- package/src/components/data/radio/Radio.story.vue +158 -0
- package/src/components/data/radio/Radio.vue +105 -0
- package/src/components/data/radio/radio.context.ts +3 -0
- package/src/components/data/radio/radio.props.ts +46 -0
- package/src/components/data/radio/radio.types.ts +5 -0
- package/src/components/data/rating/Rating.story.vue +150 -0
- package/src/components/data/rating/Rating.vue +178 -0
- package/src/components/data/rating/rating.context.ts +3 -0
- package/src/components/data/rating/rating.props.ts +51 -0
- package/src/components/data/rating/rating.types.ts +8 -0
- package/src/components/data/select/Select.story.vue +221 -0
- package/src/components/data/select/Select.vue +329 -0
- package/src/components/data/select/select.context.ts +3 -0
- package/src/components/data/select/select.props.ts +65 -0
- package/src/components/data/select/select.types.ts +13 -0
- package/src/components/data/slider/Slider.story.vue +276 -0
- package/src/components/data/slider/Slider.vue +772 -0
- package/src/components/data/slider/slider.context.ts +3 -0
- package/src/components/data/slider/slider.props.ts +84 -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 +179 -0
- package/src/components/data/textarea/textarea.context.ts +3 -0
- package/src/components/data/textarea/textarea.props.ts +75 -0
- package/src/components/data/textarea/textarea.types.ts +7 -0
- package/src/components/data/toggle/Toggle.story.vue +146 -0
- package/src/components/data/toggle/Toggle.vue +115 -0
- package/src/components/data/toggle/toggle.context.ts +3 -0
- package/src/components/data/toggle/toggle.props.ts +30 -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 +58 -0
- package/src/components/display/avatar/avatar.context.ts +3 -0
- package/src/components/display/avatar/avatar.props.ts +50 -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 +308 -0
- package/src/components/display/card/Card.vue +41 -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 +34 -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 +157 -0
- package/src/components/display/carousel/carousel.context.ts +3 -0
- package/src/components/display/carousel/carousel.props.ts +59 -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 +284 -0
- package/src/components/display/countdown/Countdown.vue +111 -0
- package/src/components/display/countdown/countdown.props.ts +24 -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 +18 -0
- package/src/components/display/public.types.ts +34 -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 +37 -0
- package/src/components/feedback/progress/progress.context.ts +3 -0
- package/src/components/feedback/progress/progress.props.ts +32 -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 +91 -0
- package/src/components/layout/drawer/drawer.context.ts +3 -0
- package/src/components/layout/drawer/drawer.props.ts +31 -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 +44 -0
- package/src/components/layout/indicator/indicator.context.ts +3 -0
- package/src/components/layout/indicator/indicator.props.ts +31 -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 +50 -0
- package/src/components/layout/mask/mask.context.ts +3 -0
- package/src/components/layout/mask/mask.props.ts +40 -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/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 +58 -0
- package/src/components/navigation/link/link.context.ts +3 -0
- package/src/components/navigation/link/link.props.ts +24 -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 +104 -0
- package/src/components/navigation/menu/menu.context.ts +4 -0
- package/src/components/navigation/menu/menu.props.ts +70 -0
- package/src/components/navigation/menu/menu.types.ts +4 -0
- package/src/components/navigation/public.ts +5 -0
- package/src/components/navigation/public.types.ts +12 -0
- package/src/composables/public.ts +3 -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 +84 -0
- package/src/composables/use-select-counter.ts +59 -0
- package/src/composables/use-toast.ts +47 -0
- package/src/histoire.css +8 -0
- package/src/plugin-vue.ts +53 -0
- package/src/public.ts +9 -0
- package/src/stories/Configuration.story.md +55 -0
- package/src/style.css +6 -0
- package/src/symbol.ts +18 -0
- package/src/types/config.type.ts +96 -0
- package/src/types/public.ts +3 -0
- package/src/types/size.type.ts +1 -0
- package/src/types/utils.type.ts +7 -0
- package/src/utils/build-class.util.ts +38 -0
- package/src/utils/get-validation-message.ts +61 -0
- package/src/utils/is-true.ts +12 -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
- package/css/core.css +0 -1
- package/css/core.css.map +0 -1
- package/css/global.bundle.css +0 -1
- package/css/global.bundle.css.map +0 -1
- package/css/normalize.css +0 -1
- package/css/normalize.css.map +0 -1
- package/css/poppy.bundle.css +0 -1
- package/css/poppy.bundle.css.map +0 -1
- package/css/structure.css +0 -1
- package/css/structure.css.map +0 -1
- package/css/themes/dark.always.css +0 -1
- package/css/themes/dark.always.css.map +0 -1
- package/css/themes/dark.class.css +0 -1
- package/css/themes/dark.class.css.map +0 -1
- package/css/themes/dark.system.css +0 -1
- package/css/themes/dark.system.css.map +0 -1
- package/css/themes/dark.theme.css +0 -1
- package/css/themes/dark.theme.css.map +0 -1
- package/css/themes/light.always.css +0 -1
- package/css/themes/light.always.css.map +0 -1
- package/css/themes/light.class.css +0 -1
- package/css/themes/light.class.css.map +0 -1
- package/css/themes/light.system.css +0 -1
- package/css/themes/light.system.css.map +0 -1
- package/css/themes/light.theme.css +0 -1
- package/css/themes/light.theme.css.map +0 -1
- package/dist/index.js +0 -448
- package/dist/index.js.map +0 -1
- package/dist/types/generated/components.d.ts +0 -38
- package/dist/types/generated/vue-component-lib/utils.d.ts +0 -16
- package/dist/types/index.d.ts +0 -6
- package/dist/types/plugin.d.ts +0 -3
- package/dist/vetur/attributes.json +0 -1392
- package/dist/vetur/tags.json +0 -376
- package/dist/web-types.json +0 -2940
- package/readme.md +0 -39
|
@@ -0,0 +1,1355 @@
|
|
|
1
|
+
import { n as e } from "../../symbol-Dy7mXgB5.js";
|
|
2
|
+
import { n as t } from "../../use-component-config-DfXvZ0-o.js";
|
|
3
|
+
import { n } from "../../build-class.util-Cp-ZBFgO.js";
|
|
4
|
+
import { t as r } from "../../is-true-B9ixxcRp.js";
|
|
5
|
+
import { t as i } from "../../_plugin-vue_export-helper-B3ysoDQm.js";
|
|
6
|
+
import { n as a, t as o } from "../../use-form-field-CHsU-LtQ.js";
|
|
7
|
+
import { h as s } from "../../public-D8Z0iHnm.js";
|
|
8
|
+
import { Fragment as c, Transition as l, computed as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, defineComponent as g, inject as _, mergeModels as v, mergeProps as y, normalizeClass as b, normalizeStyle as x, onBeforeUnmount as S, openBlock as C, provide as w, ref as T, renderList as E, renderSlot as D, shallowReactive as O, shallowRef as k, toDisplayString as A, unref as j, useAttrs as M, useCssVars as N, useId as P, useModel as F, useSlots as I, useTemplateRef as L, watch as R, watchEffect as ee, withCtx as te, withModifiers as z } from "vue";
|
|
9
|
+
import { ChevronDownIcon as ne, XIcon as B } from "@lucide/vue";
|
|
10
|
+
import { onClickOutside as re, useTemplateRefsList as ie } from "@vueuse/core";
|
|
11
|
+
//#region src/components/data/checkbox/checkbox.context.ts
|
|
12
|
+
var ae = e("checkbox"), V = [
|
|
13
|
+
"checked",
|
|
14
|
+
"disabled",
|
|
15
|
+
"required"
|
|
16
|
+
], oe = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "flex cursor-pointer items-start gap-2"
|
|
19
|
+
}, se = [
|
|
20
|
+
"checked",
|
|
21
|
+
"disabled",
|
|
22
|
+
"required"
|
|
23
|
+
], H = { class: "label-text text-base-content/60" }, U = {
|
|
24
|
+
neutral: "checkbox-neutral",
|
|
25
|
+
primary: "checkbox-primary",
|
|
26
|
+
secondary: "checkbox-secondary",
|
|
27
|
+
accent: "checkbox-accent",
|
|
28
|
+
info: "checkbox-info",
|
|
29
|
+
success: "checkbox-success",
|
|
30
|
+
warning: "checkbox-warning",
|
|
31
|
+
error: "checkbox-error"
|
|
32
|
+
}, W = {
|
|
33
|
+
xs: "checkbox-xs",
|
|
34
|
+
sm: "checkbox-sm",
|
|
35
|
+
md: "checkbox-md",
|
|
36
|
+
lg: "checkbox-lg",
|
|
37
|
+
xl: "checkbox-xl"
|
|
38
|
+
}, ce = /* @__PURE__ */ g({
|
|
39
|
+
__name: "Checkbox",
|
|
40
|
+
props: /*@__PURE__*/ v({
|
|
41
|
+
indeterminate: { type: [Boolean, String] },
|
|
42
|
+
description: {},
|
|
43
|
+
color: {},
|
|
44
|
+
size: {},
|
|
45
|
+
disabled: { type: [Boolean, String] },
|
|
46
|
+
required: { type: [Boolean, String] }
|
|
47
|
+
}, {
|
|
48
|
+
modelValue: { type: Boolean },
|
|
49
|
+
modelModifiers: {}
|
|
50
|
+
}),
|
|
51
|
+
emits: ["update:modelValue"],
|
|
52
|
+
setup(e) {
|
|
53
|
+
let i = e, a = F(e, "modelValue"), s = t(ae, i, { size: "md" }), c = L("inputEl"), l = I();
|
|
54
|
+
ee(() => {
|
|
55
|
+
c.value && (c.value.indeterminate = r(i.indeterminate));
|
|
56
|
+
});
|
|
57
|
+
let { field: d, onBlur: h, clearError: g } = o({
|
|
58
|
+
required: u(() => r(i.required)),
|
|
59
|
+
inputEl: c
|
|
60
|
+
}), _ = u(() => d ? d.value.value : a.value);
|
|
61
|
+
function v(e) {
|
|
62
|
+
let t = e.target.checked;
|
|
63
|
+
a.value = t, d?.setValue(t), d?.setDirty(!0), g();
|
|
64
|
+
}
|
|
65
|
+
let y = u(() => !!d?.error.value), x = u(() => !!(i.description || l.description));
|
|
66
|
+
return (t, i) => x.value ? (C(), f("label", oe, [p("input", {
|
|
67
|
+
ref_key: "inputEl",
|
|
68
|
+
ref: c,
|
|
69
|
+
type: "checkbox",
|
|
70
|
+
class: b(["checkbox mt-0.5", [
|
|
71
|
+
j(n)(U, j(s).color),
|
|
72
|
+
j(n)(W, j(s).size),
|
|
73
|
+
{ "checkbox-error": y.value }
|
|
74
|
+
]]),
|
|
75
|
+
checked: _.value,
|
|
76
|
+
disabled: e.disabled,
|
|
77
|
+
required: j(r)(e.required),
|
|
78
|
+
onChange: v,
|
|
79
|
+
onBlur: i[1] ||= (...e) => j(h) && j(h)(...e)
|
|
80
|
+
}, null, 42, se), p("span", H, [D(t.$slots, "description", {}, () => [m(A(e.description), 1)])])])) : (C(), f("input", {
|
|
81
|
+
key: 0,
|
|
82
|
+
ref_key: "inputEl",
|
|
83
|
+
ref: c,
|
|
84
|
+
type: "checkbox",
|
|
85
|
+
class: b(["checkbox", [
|
|
86
|
+
j(n)(U, j(s).color),
|
|
87
|
+
j(n)(W, j(s).size),
|
|
88
|
+
{ "checkbox-error": y.value }
|
|
89
|
+
]]),
|
|
90
|
+
checked: _.value,
|
|
91
|
+
disabled: e.disabled,
|
|
92
|
+
required: j(r)(e.required),
|
|
93
|
+
onChange: v,
|
|
94
|
+
onBlur: i[0] ||= (...e) => j(h) && j(h)(...e)
|
|
95
|
+
}, null, 42, V));
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region src/utils/path.ts
|
|
100
|
+
function G(e, t) {
|
|
101
|
+
if (!e || !t) return;
|
|
102
|
+
let n = q(t), r = e;
|
|
103
|
+
for (let e of n) {
|
|
104
|
+
if (typeof r != "object" || !r) return;
|
|
105
|
+
r = r[e];
|
|
106
|
+
}
|
|
107
|
+
return r;
|
|
108
|
+
}
|
|
109
|
+
function K(e, t, n) {
|
|
110
|
+
if (!t) return;
|
|
111
|
+
let r = q(t), i = e;
|
|
112
|
+
for (let e = 0; e < r.length - 1; e++) {
|
|
113
|
+
let t = r[e], n = r[e + 1];
|
|
114
|
+
i[t] === void 0 && (J(n) ? i[t] = [] : i[t] = {}), (typeof i[t] != "object" || i[t] === null) && (J(n) ? i[t] = [] : i[t] = {}), i = i[t];
|
|
115
|
+
}
|
|
116
|
+
let a = r[r.length - 1];
|
|
117
|
+
if (J(a)) {
|
|
118
|
+
let e = i, t = Number.parseInt(a, 10);
|
|
119
|
+
for (; e.length <= t;) e.push(void 0);
|
|
120
|
+
e[t] = n;
|
|
121
|
+
} else i[a] = n;
|
|
122
|
+
}
|
|
123
|
+
function q(e) {
|
|
124
|
+
return e.trim() ? e.split(".").filter((e) => e !== "") : [];
|
|
125
|
+
}
|
|
126
|
+
function J(e) {
|
|
127
|
+
return /^\d+$/.test(e);
|
|
128
|
+
}
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region src/components/data/form/form.context.ts
|
|
131
|
+
var Y = Symbol("FormContext"), X = {
|
|
132
|
+
class: "text-error text-sm mt-2",
|
|
133
|
+
role: "alert"
|
|
134
|
+
}, Z = /* @__PURE__ */ g({
|
|
135
|
+
__name: "Form",
|
|
136
|
+
props: /*@__PURE__*/ v({
|
|
137
|
+
serializer: { type: Function },
|
|
138
|
+
counter: { type: [Boolean, String] },
|
|
139
|
+
counterFormat: { type: [String, Function] }
|
|
140
|
+
}, {
|
|
141
|
+
modelValue: { required: !0 },
|
|
142
|
+
modelModifiers: {}
|
|
143
|
+
}),
|
|
144
|
+
emits: /*@__PURE__*/ v(["submit", "reset"], ["update:modelValue"]),
|
|
145
|
+
setup(e, { expose: t, emit: n }) {
|
|
146
|
+
let i = e, a = F(e, "modelValue"), o = n, s = O({ ...a.value }), c = k({}), l = O({});
|
|
147
|
+
R(a, (e) => Object.assign(s, e));
|
|
148
|
+
let u = k(i.counter === void 0 ? void 0 : r(i.counter)), m = k(i.counterFormat);
|
|
149
|
+
R(() => i.counter, (e) => {
|
|
150
|
+
u.value = e === void 0 ? void 0 : r(e);
|
|
151
|
+
}), R(() => i.counterFormat, (e) => {
|
|
152
|
+
m.value = e;
|
|
153
|
+
});
|
|
154
|
+
function h(e) {
|
|
155
|
+
return l[e] || (l[e] = {
|
|
156
|
+
value: G(s, e),
|
|
157
|
+
isDirty: !1,
|
|
158
|
+
isTouched: !1,
|
|
159
|
+
isValid: !0,
|
|
160
|
+
hasError: !1,
|
|
161
|
+
error: void 0
|
|
162
|
+
}), l[e];
|
|
163
|
+
}
|
|
164
|
+
function g(e, t) {
|
|
165
|
+
K(s, e, t);
|
|
166
|
+
let n = h(e);
|
|
167
|
+
n.value = t, a.value = { ...s };
|
|
168
|
+
}
|
|
169
|
+
function _(e) {
|
|
170
|
+
return G(s, e);
|
|
171
|
+
}
|
|
172
|
+
function v(e) {
|
|
173
|
+
Object.assign(s, e), a.value = { ...s };
|
|
174
|
+
}
|
|
175
|
+
function y(e) {
|
|
176
|
+
return c.value[e];
|
|
177
|
+
}
|
|
178
|
+
function b(e, t) {
|
|
179
|
+
c.value = {
|
|
180
|
+
...c.value,
|
|
181
|
+
[e]: t
|
|
182
|
+
};
|
|
183
|
+
let n = h(e);
|
|
184
|
+
n.error = t, n.isValid = !t, n.hasError = !!t;
|
|
185
|
+
}
|
|
186
|
+
function x(e) {
|
|
187
|
+
c.value = { ...e };
|
|
188
|
+
for (let [t, n] of Object.entries(e)) {
|
|
189
|
+
let e = h(t);
|
|
190
|
+
e.error = n, e.isValid = !n, e.hasError = !!n;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
function S(e) {
|
|
194
|
+
if (e != null) {
|
|
195
|
+
let { [e]: t, ...n } = c.value;
|
|
196
|
+
c.value = n;
|
|
197
|
+
let r = l[e];
|
|
198
|
+
r && (r.error = void 0, r.isValid = !0, r.hasError = !1);
|
|
199
|
+
} else {
|
|
200
|
+
c.value = {};
|
|
201
|
+
for (let e of Object.values(l)) e.error = void 0, e.isValid = !0, e.hasError = !1;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
function T(e) {
|
|
205
|
+
return h(e);
|
|
206
|
+
}
|
|
207
|
+
function E(e, t = !0) {
|
|
208
|
+
h(e).isDirty = t;
|
|
209
|
+
}
|
|
210
|
+
function j(e, t = !0) {
|
|
211
|
+
h(e).isTouched = t;
|
|
212
|
+
}
|
|
213
|
+
function M() {
|
|
214
|
+
let e = !0;
|
|
215
|
+
for (let [, t] of N) t() || (e = !1);
|
|
216
|
+
return e;
|
|
217
|
+
}
|
|
218
|
+
let N = /* @__PURE__ */ new Map();
|
|
219
|
+
function P() {
|
|
220
|
+
Object.assign(s, {}), a.value = { ...s }, S();
|
|
221
|
+
for (let e of Object.keys(l)) l[e] = {
|
|
222
|
+
value: G(s, e),
|
|
223
|
+
isDirty: !1,
|
|
224
|
+
isTouched: !1,
|
|
225
|
+
isValid: !0,
|
|
226
|
+
hasError: !1,
|
|
227
|
+
error: void 0
|
|
228
|
+
};
|
|
229
|
+
o("reset");
|
|
230
|
+
}
|
|
231
|
+
let I = {
|
|
232
|
+
errors: c,
|
|
233
|
+
data: s,
|
|
234
|
+
counter: u,
|
|
235
|
+
counterFormat: m,
|
|
236
|
+
setFieldValue: g,
|
|
237
|
+
getFieldValue: _,
|
|
238
|
+
setValues: v,
|
|
239
|
+
getFieldError: y,
|
|
240
|
+
setFieldError: b,
|
|
241
|
+
setErrors: x,
|
|
242
|
+
clearErrors: S,
|
|
243
|
+
getFieldState: T,
|
|
244
|
+
setDirty: E,
|
|
245
|
+
setTouched: j,
|
|
246
|
+
validate: M,
|
|
247
|
+
reset: P
|
|
248
|
+
};
|
|
249
|
+
w(Y, I), t(I);
|
|
250
|
+
function L() {
|
|
251
|
+
M() && o("submit", i.serializer?.({ ...s }) ?? { ...s });
|
|
252
|
+
}
|
|
253
|
+
return (e, t) => (C(), f("form", {
|
|
254
|
+
novalidate: "",
|
|
255
|
+
onSubmit: z(L, ["prevent"]),
|
|
256
|
+
onReset: z(P, ["prevent"])
|
|
257
|
+
}, [D(e.$slots, "default"), c.value.$ ? D(e.$slots, "error", {
|
|
258
|
+
key: 0,
|
|
259
|
+
error: c.value.$
|
|
260
|
+
}, () => [p("p", X, A(c.value.$), 1)]) : d("", !0)], 32));
|
|
261
|
+
}
|
|
262
|
+
}), Q = { class: "form-control w-full" }, $ = {
|
|
263
|
+
key: 0,
|
|
264
|
+
class: "label"
|
|
265
|
+
}, le = { class: "label-text" }, ue = {
|
|
266
|
+
key: 0,
|
|
267
|
+
class: "text-error ml-0.5",
|
|
268
|
+
"aria-hidden": "true"
|
|
269
|
+
}, de = {
|
|
270
|
+
key: 1,
|
|
271
|
+
class: "label"
|
|
272
|
+
}, fe = /* @__PURE__ */ g({
|
|
273
|
+
__name: "FormField",
|
|
274
|
+
props: {
|
|
275
|
+
name: {},
|
|
276
|
+
label: {},
|
|
277
|
+
hint: {},
|
|
278
|
+
counter: { type: [Boolean, String] },
|
|
279
|
+
counterFormat: { type: [String, Function] }
|
|
280
|
+
},
|
|
281
|
+
setup(e) {
|
|
282
|
+
let t = e, n = _(Y, null), i = k(!1), o = k(t.counter === void 0 ? void 0 : r(t.counter)), s = k(t.counterFormat);
|
|
283
|
+
R(() => t.counter, (e) => {
|
|
284
|
+
o.value = e === void 0 ? void 0 : r(e);
|
|
285
|
+
}), R(() => t.counterFormat, (e) => {
|
|
286
|
+
s.value = e;
|
|
287
|
+
});
|
|
288
|
+
let c = u(() => n?.getFieldValue(t.name)), l = u(() => n?.getFieldError(t.name)), h = u(() => n?.getFieldState(t.name) ?? {
|
|
289
|
+
value: void 0,
|
|
290
|
+
isDirty: !1,
|
|
291
|
+
isTouched: !1,
|
|
292
|
+
isValid: !0,
|
|
293
|
+
hasError: !1,
|
|
294
|
+
error: void 0
|
|
295
|
+
});
|
|
296
|
+
function g(e) {
|
|
297
|
+
n?.setFieldValue(t.name, e);
|
|
298
|
+
}
|
|
299
|
+
function v(e) {
|
|
300
|
+
i.value = e;
|
|
301
|
+
}
|
|
302
|
+
function y(e = !0) {
|
|
303
|
+
n?.setDirty(t.name, e);
|
|
304
|
+
}
|
|
305
|
+
function x(e = !0) {
|
|
306
|
+
n?.setTouched(t.name, e);
|
|
307
|
+
}
|
|
308
|
+
function S(e) {
|
|
309
|
+
n?.setFieldError(t.name, e);
|
|
310
|
+
}
|
|
311
|
+
return w(a, {
|
|
312
|
+
name: t.name,
|
|
313
|
+
required: i,
|
|
314
|
+
value: c,
|
|
315
|
+
error: l,
|
|
316
|
+
state: h,
|
|
317
|
+
counter: o,
|
|
318
|
+
counterFormat: s,
|
|
319
|
+
setValue: g,
|
|
320
|
+
setRequired: v,
|
|
321
|
+
setDirty: y,
|
|
322
|
+
setTouched: x,
|
|
323
|
+
setError: S
|
|
324
|
+
}), (t, n) => (C(), f("div", Q, [
|
|
325
|
+
e.label || t.$slots.label ? (C(), f("label", $, [D(t.$slots, "label", { required: i.value }, () => [p("span", le, [m(A(e.label) + " ", 1), D(t.$slots, "required", { required: i.value }, () => [i.value ? (C(), f("span", ue, "*")) : d("", !0)])])])])) : d("", !0),
|
|
326
|
+
D(t.$slots, "default"),
|
|
327
|
+
l.value || e.hint || t.$slots.hint ? (C(), f("label", de, [p("span", {
|
|
328
|
+
class: b(["label-text-alt", { "text-error": l.value }]),
|
|
329
|
+
role: "alert"
|
|
330
|
+
}, [D(t.$slots, "error", { error: l.value }, () => [D(t.$slots, "hint", {}, () => [m(A(l.value || e.hint), 1)])])], 2)])) : d("", !0)
|
|
331
|
+
]));
|
|
332
|
+
}
|
|
333
|
+
}), pe = e("input"), me = { class: "w-full" }, he = {
|
|
334
|
+
key: 0,
|
|
335
|
+
class: "label"
|
|
336
|
+
}, ge = { class: "label-text" }, _e = [
|
|
337
|
+
"type",
|
|
338
|
+
"value",
|
|
339
|
+
"disabled",
|
|
340
|
+
"required",
|
|
341
|
+
"placeholder",
|
|
342
|
+
"autocomplete",
|
|
343
|
+
"pattern",
|
|
344
|
+
"title",
|
|
345
|
+
"maxlength",
|
|
346
|
+
"minlength"
|
|
347
|
+
], ve = {
|
|
348
|
+
key: 1,
|
|
349
|
+
class: "label"
|
|
350
|
+
}, ye = {
|
|
351
|
+
key: 0,
|
|
352
|
+
class: "label-text-alt"
|
|
353
|
+
}, be = {
|
|
354
|
+
neutral: "input-neutral",
|
|
355
|
+
primary: "input-primary",
|
|
356
|
+
secondary: "input-secondary",
|
|
357
|
+
accent: "input-accent",
|
|
358
|
+
info: "input-info",
|
|
359
|
+
success: "input-success",
|
|
360
|
+
warning: "input-warning",
|
|
361
|
+
error: "input-error"
|
|
362
|
+
}, xe = {
|
|
363
|
+
xs: "input-xs",
|
|
364
|
+
sm: "input-sm",
|
|
365
|
+
md: "input-md",
|
|
366
|
+
lg: "input-lg",
|
|
367
|
+
xl: "input-xl"
|
|
368
|
+
}, Se = {
|
|
369
|
+
bordered: "input-bordered",
|
|
370
|
+
ghost: "input-ghost"
|
|
371
|
+
}, Ce = /* @__PURE__ */ g({
|
|
372
|
+
__name: "Input",
|
|
373
|
+
props: /*@__PURE__*/ v({
|
|
374
|
+
type: {},
|
|
375
|
+
defaultValue: {},
|
|
376
|
+
label: {},
|
|
377
|
+
hint: {},
|
|
378
|
+
color: {},
|
|
379
|
+
size: {},
|
|
380
|
+
variant: {},
|
|
381
|
+
counter: { type: [Boolean, String] },
|
|
382
|
+
minLength: {},
|
|
383
|
+
maxLength: {},
|
|
384
|
+
counterFormat: { type: [String, Function] },
|
|
385
|
+
disabled: { type: [Boolean, String] },
|
|
386
|
+
required: { type: [Boolean, String] },
|
|
387
|
+
placeholder: {},
|
|
388
|
+
autocomplete: {},
|
|
389
|
+
pattern: {},
|
|
390
|
+
title: {}
|
|
391
|
+
}, {
|
|
392
|
+
modelValue: {},
|
|
393
|
+
modelModifiers: {}
|
|
394
|
+
}),
|
|
395
|
+
emits: ["update:modelValue"],
|
|
396
|
+
setup(e) {
|
|
397
|
+
let i = e, s = F(e, "modelValue"), c = _(Y, null), l = _(a, null), h = t(pe, i, {
|
|
398
|
+
size: "md",
|
|
399
|
+
type: "text",
|
|
400
|
+
counter: !1
|
|
401
|
+
}, {
|
|
402
|
+
get counter() {
|
|
403
|
+
return l?.counter.value ?? c?.counter.value;
|
|
404
|
+
},
|
|
405
|
+
get counterFormat() {
|
|
406
|
+
return l?.counterFormat.value ?? c?.counterFormat.value;
|
|
407
|
+
}
|
|
408
|
+
}), g = L("inputEl"), { field: v, onBlur: y, clearError: x } = o({
|
|
409
|
+
required: u(() => r(i.required)),
|
|
410
|
+
inputEl: g
|
|
411
|
+
}), S = u(() => v ? v.value.value : s.value ?? i.defaultValue);
|
|
412
|
+
function w(e) {
|
|
413
|
+
let t = e.target.value;
|
|
414
|
+
s.value = t, v?.setValue(t), v?.setDirty(!0), x();
|
|
415
|
+
}
|
|
416
|
+
let T = u(() => String(S.value ?? "").length), E = u(() => r(h.value.counter)), O = u(() => {
|
|
417
|
+
let e = h.value.counterFormat ?? "{current} / {max}", t = T.value, n = h.value.minLength, r = h.value.maxLength;
|
|
418
|
+
return typeof e == "function" ? e(t, n, r) : e.replace("{current}", String(t)).replace("{min}", n == null ? "" : String(n)).replace("{max}", r == null ? "" : String(r));
|
|
419
|
+
}), k = u(() => v?.error.value), M = u(() => !!k.value);
|
|
420
|
+
return (t, i) => (C(), f("div", me, [
|
|
421
|
+
!j(v) && (e.label || t.$slots.label) ? (C(), f("div", he, [p("span", ge, [D(t.$slots, "label", {}, () => [m(A(e.label), 1)])])])) : d("", !0),
|
|
422
|
+
p("input", {
|
|
423
|
+
ref_key: "inputEl",
|
|
424
|
+
ref: g,
|
|
425
|
+
class: b(["input w-full", [
|
|
426
|
+
j(n)(be, j(h).color),
|
|
427
|
+
j(n)(xe, j(h).size),
|
|
428
|
+
j(n)(Se, j(h).variant),
|
|
429
|
+
{ "input-error": M.value }
|
|
430
|
+
]]),
|
|
431
|
+
type: j(h).type,
|
|
432
|
+
value: S.value,
|
|
433
|
+
disabled: e.disabled,
|
|
434
|
+
required: j(r)(e.required),
|
|
435
|
+
placeholder: e.placeholder,
|
|
436
|
+
autocomplete: e.autocomplete,
|
|
437
|
+
pattern: e.pattern,
|
|
438
|
+
title: e.title,
|
|
439
|
+
maxlength: j(h).maxLength,
|
|
440
|
+
minlength: j(h).minLength,
|
|
441
|
+
onInput: w,
|
|
442
|
+
onBlur: i[0] ||= (...e) => j(y) && j(y)(...e)
|
|
443
|
+
}, null, 42, _e),
|
|
444
|
+
!j(v) && (k.value || e.hint || t.$slots.hint || E.value) ? (C(), f("div", ve, [p("span", { class: b(["label-text-alt", { "text-error": k.value }]) }, [D(t.$slots, "hint", {}, () => [m(A(k.value || e.hint), 1)])], 2), E.value ? (C(), f("span", ye, [D(t.$slots, "counter", {
|
|
445
|
+
current: T.value,
|
|
446
|
+
min: j(h).minLength,
|
|
447
|
+
max: j(h).maxLength
|
|
448
|
+
}, () => [m(A(O.value), 1)])])) : d("", !0)])) : d("", !0),
|
|
449
|
+
j(v) && E.value ? D(t.$slots, "counter", {
|
|
450
|
+
key: 2,
|
|
451
|
+
current: T.value,
|
|
452
|
+
min: j(h).minLength,
|
|
453
|
+
max: j(h).maxLength
|
|
454
|
+
}) : d("", !0)
|
|
455
|
+
]));
|
|
456
|
+
}
|
|
457
|
+
}), we = e("radio"), Te = { class: "flex items-center gap-3" }, Ee = [
|
|
458
|
+
"name",
|
|
459
|
+
"value",
|
|
460
|
+
"checked",
|
|
461
|
+
"disabled",
|
|
462
|
+
"required"
|
|
463
|
+
], De = {
|
|
464
|
+
neutral: "radio-neutral",
|
|
465
|
+
primary: "radio-primary",
|
|
466
|
+
secondary: "radio-secondary",
|
|
467
|
+
accent: "radio-accent",
|
|
468
|
+
info: "radio-info",
|
|
469
|
+
success: "radio-success",
|
|
470
|
+
warning: "radio-warning",
|
|
471
|
+
error: "radio-error"
|
|
472
|
+
}, Oe = {
|
|
473
|
+
xs: "radio-xs",
|
|
474
|
+
sm: "radio-sm",
|
|
475
|
+
md: "radio-md",
|
|
476
|
+
lg: "radio-lg",
|
|
477
|
+
xl: "radio-xl"
|
|
478
|
+
}, ke = /* @__PURE__ */ g({
|
|
479
|
+
__name: "Radio",
|
|
480
|
+
props: /*@__PURE__*/ v({
|
|
481
|
+
value: { type: [
|
|
482
|
+
String,
|
|
483
|
+
Number,
|
|
484
|
+
Boolean
|
|
485
|
+
] },
|
|
486
|
+
description: {},
|
|
487
|
+
color: {},
|
|
488
|
+
size: {},
|
|
489
|
+
disabled: { type: [Boolean, String] },
|
|
490
|
+
required: { type: [Boolean, String] },
|
|
491
|
+
name: {}
|
|
492
|
+
}, {
|
|
493
|
+
modelValue: { type: [
|
|
494
|
+
String,
|
|
495
|
+
Number,
|
|
496
|
+
Boolean
|
|
497
|
+
] },
|
|
498
|
+
modelModifiers: {}
|
|
499
|
+
}),
|
|
500
|
+
emits: ["update:modelValue"],
|
|
501
|
+
setup(e) {
|
|
502
|
+
let i = e, s = F(e, "modelValue"), c = L("inputEl"), l = t(we, i, { size: "md" }), h = `radio-${P()}`, g = _(a, null), v = u(() => i.name ?? g?.name ?? "radio-group"), { field: y, onBlur: x } = o({
|
|
503
|
+
required: u(() => r(i.required)),
|
|
504
|
+
inputEl: c
|
|
505
|
+
}), S = u(() => y ? y.value.value : s.value), w = u(() => S.value === i.value);
|
|
506
|
+
R(() => y?.value.value, (e) => {
|
|
507
|
+
e !== void 0 && s.value !== e && (s.value = e);
|
|
508
|
+
});
|
|
509
|
+
function T() {
|
|
510
|
+
let e = i.value;
|
|
511
|
+
s.value = e, y?.setValue(e), y?.setDirty(!0);
|
|
512
|
+
}
|
|
513
|
+
function E() {
|
|
514
|
+
x();
|
|
515
|
+
}
|
|
516
|
+
return (t, r) => (C(), f("div", Te, [p("input", {
|
|
517
|
+
ref_key: "inputEl",
|
|
518
|
+
ref: c,
|
|
519
|
+
id: h,
|
|
520
|
+
type: "radio",
|
|
521
|
+
class: b(["radio bg-base-200", [j(n)(De, j(l).color), j(n)(Oe, j(l).size)]]),
|
|
522
|
+
name: v.value,
|
|
523
|
+
value: e.value,
|
|
524
|
+
checked: w.value,
|
|
525
|
+
disabled: e.disabled,
|
|
526
|
+
required: e.required,
|
|
527
|
+
onChange: T,
|
|
528
|
+
onBlur: E
|
|
529
|
+
}, null, 42, Ee), e.description || t.$slots.description ? (C(), f("label", {
|
|
530
|
+
key: 0,
|
|
531
|
+
for: h,
|
|
532
|
+
class: "text-sm text-base-content/70 cursor-pointer"
|
|
533
|
+
}, [D(t.$slots, "description", {}, () => [m(A(e.description), 1)])])) : d("", !0)]));
|
|
534
|
+
}
|
|
535
|
+
}), Ae = e("rating"), je = ["required", "checked"], Me = ["checked"], Ne = [
|
|
536
|
+
"checked",
|
|
537
|
+
"disabled",
|
|
538
|
+
"onChange"
|
|
539
|
+
], Pe = {
|
|
540
|
+
neutral: "bg-neutral",
|
|
541
|
+
primary: "bg-primary",
|
|
542
|
+
secondary: "bg-secondary",
|
|
543
|
+
accent: "bg-accent",
|
|
544
|
+
info: "bg-info",
|
|
545
|
+
success: "bg-success",
|
|
546
|
+
warning: "bg-warning",
|
|
547
|
+
error: "bg-error"
|
|
548
|
+
}, Fe = {
|
|
549
|
+
xs: "rating-xs",
|
|
550
|
+
sm: "rating-sm",
|
|
551
|
+
md: "rating-md",
|
|
552
|
+
lg: "rating-lg",
|
|
553
|
+
xl: "rating-xl"
|
|
554
|
+
}, Ie = {
|
|
555
|
+
"hexagon-2": "mask-hexagon-2",
|
|
556
|
+
"star-2": "mask-star-2",
|
|
557
|
+
"triangle-2": "mask-triangle-2",
|
|
558
|
+
"triangle-3": "mask-triangle-3",
|
|
559
|
+
"triangle-4": "mask-triangle-4",
|
|
560
|
+
circle: "mask-circle",
|
|
561
|
+
decagon: "mask-decagon",
|
|
562
|
+
diamond: "mask-diamond",
|
|
563
|
+
heart: "mask-heart",
|
|
564
|
+
hexagon: "mask-hexagon",
|
|
565
|
+
pentagon: "mask-pentagon",
|
|
566
|
+
square: "mask-square",
|
|
567
|
+
squircle: "mask-squircle",
|
|
568
|
+
star: "mask-star",
|
|
569
|
+
triangle: "mask-triangle"
|
|
570
|
+
}, Le = /* @__PURE__ */ g({
|
|
571
|
+
__name: "Rating",
|
|
572
|
+
props: /*@__PURE__*/ v({
|
|
573
|
+
disabled: { type: Boolean },
|
|
574
|
+
required: { type: Boolean },
|
|
575
|
+
color: {},
|
|
576
|
+
size: {},
|
|
577
|
+
count: {},
|
|
578
|
+
half: { type: [Boolean, String] },
|
|
579
|
+
clearable: { type: [Boolean, String] },
|
|
580
|
+
mask: {}
|
|
581
|
+
}, {
|
|
582
|
+
modelValue: {},
|
|
583
|
+
modelModifiers: {}
|
|
584
|
+
}),
|
|
585
|
+
emits: ["update:modelValue"],
|
|
586
|
+
setup(e) {
|
|
587
|
+
let i = e, a = F(e, "modelValue"), s = t(Ae, i, {
|
|
588
|
+
size: "md",
|
|
589
|
+
count: 5,
|
|
590
|
+
half: !1,
|
|
591
|
+
clearable: !0,
|
|
592
|
+
mask: "star"
|
|
593
|
+
}), l = L("hiddenEl"), { field: m, fieldValue: h, onBlur: g, clearError: _ } = o({
|
|
594
|
+
required: u(() => r(i.required)),
|
|
595
|
+
inputEl: l
|
|
596
|
+
}), v = u(() => m ? h.value ?? 0 : a.value ?? 0);
|
|
597
|
+
function y(e) {
|
|
598
|
+
a.value = e, m?.setValue(e), m?.setDirty(!0), _();
|
|
599
|
+
}
|
|
600
|
+
let x = u(() => {
|
|
601
|
+
let e = s.value.count ?? 5, t = r(s.value.half), i = [], a = n(Ie, s.value.mask);
|
|
602
|
+
for (let n = 1; n <= e; n++) t ? (i.push({
|
|
603
|
+
key: `${n}-left`,
|
|
604
|
+
value: n - .5,
|
|
605
|
+
maskClass: `mask ${a} mask-half-1`
|
|
606
|
+
}), i.push({
|
|
607
|
+
key: `${n}-right`,
|
|
608
|
+
value: n,
|
|
609
|
+
maskClass: `mask ${a} mask-half-2`
|
|
610
|
+
})) : i.push({
|
|
611
|
+
key: String(n),
|
|
612
|
+
value: n,
|
|
613
|
+
maskClass: `mask ${a}`
|
|
614
|
+
});
|
|
615
|
+
return i;
|
|
616
|
+
}), S = u(() => !!m?.error.value);
|
|
617
|
+
return (t, i) => (C(), f("div", {
|
|
618
|
+
class: b(["rating", [
|
|
619
|
+
j(n)(Fe, j(s).size),
|
|
620
|
+
{ "rating-half": j(r)(j(s).half) },
|
|
621
|
+
{ "opacity-50 pointer-events-none": e.disabled }
|
|
622
|
+
]]),
|
|
623
|
+
onBlurCapture: i[1] ||= (...e) => j(g) && j(g)(...e)
|
|
624
|
+
}, [
|
|
625
|
+
p("input", {
|
|
626
|
+
ref_key: "hiddenEl",
|
|
627
|
+
ref: l,
|
|
628
|
+
type: "radio",
|
|
629
|
+
class: "hidden",
|
|
630
|
+
required: j(r)(e.required),
|
|
631
|
+
checked: v.value > 0
|
|
632
|
+
}, null, 8, je),
|
|
633
|
+
j(r)(j(s).clearable) ? (C(), f("input", {
|
|
634
|
+
key: 0,
|
|
635
|
+
type: "radio",
|
|
636
|
+
class: "rating-hidden",
|
|
637
|
+
name: "rating",
|
|
638
|
+
checked: v.value === 0,
|
|
639
|
+
onChange: i[0] ||= (e) => y(0)
|
|
640
|
+
}, null, 40, Me)) : d("", !0),
|
|
641
|
+
(C(!0), f(c, null, E(x.value, (t) => (C(), f("input", {
|
|
642
|
+
key: t.key,
|
|
643
|
+
type: "radio",
|
|
644
|
+
name: "rating",
|
|
645
|
+
class: b([
|
|
646
|
+
t.maskClass,
|
|
647
|
+
j(n)(Pe, j(s).color),
|
|
648
|
+
{ "border-error": S.value }
|
|
649
|
+
]),
|
|
650
|
+
checked: v.value === t.value,
|
|
651
|
+
disabled: e.disabled,
|
|
652
|
+
onChange: (e) => y(t.value)
|
|
653
|
+
}, null, 42, Ne))), 128))
|
|
654
|
+
], 34));
|
|
655
|
+
}
|
|
656
|
+
});
|
|
657
|
+
//#endregion
|
|
658
|
+
//#region src/composables/use-select-counter.ts
|
|
659
|
+
function Re(e, t) {
|
|
660
|
+
return {
|
|
661
|
+
counterText: u(() => !t.multiple?.value || !t.min?.value && !t.max?.value ? null : t.formatter?.value ? t.formatter.value(e.value, t.min?.value, t.max?.value) : t.max?.value ? `${e.value} / ${t.max.value}` : `${e.value}`),
|
|
662
|
+
counterColor: u(() => t.max?.value && e.value > t.max.value ? "text-error" : t.min?.value && e.value < t.min.value ? "text-warning" : "opacity-40"),
|
|
663
|
+
isAtMax: u(() => !t.max?.value || !t.multiple?.value ? !1 : e.value >= t.max.value)
|
|
664
|
+
};
|
|
665
|
+
}
|
|
666
|
+
//#endregion
|
|
667
|
+
//#region src/components/data/select/select.context.ts
|
|
668
|
+
var ze = e("select"), Be = { class: "w-full flex flex-col gap-1" }, Ve = ["name", "value"], He = ["tabindex", "disabled"], Ue = {
|
|
669
|
+
key: 0,
|
|
670
|
+
class: "flex flex-wrap gap-1"
|
|
671
|
+
}, We = ["onClick"], Ge = {
|
|
672
|
+
key: 2,
|
|
673
|
+
class: "opacity-40"
|
|
674
|
+
}, Ke = {
|
|
675
|
+
key: 0,
|
|
676
|
+
class: "anchor-dropdown absolute z-50 w-full bg-base-100 border border-base-300 rounded-box shadow-lg overflow-hidden"
|
|
677
|
+
}, qe = { class: "max-h-56 overflow-y-auto py-1" }, Je = ["onMousedown"], Ye = {
|
|
678
|
+
key: 0,
|
|
679
|
+
class: "px-4 py-3 text-sm opacity-40 text-center"
|
|
680
|
+
}, Xe = {
|
|
681
|
+
key: 0,
|
|
682
|
+
class: "flex justify-end"
|
|
683
|
+
}, Ze = {
|
|
684
|
+
neutral: "select-neutral",
|
|
685
|
+
primary: "select-primary",
|
|
686
|
+
secondary: "select-secondary",
|
|
687
|
+
accent: "select-accent",
|
|
688
|
+
info: "select-info",
|
|
689
|
+
success: "select-success",
|
|
690
|
+
warning: "select-warning",
|
|
691
|
+
error: "select-error"
|
|
692
|
+
}, Qe = {
|
|
693
|
+
xs: "select-xs",
|
|
694
|
+
sm: "select-sm",
|
|
695
|
+
md: "select-md",
|
|
696
|
+
lg: "select-lg",
|
|
697
|
+
xl: "select-xl"
|
|
698
|
+
}, $e = {
|
|
699
|
+
bordered: "select-bordered",
|
|
700
|
+
ghost: "select-ghost"
|
|
701
|
+
}, et = /*#__PURE__*/ i(/* @__PURE__ */ g({
|
|
702
|
+
inheritAttrs: !1,
|
|
703
|
+
__name: "Select",
|
|
704
|
+
props: /*@__PURE__*/ v({
|
|
705
|
+
name: {},
|
|
706
|
+
disabled: { type: Boolean },
|
|
707
|
+
required: { type: Boolean },
|
|
708
|
+
readonly: { type: Boolean },
|
|
709
|
+
placeholder: {},
|
|
710
|
+
options: {},
|
|
711
|
+
equals: { type: Function },
|
|
712
|
+
multiple: { type: Boolean },
|
|
713
|
+
color: {},
|
|
714
|
+
variant: {},
|
|
715
|
+
size: {},
|
|
716
|
+
clearable: { type: Boolean },
|
|
717
|
+
counterFormatter: { type: Function }
|
|
718
|
+
}, {
|
|
719
|
+
modelValue: {},
|
|
720
|
+
modelModifiers: {}
|
|
721
|
+
}),
|
|
722
|
+
emits: /*@__PURE__*/ v(["clear"], ["update:modelValue"]),
|
|
723
|
+
setup(e, { expose: r, emit: i }) {
|
|
724
|
+
N((e) => ({ d83aa5b8: w }));
|
|
725
|
+
let a = i, g = L("containerEl"), _ = L("triggerEl"), v = F(e, "modelValue"), x = e, S = t(ze, x, {
|
|
726
|
+
size: "md",
|
|
727
|
+
clearable: !1
|
|
728
|
+
}), w = `--select-anchor-${P()}`, T = M(), O = k(!1), { field: I, fieldValue: R, hasServerError: ee, onBlur: ie, clearError: ae } = o({ required: u(() => x.required ?? !1) });
|
|
729
|
+
re(g, () => {
|
|
730
|
+
O.value && (O.value = !1, ie());
|
|
731
|
+
});
|
|
732
|
+
let V = u(() => I ? R.value : v.value), oe = u(() => T.min ? Number(T.min) : void 0), se = u(() => T.max ? Number(T.max) : void 0), { counterText: H, counterColor: U, isAtMax: W } = Re(u(() => !x.multiple || !Array.isArray(V.value) ? 0 : V.value.length), {
|
|
733
|
+
multiple: u(() => x.multiple),
|
|
734
|
+
min: oe,
|
|
735
|
+
max: se,
|
|
736
|
+
formatter: u(() => S.value.counterFormatter)
|
|
737
|
+
}), ce = u(() => x.multiple ? Array.isArray(V.value) && V.value.length > 0 : V.value !== void 0 && V.value !== null && V.value !== ""), G = u(() => {
|
|
738
|
+
if (!x.options) return [];
|
|
739
|
+
let e = V.value;
|
|
740
|
+
if (!e) return [];
|
|
741
|
+
if (x.multiple && Array.isArray(e)) return x.options.filter((t) => e.some((e) => K(t.value, e)));
|
|
742
|
+
let t = x.options.find((t) => K(t.value, e));
|
|
743
|
+
return t ? [t] : [];
|
|
744
|
+
});
|
|
745
|
+
function K(e, t) {
|
|
746
|
+
return x.equals ? typeof x.equals == "function" ? x.equals(e, t) : e?.[x.equals] === t?.[x.equals] : e === t;
|
|
747
|
+
}
|
|
748
|
+
function q(e) {
|
|
749
|
+
let t = V.value;
|
|
750
|
+
return x.multiple && Array.isArray(t) ? t.some((t) => K(t, e.value)) : K(t, e.value);
|
|
751
|
+
}
|
|
752
|
+
function J(e) {
|
|
753
|
+
return W.value && !q(e);
|
|
754
|
+
}
|
|
755
|
+
function Y(e) {
|
|
756
|
+
v.value = e, I && (I.setValue(e), I.setDirty(!0), ae());
|
|
757
|
+
}
|
|
758
|
+
function X(e) {
|
|
759
|
+
if (!J(e)) {
|
|
760
|
+
if (x.multiple) {
|
|
761
|
+
let t = Array.isArray(V.value) ? V.value : [];
|
|
762
|
+
Y(t.some((t) => K(t, e.value)) ? t.filter((t) => !K(t, e.value)) : [...t, e.value]);
|
|
763
|
+
return;
|
|
764
|
+
}
|
|
765
|
+
if (q(e)) {
|
|
766
|
+
S.value.clearable && (Y(void 0), O.value = !1);
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
769
|
+
Y(e.value), O.value = !1;
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
function Z(e) {
|
|
773
|
+
x.multiple && Y((Array.isArray(V.value) ? V.value : []).filter((t) => !K(t, e.value)));
|
|
774
|
+
}
|
|
775
|
+
function Q() {
|
|
776
|
+
Y(x.multiple ? [] : void 0), a("clear");
|
|
777
|
+
}
|
|
778
|
+
function $() {
|
|
779
|
+
x.disabled || (O.value = !0);
|
|
780
|
+
}
|
|
781
|
+
function le() {
|
|
782
|
+
x.disabled || (O.value = !1);
|
|
783
|
+
}
|
|
784
|
+
function ue() {
|
|
785
|
+
O.value ? le() : $();
|
|
786
|
+
}
|
|
787
|
+
return r({
|
|
788
|
+
$el: _,
|
|
789
|
+
clear: Q,
|
|
790
|
+
open: $,
|
|
791
|
+
close: le,
|
|
792
|
+
toggle: ue
|
|
793
|
+
}), (t, r) => (C(), f("div", Be, [p("div", y({
|
|
794
|
+
ref_key: "containerEl",
|
|
795
|
+
ref: g,
|
|
796
|
+
class: "relative w-full anchor-trigger"
|
|
797
|
+
}, t.$attrs), [
|
|
798
|
+
p("input", {
|
|
799
|
+
type: "hidden",
|
|
800
|
+
name: j(I)?.name ?? e.name,
|
|
801
|
+
value: v.value
|
|
802
|
+
}, null, 8, Ve),
|
|
803
|
+
p("button", {
|
|
804
|
+
ref_key: "triggerEl",
|
|
805
|
+
ref: _,
|
|
806
|
+
type: "button",
|
|
807
|
+
class: b(["select w-full text-left min-h-10 h-auto py-2 pr-10", [
|
|
808
|
+
j(n)(Ze, j(S).color),
|
|
809
|
+
j(n)(Qe, j(S).size),
|
|
810
|
+
j(n)($e, j(S).variant),
|
|
811
|
+
e.disabled && "select-disabled",
|
|
812
|
+
j(ee) && "select-error"
|
|
813
|
+
]]),
|
|
814
|
+
tabindex: e.disabled ? "-1" : void 0,
|
|
815
|
+
disabled: e.disabled,
|
|
816
|
+
onClick: r[0] ||= (e) => ue()
|
|
817
|
+
}, [e.multiple && G.value.length > 0 ? (C(), f("div", Ue, [(C(!0), f(c, null, E(G.value, (e) => D(t.$slots, "selected", {
|
|
818
|
+
key: String(e.value),
|
|
819
|
+
option: e,
|
|
820
|
+
remove: () => Z(e)
|
|
821
|
+
}, () => [h(j(s), {
|
|
822
|
+
color: "primary",
|
|
823
|
+
size: "sm",
|
|
824
|
+
class: "gap-1 cursor-default"
|
|
825
|
+
}, {
|
|
826
|
+
default: te(() => [m(A(e.label) + " ", 1), p("button", {
|
|
827
|
+
type: "button",
|
|
828
|
+
class: "hover:opacity-70",
|
|
829
|
+
onClick: z((t) => Z(e), ["stop"])
|
|
830
|
+
}, [h(j(B), { class: "size-3" })], 8, We)]),
|
|
831
|
+
_: 2
|
|
832
|
+
}, 1024)], !0)), 128))])) : !e.multiple && G.value.length > 0 ? D(t.$slots, "selected", {
|
|
833
|
+
key: 1,
|
|
834
|
+
option: G.value[0],
|
|
835
|
+
remove: Q
|
|
836
|
+
}, () => [p("span", null, A(G.value[0]?.label), 1)], !0) : (C(), f("span", Ge, A(e.placeholder || t.$t("common.field.select.placeholder")), 1))], 10, He),
|
|
837
|
+
h(j(ne), { class: b(["absolute right-3 top-1/2 -translate-y-1/2 size-4 opacity-40 pointer-events-none transition-transform", O.value && "rotate-180"]) }, null, 8, ["class"]),
|
|
838
|
+
j(S).clearable && ce.value ? (C(), f("button", {
|
|
839
|
+
key: 0,
|
|
840
|
+
type: "button",
|
|
841
|
+
class: "absolute right-8 top-1/2 -translate-y-1/2 btn btn-ghost btn-xs btn-circle opacity-50 hover:opacity-100",
|
|
842
|
+
onClick: Q
|
|
843
|
+
}, [h(j(B), { class: "size-3" })])) : d("", !0),
|
|
844
|
+
h(l, { name: "dropdown" }, {
|
|
845
|
+
default: te(() => [O.value && e.options ? (C(), f("div", Ke, [p("ul", qe, [(C(!0), f(c, null, E(e.options, (e) => (C(), f("li", {
|
|
846
|
+
key: String(e.value),
|
|
847
|
+
class: b(["px-4 py-2 text-sm cursor-pointer hover:bg-base-200", [q(e) && "bg-primary/10 text-primary", J(e) && "opacity-30 cursor-not-allowed pointer-events-none"]]),
|
|
848
|
+
onMousedown: z((t) => X(e), ["prevent"])
|
|
849
|
+
}, [D(t.$slots, "option", {
|
|
850
|
+
option: e,
|
|
851
|
+
selected: q(e)
|
|
852
|
+
}, () => [m(A(e.label), 1)], !0)], 42, Je))), 128)), e.options.length === 0 ? (C(), f("li", Ye, A(t.$t("common.field.select.empty")), 1)) : d("", !0)])])) : d("", !0)]),
|
|
853
|
+
_: 3
|
|
854
|
+
})
|
|
855
|
+
], 16), e.multiple && j(H) ? (C(), f("div", Xe, [p("span", { class: b(["text-xs", j(U)]) }, A(j(H)), 3)])) : d("", !0)]));
|
|
856
|
+
}
|
|
857
|
+
}), [["__scopeId", "data-v-9596a9eb"]]), tt = e("slider"), nt = ["aria-label"], rt = {
|
|
858
|
+
class: "slider-rail",
|
|
859
|
+
ref: "railRef"
|
|
860
|
+
}, it = [
|
|
861
|
+
"aria-valuemin",
|
|
862
|
+
"aria-valuemax",
|
|
863
|
+
"aria-valuenow",
|
|
864
|
+
"aria-label",
|
|
865
|
+
"aria-orientation",
|
|
866
|
+
"aria-disabled",
|
|
867
|
+
"onMousedown",
|
|
868
|
+
"onTouchstart",
|
|
869
|
+
"onMouseenter",
|
|
870
|
+
"onKeydown",
|
|
871
|
+
"onFocus"
|
|
872
|
+
], at = {
|
|
873
|
+
neutral: "slider--neutral",
|
|
874
|
+
primary: "slider--primary",
|
|
875
|
+
secondary: "slider--secondary",
|
|
876
|
+
accent: "slider--accent",
|
|
877
|
+
info: "slider--info",
|
|
878
|
+
success: "slider--success",
|
|
879
|
+
warning: "slider--warning",
|
|
880
|
+
error: "slider--error"
|
|
881
|
+
}, ot = {
|
|
882
|
+
xs: "slider--xs",
|
|
883
|
+
sm: "slider--sm",
|
|
884
|
+
md: "slider--md",
|
|
885
|
+
lg: "slider--lg",
|
|
886
|
+
xl: "slider--xl"
|
|
887
|
+
}, st = /*#__PURE__*/ i(/* @__PURE__ */ g({
|
|
888
|
+
__name: "Slider",
|
|
889
|
+
props: /*@__PURE__*/ v({
|
|
890
|
+
range: { type: Boolean },
|
|
891
|
+
min: {},
|
|
892
|
+
max: {},
|
|
893
|
+
step: {},
|
|
894
|
+
disableSwap: { type: [Boolean, String] },
|
|
895
|
+
scale: { type: Function },
|
|
896
|
+
disabled: { type: Boolean },
|
|
897
|
+
required: { type: Boolean },
|
|
898
|
+
ariaLabel: {},
|
|
899
|
+
orientation: {},
|
|
900
|
+
showTooltip: {},
|
|
901
|
+
color: {},
|
|
902
|
+
size: {},
|
|
903
|
+
track: {}
|
|
904
|
+
}, {
|
|
905
|
+
modelValue: {},
|
|
906
|
+
modelModifiers: {}
|
|
907
|
+
}),
|
|
908
|
+
emits: /*@__PURE__*/ v(["input", "change"], ["update:modelValue"]),
|
|
909
|
+
setup(e, { emit: r }) {
|
|
910
|
+
let i = e, a = F(e, "modelValue"), o = t(tt, i, {
|
|
911
|
+
color: void 0,
|
|
912
|
+
size: "md",
|
|
913
|
+
track: "normal",
|
|
914
|
+
min: 0,
|
|
915
|
+
max: 100,
|
|
916
|
+
step: 1,
|
|
917
|
+
range: !1,
|
|
918
|
+
orientation: "horizontal",
|
|
919
|
+
showTooltip: "hover",
|
|
920
|
+
disableSwap: !1
|
|
921
|
+
}), s = r, l = L("sliderRoot"), m = ie(), h = k(!1), g = k(null), _ = k(!1), v = k(null), y = T([]), w = () => {
|
|
922
|
+
let e = i.min ?? 0, t = i.max ?? 100;
|
|
923
|
+
if (i.range || Array.isArray(a.value)) {
|
|
924
|
+
let n = a.value && Array.isArray(a.value) ? a.value : [e, t];
|
|
925
|
+
y.value = [Math.max(e, Math.min(t, n[0])), Math.max(e, Math.min(t, n[1]))];
|
|
926
|
+
} else {
|
|
927
|
+
let n = a.value ?? e;
|
|
928
|
+
y.value = [Math.max(e, Math.min(t, n))];
|
|
929
|
+
}
|
|
930
|
+
};
|
|
931
|
+
w(), R(() => [
|
|
932
|
+
a.value,
|
|
933
|
+
i.range,
|
|
934
|
+
i.min,
|
|
935
|
+
i.max
|
|
936
|
+
], () => {
|
|
937
|
+
h.value || w();
|
|
938
|
+
}, { deep: !0 });
|
|
939
|
+
let D = u(() => i.range || y.value.length > 1), O = u(() => y.value), M = u(() => o.value.track !== "none"), N = u(() => o.value.min), P = u(() => o.value.max), I = u(() => o.value.step), ee = u(() => i.scale?.(N.value) ?? N.value), te = u(() => i.scale?.(P.value) ?? P.value), ne = u(() => i.disableSwap ?? !1), B = (e) => {
|
|
940
|
+
let t = P.value - N.value;
|
|
941
|
+
return t === 0 ? 0 : (e - N.value) / t * 100;
|
|
942
|
+
}, re = (e) => {
|
|
943
|
+
let t = P.value - N.value, n = N.value + e / 100 * t;
|
|
944
|
+
if (I.value > 0) {
|
|
945
|
+
let e = Math.round((n - N.value) / I.value);
|
|
946
|
+
n = N.value + e * I.value;
|
|
947
|
+
}
|
|
948
|
+
return Math.min(P.value, Math.max(N.value, n));
|
|
949
|
+
}, ae = u(() => {
|
|
950
|
+
let e = B(O.value[0]), t = D.value ? B(O.value[1]) : 0, n = Math.min(e, t), r = Math.max(e, t);
|
|
951
|
+
return D.value ? o.value.track === "inverted" ? { display: "none" } : i.orientation === "vertical" ? {
|
|
952
|
+
bottom: `${n}%`,
|
|
953
|
+
height: `${r - n}%`
|
|
954
|
+
} : {
|
|
955
|
+
left: `${n}%`,
|
|
956
|
+
width: `${r - n}%`
|
|
957
|
+
} : o.value.track === "inverted" ? i.orientation === "vertical" ? {
|
|
958
|
+
bottom: `${e}%`,
|
|
959
|
+
height: `${100 - e}%`
|
|
960
|
+
} : {
|
|
961
|
+
left: `${e}%`,
|
|
962
|
+
width: `${100 - e}%`
|
|
963
|
+
} : i.orientation === "vertical" ? {
|
|
964
|
+
bottom: "0%",
|
|
965
|
+
height: `${e}%`
|
|
966
|
+
} : {
|
|
967
|
+
left: "0%",
|
|
968
|
+
width: `${e}%`
|
|
969
|
+
};
|
|
970
|
+
}), V = u(() => {
|
|
971
|
+
if (!D.value || o.value.track !== "inverted") return {};
|
|
972
|
+
let e = B(Math.min(O.value[0], O.value[1]));
|
|
973
|
+
return i.orientation === "vertical" ? {
|
|
974
|
+
bottom: "0%",
|
|
975
|
+
height: `${e}%`
|
|
976
|
+
} : {
|
|
977
|
+
left: "0%",
|
|
978
|
+
width: `${e}%`
|
|
979
|
+
};
|
|
980
|
+
}), oe = u(() => {
|
|
981
|
+
if (!D.value || o.value.track !== "inverted") return {};
|
|
982
|
+
let e = B(Math.max(O.value[0], O.value[1]));
|
|
983
|
+
return i.orientation === "vertical" ? {
|
|
984
|
+
bottom: `${e}%`,
|
|
985
|
+
height: `${100 - e}%`
|
|
986
|
+
} : {
|
|
987
|
+
left: `${e}%`,
|
|
988
|
+
width: `${100 - e}%`
|
|
989
|
+
};
|
|
990
|
+
}), se = (e) => {
|
|
991
|
+
let t = B(O.value[e]);
|
|
992
|
+
return i.orientation === "vertical" ? {
|
|
993
|
+
bottom: `${t}%`,
|
|
994
|
+
left: "50%",
|
|
995
|
+
transform: "translateX(-50%)"
|
|
996
|
+
} : {
|
|
997
|
+
left: `${t}%`,
|
|
998
|
+
top: "50%",
|
|
999
|
+
transform: "translate(-50%, -50%)"
|
|
1000
|
+
};
|
|
1001
|
+
}, H = (e) => {
|
|
1002
|
+
let t = B(O.value[e]);
|
|
1003
|
+
return i.orientation === "vertical" ? {
|
|
1004
|
+
bottom: `${t + 10}%`,
|
|
1005
|
+
left: "50%",
|
|
1006
|
+
transform: "translateX(-50%)"
|
|
1007
|
+
} : {
|
|
1008
|
+
left: `${t}%`,
|
|
1009
|
+
top: "-32px",
|
|
1010
|
+
transform: "translateX(-50%)"
|
|
1011
|
+
};
|
|
1012
|
+
}, U = (e) => i.scale ? String(i.scale(e)) : String(e), W = (e) => i.scale ? i.scale(O.value[e]) : O.value[e], ce = (e) => i.showTooltip === "never" ? !1 : i.showTooltip === "always" ? !0 : _.value && v.value === e || h.value && g.value === e, G = u(() => i.ariaLabel || "Slider"), K = (e) => D.value ? e === 0 ? `${G.value} - Minimum` : `${G.value} - Maximum` : G.value;
|
|
1013
|
+
function q(e, t) {
|
|
1014
|
+
if (!l.value) return N.value;
|
|
1015
|
+
let n = l.value.getBoundingClientRect(), r;
|
|
1016
|
+
return r = i.orientation === "vertical" ? 1 - (t - n.top) / n.height : (e - n.left) / n.width, r = Math.max(0, Math.min(1, r)), re(r * 100);
|
|
1017
|
+
}
|
|
1018
|
+
function J(e) {
|
|
1019
|
+
return D.value ? Math.abs(e - O.value[0]) < Math.abs(e - O.value[1]) ? 0 : 1 : 0;
|
|
1020
|
+
}
|
|
1021
|
+
function Y(e, t) {
|
|
1022
|
+
if (D.value) {
|
|
1023
|
+
let n = [...O.value];
|
|
1024
|
+
ne.value ? t === 0 ? n[0] = Math.min(e, n[1]) : n[1] = Math.max(e, n[0]) : (n[t] = e, n[0] > n[1] && ([n[0], n[1]] = [n[1], n[0]], h.value && g.value !== null && (g.value = +(g.value === 0)))), y.value = n, a.value = [i.scale ? i.scale(n[0]) : n[0], i.scale ? i.scale(n[1]) : n[1]];
|
|
1025
|
+
} else y.value = [e], a.value = i.scale ? i.scale(e) : e;
|
|
1026
|
+
s("input", a.value);
|
|
1027
|
+
}
|
|
1028
|
+
function X(e) {
|
|
1029
|
+
if (i.disabled) return;
|
|
1030
|
+
let t = q("touches" in e ? e.touches[0].clientX : e.clientX, "touches" in e ? e.touches[0].clientY : e.clientY), n = J(t);
|
|
1031
|
+
Y(t, n), (e.type === "mousedown" || "touches" in e && e.touches.length > 0) && (h.value = !0, g.value = n, window.addEventListener("mousemove", Q), window.addEventListener("mouseup", $), window.addEventListener("touchmove", Q, { passive: !1 }), window.addEventListener("touchend", $));
|
|
1032
|
+
}
|
|
1033
|
+
function Z(e, t) {
|
|
1034
|
+
i.disabled || (e.preventDefault(), e.stopPropagation(), h.value = !0, g.value = t, window.addEventListener("mousemove", Q), window.addEventListener("mouseup", $), window.addEventListener("touchmove", Q, { passive: !1 }), window.addEventListener("touchend", $));
|
|
1035
|
+
}
|
|
1036
|
+
function Q(e) {
|
|
1037
|
+
!h.value || g.value === null || Y(q("touches" in e ? e.touches[0].clientX : e.clientX, "touches" in e ? e.touches[0].clientY : e.clientY), g.value);
|
|
1038
|
+
}
|
|
1039
|
+
function $() {
|
|
1040
|
+
h.value && (h.value = !1, g.value = null, window.removeEventListener("mousemove", Q), window.removeEventListener("mouseup", $), window.removeEventListener("touchmove", Q), window.removeEventListener("touchend", $), s("change", a.value));
|
|
1041
|
+
}
|
|
1042
|
+
function le(e) {
|
|
1043
|
+
_.value = !0, v.value = e;
|
|
1044
|
+
}
|
|
1045
|
+
function ue() {
|
|
1046
|
+
_.value = !1, v.value = null;
|
|
1047
|
+
}
|
|
1048
|
+
function de() {
|
|
1049
|
+
s("change", a.value);
|
|
1050
|
+
}
|
|
1051
|
+
function fe(e) {
|
|
1052
|
+
i.disabled || e.key === "Tab" && !_.value && (e.preventDefault(), m.value[0]?.focus());
|
|
1053
|
+
}
|
|
1054
|
+
function pe(e, t) {
|
|
1055
|
+
if (i.disabled) return;
|
|
1056
|
+
let n = O.value[t], r, o = (P.value - N.value) * .1, c = I.value;
|
|
1057
|
+
switch (e.key) {
|
|
1058
|
+
case "ArrowRight":
|
|
1059
|
+
case "ArrowUp":
|
|
1060
|
+
r = n + c;
|
|
1061
|
+
break;
|
|
1062
|
+
case "ArrowLeft":
|
|
1063
|
+
case "ArrowDown":
|
|
1064
|
+
r = n - c;
|
|
1065
|
+
break;
|
|
1066
|
+
case "PageUp":
|
|
1067
|
+
r = n + o;
|
|
1068
|
+
break;
|
|
1069
|
+
case "PageDown":
|
|
1070
|
+
r = n - o;
|
|
1071
|
+
break;
|
|
1072
|
+
case "Home":
|
|
1073
|
+
r = N.value;
|
|
1074
|
+
break;
|
|
1075
|
+
case "End":
|
|
1076
|
+
r = P.value;
|
|
1077
|
+
break;
|
|
1078
|
+
case "Escape":
|
|
1079
|
+
h.value = !1, g.value = null, s("change", a.value);
|
|
1080
|
+
return;
|
|
1081
|
+
default: return;
|
|
1082
|
+
}
|
|
1083
|
+
if (e.preventDefault(), r = Math.min(P.value, Math.max(N.value, r)), D.value && ne.value) {
|
|
1084
|
+
let e = t === 0 ? O.value[1] : O.value[0];
|
|
1085
|
+
r = t === 0 ? Math.min(r, e) : Math.max(r, e);
|
|
1086
|
+
}
|
|
1087
|
+
Y(r, t), s("change", a.value);
|
|
1088
|
+
}
|
|
1089
|
+
return S(() => {
|
|
1090
|
+
window.removeEventListener("mousemove", Q), window.removeEventListener("mouseup", $), window.removeEventListener("touchmove", Q), window.removeEventListener("touchend", $);
|
|
1091
|
+
}), (t, r) => (C(), f("div", {
|
|
1092
|
+
ref_key: "sliderRoot",
|
|
1093
|
+
ref: l,
|
|
1094
|
+
class: b(["slider-root", [
|
|
1095
|
+
j(n)(at, j(o).color),
|
|
1096
|
+
j(n)(ot, j(o).size),
|
|
1097
|
+
{
|
|
1098
|
+
"slider-vertical": e.orientation === "vertical",
|
|
1099
|
+
"slider-horizontal": e.orientation === "horizontal",
|
|
1100
|
+
"slider-disabled": e.disabled,
|
|
1101
|
+
"slider-range": D.value
|
|
1102
|
+
}
|
|
1103
|
+
]]),
|
|
1104
|
+
role: "group",
|
|
1105
|
+
"aria-label": G.value,
|
|
1106
|
+
onMousedown: X,
|
|
1107
|
+
onTouchstart: z(X, ["prevent"]),
|
|
1108
|
+
onKeydown: fe
|
|
1109
|
+
}, [
|
|
1110
|
+
p("div", rt, null, 512),
|
|
1111
|
+
M.value ? (C(), f("div", {
|
|
1112
|
+
key: 0,
|
|
1113
|
+
class: "slider-track",
|
|
1114
|
+
style: x(ae.value)
|
|
1115
|
+
}, null, 4)) : d("", !0),
|
|
1116
|
+
D.value && j(o).track === "inverted" ? (C(), f(c, { key: 1 }, [p("div", {
|
|
1117
|
+
class: "slider-track slider-track--inverted-start",
|
|
1118
|
+
style: x(V.value)
|
|
1119
|
+
}, null, 4), p("div", {
|
|
1120
|
+
class: "slider-track slider-track--inverted-end",
|
|
1121
|
+
style: x(oe.value)
|
|
1122
|
+
}, null, 4)], 64)) : d("", !0),
|
|
1123
|
+
(C(!0), f(c, null, E(O.value, (t, n) => (C(), f("div", {
|
|
1124
|
+
key: `thumb-${n}`,
|
|
1125
|
+
ref_for: !0,
|
|
1126
|
+
ref: j(m).set,
|
|
1127
|
+
class: b(["slider-thumb", {
|
|
1128
|
+
"slider-thumb-active": h.value && g.value === n,
|
|
1129
|
+
"slider-thumb-hover": _.value && v.value === n
|
|
1130
|
+
}]),
|
|
1131
|
+
style: x(se(n)),
|
|
1132
|
+
role: "slider",
|
|
1133
|
+
tabindex: "0",
|
|
1134
|
+
"aria-valuemin": ee.value,
|
|
1135
|
+
"aria-valuemax": te.value,
|
|
1136
|
+
"aria-valuenow": W(n),
|
|
1137
|
+
"aria-label": K(n),
|
|
1138
|
+
"aria-orientation": e.orientation,
|
|
1139
|
+
"aria-disabled": e.disabled || void 0,
|
|
1140
|
+
onMousedown: z((e) => Z(e, n), ["stop"]),
|
|
1141
|
+
onTouchstart: z((e) => Z(e, n), ["stop", "prevent"]),
|
|
1142
|
+
onMouseenter: () => le(n),
|
|
1143
|
+
onMouseleave: r[0] ||= () => ue(),
|
|
1144
|
+
onKeydown: z((e) => pe(e, n), ["stop"]),
|
|
1145
|
+
onFocus: () => void 0,
|
|
1146
|
+
onBlur: de
|
|
1147
|
+
}, [ce(n) ? (C(), f("div", {
|
|
1148
|
+
key: 0,
|
|
1149
|
+
class: b(["slider-value-label", { "slider-value-label-visible": h.value || _.value }]),
|
|
1150
|
+
style: x(H(n))
|
|
1151
|
+
}, A(U(t)), 7)) : d("", !0)], 46, it))), 128))
|
|
1152
|
+
], 42, nt));
|
|
1153
|
+
}
|
|
1154
|
+
}), [["__scopeId", "data-v-00142c01"]]), ct = e("textarea"), lt = { class: "w-full" }, ut = {
|
|
1155
|
+
key: 0,
|
|
1156
|
+
class: "label"
|
|
1157
|
+
}, dt = { class: "label-text" }, ft = [
|
|
1158
|
+
"value",
|
|
1159
|
+
"disabled",
|
|
1160
|
+
"required",
|
|
1161
|
+
"placeholder",
|
|
1162
|
+
"rows",
|
|
1163
|
+
"maxlength",
|
|
1164
|
+
"minlength"
|
|
1165
|
+
], pt = {
|
|
1166
|
+
key: 1,
|
|
1167
|
+
class: "label"
|
|
1168
|
+
}, mt = {
|
|
1169
|
+
key: 0,
|
|
1170
|
+
class: "label-text-alt"
|
|
1171
|
+
}, ht = {
|
|
1172
|
+
neutral: "textarea-neutral",
|
|
1173
|
+
primary: "textarea-primary",
|
|
1174
|
+
secondary: "textarea-secondary",
|
|
1175
|
+
accent: "textarea-accent",
|
|
1176
|
+
info: "textarea-info",
|
|
1177
|
+
success: "textarea-success",
|
|
1178
|
+
warning: "textarea-warning",
|
|
1179
|
+
error: "textarea-error"
|
|
1180
|
+
}, gt = {
|
|
1181
|
+
xs: "textarea-xs",
|
|
1182
|
+
sm: "textarea-sm",
|
|
1183
|
+
md: "textarea-md",
|
|
1184
|
+
lg: "textarea-lg",
|
|
1185
|
+
xl: "textarea-xl"
|
|
1186
|
+
}, _t = {
|
|
1187
|
+
bordered: "textarea-bordered",
|
|
1188
|
+
ghost: "textarea-ghost"
|
|
1189
|
+
}, vt = /* @__PURE__ */ g({
|
|
1190
|
+
__name: "Textarea",
|
|
1191
|
+
props: /*@__PURE__*/ v({
|
|
1192
|
+
label: {},
|
|
1193
|
+
hint: {},
|
|
1194
|
+
color: {},
|
|
1195
|
+
size: {},
|
|
1196
|
+
variant: {},
|
|
1197
|
+
autoGrow: { type: [Boolean, String] },
|
|
1198
|
+
counter: { type: [Boolean, String] },
|
|
1199
|
+
minLength: {},
|
|
1200
|
+
maxLength: {},
|
|
1201
|
+
counterFormat: { type: [String, Function] },
|
|
1202
|
+
disabled: { type: [Boolean, String] },
|
|
1203
|
+
required: { type: [Boolean, String] },
|
|
1204
|
+
placeholder: {},
|
|
1205
|
+
rows: {}
|
|
1206
|
+
}, {
|
|
1207
|
+
modelValue: {},
|
|
1208
|
+
modelModifiers: {}
|
|
1209
|
+
}),
|
|
1210
|
+
emits: ["update:modelValue"],
|
|
1211
|
+
setup(e) {
|
|
1212
|
+
let i = e, s = F(e, "modelValue"), c = _(Y, null), l = _(a, null), h = t(ct, i, {
|
|
1213
|
+
size: "md",
|
|
1214
|
+
rows: 4,
|
|
1215
|
+
autoGrow: !1,
|
|
1216
|
+
counter: !1
|
|
1217
|
+
}, {
|
|
1218
|
+
get counter() {
|
|
1219
|
+
return l?.counter.value ?? c?.counter.value;
|
|
1220
|
+
},
|
|
1221
|
+
get counterFormat() {
|
|
1222
|
+
return l?.counterFormat.value ?? c?.counterFormat.value;
|
|
1223
|
+
}
|
|
1224
|
+
}), g = L("textareaEl"), { field: v, fieldValue: y, onBlur: x, clearError: S } = o({
|
|
1225
|
+
required: u(() => r(i.required)),
|
|
1226
|
+
inputEl: g
|
|
1227
|
+
}), w = u(() => v ? y.value : s.value);
|
|
1228
|
+
function T(e) {
|
|
1229
|
+
let t = e.target.value;
|
|
1230
|
+
s.value = t, v?.setValue(t), v?.setDirty(!0), S();
|
|
1231
|
+
}
|
|
1232
|
+
let E = u(() => (w.value ?? "").length), O = u(() => r(h.value.counter)), k = u(() => {
|
|
1233
|
+
let e = h.value.counterFormat ?? "{current} / {max}", t = E.value, n = h.value.minLength, r = h.value.maxLength;
|
|
1234
|
+
return typeof e == "function" ? e(t, n, r) : e.replace("{current}", String(t)).replace("{min}", n == null ? "" : String(n)).replace("{max}", r == null ? "" : String(r));
|
|
1235
|
+
}), M = u(() => v?.error.value), N = u(() => !!M.value);
|
|
1236
|
+
return (t, i) => (C(), f("div", lt, [
|
|
1237
|
+
!j(v) && (e.label || t.$slots.label) ? (C(), f("div", ut, [p("span", dt, [D(t.$slots, "label", {}, () => [m(A(e.label), 1)])])])) : d("", !0),
|
|
1238
|
+
p("textarea", {
|
|
1239
|
+
ref_key: "textareaEl",
|
|
1240
|
+
ref: g,
|
|
1241
|
+
class: b(["textarea w-full", [
|
|
1242
|
+
j(n)(ht, j(h).color),
|
|
1243
|
+
j(n)(gt, j(h).size),
|
|
1244
|
+
j(n)(_t, j(h).variant),
|
|
1245
|
+
{ "textarea-error": N.value },
|
|
1246
|
+
{ "field-sizing-content": j(r)(j(h).autoGrow) }
|
|
1247
|
+
]]),
|
|
1248
|
+
value: w.value,
|
|
1249
|
+
disabled: e.disabled,
|
|
1250
|
+
required: j(r)(e.required),
|
|
1251
|
+
placeholder: e.placeholder,
|
|
1252
|
+
rows: j(r)(j(h).autoGrow) ? void 0 : j(h).rows,
|
|
1253
|
+
maxlength: j(h).maxLength,
|
|
1254
|
+
minlength: j(h).minLength,
|
|
1255
|
+
onInput: T,
|
|
1256
|
+
onBlur: i[0] ||= (...e) => j(x) && j(x)(...e)
|
|
1257
|
+
}, null, 42, ft),
|
|
1258
|
+
!j(v) && (M.value || e.hint || t.$slots.hint || O.value) ? (C(), f("div", pt, [p("span", { class: b(["label-text-alt", { "text-error": M.value }]) }, [D(t.$slots, "hint", {}, () => [m(A(M.value || e.hint), 1)])], 2), O.value ? (C(), f("span", mt, [D(t.$slots, "counter", {
|
|
1259
|
+
current: E.value,
|
|
1260
|
+
min: j(h).minLength,
|
|
1261
|
+
max: j(h).maxLength
|
|
1262
|
+
}, () => [m(A(k.value), 1)])])) : d("", !0)])) : d("", !0),
|
|
1263
|
+
j(v) && O.value ? D(t.$slots, "counter", {
|
|
1264
|
+
key: 2,
|
|
1265
|
+
current: E.value,
|
|
1266
|
+
min: j(h).minLength,
|
|
1267
|
+
max: j(h).maxLength
|
|
1268
|
+
}) : d("", !0)
|
|
1269
|
+
]));
|
|
1270
|
+
}
|
|
1271
|
+
}), yt = e("toggle"), bt = [
|
|
1272
|
+
"checked",
|
|
1273
|
+
"disabled",
|
|
1274
|
+
"required"
|
|
1275
|
+
], xt = {
|
|
1276
|
+
key: 1,
|
|
1277
|
+
class: "flex cursor-pointer items-center gap-2"
|
|
1278
|
+
}, St = [
|
|
1279
|
+
"checked",
|
|
1280
|
+
"disabled",
|
|
1281
|
+
"required"
|
|
1282
|
+
], Ct = { class: "label-text text-base-content/60" }, wt = {
|
|
1283
|
+
neutral: "toggle-neutral",
|
|
1284
|
+
primary: "toggle-primary",
|
|
1285
|
+
secondary: "toggle-secondary",
|
|
1286
|
+
accent: "toggle-accent",
|
|
1287
|
+
info: "toggle-info",
|
|
1288
|
+
success: "toggle-success",
|
|
1289
|
+
warning: "toggle-warning",
|
|
1290
|
+
error: "toggle-error"
|
|
1291
|
+
}, Tt = {
|
|
1292
|
+
xs: "toggle-xs",
|
|
1293
|
+
sm: "toggle-sm",
|
|
1294
|
+
md: "toggle-md",
|
|
1295
|
+
lg: "toggle-lg",
|
|
1296
|
+
xl: "toggle-xl"
|
|
1297
|
+
}, Et = /* @__PURE__ */ g({
|
|
1298
|
+
__name: "Toggle",
|
|
1299
|
+
props: /*@__PURE__*/ v({
|
|
1300
|
+
description: {},
|
|
1301
|
+
color: {},
|
|
1302
|
+
size: {},
|
|
1303
|
+
disabled: { type: [Boolean, String] },
|
|
1304
|
+
required: { type: [Boolean, String] }
|
|
1305
|
+
}, {
|
|
1306
|
+
modelValue: { type: Boolean },
|
|
1307
|
+
modelModifiers: {}
|
|
1308
|
+
}),
|
|
1309
|
+
emits: ["update:modelValue"],
|
|
1310
|
+
setup(e) {
|
|
1311
|
+
let i = e, a = F(e, "modelValue"), s = t(yt, i, { size: "md" }), c = L("inputEl"), l = I(), { field: d, fieldValue: h, onBlur: g, clearError: _ } = o({
|
|
1312
|
+
required: u(() => r(i.required)),
|
|
1313
|
+
inputEl: c
|
|
1314
|
+
}), v = u(() => d ? h.value : a.value);
|
|
1315
|
+
function y(e) {
|
|
1316
|
+
let t = e.target.checked;
|
|
1317
|
+
a.value = t, d?.setValue(t), d?.setDirty(!0), _();
|
|
1318
|
+
}
|
|
1319
|
+
let x = u(() => !!d?.error.value), S = u(() => !!(i.description || l.description));
|
|
1320
|
+
return (t, i) => S.value ? (C(), f("label", xt, [p("input", {
|
|
1321
|
+
ref_key: "inputEl",
|
|
1322
|
+
ref: c,
|
|
1323
|
+
type: "checkbox",
|
|
1324
|
+
class: b(["toggle", [
|
|
1325
|
+
j(n)(wt, j(s).color),
|
|
1326
|
+
j(n)(Tt, j(s).size),
|
|
1327
|
+
{ "toggle-error": x.value }
|
|
1328
|
+
]]),
|
|
1329
|
+
checked: v.value,
|
|
1330
|
+
disabled: e.disabled,
|
|
1331
|
+
required: j(r)(e.required),
|
|
1332
|
+
onChange: y,
|
|
1333
|
+
onBlur: i[1] ||= (...e) => j(g) && j(g)(...e)
|
|
1334
|
+
}, null, 42, St), p("span", Ct, [D(t.$slots, "description", {}, () => [m(A(e.description), 1)])])])) : (C(), f("input", {
|
|
1335
|
+
key: 0,
|
|
1336
|
+
ref_key: "inputEl",
|
|
1337
|
+
ref: c,
|
|
1338
|
+
type: "checkbox",
|
|
1339
|
+
class: b(["toggle", [
|
|
1340
|
+
j(n)(wt, j(s).color),
|
|
1341
|
+
j(n)(Tt, j(s).size),
|
|
1342
|
+
{ "toggle-error": x.value }
|
|
1343
|
+
]]),
|
|
1344
|
+
checked: v.value,
|
|
1345
|
+
disabled: e.disabled,
|
|
1346
|
+
required: j(r)(e.required),
|
|
1347
|
+
onChange: y,
|
|
1348
|
+
onBlur: i[0] ||= (...e) => j(g) && j(g)(...e)
|
|
1349
|
+
}, null, 42, bt));
|
|
1350
|
+
}
|
|
1351
|
+
});
|
|
1352
|
+
//#endregion
|
|
1353
|
+
export { ce as Checkbox, Z as Form, fe as FormField, Ce as Input, ke as Radio, Le as Rating, et as Select, st as Slider, vt as Textarea, Et as Toggle };
|
|
1354
|
+
|
|
1355
|
+
//# sourceMappingURL=public.es.js.map
|