@king-design/vue 2.1.2 → 2.1.4
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/components/affix/index.d.ts +2 -2
- package/components/affix/index.js +0 -5
- package/components/affix/index.spec.js +84 -108
- package/components/affix/index.vdt.js +5 -8
- package/components/affix/useStyle.js +8 -19
- package/components/badge/index.js +0 -2
- package/components/badge/index.vdt.js +5 -9
- package/components/badge/styles.js +0 -2
- package/components/breadcrumb/index.js +0 -4
- package/components/breadcrumb/index.spec.js +6 -6
- package/components/breadcrumb/index.vdt.js +5 -14
- package/components/breadcrumb/item.js +0 -8
- package/components/breadcrumb/item.vdt.js +3 -6
- package/components/breadcrumb/styles.js +0 -3
- package/components/button/dynamicButton.d.ts +1 -1
- package/components/button/dynamicButton.js +2 -5
- package/components/button/group.js +2 -10
- package/components/button/group.vdt.js +4 -7
- package/components/button/index.js +3 -27
- package/components/button/index.spec.js +74 -96
- package/components/button/index.vdt.js +19 -29
- package/components/button/styles.d.ts +2 -2
- package/components/button/styles.js +4 -48
- package/components/card/column.js +0 -2
- package/components/card/column.vdt.js +5 -10
- package/components/card/index.js +0 -4
- package/components/card/index.vdt.js +4 -16
- package/components/carousel/index.js +1 -19
- package/components/carousel/index.spec.js +127 -163
- package/components/carousel/index.vdt.js +12 -15
- package/components/carousel/item.js +0 -2
- package/components/carousel/item.vdt.js +4 -7
- package/components/carousel/styles.js +0 -1
- package/components/carousel/useAutoplay.js +0 -4
- package/components/carousel/useItems.js +4 -20
- package/components/carousel/useSlide.js +57 -89
- package/components/cascader/index.js +3 -18
- package/components/cascader/index.spec.js +365 -379
- package/components/cascader/index.vdt.js +14 -31
- package/components/cascader/styles.js +0 -6
- package/components/cascader/useFields.js +1 -4
- package/components/cascader/useFilterable.js +2 -19
- package/components/cascader/useLabel.js +1 -9
- package/components/cascader/useLoad.js +22 -35
- package/components/cascader/useValue.d.ts +2 -2
- package/components/cascader/useValue.js +6 -27
- package/components/checkbox/index.js +5 -27
- package/components/checkbox/index.spec.js +129 -171
- package/components/checkbox/index.vdt.js +12 -16
- package/components/checkbox/styles.js +0 -10
- package/components/code/crossDomain.js +2 -9
- package/components/code/index.js +0 -9
- package/components/code/index.spec.js +46 -55
- package/components/code/index.vdt.js +6 -14
- package/components/code/styles.js +0 -1
- package/components/code/useEditor.js +5 -10
- package/components/collapse/index.d.ts +1 -1
- package/components/collapse/index.js +3 -14
- package/components/collapse/index.spec.js +47 -60
- package/components/collapse/index.vdt.js +4 -12
- package/components/collapse/item.js +0 -10
- package/components/collapse/item.vdt.js +7 -14
- package/components/collapse/styles.js +0 -1
- package/components/colorpicker/drag.js +0 -5
- package/components/colorpicker/index.js +0 -4
- package/components/colorpicker/index.spec.js +211 -259
- package/components/colorpicker/index.vdt.js +8 -11
- package/components/colorpicker/panel.js +0 -5
- package/components/colorpicker/panel.vdt.js +21 -26
- package/components/colorpicker/styles.js +2 -13
- package/components/colorpicker/useDrag.js +22 -26
- package/components/colorpicker/useInput.js +0 -16
- package/components/colorpicker/usePointer.js +15 -18
- package/components/colorpicker/useValue.js +2 -7
- package/components/context.d.ts +2 -2
- package/components/context.js +2 -19
- package/components/datepicker/basepicker.d.ts +8 -8
- package/components/datepicker/basepicker.js +20 -90
- package/components/datepicker/calendar.js +0 -11
- package/components/datepicker/calendar.vdt.js +11 -14
- package/components/datepicker/constants.js +0 -1
- package/components/datepicker/dayjs.js +1 -1
- package/components/datepicker/helpers.js +3 -15
- package/components/datepicker/index.js +6 -32
- package/components/datepicker/index.spec.js +1141 -1448
- package/components/datepicker/index.vdt.js +20 -34
- package/components/datepicker/shortcuts.d.ts +1 -1
- package/components/datepicker/shortcuts.js +0 -4
- package/components/datepicker/styles.js +0 -8
- package/components/datepicker/time.d.ts +1 -1
- package/components/datepicker/time.js +3 -23
- package/components/datepicker/time.vdt.js +4 -5
- package/components/datepicker/useDays.js +2 -9
- package/components/datepicker/useDisabled.js +6 -23
- package/components/datepicker/useFocusDate.js +0 -2
- package/components/datepicker/useFormats.js +6 -15
- package/components/datepicker/useKeyboards.js +20 -36
- package/components/datepicker/useMonths.js +0 -6
- package/components/datepicker/usePanel.js +0 -10
- package/components/datepicker/useShowDate.js +10 -37
- package/components/datepicker/useStatus.js +3 -15
- package/components/datepicker/useValue.js +22 -35
- package/components/datepicker/useYears.js +4 -15
- package/components/diagram/diagram.js +17 -43
- package/components/diagram/diagram.vdt.js +2 -5
- package/components/diagram/graph.js +6 -6
- package/components/diagram/index.d.ts +1 -1
- package/components/diagram/index.js +7 -7
- package/components/diagram/index.spec.js +369 -495
- package/components/diagram/layouts/circle.js +6 -14
- package/components/diagram/layouts/flow.js +7 -15
- package/components/diagram/layouts/layout.js +6 -28
- package/components/diagram/layouts/organic.js +3 -11
- package/components/diagram/layouts/partition.js +4 -12
- package/components/diagram/layouts/radial.js +6 -18
- package/components/diagram/layouts/stack.js +6 -14
- package/components/diagram/layouts/tree.js +11 -21
- package/components/diagram/mxgraph/handler/mxConnectionHandler.js +15 -22
- package/components/diagram/mxgraph/handler/mxConstraintHandler.js +4 -4
- package/components/diagram/mxgraph/handler/mxEdgeHandler.js +11 -15
- package/components/diagram/mxgraph/handler/mxGraphHandler.js +6 -9
- package/components/diagram/mxgraph/handler/mxRubberband.js +4 -4
- package/components/diagram/mxgraph/handler/mxVertexHandler.js +7 -10
- package/components/diagram/mxgraph/index.js +0 -2
- package/components/diagram/mxgraph/mx.js +3 -3
- package/components/diagram/mxgraph/shape/mxCloud.js +2 -2
- package/components/diagram/mxgraph/shape/mxCylinder.js +4 -9
- package/components/diagram/mxgraph/shape/mxEllipse.js +2 -2
- package/components/diagram/mxgraph/shape/mxHexagon.js +2 -2
- package/components/diagram/mxgraph/shape/mxLine.js +2 -2
- package/components/diagram/mxgraph/shape/mxRectangleShape.js +2 -2
- package/components/diagram/mxgraph/shape/mxRhombus.js +6 -12
- package/components/diagram/mxgraph/shape/mxShape.js +0 -1
- package/components/diagram/mxgraph/shape/mxTriangle.js +2 -2
- package/components/diagram/mxgraph/util/mxConstants.js +2 -2
- package/components/diagram/mxgraph/util/mxGuide.js +5 -7
- package/components/diagram/mxgraph/view/mxCellEditor.js +16 -29
- package/components/diagram/mxgraph/view/mxCellRenderer.js +0 -2
- package/components/diagram/mxgraph/view/mxGraph.js +14 -32
- package/components/diagram/shapes/base.d.ts +1 -1
- package/components/diagram/shapes/base.js +9 -39
- package/components/diagram/shapes/callout.js +10 -23
- package/components/diagram/shapes/circle.js +3 -10
- package/components/diagram/shapes/document.js +5 -16
- package/components/diagram/shapes/ellipse.js +0 -5
- package/components/diagram/shapes/generateShapes.d.ts +1 -1
- package/components/diagram/shapes/generateShapes.js +0 -9
- package/components/diagram/shapes/hexagon.js +9 -26
- package/components/diagram/shapes/image.js +1 -9
- package/components/diagram/shapes/line.d.ts +2 -2
- package/components/diagram/shapes/line.js +13 -48
- package/components/diagram/shapes/parallelogram.js +9 -26
- package/components/diagram/shapes/rectangle.js +1 -9
- package/components/diagram/shapes/shape.js +6 -35
- package/components/diagram/shapes/square.js +3 -11
- package/components/diagram/shapes/text.js +0 -5
- package/components/diagram/styles.js +0 -1
- package/components/dialog/alert.vdt.js +9 -19
- package/components/dialog/base.js +1 -29
- package/components/dialog/base.vdt.js +14 -29
- package/components/dialog/index.js +6 -31
- package/components/dialog/index.spec.js +416 -503
- package/components/dialog/staticMethods.d.ts +1 -1
- package/components/dialog/staticMethods.js +2 -13
- package/components/dialog/styles.js +0 -11
- package/components/dialog/useDraggable.js +0 -6
- package/components/dialog/useEscClosable.js +4 -12
- package/components/dialog/useFixBody.d.ts +1 -1
- package/components/dialog/useFixBody.js +0 -11
- package/components/dialog/usePosition.js +7 -5
- package/components/drawer/index.js +0 -5
- package/components/drawer/index.spec.js +126 -168
- package/components/drawer/index.vdt.js +3 -9
- package/components/drawer/styles.d.ts +2 -2
- package/components/drawer/styles.js +0 -4
- package/components/dropdown/dropdown.d.ts +2 -2
- package/components/dropdown/dropdown.js +33 -89
- package/components/dropdown/index.js +2 -6
- package/components/dropdown/index.spec.js +388 -496
- package/components/dropdown/item.js +4 -25
- package/components/dropdown/item.vdt.js +5 -8
- package/components/dropdown/menu.js +14 -29
- package/components/dropdown/menu.vdt.js +5 -13
- package/components/dropdown/styles.js +0 -9
- package/components/dropdown/useKeyboard.d.ts +2 -2
- package/components/dropdown/useKeyboard.js +8 -30
- package/components/dropdown/usePosition.d.ts +2 -1
- package/components/dropdown/usePosition.js +33 -28
- package/components/dropdown/useTransition.js +0 -8
- package/components/editable/index.d.ts +1 -1
- package/components/editable/index.js +4 -28
- package/components/editable/index.spec.js +152 -189
- package/components/editable/index.vdt.js +8 -11
- package/components/editable/styles.js +0 -1
- package/components/form/form.js +0 -18
- package/components/form/form.vdt.js +4 -7
- package/components/form/index.spec.js +1057 -1280
- package/components/form/item.d.ts +1 -1
- package/components/form/item.js +0 -12
- package/components/form/item.vdt.js +17 -31
- package/components/form/methods.d.ts +5 -5
- package/components/form/methods.js +2 -12
- package/components/form/styles.js +0 -8
- package/components/form/useDirty.js +2 -7
- package/components/form/useError.js +2 -10
- package/components/form/useValidate.d.ts +1 -1
- package/components/form/useValidate.js +8 -24
- package/components/grid/col.d.ts +3 -3
- package/components/grid/col.js +0 -7
- package/components/grid/col.vdt.js +8 -13
- package/components/grid/constants.d.ts +6 -6
- package/components/grid/row.js +0 -5
- package/components/grid/row.vdt.js +5 -8
- package/components/grid/styles.js +0 -7
- package/components/grid/useBreakpoints.js +0 -5
- package/components/grid/useGutter.js +5 -25
- package/components/icon/index.js +0 -10
- package/components/icon/index.vdt.js +7 -13
- package/components/icon/styles.js +0 -1
- package/components/input/index.d.ts +3 -3
- package/components/input/index.js +0 -14
- package/components/input/index.spec.js +185 -239
- package/components/input/index.vdt.js +39 -49
- package/components/input/search.js +0 -20
- package/components/input/search.vdt.js +6 -9
- package/components/input/styles.js +0 -26
- package/components/input/useAutoRows.js +6 -18
- package/components/input/useAutoWidth.js +0 -5
- package/components/input/useFrozen.js +0 -6
- package/components/input/useShowPassword.js +2 -5
- package/components/layout/aside.js +5 -17
- package/components/layout/aside.vdt.js +5 -9
- package/components/layout/body.js +5 -17
- package/components/layout/footer.js +1 -7
- package/components/layout/header.js +7 -21
- package/components/layout/layout.js +9 -24
- package/components/layout/styles.js +2 -13
- package/components/layout/template.vdt.js +2 -4
- package/components/layout/useParse.js +0 -7
- package/components/menu/index.spec.js +189 -242
- package/components/menu/item.js +3 -16
- package/components/menu/item.vdt.js +20 -32
- package/components/menu/menu.js +2 -11
- package/components/menu/menu.vdt.js +6 -12
- package/components/menu/styles.js +0 -18
- package/components/menu/useDropdown.js +4 -9
- package/components/menu/useExpanded.js +0 -14
- package/components/menu/useHighlight.js +26 -36
- package/components/message/index.spec.js +58 -73
- package/components/message/message.js +0 -19
- package/components/message/message.vdt.js +5 -8
- package/components/message/messages.js +0 -12
- package/components/message/messages.vdt.js +0 -1
- package/components/message/styles.js +0 -9
- package/components/pagination/index.d.ts +1 -1
- package/components/pagination/index.js +10 -46
- package/components/pagination/index.spec.js +133 -173
- package/components/pagination/index.vdt.js +14 -34
- package/components/pagination/styles.js +0 -4
- package/components/portal.d.ts +1 -1
- package/components/portal.js +13 -28
- package/components/position.d.ts +12 -12
- package/components/position.js +32 -88
- package/components/progress/index.d.ts +6 -6
- package/components/progress/index.js +0 -12
- package/components/progress/index.spec.js +143 -191
- package/components/progress/index.vdt.js +8 -11
- package/components/progress/styles.js +0 -6
- package/components/progress/useColor.js +2 -7
- package/components/progress/useStatus.d.ts +1 -1
- package/components/progress/useStatus.js +2 -5
- package/components/radio/index.js +3 -18
- package/components/radio/index.spec.js +111 -149
- package/components/radio/index.vdt.js +14 -17
- package/components/radio/styles.js +0 -10
- package/components/rate/index.js +0 -7
- package/components/rate/index.spec.js +64 -79
- package/components/rate/index.vdt.js +8 -21
- package/components/rate/styles.js +0 -3
- package/components/rate/useActiveValue.js +2 -7
- package/components/scrollSelect/index.d.ts +2 -2
- package/components/scrollSelect/index.js +0 -7
- package/components/scrollSelect/index.spec.js +100 -131
- package/components/scrollSelect/index.vdt.js +6 -11
- package/components/scrollSelect/styles.js +0 -7
- package/components/scrollSelect/useList.js +3 -17
- package/components/scrollSelect/useMouseEvents.js +31 -49
- package/components/scrollSelect/useTranslate.js +1 -11
- package/components/select/base.js +5 -35
- package/components/select/base.vdt.js +23 -38
- package/components/select/group.js +0 -5
- package/components/select/group.vdt.js +4 -10
- package/components/select/index.spec.js +361 -452
- package/components/select/menu.js +0 -5
- package/components/select/menu.vdt.js +18 -33
- package/components/select/option.js +2 -16
- package/components/select/option.vdt.js +7 -14
- package/components/select/select.js +3 -20
- package/components/select/select.vdt.js +9 -17
- package/components/select/styles.js +0 -33
- package/components/select/useBaseLabel.d.ts +1 -1
- package/components/select/useBaseLabel.js +4 -17
- package/components/select/useCard.js +0 -4
- package/components/select/useEqualWidth.js +0 -1
- package/components/select/useFilterable.js +5 -27
- package/components/select/useFocusout.d.ts +1 -1
- package/components/select/useFocusout.js +1 -9
- package/components/select/useInput.js +6 -10
- package/components/select/useLabel.js +3 -13
- package/components/select/useSearchable.js +0 -10
- package/components/skeleton/item.d.ts +1 -1
- package/components/skeleton/item.js +0 -4
- package/components/skeleton/item.vdt.js +1 -6
- package/components/skeleton/skeleton.js +0 -4
- package/components/skeleton/skeleton.vdt.js +6 -12
- package/components/skeleton/style.d.ts +1 -1
- package/components/skeleton/style.js +0 -1
- package/components/slider/index.d.ts +1 -1
- package/components/slider/index.js +0 -7
- package/components/slider/index.spec.js +467 -585
- package/components/slider/index.vdt.js +32 -45
- package/components/slider/styles.js +0 -14
- package/components/slider/useClick.js +2 -11
- package/components/slider/useDraggable.js +23 -34
- package/components/slider/useKeyboard.js +7 -18
- package/components/slider/useMarks.d.ts +5 -5
- package/components/slider/useMarks.js +5 -13
- package/components/slider/usePoints.d.ts +2 -2
- package/components/slider/usePoints.js +7 -21
- package/components/slider/useStyles.d.ts +1 -1
- package/components/slider/useStyles.js +5 -10
- package/components/slider/useTooltip.js +2 -10
- package/components/slider/useValue.d.ts +1 -1
- package/components/slider/useValue.js +7 -22
- package/components/spin/index.js +0 -4
- package/components/spin/index.vdt.js +4 -11
- package/components/spin/styles.js +0 -2
- package/components/spinner/index.d.ts +4 -4
- package/components/spinner/index.js +9 -24
- package/components/spinner/index.spec.js +359 -460
- package/components/spinner/index.vdt.js +10 -13
- package/components/spinner/styles.js +0 -3
- package/components/spinner/useChange.js +4 -16
- package/components/spinner/useFormatter.js +6 -16
- package/components/spinner/useStep.d.ts +3 -3
- package/components/spinner/useStep.js +2 -20
- package/components/spinner/useValue.js +11 -26
- package/components/split/index.js +0 -7
- package/components/split/index.spec.js +223 -267
- package/components/split/index.vdt.js +8 -17
- package/components/split/style.d.ts +1 -1
- package/components/split/style.js +0 -8
- package/components/split/useDraggable.js +11 -35
- package/components/split/useSize.js +2 -5
- package/components/steps/context.d.ts +2 -2
- package/components/steps/index.js +2 -10
- package/components/steps/index.spec.js +21 -27
- package/components/steps/index.vdt.js +8 -10
- package/components/steps/step.js +0 -2
- package/components/steps/step.vdt.js +8 -12
- package/components/steps/styles.js +0 -27
- package/components/switch/index.js +2 -23
- package/components/switch/index.spec.js +188 -224
- package/components/switch/index.vdt.js +16 -32
- package/components/switch/styles.js +3 -14
- package/components/switch/useDraggable.js +10 -18
- package/components/table/cell.js +0 -6
- package/components/table/cell.vdt.js +14 -21
- package/components/table/column.d.ts +1 -1
- package/components/table/column.js +0 -5
- package/components/table/column.vdt.js +19 -30
- package/components/table/exportTable.js +45 -56
- package/components/table/index.spec.js +780 -984
- package/components/table/row.d.ts +1 -1
- package/components/table/row.js +18 -40
- package/components/table/row.vdt.js +27 -39
- package/components/table/styles.js +0 -11
- package/components/table/table.d.ts +5 -5
- package/components/table/table.js +18 -50
- package/components/table/table.vdt.js +61 -85
- package/components/table/useChecked.d.ts +1 -1
- package/components/table/useChecked.js +20 -61
- package/components/table/useColumns.js +3 -16
- package/components/table/useDisableRow.js +2 -12
- package/components/table/useDraggable.js +4 -12
- package/components/table/useExpandable.js +2 -5
- package/components/table/useFixedColumns.d.ts +1 -1
- package/components/table/useFixedColumns.js +4 -23
- package/components/table/useGroup.d.ts +1 -1
- package/components/table/useGroup.js +7 -24
- package/components/table/useMerge.d.ts +4 -4
- package/components/table/useMerge.js +2 -14
- package/components/table/usePagination.js +4 -18
- package/components/table/useResizable.js +2 -10
- package/components/table/useRestRowStatus.js +2 -6
- package/components/table/useScroll.d.ts +1 -1
- package/components/table/useScroll.js +0 -3
- package/components/table/useSelected.js +2 -5
- package/components/table/useSortable.js +2 -8
- package/components/table/useStickyHeader.js +3 -7
- package/components/table/useStickyScrollbar.js +6 -16
- package/components/table/useTree.js +1 -12
- package/components/table/useWidth.js +14 -30
- package/components/tabs/index.js +29 -51
- package/components/tabs/index.spec.js +56 -74
- package/components/tabs/index.vdt.js +13 -16
- package/components/tabs/styles.js +0 -16
- package/components/tabs/tab.js +0 -10
- package/components/tabs/tab.vdt.js +6 -10
- package/components/tabs/useActiveBar.js +2 -11
- package/components/tabs/useScroll.js +4 -20
- package/components/tag/base.js +0 -8
- package/components/tag/index.js +2 -4
- package/components/tag/index.spec.js +19 -25
- package/components/tag/index.vdt.js +8 -15
- package/components/tag/styles.js +0 -9
- package/components/timeline/item.js +0 -4
- package/components/timeline/item.vdt.js +4 -9
- package/components/timeline/styles.d.ts +2 -2
- package/components/timeline/styles.js +0 -4
- package/components/timeline/timeline.js +0 -2
- package/components/timeline/timeline.vdt.js +2 -5
- package/components/timepicker/index.js +2 -7
- package/components/timepicker/index.spec.js +293 -368
- package/components/timepicker/panelPicker.js +2 -11
- package/components/timepicker/panelPicker.vdt.js +14 -24
- package/components/timepicker/selectPicker.js +0 -5
- package/components/timepicker/selectPicker.vdt.js +5 -10
- package/components/timepicker/styles.js +0 -1
- package/components/timepicker/useDisabled.js +2 -4
- package/components/timepicker/useFormats.js +4 -13
- package/components/timepicker/useStep.d.ts +1 -1
- package/components/timepicker/useStep.js +8 -17
- package/components/timepicker/useValue.js +16 -21
- package/components/tip/index.js +0 -2
- package/components/tip/index.vdt.js +5 -17
- package/components/tip/styles.js +0 -3
- package/components/tooltip/content.js +0 -28
- package/components/tooltip/content.vdt.js +15 -25
- package/components/tooltip/index.js +3 -7
- package/components/tooltip/index.spec.js +434 -572
- package/components/tooltip/styles.d.ts +1 -1
- package/components/tooltip/styles.js +2 -10
- package/components/tooltip/tooltip.js +2 -15
- package/components/tooltip/useArrow.js +11 -14
- package/components/transfer/index.d.ts +1 -1
- package/components/transfer/index.js +1 -13
- package/components/transfer/index.spec.js +159 -194
- package/components/transfer/index.vdt.js +16 -34
- package/components/transfer/styles.js +0 -10
- package/components/transfer/useCheck.d.ts +1 -1
- package/components/transfer/useCheck.js +1 -15
- package/components/transfer/useFilter.d.ts +1 -1
- package/components/transfer/useFilter.js +9 -30
- package/components/transfer/useTransfer.js +10 -26
- package/components/tree/index.d.ts +3 -3
- package/components/tree/index.js +4 -22
- package/components/tree/index.spec.js +285 -355
- package/components/tree/index.vdt.js +12 -23
- package/components/tree/styles.js +2 -16
- package/components/tree/useChecked.js +3 -26
- package/components/tree/useDraggable.js +12 -42
- package/components/tree/useExpanded.js +26 -43
- package/components/tree/useFilter.js +3 -10
- package/components/tree/useNodes.d.ts +1 -1
- package/components/tree/useNodes.js +0 -4
- package/components/tree/useSelected.js +21 -38
- package/components/tree/useTransitionEvent.js +3 -5
- package/components/treeSelect/index.js +9 -36
- package/components/treeSelect/index.spec.js +123 -160
- package/components/treeSelect/index.vdt.js +14 -20
- package/components/treeSelect/styles.js +0 -1
- package/components/treeSelect/useValue.js +0 -11
- package/components/types.d.ts +3 -3
- package/components/upload/ajaxUploader.d.ts +1 -1
- package/components/upload/ajaxUploader.js +0 -17
- package/components/upload/index.d.ts +4 -4
- package/components/upload/index.js +0 -14
- package/components/upload/index.spec.js +142 -249
- package/components/upload/index.vdt.js +12 -27
- package/components/upload/styles.js +0 -30
- package/components/upload/useAccept.js +2 -10
- package/components/upload/useDrag.js +0 -7
- package/components/upload/useFiles.js +103 -145
- package/components/upload/useShowImage.js +0 -3
- package/components/upload/useUpload.js +47 -69
- package/components/utils.d.ts +4 -3
- package/components/utils.js +24 -43
- package/components/virtual.js +14 -39
- package/components/wave/index.js +5 -31
- package/hooks/useDelayClose.js +2 -6
- package/hooks/useDocumentClick.js +8 -16
- package/hooks/useDraggable.d.ts +1 -1
- package/hooks/useDraggable.js +0 -9
- package/hooks/useKeyboard.d.ts +3 -3
- package/hooks/useKeyboard.js +0 -10
- package/hooks/useMouseOutsidable.js +0 -8
- package/hooks/useReceive.d.ts +1 -1
- package/hooks/useReceive.js +0 -4
- package/hooks/useRecordComponent.js +0 -6
- package/hooks/useRouter.js +7 -18
- package/hooks/useShowHideEvents.js +0 -3
- package/hooks/useState.d.ts +2 -2
- package/hooks/useState.js +2 -6
- package/i18n/en-US.js +0 -1
- package/i18n/index.d.ts +1 -1
- package/i18n/index.js +0 -7
- package/index.d.ts +2 -2
- package/index.js +2 -3
- package/package.json +2 -2
- package/styles/global.js +2 -3
- package/styles/keyframes.js +0 -1
- package/styles/theme.d.ts +1 -1
- package/styles/theme.js +4 -7
- package/styles/utils.d.ts +1 -1
- package/styles/utils.js +3 -17
- package/yarn-error.log +1013 -0
- package/components/cascader/index.d.ts +0 -45
- package/components/datepicker/index.d.ts +0 -63
- package/components/select/select.d.ts +0 -33
- package/components/timepicker/panelPicker.d.ts +0 -54
- package/components/treeSelect/index.d.ts +0 -27
package/hooks/useDelayClose.js
CHANGED
|
@@ -2,28 +2,24 @@ import { onMounted, useInstance, onUnmounted } from 'intact-vue-next';
|
|
|
2
2
|
export function useDelayClose(close, duration) {
|
|
3
3
|
var instance = useInstance();
|
|
4
4
|
var timer;
|
|
5
|
-
|
|
6
5
|
function delayClose() {
|
|
7
6
|
if (duration) {
|
|
8
7
|
timer = window.setTimeout(close, duration);
|
|
9
8
|
}
|
|
10
9
|
}
|
|
11
|
-
|
|
12
10
|
function onMouseEnter(e) {
|
|
13
11
|
instance.trigger('mouseenter', e);
|
|
14
12
|
clearTimeout(timer);
|
|
15
13
|
}
|
|
16
|
-
|
|
17
14
|
function onMouseLeave(e) {
|
|
18
|
-
instance.trigger('mouseleave', e);
|
|
15
|
+
instance.trigger('mouseleave', e);
|
|
16
|
+
// mouse leave event is not a delegated event,
|
|
19
17
|
// and it will not unmount when the dom has unmounted,
|
|
20
18
|
// so we must detect the $unmounted status here
|
|
21
|
-
|
|
22
19
|
if (instance.$unmounted) return;
|
|
23
20
|
clearTimeout(timer);
|
|
24
21
|
delayClose();
|
|
25
22
|
}
|
|
26
|
-
|
|
27
23
|
onMounted(delayClose);
|
|
28
24
|
onUnmounted(function () {
|
|
29
25
|
clearTimeout(timer);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { onMounted, onUnmounted } from 'intact-vue-next';
|
|
2
|
-
import { isFunction } from 'intact-shared';
|
|
3
|
-
|
|
4
|
-
var getNow = Date.now;
|
|
2
|
+
import { isFunction } from 'intact-shared';
|
|
3
|
+
// @reference: Vue3.0
|
|
4
|
+
var getNow = Date.now;
|
|
5
|
+
// Determine what event timestamp the browser is using. Annoyingly, the
|
|
5
6
|
// timestamp can either be hi-res (relative to page load) or low-res
|
|
6
7
|
// (relative to UNIX epoch), so in order to compare time we have to use the
|
|
7
8
|
// same timestamp type when saving the flush timestamp.
|
|
8
|
-
|
|
9
9
|
if (getNow() > document.createEvent('Event').timeStamp) {
|
|
10
10
|
// if the low-res timestamp which is bigger than the event timestamp
|
|
11
11
|
// (which is evaluated AFTER) it means the event is using a hi-res timestamp,
|
|
@@ -13,47 +13,39 @@ if (getNow() > document.createEvent('Event').timeStamp) {
|
|
|
13
13
|
getNow = function getNow() {
|
|
14
14
|
return performance.now();
|
|
15
15
|
};
|
|
16
|
-
}
|
|
16
|
+
}
|
|
17
|
+
// #3485: Firefox <= 53 has incorrect Event.timeStamp implementation
|
|
17
18
|
// and does not fire microtasks in between event propagation, so safe to exclude.
|
|
18
|
-
|
|
19
|
-
|
|
20
19
|
var ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i);
|
|
21
20
|
var skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53);
|
|
22
21
|
export function useDocumentClick(ref, callback, manual) {
|
|
23
22
|
if (manual === void 0) {
|
|
24
23
|
manual = false;
|
|
25
24
|
}
|
|
26
|
-
|
|
27
25
|
var onDocumentClick = function onDocumentClick(e) {
|
|
28
|
-
if (e._ignore) return;
|
|
29
|
-
|
|
26
|
+
if (e._ignore) return;
|
|
27
|
+
// https://github.com/ksc-fe/kpc/issues/788
|
|
30
28
|
var timeStamp = e.timeStamp || getNow();
|
|
31
|
-
|
|
32
29
|
if (!skipTimestampCheck && onDocumentClick.timeStamp > timeStamp + 1) {
|
|
33
30
|
return;
|
|
34
31
|
}
|
|
35
|
-
|
|
36
32
|
var target = e.target;
|
|
37
33
|
var elem = isFunction(ref) ? ref() : ref.value;
|
|
38
34
|
if (containsOrEqual(elem, target)) return;
|
|
39
35
|
callback(e);
|
|
40
36
|
};
|
|
41
|
-
|
|
42
37
|
var add = function add() {
|
|
43
38
|
onDocumentClick.timeStamp = getNow();
|
|
44
39
|
document.addEventListener('click', onDocumentClick);
|
|
45
40
|
document.addEventListener('contextmenu', onDocumentClick);
|
|
46
41
|
};
|
|
47
|
-
|
|
48
42
|
var remove = function remove() {
|
|
49
43
|
document.removeEventListener('click', onDocumentClick);
|
|
50
44
|
document.removeEventListener('contextmenu', onDocumentClick);
|
|
51
45
|
};
|
|
52
|
-
|
|
53
46
|
if (!manual) {
|
|
54
47
|
onMounted(add);
|
|
55
48
|
}
|
|
56
|
-
|
|
57
49
|
onUnmounted(remove);
|
|
58
50
|
return [add, remove];
|
|
59
51
|
}
|
package/hooks/useDraggable.d.ts
CHANGED
package/hooks/useDraggable.js
CHANGED
|
@@ -2,42 +2,33 @@ import { onUnmounted } from 'intact-vue-next';
|
|
|
2
2
|
import { useState } from './useState';
|
|
3
3
|
export function useDraggable(options) {
|
|
4
4
|
var dragging = useState(false);
|
|
5
|
-
|
|
6
5
|
function start(e) {
|
|
7
6
|
// ignore if it isn't left key
|
|
8
7
|
if (e.which !== 1 || options.disable != null && options.disable()) return;
|
|
9
8
|
dragging.set(true);
|
|
10
|
-
|
|
11
9
|
if (options.onStart) {
|
|
12
10
|
options.onStart(e);
|
|
13
11
|
}
|
|
14
|
-
|
|
15
12
|
document.addEventListener('mousemove', move);
|
|
16
13
|
document.addEventListener('mouseup', end);
|
|
17
14
|
}
|
|
18
|
-
|
|
19
15
|
function move(e) {
|
|
20
16
|
if (options.disable != null && options.disable()) return;
|
|
21
17
|
e.preventDefault();
|
|
22
|
-
|
|
23
18
|
if (dragging.value) {
|
|
24
19
|
options.onMove(e);
|
|
25
20
|
}
|
|
26
21
|
}
|
|
27
|
-
|
|
28
22
|
function end(e) {
|
|
29
23
|
if (dragging.value) {
|
|
30
24
|
dragging.set(false);
|
|
31
|
-
|
|
32
25
|
if (options.onEnd) {
|
|
33
26
|
options.onEnd(e);
|
|
34
27
|
}
|
|
35
|
-
|
|
36
28
|
document.removeEventListener('mousemove', move);
|
|
37
29
|
document.removeEventListener('mouseup', end);
|
|
38
30
|
}
|
|
39
31
|
}
|
|
40
|
-
|
|
41
32
|
onUnmounted(function () {
|
|
42
33
|
return end();
|
|
43
34
|
});
|
package/hooks/useKeyboard.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export type Handler = (e: KeyboardEvent) => void;
|
|
2
|
+
export type Listener = (fn: () => void) => () => void;
|
|
3
|
+
export type Options = {
|
|
4
4
|
down: Handler;
|
|
5
5
|
up: Handler;
|
|
6
6
|
right: Handler;
|
package/hooks/useKeyboard.js
CHANGED
|
@@ -1,50 +1,40 @@
|
|
|
1
1
|
import { onUnmounted } from 'intact-vue-next';
|
|
2
2
|
export function useKeyboard(options) {
|
|
3
3
|
var locked = false;
|
|
4
|
-
|
|
5
4
|
var onKeydown = function onKeydown(e) {
|
|
6
5
|
if (locked) return;
|
|
7
|
-
|
|
8
6
|
switch (e.keyCode) {
|
|
9
7
|
// down
|
|
10
8
|
case 40:
|
|
11
9
|
options.down(e);
|
|
12
10
|
break;
|
|
13
11
|
// up
|
|
14
|
-
|
|
15
12
|
case 38:
|
|
16
13
|
options.up(e);
|
|
17
14
|
break;
|
|
18
15
|
// right
|
|
19
|
-
|
|
20
16
|
case 39:
|
|
21
17
|
options.right(e);
|
|
22
18
|
break;
|
|
23
19
|
// left
|
|
24
|
-
|
|
25
20
|
case 37:
|
|
26
21
|
options.left(e);
|
|
27
22
|
break;
|
|
28
23
|
// enter
|
|
29
|
-
|
|
30
24
|
case 13:
|
|
31
25
|
options.enter(e);
|
|
32
26
|
break;
|
|
33
|
-
|
|
34
27
|
default:
|
|
35
28
|
options.default && options.default(e);
|
|
36
29
|
break;
|
|
37
30
|
}
|
|
38
31
|
};
|
|
39
|
-
|
|
40
32
|
var removeEventListener = function removeEventListener() {
|
|
41
33
|
document.removeEventListener('keydown', onKeydown);
|
|
42
34
|
};
|
|
43
|
-
|
|
44
35
|
var addEventListener = function addEventListener() {
|
|
45
36
|
document.addEventListener('keydown', onKeydown);
|
|
46
37
|
};
|
|
47
|
-
|
|
48
38
|
onUnmounted(removeEventListener);
|
|
49
39
|
return [addEventListener, removeEventListener, function (v) {
|
|
50
40
|
return locked = v;
|
|
@@ -8,40 +8,32 @@ export function useMouseOutsidable(elementRef, autoAdd) {
|
|
|
8
8
|
if (autoAdd === void 0) {
|
|
9
9
|
autoAdd = true;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
11
|
var timer;
|
|
13
|
-
|
|
14
12
|
function onMouseDown() {
|
|
15
13
|
document.addEventListener('click', onDocumentClick, true);
|
|
16
14
|
document.addEventListener('mouseup', onMouseUp);
|
|
17
15
|
}
|
|
18
|
-
|
|
19
16
|
function onMouseUp() {
|
|
20
17
|
timer = window.setTimeout(function () {
|
|
21
18
|
document.removeEventListener('click', onDocumentClick, true);
|
|
22
19
|
});
|
|
23
20
|
document.removeEventListener('mouseup', onMouseUp);
|
|
24
21
|
}
|
|
25
|
-
|
|
26
22
|
function onDocumentClick(e) {
|
|
27
23
|
if (!containsOrEqual(elementRef.value, e.target)) {
|
|
28
24
|
e.stopPropagation();
|
|
29
25
|
}
|
|
30
26
|
}
|
|
31
|
-
|
|
32
27
|
if (autoAdd) {
|
|
33
28
|
onMounted(function () {
|
|
34
29
|
elementRef.value.addEventListener('mousedown', onMouseDown);
|
|
35
30
|
});
|
|
36
31
|
}
|
|
37
|
-
|
|
38
32
|
onBeforeUnmount(function () {
|
|
39
33
|
clearTimeout(timer);
|
|
40
|
-
|
|
41
34
|
if (autoAdd) {
|
|
42
35
|
elementRef.value.removeEventListener('mousedown', onMouseDown);
|
|
43
36
|
}
|
|
44
|
-
|
|
45
37
|
document.removeEventListener('click', onDocumentClick, true);
|
|
46
38
|
document.removeEventListener('mouseup', onMouseUp);
|
|
47
39
|
});
|
package/hooks/useReceive.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Component, Props } from 'intact-vue-next';
|
|
2
|
-
|
|
2
|
+
type ExtractProps<T extends Component> = T extends Component<infer P> ? Props<P> : never;
|
|
3
3
|
export declare function useReceive<T extends Component>(props: (keyof ExtractProps<T>)[], callback: () => void, ignoreInit?: boolean): void;
|
|
4
4
|
export {};
|
package/hooks/useReceive.js
CHANGED
|
@@ -3,7 +3,6 @@ export function useReceive(props, callback, ignoreInit) {
|
|
|
3
3
|
if (ignoreInit === void 0) {
|
|
4
4
|
ignoreInit = false;
|
|
5
5
|
}
|
|
6
|
-
|
|
7
6
|
var instance = useInstance();
|
|
8
7
|
var shouldCall = false;
|
|
9
8
|
props.forEach(function (prop) {
|
|
@@ -12,17 +11,14 @@ export function useReceive(props, callback, ignoreInit) {
|
|
|
12
11
|
shouldCall = true;
|
|
13
12
|
});
|
|
14
13
|
});
|
|
15
|
-
|
|
16
14
|
function call() {
|
|
17
15
|
if (shouldCall) {
|
|
18
16
|
callback();
|
|
19
17
|
shouldCall = false;
|
|
20
18
|
}
|
|
21
19
|
}
|
|
22
|
-
|
|
23
20
|
if (!ignoreInit) {
|
|
24
21
|
onBeforeMount(call);
|
|
25
22
|
}
|
|
26
|
-
|
|
27
23
|
onBeforeUpdate(call);
|
|
28
24
|
}
|
|
@@ -6,11 +6,9 @@ export function useRecordParent(key, useMap) {
|
|
|
6
6
|
if (key === void 0) {
|
|
7
7
|
key = RECORD_COMPONENT;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
9
|
if (useMap === void 0) {
|
|
11
10
|
useMap = false;
|
|
12
11
|
}
|
|
13
|
-
|
|
14
12
|
var items = useMap ? new _Map() : [];
|
|
15
13
|
provide(key, items);
|
|
16
14
|
return items;
|
|
@@ -19,13 +17,10 @@ export function useRecordItem(key, item, value) {
|
|
|
19
17
|
if (key === void 0) {
|
|
20
18
|
key = RECORD_COMPONENT;
|
|
21
19
|
}
|
|
22
|
-
|
|
23
20
|
if (item === void 0) {
|
|
24
21
|
item = useInstance();
|
|
25
22
|
}
|
|
26
|
-
|
|
27
23
|
var items = inject(key);
|
|
28
|
-
|
|
29
24
|
if (items) {
|
|
30
25
|
onMounted(function () {
|
|
31
26
|
if (value === undefined) {
|
|
@@ -42,6 +37,5 @@ export function useRecordItem(key, item, value) {
|
|
|
42
37
|
}
|
|
43
38
|
});
|
|
44
39
|
}
|
|
45
|
-
|
|
46
40
|
return items;
|
|
47
41
|
}
|
package/hooks/useRouter.js
CHANGED
|
@@ -2,13 +2,9 @@ import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/slic
|
|
|
2
2
|
import _Array$from from "@babel/runtime-corejs3/core-js/array/from";
|
|
3
3
|
import _Symbol from "@babel/runtime-corejs3/core-js/symbol";
|
|
4
4
|
import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-method";
|
|
5
|
-
|
|
6
5
|
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
-
|
|
8
6
|
function _unsupportedIterableToArray(o, minLen) { var _context; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context = Object.prototype.toString.call(o)).call(_context, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
9
|
-
|
|
10
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
11
|
-
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
12
8
|
/**
|
|
13
9
|
* @brief find the router instance
|
|
14
10
|
*
|
|
@@ -37,30 +33,25 @@ export function navigate(router, to) {
|
|
|
37
33
|
}
|
|
38
34
|
}
|
|
39
35
|
}
|
|
40
|
-
|
|
41
36
|
function findRouter(instance) {
|
|
42
37
|
var Component = instance.constructor;
|
|
43
|
-
|
|
44
38
|
if (Component.$cid === 'IntactReact') {
|
|
45
39
|
// in React
|
|
46
40
|
var parent = instance;
|
|
47
|
-
|
|
48
41
|
while (!parent.$isReact) {
|
|
49
42
|
parent = parent.$senior;
|
|
50
43
|
if (!parent) return;
|
|
51
44
|
}
|
|
52
|
-
|
|
53
45
|
for (var _iterator = _createForOfIteratorHelperLoose(parent.$reactProviders), _step; !(_step = _iterator()).done;) {
|
|
54
46
|
var _step$value = _step.value,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
var displayName = key._context.displayName;
|
|
58
|
-
|
|
47
|
+
key = _step$value[0],
|
|
48
|
+
value = _step$value[1];
|
|
49
|
+
var displayName = key._context.displayName;
|
|
50
|
+
// V6
|
|
59
51
|
if (displayName === 'Navigation') {
|
|
60
52
|
return value.navigator;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
}
|
|
54
|
+
// V5
|
|
64
55
|
if (displayName === 'Router') {
|
|
65
56
|
return value.history;
|
|
66
57
|
}
|
|
@@ -68,7 +59,6 @@ function findRouter(instance) {
|
|
|
68
59
|
} else if (Component.$cid === 'IntactVue') {
|
|
69
60
|
do {
|
|
70
61
|
var _parent = instance.$parent;
|
|
71
|
-
|
|
72
62
|
if (_parent) {
|
|
73
63
|
return _parent.$router;
|
|
74
64
|
}
|
|
@@ -77,7 +67,6 @@ function findRouter(instance) {
|
|
|
77
67
|
// for vue-next
|
|
78
68
|
do {
|
|
79
69
|
var vueInstance = instance.vueInstance;
|
|
80
|
-
|
|
81
70
|
if (vueInstance) {
|
|
82
71
|
return vueInstance.proxy.$router;
|
|
83
72
|
}
|
|
@@ -3,15 +3,12 @@ export function useShowHideEvents(prop, show, hide) {
|
|
|
3
3
|
if (prop === void 0) {
|
|
4
4
|
prop = 'value';
|
|
5
5
|
}
|
|
6
|
-
|
|
7
6
|
if (show === void 0) {
|
|
8
7
|
show = 'show';
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
if (hide === void 0) {
|
|
12
10
|
hide = 'hide';
|
|
13
11
|
}
|
|
14
|
-
|
|
15
12
|
var instance = useInstance();
|
|
16
13
|
instance.watch(prop, function (value) {
|
|
17
14
|
if (value) {
|
package/hooks/useState.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type Listener<T> = (newValue: T, oldValue: T) => void;
|
|
2
|
+
export type State<T> = {
|
|
3
3
|
readonly value: T;
|
|
4
4
|
set(value: T): void;
|
|
5
5
|
listeners: Listener<T>[] | null;
|
package/hooks/useState.js
CHANGED
|
@@ -5,7 +5,6 @@ export function useState(value, isEqual) {
|
|
|
5
5
|
value: value,
|
|
6
6
|
set: function set(value) {
|
|
7
7
|
var oldValue = state.value;
|
|
8
|
-
|
|
9
8
|
if (isEqual) {
|
|
10
9
|
if (isEqual(oldValue, value)) {
|
|
11
10
|
// @ts-ignore
|
|
@@ -14,9 +13,8 @@ export function useState(value, isEqual) {
|
|
|
14
13
|
}
|
|
15
14
|
} else {
|
|
16
15
|
if (oldValue === value) return;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
}
|
|
17
|
+
// @ts-ignore
|
|
20
18
|
state.value = value;
|
|
21
19
|
instance.forceUpdate();
|
|
22
20
|
callListeners(state, value, oldValue);
|
|
@@ -32,10 +30,8 @@ export function watchState(state, callback) {
|
|
|
32
30
|
if (!state.listeners) state.listeners = [];
|
|
33
31
|
state.listeners.push(callback);
|
|
34
32
|
}
|
|
35
|
-
|
|
36
33
|
function callListeners(state, newValue, oldValue) {
|
|
37
34
|
var listeners = state.listeners;
|
|
38
|
-
|
|
39
35
|
if (listeners) {
|
|
40
36
|
for (var i = 0; i < listeners.length; i++) {
|
|
41
37
|
listeners[i](newValue, oldValue);
|
package/i18n/en-US.js
CHANGED
package/i18n/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type Data = Record<string, string | number>;
|
|
2
2
|
export declare function _$(key: null | undefined, data?: any): undefined | null;
|
|
3
3
|
export declare function _$(key: string | number, data?: any): string;
|
|
4
4
|
export declare function localize(data: Data): void;
|
package/i18n/index.js
CHANGED
|
@@ -4,24 +4,19 @@ var i18n = {};
|
|
|
4
4
|
export function _$(key, data) {
|
|
5
5
|
if (isNullOrUndefined(key)) return;
|
|
6
6
|
var value = get(i18n, key);
|
|
7
|
-
|
|
8
7
|
if (isNullOrUndefined(value)) {
|
|
9
8
|
value = key;
|
|
10
9
|
}
|
|
11
|
-
|
|
12
10
|
if (isNumber(value)) value = String(value);
|
|
13
|
-
|
|
14
11
|
if (data) {
|
|
15
12
|
value = value.replace(valueRegexp, function (nouse, variable) {
|
|
16
13
|
var suffix;
|
|
17
14
|
var index = variable.indexOf(':');
|
|
18
|
-
|
|
19
15
|
if (index > 0) {
|
|
20
16
|
suffix = variable.substr(0, index);
|
|
21
17
|
suffix = suffix.split('|');
|
|
22
18
|
variable = variable.substr(index + 1);
|
|
23
19
|
variable = get(data, variable);
|
|
24
|
-
|
|
25
20
|
if (variable > 1) {
|
|
26
21
|
return suffix.length > 1 ? suffix[1] : suffix[0];
|
|
27
22
|
} else {
|
|
@@ -33,13 +28,11 @@ export function _$(key, data) {
|
|
|
33
28
|
}
|
|
34
29
|
});
|
|
35
30
|
}
|
|
36
|
-
|
|
37
31
|
return value;
|
|
38
32
|
}
|
|
39
33
|
export function localize(data) {
|
|
40
34
|
if (!isObject(data)) {
|
|
41
35
|
throw new Error("expect a object but got " + data);
|
|
42
36
|
}
|
|
43
|
-
|
|
44
37
|
i18n = data;
|
|
45
38
|
}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.1.
|
|
2
|
+
* @king-design v2.1.4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -57,7 +57,7 @@ export * from './components/tree';
|
|
|
57
57
|
export * from './components/treeSelect';
|
|
58
58
|
export * from './components/upload';
|
|
59
59
|
export * from './components/wave';
|
|
60
|
-
export declare const version = "2.1.
|
|
60
|
+
export declare const version = "2.1.4";
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
export {normalize} from 'intact-vue-next';
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.1.
|
|
2
|
+
* @king-design v2.1.4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -11,7 +11,6 @@ export { _$, localize } from './i18n';
|
|
|
11
11
|
export { bind } from './components/utils';
|
|
12
12
|
export { setTheme, theme } from './styles/theme';
|
|
13
13
|
/* generate start */
|
|
14
|
-
|
|
15
14
|
export * from './components/affix';
|
|
16
15
|
export * from './components/badge';
|
|
17
16
|
export * from './components/breadcrumb';
|
|
@@ -59,7 +58,7 @@ export * from './components/tree';
|
|
|
59
58
|
export * from './components/treeSelect';
|
|
60
59
|
export * from './components/upload';
|
|
61
60
|
export * from './components/wave';
|
|
62
|
-
export var version = '2.1.
|
|
61
|
+
export var version = '2.1.4';
|
|
63
62
|
/* generate end */
|
|
64
63
|
|
|
65
64
|
export {normalize} from 'intact-vue-next';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@king-design/vue",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.4",
|
|
4
4
|
"description": "King-Design UI components for Vue3.0.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"component",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dayjs": "^1.10.7",
|
|
39
39
|
"downloadjs": "^1.4.7",
|
|
40
40
|
"enquire.js": "^2.1.6",
|
|
41
|
-
"intact-vue-next": "3.0.
|
|
41
|
+
"intact-vue-next": "3.0.28",
|
|
42
42
|
"monaco-editor": "^0.26.1",
|
|
43
43
|
"mxgraphx": "^4.0.7",
|
|
44
44
|
"resize-observer-polyfill": "^1.5.1",
|
package/styles/global.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
var _context;
|
|
2
|
-
|
|
3
2
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
|
|
4
3
|
import _Object$keys from "@babel/runtime-corejs3/core-js/object/keys";
|
|
5
4
|
import { injectGlobal } from '@emotion/css';
|
|
@@ -10,8 +9,8 @@ var slideDirections = {
|
|
|
10
9
|
up: 'center bottom 0',
|
|
11
10
|
left: 'right center 0',
|
|
12
11
|
right: 'left center 0'
|
|
13
|
-
};
|
|
14
|
-
|
|
12
|
+
};
|
|
13
|
+
// TODO: update global when theme changed
|
|
15
14
|
injectGlobal("html{--var-wave-color:", theme.color.primary, ";box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,SF Pro SC,SF Pro Text,Helvetica Neue,Helvetica,PingFang SC,Segoe UI,Roboto,Hiragino Sans GB,arial,microsoft yahei ui,Microsoft YaHei,sans-serif;}body{font-size:", theme.fontSize, ";line-height:", theme.lineHeight, ";margin:0;padding:0;color:", theme.color.text, ";}*,*:before,*:after{box-sizing:inherit;}", _mapInstanceProperty(_context = _Object$keys(slideDirections)).call(_context, function (direction) {
|
|
16
15
|
return "\n .k-slide" + direction + "-enter-from,\n .k-slide" + direction + "-leave-to {\n transform-origin: " + slideDirections[direction] + ";\n opacity: 0;\n transform: " + (direction === 'down' || direction === 'up' ? "scaleY(.8)" : 'scaleX(.8)') + ";\n }\n .k-slide" + direction + "-enter-active,\n .k-slide" + direction + "-leave-active {\n transform-origin: " + slideDirections[direction] + ";\n transition: opacity " + theme.transition.large + ", transform " + theme.transition.large + " !important;\n pointer-events: none;\n }\n ";
|
|
17
16
|
}).join(''), " .k-fade-enter-from,.k-fade-leave-to{opacity:0!important;}.k-fade-enter-active,.k-fade-leave-active{transition:opacity ", theme.transition.large, ";}.k-fade-leave-active:not(tr){position:absolute;}.k-fade-move{transition:transform ", theme.transition.large, ";}.k-scale-enter-from,.k-scale-leave-to{transform:scale(0);}.k-scale-enter-active,.k-scale-leave-active{transition:transform ", theme.transition.large, ";}.k-expand-enter-from,.k-expand-leave-to{opacity:0;overflow:hidden;}.k-expand-enter-active,.k-expand-leave-active{transition:all ", theme.transition.large, "!important;overflow:hidden;}.k-expand-move{transition:transform ", theme.transition.large, ";}.k-dropdown-enter-from,.k-dropdown-leave-to{opacity:0;transform:translateY(-20px);}.k-dropdown-enter-active,.k-dropdown-leave-active,.k-dropdown-move{transition:all ", theme.transition.large, ";}.k-dropdown-leave-active{position:absolute!important;}.k-dropdown-move{transition:transform ", theme.transition.large, ";}.k-fade-in-left-enter-from,.k-fade-in-left-leave-to{opacity:0;transform:translate3d(-15px, 0, 0);}.k-fade-in-left-enter-active,.k-fade-in-left-leave-active{transition:all ", theme.transition.large, ";td{background:", palette(theme.color.primary, -4), "!important;}}.k-fade-in-left-move{transition:transform ", theme.transition.large, ";}.k-fade-expand-enter-from,.k-fade-expand-leave-to{opacity:0;}.k-fade-expand-enter-active,.k-fade-expand-leave-active{transition:all ", theme.transition.large, ";background:", palette(theme.color.primary, -4), "!important;}.c-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.c-hidden{display:none;}.c-middle{display:inline-block;vertical-align:middle;}");
|
package/styles/keyframes.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
|
-
|
|
3
2
|
import { keyframes } from '@emotion/css';
|
|
4
3
|
export var rotate = /*#__PURE__*/keyframes(process.env.NODE_ENV === "production" ? {
|
|
5
4
|
name: "1b2444z",
|
package/styles/theme.d.ts
CHANGED
package/styles/theme.js
CHANGED
|
@@ -33,19 +33,15 @@ export function defaultTheme() {
|
|
|
33
33
|
title: '#333',
|
|
34
34
|
darkBorder: '#b2b2b2',
|
|
35
35
|
placeholder: '#b2b2b2',
|
|
36
|
-
|
|
37
36
|
get link() {
|
|
38
37
|
return theme.color.primary;
|
|
39
38
|
},
|
|
40
|
-
|
|
41
39
|
get linkHover() {
|
|
42
40
|
return palette(theme.color.primary, -1);
|
|
43
41
|
},
|
|
44
|
-
|
|
45
42
|
get hoverBg() {
|
|
46
43
|
return palette(theme.color.primary, -4);
|
|
47
44
|
},
|
|
48
|
-
|
|
49
45
|
disabled: '#ccc',
|
|
50
46
|
disabledBg: '#f2f2f2',
|
|
51
47
|
disabledBorder: '#ccc',
|
|
@@ -75,8 +71,8 @@ export function push(setTheme) {
|
|
|
75
71
|
}
|
|
76
72
|
export function setTheme(customTheme) {
|
|
77
73
|
resetTheme();
|
|
78
|
-
deepExtends(theme, customTheme);
|
|
79
|
-
|
|
74
|
+
deepExtends(theme, customTheme);
|
|
75
|
+
// queue
|
|
80
76
|
queue.forEach(function (fn) {
|
|
81
77
|
return fn();
|
|
82
78
|
});
|
|
@@ -84,7 +80,8 @@ export function setTheme(customTheme) {
|
|
|
84
80
|
export function setDefault(setTheme) {
|
|
85
81
|
setTheme();
|
|
86
82
|
push(setTheme);
|
|
87
|
-
}
|
|
83
|
+
}
|
|
84
|
+
// push(resetTheme);
|
|
88
85
|
// export const theme = defualtTheme();
|
|
89
86
|
// export const theme = {
|
|
90
87
|
// large: {
|
package/styles/utils.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export declare function palette(color: string, level: number): string;
|
|
|
10
10
|
export declare function getLeft(padding: string): string;
|
|
11
11
|
export declare function getRight(padding: string): string;
|
|
12
12
|
export declare function darken(color: string, number: number): string;
|
|
13
|
-
export
|
|
13
|
+
export type Sizes = 'large' | 'default' | 'small' | 'mini';
|
|
14
14
|
export declare const sizes: Sizes[];
|