sard 1.0.0 → 1.0.2
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/README.md +153 -0
- package/all-components.d.ts +3 -0
- package/all-components.js +291 -0
- package/components/accordion/accordion-item.d.ts +15 -0
- package/components/accordion/accordion-item.js +69 -0
- package/components/accordion/accordion.d.ts +19 -0
- package/components/accordion/accordion.js +60 -0
- package/components/accordion/common.d.ts +38 -0
- package/components/accordion/common.js +5 -0
- package/components/accordion/index.css +1 -0
- package/components/accordion/index.d.ts +7 -0
- package/components/accordion/index.js +8 -0
- package/components/action-sheet/action-sheet-item.d.ts +18 -0
- package/components/action-sheet/action-sheet-item.js +72 -0
- package/components/action-sheet/action-sheet.d.ts +49 -0
- package/components/action-sheet/action-sheet.js +160 -0
- package/components/action-sheet/common.d.ts +55 -0
- package/components/action-sheet/common.js +4 -0
- package/components/action-sheet/context.d.ts +16 -0
- package/components/action-sheet/context.js +50 -0
- package/components/action-sheet/imperative.d.ts +18 -0
- package/components/action-sheet/imperative.js +20 -0
- package/components/action-sheet/index.css +1 -0
- package/components/action-sheet/index.d.ts +9 -0
- package/components/action-sheet/index.js +9 -0
- package/components/alert/alert.d.ts +22 -0
- package/components/alert/alert.js +78 -0
- package/components/alert/common.d.ts +17 -0
- package/components/alert/common.js +4 -0
- package/components/alert/index.css +1 -0
- package/components/alert/index.d.ts +5 -0
- package/components/alert/index.js +6 -0
- package/components/avatar/avatar-group.d.ts +21 -0
- package/components/avatar/avatar-group.js +51 -0
- package/components/avatar/avatar.d.ts +23 -0
- package/components/avatar/avatar.js +91 -0
- package/components/avatar/common.d.ts +44 -0
- package/components/avatar/common.js +9 -0
- package/components/avatar/index.css +1 -0
- package/components/avatar/index.d.ts +7 -0
- package/components/avatar/index.js +8 -0
- package/components/back-top/back-top.d.ts +20 -0
- package/components/back-top/back-top.js +56 -0
- package/components/back-top/common.d.ts +14 -0
- package/components/back-top/common.js +7 -0
- package/components/back-top/index.css +1 -0
- package/components/back-top/index.d.ts +7 -0
- package/components/back-top/index.js +8 -0
- package/components/back-top/useElementBackTop.d.ts +5 -0
- package/components/back-top/useElementBackTop.js +18 -0
- package/components/back-top/usePageBackTop.d.ts +4 -0
- package/components/back-top/usePageBackTop.js +21 -0
- package/components/badge/badge.d.ts +19 -0
- package/components/badge/badge.js +77 -0
- package/components/badge/common.d.ts +15 -0
- package/components/badge/common.js +7 -0
- package/components/badge/index.css +1 -0
- package/components/badge/index.d.ts +5 -0
- package/components/badge/index.js +6 -0
- package/components/barcode/barcode.d.ts +24 -0
- package/components/barcode/barcode.js +227 -0
- package/components/barcode/common.d.ts +26 -0
- package/components/barcode/common.js +20 -0
- package/components/barcode/index.css +1 -0
- package/components/barcode/index.d.ts +5 -0
- package/components/barcode/index.js +6 -0
- package/components/button/button.d.ts +29 -0
- package/components/button/button.js +118 -0
- package/components/button/common.d.ts +24 -0
- package/components/button/common.js +9 -0
- package/components/button/index.css +1 -0
- package/components/button/index.d.ts +5 -0
- package/components/button/index.js +6 -0
- package/components/calendar/calendar-month.d.ts +8 -0
- package/components/calendar/calendar-month.js +176 -0
- package/components/calendar/calendar.d.ts +27 -0
- package/components/calendar/calendar.js +336 -0
- package/components/calendar/common.d.ts +64 -0
- package/components/calendar/common.js +30 -0
- package/components/calendar/index.css +1 -0
- package/components/calendar/index.d.ts +5 -0
- package/components/calendar/index.js +6 -0
- package/components/calendar-input/calendar-input.d.ts +71 -0
- package/components/calendar-input/calendar-input.js +228 -0
- package/components/calendar-input/common.d.ts +11 -0
- package/components/calendar-input/common.js +11 -0
- package/components/calendar-input/index.d.ts +5 -0
- package/components/calendar-input/index.js +6 -0
- package/components/calendar-popout/calendar-popout.d.ts +61 -0
- package/components/calendar-popout/calendar-popout.js +158 -0
- package/components/calendar-popout/common.d.ts +20 -0
- package/components/calendar-popout/common.js +10 -0
- package/components/calendar-popout/index.d.ts +5 -0
- package/components/calendar-popout/index.js +6 -0
- package/components/card/card.d.ts +17 -0
- package/components/card/card.js +103 -0
- package/components/card/common.d.ts +26 -0
- package/components/card/common.js +4 -0
- package/components/card/index.css +1 -0
- package/components/card/index.d.ts +5 -0
- package/components/card/index.js +6 -0
- package/components/cascader/cascader.d.ts +32 -0
- package/components/cascader/cascader.js +218 -0
- package/components/cascader/common.d.ts +62 -0
- package/components/cascader/common.js +29 -0
- package/components/cascader/index.css +1 -0
- package/components/cascader/index.d.ts +5 -0
- package/components/cascader/index.js +6 -0
- package/components/cascader/useCascaderTabs.d.ts +12 -0
- package/components/cascader/useCascaderTabs.js +43 -0
- package/components/cascader/useCascaderTree.d.ts +66 -0
- package/components/cascader/useCascaderTree.js +156 -0
- package/components/cascader-input/cascader-input.d.ts +69 -0
- package/components/cascader-input/cascader-input.js +243 -0
- package/components/cascader-input/common.d.ts +11 -0
- package/components/cascader-input/common.js +8 -0
- package/components/cascader-input/index.d.ts +5 -0
- package/components/cascader-input/index.js +6 -0
- package/components/cascader-popout/cascader-popout.d.ts +59 -0
- package/components/cascader-popout/cascader-popout.js +139 -0
- package/components/cascader-popout/common.d.ts +21 -0
- package/components/cascader-popout/common.js +7 -0
- package/components/cascader-popout/index.d.ts +5 -0
- package/components/cascader-popout/index.js +6 -0
- package/components/check-icon/check-icon.d.ts +7 -0
- package/components/check-icon/check-icon.js +40 -0
- package/components/check-icon/common.d.ts +5 -0
- package/components/check-icon/common.js +0 -0
- package/components/check-icon/index.css +1 -0
- package/components/checkbox/checkbox-group.d.ts +30 -0
- package/components/checkbox/checkbox-group.js +102 -0
- package/components/checkbox/checkbox.d.ts +30 -0
- package/components/checkbox/checkbox.js +145 -0
- package/components/checkbox/common.d.ts +65 -0
- package/components/checkbox/common.js +9 -0
- package/components/checkbox/index.css +1 -0
- package/components/checkbox/index.d.ts +7 -0
- package/components/checkbox/index.js +8 -0
- package/components/checkbox-input/checkbox-input.d.ts +58 -0
- package/components/checkbox-input/checkbox-input.js +193 -0
- package/components/checkbox-input/common.d.ts +372 -0
- package/components/checkbox-input/common.js +5 -0
- package/components/checkbox-input/index.d.ts +5 -0
- package/components/checkbox-input/index.js +6 -0
- package/components/checkbox-popout/checkbox-popout.d.ts +58 -0
- package/components/checkbox-popout/checkbox-popout.js +244 -0
- package/components/checkbox-popout/common.d.ts +22 -0
- package/components/checkbox-popout/common.js +8 -0
- package/components/checkbox-popout/index.css +1 -0
- package/components/checkbox-popout/index.d.ts +5 -0
- package/components/checkbox-popout/index.js +6 -0
- package/components/collapse/collapse.d.ts +11 -0
- package/components/collapse/collapse.js +94 -0
- package/components/collapse/common.d.ts +11 -0
- package/components/collapse/common.js +0 -0
- package/components/collapse/index.css +1 -0
- package/components/collapse/index.d.ts +5 -0
- package/components/collapse/index.js +6 -0
- package/components/color-picker/color-picker.d.ts +32 -0
- package/components/color-picker/color-picker.js +366 -0
- package/components/color-picker/common.d.ts +24 -0
- package/components/color-picker/common.js +12 -0
- package/components/color-picker/index.css +1 -0
- package/components/color-picker/index.d.ts +6 -0
- package/components/color-picker/index.js +6 -0
- package/components/color-picker-input/color-picker-input.d.ts +59 -0
- package/components/color-picker-input/color-picker-input.js +170 -0
- package/components/color-picker-input/common.d.ts +12 -0
- package/components/color-picker-input/common.js +5 -0
- package/components/color-picker-input/index.css +1 -0
- package/components/color-picker-input/index.d.ts +5 -0
- package/components/color-picker-input/index.js +6 -0
- package/components/color-picker-popout/color-picker-popout.d.ts +53 -0
- package/components/color-picker-popout/color-picker-popout.js +116 -0
- package/components/color-picker-popout/common.d.ts +19 -0
- package/components/color-picker-popout/common.js +9 -0
- package/components/color-picker-popout/index.css +1 -0
- package/components/color-picker-popout/index.d.ts +5 -0
- package/components/color-picker-popout/index.js +6 -0
- package/components/compact/common.d.ts +22 -0
- package/components/compact/common.js +5 -0
- package/components/compact/compact.d.ts +14 -0
- package/components/compact/compact.js +49 -0
- package/components/compact/index.css +1 -0
- package/components/compact/index.d.ts +5 -0
- package/components/compact/index.js +6 -0
- package/components/config/index.d.ts +10 -0
- package/components/config/index.js +2 -0
- package/components/config/windowInfo.d.ts +16 -0
- package/components/config/windowInfo.js +20 -0
- package/components/cool-icon/common.d.ts +17 -0
- package/components/cool-icon/common.js +4 -0
- package/components/cool-icon/cool-icon.d.ts +21 -0
- package/components/cool-icon/cool-icon.js +70 -0
- package/components/cool-icon/index.css +1 -0
- package/components/cool-icon/index.d.ts +5 -0
- package/components/cool-icon/index.js +6 -0
- package/components/count-down/common.d.ts +23 -0
- package/components/count-down/common.js +8 -0
- package/components/count-down/count-down.d.ts +22 -0
- package/components/count-down/count-down.js +51 -0
- package/components/count-down/index.css +0 -0
- package/components/count-down/index.d.ts +6 -0
- package/components/count-down/index.js +7 -0
- package/components/count-down/useCountDown.d.ts +22 -0
- package/components/count-down/useCountDown.js +101 -0
- package/components/count-to/common.d.ts +9 -0
- package/components/count-to/common.js +9 -0
- package/components/count-to/count-to.d.ts +10 -0
- package/components/count-to/count-to.js +58 -0
- package/components/count-to/index.d.ts +5 -0
- package/components/count-to/index.js +6 -0
- package/components/crop-image/common.d.ts +28 -0
- package/components/crop-image/common.js +8 -0
- package/components/crop-image/crop-image.d.ts +50 -0
- package/components/crop-image/crop-image.js +535 -0
- package/components/crop-image/imperative.d.ts +10 -0
- package/components/crop-image/imperative.js +20 -0
- package/components/crop-image/index.css +1 -0
- package/components/crop-image/index.d.ts +6 -0
- package/components/crop-image/index.js +7 -0
- package/components/date-strip/common.d.ts +28 -0
- package/components/date-strip/common.js +21 -0
- package/components/date-strip/date-strip.d.ts +28 -0
- package/components/date-strip/date-strip.js +271 -0
- package/components/date-strip/index.css +1 -0
- package/components/date-strip/index.d.ts +6 -0
- package/components/date-strip/index.js +6 -0
- package/components/datetime-picker/common.d.ts +49 -0
- package/components/datetime-picker/common.js +233 -0
- package/components/datetime-picker/datetime-picker.d.ts +26 -0
- package/components/datetime-picker/datetime-picker.js +181 -0
- package/components/datetime-picker/index.d.ts +5 -0
- package/components/datetime-picker/index.js +6 -0
- package/components/datetime-picker-input/common.d.ts +21 -0
- package/components/datetime-picker-input/common.js +18 -0
- package/components/datetime-picker-input/datetime-picker-input.d.ts +62 -0
- package/components/datetime-picker-input/datetime-picker-input.js +184 -0
- package/components/datetime-picker-input/index.d.ts +5 -0
- package/components/datetime-picker-input/index.js +6 -0
- package/components/datetime-picker-popout/common.d.ts +17 -0
- package/components/datetime-picker-popout/common.js +8 -0
- package/components/datetime-picker-popout/datetime-picker-popout.d.ts +53 -0
- package/components/datetime-picker-popout/datetime-picker-popout.js +137 -0
- package/components/datetime-picker-popout/index.d.ts +5 -0
- package/components/datetime-picker-popout/index.js +6 -0
- package/components/datetime-range-picker/common.d.ts +15 -0
- package/components/datetime-range-picker/common.js +4 -0
- package/components/datetime-range-picker/datetime-range-picker.d.ts +27 -0
- package/components/datetime-range-picker/datetime-range-picker.js +115 -0
- package/components/datetime-range-picker/index.css +1 -0
- package/components/datetime-range-picker/index.d.ts +5 -0
- package/components/datetime-range-picker/index.js +6 -0
- package/components/datetime-range-picker-input/common.d.ts +11 -0
- package/components/datetime-range-picker-input/common.js +7 -0
- package/components/datetime-range-picker-input/datetime-range-picker-input.d.ts +63 -0
- package/components/datetime-range-picker-input/datetime-range-picker-input.js +198 -0
- package/components/datetime-range-picker-input/index.d.ts +5 -0
- package/components/datetime-range-picker-input/index.js +6 -0
- package/components/datetime-range-picker-popout/common.d.ts +17 -0
- package/components/datetime-range-picker-popout/common.js +7 -0
- package/components/datetime-range-picker-popout/datetime-range-picker-popout.d.ts +54 -0
- package/components/datetime-range-picker-popout/datetime-range-picker-popout.js +128 -0
- package/components/datetime-range-picker-popout/index.d.ts +5 -0
- package/components/datetime-range-picker-popout/index.js +6 -0
- package/components/descriptions/common.d.ts +39 -0
- package/components/descriptions/common.js +12 -0
- package/components/descriptions/descriptions-item.d.ts +18 -0
- package/components/descriptions/descriptions-item.js +76 -0
- package/components/descriptions/descriptions.d.ts +17 -0
- package/components/descriptions/descriptions.js +102 -0
- package/components/descriptions/index.css +1 -0
- package/components/descriptions/index.d.ts +7 -0
- package/components/descriptions/index.js +8 -0
- package/components/dialog/common.d.ts +35 -0
- package/components/dialog/common.js +10 -0
- package/components/dialog/dialog.d.ts +55 -0
- package/components/dialog/dialog.js +273 -0
- package/components/dialog/imperative.d.ts +20 -0
- package/components/dialog/imperative.js +36 -0
- package/components/dialog/index.css +1 -0
- package/components/dialog/index.d.ts +6 -0
- package/components/dialog/index.js +7 -0
- package/components/divider/common.d.ts +15 -0
- package/components/divider/common.js +8 -0
- package/components/divider/divider.d.ts +16 -0
- package/components/divider/divider.js +51 -0
- package/components/divider/index.css +1 -0
- package/components/divider/index.d.ts +5 -0
- package/components/divider/index.js +6 -0
- package/components/dnd/common.d.ts +72 -0
- package/components/dnd/common.js +5 -0
- package/components/dnd/dnd-handle.d.ts +11 -0
- package/components/dnd/dnd-handle.js +56 -0
- package/components/dnd/dnd-item.d.ts +11 -0
- package/components/dnd/dnd-item.js +131 -0
- package/components/dnd/dnd.d.ts +40 -0
- package/components/dnd/dnd.js +85 -0
- package/components/dnd/index.css +1 -0
- package/components/dnd/index.d.ts +9 -0
- package/components/dnd/index.js +10 -0
- package/components/dropdown/common.d.ts +62 -0
- package/components/dropdown/common.js +13 -0
- package/components/dropdown/dropdown-item.d.ts +50 -0
- package/components/dropdown/dropdown-item.js +261 -0
- package/components/dropdown/dropdown.d.ts +19 -0
- package/components/dropdown/dropdown.js +90 -0
- package/components/dropdown/index.css +1 -0
- package/components/dropdown/index.d.ts +7 -0
- package/components/dropdown/index.js +8 -0
- package/components/ellipsis/common.d.ts +20 -0
- package/components/ellipsis/common.js +9 -0
- package/components/ellipsis/ellipsis.d.ts +25 -0
- package/components/ellipsis/ellipsis.js +203 -0
- package/components/ellipsis/index.css +1 -0
- package/components/ellipsis/index.d.ts +5 -0
- package/components/ellipsis/index.js +6 -0
- package/components/empty/common.d.ts +12 -0
- package/components/empty/common.js +4 -0
- package/components/empty/empty.d.ts +15 -0
- package/components/empty/empty.js +51 -0
- package/components/empty/index.css +1 -0
- package/components/empty/index.d.ts +5 -0
- package/components/empty/index.js +6 -0
- package/components/fab/common.d.ts +60 -0
- package/components/fab/common.js +13 -0
- package/components/fab/fab-item.d.ts +20 -0
- package/components/fab/fab-item.js +62 -0
- package/components/fab/fab.d.ts +44 -0
- package/components/fab/fab.js +186 -0
- package/components/fab/index.css +1 -0
- package/components/fab/index.d.ts +7 -0
- package/components/fab/index.js +8 -0
- package/components/floating-bubble/common.d.ts +23 -0
- package/components/floating-bubble/common.js +9 -0
- package/components/floating-bubble/floating-bubble.d.ts +33 -0
- package/components/floating-bubble/floating-bubble.js +73 -0
- package/components/floating-bubble/index.css +1 -0
- package/components/floating-bubble/index.d.ts +5 -0
- package/components/floating-bubble/index.js +6 -0
- package/components/floating-bubble/useFloatingBubble.d.ts +42 -0
- package/components/floating-bubble/useFloatingBubble.js +123 -0
- package/components/floating-panel/common.d.ts +18 -0
- package/components/floating-panel/common.js +9 -0
- package/components/floating-panel/floating-panel.d.ts +23 -0
- package/components/floating-panel/floating-panel.js +155 -0
- package/components/floating-panel/index.css +1 -0
- package/components/floating-panel/index.d.ts +5 -0
- package/components/floating-panel/index.js +6 -0
- package/components/form/Validator.d.ts +95 -0
- package/components/form/Validator.js +185 -0
- package/components/form/common.d.ts +114 -0
- package/components/form/common.js +28 -0
- package/components/form/form-item.d.ts +27 -0
- package/components/form/form-item.js +124 -0
- package/components/form/form.d.ts +29 -0
- package/components/form/form.js +92 -0
- package/components/form/getUrlRegexp.d.ts +2 -0
- package/components/form/getUrlRegexp.js +32 -0
- package/components/form/index.css +1 -0
- package/components/form/index.d.ts +8 -0
- package/components/form/index.js +10 -0
- package/components/form/useForm.d.ts +24 -0
- package/components/form/useForm.js +96 -0
- package/components/form/useFormItem.d.ts +21 -0
- package/components/form/useFormItem.js +178 -0
- package/components/form-plain/common.d.ts +25 -0
- package/components/form-plain/common.js +0 -0
- package/components/form-plain/form-item-plain.d.ts +27 -0
- package/components/form-plain/form-item-plain.js +94 -0
- package/components/form-plain/form-plain.d.ts +29 -0
- package/components/form-plain/form-plain.js +86 -0
- package/components/form-plain/index.d.ts +7 -0
- package/components/form-plain/index.js +8 -0
- package/components/grid/common.d.ts +33 -0
- package/components/grid/common.js +8 -0
- package/components/grid/grid-item.d.ts +15 -0
- package/components/grid/grid-item.js +63 -0
- package/components/grid/grid.d.ts +19 -0
- package/components/grid/grid.js +67 -0
- package/components/grid/index.css +1 -0
- package/components/grid/index.d.ts +7 -0
- package/components/grid/index.js +8 -0
- package/components/image/common.d.ts +48 -0
- package/components/image/common.js +31 -0
- package/components/image/image.d.ts +32 -0
- package/components/image/image.js +163 -0
- package/components/image/index.css +1 -0
- package/components/image/index.d.ts +5 -0
- package/components/image/index.js +6 -0
- package/components/index.d.ts +122 -0
- package/components/index.js +142 -0
- package/components/indexes/common.d.ts +39 -0
- package/components/indexes/common.js +5 -0
- package/components/indexes/index.css +1 -0
- package/components/indexes/index.d.ts +9 -0
- package/components/indexes/index.js +10 -0
- package/components/indexes/indexes-anchor.d.ts +11 -0
- package/components/indexes/indexes-anchor.js +33 -0
- package/components/indexes/indexes-nav.d.ts +17 -0
- package/components/indexes/indexes-nav.js +84 -0
- package/components/indexes/indexes.d.ts +19 -0
- package/components/indexes/indexes.js +64 -0
- package/components/infinite-list/common.d.ts +24 -0
- package/components/infinite-list/common.js +4 -0
- package/components/infinite-list/index.css +1 -0
- package/components/infinite-list/index.d.ts +5 -0
- package/components/infinite-list/index.js +6 -0
- package/components/infinite-list/infinite-list.d.ts +23 -0
- package/components/infinite-list/infinite-list.js +126 -0
- package/components/input/common.d.ts +63 -0
- package/components/input/common.js +10 -0
- package/components/input/index.css +1 -0
- package/components/input/index.d.ts +5 -0
- package/components/input/index.js +6 -0
- package/components/input/input.d.ts +60 -0
- package/components/input/input.js +387 -0
- package/components/input/utils.d.ts +7 -0
- package/components/input/utils.js +36 -0
- package/components/keyboard/common.d.ts +28 -0
- package/components/keyboard/common.js +34 -0
- package/components/keyboard/index.css +1 -0
- package/components/keyboard/index.d.ts +5 -0
- package/components/keyboard/index.js +7 -0
- package/components/keyboard/keyboard.d.ts +23 -0
- package/components/keyboard/keyboard.js +139 -0
- package/components/keyboard-popout/common.d.ts +27 -0
- package/components/keyboard-popout/common.js +7 -0
- package/components/keyboard-popout/index.css +0 -0
- package/components/keyboard-popout/index.d.ts +5 -0
- package/components/keyboard-popout/index.js +6 -0
- package/components/keyboard-popout/keyboard-popout.d.ts +58 -0
- package/components/keyboard-popout/keyboard-popout.js +124 -0
- package/components/layout/col.d.ts +11 -0
- package/components/layout/col.js +49 -0
- package/components/layout/common.d.ts +36 -0
- package/components/layout/common.js +18 -0
- package/components/layout/index.css +1 -0
- package/components/layout/index.d.ts +6 -0
- package/components/layout/index.js +8 -0
- package/components/layout/row.d.ts +11 -0
- package/components/layout/row.js +54 -0
- package/components/list/common.d.ts +38 -0
- package/components/list/common.js +5 -0
- package/components/list/index.css +1 -0
- package/components/list/index.d.ts +7 -0
- package/components/list/index.js +8 -0
- package/components/list/list-item.d.ts +22 -0
- package/components/list/list-item.js +79 -0
- package/components/list/list.d.ts +11 -0
- package/components/list/list.js +60 -0
- package/components/load-more/common.d.ts +20 -0
- package/components/load-more/common.js +4 -0
- package/components/load-more/index.css +1 -0
- package/components/load-more/index.d.ts +6 -0
- package/components/load-more/index.js +7 -0
- package/components/load-more/load-more.d.ts +23 -0
- package/components/load-more/load-more.js +56 -0
- package/components/load-more/useLoadMore.d.ts +22 -0
- package/components/load-more/useLoadMore.js +71 -0
- package/components/loading/common.d.ts +17 -0
- package/components/loading/common.js +8 -0
- package/components/loading/index.css +1 -0
- package/components/loading/index.d.ts +5 -0
- package/components/loading/index.js +6 -0
- package/components/loading/loading.d.ts +21 -0
- package/components/loading/loading.js +97 -0
- package/components/marquee/common.d.ts +11 -0
- package/components/marquee/common.js +7 -0
- package/components/marquee/index.css +1 -0
- package/components/marquee/index.d.ts +5 -0
- package/components/marquee/index.js +6 -0
- package/components/marquee/marquee.d.ts +14 -0
- package/components/marquee/marquee.js +75 -0
- package/components/menu/common.d.ts +24 -0
- package/components/menu/common.js +7 -0
- package/components/menu/context.d.ts +23 -0
- package/components/menu/context.js +55 -0
- package/components/menu/index.css +1 -0
- package/components/menu/index.d.ts +7 -0
- package/components/menu/index.js +8 -0
- package/components/menu/menu-item.d.ts +16 -0
- package/components/menu/menu-item.js +59 -0
- package/components/menu/menu.d.ts +18 -0
- package/components/menu/menu.js +44 -0
- package/components/motion/common.d.ts +24 -0
- package/components/motion/common.js +7 -0
- package/components/motion/index.css +1 -0
- package/components/motion/index.d.ts +6 -0
- package/components/motion/index.js +7 -0
- package/components/motion/motion.d.ts +35 -0
- package/components/motion/motion.js +88 -0
- package/components/motion/useMotioning.d.ts +2 -0
- package/components/motion/useMotioning.js +26 -0
- package/components/navbar/common.d.ts +28 -0
- package/components/navbar/common.js +0 -0
- package/components/navbar/index.css +1 -0
- package/components/navbar/index.d.ts +7 -0
- package/components/navbar/index.js +8 -0
- package/components/navbar/navbar-item.d.ts +15 -0
- package/components/navbar/navbar-item.js +30 -0
- package/components/navbar/navbar.d.ts +15 -0
- package/components/navbar/navbar.js +92 -0
- package/components/navbar-pit/common.d.ts +3 -0
- package/components/navbar-pit/common.js +0 -0
- package/components/navbar-pit/index.css +1 -0
- package/components/navbar-pit/index.d.ts +5 -0
- package/components/navbar-pit/index.js +6 -0
- package/components/navbar-pit/navbar-pit.d.ts +4 -0
- package/components/navbar-pit/navbar-pit.js +19 -0
- package/components/notice-bar/common.d.ts +25 -0
- package/components/notice-bar/common.js +8 -0
- package/components/notice-bar/index.css +1 -0
- package/components/notice-bar/index.d.ts +5 -0
- package/components/notice-bar/index.js +6 -0
- package/components/notice-bar/notice-bar.d.ts +28 -0
- package/components/notice-bar/notice-bar.js +164 -0
- package/components/notify/common.d.ts +24 -0
- package/components/notify/common.js +9 -0
- package/components/notify/imperative.d.ts +18 -0
- package/components/notify/imperative.js +43 -0
- package/components/notify/index.css +1 -0
- package/components/notify/index.d.ts +6 -0
- package/components/notify/index.js +7 -0
- package/components/notify/notify.d.ts +45 -0
- package/components/notify/notify.js +131 -0
- package/components/overlay/common.d.ts +14 -0
- package/components/overlay/common.js +4 -0
- package/components/overlay/index.css +1 -0
- package/components/overlay/index.d.ts +5 -0
- package/components/overlay/index.js +6 -0
- package/components/overlay/overlay.d.ts +20 -0
- package/components/overlay/overlay.js +57 -0
- package/components/pagination/common.d.ts +28 -0
- package/components/pagination/common.js +29 -0
- package/components/pagination/index.css +1 -0
- package/components/pagination/index.d.ts +5 -0
- package/components/pagination/index.js +6 -0
- package/components/pagination/pagination.d.ts +26 -0
- package/components/pagination/pagination.js +129 -0
- package/components/password-input/common.d.ts +21 -0
- package/components/password-input/common.js +8 -0
- package/components/password-input/index.css +1 -0
- package/components/password-input/index.d.ts +5 -0
- package/components/password-input/index.js +6 -0
- package/components/password-input/password-input.d.ts +27 -0
- package/components/password-input/password-input.js +188 -0
- package/components/picker/common.d.ts +25 -0
- package/components/picker/common.js +77 -0
- package/components/picker/index.css +1 -0
- package/components/picker/index.d.ts +5 -0
- package/components/picker/index.js +6 -0
- package/components/picker/picker.d.ts +22 -0
- package/components/picker/picker.js +141 -0
- package/components/picker-input/common.d.ts +81 -0
- package/components/picker-input/common.js +5 -0
- package/components/picker-input/index.d.ts +5 -0
- package/components/picker-input/index.js +6 -0
- package/components/picker-input/picker-input.d.ts +33 -0
- package/components/picker-input/picker-input.js +166 -0
- package/components/picker-popout/common.d.ts +17 -0
- package/components/picker-popout/common.js +8 -0
- package/components/picker-popout/index.d.ts +5 -0
- package/components/picker-popout/index.js +6 -0
- package/components/picker-popout/picker-popout.d.ts +33 -0
- package/components/picker-popout/picker-popout.js +106 -0
- package/components/picker-view/common.d.ts +52 -0
- package/components/picker-view/common.js +21 -0
- package/components/picker-view/index.css +1 -0
- package/components/picker-view/index.d.ts +7 -0
- package/components/picker-view/index.js +8 -0
- package/components/picker-view/picker-view-column.d.ts +3 -0
- package/components/picker-view/picker-view-column.js +137 -0
- package/components/picker-view/picker-view.d.ts +21 -0
- package/components/picker-view/picker-view.js +67 -0
- package/components/popout/common.d.ts +52 -0
- package/components/popout/common.js +14 -0
- package/components/popout/index.css +1 -0
- package/components/popout/index.d.ts +6 -0
- package/components/popout/index.js +7 -0
- package/components/popout/popout.d.ts +61 -0
- package/components/popout/popout.js +308 -0
- package/components/popout/useFormPopout.d.ts +43 -0
- package/components/popout/useFormPopout.js +69 -0
- package/components/popout-input/common.d.ts +26 -0
- package/components/popout-input/common.js +4 -0
- package/components/popout-input/index.css +1 -0
- package/components/popout-input/index.d.ts +6 -0
- package/components/popout-input/index.js +7 -0
- package/components/popout-input/popout-input.d.ts +31 -0
- package/components/popout-input/popout-input.js +175 -0
- package/components/popout-input/usePopoutInput.d.ts +25 -0
- package/components/popout-input/usePopoutInput.js +63 -0
- package/components/popover/common.d.ts +21 -0
- package/components/popover/common.js +10 -0
- package/components/popover/index.css +1 -0
- package/components/popover/index.d.ts +7 -0
- package/components/popover/index.js +6 -0
- package/components/popover/popover.d.ts +23 -0
- package/components/popover/popover.js +118 -0
- package/components/popup/common.d.ts +48 -0
- package/components/popup/common.js +39 -0
- package/components/popup/index.css +1 -0
- package/components/popup/index.d.ts +5 -0
- package/components/popup/index.js +7 -0
- package/components/popup/popup.d.ts +48 -0
- package/components/popup/popup.js +148 -0
- package/components/preview-image/common.d.ts +28 -0
- package/components/preview-image/common.js +8 -0
- package/components/preview-image/imperative.d.ts +10 -0
- package/components/preview-image/imperative.js +20 -0
- package/components/preview-image/index.css +1 -0
- package/components/preview-image/index.d.ts +6 -0
- package/components/preview-image/index.js +7 -0
- package/components/preview-image/preview-image-item.d.ts +4 -0
- package/components/preview-image/preview-image-item.js +256 -0
- package/components/preview-image/preview-image.d.ts +40 -0
- package/components/preview-image/preview-image.js +172 -0
- package/components/progress-bar/common.d.ts +16 -0
- package/components/progress-bar/common.js +7 -0
- package/components/progress-bar/index.css +1 -0
- package/components/progress-bar/index.d.ts +5 -0
- package/components/progress-bar/index.js +6 -0
- package/components/progress-bar/progress-bar.d.ts +21 -0
- package/components/progress-bar/progress-bar.js +95 -0
- package/components/progress-circle/common.d.ts +13 -0
- package/components/progress-circle/common.js +7 -0
- package/components/progress-circle/index.css +1 -0
- package/components/progress-circle/index.d.ts +5 -0
- package/components/progress-circle/index.js +6 -0
- package/components/progress-circle/progress-circle.d.ts +18 -0
- package/components/progress-circle/progress-circle.js +100 -0
- package/components/pull-down-refresh/common.d.ts +26 -0
- package/components/pull-down-refresh/common.js +11 -0
- package/components/pull-down-refresh/index.css +1 -0
- package/components/pull-down-refresh/index.d.ts +5 -0
- package/components/pull-down-refresh/index.js +6 -0
- package/components/pull-down-refresh/pull-down-refresh.d.ts +22 -0
- package/components/pull-down-refresh/pull-down-refresh.js +160 -0
- package/components/puzzle-verify/common.d.ts +13 -0
- package/components/puzzle-verify/common.js +4 -0
- package/components/puzzle-verify/index.css +1 -0
- package/components/puzzle-verify/index.d.ts +5 -0
- package/components/puzzle-verify/index.js +6 -0
- package/components/puzzle-verify/puzzle-verify.d.ts +32 -0
- package/components/puzzle-verify/puzzle-verify.js +149 -0
- package/components/qrcode/common.d.ts +16 -0
- package/components/qrcode/common.js +11 -0
- package/components/qrcode/index.css +1 -0
- package/components/qrcode/index.d.ts +5 -0
- package/components/qrcode/index.js +6 -0
- package/components/qrcode/qrcode.d.ts +12 -0
- package/components/qrcode/qrcode.js +120 -0
- package/components/qrcode/test/utils.d.ts +7 -0
- package/components/qrcode/test/utils.js +89 -0
- package/components/radio/common.d.ts +59 -0
- package/components/radio/common.js +8 -0
- package/components/radio/index.css +1 -0
- package/components/radio/index.d.ts +7 -0
- package/components/radio/index.js +8 -0
- package/components/radio/radio-group.d.ts +28 -0
- package/components/radio/radio-group.js +99 -0
- package/components/radio/radio.d.ts +15 -0
- package/components/radio/radio.js +113 -0
- package/components/radio-input/common.d.ts +317 -0
- package/components/radio-input/common.js +5 -0
- package/components/radio-input/index.d.ts +5 -0
- package/components/radio-input/index.js +6 -0
- package/components/radio-input/radio-input.d.ts +57 -0
- package/components/radio-input/radio-input.js +189 -0
- package/components/radio-popout/common.d.ts +21 -0
- package/components/radio-popout/common.js +9 -0
- package/components/radio-popout/index.css +1 -0
- package/components/radio-popout/index.d.ts +5 -0
- package/components/radio-popout/index.js +6 -0
- package/components/radio-popout/radio-popout.d.ts +57 -0
- package/components/radio-popout/radio-popout.js +217 -0
- package/components/rate/common.d.ts +25 -0
- package/components/rate/common.js +7 -0
- package/components/rate/index.css +1 -0
- package/components/rate/index.d.ts +5 -0
- package/components/rate/index.js +6 -0
- package/components/rate/rate.d.ts +31 -0
- package/components/rate/rate.js +190 -0
- package/components/read-more/common.d.ts +20 -0
- package/components/read-more/common.js +7 -0
- package/components/read-more/index.css +1 -0
- package/components/read-more/index.d.ts +5 -0
- package/components/read-more/index.js +6 -0
- package/components/read-more/read-more.d.ts +26 -0
- package/components/read-more/read-more.js +119 -0
- package/components/result/common.d.ts +13 -0
- package/components/result/common.js +4 -0
- package/components/result/index.css +1 -0
- package/components/result/index.d.ts +5 -0
- package/components/result/index.js +6 -0
- package/components/result/result.d.ts +15 -0
- package/components/result/result.js +49 -0
- package/components/rotate-verify/common.d.ts +12 -0
- package/components/rotate-verify/common.js +4 -0
- package/components/rotate-verify/index.css +1 -0
- package/components/rotate-verify/index.d.ts +5 -0
- package/components/rotate-verify/index.js +6 -0
- package/components/rotate-verify/rotate-verify.d.ts +31 -0
- package/components/rotate-verify/rotate-verify.js +106 -0
- package/components/scroll-list/common.d.ts +15 -0
- package/components/scroll-list/common.js +4 -0
- package/components/scroll-list/index.css +1 -0
- package/components/scroll-list/index.d.ts +5 -0
- package/components/scroll-list/index.js +6 -0
- package/components/scroll-list/scroll-list.d.ts +19 -0
- package/components/scroll-list/scroll-list.js +87 -0
- package/components/scroll-spy/common.d.ts +32 -0
- package/components/scroll-spy/common.js +4 -0
- package/components/scroll-spy/index.css +1 -0
- package/components/scroll-spy/index.d.ts +7 -0
- package/components/scroll-spy/index.js +8 -0
- package/components/scroll-spy/scroll-spy-anchor.d.ts +11 -0
- package/components/scroll-spy/scroll-spy-anchor.js +28 -0
- package/components/scroll-spy/scroll-spy.d.ts +17 -0
- package/components/scroll-spy/scroll-spy.js +63 -0
- package/components/search/common.d.ts +37 -0
- package/components/search/common.js +7 -0
- package/components/search/index.css +1 -0
- package/components/search/index.d.ts +5 -0
- package/components/search/index.js +6 -0
- package/components/search/search.d.ts +44 -0
- package/components/search/search.js +212 -0
- package/components/segmented/common.d.ts +54 -0
- package/components/segmented/common.js +12 -0
- package/components/segmented/index.css +1 -0
- package/components/segmented/index.d.ts +7 -0
- package/components/segmented/index.js +8 -0
- package/components/segmented/segmented-item.d.ts +20 -0
- package/components/segmented/segmented-item.js +72 -0
- package/components/segmented/segmented.d.ts +28 -0
- package/components/segmented/segmented.js +132 -0
- package/components/select/common.d.ts +100 -0
- package/components/select/common.js +12 -0
- package/components/select/index.css +1 -0
- package/components/select/index.d.ts +9 -0
- package/components/select/index.js +10 -0
- package/components/select/select-option-group.d.ts +14 -0
- package/components/select/select-option-group.js +28 -0
- package/components/select/select-option.d.ts +20 -0
- package/components/select/select-option.js +91 -0
- package/components/select/select.d.ts +33 -0
- package/components/select/select.js +268 -0
- package/components/select/useSelect.d.ts +8 -0
- package/components/select/useSelect.js +45 -0
- package/components/select-input/common.d.ts +14 -0
- package/components/select-input/common.js +8 -0
- package/components/select-input/index.d.ts +5 -0
- package/components/select-input/index.js +6 -0
- package/components/select-input/select-input.d.ts +68 -0
- package/components/select-input/select-input.js +258 -0
- package/components/select-popout/common.d.ts +17 -0
- package/components/select-popout/common.js +9 -0
- package/components/select-popout/index.d.ts +5 -0
- package/components/select-popout/index.js +6 -0
- package/components/select-popout/select-popout.d.ts +58 -0
- package/components/select-popout/select-popout.js +153 -0
- package/components/share-sheet/common.d.ts +62 -0
- package/components/share-sheet/common.js +5 -0
- package/components/share-sheet/context.d.ts +14 -0
- package/components/share-sheet/context.js +41 -0
- package/components/share-sheet/index.css +1 -0
- package/components/share-sheet/index.d.ts +12 -0
- package/components/share-sheet/index.js +12 -0
- package/components/share-sheet/share-sheet-icon.d.ts +11 -0
- package/components/share-sheet/share-sheet-icon.js +43 -0
- package/components/share-sheet/share-sheet-item.d.ts +17 -0
- package/components/share-sheet/share-sheet-item.js +58 -0
- package/components/share-sheet/share-sheet-row.d.ts +11 -0
- package/components/share-sheet/share-sheet-row.js +15 -0
- package/components/share-sheet/share-sheet.d.ts +48 -0
- package/components/share-sheet/share-sheet.js +138 -0
- package/components/sidebar/common.d.ts +43 -0
- package/components/sidebar/common.js +4 -0
- package/components/sidebar/index.css +1 -0
- package/components/sidebar/index.d.ts +7 -0
- package/components/sidebar/index.js +8 -0
- package/components/sidebar/sidebar-item.d.ts +15 -0
- package/components/sidebar/sidebar-item.js +83 -0
- package/components/sidebar/sidebar.d.ts +17 -0
- package/components/sidebar/sidebar.js +79 -0
- package/components/signature/common.d.ts +27 -0
- package/components/signature/common.js +10 -0
- package/components/signature/index.css +1 -0
- package/components/signature/index.d.ts +5 -0
- package/components/signature/index.js +6 -0
- package/components/signature/signature.d.ts +32 -0
- package/components/signature/signature.js +247 -0
- package/components/skeleton/common.d.ts +29 -0
- package/components/skeleton/common.js +7 -0
- package/components/skeleton/index.css +1 -0
- package/components/skeleton/index.d.ts +13 -0
- package/components/skeleton/index.js +14 -0
- package/components/skeleton/skeleton-avatar.d.ts +4 -0
- package/components/skeleton/skeleton-avatar.js +58 -0
- package/components/skeleton/skeleton-block.d.ts +4 -0
- package/components/skeleton/skeleton-block.js +49 -0
- package/components/skeleton/skeleton-paragraph.d.ts +4 -0
- package/components/skeleton/skeleton-paragraph.js +52 -0
- package/components/skeleton/skeleton-title.d.ts +4 -0
- package/components/skeleton/skeleton-title.js +45 -0
- package/components/skeleton/skeleton.d.ts +20 -0
- package/components/skeleton/skeleton.js +76 -0
- package/components/slide-verify/common.d.ts +30 -0
- package/components/slide-verify/common.js +4 -0
- package/components/slide-verify/index.css +1 -0
- package/components/slide-verify/index.d.ts +5 -0
- package/components/slide-verify/index.js +6 -0
- package/components/slide-verify/slide-verify.d.ts +30 -0
- package/components/slide-verify/slide-verify.js +200 -0
- package/components/slider/common.d.ts +39 -0
- package/components/slider/common.js +9 -0
- package/components/slider/index.css +1 -0
- package/components/slider/index.d.ts +5 -0
- package/components/slider/index.js +6 -0
- package/components/slider/slider.d.ts +44 -0
- package/components/slider/slider.js +334 -0
- package/components/space/common.d.ts +18 -0
- package/components/space/common.js +23 -0
- package/components/space/index.css +1 -0
- package/components/space/index.d.ts +5 -0
- package/components/space/index.js +7 -0
- package/components/space/space.d.ts +17 -0
- package/components/space/space.js +59 -0
- package/components/status-bar/common.d.ts +11 -0
- package/components/status-bar/common.js +4 -0
- package/components/status-bar/index.css +1 -0
- package/components/status-bar/index.d.ts +5 -0
- package/components/status-bar/index.js +6 -0
- package/components/status-bar/status-bar.d.ts +13 -0
- package/components/status-bar/status-bar.js +31 -0
- package/components/stepper/common.d.ts +26 -0
- package/components/stepper/common.js +15 -0
- package/components/stepper/index.css +1 -0
- package/components/stepper/index.d.ts +5 -0
- package/components/stepper/index.js +6 -0
- package/components/stepper/stepper.d.ts +31 -0
- package/components/stepper/stepper.js +262 -0
- package/components/steps/common.d.ts +46 -0
- package/components/steps/common.js +10 -0
- package/components/steps/index.css +1 -0
- package/components/steps/index.d.ts +7 -0
- package/components/steps/index.js +8 -0
- package/components/steps/step.d.ts +11 -0
- package/components/steps/step.js +61 -0
- package/components/steps/steps.d.ts +18 -0
- package/components/steps/steps.js +66 -0
- package/components/sticky/common.d.ts +25 -0
- package/components/sticky/common.js +4 -0
- package/components/sticky/index.css +1 -0
- package/components/sticky/index.d.ts +7 -0
- package/components/sticky/index.js +8 -0
- package/components/sticky/sticky-box.d.ts +11 -0
- package/components/sticky/sticky-box.js +20 -0
- package/components/sticky/sticky.d.ts +11 -0
- package/components/sticky/sticky.js +126 -0
- package/components/style/base.css +0 -0
- package/components/style/bem.css +0 -0
- package/components/style/config.css +0 -0
- package/components/style/core-color.css +0 -0
- package/components/style/functions.css +0 -0
- package/components/style/index.css +1 -0
- package/components/style/utils/border.css +0 -0
- package/components/style/utils/button.css +0 -0
- package/components/style/utils/dir.css +0 -0
- package/components/style/utils/disabled.css +0 -0
- package/components/style/utils/ellipsis.css +0 -0
- package/components/style/utils/notify.css +0 -0
- package/components/style/utils/scroll-shadow.css +0 -0
- package/components/style/utils/theme-dark.css +0 -0
- package/components/style/utils/touch.css +0 -0
- package/components/style/utils.css +0 -0
- package/components/swipe-action/common.d.ts +39 -0
- package/components/swipe-action/common.js +5 -0
- package/components/swipe-action/index.css +1 -0
- package/components/swipe-action/index.d.ts +7 -0
- package/components/swipe-action/index.js +8 -0
- package/components/swipe-action/swipe-action-group.d.ts +13 -0
- package/components/swipe-action/swipe-action-group.js +39 -0
- package/components/swipe-action/swipe-action.d.ts +15 -0
- package/components/swipe-action/swipe-action.js +174 -0
- package/components/swiper/common.d.ts +101 -0
- package/components/swiper/common.js +68 -0
- package/components/swiper/index.css +1 -0
- package/components/swiper/index.d.ts +8 -0
- package/components/swiper/index.js +9 -0
- package/components/swiper/swiper-item.d.ts +3 -0
- package/components/swiper/swiper-item.js +34 -0
- package/components/swiper/swiper.d.ts +57 -0
- package/components/swiper/swiper.js +43 -0
- package/components/swiper/useSwiper.d.ts +29 -0
- package/components/swiper/useSwiper.js +186 -0
- package/components/swiper/useSwiperAnimation.d.ts +5 -0
- package/components/swiper/useSwiperAnimation.js +33 -0
- package/components/swiper/useSwiperAutoHeight.d.ts +3 -0
- package/components/swiper/useSwiperAutoHeight.js +25 -0
- package/components/swiper/useSwiperAutoPlay.d.ts +7 -0
- package/components/swiper/useSwiperAutoPlay.js +25 -0
- package/components/swiper/useSwiperData.d.ts +49 -0
- package/components/swiper/useSwiperData.js +228 -0
- package/components/swiper/useSwiperNested.d.ts +5 -0
- package/components/swiper/useSwiperNested.js +10 -0
- package/components/switch/common.d.ts +27 -0
- package/components/switch/common.js +8 -0
- package/components/switch/index.css +1 -0
- package/components/switch/index.d.ts +5 -0
- package/components/switch/index.js +6 -0
- package/components/switch/switch.d.ts +35 -0
- package/components/switch/switch.js +137 -0
- package/components/tabbar/common.d.ts +38 -0
- package/components/tabbar/common.js +5 -0
- package/components/tabbar/index.css +1 -0
- package/components/tabbar/index.d.ts +7 -0
- package/components/tabbar/index.js +8 -0
- package/components/tabbar/tabbar-item.d.ts +15 -0
- package/components/tabbar/tabbar-item.js +47 -0
- package/components/tabbar/tabbar.d.ts +24 -0
- package/components/tabbar/tabbar.js +67 -0
- package/components/tabbar-pit/common.d.ts +10 -0
- package/components/tabbar-pit/common.js +0 -0
- package/components/tabbar-pit/index.css +1 -0
- package/components/tabbar-pit/index.d.ts +5 -0
- package/components/tabbar-pit/index.js +6 -0
- package/components/tabbar-pit/tabbar-pit.d.ts +11 -0
- package/components/tabbar-pit/tabbar-pit.js +23 -0
- package/components/table/common.d.ts +113 -0
- package/components/table/common.js +9 -0
- package/components/table/index.css +1 -0
- package/components/table/index.d.ts +5 -0
- package/components/table/index.js +6 -0
- package/components/table/table-col.d.ts +4 -0
- package/components/table/table-col.js +40 -0
- package/components/table/table.d.ts +19 -0
- package/components/table/table.js +402 -0
- package/components/table/useColumn.d.ts +17 -0
- package/components/table/useColumn.js +43 -0
- package/components/tabs/common.d.ts +39 -0
- package/components/tabs/common.js +5 -0
- package/components/tabs/index.css +1 -0
- package/components/tabs/index.d.ts +7 -0
- package/components/tabs/index.js +8 -0
- package/components/tabs/tab.d.ts +15 -0
- package/components/tabs/tab.js +62 -0
- package/components/tabs/tabs.d.ts +22 -0
- package/components/tabs/tabs.js +135 -0
- package/components/tag/common.d.ts +17 -0
- package/components/tag/common.js +8 -0
- package/components/tag/index.css +1 -0
- package/components/tag/index.d.ts +5 -0
- package/components/tag/index.js +6 -0
- package/components/tag/tag.d.ts +24 -0
- package/components/tag/tag.js +60 -0
- package/components/text/common.d.ts +16 -0
- package/components/text/common.js +9 -0
- package/components/text/index.css +1 -0
- package/components/text/index.d.ts +5 -0
- package/components/text/index.js +6 -0
- package/components/text/text.d.ts +17 -0
- package/components/text/text.js +57 -0
- package/components/timeline/common.d.ts +15 -0
- package/components/timeline/common.js +0 -0
- package/components/timeline/index.css +1 -0
- package/components/timeline/index.d.ts +7 -0
- package/components/timeline/index.js +8 -0
- package/components/timeline/timeline-item.d.ts +11 -0
- package/components/timeline/timeline-item.js +48 -0
- package/components/timeline/timeline.d.ts +11 -0
- package/components/timeline/timeline.js +14 -0
- package/components/toast/common.d.ts +24 -0
- package/components/toast/common.js +10 -0
- package/components/toast/imperative.d.ts +18 -0
- package/components/toast/imperative.js +43 -0
- package/components/toast/index.css +1 -0
- package/components/toast/index.d.ts +6 -0
- package/components/toast/index.js +7 -0
- package/components/toast/toast.d.ts +42 -0
- package/components/toast/toast.js +120 -0
- package/components/tree/common.d.ts +134 -0
- package/components/tree/common.js +16 -0
- package/components/tree/index.css +1 -0
- package/components/tree/index.d.ts +9 -0
- package/components/tree/index.js +10 -0
- package/components/tree/tree-branch.d.ts +4 -0
- package/components/tree/tree-branch.js +23 -0
- package/components/tree/tree-node.d.ts +4 -0
- package/components/tree/tree-node.js +358 -0
- package/components/tree/tree.d.ts +48 -0
- package/components/tree/tree.js +696 -0
- package/components/upload/common.d.ts +73 -0
- package/components/upload/common.js +11 -0
- package/components/upload/index.css +1 -0
- package/components/upload/index.d.ts +7 -0
- package/components/upload/index.js +8 -0
- package/components/upload/upload-preview.d.ts +24 -0
- package/components/upload/upload-preview.js +153 -0
- package/components/upload/upload.d.ts +37 -0
- package/components/upload/upload.js +291 -0
- package/components/waterfall/common.d.ts +62 -0
- package/components/waterfall/common.js +9 -0
- package/components/waterfall/index.css +1 -0
- package/components/waterfall/index.d.ts +9 -0
- package/components/waterfall/index.js +10 -0
- package/components/waterfall/test/SimulatedImage.d.ts +32 -0
- package/components/waterfall/test/SimulatedImage.js +48 -0
- package/components/waterfall/waterfall-item.d.ts +11 -0
- package/components/waterfall/waterfall-item.js +73 -0
- package/components/waterfall/waterfall-load.d.ts +15 -0
- package/components/waterfall/waterfall-load.js +67 -0
- package/components/waterfall/waterfall.d.ts +21 -0
- package/components/waterfall/waterfall.js +127 -0
- package/components/watermark/common.d.ts +29 -0
- package/components/watermark/common.js +18 -0
- package/components/watermark/index.css +1 -0
- package/components/watermark/index.d.ts +5 -0
- package/components/watermark/index.js +6 -0
- package/components/watermark/watermark.d.ts +21 -0
- package/components/watermark/watermark.js +206 -0
- package/global.d.js +0 -0
- package/global.d.ts +168 -0
- package/index.css +1 -0
- package/index.d.ts +10 -0
- package/index.js +219 -0
- package/locale/index.d.ts +19 -0
- package/locale/index.js +51 -0
- package/locale/lang/ar-SA.d.ts +148 -0
- package/locale/lang/ar-SA.js +137 -0
- package/locale/lang/bn-BD.d.ts +166 -0
- package/locale/lang/bn-BD.js +155 -0
- package/locale/lang/en-US.d.ts +148 -0
- package/locale/lang/en-US.js +137 -0
- package/locale/lang/es-ES.d.ts +166 -0
- package/locale/lang/es-ES.js +155 -0
- package/locale/lang/hi-IN.d.ts +166 -0
- package/locale/lang/hi-IN.js +155 -0
- package/locale/lang/id-ID.d.ts +166 -0
- package/locale/lang/id-ID.js +155 -0
- package/locale/lang/pt-BR.d.ts +166 -0
- package/locale/lang/pt-BR.js +155 -0
- package/locale/lang/tr-TR.d.ts +166 -0
- package/locale/lang/tr-TR.js +155 -0
- package/locale/lang/ur-PK.d.ts +166 -0
- package/locale/lang/ur-PK.js +155 -0
- package/locale/lang/vi-VN.d.ts +148 -0
- package/locale/lang/vi-VN.js +137 -0
- package/locale/lang/zh-CN.d.ts +166 -0
- package/locale/lang/zh-CN.js +155 -0
- package/package.json +27 -7
- package/type-helpers.d.ts +25 -0
- package/type-helpers.js +0 -0
- package/use/index.d.ts +35 -0
- package/use/index.js +36 -0
- package/use/reactiveComputed.d.ts +3 -0
- package/use/reactiveComputed.js +8 -0
- package/use/toReactive.d.ts +2 -0
- package/use/toReactive.js +32 -0
- package/use/useClickOutside.d.ts +2 -0
- package/use/useClickOutside.js +46 -0
- package/use/useColorScheme.d.ts +11 -0
- package/use/useColorScheme.js +38 -0
- package/use/useComposition.d.ts +11 -0
- package/use/useComposition.js +31 -0
- package/use/useDragPinch.d.ts +10 -0
- package/use/useDragPinch.js +82 -0
- package/use/useElementScroll.d.ts +2 -0
- package/use/useElementScroll.js +19 -0
- package/use/useImperative.d.ts +11 -0
- package/use/useImperative.js +44 -0
- package/use/useIndeterminate.d.ts +10 -0
- package/use/useIndeterminate.js +26 -0
- package/use/useInitialVelocity.d.ts +8 -0
- package/use/useInitialVelocity.js +88 -0
- package/use/useIntersectionObserver.d.ts +15 -0
- package/use/useIntersectionObserver.js +74 -0
- package/use/useKeyList.d.ts +5 -0
- package/use/useKeyList.js +18 -0
- package/use/useLockScroll.d.ts +2 -0
- package/use/useLockScroll.js +36 -0
- package/use/useLuckyDraw.d.ts +22 -0
- package/use/useLuckyDraw.js +131 -0
- package/use/useLuckyGrid.d.ts +26 -0
- package/use/useLuckyGrid.js +51 -0
- package/use/useLuckyWheel.d.ts +15 -0
- package/use/useLuckyWheel.js +26 -0
- package/use/useOptionKeys.d.ts +29 -0
- package/use/useOptionKeys.js +36 -0
- package/use/usePageScroll.d.ts +1 -0
- package/use/usePageScroll.js +15 -0
- package/use/usePointerDown.d.ts +1 -0
- package/use/usePointerDown.js +21 -0
- package/use/usePopper.d.ts +34 -0
- package/use/usePopper.js +242 -0
- package/use/useReachBottom.d.ts +1 -0
- package/use/useReachBottom.js +14 -0
- package/use/useResizeObserver.d.ts +10 -0
- package/use/useResizeObserver.js +34 -0
- package/use/useRtl.d.ts +2 -0
- package/use/useRtl.js +31 -0
- package/use/useScrollSide.d.ts +10 -0
- package/use/useScrollSide.js +49 -0
- package/use/useScrollSpy.d.ts +16 -0
- package/use/useScrollSpy.js +98 -0
- package/use/useSimulatedClick.d.ts +6 -0
- package/use/useSimulatedClick.js +38 -0
- package/use/useSimulatedDblClick.d.ts +4 -0
- package/use/useSimulatedDblClick.js +37 -0
- package/use/useSimulatedPress.d.ts +12 -0
- package/use/useSimulatedPress.js +49 -0
- package/use/useSingleTask.d.ts +6 -0
- package/use/useSingleTask.js +36 -0
- package/use/useSlotMachine.d.ts +16 -0
- package/use/useSlotMachine.js +86 -0
- package/use/useStopMovedClick.d.ts +6 -0
- package/use/useStopMovedClick.js +27 -0
- package/use/useTimeout.d.ts +5 -0
- package/use/useTimeout.js +32 -0
- package/use/useTimeoutLoading.d.ts +6 -0
- package/use/useTimeoutLoading.js +48 -0
- package/use/useWindowResize.d.ts +1 -0
- package/use/useWindowResize.js +15 -0
- package/use/useZIndex.d.ts +1 -0
- package/use/useZIndex.js +13 -0
- package/utils/array.d.ts +28 -0
- package/utils/array.js +77 -0
- package/utils/barcode.d.ts +73 -0
- package/utils/barcode.js +442 -0
- package/utils/bem.d.ts +39 -0
- package/utils/bem.js +56 -0
- package/utils/canvas.d.ts +9 -0
- package/utils/canvas.js +12 -0
- package/utils/clipboard.d.ts +7 -0
- package/utils/clipboard.js +37 -0
- package/utils/color.d.ts +39 -0
- package/utils/color.js +341 -0
- package/utils/common.d.ts +3 -0
- package/utils/common.js +0 -0
- package/utils/component.d.ts +21 -0
- package/utils/component.js +31 -0
- package/utils/createImperativeComponent.d.ts +10 -0
- package/utils/createImperativeComponent.js +54 -0
- package/utils/date.d.ts +119 -0
- package/utils/date.js +803 -0
- package/utils/dom.d.ts +6 -0
- package/utils/dom.js +19 -0
- package/utils/file.d.ts +57 -0
- package/utils/file.js +113 -0
- package/utils/geometry.d.ts +98 -0
- package/utils/geometry.js +174 -0
- package/utils/index.d.ts +24 -0
- package/utils/index.js +27 -0
- package/utils/inertialAnimate.d.ts +10 -0
- package/utils/inertialAnimate.js +44 -0
- package/utils/is.d.ts +80 -0
- package/utils/is.js +108 -0
- package/utils/log.d.ts +1 -0
- package/utils/log.js +8 -0
- package/utils/number.d.ts +32 -0
- package/utils/number.js +62 -0
- package/utils/object.d.ts +43 -0
- package/utils/object.js +134 -0
- package/utils/physics.d.ts +34 -0
- package/utils/physics.js +59 -0
- package/utils/polyfill.d.ts +7 -0
- package/utils/polyfill.js +15 -0
- package/utils/qrcode.d.ts +8 -0
- package/utils/qrcode.js +768 -0
- package/utils/regexp.d.ts +1 -0
- package/utils/regexp.js +6 -0
- package/utils/scroller/Friction.d.ts +80 -0
- package/utils/scroller/Friction.js +116 -0
- package/utils/scroller/Scroll.d.ts +52 -0
- package/utils/scroller/Scroll.js +110 -0
- package/utils/scroller/Spring.d.ts +66 -0
- package/utils/scroller/Spring.js +204 -0
- package/utils/scroller/index.d.ts +3 -0
- package/utils/scroller/index.js +4 -0
- package/utils/scroller/useEasingAnimation.d.ts +5 -0
- package/utils/scroller/useEasingAnimation.js +32 -0
- package/utils/scroller/useScrollAnimation.d.ts +12 -0
- package/utils/scroller/useScrollAnimation.js +36 -0
- package/utils/scroller/useScrollBinding.d.ts +8 -0
- package/utils/scroller/useScrollBinding.js +51 -0
- package/utils/scroller/useScroller.d.ts +39 -0
- package/utils/scroller/useScroller.js +210 -0
- package/utils/string.d.ts +37 -0
- package/utils/string.js +68 -0
- package/utils/tree.d.ts +26 -0
- package/utils/tree.js +141 -0
- package/utils/utils.d.ts +56 -0
- package/utils/utils.js +163 -0
- package/utils/vnode.d.ts +9 -0
- package/utils/vnode.js +69 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { getDaysBeforeFirstDay, getDaysInMonth, getNextMonthHeadDays, getPrevMonthTailDays, toDateNumber } from "../../utils/date.js";
|
|
2
|
+
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderList, toDisplayString } from "vue";
|
|
3
|
+
//#region packages/sard/components/calendar/calendar-month.vue
|
|
4
|
+
const _hoisted_1 = ["onClick"];
|
|
5
|
+
var calendar_month_default = /*@__PURE__*/ defineComponent({
|
|
6
|
+
__name: "calendar-month",
|
|
7
|
+
props: {
|
|
8
|
+
year: {
|
|
9
|
+
type: Number,
|
|
10
|
+
required: true
|
|
11
|
+
},
|
|
12
|
+
month: {
|
|
13
|
+
type: Number,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
type: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: true
|
|
19
|
+
},
|
|
20
|
+
minDate: {
|
|
21
|
+
type: Date,
|
|
22
|
+
required: true
|
|
23
|
+
},
|
|
24
|
+
maxDate: {
|
|
25
|
+
type: Date,
|
|
26
|
+
required: true
|
|
27
|
+
},
|
|
28
|
+
currentDates: {
|
|
29
|
+
type: Array,
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
formatter: {
|
|
33
|
+
type: Function,
|
|
34
|
+
required: false
|
|
35
|
+
},
|
|
36
|
+
disabledDate: {
|
|
37
|
+
type: Function,
|
|
38
|
+
required: false
|
|
39
|
+
},
|
|
40
|
+
todayNumber: {
|
|
41
|
+
type: Number,
|
|
42
|
+
required: true
|
|
43
|
+
},
|
|
44
|
+
weekStartsOn: {
|
|
45
|
+
type: Number,
|
|
46
|
+
required: true
|
|
47
|
+
},
|
|
48
|
+
severalMonths: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
required: false
|
|
51
|
+
},
|
|
52
|
+
t: {
|
|
53
|
+
type: Function,
|
|
54
|
+
required: true
|
|
55
|
+
},
|
|
56
|
+
bem: {
|
|
57
|
+
type: null,
|
|
58
|
+
required: true
|
|
59
|
+
},
|
|
60
|
+
startDateText: {
|
|
61
|
+
type: String,
|
|
62
|
+
required: false
|
|
63
|
+
},
|
|
64
|
+
endDateText: {
|
|
65
|
+
type: String,
|
|
66
|
+
required: false
|
|
67
|
+
},
|
|
68
|
+
sameDateText: {
|
|
69
|
+
type: String,
|
|
70
|
+
required: false
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
emits: ["day-click"],
|
|
74
|
+
setup(__props, { emit: __emit }) {
|
|
75
|
+
const props = __props;
|
|
76
|
+
const emit = __emit;
|
|
77
|
+
const days = computed(() => {
|
|
78
|
+
return getDaysInMonth(props.year, props.month);
|
|
79
|
+
});
|
|
80
|
+
const daysBefore = computed(() => {
|
|
81
|
+
return getDaysBeforeFirstDay(props.year, props.month, props.weekStartsOn);
|
|
82
|
+
});
|
|
83
|
+
const allDays = computed(() => {
|
|
84
|
+
const currentDays = Array(days.value).fill(0).map((_, i) => new Date(props.year, props.month, i + 1));
|
|
85
|
+
if (props.severalMonths) return currentDays;
|
|
86
|
+
const prevMonthTailDays = getPrevMonthTailDays(props.year, props.month, props.weekStartsOn);
|
|
87
|
+
const nextMonthHeadDays = getNextMonthHeadDays(props.year, props.month, props.weekStartsOn);
|
|
88
|
+
return [
|
|
89
|
+
...prevMonthTailDays,
|
|
90
|
+
...currentDays,
|
|
91
|
+
...nextMonthHeadDays
|
|
92
|
+
];
|
|
93
|
+
});
|
|
94
|
+
function withinMonth(i) {
|
|
95
|
+
return props.severalMonths ? true : i >= daysBefore.value && i < daysBefore.value + days.value;
|
|
96
|
+
}
|
|
97
|
+
const types = {
|
|
98
|
+
same: "same",
|
|
99
|
+
start: "start",
|
|
100
|
+
middle: "middle",
|
|
101
|
+
end: "end",
|
|
102
|
+
selected: "selected",
|
|
103
|
+
normal: "normal"
|
|
104
|
+
};
|
|
105
|
+
const daysInfo = computed(() => {
|
|
106
|
+
return allDays.value.map((date, i) => {
|
|
107
|
+
const dateNumber = toDateNumber(date);
|
|
108
|
+
const within = withinMonth(i);
|
|
109
|
+
let disabled = false;
|
|
110
|
+
if (!within) disabled = true;
|
|
111
|
+
else {
|
|
112
|
+
if (props.disabledDate) disabled = props.disabledDate(date);
|
|
113
|
+
if (dateNumber < toDateNumber(props.minDate) || dateNumber > toDateNumber(props.maxDate)) disabled = true;
|
|
114
|
+
}
|
|
115
|
+
const selected = within && props.type !== "range" && props.currentDates.some((d) => toDateNumber(d) === dateNumber);
|
|
116
|
+
const isStart = within && props.type === "range" && props.currentDates[0] && toDateNumber(props.currentDates[0]) === dateNumber;
|
|
117
|
+
const isEnd = within && props.type === "range" && props.currentDates[1] && toDateNumber(props.currentDates[1]) === dateNumber;
|
|
118
|
+
const isMiddle = within && props.type === "range" && props.currentDates.length === 2 && dateNumber > toDateNumber(props.currentDates[0]) && dateNumber < toDateNumber(props.currentDates[1]);
|
|
119
|
+
const day = {
|
|
120
|
+
date,
|
|
121
|
+
disabled,
|
|
122
|
+
top: "",
|
|
123
|
+
text: date.getDate() + "",
|
|
124
|
+
bottom: isStart && isEnd ? props.sameDateText || `${props.t("start")}/${props.t("end")}` : isStart ? props.startDateText || props.t("start") : isEnd ? props.endDateText || props.t("end") : "",
|
|
125
|
+
type: isStart && isEnd ? "same" : isStart ? "start" : isMiddle ? "middle" : isEnd ? "end" : selected ? "selected" : "normal",
|
|
126
|
+
today: props.todayNumber === dateNumber
|
|
127
|
+
};
|
|
128
|
+
if (within && props.formatter) props.formatter(day);
|
|
129
|
+
const type = types[day.type];
|
|
130
|
+
return {
|
|
131
|
+
day,
|
|
132
|
+
style: [day.style, { marginLeft: props.severalMonths && i === 0 ? daysBefore.value / 7 * 100 + "%" : "" }],
|
|
133
|
+
className: [
|
|
134
|
+
props.bem.e("day"),
|
|
135
|
+
props.bem.em("day", type, type !== "normal"),
|
|
136
|
+
props.bem.em("day", "without", !within),
|
|
137
|
+
props.bem.em("day", "disabled", disabled),
|
|
138
|
+
props.bem.em("day", "today", day.today),
|
|
139
|
+
day.className
|
|
140
|
+
]
|
|
141
|
+
};
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
const onDayClick = (day) => {
|
|
145
|
+
if (!day.disabled) emit("day-click", day.date);
|
|
146
|
+
};
|
|
147
|
+
return (_ctx, _cache) => {
|
|
148
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(__props.bem.e("month")) }, [__props.severalMonths ? (openBlock(), createElementBlock("div", {
|
|
149
|
+
key: 0,
|
|
150
|
+
class: normalizeClass(__props.bem.e("month-title"))
|
|
151
|
+
}, toDisplayString(__props.t("monthTitle", {
|
|
152
|
+
year: __props.year,
|
|
153
|
+
month: __props.month + 1
|
|
154
|
+
})), 3)) : createCommentVNode("v-if", true), createElementVNode("div", { class: normalizeClass(__props.bem.e("days")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(daysInfo.value, (item, i) => {
|
|
155
|
+
return openBlock(), createElementBlock("div", {
|
|
156
|
+
key: i,
|
|
157
|
+
class: normalizeClass(item.className),
|
|
158
|
+
style: normalizeStyle(item.style),
|
|
159
|
+
onClick: ($event) => onDayClick(item.day)
|
|
160
|
+
}, [
|
|
161
|
+
item.day.top ? (openBlock(), createElementBlock("div", {
|
|
162
|
+
key: 0,
|
|
163
|
+
class: normalizeClass(__props.bem.e("day-top"))
|
|
164
|
+
}, toDisplayString(item.day.top), 3)) : createCommentVNode("v-if", true),
|
|
165
|
+
createTextVNode(" " + toDisplayString(item.day.text) + " ", 1),
|
|
166
|
+
item.day.bottom ? (openBlock(), createElementBlock("div", {
|
|
167
|
+
key: 1,
|
|
168
|
+
class: normalizeClass(__props.bem.e("day-bottom"))
|
|
169
|
+
}, toDisplayString(item.day.bottom), 3)) : createCommentVNode("v-if", true)
|
|
170
|
+
], 14, _hoisted_1);
|
|
171
|
+
}), 128)), createElementVNode("div", { class: normalizeClass(__props.bem.e("mark")) }, toDisplayString(__props.month + 1), 3)], 2)], 2);
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
//#endregion
|
|
176
|
+
export { calendar_month_default as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type CalendarProps } from './common';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<CalendarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
3
|
+
change: (value: string | string[] | Date | Date[]) => any;
|
|
4
|
+
"update:modelValue": (value: string | string[] | Date | Date[]) => any;
|
|
5
|
+
}, string, import("vue").PublicProps, Readonly<CalendarProps> & Readonly<{
|
|
6
|
+
onChange?: ((value: string | string[] | Date | Date[]) => any) | undefined;
|
|
7
|
+
"onUpdate:modelValue"?: ((value: string | string[] | Date | Date[]) => any) | undefined;
|
|
8
|
+
}>, {
|
|
9
|
+
min: Date;
|
|
10
|
+
max: Date;
|
|
11
|
+
type: import("./common").CalendarType;
|
|
12
|
+
modelValue: Date | Date[] | string | string[];
|
|
13
|
+
currentDate: Date;
|
|
14
|
+
disabledDate: (date: Date) => boolean;
|
|
15
|
+
maxDays: number;
|
|
16
|
+
overMaxDays: () => void;
|
|
17
|
+
weekStartsOn: number;
|
|
18
|
+
formatter: (day: import("./common").CalendarDay) => void;
|
|
19
|
+
allowSameDay: boolean;
|
|
20
|
+
severalMonths: boolean;
|
|
21
|
+
valueFormat: string;
|
|
22
|
+
startDateText: string;
|
|
23
|
+
endDateText: string;
|
|
24
|
+
sameDateText: string;
|
|
25
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import { createBem } from "../../utils/bem.js";
|
|
2
|
+
import { formatDate, getNextMonthDate, getPrevMonthDate, minmaxDate, parseDate, toDateNumber, toMonthNumber } from "../../utils/date.js";
|
|
3
|
+
import { toArray } from "../../utils/array.js";
|
|
4
|
+
import { useScrollSide } from "../../use/useScrollSide.js";
|
|
5
|
+
import { useInPopup } from "../popup/common.js";
|
|
6
|
+
import { useTranslateWithPrefix } from "../../locale/index.js";
|
|
7
|
+
import button_default from "../button/button.js";
|
|
8
|
+
import { defaultCalendarProps, getMaxDate, getMinDate, sortDates, weeksIndex } from "./common.js";
|
|
9
|
+
import calendar_month_default from "./calendar-month.js";
|
|
10
|
+
import popout_default from "../popout/popout.js";
|
|
11
|
+
import datetime_picker_default from "../datetime-picker/datetime-picker.js";
|
|
12
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeDefaults, normalizeClass, openBlock, ref, renderList, toDisplayString, toRaw, unref, useTemplateRef, watch, withCtx } from "vue";
|
|
13
|
+
import { Left, Right } from "@sard/icons";
|
|
14
|
+
//#region packages/sard/components/calendar/calendar.vue
|
|
15
|
+
var calendar_default = /*@__PURE__*/ defineComponent({
|
|
16
|
+
__name: "calendar",
|
|
17
|
+
props: /*@__PURE__*/ mergeDefaults({
|
|
18
|
+
type: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: false
|
|
21
|
+
},
|
|
22
|
+
modelValue: {
|
|
23
|
+
type: [
|
|
24
|
+
Date,
|
|
25
|
+
Array,
|
|
26
|
+
String
|
|
27
|
+
],
|
|
28
|
+
required: false
|
|
29
|
+
},
|
|
30
|
+
min: {
|
|
31
|
+
type: Date,
|
|
32
|
+
required: false
|
|
33
|
+
},
|
|
34
|
+
max: {
|
|
35
|
+
type: Date,
|
|
36
|
+
required: false
|
|
37
|
+
},
|
|
38
|
+
currentDate: {
|
|
39
|
+
type: Date,
|
|
40
|
+
required: false
|
|
41
|
+
},
|
|
42
|
+
disabledDate: {
|
|
43
|
+
type: Function,
|
|
44
|
+
required: false
|
|
45
|
+
},
|
|
46
|
+
maxDays: {
|
|
47
|
+
type: Number,
|
|
48
|
+
required: false
|
|
49
|
+
},
|
|
50
|
+
overMaxDays: {
|
|
51
|
+
type: Function,
|
|
52
|
+
required: false
|
|
53
|
+
},
|
|
54
|
+
weekStartsOn: {
|
|
55
|
+
type: Number,
|
|
56
|
+
required: false
|
|
57
|
+
},
|
|
58
|
+
formatter: {
|
|
59
|
+
type: Function,
|
|
60
|
+
required: false
|
|
61
|
+
},
|
|
62
|
+
allowSameDay: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
required: false
|
|
65
|
+
},
|
|
66
|
+
severalMonths: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
required: false
|
|
69
|
+
},
|
|
70
|
+
valueFormat: {
|
|
71
|
+
type: String,
|
|
72
|
+
required: false
|
|
73
|
+
},
|
|
74
|
+
startDateText: {
|
|
75
|
+
type: String,
|
|
76
|
+
required: false
|
|
77
|
+
},
|
|
78
|
+
endDateText: {
|
|
79
|
+
type: String,
|
|
80
|
+
required: false
|
|
81
|
+
},
|
|
82
|
+
sameDateText: {
|
|
83
|
+
type: String,
|
|
84
|
+
required: false
|
|
85
|
+
}
|
|
86
|
+
}, defaultCalendarProps),
|
|
87
|
+
emits: ["update:modelValue", "change"],
|
|
88
|
+
setup(__props, { emit: __emit }) {
|
|
89
|
+
const props = __props;
|
|
90
|
+
const emit = __emit;
|
|
91
|
+
const bem = createBem("calendar");
|
|
92
|
+
const { t } = useTranslateWithPrefix("calendar");
|
|
93
|
+
const minDate = computed(() => {
|
|
94
|
+
return props.min || getMinDate(props.severalMonths);
|
|
95
|
+
});
|
|
96
|
+
const maxDate = computed(() => {
|
|
97
|
+
const maxDate = props.max || getMaxDate(props.severalMonths);
|
|
98
|
+
return maxDate.getTime() < minDate.value.getTime() ? new Date(minDate.value) : maxDate;
|
|
99
|
+
});
|
|
100
|
+
const toDate = (date) => {
|
|
101
|
+
if (date instanceof Date) return date;
|
|
102
|
+
return parseDate(date, props.valueFormat);
|
|
103
|
+
};
|
|
104
|
+
const makeDate = (date) => {
|
|
105
|
+
return Array.isArray(date) ? date.map((item) => toDate(item)) : toDate(date);
|
|
106
|
+
};
|
|
107
|
+
const normalizeValue = (value) => {
|
|
108
|
+
return value ? makeDate(value) : props.type === "single" ? void 0 : [];
|
|
109
|
+
};
|
|
110
|
+
const innerValue = ref(normalizeValue(props.modelValue));
|
|
111
|
+
let currentEmitValue = innerValue.value;
|
|
112
|
+
watch(() => toRaw(props.modelValue), (value) => {
|
|
113
|
+
if (currentEmitValue !== value) {
|
|
114
|
+
innerValue.value = normalizeValue(value);
|
|
115
|
+
currentEmitValue = value;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
const getInitialCurrentDate = () => {
|
|
119
|
+
let date = /* @__PURE__ */ new Date();
|
|
120
|
+
const value = toArray(innerValue.value)[0];
|
|
121
|
+
if (value) date = value;
|
|
122
|
+
if (props.currentDate) date = props.currentDate;
|
|
123
|
+
return minmaxDate(date, minDate.value, maxDate.value);
|
|
124
|
+
};
|
|
125
|
+
const innerCurrentDate = ref(getInitialCurrentDate());
|
|
126
|
+
watch(() => props.currentDate, () => {
|
|
127
|
+
innerCurrentDate.value = minmaxDate(props.currentDate || /* @__PURE__ */ new Date(), minDate.value, maxDate.value);
|
|
128
|
+
});
|
|
129
|
+
watch(innerValue, () => {
|
|
130
|
+
const onlyOneDate = Array.isArray(innerValue.value) ? innerValue.value.length === 1 ? innerValue.value[0] : void 0 : innerValue.value;
|
|
131
|
+
if (onlyOneDate && toMonthNumber(onlyOneDate) !== toMonthNumber(innerCurrentDate.value)) innerCurrentDate.value = onlyOneDate;
|
|
132
|
+
});
|
|
133
|
+
const startDate = ref(props.type === "range" && Array.isArray(innerValue.value) && innerValue.value.length === 1 ? innerValue.value[0] : void 0);
|
|
134
|
+
const onPrevMonthClick = () => {
|
|
135
|
+
innerCurrentDate.value = getPrevMonthDate(innerCurrentDate.value);
|
|
136
|
+
};
|
|
137
|
+
const onNextMonthClick = () => {
|
|
138
|
+
innerCurrentDate.value = getNextMonthDate(innerCurrentDate.value);
|
|
139
|
+
};
|
|
140
|
+
const pickerVisible = ref(false);
|
|
141
|
+
const pickerValue = ref(innerCurrentDate.value);
|
|
142
|
+
const onMonthClick = () => {
|
|
143
|
+
pickerValue.value = innerCurrentDate.value;
|
|
144
|
+
pickerVisible.value = true;
|
|
145
|
+
};
|
|
146
|
+
const onPickerConfirm = () => {
|
|
147
|
+
if (toMonthNumber(innerCurrentDate.value) !== toMonthNumber(pickerValue.value)) innerCurrentDate.value = pickerValue.value;
|
|
148
|
+
};
|
|
149
|
+
const weeks = computed(() => {
|
|
150
|
+
return weeksIndex.slice(props.weekStartsOn).concat(weeksIndex.slice(0, props.weekStartsOn));
|
|
151
|
+
});
|
|
152
|
+
const months = computed(() => {
|
|
153
|
+
if (!props.severalMonths) return [[innerCurrentDate.value.getFullYear(), innerCurrentDate.value.getMonth()]];
|
|
154
|
+
const minYear = minDate.value.getFullYear();
|
|
155
|
+
const minMonth = minDate.value.getMonth();
|
|
156
|
+
const maxYear = maxDate.value.getFullYear();
|
|
157
|
+
const maxMonth = maxDate.value.getMonth();
|
|
158
|
+
const months = (maxYear - minYear) * 12 + (maxMonth - minMonth + 1);
|
|
159
|
+
return Array(months).fill(0).map((_, i) => {
|
|
160
|
+
return [minYear + Math.floor((minMonth + i) / 12), (minMonth + i) % 12];
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
const todayNumber = toDateNumber(/* @__PURE__ */ new Date());
|
|
164
|
+
const currentDates = computed(() => {
|
|
165
|
+
let dates;
|
|
166
|
+
if (props.type === "range" && startDate.value) dates = [startDate.value];
|
|
167
|
+
else if (Array.isArray(innerValue.value)) dates = innerValue.value;
|
|
168
|
+
else if (innerValue.value) dates = [innerValue.value];
|
|
169
|
+
else dates = [];
|
|
170
|
+
return dates;
|
|
171
|
+
});
|
|
172
|
+
const onDayClick = (date) => {
|
|
173
|
+
let nextValue;
|
|
174
|
+
if (props.type === "single") nextValue = date;
|
|
175
|
+
else if (props.type === "multiple") {
|
|
176
|
+
if (Array.isArray(innerValue.value)) if (innerValue.value.some((d) => toDateNumber(d) === toDateNumber(date))) nextValue = innerValue.value.filter((d) => toDateNumber(d) !== toDateNumber(date));
|
|
177
|
+
else {
|
|
178
|
+
if (innerValue.value.length >= props.maxDays) {
|
|
179
|
+
props.overMaxDays?.();
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
nextValue = sortDates(innerValue.value.concat(date));
|
|
183
|
+
}
|
|
184
|
+
} else if (props.type === "range") {
|
|
185
|
+
if (startDate.value) {
|
|
186
|
+
const startDays = toDateNumber(startDate.value);
|
|
187
|
+
const endDays = toDateNumber(date);
|
|
188
|
+
if (!props.allowSameDay && startDays === endDays) return;
|
|
189
|
+
if (endDays < startDays) {
|
|
190
|
+
startDate.value = date;
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
let endDate = date;
|
|
194
|
+
if (endDays - startDays + 1 > props.maxDays) {
|
|
195
|
+
props.overMaxDays?.();
|
|
196
|
+
endDate = new Date(startDate.value);
|
|
197
|
+
endDate.setDate(endDate.getDate() + (props.maxDays - 1));
|
|
198
|
+
}
|
|
199
|
+
nextValue = [startDate.value, endDate];
|
|
200
|
+
} else nextValue = [];
|
|
201
|
+
startDate.value = startDate.value ? void 0 : date;
|
|
202
|
+
}
|
|
203
|
+
if (nextValue !== void 0) {
|
|
204
|
+
innerValue.value = nextValue;
|
|
205
|
+
const emitValue = props.valueFormat ? Array.isArray(nextValue) ? nextValue.map((item) => formatDate(item, props.valueFormat)) : formatDate(nextValue, props.valueFormat) : nextValue;
|
|
206
|
+
currentEmitValue = emitValue;
|
|
207
|
+
emit("update:modelValue", emitValue);
|
|
208
|
+
emit("change", emitValue);
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
const inPopup = useInPopup();
|
|
212
|
+
const preventPageScroll = computed(() => {
|
|
213
|
+
return inPopup && !props.severalMonths;
|
|
214
|
+
});
|
|
215
|
+
const scrollSide = useScrollSide(useTemplateRef("scroll"), { direction: "vertical" });
|
|
216
|
+
const bodyClass = computed(() => {
|
|
217
|
+
return [bem.e("body"), bem.em("body", scrollSide.vertical)];
|
|
218
|
+
});
|
|
219
|
+
const calendarClass = computed(() => {
|
|
220
|
+
return [
|
|
221
|
+
bem.b(),
|
|
222
|
+
bem.m("several", props.severalMonths),
|
|
223
|
+
bem.m("no-scroll", preventPageScroll.value)
|
|
224
|
+
];
|
|
225
|
+
});
|
|
226
|
+
return (_ctx, _cache) => {
|
|
227
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(calendarClass.value) }, [
|
|
228
|
+
createElementVNode("div", { class: normalizeClass(unref(bem).e("header")) }, [!__props.severalMonths ? (openBlock(), createElementBlock("div", {
|
|
229
|
+
key: 0,
|
|
230
|
+
class: normalizeClass(unref(bem).e("toolbar"))
|
|
231
|
+
}, [
|
|
232
|
+
createVNode(button_default, {
|
|
233
|
+
variant: "link",
|
|
234
|
+
color: "secondary",
|
|
235
|
+
class: normalizeClass(unref(bem).e("prev-month")),
|
|
236
|
+
disabled: unref(toMonthNumber)(innerCurrentDate.value) <= unref(toMonthNumber)(minDate.value),
|
|
237
|
+
onClick: onPrevMonthClick
|
|
238
|
+
}, {
|
|
239
|
+
default: withCtx(() => [createVNode(unref(Left))]),
|
|
240
|
+
_: 1
|
|
241
|
+
}, 8, ["class", "disabled"]),
|
|
242
|
+
createVNode(button_default, {
|
|
243
|
+
variant: "link",
|
|
244
|
+
color: "secondary",
|
|
245
|
+
onClick: onMonthClick
|
|
246
|
+
}, {
|
|
247
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("monthTitle", {
|
|
248
|
+
year: innerCurrentDate.value.getFullYear(),
|
|
249
|
+
month: String(innerCurrentDate.value.getMonth() + 1).padStart(2, "0")
|
|
250
|
+
})), 1)]),
|
|
251
|
+
_: 1
|
|
252
|
+
}),
|
|
253
|
+
createVNode(button_default, {
|
|
254
|
+
variant: "link",
|
|
255
|
+
color: "secondary",
|
|
256
|
+
class: normalizeClass(unref(bem).e("next-month")),
|
|
257
|
+
disabled: unref(toMonthNumber)(innerCurrentDate.value) >= unref(toMonthNumber)(maxDate.value),
|
|
258
|
+
onClick: onNextMonthClick
|
|
259
|
+
}, {
|
|
260
|
+
default: withCtx(() => [createVNode(unref(Right))]),
|
|
261
|
+
_: 1
|
|
262
|
+
}, 8, ["class", "disabled"])
|
|
263
|
+
], 2)) : createCommentVNode("v-if", true), createElementVNode("div", { class: normalizeClass(unref(bem).e("week")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(weeks.value, (item, i) => {
|
|
264
|
+
return openBlock(), createElementBlock("div", {
|
|
265
|
+
key: i,
|
|
266
|
+
class: normalizeClass(unref(bem).e("week-item"))
|
|
267
|
+
}, toDisplayString(unref(t)(`weeks.${item}`)), 3);
|
|
268
|
+
}), 128))], 2)], 2),
|
|
269
|
+
createElementVNode("div", { class: normalizeClass(bodyClass.value) }, [createElementVNode("div", {
|
|
270
|
+
ref: "scroll",
|
|
271
|
+
class: normalizeClass(unref(bem).e("scroll"))
|
|
272
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(months.value, (month, i) => {
|
|
273
|
+
return openBlock(), createBlock(calendar_month_default, {
|
|
274
|
+
key: i,
|
|
275
|
+
year: month[0],
|
|
276
|
+
month: month[1],
|
|
277
|
+
type: __props.type,
|
|
278
|
+
"min-date": minDate.value,
|
|
279
|
+
"max-date": maxDate.value,
|
|
280
|
+
"current-dates": currentDates.value,
|
|
281
|
+
formatter: __props.formatter,
|
|
282
|
+
"disabled-date": __props.disabledDate,
|
|
283
|
+
"today-number": unref(todayNumber),
|
|
284
|
+
"week-starts-on": __props.weekStartsOn,
|
|
285
|
+
"several-months": __props.severalMonths,
|
|
286
|
+
"start-date-text": __props.startDateText,
|
|
287
|
+
"end-date-text": __props.endDateText,
|
|
288
|
+
"same-date-text": __props.sameDateText,
|
|
289
|
+
t: unref(t),
|
|
290
|
+
bem: unref(bem),
|
|
291
|
+
onDayClick
|
|
292
|
+
}, null, 8, [
|
|
293
|
+
"year",
|
|
294
|
+
"month",
|
|
295
|
+
"type",
|
|
296
|
+
"min-date",
|
|
297
|
+
"max-date",
|
|
298
|
+
"current-dates",
|
|
299
|
+
"formatter",
|
|
300
|
+
"disabled-date",
|
|
301
|
+
"today-number",
|
|
302
|
+
"week-starts-on",
|
|
303
|
+
"several-months",
|
|
304
|
+
"start-date-text",
|
|
305
|
+
"end-date-text",
|
|
306
|
+
"same-date-text",
|
|
307
|
+
"t",
|
|
308
|
+
"bem"
|
|
309
|
+
]);
|
|
310
|
+
}), 128))], 2)], 2),
|
|
311
|
+
!__props.severalMonths ? (openBlock(), createBlock(popout_default, {
|
|
312
|
+
key: 0,
|
|
313
|
+
visible: pickerVisible.value,
|
|
314
|
+
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => pickerVisible.value = $event),
|
|
315
|
+
type: "compact",
|
|
316
|
+
onConfirm: onPickerConfirm
|
|
317
|
+
}, {
|
|
318
|
+
default: withCtx(() => [createVNode(datetime_picker_default, {
|
|
319
|
+
type: "yM",
|
|
320
|
+
modelValue: pickerValue.value,
|
|
321
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => pickerValue.value = $event),
|
|
322
|
+
min: minDate.value,
|
|
323
|
+
max: maxDate.value
|
|
324
|
+
}, null, 8, [
|
|
325
|
+
"modelValue",
|
|
326
|
+
"min",
|
|
327
|
+
"max"
|
|
328
|
+
])]),
|
|
329
|
+
_: 1
|
|
330
|
+
}, 8, ["visible"])) : createCommentVNode("v-if", true)
|
|
331
|
+
], 2);
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
//#endregion
|
|
336
|
+
export { calendar_default as default };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type LocaleTranslate } from '../../locale';
|
|
2
|
+
import { type Bem } from '../../utils';
|
|
3
|
+
import { type DefaultProps } from '../config';
|
|
4
|
+
import type { StyleValue } from 'vue';
|
|
5
|
+
export type CalendarType = 'single' | 'multiple' | 'range';
|
|
6
|
+
export interface CalendarDay {
|
|
7
|
+
date: Date;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
type: 'same' | 'start' | 'middle' | 'end' | 'selected' | 'normal';
|
|
10
|
+
today: boolean;
|
|
11
|
+
top: string;
|
|
12
|
+
text: string | number;
|
|
13
|
+
bottom: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: StyleValue;
|
|
16
|
+
}
|
|
17
|
+
export interface CalendarProps {
|
|
18
|
+
type?: CalendarType;
|
|
19
|
+
modelValue?: Date | Date[] | string | string[];
|
|
20
|
+
min?: Date;
|
|
21
|
+
max?: Date;
|
|
22
|
+
currentDate?: Date;
|
|
23
|
+
disabledDate?: (date: Date) => boolean;
|
|
24
|
+
maxDays?: number;
|
|
25
|
+
overMaxDays?: () => void;
|
|
26
|
+
weekStartsOn?: number;
|
|
27
|
+
formatter?: (day: CalendarDay) => void;
|
|
28
|
+
allowSameDay?: boolean;
|
|
29
|
+
severalMonths?: boolean;
|
|
30
|
+
valueFormat?: string;
|
|
31
|
+
startDateText?: string;
|
|
32
|
+
endDateText?: string;
|
|
33
|
+
sameDateText?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare const defaultCalendarProps: DefaultProps<CalendarProps>;
|
|
36
|
+
export interface CalendarEmits {
|
|
37
|
+
(e: 'update:modelValue', value: Date | Date[] | string | string[]): void;
|
|
38
|
+
(e: 'change', value: Date | Date[] | string | string[]): void;
|
|
39
|
+
}
|
|
40
|
+
export interface CalendarMonthProps {
|
|
41
|
+
year: number;
|
|
42
|
+
month: number;
|
|
43
|
+
type: CalendarType;
|
|
44
|
+
minDate: Date;
|
|
45
|
+
maxDate: Date;
|
|
46
|
+
currentDates: Date[];
|
|
47
|
+
formatter?: (day: CalendarDay) => void;
|
|
48
|
+
disabledDate?: (date: Date) => boolean;
|
|
49
|
+
todayNumber: number;
|
|
50
|
+
weekStartsOn: number;
|
|
51
|
+
severalMonths?: boolean;
|
|
52
|
+
t: LocaleTranslate;
|
|
53
|
+
bem: Bem;
|
|
54
|
+
startDateText?: string;
|
|
55
|
+
endDateText?: string;
|
|
56
|
+
sameDateText?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface CalendarMonthEmits {
|
|
59
|
+
(e: 'day-click', date: Date): void;
|
|
60
|
+
}
|
|
61
|
+
export declare const getMinDate: (severalMonths?: boolean) => Date;
|
|
62
|
+
export declare const getMaxDate: (severalMonths?: boolean) => Date;
|
|
63
|
+
export declare const sortDates: (dates: Date[]) => Date[];
|
|
64
|
+
export declare const weeksIndex: number[];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region packages/sard/components/calendar/common.ts
|
|
2
|
+
const defaultCalendarProps = {
|
|
3
|
+
type: "single",
|
|
4
|
+
maxDays: Number.MAX_SAFE_INTEGER,
|
|
5
|
+
weekStartsOn: 0
|
|
6
|
+
};
|
|
7
|
+
const getMinDate = (severalMonths) => {
|
|
8
|
+
const date = /* @__PURE__ */ new Date();
|
|
9
|
+
if (severalMonths) return new Date(date.getFullYear(), date.getMonth(), 1);
|
|
10
|
+
return new Date(date.getFullYear() - 10, 0, 1);
|
|
11
|
+
};
|
|
12
|
+
const getMaxDate = (severalMonths) => {
|
|
13
|
+
const date = /* @__PURE__ */ new Date();
|
|
14
|
+
if (severalMonths) return new Date(date.getFullYear(), date.getMonth() + 3, 0);
|
|
15
|
+
return new Date(date.getFullYear() + 10, 11, 31);
|
|
16
|
+
};
|
|
17
|
+
const sortDates = (dates) => {
|
|
18
|
+
return dates.sort((a, b) => a.getTime() - b.getTime());
|
|
19
|
+
};
|
|
20
|
+
const weeksIndex = [
|
|
21
|
+
0,
|
|
22
|
+
1,
|
|
23
|
+
2,
|
|
24
|
+
3,
|
|
25
|
+
4,
|
|
26
|
+
5,
|
|
27
|
+
6
|
|
28
|
+
];
|
|
29
|
+
//#endregion
|
|
30
|
+
export { defaultCalendarProps, getMaxDate, getMinDate, sortDates, weeksIndex };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--s-calendar-week-item-height:var(--s-size-2xl);--s-calendar-week-item-font-size:var(--s-font-size);--s-calendar-week-item-color:var(--s-text-color-primary);--s-calendar-month-padding:var(--s-size-2xs);--s-calendar-month-title-height:var(--s-content-height);--s-calendar-month-title-font-size:var(--s-font-size);--s-calendar-month-title-font-weight:var(--s-font-weight-bold);--s-calendar-month-title-color:var(--s-text-color-primary);--s-calendar-days-row-gap:var(--s-size-2xs);--s-calendar-days-column-gap:0;--s-calendar-day-height:50px;--s-calendar-day-font-size:var(--s-font-size);--s-calendar-day-border-radius:var(--s-border-radius);--s-calendar-day-color-selected:var(--s-white);--s-calendar-day-color-middle:var(--s-color-primary);--s-calendar-day-color-disabled:var(--s-text-color-disabled);--s-calendar-day-bg-selected:var(--s-color-primary);--s-calendar-day-bg-middle:rgba(var(--s-color-primary-rgb), var(--s-opacity-theme-bg));--s-calendar-day-top-top:var(--s-size-2xs);--s-calendar-day-top-font-size:var(--s-font-size-xs);--s-calendar-day-top-line-height:var(--s-line-height-tight);--s-calendar-day-bottom-bottom:var(--s-size-2xs);--s-calendar-day-bottom-font-size:var(--s-font-size-xs);--s-calendar-day-bottom-line-height:var(--s-line-height-tight);--s-calendar-mark-font-size:160px;--s-calendar-mark-color:var(--s-fill-color-fourth)}.s-calendar{overflow:hidden}.s-calendar--no-scroll{touch-action:pan-x}.s-calendar__header{position:relative;z-index:1}.s-calendar__header::after{position:absolute;z-index:1;pointer-events:none;touch-action:none;opacity:1;content:"";left:0;right:0;transform:scaleY(0.5);bottom:0;border-bottom:var(--s-border-width) var(--s-border-style) var(--s-border-color);transform-origin:bottom center}.s-calendar__toolbar{display:flex;justify-content:center;align-items:center}.s-calendar__prev-month,.s-calendar__next-month{font-size:16px}:root[dir=rtl] .s-calendar__prev-month,:root[dir=rtl] .s-calendar__next-month{transform:rotateY(180deg)}.s-calendar__week{display:flex;align-items:center}.s-calendar__week-item{display:flex;justify-content:center;align-items:center;flex:1;height:var(--s-calendar-week-item-height);font-size:var(--s-calendar-week-item-font-size);color:var(--s-calendar-week-item-color)}.s-calendar__body{position:relative}.s-calendar--several .s-calendar__body{height:360px;position:relative}.s-calendar--several .s-calendar__body::before,.s-calendar--several .s-calendar__body::after{content:"";position:absolute;left:0;right:0;z-index:10;height:10px;overflow:hidden;box-shadow:none;touch-action:none;pointer-events:none;transition:box-shadow var(--s-duration)}.s-calendar--several .s-calendar__body::before{top:0}.s-calendar--several .s-calendar__body::after{bottom:0}.s-calendar--several .s-calendar__body--none::before,.s-calendar--several .s-calendar__body--end::before{box-shadow:var(--s-box-shadow-top)}.s-calendar--several .s-calendar__body--none::after,.s-calendar--several .s-calendar__body--start::after{box-shadow:var(--s-box-shadow-bottom)}.s-calendar--several .s-calendar__scroll{height:100%;overflow-x:hidden;overflow-y:auto}.s-calendar__month{position:relative;padding:var(--s-calendar-month-padding)}.s-calendar__month-title{display:flex;justify-content:center;align-items:center;height:var(--s-calendar-month-title-height);font-size:var(--s-calendar-month-title-font-size);font-weight:var(--s-calendar-month-title-font-weight);color:var(--s-calendar-month-title-color)}.s-calendar__days{display:grid;grid-template-columns:repeat(7, 1fr);row-gap:var(--s-calendar-days-row-gap);column-gap:var(--s-calendar-days-column-gap)}.s-calendar__day{position:relative;z-index:1;height:var(--s-calendar-day-height);display:flex;justify-content:center;align-items:center;font-size:var(--s-calendar-day-font-size);line-height:var(--s-calendar-day-height);cursor:pointer}.s-calendar__day--today{font-weight:var(--s-font-weight-bold)}.s-calendar__day--disabled{color:var(--s-calendar-day-color-disabled);cursor:not-allowed}.s-calendar__day--selected,.s-calendar__day--same{border-radius:var(--s-calendar-day-border-radius);color:var(--s-calendar-day-color-selected);background:var(--s-calendar-day-bg-selected)}.s-calendar__day--start,.s-calendar__day--end{color:var(--s-calendar-day-color-selected);background:var(--s-calendar-day-bg-selected)}:root:not([dir=rtl]) .s-calendar__day--start{border-top-left-radius:var(--s-calendar-day-border-radius);border-bottom-left-radius:var(--s-calendar-day-border-radius)}:root[dir=rtl] .s-calendar__day--start{border-top-right-radius:var(--s-calendar-day-border-radius);border-bottom-right-radius:var(--s-calendar-day-border-radius)}:root:not([dir=rtl]) .s-calendar__day--end{border-top-right-radius:var(--s-calendar-day-border-radius);border-bottom-right-radius:var(--s-calendar-day-border-radius)}:root[dir=rtl] .s-calendar__day--end{border-top-left-radius:var(--s-calendar-day-border-radius);border-bottom-left-radius:var(--s-calendar-day-border-radius)}.s-calendar__day--middle{color:var(--s-calendar-day-color-middle);background:var(--s-calendar-day-bg-middle)}.s-calendar__day-top,.s-calendar__day-bottom{position:absolute;left:0;right:0;z-index:1;display:flex;justify-content:center;align-items:center}.s-calendar__day-top{top:var(--s-calendar-day-top-top);font-size:var(--s-calendar-day-top-font-size);line-height:var(--s-calendar-day-top-line-height)}.s-calendar__day-bottom{bottom:var(--s-calendar-day-bottom-bottom);font-size:var(--s-calendar-day-bottom-font-size);line-height:var(--s-calendar-day-bottom-line-height)}.s-calendar__mark{position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;display:flex;justify-content:center;align-items:center;width:100%;height:100%;font-size:var(--s-calendar-mark-font-size);color:var(--s-calendar-mark-color);pointer-events:none}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type EnhancedComponent } from '../../utils';
|
|
2
|
+
import _Calendar from './calendar.vue';
|
|
3
|
+
export declare const Calendar: EnhancedComponent<typeof _Calendar>;
|
|
4
|
+
export default Calendar;
|
|
5
|
+
export type { CalendarDay, CalendarType, CalendarProps, CalendarEmits, CalendarMonthProps, CalendarMonthEmits, } from './common';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { enhanceComponent } from "../../utils/component.js";
|
|
2
|
+
import calendar_default from "./calendar.js";
|
|
3
|
+
//#region packages/sard/components/calendar/index.ts
|
|
4
|
+
const Calendar = enhanceComponent(calendar_default);
|
|
5
|
+
//#endregion
|
|
6
|
+
export { Calendar, Calendar as default };
|