@varlet/ui 1.23.3-alpha.1 → 1.23.4-alpha.16
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/CHANGELOG.md +22 -0
- package/es/action-sheet/index.js +1 -1
- package/es/back-top/BackTop.js +2 -2
- package/es/dialog/index.js +1 -1
- package/es/image-preview/index.js +1 -1
- package/es/index.d.ts +1 -0
- package/es/input/Input.js +36 -13
- package/es/list/List.js +1 -1
- package/es/popup/Popup.js +81 -59
- package/es/popup/index.js +1 -1
- package/es/popup/style/index.js +0 -1
- package/es/popup/style/less.js +0 -1
- package/es/pull-refresh/PullRefresh.js +1 -1
- package/es/sticky/Sticky.js +1 -1
- package/es/utils/components.js +7 -0
- package/es/utils/elements.js +2 -2
- package/es/utils/shared.js +1 -1
- package/highlight/web-types.json +1 -1
- package/lib/action-sheet/ActionSheet.js +149 -0
- package/{es/popup/PopupSfc.css → lib/action-sheet/ActionSheetSfc.css} +0 -0
- package/{es/popup/PopupSfc.less → lib/action-sheet/ActionSheetSfc.less} +0 -0
- package/lib/action-sheet/actionSheet.css +1 -0
- package/lib/action-sheet/actionSheet.less +68 -0
- package/lib/action-sheet/index.js +79 -0
- package/lib/action-sheet/props.js +37 -0
- package/lib/action-sheet/style/index.js +6 -0
- package/lib/action-sheet/style/less.js +6 -0
- package/lib/app-bar/AppBar.js +66 -0
- package/lib/app-bar/AppBarSfc.css +0 -0
- package/lib/app-bar/AppBarSfc.less +0 -0
- package/lib/app-bar/appBar.css +1 -0
- package/lib/app-bar/appBar.less +56 -0
- package/lib/app-bar/index.js +17 -0
- package/lib/app-bar/props.js +32 -0
- package/lib/app-bar/style/index.js +4 -0
- package/lib/app-bar/style/less.js +4 -0
- package/lib/back-top/BackTop.js +96 -0
- package/lib/back-top/BackTopSfc.css +0 -0
- package/lib/back-top/BackTopSfc.less +0 -0
- package/lib/back-top/backTop.css +1 -0
- package/lib/back-top/backTop.less +27 -0
- package/lib/back-top/index.js +17 -0
- package/lib/back-top/props.js +21 -0
- package/lib/back-top/style/index.js +5 -0
- package/lib/back-top/style/less.js +5 -0
- package/lib/badge/Badge.js +107 -0
- package/lib/badge/BadgeSfc.css +0 -0
- package/lib/badge/BadgeSfc.less +0 -0
- package/lib/badge/badge.css +1 -0
- package/lib/badge/badge.less +119 -0
- package/lib/badge/index.js +17 -0
- package/lib/badge/props.js +55 -0
- package/lib/badge/style/index.js +4 -0
- package/lib/badge/style/less.js +4 -0
- package/lib/button/Button.js +102 -0
- package/lib/button/ButtonSfc.css +0 -0
- package/lib/button/ButtonSfc.less +0 -0
- package/lib/button/button.css +1 -0
- package/lib/button/button.less +183 -0
- package/lib/button/index.js +17 -0
- package/lib/button/props.js +76 -0
- package/lib/button/style/index.js +6 -0
- package/lib/button/style/less.js +6 -0
- package/lib/card/Card.js +83 -0
- package/lib/card/CardSfc.css +0 -0
- package/lib/card/CardSfc.less +0 -0
- package/lib/card/card.css +1 -0
- package/lib/card/card.less +84 -0
- package/lib/card/index.js +17 -0
- package/lib/card/props.js +45 -0
- package/lib/card/style/index.js +5 -0
- package/lib/card/style/less.js +5 -0
- package/lib/cell/Cell.js +68 -0
- package/lib/cell/CellSfc.css +0 -0
- package/lib/cell/CellSfc.less +0 -0
- package/lib/cell/cell.css +1 -0
- package/lib/cell/cell.less +74 -0
- package/lib/cell/index.js +17 -0
- package/lib/cell/props.js +32 -0
- package/lib/cell/style/index.js +4 -0
- package/lib/cell/style/less.js +4 -0
- package/lib/checkbox/Checkbox.js +232 -0
- package/lib/checkbox/CheckboxSfc.css +0 -0
- package/lib/checkbox/CheckboxSfc.less +0 -0
- package/lib/checkbox/checkbox.css +1 -0
- package/lib/checkbox/checkbox.less +78 -0
- package/lib/checkbox/index.js +17 -0
- package/lib/checkbox/props.js +56 -0
- package/lib/checkbox/provide.js +23 -0
- package/lib/checkbox/style/index.js +5 -0
- package/lib/checkbox/style/less.js +5 -0
- package/lib/checkbox-group/CheckboxGroup.js +181 -0
- package/lib/checkbox-group/CheckboxGroupSfc.css +0 -0
- package/lib/checkbox-group/CheckboxGroupSfc.less +0 -0
- package/lib/checkbox-group/checkboxGroup.css +1 -0
- package/lib/checkbox-group/checkboxGroup.less +12 -0
- package/lib/checkbox-group/index.js +17 -0
- package/lib/checkbox-group/props.js +38 -0
- package/lib/checkbox-group/provide.js +27 -0
- package/lib/checkbox-group/style/index.js +4 -0
- package/lib/checkbox-group/style/less.js +4 -0
- package/lib/chip/Chip.js +95 -0
- package/lib/chip/ChipSfc.css +0 -0
- package/lib/chip/ChipSfc.less +0 -0
- package/lib/chip/chip.css +1 -0
- package/lib/chip/chip.less +182 -0
- package/lib/chip/index.js +17 -0
- package/lib/chip/props.js +56 -0
- package/lib/chip/style/index.js +4 -0
- package/lib/chip/style/less.js +4 -0
- package/lib/col/Col.js +68 -0
- package/lib/col/ColSfc.css +0 -0
- package/lib/col/ColSfc.less +0 -0
- package/lib/col/col.css +1 -0
- package/lib/col/col.less +17 -0
- package/lib/col/index.js +17 -0
- package/lib/col/props.js +18 -0
- package/lib/col/provide.js +28 -0
- package/lib/col/style/index.js +3 -0
- package/lib/col/style/less.js +3 -0
- package/lib/collapse/Collapse.js +126 -0
- package/lib/collapse/CollapseSfc.css +1 -0
- package/lib/collapse/CollapseSfc.less +1 -0
- package/lib/collapse/index.js +17 -0
- package/lib/collapse/props.js +24 -0
- package/lib/collapse/provide.js +27 -0
- package/lib/collapse/style/index.js +3 -0
- package/lib/collapse/style/less.js +3 -0
- package/lib/collapse-item/CollapseItem.js +155 -0
- package/lib/collapse-item/CollapseItemSfc.css +0 -0
- package/lib/collapse-item/CollapseItemSfc.less +0 -0
- package/lib/collapse-item/collapseItem.css +1 -0
- package/lib/collapse-item/collapseItem.less +105 -0
- package/lib/collapse-item/index.js +17 -0
- package/lib/collapse-item/props.js +21 -0
- package/lib/collapse-item/provide.js +28 -0
- package/lib/collapse-item/style/index.js +4 -0
- package/lib/collapse-item/style/less.js +4 -0
- package/lib/context/index.js +20 -0
- package/lib/context/lock.js +107 -0
- package/lib/context/style/index.js +0 -0
- package/lib/context/style/less.js +0 -0
- package/lib/context/zIndex.js +25 -0
- package/lib/countdown/Countdown.js +119 -0
- package/lib/countdown/CountdownSfc.css +0 -0
- package/lib/countdown/CountdownSfc.less +0 -0
- package/lib/countdown/index.js +17 -0
- package/lib/countdown/props.js +25 -0
- package/lib/countdown/style/index.js +2 -0
- package/lib/countdown/style/less.js +2 -0
- package/lib/counter/Counter.js +387 -0
- package/lib/counter/CounterSfc.css +0 -0
- package/lib/counter/CounterSfc.less +0 -0
- package/lib/counter/counter.css +1 -0
- package/lib/counter/counter.less +85 -0
- package/lib/counter/index.js +17 -0
- package/lib/counter/props.js +98 -0
- package/lib/counter/provide.js +3 -0
- package/lib/counter/style/index.js +7 -0
- package/lib/counter/style/less.js +7 -0
- package/lib/date-picker/DatePicker.js +469 -0
- package/lib/date-picker/DatePickerSfc.css +0 -0
- package/lib/date-picker/DatePickerSfc.less +0 -0
- package/lib/date-picker/date-picker.css +1 -0
- package/lib/date-picker/date-picker.less +330 -0
- package/lib/date-picker/index.js +17 -0
- package/lib/date-picker/props.js +107 -0
- package/lib/date-picker/src/day-picker-panel.js +355 -0
- package/lib/date-picker/src/month-picker-panel.js +289 -0
- package/lib/date-picker/src/panel-header.js +152 -0
- package/lib/date-picker/src/year-picker-panel.js +112 -0
- package/lib/date-picker/style/index.js +5 -0
- package/lib/date-picker/style/less.js +5 -0
- package/lib/dialog/Dialog.js +214 -0
- package/lib/dialog/DialogSfc.css +0 -0
- package/lib/dialog/DialogSfc.less +0 -0
- package/lib/dialog/dialog.css +1 -0
- package/lib/dialog/dialog.less +77 -0
- package/lib/dialog/index.js +85 -0
- package/lib/dialog/props.js +73 -0
- package/lib/dialog/style/index.js +5 -0
- package/lib/dialog/style/less.js +5 -0
- package/lib/divider/Divider.js +88 -0
- package/lib/divider/DividerSfc.css +0 -0
- package/lib/divider/DividerSfc.less +0 -0
- package/lib/divider/divider.css +1 -0
- package/lib/divider/divider.less +79 -0
- package/lib/divider/index.js +17 -0
- package/lib/divider/props.js +25 -0
- package/lib/divider/style/index.js +3 -0
- package/lib/divider/style/less.js +3 -0
- package/lib/form/Form.js +77 -0
- package/lib/form/FormSfc.css +0 -0
- package/lib/form/FormSfc.less +0 -0
- package/lib/form/index.js +17 -0
- package/lib/form/props.js +15 -0
- package/lib/form/provide.js +33 -0
- package/lib/form/style/index.js +2 -0
- package/lib/form/style/less.js +2 -0
- package/lib/form-details/FormDetails.js +45 -0
- package/lib/form-details/FormDetailsSfc.css +0 -0
- package/lib/form-details/FormDetailsSfc.less +0 -0
- package/lib/form-details/formDetails.css +1 -0
- package/lib/form-details/formDetails.less +48 -0
- package/lib/form-details/index.js +17 -0
- package/lib/form-details/props.js +15 -0
- package/lib/form-details/style/index.js +3 -0
- package/lib/form-details/style/less.js +3 -0
- package/lib/icon/Icon.js +83 -0
- package/lib/icon/IconSfc.css +0 -0
- package/lib/icon/IconSfc.less +0 -0
- package/lib/icon/icon.css +1 -0
- package/lib/icon/icon.less +25 -0
- package/lib/icon/index.js +17 -0
- package/lib/icon/props.js +27 -0
- package/lib/icon/style/index.js +3 -0
- package/lib/icon/style/less.js +3 -0
- package/lib/image/Image.js +113 -0
- package/lib/image/ImageSfc.css +0 -0
- package/lib/image/ImageSfc.less +0 -0
- package/lib/image/image.css +1 -0
- package/lib/image/image.less +9 -0
- package/lib/image/index.js +17 -0
- package/lib/image/props.js +60 -0
- package/lib/image/style/index.js +4 -0
- package/lib/image/style/less.js +4 -0
- package/lib/image-preview/ImagePreview.js +369 -0
- package/lib/image-preview/ImagePreviewSfc.css +0 -0
- package/lib/image-preview/ImagePreviewSfc.less +0 -0
- package/lib/image-preview/imagePreview.css +1 -0
- package/lib/image-preview/imagePreview.less +66 -0
- package/lib/image-preview/index.js +74 -0
- package/lib/image-preview/props.js +40 -0
- package/lib/image-preview/style/index.js +7 -0
- package/lib/image-preview/style/less.js +7 -0
- package/lib/index-anchor/IndexAnchor.js +99 -0
- package/lib/index-anchor/IndexAnchorSfc.css +1 -0
- package/lib/index-anchor/IndexAnchorSfc.less +1 -0
- package/lib/index-anchor/index.js +17 -0
- package/lib/index-anchor/props.js +10 -0
- package/lib/index-anchor/provide.js +28 -0
- package/lib/index-anchor/style/index.js +3 -0
- package/lib/index-anchor/style/less.js +3 -0
- package/lib/index-bar/IndexBar.js +186 -0
- package/lib/index-bar/IndexBarSfc.css +0 -0
- package/lib/index-bar/IndexBarSfc.less +0 -0
- package/lib/index-bar/index.js +17 -0
- package/lib/index-bar/indexBar.css +1 -0
- package/lib/index-bar/indexBar.less +43 -0
- package/lib/index-bar/props.js +40 -0
- package/lib/index-bar/provide.js +27 -0
- package/lib/index-bar/style/index.js +3 -0
- package/lib/index-bar/style/less.js +3 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +195 -0
- package/lib/input/Input.js +327 -0
- package/lib/input/InputSfc.css +0 -0
- package/lib/input/InputSfc.less +0 -0
- package/lib/input/index.js +17 -0
- package/lib/input/input.css +1 -0
- package/lib/input/input.less +183 -0
- package/lib/input/props.js +96 -0
- package/lib/input/provide.js +3 -0
- package/lib/input/style/index.js +5 -0
- package/lib/input/style/less.js +5 -0
- package/lib/lazy/index.js +247 -0
- package/lib/lazy/style/index.js +0 -0
- package/lib/lazy/style/less.js +0 -0
- package/lib/less.js +62 -0
- package/lib/list/List.js +157 -0
- package/lib/list/ListSfc.css +0 -0
- package/lib/list/ListSfc.less +0 -0
- package/lib/list/index.js +17 -0
- package/lib/list/list.css +1 -0
- package/lib/list/list.less +63 -0
- package/lib/list/props.js +45 -0
- package/lib/list/style/index.js +5 -0
- package/lib/list/style/less.js +5 -0
- package/lib/loading/Loading.js +93 -0
- package/lib/loading/LoadingSfc.css +0 -0
- package/lib/loading/LoadingSfc.less +0 -0
- package/lib/loading/index.js +17 -0
- package/lib/loading/loading.css +1 -0
- package/lib/loading/loading.less +420 -0
- package/lib/loading/props.js +39 -0
- package/lib/loading/style/index.js +3 -0
- package/lib/loading/style/less.js +3 -0
- package/lib/locale/en-US.js +107 -0
- package/lib/locale/index.js +83 -0
- package/lib/locale/style/index.js +0 -0
- package/lib/locale/style/less.js +0 -0
- package/lib/locale/zh-CN.js +107 -0
- package/lib/menu/Menu.js +144 -0
- package/lib/menu/MenuSfc.css +0 -0
- package/lib/menu/MenuSfc.less +0 -0
- package/lib/menu/index.js +17 -0
- package/lib/menu/menu.css +1 -0
- package/lib/menu/menu.less +21 -0
- package/lib/menu/props.js +48 -0
- package/lib/menu/style/index.js +4 -0
- package/lib/menu/style/less.js +4 -0
- package/lib/option/Option.js +125 -0
- package/lib/option/OptionSfc.css +0 -0
- package/lib/option/OptionSfc.less +0 -0
- package/lib/option/index.js +17 -0
- package/lib/option/option.css +1 -0
- package/lib/option/option.less +37 -0
- package/lib/option/props.js +9 -0
- package/lib/option/provide.js +28 -0
- package/lib/option/style/index.js +6 -0
- package/lib/option/style/less.js +6 -0
- package/lib/pagination/Pagination.js +373 -0
- package/lib/pagination/PaginationSfc.css +0 -0
- package/lib/pagination/PaginationSfc.less +0 -0
- package/lib/pagination/index.js +17 -0
- package/lib/pagination/pagination.css +1 -0
- package/lib/pagination/pagination.less +178 -0
- package/lib/pagination/porps.js +48 -0
- package/lib/pagination/style/index.js +8 -0
- package/lib/pagination/style/less.js +8 -0
- package/lib/picker/Picker.js +446 -0
- package/lib/picker/PickerSfc.css +0 -0
- package/lib/picker/PickerSfc.less +0 -0
- package/lib/picker/index.js +98 -0
- package/lib/picker/picker.css +1 -0
- package/lib/picker/picker.less +103 -0
- package/lib/picker/props.js +68 -0
- package/lib/picker/style/index.js +5 -0
- package/lib/picker/style/less.js +5 -0
- package/lib/popup/Popup.js +141 -0
- package/lib/popup/index.js +17 -0
- package/lib/popup/popup.css +1 -0
- package/lib/popup/popup.less +125 -0
- package/lib/popup/props.js +67 -0
- package/lib/popup/style/index.js +2 -0
- package/lib/popup/style/less.js +2 -0
- package/lib/progress/Progress.js +154 -0
- package/lib/progress/ProgressSfc.css +0 -0
- package/lib/progress/ProgressSfc.less +0 -0
- package/lib/progress/index.js +17 -0
- package/lib/progress/progress.css +1 -0
- package/lib/progress/progress.less +98 -0
- package/lib/progress/props.js +61 -0
- package/lib/progress/style/index.js +3 -0
- package/lib/progress/style/less.js +3 -0
- package/lib/pull-refresh/PullRefresh.js +150 -0
- package/lib/pull-refresh/PullRefreshSfc.css +0 -0
- package/lib/pull-refresh/PullRefreshSfc.less +0 -0
- package/lib/pull-refresh/index.js +17 -0
- package/lib/pull-refresh/props.js +47 -0
- package/lib/pull-refresh/pullRefresh.css +1 -0
- package/lib/pull-refresh/pullRefresh.less +55 -0
- package/lib/pull-refresh/style/index.js +5 -0
- package/lib/pull-refresh/style/less.js +5 -0
- package/lib/radio/Radio.js +231 -0
- package/lib/radio/RadioSfc.css +0 -0
- package/lib/radio/RadioSfc.less +0 -0
- package/lib/radio/index.js +17 -0
- package/lib/radio/props.js +56 -0
- package/lib/radio/provide.js +23 -0
- package/lib/radio/radio.css +1 -0
- package/lib/radio/radio.less +78 -0
- package/lib/radio/style/index.js +6 -0
- package/lib/radio/style/less.js +6 -0
- package/lib/radio-group/RadioGroup.js +122 -0
- package/lib/radio-group/RadioGroupSfc.css +0 -0
- package/lib/radio-group/RadioGroupSfc.less +0 -0
- package/lib/radio-group/index.js +17 -0
- package/lib/radio-group/props.js +35 -0
- package/lib/radio-group/provide.js +27 -0
- package/lib/radio-group/radioGroup.css +1 -0
- package/lib/radio-group/radioGroup.less +12 -0
- package/lib/radio-group/style/index.js +4 -0
- package/lib/radio-group/style/less.js +4 -0
- package/lib/rate/Rate.js +235 -0
- package/lib/rate/RateSfc.css +0 -0
- package/lib/rate/RateSfc.less +0 -0
- package/lib/rate/index.js +17 -0
- package/lib/rate/props.js +69 -0
- package/lib/rate/provide.js +3 -0
- package/lib/rate/rate.css +1 -0
- package/lib/rate/rate.less +35 -0
- package/lib/rate/style/index.js +6 -0
- package/lib/rate/style/less.js +6 -0
- package/lib/ripple/index.js +187 -0
- package/lib/ripple/ripple.css +1 -0
- package/lib/ripple/ripple.less +17 -0
- package/lib/ripple/style/index.js +2 -0
- package/lib/ripple/style/less.js +2 -0
- package/lib/row/Row.js +102 -0
- package/lib/row/RowSfc.css +0 -0
- package/lib/row/RowSfc.less +0 -0
- package/lib/row/index.js +17 -0
- package/lib/row/props.js +33 -0
- package/lib/row/provide.js +27 -0
- package/lib/row/row.css +1 -0
- package/lib/row/row.less +4 -0
- package/lib/row/style/index.js +3 -0
- package/lib/row/style/less.js +3 -0
- package/lib/select/Select.js +492 -0
- package/lib/select/SelectSfc.css +0 -0
- package/lib/select/SelectSfc.less +0 -0
- package/lib/select/index.js +17 -0
- package/lib/select/props.js +93 -0
- package/lib/select/provide.js +27 -0
- package/lib/select/select.css +1 -0
- package/lib/select/select.less +181 -0
- package/lib/select/style/index.js +7 -0
- package/lib/select/style/less.js +7 -0
- package/lib/skeleton/Skeleton.js +134 -0
- package/lib/skeleton/SkeletonSfc.css +0 -0
- package/lib/skeleton/SkeletonSfc.less +0 -0
- package/lib/skeleton/index.js +17 -0
- package/lib/skeleton/props.js +44 -0
- package/lib/skeleton/skeleton.css +1 -0
- package/lib/skeleton/skeleton.less +138 -0
- package/lib/skeleton/style/index.js +3 -0
- package/lib/skeleton/style/less.js +3 -0
- package/lib/slider/Slider.js +386 -0
- package/lib/slider/SliderSfc.css +0 -0
- package/lib/slider/SliderSfc.less +0 -0
- package/lib/slider/index.js +17 -0
- package/lib/slider/props.js +77 -0
- package/lib/slider/provide.js +3 -0
- package/lib/slider/slider.css +1 -0
- package/lib/slider/slider.less +146 -0
- package/lib/slider/style/index.js +4 -0
- package/lib/slider/style/less.js +4 -0
- package/lib/snackbar/Snackbar.js +70 -0
- package/lib/snackbar/SnackbarSfc.css +0 -0
- package/lib/snackbar/SnackbarSfc.less +0 -0
- package/lib/snackbar/core.js +146 -0
- package/lib/snackbar/coreSfc.css +0 -0
- package/lib/snackbar/coreSfc.less +0 -0
- package/lib/snackbar/index.js +232 -0
- package/lib/snackbar/props.js +103 -0
- package/lib/snackbar/snackbar.css +1 -0
- package/lib/snackbar/snackbar.less +135 -0
- package/lib/snackbar/style/index.js +8 -0
- package/lib/snackbar/style/less.js +8 -0
- package/lib/space/Space.js +99 -0
- package/lib/space/index.js +17 -0
- package/lib/space/props.js +49 -0
- package/lib/space/space.css +1 -0
- package/lib/space/space.less +6 -0
- package/lib/space/style/index.js +2 -0
- package/lib/space/style/less.js +2 -0
- package/lib/step/Step.js +156 -0
- package/lib/step/StepSfc.css +0 -0
- package/lib/step/StepSfc.less +0 -0
- package/lib/step/index.js +17 -0
- package/lib/step/props.js +17 -0
- package/lib/step/provide.js +28 -0
- package/lib/step/step.css +1 -0
- package/lib/step/step.less +145 -0
- package/lib/step/style/index.js +4 -0
- package/lib/step/style/less.js +4 -0
- package/lib/steps/Steps.js +56 -0
- package/lib/steps/StepsSfc.css +1 -0
- package/lib/steps/StepsSfc.less +1 -0
- package/lib/steps/index.js +17 -0
- package/lib/steps/props.js +30 -0
- package/lib/steps/provide.js +27 -0
- package/lib/steps/style/index.js +2 -0
- package/lib/steps/style/less.js +2 -0
- package/lib/sticky/Sticky.js +145 -0
- package/lib/sticky/StickySfc.css +0 -0
- package/lib/sticky/StickySfc.less +0 -0
- package/lib/sticky/index.js +17 -0
- package/lib/sticky/props.js +26 -0
- package/lib/sticky/sticky.css +1 -0
- package/lib/sticky/sticky.less +8 -0
- package/lib/sticky/style/index.js +3 -0
- package/lib/sticky/style/less.js +3 -0
- package/lib/style-provider/StyleProvider.js +30 -0
- package/lib/style-provider/StyleProviderSfc.css +0 -0
- package/lib/style-provider/StyleProviderSfc.less +0 -0
- package/lib/style-provider/index.js +37 -0
- package/lib/style-provider/style/index.js +2 -0
- package/lib/style-provider/style/less.js +2 -0
- package/lib/style.css +1 -0
- package/lib/style.js +62 -0
- package/lib/styles/common.css +1 -0
- package/lib/styles/common.less +67 -0
- package/lib/styles/elevation.css +1 -0
- package/lib/styles/elevation.less +126 -0
- package/lib/styles/style/index.js +0 -0
- package/lib/styles/style/less.js +0 -0
- package/lib/styles/var.css +0 -0
- package/lib/styles/var.less +30 -0
- package/lib/swipe/Swipe.js +408 -0
- package/lib/swipe/SwipeSfc.css +0 -0
- package/lib/swipe/SwipeSfc.less +0 -0
- package/lib/swipe/index.js +17 -0
- package/lib/swipe/props.js +40 -0
- package/lib/swipe/provide.js +27 -0
- package/lib/swipe/style/index.js +3 -0
- package/lib/swipe/style/less.js +3 -0
- package/lib/swipe/swipe.css +1 -0
- package/lib/swipe/swipe.less +59 -0
- package/lib/swipe-item/SwipeItem.js +58 -0
- package/lib/swipe-item/SwipeItemSfc.css +0 -0
- package/lib/swipe-item/SwipeItemSfc.less +0 -0
- package/lib/swipe-item/index.js +17 -0
- package/lib/swipe-item/provide.js +28 -0
- package/lib/swipe-item/style/index.js +3 -0
- package/lib/swipe-item/style/less.js +3 -0
- package/lib/swipe-item/swipeItem.css +1 -0
- package/lib/swipe-item/swipeItem.less +5 -0
- package/lib/switch/Switch.js +185 -0
- package/lib/switch/SwitchSfc.css +0 -0
- package/lib/switch/SwitchSfc.less +0 -0
- package/lib/switch/index.js +17 -0
- package/lib/switch/props.js +57 -0
- package/lib/switch/provide.js +3 -0
- package/lib/switch/style/index.js +7 -0
- package/lib/switch/style/less.js +7 -0
- package/lib/switch/switch.css +1 -0
- package/lib/switch/switch.less +80 -0
- package/lib/tab/Tab.js +116 -0
- package/lib/tab/TabSfc.css +0 -0
- package/lib/tab/TabSfc.less +0 -0
- package/lib/tab/index.js +17 -0
- package/lib/tab/props.js +17 -0
- package/lib/tab/provide.js +28 -0
- package/lib/tab/style/index.js +4 -0
- package/lib/tab/style/less.js +4 -0
- package/lib/tab/tab.css +1 -0
- package/lib/tab/tab.less +46 -0
- package/lib/tab-item/TabItem.js +74 -0
- package/lib/tab-item/TabItemSfc.css +0 -0
- package/lib/tab-item/TabItemSfc.less +0 -0
- package/lib/tab-item/index.js +17 -0
- package/lib/tab-item/props.js +10 -0
- package/lib/tab-item/provide.js +28 -0
- package/lib/tab-item/style/index.js +4 -0
- package/lib/tab-item/style/less.js +4 -0
- package/lib/tab-item/tabItem.css +1 -0
- package/lib/tab-item/tabItem.less +6 -0
- package/lib/table/Table.js +53 -0
- package/lib/table/TableSfc.css +0 -0
- package/lib/table/TableSfc.less +0 -0
- package/lib/table/index.js +17 -0
- package/lib/table/style/index.js +4 -0
- package/lib/table/style/less.js +4 -0
- package/lib/table/table.css +1 -0
- package/lib/table/table.less +110 -0
- package/lib/tabs/Tabs.js +208 -0
- package/lib/tabs/TabsSfc.css +0 -0
- package/lib/tabs/TabsSfc.less +0 -0
- package/lib/tabs/index.js +17 -0
- package/lib/tabs/props.js +70 -0
- package/lib/tabs/provide.js +27 -0
- package/lib/tabs/style/index.js +5 -0
- package/lib/tabs/style/less.js +5 -0
- package/lib/tabs/tabs.css +1 -0
- package/lib/tabs/tabs.less +93 -0
- package/lib/tabs-items/TabsItems.js +107 -0
- package/lib/tabs-items/TabsItemsSfc.css +0 -0
- package/lib/tabs-items/TabsItemsSfc.less +0 -0
- package/lib/tabs-items/index.js +17 -0
- package/lib/tabs-items/props.js +22 -0
- package/lib/tabs-items/provide.js +27 -0
- package/lib/tabs-items/style/index.js +3 -0
- package/lib/tabs-items/style/less.js +3 -0
- package/lib/themes/dark/actionSheet.js +10 -0
- package/lib/themes/dark/badge.js +8 -0
- package/lib/themes/dark/button.js +8 -0
- package/lib/themes/dark/card.js +11 -0
- package/lib/themes/dark/cell.js +9 -0
- package/lib/themes/dark/checkbox.js +8 -0
- package/lib/themes/dark/chip.js +8 -0
- package/lib/themes/dark/collapse.js +10 -0
- package/lib/themes/dark/datePicker.js +10 -0
- package/lib/themes/dark/dialog.js +9 -0
- package/lib/themes/dark/divider.js +9 -0
- package/lib/themes/dark/index.js +75 -0
- package/lib/themes/dark/input.js +9 -0
- package/lib/themes/dark/pagination.js +12 -0
- package/lib/themes/dark/picker.js +10 -0
- package/lib/themes/dark/popup.js +8 -0
- package/lib/themes/dark/pullRefresh.js +8 -0
- package/lib/themes/dark/radio.js +8 -0
- package/lib/themes/dark/select.js +10 -0
- package/lib/themes/dark/skeleton.js +11 -0
- package/lib/themes/dark/steps.js +10 -0
- package/lib/themes/dark/switch.js +9 -0
- package/lib/themes/dark/tab-item.js +8 -0
- package/lib/themes/dark/tab.js +8 -0
- package/lib/themes/dark/table.js +12 -0
- package/lib/themes/dark/tabs.js +8 -0
- package/lib/themes/dark/timePicker.js +10 -0
- package/lib/themes/dark/uploader.js +12 -0
- package/lib/themes/style/index.js +0 -0
- package/lib/themes/style/less.js +0 -0
- package/lib/time-picker/TimePicker.js +413 -0
- package/lib/time-picker/TimePickerSfc.css +0 -0
- package/lib/time-picker/TimePickerSfc.less +0 -0
- package/lib/time-picker/clock.js +347 -0
- package/lib/time-picker/index.js +17 -0
- package/lib/time-picker/props.js +59 -0
- package/lib/time-picker/style/index.js +4 -0
- package/lib/time-picker/style/less.js +4 -0
- package/lib/time-picker/timePicker.css +1 -0
- package/lib/time-picker/timePicker.less +236 -0
- package/lib/time-picker/utils.js +148 -0
- package/lib/uploader/Uploader.js +433 -0
- package/lib/uploader/UploaderSfc.css +0 -0
- package/lib/uploader/UploaderSfc.less +0 -0
- package/lib/uploader/index.js +17 -0
- package/lib/uploader/props.js +74 -0
- package/lib/uploader/provide.js +3 -0
- package/lib/uploader/style/index.js +8 -0
- package/lib/uploader/style/less.js +8 -0
- package/lib/uploader/uploader.css +1 -0
- package/lib/uploader/uploader.less +219 -0
- package/lib/utils/components.js +285 -0
- package/lib/utils/elements.js +261 -0
- package/lib/utils/jest.js +252 -0
- package/lib/utils/shared.js +214 -0
- package/lib/utils/style/index.js +0 -0
- package/lib/utils/style/less.js +0 -0
- package/package.json +5 -3
- package/types/global.d.ts +1 -0
- package/types/index.d.ts +1 -0
- package/types/list.d.ts +21 -0
- package/umd/varlet.js +3 -2
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.props = void 0;
|
|
5
|
+
|
|
6
|
+
var _components = require("../utils/components");
|
|
7
|
+
|
|
8
|
+
var _props = require("../popup/props");
|
|
9
|
+
|
|
10
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
|
+
|
|
12
|
+
function messageAlignValidator(messageAlign) {
|
|
13
|
+
return ['left', 'center', 'right'].includes(messageAlign);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
var props = _extends({
|
|
17
|
+
show: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false
|
|
20
|
+
},
|
|
21
|
+
title: {
|
|
22
|
+
type: String
|
|
23
|
+
},
|
|
24
|
+
message: {
|
|
25
|
+
type: String
|
|
26
|
+
},
|
|
27
|
+
messageAlign: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: 'left',
|
|
30
|
+
validator: messageAlignValidator
|
|
31
|
+
},
|
|
32
|
+
confirmButton: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: true
|
|
35
|
+
},
|
|
36
|
+
cancelButton: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: true
|
|
39
|
+
},
|
|
40
|
+
confirmButtonText: {
|
|
41
|
+
type: String
|
|
42
|
+
},
|
|
43
|
+
cancelButtonText: {
|
|
44
|
+
type: String
|
|
45
|
+
},
|
|
46
|
+
confirmButtonTextColor: {
|
|
47
|
+
type: String
|
|
48
|
+
},
|
|
49
|
+
cancelButtonTextColor: {
|
|
50
|
+
type: String
|
|
51
|
+
},
|
|
52
|
+
confirmButtonColor: {
|
|
53
|
+
type: String
|
|
54
|
+
},
|
|
55
|
+
cancelButtonColor: {
|
|
56
|
+
type: String
|
|
57
|
+
},
|
|
58
|
+
onBeforeClose: {
|
|
59
|
+
type: Function
|
|
60
|
+
},
|
|
61
|
+
onConfirm: {
|
|
62
|
+
type: Function
|
|
63
|
+
},
|
|
64
|
+
onCancel: {
|
|
65
|
+
type: Function
|
|
66
|
+
},
|
|
67
|
+
'onUpdate:show': {
|
|
68
|
+
type: Function
|
|
69
|
+
}
|
|
70
|
+
}, (0, _components.pickProps)(_props.props, ['overlay', 'overlayClass', 'overlayStyle', 'lockScroll', 'closeOnClickOverlay', 'teleport', 'onOpen', 'onClose', 'onOpened', 'onClosed', 'onClickOverlay', // internal for function call closes the dialog
|
|
71
|
+
'onRouteChange']));
|
|
72
|
+
|
|
73
|
+
exports.props = props;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.render = render;
|
|
5
|
+
exports.default = void 0;
|
|
6
|
+
|
|
7
|
+
var _vue = require("vue");
|
|
8
|
+
|
|
9
|
+
var _elements = require("../utils/elements");
|
|
10
|
+
|
|
11
|
+
var _shared = require("../utils/shared");
|
|
12
|
+
|
|
13
|
+
var _props = require("./props");
|
|
14
|
+
|
|
15
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
16
|
+
|
|
17
|
+
var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
|
|
18
|
+
|
|
19
|
+
var _hoisted_1 = {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "var-divider__text"
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
function render(_ctx, _cache) {
|
|
25
|
+
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
26
|
+
class: (0, _vue.normalizeClass)(["var-divider var--box", [_ctx.vertical ? 'var-divider--vertical' : null, _ctx.withText ? 'var-divider--with-text' : null, _ctx.isInset ? 'var-divider--inset' : null, _ctx.dashed ? 'var-divider--dashed' : null]]),
|
|
27
|
+
style: (0, _vue.normalizeStyle)(_ctx.style)
|
|
28
|
+
}, [(0, _vue.renderSlot)(_ctx.$slots, "default", {}, () => [_ctx.description ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("span", _hoisted_1, (0, _vue.toDisplayString)(_ctx.description), 1
|
|
29
|
+
/* TEXT */
|
|
30
|
+
)) : (0, _vue.createCommentVNode)("v-if", true)])], 6
|
|
31
|
+
/* CLASS, STYLE */
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
var _default = (0, _vue.defineComponent)({
|
|
36
|
+
render,
|
|
37
|
+
name: 'VarDivider',
|
|
38
|
+
props: _props.props,
|
|
39
|
+
|
|
40
|
+
setup(props, {
|
|
41
|
+
slots
|
|
42
|
+
}) {
|
|
43
|
+
var state = (0, _vue.reactive)({
|
|
44
|
+
withText: false
|
|
45
|
+
});
|
|
46
|
+
var isInset = (0, _vue.computed)(() => (0, _shared.isBool)(props.inset) ? props.inset : true);
|
|
47
|
+
var style = (0, _vue.computed)(() => {
|
|
48
|
+
var {
|
|
49
|
+
inset,
|
|
50
|
+
vertical,
|
|
51
|
+
margin
|
|
52
|
+
} = props;
|
|
53
|
+
var baseStyle = {
|
|
54
|
+
margin
|
|
55
|
+
};
|
|
56
|
+
if ((0, _shared.isBool)(inset) || inset === 0) return _extends({}, baseStyle); // -18px -> -18
|
|
57
|
+
|
|
58
|
+
var _inset = (0, _shared.toNumber)(inset); // -18px -> 18px
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
var absInsetWithUnit = Math.abs(_inset) + (inset + '').replace(_inset + '', '');
|
|
62
|
+
return vertical ? _extends({}, baseStyle, {
|
|
63
|
+
height: "calc(80% - " + (0, _elements.toSizeUnit)(absInsetWithUnit) + ")"
|
|
64
|
+
}) : _extends({}, baseStyle, {
|
|
65
|
+
width: "calc(100% - " + (0, _elements.toSizeUnit)(absInsetWithUnit) + ")",
|
|
66
|
+
left: _inset > 0 ? (0, _elements.toSizeUnit)(absInsetWithUnit) : (0, _elements.toSizeUnit)(0)
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
var checkHasText = () => {
|
|
71
|
+
state.withText = Boolean(slots.default == null ? void 0 : slots.default().length) || Boolean(props.description);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
(0, _vue.onMounted)(() => {
|
|
75
|
+
checkHasText();
|
|
76
|
+
});
|
|
77
|
+
(0, _vue.onUpdated)(() => {
|
|
78
|
+
checkHasText();
|
|
79
|
+
});
|
|
80
|
+
return _extends({}, (0, _vue.toRefs)(state), {
|
|
81
|
+
style,
|
|
82
|
+
isInset
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
exports.default = _default;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root { --divider-color: rgba(0, 0, 0, 0.12); --divider-text-color: #888; --divider-text-margin: 8px 0; --divider-text-padding: 0 8px; --divider-inset: 72px; --divider-vertical-inset: 8px;}.var-divider { position: relative; width: 100%; height: 0; border: none; border-top: 1px solid var(--divider-color); margin: var(--divider-text-margin); font-size: var(--font-size-md); color: var(--divider-text-color);}.var-divider--vertical { width: 0; height: 80%; margin: auto var(--divider-text-margin); padding: var(--divider-text-margin); border-top: none; border-left: 1px solid var(--divider-color); transform: translateY(-10%);}.var-divider--inset { width: calc(100% - var(--divider-inset)); left: var(--divider-inset);}.var-divider--vertical.var-divider--inset { width: 0; left: unset; height: calc(80% - var(--divider-vertical-inset));}.var-divider__text { display: inline-block; padding: var(--divider-text-padding);}.var-divider--with-text { background-color: transparent; height: fit-content; display: flex; align-items: center; justify-content: center; border: none;}.var-divider--with-text::before,.var-divider--with-text::after { display: inline-block; content: ''; flex: 1; height: 0; border-top: 1px solid var(--divider-color);}.var-divider--dashed { border-top-style: dashed;}.var-divider--dashed.var-divider--vertical { border-top: none; border-left-style: dashed;}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
@divider-color: rgba(0, 0, 0, 0.12);
|
|
2
|
+
@divider-text-color: #888;
|
|
3
|
+
@divider-text-margin: 8px 0;
|
|
4
|
+
@divider-text-padding: 0 8px;
|
|
5
|
+
@divider-inset: 72px;
|
|
6
|
+
@divider-vertical-inset: 8px;
|
|
7
|
+
|
|
8
|
+
:root {
|
|
9
|
+
--divider-color: @divider-color;
|
|
10
|
+
--divider-text-color: @divider-text-color;
|
|
11
|
+
--divider-text-margin: @divider-text-margin;
|
|
12
|
+
--divider-text-padding: @divider-text-padding;
|
|
13
|
+
--divider-inset: @divider-inset;
|
|
14
|
+
--divider-vertical-inset: @divider-vertical-inset;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.var-divider {
|
|
18
|
+
position: relative;
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 0;
|
|
21
|
+
border: none;
|
|
22
|
+
border-top: 1px solid var(--divider-color);
|
|
23
|
+
margin: var(--divider-text-margin);
|
|
24
|
+
font-size: var(--font-size-md);
|
|
25
|
+
color: var(--divider-text-color);
|
|
26
|
+
|
|
27
|
+
&--vertical {
|
|
28
|
+
width: 0;
|
|
29
|
+
height: 80%;
|
|
30
|
+
margin: auto var(--divider-text-margin);
|
|
31
|
+
padding: var(--divider-text-margin);
|
|
32
|
+
border-top: none;
|
|
33
|
+
border-left: 1px solid var(--divider-color);
|
|
34
|
+
transform: translateY(-10%);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&--inset {
|
|
38
|
+
width: calc(100% - var(--divider-inset));
|
|
39
|
+
left: var(--divider-inset);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&--vertical&--inset {
|
|
43
|
+
width: 0;
|
|
44
|
+
left: unset;
|
|
45
|
+
height: calc(80% - var(--divider-vertical-inset));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&__text {
|
|
49
|
+
display: inline-block;
|
|
50
|
+
padding: var(--divider-text-padding);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&--with-text {
|
|
54
|
+
background-color: transparent;
|
|
55
|
+
height: fit-content;
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
border: none;
|
|
60
|
+
|
|
61
|
+
&::before,
|
|
62
|
+
&::after {
|
|
63
|
+
display: inline-block;
|
|
64
|
+
content: '';
|
|
65
|
+
flex: 1;
|
|
66
|
+
height: 0;
|
|
67
|
+
border-top: 1px solid var(--divider-color);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&--dashed {
|
|
72
|
+
border-top-style: dashed;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&--dashed&--vertical {
|
|
76
|
+
border-top: none;
|
|
77
|
+
border-left-style: dashed;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = exports._DividerComponent = void 0;
|
|
5
|
+
|
|
6
|
+
var _Divider = _interopRequireDefault(require("./Divider.js"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
|
|
10
|
+
_Divider.default.install = function (app) {
|
|
11
|
+
app.component(_Divider.default.name, _Divider.default);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
var _DividerComponent = _Divider.default;
|
|
15
|
+
exports._DividerComponent = _DividerComponent;
|
|
16
|
+
var _default = _Divider.default;
|
|
17
|
+
exports.default = _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.props = void 0;
|
|
5
|
+
var props = {
|
|
6
|
+
inset: {
|
|
7
|
+
type: [Boolean, Number, String],
|
|
8
|
+
default: false
|
|
9
|
+
},
|
|
10
|
+
vertical: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: false
|
|
13
|
+
},
|
|
14
|
+
description: {
|
|
15
|
+
type: String
|
|
16
|
+
},
|
|
17
|
+
margin: {
|
|
18
|
+
type: String
|
|
19
|
+
},
|
|
20
|
+
dashed: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.props = props;
|
package/lib/form/Form.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.render = render;
|
|
5
|
+
exports.default = void 0;
|
|
6
|
+
|
|
7
|
+
var _vue = require("vue");
|
|
8
|
+
|
|
9
|
+
var _props = require("./props");
|
|
10
|
+
|
|
11
|
+
var _provide = require("./provide");
|
|
12
|
+
|
|
13
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
14
|
+
|
|
15
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
16
|
+
|
|
17
|
+
var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
|
|
18
|
+
|
|
19
|
+
var _hoisted_1 = {
|
|
20
|
+
class: "var-form"
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
function render(_ctx, _cache) {
|
|
24
|
+
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_1, [(0, _vue.renderSlot)(_ctx.$slots, "default")]);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var _default = (0, _vue.defineComponent)({
|
|
28
|
+
render,
|
|
29
|
+
name: 'VarForm',
|
|
30
|
+
props: _props.props,
|
|
31
|
+
|
|
32
|
+
setup(props) {
|
|
33
|
+
var disabled = (0, _vue.computed)(() => props.disabled);
|
|
34
|
+
var readonly = (0, _vue.computed)(() => props.readonly);
|
|
35
|
+
var {
|
|
36
|
+
formItems,
|
|
37
|
+
bindFormItems
|
|
38
|
+
} = (0, _provide.useFormItems)(); // expose
|
|
39
|
+
|
|
40
|
+
var validate = /*#__PURE__*/function () {
|
|
41
|
+
var _ref = _asyncToGenerator(function* () {
|
|
42
|
+
var res = yield Promise.all(formItems.map(({
|
|
43
|
+
validate
|
|
44
|
+
}) => validate()));
|
|
45
|
+
return res.every(r => r === true);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
return function validate() {
|
|
49
|
+
return _ref.apply(this, arguments);
|
|
50
|
+
};
|
|
51
|
+
}(); // expose
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
var reset = () => formItems.forEach(({
|
|
55
|
+
reset
|
|
56
|
+
}) => reset()); // expose
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
var resetValidation = () => formItems.forEach(({
|
|
60
|
+
resetValidation
|
|
61
|
+
}) => resetValidation());
|
|
62
|
+
|
|
63
|
+
var formProvider = {
|
|
64
|
+
disabled,
|
|
65
|
+
readonly
|
|
66
|
+
};
|
|
67
|
+
bindFormItems(formProvider);
|
|
68
|
+
return {
|
|
69
|
+
validate,
|
|
70
|
+
reset,
|
|
71
|
+
resetValidation
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
exports.default = _default;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = exports._FormComponent = void 0;
|
|
5
|
+
|
|
6
|
+
var _Form = _interopRequireDefault(require("./Form.js"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
|
|
10
|
+
_Form.default.install = function (app) {
|
|
11
|
+
app.component(_Form.default.name, _Form.default);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
var _FormComponent = _Form.default;
|
|
15
|
+
exports._FormComponent = _FormComponent;
|
|
16
|
+
var _default = _Form.default;
|
|
17
|
+
exports.default = _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.useForm = useForm;
|
|
5
|
+
exports.useFormItems = useFormItems;
|
|
6
|
+
exports.FORM_BIND_FORM_ITEM_KEY = void 0;
|
|
7
|
+
|
|
8
|
+
var _components = require("../utils/components");
|
|
9
|
+
|
|
10
|
+
var FORM_BIND_FORM_ITEM_KEY = Symbol('FORM_BIND_FORM_ITEM_KEY');
|
|
11
|
+
exports.FORM_BIND_FORM_ITEM_KEY = FORM_BIND_FORM_ITEM_KEY;
|
|
12
|
+
|
|
13
|
+
function useForm() {
|
|
14
|
+
var {
|
|
15
|
+
bindParent,
|
|
16
|
+
parentProvider
|
|
17
|
+
} = (0, _components.useParent)(FORM_BIND_FORM_ITEM_KEY);
|
|
18
|
+
return {
|
|
19
|
+
bindForm: bindParent,
|
|
20
|
+
form: parentProvider
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function useFormItems() {
|
|
25
|
+
var {
|
|
26
|
+
bindChildren,
|
|
27
|
+
childProviders
|
|
28
|
+
} = (0, _components.useChildren)(FORM_BIND_FORM_ITEM_KEY);
|
|
29
|
+
return {
|
|
30
|
+
formItems: childProviders,
|
|
31
|
+
bindFormItems: bindChildren
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.render = render;
|
|
5
|
+
exports.default = void 0;
|
|
6
|
+
|
|
7
|
+
var _vue = require("vue");
|
|
8
|
+
|
|
9
|
+
var _props = require("./props");
|
|
10
|
+
|
|
11
|
+
var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
|
|
12
|
+
|
|
13
|
+
var _hoisted_1 = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "var-form-details"
|
|
16
|
+
};
|
|
17
|
+
var _hoisted_2 = {
|
|
18
|
+
class: "var-form-details__message"
|
|
19
|
+
};
|
|
20
|
+
var _hoisted_3 = {
|
|
21
|
+
class: "var-form-details__length"
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
function render(_ctx, _cache) {
|
|
25
|
+
return (0, _vue.openBlock)(), (0, _vue.createBlock)(_vue.Transition, {
|
|
26
|
+
name: "var-form-details"
|
|
27
|
+
}, {
|
|
28
|
+
default: (0, _vue.withCtx)(() => [_ctx.errorMessage || _ctx.maxlengthText ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_1, [(0, _vue.createElementVNode)("div", _hoisted_2, (0, _vue.toDisplayString)(_ctx.errorMessage), 1
|
|
29
|
+
/* TEXT */
|
|
30
|
+
), (0, _vue.createElementVNode)("div", _hoisted_3, (0, _vue.toDisplayString)(_ctx.maxlengthText), 1
|
|
31
|
+
/* TEXT */
|
|
32
|
+
)])) : (0, _vue.createCommentVNode)("v-if", true)]),
|
|
33
|
+
_: 1
|
|
34
|
+
/* STABLE */
|
|
35
|
+
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
var _default = (0, _vue.defineComponent)({
|
|
40
|
+
render,
|
|
41
|
+
name: 'VarFormDetails',
|
|
42
|
+
props: _props.props
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
exports.default = _default;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root { --form-details-error-color: var(--color-danger); --form-details-length-color: #888; --form-details-margin-top: 6px; --form-details-font-size: 12px; --form-details-message-margin-right: 4px;}.var-form-details-enter-from,.var-form-details-leave-to { opacity: 0; margin-top: 2px !important;}.var-form-details-enter-active,.var-form-details-leave-active { transition: 0.2s all var(--cubic-bezier);}.var-form-details { display: flex; justify-content: space-between; font-size: var(--form-details-font-size); margin-top: var(--form-details-margin-top);}.var-form-details__message { flex-grow: 1; color: var(--form-details-error-color); margin-right: var(--form-details-message-margin-right); user-select: none; text-align: left;}.var-form-details__length { flex-shrink: 0; color: var(--form-details-length-color); user-select: none; text-align: right;}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@form-details-error-color: var(--color-danger);
|
|
2
|
+
@form-details-length-color: #888;
|
|
3
|
+
@form-details-margin-top: 6px;
|
|
4
|
+
@form-details-font-size: 12px;
|
|
5
|
+
@form-details-message-margin-right: 4px;
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
--form-details-error-color: @form-details-error-color;
|
|
9
|
+
--form-details-length-color: @form-details-length-color;
|
|
10
|
+
--form-details-margin-top: @form-details-margin-top;
|
|
11
|
+
--form-details-font-size: @form-details-font-size;
|
|
12
|
+
--form-details-message-margin-right: @form-details-message-margin-right;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.var {
|
|
16
|
+
&-form-details-enter-from,
|
|
17
|
+
&-form-details-leave-to {
|
|
18
|
+
opacity: 0;
|
|
19
|
+
margin-top: 2px !important;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&-form-details-enter-active,
|
|
23
|
+
&-form-details-leave-active {
|
|
24
|
+
transition: 0.2s all var(--cubic-bezier);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.var-form-details {
|
|
29
|
+
display: flex;
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
font-size: var(--form-details-font-size);
|
|
32
|
+
margin-top: var(--form-details-margin-top);
|
|
33
|
+
|
|
34
|
+
&__message {
|
|
35
|
+
flex-grow: 1;
|
|
36
|
+
color: var(--form-details-error-color);
|
|
37
|
+
margin-right: var(--form-details-message-margin-right);
|
|
38
|
+
user-select: none;
|
|
39
|
+
text-align: left;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&__length {
|
|
43
|
+
flex-shrink: 0;
|
|
44
|
+
color: var(--form-details-length-color);
|
|
45
|
+
user-select: none;
|
|
46
|
+
text-align: right;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = exports._FormDetailsComponent = void 0;
|
|
5
|
+
|
|
6
|
+
var _FormDetails = _interopRequireDefault(require("./FormDetails.js"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
|
|
10
|
+
_FormDetails.default.install = function (app) {
|
|
11
|
+
app.component(_FormDetails.default.name, _FormDetails.default);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
var _FormDetailsComponent = _FormDetails.default;
|
|
15
|
+
exports._FormDetailsComponent = _FormDetailsComponent;
|
|
16
|
+
var _default = _FormDetails.default;
|
|
17
|
+
exports.default = _default;
|