@king-design/vue 2.1.3 → 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 +406 -554
- 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 +0 -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 +24 -22
- 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 +2 -29
- 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 +12 -41
- 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 +3 -3
- package/components/utils.js +12 -47
- package/components/virtual.js +9 -37
- 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 +633 -517
- 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
|
@@ -4,17 +4,14 @@ import { getRestProps } from '../utils';
|
|
|
4
4
|
import { makeButtonGroupStyles } from './styles';
|
|
5
5
|
export default function ($props, $blocks, $__proto__) {
|
|
6
6
|
var _classNameObj;
|
|
7
|
-
|
|
8
7
|
$blocks || ($blocks = {});
|
|
9
8
|
$props || ($props = {});
|
|
10
9
|
var $this = this;
|
|
11
|
-
|
|
12
10
|
var _this$get = this.get(),
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
className = _this$get.className,
|
|
12
|
+
vertical = _this$get.vertical,
|
|
13
|
+
children = _this$get.children,
|
|
14
|
+
fluid = _this$get.fluid;
|
|
18
15
|
var classNameObj = (_classNameObj = {
|
|
19
16
|
'k-btns': true,
|
|
20
17
|
'k-vertical': vertical,
|
|
@@ -21,7 +21,6 @@ var typeDefs = {
|
|
|
21
21
|
tabindex: [String, Number],
|
|
22
22
|
ghost: Boolean
|
|
23
23
|
};
|
|
24
|
-
|
|
25
24
|
var defaults = function defaults() {
|
|
26
25
|
return {
|
|
27
26
|
type: 'default',
|
|
@@ -31,89 +30,66 @@ var defaults = function defaults() {
|
|
|
31
30
|
tabindex: '0'
|
|
32
31
|
};
|
|
33
32
|
};
|
|
34
|
-
|
|
35
33
|
export var Button = /*#__PURE__*/function (_Component) {
|
|
36
34
|
_inheritsLoose(Button, _Component);
|
|
37
|
-
|
|
38
35
|
function Button() {
|
|
39
36
|
var _context;
|
|
40
|
-
|
|
41
37
|
var _this;
|
|
42
|
-
|
|
43
38
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
44
39
|
args[_key] = arguments[_key];
|
|
45
40
|
}
|
|
46
|
-
|
|
47
41
|
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
48
42
|
_this.buttonGroup = inject(BUTTON_GROUP, null);
|
|
49
43
|
_this.elementRef = createRef();
|
|
50
44
|
return _this;
|
|
51
45
|
}
|
|
52
|
-
|
|
53
46
|
var _proto = Button.prototype;
|
|
54
|
-
|
|
55
47
|
_proto.showLoading = function showLoading() {
|
|
56
48
|
this.set('loading', true);
|
|
57
49
|
};
|
|
58
|
-
|
|
59
50
|
_proto.hideLoading = function hideLoading() {
|
|
60
51
|
this.set('loading', false);
|
|
61
52
|
};
|
|
62
|
-
|
|
63
53
|
_proto.disable = function disable() {
|
|
64
54
|
this.set('disabled', true);
|
|
65
55
|
};
|
|
66
|
-
|
|
67
56
|
_proto.enable = function enable() {
|
|
68
57
|
this.set('disabled', false);
|
|
69
58
|
};
|
|
70
|
-
|
|
71
59
|
_proto.isChecked = function isChecked() {
|
|
72
60
|
var group = this.buttonGroup;
|
|
73
61
|
if (!group) return false;
|
|
74
|
-
|
|
75
62
|
var _group$get = group.get(),
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
63
|
+
checkType = _group$get.checkType,
|
|
64
|
+
groupValue = _group$get.value;
|
|
79
65
|
var _this$get = this.get(),
|
|
80
|
-
|
|
81
|
-
|
|
66
|
+
value = _this$get.value;
|
|
82
67
|
return value !== undefined ? checkType === 'radio' ? value === groupValue : checkType === 'checkbox' ? Array.isArray(groupValue) && !!~groupValue.indexOf(value) : false : false;
|
|
83
68
|
};
|
|
84
|
-
|
|
85
69
|
_proto.onClick = function onClick(e) {
|
|
86
70
|
if (this.get('disabled') || this.get('loading')) {
|
|
87
71
|
e.preventDefault();
|
|
88
72
|
return;
|
|
89
73
|
}
|
|
90
|
-
|
|
91
74
|
var buttonGroup = this.buttonGroup;
|
|
92
|
-
|
|
93
75
|
if (buttonGroup) {
|
|
94
76
|
var value = this.get('value');
|
|
95
|
-
|
|
96
77
|
if (value !== undefined) {
|
|
97
78
|
buttonGroup.setValue(value);
|
|
98
79
|
}
|
|
99
80
|
}
|
|
100
|
-
|
|
101
81
|
e.$component = this;
|
|
102
82
|
this.trigger('click', e);
|
|
103
83
|
};
|
|
104
|
-
|
|
105
84
|
_proto.onMouseUp = function onMouseUp(e) {
|
|
106
85
|
// when click, blur it to remove the focus style
|
|
107
86
|
this.elementRef.value.blur();
|
|
108
87
|
this.trigger('mouseup', e);
|
|
109
88
|
};
|
|
110
|
-
|
|
111
89
|
return Button;
|
|
112
90
|
}(Component);
|
|
113
91
|
Button.template = template;
|
|
114
92
|
Button.typeDefs = typeDefs;
|
|
115
93
|
Button.defaults = defaults;
|
|
116
|
-
|
|
117
94
|
__decorate([bind], Button.prototype, "onClick", null);
|
|
118
|
-
|
|
119
95
|
__decorate([bind], Button.prototype, "onMouseUp", null);
|
|
@@ -12,115 +12,93 @@ describe('Button', function () {
|
|
|
12
12
|
});
|
|
13
13
|
it('should change value when click radio buttons', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
14
14
|
var _mount, instance, radioShanggaiElement, checkboxShanghaiElement;
|
|
15
|
-
|
|
16
15
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
17
|
-
while (1) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
case 19:
|
|
48
|
-
expect(instance.get('cities')).to.eql(['shanghai']);
|
|
49
|
-
|
|
50
|
-
case 20:
|
|
51
|
-
case "end":
|
|
52
|
-
return _context.stop();
|
|
53
|
-
}
|
|
16
|
+
while (1) switch (_context.prev = _context.next) {
|
|
17
|
+
case 0:
|
|
18
|
+
_mount = mount(GroupDemo), instance = _mount[0];
|
|
19
|
+
radioShanggaiElement = findDomFromVNode(instance.refs.__radioShanghai.$lastInput, true);
|
|
20
|
+
dispatchEvent(radioShanggaiElement, 'click');
|
|
21
|
+
_context.next = 5;
|
|
22
|
+
return wait();
|
|
23
|
+
case 5:
|
|
24
|
+
expect(instance.get('city')).to.eql('shanghai');
|
|
25
|
+
checkboxShanghaiElement = findDomFromVNode(instance.refs.__checkboxShanghai.$lastInput, true);
|
|
26
|
+
dispatchEvent(checkboxShanghaiElement, 'click');
|
|
27
|
+
_context.next = 10;
|
|
28
|
+
return wait();
|
|
29
|
+
case 10:
|
|
30
|
+
expect(instance.get('cities')).to.eql(['shanghai']);
|
|
31
|
+
dispatchEvent(checkboxShanghaiElement, 'click');
|
|
32
|
+
_context.next = 14;
|
|
33
|
+
return wait();
|
|
34
|
+
case 14:
|
|
35
|
+
expect(instance.get('cities')).to.eql([]);
|
|
36
|
+
// should set value correctly, even if the type of value is not an array
|
|
37
|
+
instance.set('cities', '');
|
|
38
|
+
dispatchEvent(checkboxShanghaiElement, 'click');
|
|
39
|
+
_context.next = 19;
|
|
40
|
+
return wait();
|
|
41
|
+
case 19:
|
|
42
|
+
expect(instance.get('cities')).to.eql(['shanghai']);
|
|
43
|
+
case 20:
|
|
44
|
+
case "end":
|
|
45
|
+
return _context.stop();
|
|
54
46
|
}
|
|
55
47
|
}, _callee);
|
|
56
48
|
})));
|
|
57
49
|
it('method test', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
58
50
|
var _mount2, instance, element;
|
|
59
|
-
|
|
60
51
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
61
|
-
while (1) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
case 16:
|
|
88
|
-
expect(element.classList.contains('k-disabled')).to.be.false;
|
|
89
|
-
|
|
90
|
-
case 17:
|
|
91
|
-
case "end":
|
|
92
|
-
return _context2.stop();
|
|
93
|
-
}
|
|
52
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
53
|
+
case 0:
|
|
54
|
+
_mount2 = mount(Button), instance = _mount2[0], element = _mount2[1];
|
|
55
|
+
instance.showLoading();
|
|
56
|
+
_context2.next = 4;
|
|
57
|
+
return wait();
|
|
58
|
+
case 4:
|
|
59
|
+
expect(element.classList.contains('k-loading')).to.be.true;
|
|
60
|
+
instance.hideLoading();
|
|
61
|
+
_context2.next = 8;
|
|
62
|
+
return wait();
|
|
63
|
+
case 8:
|
|
64
|
+
expect(element.classList.contains('k-loading')).to.be.false;
|
|
65
|
+
instance.disable();
|
|
66
|
+
_context2.next = 12;
|
|
67
|
+
return wait();
|
|
68
|
+
case 12:
|
|
69
|
+
expect(element.classList.contains('k-disabled')).to.be.true;
|
|
70
|
+
instance.enable();
|
|
71
|
+
_context2.next = 16;
|
|
72
|
+
return wait();
|
|
73
|
+
case 16:
|
|
74
|
+
expect(element.classList.contains('k-disabled')).to.be.false;
|
|
75
|
+
case 17:
|
|
76
|
+
case "end":
|
|
77
|
+
return _context2.stop();
|
|
94
78
|
}
|
|
95
79
|
}, _callee2);
|
|
96
80
|
})));
|
|
97
81
|
it('should blur on mouse up', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
98
82
|
var _mount3, element;
|
|
99
|
-
|
|
100
83
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
101
|
-
while (1) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
case 9:
|
|
121
|
-
case "end":
|
|
122
|
-
return _context3.stop();
|
|
123
|
-
}
|
|
84
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
85
|
+
case 0:
|
|
86
|
+
_mount3 = mount(Button), element = _mount3[1];
|
|
87
|
+
element.focus();
|
|
88
|
+
// test color of focus style
|
|
89
|
+
_context3.next = 4;
|
|
90
|
+
return wait(500);
|
|
91
|
+
case 4:
|
|
92
|
+
// has transition
|
|
93
|
+
expect(tinycolor(getComputedStyle(element).color).toHexString()).to.eql(buttonStyles.hoverColor);
|
|
94
|
+
dispatchEvent(element, 'mouseup');
|
|
95
|
+
_context3.next = 8;
|
|
96
|
+
return wait(500);
|
|
97
|
+
case 8:
|
|
98
|
+
expect(tinycolor(getComputedStyle(element).color).toHexString()).to.eql(buttonStyles.color);
|
|
99
|
+
case 9:
|
|
100
|
+
case "end":
|
|
101
|
+
return _context3.stop();
|
|
124
102
|
}
|
|
125
103
|
}, _callee3);
|
|
126
104
|
})));
|
|
@@ -8,37 +8,32 @@ import { Wave } from '../wave';
|
|
|
8
8
|
import { button as theme } from './styles';
|
|
9
9
|
export default function ($props, $blocks, $__proto__) {
|
|
10
10
|
var _classNameObj;
|
|
11
|
-
|
|
12
11
|
$blocks || ($blocks = {});
|
|
13
12
|
$props || ($props = {});
|
|
14
13
|
var $this = this;
|
|
15
|
-
|
|
16
14
|
var _this$get = this.get(),
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
15
|
+
type = _this$get.type,
|
|
16
|
+
className = _this$get.className,
|
|
17
|
+
size = _this$get.size,
|
|
18
|
+
icon = _this$get.icon,
|
|
19
|
+
circle = _this$get.circle,
|
|
20
|
+
ref = _this$get.ref,
|
|
21
|
+
key = _this$get.key,
|
|
22
|
+
tabindex = _this$get.tabindex,
|
|
23
|
+
tagName = _this$get.tagName,
|
|
24
|
+
htmlType = _this$get.htmlType,
|
|
25
|
+
fluid = _this$get.fluid,
|
|
26
|
+
children = _this$get.children,
|
|
27
|
+
loading = _this$get.loading,
|
|
28
|
+
disabled = _this$get.disabled,
|
|
29
|
+
name = _this$get.name,
|
|
30
|
+
ghost = _this$get.ghost;
|
|
34
31
|
var checked = this.isChecked();
|
|
35
|
-
|
|
36
32
|
var isIcon = function isIcon(child) {
|
|
37
33
|
return child.tag === Icon || child.className && child.className.indexOf('icon') > -1;
|
|
38
34
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
var iconSide;
|
|
36
|
+
// hack for loading transition of width
|
|
42
37
|
if (!icon && Array.isArray(children)) {
|
|
43
38
|
children.forEach(function (child, index) {
|
|
44
39
|
if (child) {
|
|
@@ -55,22 +50,17 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
55
50
|
}
|
|
56
51
|
});
|
|
57
52
|
}
|
|
58
|
-
|
|
59
53
|
var classNameObj = (_classNameObj = {
|
|
60
54
|
'k-btn': true
|
|
61
55
|
}, _classNameObj["k-" + type] = type !== 'default', _classNameObj["k-" + size] = size !== 'default', _classNameObj['k-btn-icon'] = icon, _classNameObj[className] = className, _classNameObj['k-circle'] = circle, _classNameObj['k-loading'] = loading, _classNameObj['k-fluid'] = fluid, _classNameObj['k-active'] = checked, _classNameObj['k-disabled'] = disabled || loading, _classNameObj['k-ghost'] = ghost, _classNameObj[makeButtonStyles({
|
|
62
56
|
iconSide: iconSide
|
|
63
57
|
})] = true, _classNameObj);
|
|
64
|
-
|
|
65
58
|
var loadingIcon = _$cc(Icon, {
|
|
66
59
|
'className': 'ion-load-c k-icon-loading',
|
|
67
|
-
'size': size
|
|
68
|
-
/*loadingSizeMap[size]*/
|
|
69
|
-
,
|
|
60
|
+
'size': size /*loadingSizeMap[size]*/,
|
|
70
61
|
'key': 'k-loading',
|
|
71
62
|
'rotate': true
|
|
72
63
|
}, 'k-loading');
|
|
73
|
-
|
|
74
64
|
var buttonGroup = this.buttonGroup;
|
|
75
65
|
var checkType = buttonGroup ? buttonGroup.get('checkType') : 'none';
|
|
76
66
|
var isCheckType = checkType !== 'none';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
|
-
|
|
2
|
+
type TypeStyles = {
|
|
3
3
|
color: string;
|
|
4
4
|
bgColor: string;
|
|
5
5
|
borderColor: string;
|
|
6
6
|
hoverBorderColor: string;
|
|
7
7
|
ghostColor: string;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
type SizeStyles = {
|
|
10
10
|
fontSize: string;
|
|
11
11
|
height: string;
|
|
12
12
|
padding: string;
|
|
@@ -9,52 +9,39 @@ var btnStyles = {
|
|
|
9
9
|
get color() {
|
|
10
10
|
return theme.color.text;
|
|
11
11
|
},
|
|
12
|
-
|
|
13
12
|
bgColor: '#fff',
|
|
14
13
|
lineHeight: '1.15',
|
|
15
|
-
|
|
16
14
|
get padding() {
|
|
17
15
|
return "0 " + theme.default.padding;
|
|
18
16
|
},
|
|
19
|
-
|
|
20
17
|
get borderColor() {
|
|
21
18
|
return theme.color.border;
|
|
22
19
|
},
|
|
23
|
-
|
|
24
20
|
get borderRadius() {
|
|
25
21
|
return theme.borderRadius;
|
|
26
22
|
},
|
|
27
|
-
|
|
28
23
|
get fontSize() {
|
|
29
24
|
return theme.default.fontSize;
|
|
30
25
|
},
|
|
31
|
-
|
|
32
26
|
get height() {
|
|
33
27
|
return theme.default.height;
|
|
34
28
|
},
|
|
35
|
-
|
|
36
29
|
get hoverBorderColor() {
|
|
37
30
|
return theme.color.primary;
|
|
38
31
|
},
|
|
39
|
-
|
|
40
32
|
get hoverColor() {
|
|
41
33
|
return theme.color.primary;
|
|
42
34
|
},
|
|
43
|
-
|
|
44
35
|
// ghost
|
|
45
36
|
ghost: {
|
|
46
37
|
color: '#fff',
|
|
47
|
-
|
|
48
38
|
get hoverColor() {
|
|
49
39
|
return palette(theme.color.primary, -1);
|
|
50
40
|
},
|
|
51
|
-
|
|
52
41
|
borderColor: '#fff',
|
|
53
|
-
|
|
54
42
|
get hoverBorderColor() {
|
|
55
43
|
return palette(theme.color.primary, -1);
|
|
56
44
|
}
|
|
57
|
-
|
|
58
45
|
},
|
|
59
46
|
// icon
|
|
60
47
|
icon: {
|
|
@@ -66,19 +53,15 @@ var btnStyles = {
|
|
|
66
53
|
get color() {
|
|
67
54
|
return theme.color.disabled;
|
|
68
55
|
},
|
|
69
|
-
|
|
70
56
|
get bgColor() {
|
|
71
57
|
return theme.color.disabledBg;
|
|
72
58
|
},
|
|
73
|
-
|
|
74
59
|
get borderColor() {
|
|
75
60
|
return theme.color.disabledBorder;
|
|
76
61
|
},
|
|
77
|
-
|
|
78
62
|
get ghostBorderColor() {
|
|
79
63
|
return theme.color.disabled;
|
|
80
64
|
}
|
|
81
|
-
|
|
82
65
|
}
|
|
83
66
|
};
|
|
84
67
|
var btnTypeStyles = types.reduce(function (memo, type) {
|
|
@@ -86,49 +69,38 @@ var btnTypeStyles = types.reduce(function (memo, type) {
|
|
|
86
69
|
// const color = theme.color;
|
|
87
70
|
memo[type] = {
|
|
88
71
|
color: '#fff',
|
|
89
|
-
|
|
90
72
|
get bgColor() {
|
|
91
73
|
return theme.color[type];
|
|
92
74
|
},
|
|
93
|
-
|
|
94
75
|
get borderColor() {
|
|
95
76
|
return theme.color[type];
|
|
96
77
|
},
|
|
97
|
-
|
|
98
78
|
get hoverBorderColor() {
|
|
99
79
|
return palette(theme.color[type], -1);
|
|
100
80
|
},
|
|
101
|
-
|
|
102
81
|
get ghostColor() {
|
|
103
82
|
return theme.color[type];
|
|
104
83
|
}
|
|
105
|
-
|
|
106
84
|
};
|
|
107
85
|
}
|
|
108
|
-
|
|
109
86
|
return memo;
|
|
110
87
|
}, {});
|
|
111
88
|
var btnActiveStyles = {
|
|
112
89
|
get color() {
|
|
113
90
|
return theme.color.primary;
|
|
114
91
|
},
|
|
115
|
-
|
|
116
92
|
get bgColor() {
|
|
117
93
|
return palette(theme.color.primary, -4);
|
|
118
94
|
},
|
|
119
|
-
|
|
120
95
|
get borderColor() {
|
|
121
96
|
return btnTypeStyles.primary.borderColor;
|
|
122
97
|
},
|
|
123
|
-
|
|
124
98
|
get hoverBorderColor() {
|
|
125
99
|
return btnTypeStyles.primary.hoverBorderColor;
|
|
126
100
|
},
|
|
127
|
-
|
|
128
101
|
get ghostColor() {
|
|
129
102
|
return btnTypeStyles.primary.ghostColor;
|
|
130
103
|
}
|
|
131
|
-
|
|
132
104
|
};
|
|
133
105
|
var btnSizeStyles = sizes.reduce(function (memo, size) {
|
|
134
106
|
// const defaultStyle = theme[size];
|
|
@@ -136,15 +108,12 @@ var btnSizeStyles = sizes.reduce(function (memo, size) {
|
|
|
136
108
|
get fontSize() {
|
|
137
109
|
return theme[size].fontSize;
|
|
138
110
|
},
|
|
139
|
-
|
|
140
111
|
get height() {
|
|
141
112
|
return theme[size].height;
|
|
142
113
|
},
|
|
143
|
-
|
|
144
114
|
get padding() {
|
|
145
115
|
return "0 " + theme[size].padding;
|
|
146
116
|
}
|
|
147
|
-
|
|
148
117
|
};
|
|
149
118
|
return memo;
|
|
150
119
|
}, {});
|
|
@@ -152,45 +121,36 @@ var defaults = deepDefaults({
|
|
|
152
121
|
get transition() {
|
|
153
122
|
return theme.transition.middle;
|
|
154
123
|
},
|
|
155
|
-
|
|
156
124
|
active: btnActiveStyles,
|
|
157
125
|
secondary: {
|
|
158
126
|
get color() {
|
|
159
127
|
return theme.color.primary;
|
|
160
128
|
},
|
|
161
|
-
|
|
162
129
|
get borderColor() {
|
|
163
130
|
return theme.color.primary;
|
|
164
131
|
},
|
|
165
|
-
|
|
166
132
|
get hoverBgColor() {
|
|
167
133
|
return palette(theme.color.primary, -4);
|
|
168
134
|
},
|
|
169
|
-
|
|
170
135
|
get activeBgColor() {
|
|
171
136
|
return palette(theme.color.primary, -3);
|
|
172
137
|
}
|
|
173
|
-
|
|
174
138
|
},
|
|
175
139
|
link: {
|
|
176
140
|
get color() {
|
|
177
141
|
return theme.color.link;
|
|
178
142
|
},
|
|
179
|
-
|
|
180
143
|
get hoverColor() {
|
|
181
144
|
return theme.color.linkHover;
|
|
182
145
|
},
|
|
183
|
-
|
|
184
146
|
get hoverBgColor() {
|
|
185
147
|
return theme.color.hoverBg;
|
|
186
148
|
}
|
|
187
|
-
|
|
188
149
|
},
|
|
189
150
|
none: {
|
|
190
151
|
get hoverBgColor() {
|
|
191
152
|
return theme.color.bg;
|
|
192
153
|
}
|
|
193
|
-
|
|
194
154
|
},
|
|
195
155
|
// ButtonGroup
|
|
196
156
|
group: {
|
|
@@ -198,25 +158,21 @@ var defaults = deepDefaults({
|
|
|
198
158
|
get borderColor() {
|
|
199
159
|
return darken(button.primary.borderColor, 3);
|
|
200
160
|
}
|
|
201
|
-
|
|
202
161
|
},
|
|
203
162
|
warning: {
|
|
204
163
|
get borderColor() {
|
|
205
164
|
return darken(button.warning.borderColor, 3);
|
|
206
165
|
}
|
|
207
|
-
|
|
208
166
|
},
|
|
209
167
|
danger: {
|
|
210
168
|
get borderColor() {
|
|
211
169
|
return darken(button.danger.borderColor, 3);
|
|
212
170
|
}
|
|
213
|
-
|
|
214
171
|
},
|
|
215
172
|
success: {
|
|
216
173
|
get borderColor() {
|
|
217
174
|
return darken(button.success.borderColor, 3);
|
|
218
175
|
}
|
|
219
|
-
|
|
220
176
|
}
|
|
221
177
|
}
|
|
222
178
|
}, btnStyles, btnTypeStyles, btnSizeStyles);
|
|
@@ -230,8 +186,8 @@ export { button };
|
|
|
230
186
|
export function makeButtonStyles(_ref) {
|
|
231
187
|
var iconSide = _ref.iconSide;
|
|
232
188
|
var _button = button,
|
|
233
|
-
|
|
234
|
-
|
|
189
|
+
secondary = _button.secondary,
|
|
190
|
+
link = _button.link;
|
|
235
191
|
return cx(
|
|
236
192
|
/*#__PURE__*/
|
|
237
193
|
// extract static styles to individual css method for performance
|
|
@@ -246,8 +202,8 @@ export function makeButtonStyles(_ref) {
|
|
|
246
202
|
return /*#__PURE__*/css("&.k-", type, "{&,&:hover{background:", palette(styles.bgColor, -2), ";color:", palette(styles.color, -2), ";border-color:", palette(styles.borderColor, -2), ";}}");
|
|
247
203
|
}), ";&,&:hover{background:", palette(button.bgColor, -2), ";color:", palette(button.color, -2), ";border-color:", palette(button.borderColor, -2), ";}.k-icon:not(.k-icon-loading){display:none;}}&:not(button){display:inline-flex;align-items:center;justify-content:center;}&.k-ghost{background:transparent;color:", button.ghost.color, ";border-color:", button.ghost.borderColor, ";&:hover,&:active{background:transparent;}&:hover{color:", button.ghost.hoverColor, ";border-color:", button.ghost.hoverBorderColor, ";}&:active{color:", theme.color.primary, ";border-color:", theme.color.primary, ";}", _mapInstanceProperty(types).call(types, function (type) {
|
|
248
204
|
var _button$type = button[type],
|
|
249
|
-
|
|
250
|
-
|
|
205
|
+
ghostColor = _button$type.ghostColor,
|
|
206
|
+
borderColor = _button$type.borderColor;
|
|
251
207
|
return /*#__PURE__*/css("&.k-", type, "{color:", ghostColor, ";border-color:", borderColor, ";&:hover{color:", palette(ghostColor, -1), ";border-color:", palette(ghostColor, -1), ";}&:active{color:", palette(ghostColor, 1), ";border-color:", palette(ghostColor, 1), ";}}");
|
|
252
208
|
}), "&.k-disabled{&,&:hover{color:", button.disabled.color, ";border-color:", button.disabled.ghostBorderColor, ";background:transparent;}}}"),
|
|
253
209
|
/*#__PURE__*/
|
|
@@ -7,11 +7,9 @@ var typeDefs = {
|
|
|
7
7
|
};
|
|
8
8
|
export var CardColumn = /*#__PURE__*/function (_Component) {
|
|
9
9
|
_inheritsLoose(CardColumn, _Component);
|
|
10
|
-
|
|
11
10
|
function CardColumn() {
|
|
12
11
|
return _Component.apply(this, arguments) || this;
|
|
13
12
|
}
|
|
14
|
-
|
|
15
13
|
return CardColumn;
|
|
16
14
|
}(Component);
|
|
17
15
|
CardColumn.template = template;
|
|
@@ -3,26 +3,21 @@ import { createVNode as _$cv, className as _$cn } from 'intact-vue-next';
|
|
|
3
3
|
import { addStyle, getRestProps } from '../utils';
|
|
4
4
|
export default function ($props, $blocks, $__proto__) {
|
|
5
5
|
var _classNameObj;
|
|
6
|
-
|
|
7
6
|
$blocks || ($blocks = {});
|
|
8
7
|
$props || ($props = {});
|
|
9
8
|
var $this = this;
|
|
10
|
-
|
|
11
9
|
var _this$get = this.get(),
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
children = _this$get.children,
|
|
11
|
+
className = _this$get.className,
|
|
12
|
+
width = _this$get.width,
|
|
13
|
+
style = _this$get.style,
|
|
14
|
+
center = _this$get.center;
|
|
18
15
|
var _style = style;
|
|
19
|
-
|
|
20
16
|
if (width) {
|
|
21
17
|
_style = addStyle(style, {
|
|
22
18
|
width: width
|
|
23
19
|
});
|
|
24
20
|
}
|
|
25
|
-
|
|
26
21
|
var classNameObj = (_classNameObj = {
|
|
27
22
|
'k-card-column': true,
|
|
28
23
|
'k-fluid': !width,
|