@poppy-ui/vue 0.5.6 → 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,772 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { useComponentConfig } from '@/composables/use-component-config'
|
|
3
|
+
import { getClass } from '@/utils/build-class.util'
|
|
4
|
+
import { useTemplateRefsList } from '@vueuse/core'
|
|
5
|
+
import { computed, onBeforeUnmount, ref, shallowRef, useTemplateRef, watch } from 'vue'
|
|
6
|
+
import { SLIDER_CONFIG } from './slider.context'
|
|
7
|
+
import type { SliderProps } from './slider.props'
|
|
8
|
+
import type { SliderColor, SliderSize } from './slider.types'
|
|
9
|
+
|
|
10
|
+
const colors: Record<SliderColor, string> = {
|
|
11
|
+
neutral: 'slider--neutral',
|
|
12
|
+
primary: 'slider--primary',
|
|
13
|
+
secondary: 'slider--secondary',
|
|
14
|
+
accent: 'slider--accent',
|
|
15
|
+
info: 'slider--info',
|
|
16
|
+
success: 'slider--success',
|
|
17
|
+
warning: 'slider--warning',
|
|
18
|
+
error: 'slider--error',
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const sizes: Record<SliderSize, string> = {
|
|
22
|
+
xs: 'slider--xs',
|
|
23
|
+
sm: 'slider--sm',
|
|
24
|
+
md: 'slider--md',
|
|
25
|
+
lg: 'slider--lg',
|
|
26
|
+
xl: 'slider--xl',
|
|
27
|
+
}
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<script setup lang="ts" generic="R extends boolean = false">
|
|
31
|
+
type ModelType = R extends true ? [number, number] : number
|
|
32
|
+
|
|
33
|
+
const props = defineProps<SliderProps<R>>()
|
|
34
|
+
const model = defineModel<ModelType>()
|
|
35
|
+
|
|
36
|
+
// @ts-expect-error - Ignored due to the genereic in script
|
|
37
|
+
const config = useComponentConfig(SLIDER_CONFIG, props, {
|
|
38
|
+
color: undefined,
|
|
39
|
+
size: 'md',
|
|
40
|
+
track: 'normal',
|
|
41
|
+
min: 0,
|
|
42
|
+
max: 100,
|
|
43
|
+
step: 1,
|
|
44
|
+
range: false,
|
|
45
|
+
orientation: 'horizontal',
|
|
46
|
+
showTooltip: 'hover',
|
|
47
|
+
disableSwap: false,
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
const emit = defineEmits<{
|
|
51
|
+
input: [value: ModelType]
|
|
52
|
+
change: [value: ModelType]
|
|
53
|
+
}>()
|
|
54
|
+
|
|
55
|
+
const sliderRoot = useTemplateRef('sliderRoot')
|
|
56
|
+
const thumbRefs = useTemplateRefsList<HTMLElement>()
|
|
57
|
+
|
|
58
|
+
const isDragging = shallowRef(false)
|
|
59
|
+
const activeThumbIndex = shallowRef<number | null>(null)
|
|
60
|
+
const isHovering = shallowRef(false)
|
|
61
|
+
const hoverThumbIndex = shallowRef<number | null>(null)
|
|
62
|
+
|
|
63
|
+
// Internal mechanical values (always in min-max range)
|
|
64
|
+
const mechanicalValues = ref<number[]>([])
|
|
65
|
+
|
|
66
|
+
// Initialize mechanical values
|
|
67
|
+
const initMechanicalValues = () => {
|
|
68
|
+
const defaultMin = props.min ?? 0
|
|
69
|
+
const defaultMax = props.max ?? 100
|
|
70
|
+
|
|
71
|
+
if (props.range || Array.isArray(model.value)) {
|
|
72
|
+
const initial = model.value
|
|
73
|
+
? Array.isArray(model.value)
|
|
74
|
+
? model.value
|
|
75
|
+
: [defaultMin, defaultMax]
|
|
76
|
+
: [defaultMin, defaultMax]
|
|
77
|
+
mechanicalValues.value = [
|
|
78
|
+
Math.max(defaultMin, Math.min(defaultMax, initial[0])),
|
|
79
|
+
Math.max(defaultMin, Math.min(defaultMax, initial[1])),
|
|
80
|
+
]
|
|
81
|
+
} else {
|
|
82
|
+
const value = model.value ?? defaultMin
|
|
83
|
+
mechanicalValues.value = [Math.max(defaultMin, Math.min(defaultMax, value as number))]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
initMechanicalValues()
|
|
88
|
+
|
|
89
|
+
// Sync with prop changes (when not dragging)
|
|
90
|
+
watch(
|
|
91
|
+
() => [model.value, props.range, props.min, props.max],
|
|
92
|
+
() => {
|
|
93
|
+
if (!isDragging.value) {
|
|
94
|
+
initMechanicalValues()
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{ deep: true },
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
// Computed properties
|
|
101
|
+
const isRange = computed(() => props.range || mechanicalValues.value.length > 1)
|
|
102
|
+
const displayThumbValues = computed(() => mechanicalValues.value)
|
|
103
|
+
|
|
104
|
+
// Should we render the track?
|
|
105
|
+
const shouldRenderTrack = computed(() => config.value.track !== 'none')
|
|
106
|
+
|
|
107
|
+
// Effective min/max/step with defaults
|
|
108
|
+
const effectiveMin = computed(() => config.value.min!)
|
|
109
|
+
const effectiveMax = computed(() => config.value.max!)
|
|
110
|
+
const effectiveStep = computed(() => config.value.step!)
|
|
111
|
+
|
|
112
|
+
// Scaled min/max for ARIA
|
|
113
|
+
const scaledMin = computed(() => props.scale?.(effectiveMin.value) ?? effectiveMin.value)
|
|
114
|
+
const scaledMax = computed(() => props.scale?.(effectiveMax.value) ?? effectiveMax.value)
|
|
115
|
+
|
|
116
|
+
// Get config values safely
|
|
117
|
+
const configDisableSwap = computed(() => props.disableSwap ?? false)
|
|
118
|
+
|
|
119
|
+
// Calculate percentage from mechanical value
|
|
120
|
+
const getPercent = (mechanicalValue: number): number => {
|
|
121
|
+
const range = effectiveMax.value - effectiveMin.value
|
|
122
|
+
if (range === 0) return 0
|
|
123
|
+
return ((mechanicalValue - effectiveMin.value) / range) * 100
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Get mechanical value from percentage
|
|
127
|
+
const getMechanicalValueFromPercent = (percent: number): number => {
|
|
128
|
+
const range = effectiveMax.value - effectiveMin.value
|
|
129
|
+
let mechanical = effectiveMin.value + (percent / 100) * range
|
|
130
|
+
|
|
131
|
+
if (effectiveStep.value > 0) {
|
|
132
|
+
const steps = Math.round((mechanical - effectiveMin.value) / effectiveStep.value)
|
|
133
|
+
mechanical = effectiveMin.value + steps * effectiveStep.value
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return Math.min(effectiveMax.value, Math.max(effectiveMin.value, mechanical))
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Track style based on track mode
|
|
140
|
+
const trackStyle = computed(() => {
|
|
141
|
+
const percent0 = getPercent(displayThumbValues.value[0])
|
|
142
|
+
const percent1 = isRange.value ? getPercent(displayThumbValues.value[1]) : 0
|
|
143
|
+
|
|
144
|
+
const minPercent = Math.min(percent0, percent1)
|
|
145
|
+
const maxPercent = Math.max(percent0, percent1)
|
|
146
|
+
|
|
147
|
+
if (isRange.value) {
|
|
148
|
+
if (config.value.track === 'inverted') {
|
|
149
|
+
// Normal track for inverted mode will be hidden, we use separate elements
|
|
150
|
+
return { display: 'none' }
|
|
151
|
+
}
|
|
152
|
+
// Normal: show track between thumbs
|
|
153
|
+
if (props.orientation === 'vertical') {
|
|
154
|
+
return {
|
|
155
|
+
bottom: `${minPercent}%`,
|
|
156
|
+
height: `${maxPercent - minPercent}%`,
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return {
|
|
160
|
+
left: `${minPercent}%`,
|
|
161
|
+
width: `${maxPercent - minPercent}%`,
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
// Single thumb
|
|
165
|
+
if (config.value.track === 'inverted') {
|
|
166
|
+
if (props.orientation === 'vertical') {
|
|
167
|
+
return {
|
|
168
|
+
bottom: `${percent0}%`,
|
|
169
|
+
height: `${100 - percent0}%`,
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return {
|
|
173
|
+
left: `${percent0}%`,
|
|
174
|
+
width: `${100 - percent0}%`,
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (props.orientation === 'vertical') {
|
|
178
|
+
return {
|
|
179
|
+
bottom: '0%',
|
|
180
|
+
height: `${percent0}%`,
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return {
|
|
184
|
+
left: '0%',
|
|
185
|
+
width: `${percent0}%`,
|
|
186
|
+
}
|
|
187
|
+
})
|
|
188
|
+
|
|
189
|
+
// Inverted track styles for range mode
|
|
190
|
+
const invertedTrackStartStyle = computed(() => {
|
|
191
|
+
if (!isRange.value || config.value.track !== 'inverted') return {}
|
|
192
|
+
const minVal = Math.min(displayThumbValues.value[0], displayThumbValues.value[1])
|
|
193
|
+
const minPercent = getPercent(minVal)
|
|
194
|
+
if (props.orientation === 'vertical') {
|
|
195
|
+
return {
|
|
196
|
+
bottom: '0%',
|
|
197
|
+
height: `${minPercent}%`,
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return {
|
|
201
|
+
left: '0%',
|
|
202
|
+
width: `${minPercent}%`,
|
|
203
|
+
}
|
|
204
|
+
})
|
|
205
|
+
|
|
206
|
+
const invertedTrackEndStyle = computed(() => {
|
|
207
|
+
if (!isRange.value || config.value.track !== 'inverted') return {}
|
|
208
|
+
const maxVal = Math.max(displayThumbValues.value[0], displayThumbValues.value[1])
|
|
209
|
+
const maxPercent = getPercent(maxVal)
|
|
210
|
+
if (props.orientation === 'vertical') {
|
|
211
|
+
return {
|
|
212
|
+
bottom: `${maxPercent}%`,
|
|
213
|
+
height: `${100 - maxPercent}%`,
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return {
|
|
217
|
+
left: `${maxPercent}%`,
|
|
218
|
+
width: `${100 - maxPercent}%`,
|
|
219
|
+
}
|
|
220
|
+
})
|
|
221
|
+
|
|
222
|
+
// Thumb style
|
|
223
|
+
const getThumbStyle = (thumbIndex: number) => {
|
|
224
|
+
const percent = getPercent(displayThumbValues.value[thumbIndex])
|
|
225
|
+
if (props.orientation === 'vertical') {
|
|
226
|
+
return {
|
|
227
|
+
bottom: `${percent}%`,
|
|
228
|
+
left: '50%',
|
|
229
|
+
transform: 'translateX(-50%)',
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return {
|
|
233
|
+
left: `${percent}%`,
|
|
234
|
+
top: '50%',
|
|
235
|
+
transform: 'translate(-50%, -50%)',
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Tooltip style
|
|
240
|
+
const getTooltipStyle = (thumbIndex: number) => {
|
|
241
|
+
const percent = getPercent(displayThumbValues.value[thumbIndex])
|
|
242
|
+
if (props.orientation === 'vertical') {
|
|
243
|
+
return {
|
|
244
|
+
bottom: `${percent + 10}%`,
|
|
245
|
+
left: '50%',
|
|
246
|
+
transform: 'translateX(-50%)',
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return {
|
|
250
|
+
left: `${percent}%`,
|
|
251
|
+
top: '-32px',
|
|
252
|
+
transform: 'translateX(-50%)',
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// Format value for display (applies scale if available)
|
|
257
|
+
const formatValueForDisplay = (mechanicalValue: number): string => {
|
|
258
|
+
if (props.scale) {
|
|
259
|
+
return String(props.scale(mechanicalValue))
|
|
260
|
+
}
|
|
261
|
+
return String(mechanicalValue)
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// Get ARIA value (applies scale if available)
|
|
265
|
+
const getAriaValue = (thumbIndex: number): number => {
|
|
266
|
+
if (props.scale) {
|
|
267
|
+
return props.scale(displayThumbValues.value[thumbIndex])
|
|
268
|
+
}
|
|
269
|
+
return displayThumbValues.value[thumbIndex]
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// Tooltip visibility
|
|
273
|
+
const shouldShowTooltip = (thumbIndex: number): boolean => {
|
|
274
|
+
if (props.showTooltip === 'never') return false
|
|
275
|
+
if (props.showTooltip === 'always') return true
|
|
276
|
+
return (
|
|
277
|
+
(isHovering.value && hoverThumbIndex.value === thumbIndex) ||
|
|
278
|
+
(isDragging.value && activeThumbIndex.value === thumbIndex)
|
|
279
|
+
)
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// ARIA
|
|
283
|
+
const computedAriaLabel = computed(() => props.ariaLabel || 'Slider')
|
|
284
|
+
|
|
285
|
+
const getThumbAriaLabel = (thumbIndex: number): string => {
|
|
286
|
+
if (isRange.value) {
|
|
287
|
+
return thumbIndex === 0 ? `${computedAriaLabel.value} - Minimum` : `${computedAriaLabel.value} - Maximum`
|
|
288
|
+
}
|
|
289
|
+
return computedAriaLabel.value
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// Value from position (returns mechanical value)
|
|
293
|
+
function getMechanicalValueFromPosition(clientX: number, clientY: number): number {
|
|
294
|
+
if (!sliderRoot.value) return effectiveMin.value
|
|
295
|
+
|
|
296
|
+
const rect = sliderRoot.value.getBoundingClientRect()
|
|
297
|
+
let percent: number
|
|
298
|
+
|
|
299
|
+
if (props.orientation === 'vertical') {
|
|
300
|
+
const y = clientY - rect.top
|
|
301
|
+
percent = 1 - y / rect.height
|
|
302
|
+
} else {
|
|
303
|
+
const x = clientX - rect.left
|
|
304
|
+
percent = x / rect.width
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
percent = Math.max(0, Math.min(1, percent))
|
|
308
|
+
return getMechanicalValueFromPercent(percent * 100)
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// Find closest thumb index
|
|
312
|
+
function findClosestThumb(mechanicalValue: number): number {
|
|
313
|
+
if (!isRange.value) return 0
|
|
314
|
+
|
|
315
|
+
const dist0 = Math.abs(mechanicalValue - displayThumbValues.value[0])
|
|
316
|
+
const dist1 = Math.abs(mechanicalValue - displayThumbValues.value[1])
|
|
317
|
+
return dist0 < dist1 ? 0 : 1
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// Update mechanical values with swap logic
|
|
321
|
+
function updateMechanicalValue(newMechanicalValue: number, thumbIndex: number) {
|
|
322
|
+
if (isRange.value) {
|
|
323
|
+
const nextValues = [...displayThumbValues.value]
|
|
324
|
+
|
|
325
|
+
if (configDisableSwap.value) {
|
|
326
|
+
// Prevent crossing: clamp to other thumb
|
|
327
|
+
if (thumbIndex === 0) {
|
|
328
|
+
nextValues[0] = Math.min(newMechanicalValue, nextValues[1])
|
|
329
|
+
} else {
|
|
330
|
+
nextValues[1] = Math.max(newMechanicalValue, nextValues[0])
|
|
331
|
+
}
|
|
332
|
+
} else {
|
|
333
|
+
// Allow swap: set the value directly
|
|
334
|
+
nextValues[thumbIndex] = newMechanicalValue
|
|
335
|
+
|
|
336
|
+
// Always keep values sorted: index 0 = min, index 1 = max
|
|
337
|
+
if (nextValues[0] > nextValues[1]) {
|
|
338
|
+
// Swap the values
|
|
339
|
+
;[nextValues[0], nextValues[1]] = [nextValues[1], nextValues[0]]
|
|
340
|
+
// Swap active thumb index so user continues controlling the same visual thumb
|
|
341
|
+
if (isDragging.value && activeThumbIndex.value !== null) {
|
|
342
|
+
activeThumbIndex.value = activeThumbIndex.value === 0 ? 1 : 0
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
mechanicalValues.value = nextValues
|
|
348
|
+
const scaledValues: [number, number] = [
|
|
349
|
+
props.scale ? props.scale(nextValues[0]) : nextValues[0],
|
|
350
|
+
props.scale ? props.scale(nextValues[1]) : nextValues[1],
|
|
351
|
+
]
|
|
352
|
+
// @ts-expect-error
|
|
353
|
+
model.value = scaledValues
|
|
354
|
+
} else {
|
|
355
|
+
mechanicalValues.value = [newMechanicalValue]
|
|
356
|
+
const scaledValue = props.scale ? props.scale(newMechanicalValue) : newMechanicalValue
|
|
357
|
+
// @ts-expect-error
|
|
358
|
+
model.value = scaledValue
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// @ts-expect-error
|
|
362
|
+
emit('input', model.value)
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// Handle rail click
|
|
366
|
+
function handleRailClick(event: MouseEvent | TouchEvent) {
|
|
367
|
+
if (props.disabled) return
|
|
368
|
+
|
|
369
|
+
const clientX = 'touches' in event ? event.touches[0].clientX : event.clientX
|
|
370
|
+
const clientY = 'touches' in event ? event.touches[0].clientY : event.clientY
|
|
371
|
+
|
|
372
|
+
const clickValue = getMechanicalValueFromPosition(clientX, clientY)
|
|
373
|
+
const thumbIndex = findClosestThumb(clickValue)
|
|
374
|
+
|
|
375
|
+
updateMechanicalValue(clickValue, thumbIndex)
|
|
376
|
+
|
|
377
|
+
if (event.type === 'mousedown' || ('touches' in event && event.touches.length > 0)) {
|
|
378
|
+
isDragging.value = true
|
|
379
|
+
activeThumbIndex.value = thumbIndex
|
|
380
|
+
|
|
381
|
+
window.addEventListener('mousemove', handleMove)
|
|
382
|
+
window.addEventListener('mouseup', handleEnd)
|
|
383
|
+
window.addEventListener('touchmove', handleMove, { passive: false })
|
|
384
|
+
window.addEventListener('touchend', handleEnd)
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// Handle thumb down
|
|
389
|
+
function handleThumbDown(event: MouseEvent | TouchEvent, thumbIndex: number) {
|
|
390
|
+
if (props.disabled) return
|
|
391
|
+
|
|
392
|
+
event.preventDefault()
|
|
393
|
+
event.stopPropagation()
|
|
394
|
+
|
|
395
|
+
isDragging.value = true
|
|
396
|
+
activeThumbIndex.value = thumbIndex
|
|
397
|
+
|
|
398
|
+
window.addEventListener('mousemove', handleMove)
|
|
399
|
+
window.addEventListener('mouseup', handleEnd)
|
|
400
|
+
window.addEventListener('touchmove', handleMove, { passive: false })
|
|
401
|
+
window.addEventListener('touchend', handleEnd)
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
// Handle move
|
|
405
|
+
function handleMove(event: MouseEvent | TouchEvent) {
|
|
406
|
+
if (!isDragging.value || activeThumbIndex.value === null) return
|
|
407
|
+
|
|
408
|
+
const clientX = 'touches' in event ? event.touches[0].clientX : event.clientX
|
|
409
|
+
const clientY = 'touches' in event ? event.touches[0].clientY : event.clientY
|
|
410
|
+
|
|
411
|
+
const newValue = getMechanicalValueFromPosition(clientX, clientY)
|
|
412
|
+
updateMechanicalValue(newValue, activeThumbIndex.value)
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
// Handle end
|
|
416
|
+
function handleEnd() {
|
|
417
|
+
if (!isDragging.value) return
|
|
418
|
+
|
|
419
|
+
isDragging.value = false
|
|
420
|
+
activeThumbIndex.value = null
|
|
421
|
+
|
|
422
|
+
window.removeEventListener('mousemove', handleMove)
|
|
423
|
+
window.removeEventListener('mouseup', handleEnd)
|
|
424
|
+
window.removeEventListener('touchmove', handleMove)
|
|
425
|
+
window.removeEventListener('touchend', handleEnd)
|
|
426
|
+
|
|
427
|
+
// @ts-expect-error
|
|
428
|
+
emit('change', model.value)
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// Thumb hover/enter/leave
|
|
432
|
+
function handleThumbEnter(thumbIndex: number) {
|
|
433
|
+
isHovering.value = true
|
|
434
|
+
hoverThumbIndex.value = thumbIndex
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
function handleThumbLeave() {
|
|
438
|
+
isHovering.value = false
|
|
439
|
+
hoverThumbIndex.value = null
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
// Focus handling
|
|
443
|
+
function handleThumbFocus(_thumbIndex: number) {
|
|
444
|
+
// No-op for now
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
function handleThumbBlur() {
|
|
448
|
+
// @ts-expect-error
|
|
449
|
+
emit('change', model.value)
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
// Container keydown
|
|
453
|
+
function handleContainerKeydown(event: KeyboardEvent) {
|
|
454
|
+
if (props.disabled) return
|
|
455
|
+
if (event.key === 'Tab' && !isHovering.value) {
|
|
456
|
+
event.preventDefault()
|
|
457
|
+
thumbRefs.value[0]?.focus()
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
// Thumb keyboard navigation
|
|
462
|
+
function handleThumbKeydown(event: KeyboardEvent, thumbIndex: number) {
|
|
463
|
+
if (props.disabled) return
|
|
464
|
+
|
|
465
|
+
const currentValue = displayThumbValues.value[thumbIndex]
|
|
466
|
+
let newValue: number
|
|
467
|
+
|
|
468
|
+
const rangeSize = effectiveMax.value - effectiveMin.value
|
|
469
|
+
const pageStep = rangeSize * 0.1
|
|
470
|
+
const arrowStep = effectiveStep.value
|
|
471
|
+
|
|
472
|
+
switch (event.key) {
|
|
473
|
+
case 'ArrowRight':
|
|
474
|
+
case 'ArrowUp':
|
|
475
|
+
newValue = currentValue + arrowStep
|
|
476
|
+
break
|
|
477
|
+
case 'ArrowLeft':
|
|
478
|
+
case 'ArrowDown':
|
|
479
|
+
newValue = currentValue - arrowStep
|
|
480
|
+
break
|
|
481
|
+
case 'PageUp':
|
|
482
|
+
newValue = currentValue + pageStep
|
|
483
|
+
break
|
|
484
|
+
case 'PageDown':
|
|
485
|
+
newValue = currentValue - pageStep
|
|
486
|
+
break
|
|
487
|
+
case 'Home':
|
|
488
|
+
newValue = effectiveMin.value
|
|
489
|
+
break
|
|
490
|
+
case 'End':
|
|
491
|
+
newValue = effectiveMax.value
|
|
492
|
+
break
|
|
493
|
+
case 'Escape':
|
|
494
|
+
isDragging.value = false
|
|
495
|
+
activeThumbIndex.value = null
|
|
496
|
+
// @ts-expect-error
|
|
497
|
+
emit('change', model.value)
|
|
498
|
+
return
|
|
499
|
+
default:
|
|
500
|
+
return
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
event.preventDefault()
|
|
504
|
+
|
|
505
|
+
newValue = Math.min(effectiveMax.value, Math.max(effectiveMin.value, newValue))
|
|
506
|
+
|
|
507
|
+
// Only prevent crossing if disableSwap is true
|
|
508
|
+
if (isRange.value && configDisableSwap.value) {
|
|
509
|
+
const otherValue = thumbIndex === 0 ? displayThumbValues.value[1] : displayThumbValues.value[0]
|
|
510
|
+
if (thumbIndex === 0) {
|
|
511
|
+
newValue = Math.min(newValue, otherValue)
|
|
512
|
+
} else {
|
|
513
|
+
newValue = Math.max(newValue, otherValue)
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
updateMechanicalValue(newValue, thumbIndex)
|
|
518
|
+
// @ts-expect-error
|
|
519
|
+
emit('change', model.value)
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
// Cleanup event listeners
|
|
523
|
+
onBeforeUnmount(() => {
|
|
524
|
+
window.removeEventListener('mousemove', handleMove)
|
|
525
|
+
window.removeEventListener('mouseup', handleEnd)
|
|
526
|
+
window.removeEventListener('touchmove', handleMove)
|
|
527
|
+
window.removeEventListener('touchend', handleEnd)
|
|
528
|
+
})
|
|
529
|
+
</script>
|
|
530
|
+
|
|
531
|
+
<template>
|
|
532
|
+
<div
|
|
533
|
+
ref="sliderRoot"
|
|
534
|
+
class="slider-root"
|
|
535
|
+
:class="[
|
|
536
|
+
getClass(colors, config.color),
|
|
537
|
+
getClass(sizes, config.size),
|
|
538
|
+
{
|
|
539
|
+
'slider-vertical': orientation === 'vertical',
|
|
540
|
+
'slider-horizontal': orientation === 'horizontal',
|
|
541
|
+
'slider-disabled': disabled,
|
|
542
|
+
'slider-range': isRange
|
|
543
|
+
}
|
|
544
|
+
]"
|
|
545
|
+
role="group"
|
|
546
|
+
:aria-label="computedAriaLabel"
|
|
547
|
+
@mousedown="handleRailClick"
|
|
548
|
+
@touchstart.prevent="handleRailClick"
|
|
549
|
+
@keydown="handleContainerKeydown"
|
|
550
|
+
>
|
|
551
|
+
<!-- Rail -->
|
|
552
|
+
<div class="slider-rail" ref="railRef"></div>
|
|
553
|
+
|
|
554
|
+
<!-- Track (conditionally rendered based on track prop) -->
|
|
555
|
+
<div v-if="shouldRenderTrack" class="slider-track" :style="trackStyle"></div>
|
|
556
|
+
|
|
557
|
+
<!-- Inverted track for range mode - needs two elements -->
|
|
558
|
+
<template v-if="isRange && config.track === 'inverted'">
|
|
559
|
+
<div class="slider-track slider-track--inverted-start" :style="invertedTrackStartStyle"></div>
|
|
560
|
+
<div class="slider-track slider-track--inverted-end" :style="invertedTrackEndStyle"></div>
|
|
561
|
+
</template>
|
|
562
|
+
|
|
563
|
+
<!-- Thumbs -->
|
|
564
|
+
<div
|
|
565
|
+
v-for="(thumbValue, thumbIndex) in displayThumbValues"
|
|
566
|
+
:key="`thumb-${thumbIndex}`"
|
|
567
|
+
:ref="thumbRefs.set"
|
|
568
|
+
class="slider-thumb"
|
|
569
|
+
:class="{
|
|
570
|
+
'slider-thumb-active': isDragging && activeThumbIndex === thumbIndex,
|
|
571
|
+
'slider-thumb-hover': isHovering && hoverThumbIndex === thumbIndex
|
|
572
|
+
}"
|
|
573
|
+
:style="getThumbStyle(thumbIndex)"
|
|
574
|
+
role="slider"
|
|
575
|
+
tabindex="0"
|
|
576
|
+
:aria-valuemin="scaledMin"
|
|
577
|
+
:aria-valuemax="scaledMax"
|
|
578
|
+
:aria-valuenow="getAriaValue(thumbIndex)"
|
|
579
|
+
:aria-label="getThumbAriaLabel(thumbIndex)"
|
|
580
|
+
:aria-orientation="orientation"
|
|
581
|
+
:aria-disabled="disabled || undefined"
|
|
582
|
+
@mousedown.stop="handleThumbDown($event, thumbIndex)"
|
|
583
|
+
@touchstart.stop.prevent="handleThumbDown($event, thumbIndex)"
|
|
584
|
+
@mouseenter="() => handleThumbEnter(thumbIndex)"
|
|
585
|
+
@mouseleave="() => handleThumbLeave()"
|
|
586
|
+
@keydown.stop="handleThumbKeydown($event, thumbIndex)"
|
|
587
|
+
@focus="() => handleThumbFocus(thumbIndex)"
|
|
588
|
+
@blur="handleThumbBlur"
|
|
589
|
+
>
|
|
590
|
+
<!-- Tooltip -->
|
|
591
|
+
<div
|
|
592
|
+
v-if="shouldShowTooltip(thumbIndex)"
|
|
593
|
+
class="slider-value-label"
|
|
594
|
+
:class="{ 'slider-value-label-visible': isDragging || isHovering }"
|
|
595
|
+
:style="getTooltipStyle(thumbIndex)"
|
|
596
|
+
>
|
|
597
|
+
{{ formatValueForDisplay(thumbValue) }}
|
|
598
|
+
</div>
|
|
599
|
+
</div>
|
|
600
|
+
</div>
|
|
601
|
+
</template>
|
|
602
|
+
|
|
603
|
+
<style scoped>
|
|
604
|
+
.slider-root {
|
|
605
|
+
/* Defaults → base 200 */
|
|
606
|
+
--slider-color: var(--color-base-content);
|
|
607
|
+
--slider-track-h: 0.375rem;
|
|
608
|
+
--slider-thumb-size: 1.25rem;
|
|
609
|
+
|
|
610
|
+
position: relative;
|
|
611
|
+
display: flex;
|
|
612
|
+
align-items: center;
|
|
613
|
+
width: 100%;
|
|
614
|
+
height: calc(var(--slider-thumb-size) + 0.5rem);
|
|
615
|
+
cursor: pointer;
|
|
616
|
+
touch-action: none;
|
|
617
|
+
-webkit-tap-highlight-color: transparent;
|
|
618
|
+
user-select: none;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/* Sizes */
|
|
622
|
+
.slider-root.slider--xs {
|
|
623
|
+
--slider-track-h: 0.2rem;
|
|
624
|
+
--slider-thumb-size: 0.75rem;
|
|
625
|
+
}
|
|
626
|
+
.slider-root.slider--sm {
|
|
627
|
+
--slider-track-h: 0.25rem;
|
|
628
|
+
--slider-thumb-size: 1rem;
|
|
629
|
+
}
|
|
630
|
+
.slider-root.slider--md {
|
|
631
|
+
--slider-track-h: 0.375rem;
|
|
632
|
+
--slider-thumb-size: 1.25rem;
|
|
633
|
+
}
|
|
634
|
+
.slider-root.slider--lg {
|
|
635
|
+
--slider-track-h: 0.5rem;
|
|
636
|
+
--slider-thumb-size: 1.625rem;
|
|
637
|
+
}
|
|
638
|
+
.slider-root.slider--xl {
|
|
639
|
+
--slider-track-h: 0.625rem;
|
|
640
|
+
--slider-thumb-size: 2rem;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
/* Colors */
|
|
644
|
+
.slider-root.slider--neutral {
|
|
645
|
+
--slider-color: var(--color-neutral);
|
|
646
|
+
}
|
|
647
|
+
.slider-root.slider--primary {
|
|
648
|
+
--slider-color: var(--color-primary);
|
|
649
|
+
}
|
|
650
|
+
.slider-root.slider--secondary {
|
|
651
|
+
--slider-color: var(--color-secondary);
|
|
652
|
+
}
|
|
653
|
+
.slider-root.slider--accent {
|
|
654
|
+
--slider-color: var(--color-accent);
|
|
655
|
+
}
|
|
656
|
+
.slider-root.slider--info {
|
|
657
|
+
--slider-color: var(--color-info);
|
|
658
|
+
}
|
|
659
|
+
.slider-root.slider--success {
|
|
660
|
+
--slider-color: var(--color-success);
|
|
661
|
+
}
|
|
662
|
+
.slider-root.slider--warning {
|
|
663
|
+
--slider-color: var(--color-warning);
|
|
664
|
+
}
|
|
665
|
+
.slider-root.slider--error {
|
|
666
|
+
--slider-color: var(--color-error);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
/* Orientation */
|
|
670
|
+
.slider-horizontal {
|
|
671
|
+
width: 100%;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.slider-vertical {
|
|
675
|
+
width: var(--slider-thumb-size);
|
|
676
|
+
height: 200px;
|
|
677
|
+
flex-direction: column;
|
|
678
|
+
align-items: center;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/* Disabled state */
|
|
682
|
+
.slider-disabled {
|
|
683
|
+
cursor: not-allowed;
|
|
684
|
+
opacity: 0.5;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
/* Rail */
|
|
688
|
+
.slider-rail {
|
|
689
|
+
position: absolute;
|
|
690
|
+
width: 100%;
|
|
691
|
+
height: var(--slider-track-h);
|
|
692
|
+
border-radius: 9999px;
|
|
693
|
+
background-color: color-mix(in oklch, var(--slider-color) 20%, var(--color-base-200));
|
|
694
|
+
pointer-events: none;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
.slider-vertical .slider-rail {
|
|
698
|
+
width: var(--slider-track-h);
|
|
699
|
+
height: 100%;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
/* Track */
|
|
703
|
+
.slider-track {
|
|
704
|
+
position: absolute;
|
|
705
|
+
height: var(--slider-track-h);
|
|
706
|
+
border-radius: 9999px;
|
|
707
|
+
background-color: var(--slider-color);
|
|
708
|
+
pointer-events: none;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
.slider-vertical .slider-track {
|
|
712
|
+
width: var(--slider-track-h);
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
/* Thumb */
|
|
716
|
+
.slider-thumb {
|
|
717
|
+
position: absolute;
|
|
718
|
+
width: var(--slider-thumb-size);
|
|
719
|
+
height: var(--slider-thumb-size);
|
|
720
|
+
border-radius: 9999px;
|
|
721
|
+
background-color: var(--color-base-100);
|
|
722
|
+
border: 2px solid var(--slider-color);
|
|
723
|
+
box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.15);
|
|
724
|
+
cursor: pointer;
|
|
725
|
+
z-index: 2;
|
|
726
|
+
pointer-events: auto;
|
|
727
|
+
user-select: none;
|
|
728
|
+
-webkit-user-select: none;
|
|
729
|
+
display: block !important;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.slider-thumb:hover {
|
|
733
|
+
transform: scale(1.1);
|
|
734
|
+
box-shadow: 0 2px 6px 0 rgb(0 0 0 / 0.2);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.slider-thumb:active {
|
|
738
|
+
transform: scale(0.95);
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
.slider-thumb:focus {
|
|
742
|
+
outline: 2px solid var(--slider-color);
|
|
743
|
+
outline-offset: 2px;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
.slider-disabled .slider-thumb {
|
|
747
|
+
cursor: not-allowed;
|
|
748
|
+
pointer-events: none;
|
|
749
|
+
transform: none;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
/* Tooltip */
|
|
753
|
+
.slider-value-label {
|
|
754
|
+
position: absolute;
|
|
755
|
+
background-color: var(--color-base-100);
|
|
756
|
+
color: var(--color-base-content);
|
|
757
|
+
padding: 4px 8px;
|
|
758
|
+
border-radius: 4px;
|
|
759
|
+
font-size: 12px;
|
|
760
|
+
font-weight: 500;
|
|
761
|
+
white-space: nowrap;
|
|
762
|
+
opacity: 0;
|
|
763
|
+
visibility: hidden;
|
|
764
|
+
z-index: 3;
|
|
765
|
+
pointer-events: none;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
.slider-value-label-visible {
|
|
769
|
+
opacity: 1;
|
|
770
|
+
visibility: visible;
|
|
771
|
+
}
|
|
772
|
+
</style>
|