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
package/utils/qrcode.js
ADDED
|
@@ -0,0 +1,768 @@
|
|
|
1
|
+
//#region packages/sard/utils/qrcode.ts
|
|
2
|
+
const LOG = /* @__PURE__ */ new Uint8Array(256);
|
|
3
|
+
const EXP = /* @__PURE__ */ new Uint8Array(256);
|
|
4
|
+
(() => {
|
|
5
|
+
for (let exponent = 1, value = 1; exponent < 256; exponent++) {
|
|
6
|
+
value = value > 127 ? value << 1 ^ 285 : value << 1;
|
|
7
|
+
LOG[value] = exponent % 255;
|
|
8
|
+
EXP[exponent % 255] = value;
|
|
9
|
+
}
|
|
10
|
+
})();
|
|
11
|
+
function mul(a, b) {
|
|
12
|
+
return a && b ? EXP[(LOG[a] + LOG[b]) % 255] : 0;
|
|
13
|
+
}
|
|
14
|
+
function div(a, b) {
|
|
15
|
+
return EXP[(LOG[a] + LOG[b] * 254) % 255];
|
|
16
|
+
}
|
|
17
|
+
function polyMul(poly1, poly2) {
|
|
18
|
+
const coeffs = new Uint8Array(poly1.length + poly2.length - 1);
|
|
19
|
+
for (let index = 0; index < coeffs.length; index++) {
|
|
20
|
+
let coeff = 0;
|
|
21
|
+
for (let p1index = 0; p1index <= index; p1index++) {
|
|
22
|
+
const p2index = index - p1index;
|
|
23
|
+
coeff ^= mul(poly1[p1index], poly2[p2index]);
|
|
24
|
+
}
|
|
25
|
+
coeffs[index] = coeff;
|
|
26
|
+
}
|
|
27
|
+
return coeffs;
|
|
28
|
+
}
|
|
29
|
+
function polyRest(dividend, divisor) {
|
|
30
|
+
const quotientLength = dividend.length - divisor.length + 1;
|
|
31
|
+
let rest = new Uint8Array(dividend);
|
|
32
|
+
for (let count = 0; count < quotientLength; count++) if (rest[0]) {
|
|
33
|
+
const factor = div(rest[0], divisor[0]);
|
|
34
|
+
const subtr = new Uint8Array(rest.length);
|
|
35
|
+
subtr.set(polyMul(divisor, new Uint8Array([factor])), 0);
|
|
36
|
+
rest = rest.map((value, index) => value ^ subtr[index]).slice(1);
|
|
37
|
+
} else rest = rest.slice(1);
|
|
38
|
+
return rest;
|
|
39
|
+
}
|
|
40
|
+
const cacheGeneratorPoly = {};
|
|
41
|
+
function getGeneratorPoly(degree) {
|
|
42
|
+
if (cacheGeneratorPoly[degree]) return cacheGeneratorPoly[degree];
|
|
43
|
+
let lastPoly = new Uint8Array([1]);
|
|
44
|
+
for (let index = 0; index < degree; index++) lastPoly = polyMul(lastPoly, new Uint8Array([1, EXP[index]]));
|
|
45
|
+
return cacheGeneratorPoly[degree] = lastPoly;
|
|
46
|
+
}
|
|
47
|
+
function getECC(data, degree) {
|
|
48
|
+
const messagePoly = new Uint8Array(data.length + degree);
|
|
49
|
+
messagePoly.set(data, 0);
|
|
50
|
+
return polyRest(messagePoly, getGeneratorPoly(degree));
|
|
51
|
+
}
|
|
52
|
+
const ECCodewordsPerBlock = [
|
|
53
|
+
[
|
|
54
|
+
7,
|
|
55
|
+
10,
|
|
56
|
+
15,
|
|
57
|
+
20,
|
|
58
|
+
26,
|
|
59
|
+
18,
|
|
60
|
+
20,
|
|
61
|
+
24,
|
|
62
|
+
30,
|
|
63
|
+
18,
|
|
64
|
+
20,
|
|
65
|
+
24,
|
|
66
|
+
26,
|
|
67
|
+
30,
|
|
68
|
+
22,
|
|
69
|
+
24,
|
|
70
|
+
28,
|
|
71
|
+
30,
|
|
72
|
+
28,
|
|
73
|
+
28,
|
|
74
|
+
28,
|
|
75
|
+
28,
|
|
76
|
+
30,
|
|
77
|
+
30,
|
|
78
|
+
26,
|
|
79
|
+
28,
|
|
80
|
+
30,
|
|
81
|
+
30,
|
|
82
|
+
30,
|
|
83
|
+
30,
|
|
84
|
+
30,
|
|
85
|
+
30,
|
|
86
|
+
30,
|
|
87
|
+
30,
|
|
88
|
+
30,
|
|
89
|
+
30,
|
|
90
|
+
30,
|
|
91
|
+
30,
|
|
92
|
+
30,
|
|
93
|
+
30
|
|
94
|
+
],
|
|
95
|
+
[
|
|
96
|
+
10,
|
|
97
|
+
16,
|
|
98
|
+
26,
|
|
99
|
+
18,
|
|
100
|
+
24,
|
|
101
|
+
16,
|
|
102
|
+
18,
|
|
103
|
+
22,
|
|
104
|
+
22,
|
|
105
|
+
26,
|
|
106
|
+
30,
|
|
107
|
+
22,
|
|
108
|
+
22,
|
|
109
|
+
24,
|
|
110
|
+
24,
|
|
111
|
+
28,
|
|
112
|
+
28,
|
|
113
|
+
26,
|
|
114
|
+
26,
|
|
115
|
+
26,
|
|
116
|
+
26,
|
|
117
|
+
28,
|
|
118
|
+
28,
|
|
119
|
+
28,
|
|
120
|
+
28,
|
|
121
|
+
28,
|
|
122
|
+
28,
|
|
123
|
+
28,
|
|
124
|
+
28,
|
|
125
|
+
28,
|
|
126
|
+
28,
|
|
127
|
+
28,
|
|
128
|
+
28,
|
|
129
|
+
28,
|
|
130
|
+
28,
|
|
131
|
+
28,
|
|
132
|
+
28,
|
|
133
|
+
28,
|
|
134
|
+
28,
|
|
135
|
+
28
|
|
136
|
+
],
|
|
137
|
+
[
|
|
138
|
+
13,
|
|
139
|
+
22,
|
|
140
|
+
18,
|
|
141
|
+
26,
|
|
142
|
+
18,
|
|
143
|
+
24,
|
|
144
|
+
18,
|
|
145
|
+
22,
|
|
146
|
+
20,
|
|
147
|
+
24,
|
|
148
|
+
28,
|
|
149
|
+
26,
|
|
150
|
+
24,
|
|
151
|
+
20,
|
|
152
|
+
30,
|
|
153
|
+
24,
|
|
154
|
+
28,
|
|
155
|
+
28,
|
|
156
|
+
26,
|
|
157
|
+
30,
|
|
158
|
+
28,
|
|
159
|
+
30,
|
|
160
|
+
30,
|
|
161
|
+
30,
|
|
162
|
+
30,
|
|
163
|
+
28,
|
|
164
|
+
30,
|
|
165
|
+
30,
|
|
166
|
+
30,
|
|
167
|
+
30,
|
|
168
|
+
30,
|
|
169
|
+
30,
|
|
170
|
+
30,
|
|
171
|
+
30,
|
|
172
|
+
30,
|
|
173
|
+
30,
|
|
174
|
+
30,
|
|
175
|
+
30,
|
|
176
|
+
30,
|
|
177
|
+
30
|
|
178
|
+
],
|
|
179
|
+
[
|
|
180
|
+
17,
|
|
181
|
+
28,
|
|
182
|
+
22,
|
|
183
|
+
16,
|
|
184
|
+
22,
|
|
185
|
+
28,
|
|
186
|
+
26,
|
|
187
|
+
26,
|
|
188
|
+
24,
|
|
189
|
+
28,
|
|
190
|
+
24,
|
|
191
|
+
28,
|
|
192
|
+
22,
|
|
193
|
+
24,
|
|
194
|
+
24,
|
|
195
|
+
30,
|
|
196
|
+
28,
|
|
197
|
+
28,
|
|
198
|
+
26,
|
|
199
|
+
28,
|
|
200
|
+
30,
|
|
201
|
+
24,
|
|
202
|
+
30,
|
|
203
|
+
30,
|
|
204
|
+
30,
|
|
205
|
+
30,
|
|
206
|
+
30,
|
|
207
|
+
30,
|
|
208
|
+
30,
|
|
209
|
+
30,
|
|
210
|
+
30,
|
|
211
|
+
30,
|
|
212
|
+
30,
|
|
213
|
+
30,
|
|
214
|
+
30,
|
|
215
|
+
30,
|
|
216
|
+
30,
|
|
217
|
+
30,
|
|
218
|
+
30,
|
|
219
|
+
30
|
|
220
|
+
]
|
|
221
|
+
];
|
|
222
|
+
const ECBlocks = [
|
|
223
|
+
[
|
|
224
|
+
1,
|
|
225
|
+
1,
|
|
226
|
+
1,
|
|
227
|
+
1,
|
|
228
|
+
1,
|
|
229
|
+
2,
|
|
230
|
+
2,
|
|
231
|
+
2,
|
|
232
|
+
2,
|
|
233
|
+
4,
|
|
234
|
+
4,
|
|
235
|
+
4,
|
|
236
|
+
4,
|
|
237
|
+
4,
|
|
238
|
+
6,
|
|
239
|
+
6,
|
|
240
|
+
6,
|
|
241
|
+
6,
|
|
242
|
+
7,
|
|
243
|
+
8,
|
|
244
|
+
8,
|
|
245
|
+
9,
|
|
246
|
+
9,
|
|
247
|
+
10,
|
|
248
|
+
12,
|
|
249
|
+
12,
|
|
250
|
+
12,
|
|
251
|
+
13,
|
|
252
|
+
14,
|
|
253
|
+
15,
|
|
254
|
+
16,
|
|
255
|
+
17,
|
|
256
|
+
18,
|
|
257
|
+
19,
|
|
258
|
+
19,
|
|
259
|
+
20,
|
|
260
|
+
21,
|
|
261
|
+
22,
|
|
262
|
+
24,
|
|
263
|
+
25
|
|
264
|
+
],
|
|
265
|
+
[
|
|
266
|
+
1,
|
|
267
|
+
1,
|
|
268
|
+
1,
|
|
269
|
+
2,
|
|
270
|
+
2,
|
|
271
|
+
4,
|
|
272
|
+
4,
|
|
273
|
+
4,
|
|
274
|
+
5,
|
|
275
|
+
5,
|
|
276
|
+
5,
|
|
277
|
+
8,
|
|
278
|
+
9,
|
|
279
|
+
9,
|
|
280
|
+
10,
|
|
281
|
+
10,
|
|
282
|
+
11,
|
|
283
|
+
13,
|
|
284
|
+
14,
|
|
285
|
+
16,
|
|
286
|
+
17,
|
|
287
|
+
17,
|
|
288
|
+
18,
|
|
289
|
+
20,
|
|
290
|
+
21,
|
|
291
|
+
23,
|
|
292
|
+
25,
|
|
293
|
+
26,
|
|
294
|
+
28,
|
|
295
|
+
29,
|
|
296
|
+
31,
|
|
297
|
+
33,
|
|
298
|
+
35,
|
|
299
|
+
37,
|
|
300
|
+
38,
|
|
301
|
+
40,
|
|
302
|
+
43,
|
|
303
|
+
45,
|
|
304
|
+
47,
|
|
305
|
+
49
|
|
306
|
+
],
|
|
307
|
+
[
|
|
308
|
+
1,
|
|
309
|
+
1,
|
|
310
|
+
2,
|
|
311
|
+
2,
|
|
312
|
+
4,
|
|
313
|
+
4,
|
|
314
|
+
6,
|
|
315
|
+
6,
|
|
316
|
+
8,
|
|
317
|
+
8,
|
|
318
|
+
8,
|
|
319
|
+
10,
|
|
320
|
+
12,
|
|
321
|
+
16,
|
|
322
|
+
12,
|
|
323
|
+
17,
|
|
324
|
+
16,
|
|
325
|
+
18,
|
|
326
|
+
21,
|
|
327
|
+
20,
|
|
328
|
+
23,
|
|
329
|
+
23,
|
|
330
|
+
25,
|
|
331
|
+
27,
|
|
332
|
+
29,
|
|
333
|
+
34,
|
|
334
|
+
34,
|
|
335
|
+
35,
|
|
336
|
+
38,
|
|
337
|
+
40,
|
|
338
|
+
43,
|
|
339
|
+
45,
|
|
340
|
+
48,
|
|
341
|
+
51,
|
|
342
|
+
53,
|
|
343
|
+
56,
|
|
344
|
+
59,
|
|
345
|
+
62,
|
|
346
|
+
65,
|
|
347
|
+
68
|
|
348
|
+
],
|
|
349
|
+
[
|
|
350
|
+
1,
|
|
351
|
+
1,
|
|
352
|
+
2,
|
|
353
|
+
4,
|
|
354
|
+
4,
|
|
355
|
+
4,
|
|
356
|
+
5,
|
|
357
|
+
6,
|
|
358
|
+
8,
|
|
359
|
+
8,
|
|
360
|
+
11,
|
|
361
|
+
11,
|
|
362
|
+
16,
|
|
363
|
+
16,
|
|
364
|
+
18,
|
|
365
|
+
16,
|
|
366
|
+
19,
|
|
367
|
+
21,
|
|
368
|
+
25,
|
|
369
|
+
25,
|
|
370
|
+
25,
|
|
371
|
+
34,
|
|
372
|
+
30,
|
|
373
|
+
32,
|
|
374
|
+
35,
|
|
375
|
+
37,
|
|
376
|
+
40,
|
|
377
|
+
42,
|
|
378
|
+
45,
|
|
379
|
+
48,
|
|
380
|
+
51,
|
|
381
|
+
54,
|
|
382
|
+
57,
|
|
383
|
+
60,
|
|
384
|
+
63,
|
|
385
|
+
66,
|
|
386
|
+
70,
|
|
387
|
+
74,
|
|
388
|
+
77,
|
|
389
|
+
81
|
|
390
|
+
]
|
|
391
|
+
];
|
|
392
|
+
function appendBits(num, length, bits) {
|
|
393
|
+
for (let i = length - 1; i >= 0; i--) bits.push(num >>> i & 1);
|
|
394
|
+
return bits;
|
|
395
|
+
}
|
|
396
|
+
var Mode = /* @__PURE__ */ function(Mode) {
|
|
397
|
+
Mode[Mode["Numeric"] = 0] = "Numeric";
|
|
398
|
+
Mode[Mode["Alphanumeric"] = 1] = "Alphanumeric";
|
|
399
|
+
Mode[Mode["Byte"] = 2] = "Byte";
|
|
400
|
+
return Mode;
|
|
401
|
+
}(Mode || {});
|
|
402
|
+
function getMode(text) {
|
|
403
|
+
if (/^[0-9]*$/.test(text)) return Mode.Numeric;
|
|
404
|
+
if (/^[0-9A-Z $%*+-./:]*$/.test(text)) return Mode.Alphanumeric;
|
|
405
|
+
return Mode.Byte;
|
|
406
|
+
}
|
|
407
|
+
function getModeIndicator(mode) {
|
|
408
|
+
switch (mode) {
|
|
409
|
+
case Mode.Numeric: return 1;
|
|
410
|
+
case Mode.Alphanumeric: return 2;
|
|
411
|
+
default: return 4;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
function encodeNumeric(text) {
|
|
415
|
+
const bits = [];
|
|
416
|
+
(text.match(/.{1,3}/g) || []).forEach((item) => {
|
|
417
|
+
appendBits(+item, (item.length - 1) * 3 + 4, bits);
|
|
418
|
+
});
|
|
419
|
+
return bits;
|
|
420
|
+
}
|
|
421
|
+
const ALPHANUMERIC_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";
|
|
422
|
+
function encodeAlphaNumeric(text) {
|
|
423
|
+
const bits = [];
|
|
424
|
+
(text.match(/.{1,2}/g) || []).forEach((item) => {
|
|
425
|
+
const i1 = ALPHANUMERIC_CHARS.indexOf(item[0]);
|
|
426
|
+
const i2 = ALPHANUMERIC_CHARS.indexOf(item[1]);
|
|
427
|
+
if (i2 === -1) appendBits(i1, 6, bits);
|
|
428
|
+
else appendBits(i1 * 45 + i2, 11, bits);
|
|
429
|
+
});
|
|
430
|
+
return bits;
|
|
431
|
+
}
|
|
432
|
+
function toUtf8ByteArray(text) {
|
|
433
|
+
text = encodeURI(text);
|
|
434
|
+
const bytes = [];
|
|
435
|
+
for (let i = 0; i < text.length; i++) if (text.charAt(i) !== "%") bytes.push(text.charCodeAt(i));
|
|
436
|
+
else {
|
|
437
|
+
bytes.push(parseInt(text.slice(i + 1, i + 3), 16));
|
|
438
|
+
i += 2;
|
|
439
|
+
}
|
|
440
|
+
return bytes;
|
|
441
|
+
}
|
|
442
|
+
function encodeByte(text) {
|
|
443
|
+
const bits = [];
|
|
444
|
+
toUtf8ByteArray(text).forEach((item) => {
|
|
445
|
+
appendBits(item, 8, bits);
|
|
446
|
+
});
|
|
447
|
+
return bits;
|
|
448
|
+
}
|
|
449
|
+
function encodeData(mode, text) {
|
|
450
|
+
switch (mode) {
|
|
451
|
+
case Mode.Numeric: return encodeNumeric(text);
|
|
452
|
+
case Mode.Alphanumeric: return encodeAlphaNumeric(text);
|
|
453
|
+
default: return encodeByte(text);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
function getFunctionModules(version) {
|
|
457
|
+
let count = 225 + 8 * version;
|
|
458
|
+
if (version > 6) count += 36;
|
|
459
|
+
if (version > 1) {
|
|
460
|
+
const alignCount = ~~(version / 7) + 2;
|
|
461
|
+
count += (25 * alignCount - 10) * alignCount - 55;
|
|
462
|
+
}
|
|
463
|
+
return count;
|
|
464
|
+
}
|
|
465
|
+
function getSize(version) {
|
|
466
|
+
return version * 4 + 17;
|
|
467
|
+
}
|
|
468
|
+
function getTotalDataModules(version) {
|
|
469
|
+
return Math.pow(getSize(version), 2) - getFunctionModules(version);
|
|
470
|
+
}
|
|
471
|
+
function getECCodewords(eclIndex, version) {
|
|
472
|
+
return ECCodewordsPerBlock[eclIndex][version - 1] * ECBlocks[eclIndex][version - 1];
|
|
473
|
+
}
|
|
474
|
+
function getRawDataCodewords(eclIndex, version) {
|
|
475
|
+
return getTotalDataModules(version) / 8 - getECCodewords(eclIndex, version);
|
|
476
|
+
}
|
|
477
|
+
const charCountIndicatorTable = {
|
|
478
|
+
[Mode.Numeric]: [
|
|
479
|
+
10,
|
|
480
|
+
12,
|
|
481
|
+
14
|
|
482
|
+
],
|
|
483
|
+
[Mode.Alphanumeric]: [
|
|
484
|
+
9,
|
|
485
|
+
11,
|
|
486
|
+
13
|
|
487
|
+
],
|
|
488
|
+
[Mode.Byte]: [
|
|
489
|
+
8,
|
|
490
|
+
16,
|
|
491
|
+
16
|
|
492
|
+
]
|
|
493
|
+
};
|
|
494
|
+
function getCharCountIndicator(mode, version) {
|
|
495
|
+
return charCountIndicatorTable[mode][~~((version + 7) / 17)];
|
|
496
|
+
}
|
|
497
|
+
function getVersion(mode, eclIndex, codewords) {
|
|
498
|
+
for (let version = 1; version <= 40; version++) if (getRawDataCodewords(eclIndex, version) >= codewords + (4 + getCharCountIndicator(mode, version)) / 8) return version;
|
|
499
|
+
return 40;
|
|
500
|
+
}
|
|
501
|
+
function addFinderPatterns(map, size) {
|
|
502
|
+
for (let i = 0; i < 3; i++) {
|
|
503
|
+
const originX = i === 1 ? size - 7 : 0;
|
|
504
|
+
const originY = i === 2 ? size - 7 : 0;
|
|
505
|
+
for (let y = 0; y < 7; y++) for (let x = 0; x < 7; x++) {
|
|
506
|
+
const bit = x === 0 || x === 6 || y === 0 || y === 6 || x > 1 && x < 5 && y > 1 && y < 5 ? 1 : 0;
|
|
507
|
+
map[originY + y][originX + x] = bit;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
function addSeparatorPatterns(map, size) {
|
|
512
|
+
for (let i = 0; i < 8; i++) {
|
|
513
|
+
map[i][7] = 0;
|
|
514
|
+
map[i][size - 8] = 0;
|
|
515
|
+
map[size - 8 + i][7] = 0;
|
|
516
|
+
map[7][i] = 0;
|
|
517
|
+
map[7][size - 8 + i] = 0;
|
|
518
|
+
map[size - 8][i] = 0;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
function getAlignmentPatternLocations(version) {
|
|
522
|
+
if (version == 1) return [];
|
|
523
|
+
const alignCount = ~~(version / 7) + 2;
|
|
524
|
+
const step = version === 32 ? 26 : Math.ceil((version * 4 + 4) / (alignCount * 2 - 2)) * 2;
|
|
525
|
+
const locations = [6];
|
|
526
|
+
for (let location = getSize(version) - 7; locations.length < alignCount; location -= step) locations.splice(1, 0, location);
|
|
527
|
+
return locations;
|
|
528
|
+
}
|
|
529
|
+
function addAlignmentPatterns(map, version) {
|
|
530
|
+
const locations = getAlignmentPatternLocations(version);
|
|
531
|
+
for (const locY of locations) for (const locX of locations) {
|
|
532
|
+
if (map[locY][locX] !== null) continue;
|
|
533
|
+
for (let y = 0; y < 5; y++) for (let x = 0; x < 5; x++) map[locY - 2 + y][locX - 2 + x] = x === 0 || x === 4 || y === 0 || y === 4 || x === 2 && y === 2 ? 1 : 0;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
function addTimingPatterns(map, size) {
|
|
537
|
+
const length = size - 16;
|
|
538
|
+
for (let i = 0; i < length; i++) {
|
|
539
|
+
const n = i % 2 === 0 ? 1 : 0;
|
|
540
|
+
map[6][8 + i] = n;
|
|
541
|
+
map[8 + i][6] = n;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
function addDarkPattern(map, size) {
|
|
545
|
+
map[size - 8][8] = 1;
|
|
546
|
+
}
|
|
547
|
+
function addFormatInformationPatterns(map, size, fillBit) {
|
|
548
|
+
for (let i = 0; i < 15; i++) {
|
|
549
|
+
const bit = fillBit(14 - i);
|
|
550
|
+
map[8][i < 6 ? i : i < 7 ? i + 1 : size - 15 + i] = bit;
|
|
551
|
+
map[size - 1 - (i < 7 ? i : i < 9 ? size - 16 + i : size - 15 + i)][8] = bit;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
function addVersionInformationPatterns(map, size, fillBit) {
|
|
555
|
+
for (let i = 0; i < 18; i++) {
|
|
556
|
+
map[size - 11 + i % 3][~~(i / 3)] = fillBit(i);
|
|
557
|
+
map[~~(i / 3)][size - 11 + ~~(i % 3)] = fillBit(i);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
function placeDataBits(map, size, dataBits) {
|
|
561
|
+
const length = size * size;
|
|
562
|
+
let b = 0;
|
|
563
|
+
for (let i = 0; i < length; i++) {
|
|
564
|
+
const rest = ~~(i / 2) % size;
|
|
565
|
+
const quo = ~~(i / (size * 2));
|
|
566
|
+
const y = quo % 2 === 0 ? size - 1 - rest : rest;
|
|
567
|
+
let x = size - 2 - (quo * 2 - (i % 2 === 0 ? 1 : 0));
|
|
568
|
+
if (x < 7) x--;
|
|
569
|
+
if (map[y][x] === null) map[y][x] = dataBits[b++] + 2;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
const maskModes = [
|
|
573
|
+
(row, col) => (row + col) % 2 === 0,
|
|
574
|
+
(row) => row % 2 === 0,
|
|
575
|
+
(_, col) => col % 3 === 0,
|
|
576
|
+
(row, col) => (row + col) % 3 === 0,
|
|
577
|
+
(row, col) => (~~(row / 2) + ~~(col / 3)) % 2 === 0,
|
|
578
|
+
(row, col) => row * col % 2 + row * col % 3 === 0,
|
|
579
|
+
(row, col) => (row * col % 2 + row * col % 3) % 2 === 0,
|
|
580
|
+
(row, col) => ((row + col) % 2 + row * col % 3) % 2 === 0
|
|
581
|
+
];
|
|
582
|
+
function getLeastFiveSameColoredPenalty(getEach, size) {
|
|
583
|
+
let score = 0;
|
|
584
|
+
for (let i = 0; i < size; i++) {
|
|
585
|
+
let sum = 0;
|
|
586
|
+
let last = -1;
|
|
587
|
+
for (let j = 0; j < size; j++) {
|
|
588
|
+
const bit = getEach(i, j);
|
|
589
|
+
if (sum === 0 || last === bit) {
|
|
590
|
+
sum++;
|
|
591
|
+
last = bit;
|
|
592
|
+
}
|
|
593
|
+
if (last !== bit || j === size - 1) {
|
|
594
|
+
if (sum >= 5) score += sum - 2;
|
|
595
|
+
sum = 1;
|
|
596
|
+
last = bit;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
return score;
|
|
601
|
+
}
|
|
602
|
+
function getTwoByTwoSameColoredPenalty(map, size) {
|
|
603
|
+
let score = 0;
|
|
604
|
+
for (let y = 0; y < size - 2; y++) for (let x = 0; x < size - 2; x++) if ((map[y][x] + map[y][x + 1] + map[y + 1][x] + map[y + 1][x + 1]) % 4 === 0) score += 3;
|
|
605
|
+
return score;
|
|
606
|
+
}
|
|
607
|
+
function getFinderLikePenalty(map, size) {
|
|
608
|
+
let score = 0;
|
|
609
|
+
for (let i = 0; i < size - 11; i++) for (let j = 0; j < size - 11; j++) {
|
|
610
|
+
let rowBits = 0;
|
|
611
|
+
let colBits = 0;
|
|
612
|
+
for (let k = 0; k < 11; k++) {
|
|
613
|
+
rowBits = (rowBits << 1) + map[i][j + k];
|
|
614
|
+
colBits = (colBits << 1) + map[j + k][i];
|
|
615
|
+
}
|
|
616
|
+
if (rowBits === 1488 || rowBits === 93) score += 40;
|
|
617
|
+
if (colBits === 1488 || colBits === 93) score += 40;
|
|
618
|
+
}
|
|
619
|
+
return score;
|
|
620
|
+
}
|
|
621
|
+
function getBalancePenalty(map) {
|
|
622
|
+
const percent = map.reduce((sum, row) => sum + row.reduce((sum, bit) => sum + bit, 0), 0) / (map.length * map.length) * 100;
|
|
623
|
+
return Math.min(Math.abs(Math.floor(percent / 5) * 5 - 50) / 5, Math.abs(Math.ceil(percent / 5) * 5 - 50) / 5) * 10;
|
|
624
|
+
}
|
|
625
|
+
const errorCorrectionBit = [
|
|
626
|
+
1,
|
|
627
|
+
0,
|
|
628
|
+
3,
|
|
629
|
+
2
|
|
630
|
+
];
|
|
631
|
+
function getFormatInformationBits(eclIndex, maskNum) {
|
|
632
|
+
const ecMaskBits = errorCorrectionBit[eclIndex] << 3 | maskNum;
|
|
633
|
+
let rest = ecMaskBits;
|
|
634
|
+
for (let i = 0; i < 10; i++) rest = rest << 1 ^ (rest >>> 9) * 1335;
|
|
635
|
+
return (ecMaskBits << 10 | rest) ^ 21522;
|
|
636
|
+
}
|
|
637
|
+
function getVersionInformationBits(version) {
|
|
638
|
+
let rest = version;
|
|
639
|
+
for (let i = 0; i < 12; i++) rest = rest << 1 ^ (rest >>> 11) * 7973;
|
|
640
|
+
return version << 12 | rest;
|
|
641
|
+
}
|
|
642
|
+
const ECLList = [
|
|
643
|
+
"L",
|
|
644
|
+
"M",
|
|
645
|
+
"Q",
|
|
646
|
+
"H"
|
|
647
|
+
];
|
|
648
|
+
function qrcode(text, options = {}) {
|
|
649
|
+
const { ecl = "M" } = options;
|
|
650
|
+
let eclIndex = ECLList.indexOf(ecl);
|
|
651
|
+
if (eclIndex < 0) eclIndex = 1;
|
|
652
|
+
const mode = getMode(text);
|
|
653
|
+
const modeIndicator = getModeIndicator(mode);
|
|
654
|
+
let version = 0;
|
|
655
|
+
let size = 0;
|
|
656
|
+
let dataBits = [];
|
|
657
|
+
const groups = [];
|
|
658
|
+
let map = [];
|
|
659
|
+
let maskNum = 0;
|
|
660
|
+
let maskMap = [];
|
|
661
|
+
{
|
|
662
|
+
dataBits = encodeData(mode, text);
|
|
663
|
+
const codewords = dataBits.length / 8;
|
|
664
|
+
const charLength = mode === Mode.Byte ? codewords : text.length;
|
|
665
|
+
version = getVersion(mode, eclIndex, codewords);
|
|
666
|
+
size = getSize(version);
|
|
667
|
+
dataBits = [
|
|
668
|
+
...appendBits(modeIndicator, 4, []),
|
|
669
|
+
...appendBits(charLength, getCharCountIndicator(mode, version), []),
|
|
670
|
+
...dataBits
|
|
671
|
+
];
|
|
672
|
+
const rawDataBits = getRawDataCodewords(eclIndex, version) * 8;
|
|
673
|
+
appendBits(0, Math.min(rawDataBits - dataBits.length, 4), dataBits);
|
|
674
|
+
appendBits(0, (8 - dataBits.length % 8) % 8, dataBits);
|
|
675
|
+
for (let padByte = 236; dataBits.length < rawDataBits; padByte ^= 253) appendBits(padByte, 8, dataBits);
|
|
676
|
+
}
|
|
677
|
+
{
|
|
678
|
+
const codewords = [];
|
|
679
|
+
dataBits.forEach((bit, i) => {
|
|
680
|
+
codewords[i >> 3] |= bit << 7 - (i & 7);
|
|
681
|
+
});
|
|
682
|
+
const blocks = ECBlocks[eclIndex][version - 1];
|
|
683
|
+
const g2Blocks = ~~(getTotalDataModules(version) / 8) % blocks;
|
|
684
|
+
const g1Blocks = blocks - g2Blocks;
|
|
685
|
+
const totalDC = getRawDataCodewords(eclIndex, version);
|
|
686
|
+
const g1DCPerBlock = ~~(totalDC / blocks);
|
|
687
|
+
const g2DCPerBlock = g2Blocks === 0 ? 0 : (totalDC - g1DCPerBlock * g1Blocks) / g2Blocks;
|
|
688
|
+
const eccNum = ECCodewordsPerBlock[eclIndex][version - 1];
|
|
689
|
+
let currentIndex = 0;
|
|
690
|
+
for (const [blocks, DCPerBlock] of [[g1Blocks, g1DCPerBlock], [g2Blocks, g2DCPerBlock]]) for (let b = 0; b < blocks; b++) {
|
|
691
|
+
const dataCodewords = new Uint8Array(codewords.slice(currentIndex, currentIndex + DCPerBlock));
|
|
692
|
+
groups.push({
|
|
693
|
+
data: dataCodewords,
|
|
694
|
+
ecc: getECC(dataCodewords, eccNum)
|
|
695
|
+
});
|
|
696
|
+
currentIndex += DCPerBlock;
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
{
|
|
700
|
+
const dataCodewords = [];
|
|
701
|
+
const ecCodewords = [];
|
|
702
|
+
let i = 0;
|
|
703
|
+
while (true) {
|
|
704
|
+
if (groups.map((block) => {
|
|
705
|
+
const dataCodeWord = block.data[i];
|
|
706
|
+
if (dataCodeWord !== void 0) dataCodewords.push(dataCodeWord);
|
|
707
|
+
const ecCodeWord = block.ecc[i];
|
|
708
|
+
if (ecCodeWord !== void 0) ecCodewords.push(ecCodeWord);
|
|
709
|
+
return dataCodeWord === void 0 && ecCodeWord === void 0;
|
|
710
|
+
}).every((done) => done)) break;
|
|
711
|
+
i++;
|
|
712
|
+
}
|
|
713
|
+
const interleavedCodewords = dataCodewords.concat(ecCodewords);
|
|
714
|
+
dataBits = [];
|
|
715
|
+
interleavedCodewords.forEach((codewords) => {
|
|
716
|
+
appendBits(codewords, 8, dataBits);
|
|
717
|
+
});
|
|
718
|
+
appendBits(0, getTotalDataModules(version) - dataBits.length, dataBits);
|
|
719
|
+
}
|
|
720
|
+
map = Array(size).fill(null).map(() => Array(size).fill(null));
|
|
721
|
+
addFinderPatterns(map, size);
|
|
722
|
+
addSeparatorPatterns(map, size);
|
|
723
|
+
addAlignmentPatterns(map, version);
|
|
724
|
+
addTimingPatterns(map, size);
|
|
725
|
+
addDarkPattern(map, size);
|
|
726
|
+
addFormatInformationPatterns(map, size, () => 0);
|
|
727
|
+
if (version >= 7) addVersionInformationPatterns(map, size, () => 0);
|
|
728
|
+
placeDataBits(map, size, dataBits);
|
|
729
|
+
{
|
|
730
|
+
let lowerScore = Infinity;
|
|
731
|
+
for (let i = 0; i < 8; i++) {
|
|
732
|
+
const maskMode = maskModes[i];
|
|
733
|
+
const seedMap = map.map((row, rowIndex) => row.map((col, colIndex) => {
|
|
734
|
+
if (col < 2) return col;
|
|
735
|
+
col = col - 2;
|
|
736
|
+
return maskMode(rowIndex, colIndex) ? col ^ 1 : col;
|
|
737
|
+
}));
|
|
738
|
+
let score = 0;
|
|
739
|
+
score += getLeastFiveSameColoredPenalty((i, j) => seedMap[i][j], size);
|
|
740
|
+
score += getLeastFiveSameColoredPenalty((i, j) => seedMap[j][i], size);
|
|
741
|
+
score += getTwoByTwoSameColoredPenalty(seedMap, size);
|
|
742
|
+
score += getFinderLikePenalty(seedMap, size);
|
|
743
|
+
score += getBalancePenalty(seedMap);
|
|
744
|
+
if (score < lowerScore) {
|
|
745
|
+
lowerScore = score;
|
|
746
|
+
maskNum = i;
|
|
747
|
+
maskMap = seedMap;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
{
|
|
752
|
+
const formatBits = getFormatInformationBits(eclIndex, maskNum);
|
|
753
|
+
addFormatInformationPatterns(map, size, (i) => formatBits >> i & 1);
|
|
754
|
+
if (version > 6) {
|
|
755
|
+
const versionBits = getVersionInformationBits(version);
|
|
756
|
+
addVersionInformationPatterns(map, size, (i) => versionBits >> i & 1);
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
maskMap.forEach((row, y) => {
|
|
760
|
+
row.forEach((col, x) => {
|
|
761
|
+
const mapCol = map[y][x];
|
|
762
|
+
if (mapCol !== 0 && mapCol !== 1) map[y][x] = col;
|
|
763
|
+
});
|
|
764
|
+
});
|
|
765
|
+
return map;
|
|
766
|
+
}
|
|
767
|
+
//#endregion
|
|
768
|
+
export { ALPHANUMERIC_CHARS, ECLList, qrcode };
|