@king-design/vue 2.1.4 → 2.1.6
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 +5 -0
- package/components/affix/index.spec.js +108 -84
- package/components/affix/index.vdt.js +8 -5
- package/components/affix/useStyle.js +19 -8
- package/components/badge/index.js +2 -0
- package/components/badge/index.vdt.js +9 -5
- package/components/badge/styles.js +2 -0
- package/components/breadcrumb/index.js +4 -0
- package/components/breadcrumb/index.spec.js +6 -6
- package/components/breadcrumb/index.vdt.js +14 -5
- package/components/breadcrumb/item.js +8 -0
- package/components/breadcrumb/item.vdt.js +6 -3
- package/components/breadcrumb/styles.js +3 -0
- package/components/button/dynamicButton.d.ts +1 -1
- package/components/button/dynamicButton.js +5 -2
- package/components/button/group.js +10 -2
- package/components/button/group.vdt.js +7 -4
- package/components/button/index.js +27 -3
- package/components/button/index.spec.js +96 -74
- package/components/button/index.vdt.js +29 -19
- package/components/button/styles.d.ts +2 -2
- package/components/button/styles.js +48 -4
- package/components/card/column.js +2 -0
- package/components/card/column.vdt.js +10 -5
- package/components/card/index.js +4 -0
- package/components/card/index.vdt.js +16 -4
- package/components/carousel/index.js +19 -1
- package/components/carousel/index.spec.js +163 -127
- package/components/carousel/index.vdt.js +15 -12
- package/components/carousel/item.js +2 -0
- package/components/carousel/item.vdt.js +7 -4
- package/components/carousel/styles.js +1 -0
- package/components/carousel/useAutoplay.js +4 -0
- package/components/carousel/useItems.js +20 -4
- package/components/carousel/useSlide.js +89 -57
- package/components/cascader/index.d.ts +45 -0
- package/components/cascader/index.js +18 -3
- package/components/cascader/index.spec.js +445 -354
- package/components/cascader/index.vdt.js +31 -14
- package/components/cascader/styles.js +6 -0
- package/components/cascader/useFields.js +4 -1
- package/components/cascader/useFilterable.js +19 -2
- package/components/cascader/useLabel.js +9 -1
- package/components/cascader/useLoad.js +35 -22
- package/components/cascader/useValue.d.ts +2 -2
- package/components/cascader/useValue.js +26 -5
- package/components/checkbox/index.js +27 -5
- package/components/checkbox/index.spec.js +171 -129
- package/components/checkbox/index.vdt.js +16 -12
- package/components/checkbox/styles.js +10 -0
- package/components/code/crossDomain.js +9 -2
- package/components/code/index.js +9 -0
- package/components/code/index.spec.js +55 -46
- package/components/code/index.vdt.js +14 -6
- package/components/code/styles.js +1 -0
- package/components/code/useEditor.js +10 -5
- package/components/collapse/index.d.ts +1 -1
- package/components/collapse/index.js +14 -3
- package/components/collapse/index.spec.js +60 -47
- package/components/collapse/index.vdt.js +12 -4
- package/components/collapse/item.js +10 -0
- package/components/collapse/item.vdt.js +14 -7
- package/components/collapse/styles.js +1 -0
- package/components/colorpicker/drag.js +5 -0
- package/components/colorpicker/index.js +4 -0
- package/components/colorpicker/index.spec.js +259 -211
- package/components/colorpicker/index.vdt.js +11 -8
- package/components/colorpicker/panel.js +5 -0
- package/components/colorpicker/panel.vdt.js +26 -21
- package/components/colorpicker/styles.js +13 -2
- package/components/colorpicker/useDrag.js +26 -22
- package/components/colorpicker/useInput.js +16 -0
- package/components/colorpicker/usePointer.js +18 -15
- package/components/colorpicker/useValue.js +7 -2
- package/components/context.d.ts +2 -2
- package/components/context.js +19 -2
- package/components/datepicker/basepicker.d.ts +8 -8
- package/components/datepicker/basepicker.js +90 -20
- package/components/datepicker/calendar.js +11 -0
- package/components/datepicker/calendar.vdt.js +14 -11
- package/components/datepicker/constants.js +1 -0
- package/components/datepicker/dayjs.js +1 -1
- package/components/datepicker/helpers.js +15 -3
- package/components/datepicker/index.d.ts +63 -0
- package/components/datepicker/index.js +32 -6
- package/components/datepicker/index.spec.js +1448 -1141
- package/components/datepicker/index.vdt.js +34 -20
- package/components/datepicker/shortcuts.d.ts +1 -1
- package/components/datepicker/shortcuts.js +4 -0
- package/components/datepicker/styles.js +8 -0
- package/components/datepicker/time.d.ts +1 -1
- package/components/datepicker/time.js +23 -3
- package/components/datepicker/time.vdt.js +5 -4
- package/components/datepicker/useDays.js +9 -2
- package/components/datepicker/useDisabled.js +23 -6
- package/components/datepicker/useFocusDate.js +2 -0
- package/components/datepicker/useFormats.js +15 -6
- package/components/datepicker/useKeyboards.js +36 -20
- package/components/datepicker/useMonths.js +6 -0
- package/components/datepicker/usePanel.js +10 -0
- package/components/datepicker/useShowDate.js +37 -10
- package/components/datepicker/useStatus.js +15 -3
- package/components/datepicker/useValue.js +35 -22
- package/components/datepicker/useYears.js +15 -4
- package/components/diagram/diagram.js +43 -17
- package/components/diagram/diagram.vdt.js +5 -2
- 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 +495 -369
- package/components/diagram/layouts/circle.js +14 -6
- package/components/diagram/layouts/flow.js +15 -7
- package/components/diagram/layouts/layout.js +28 -6
- package/components/diagram/layouts/organic.js +11 -3
- package/components/diagram/layouts/partition.js +12 -4
- package/components/diagram/layouts/radial.js +18 -6
- package/components/diagram/layouts/stack.js +14 -6
- package/components/diagram/layouts/tree.js +21 -11
- package/components/diagram/mxgraph/handler/mxConnectionHandler.js +22 -15
- package/components/diagram/mxgraph/handler/mxConstraintHandler.js +4 -4
- package/components/diagram/mxgraph/handler/mxEdgeHandler.js +15 -11
- package/components/diagram/mxgraph/handler/mxGraphHandler.js +9 -6
- package/components/diagram/mxgraph/handler/mxRubberband.js +4 -4
- package/components/diagram/mxgraph/handler/mxVertexHandler.js +10 -7
- package/components/diagram/mxgraph/index.js +2 -0
- package/components/diagram/mxgraph/mx.js +3 -3
- package/components/diagram/mxgraph/shape/mxCloud.js +2 -2
- package/components/diagram/mxgraph/shape/mxCylinder.js +9 -4
- 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 +12 -6
- package/components/diagram/mxgraph/shape/mxShape.js +1 -0
- 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 +7 -5
- package/components/diagram/mxgraph/view/mxCellEditor.js +29 -16
- package/components/diagram/mxgraph/view/mxCellRenderer.js +2 -0
- package/components/diagram/mxgraph/view/mxGraph.js +32 -14
- package/components/diagram/shapes/base.d.ts +1 -1
- package/components/diagram/shapes/base.js +39 -9
- package/components/diagram/shapes/callout.js +23 -10
- package/components/diagram/shapes/circle.js +10 -3
- package/components/diagram/shapes/document.js +16 -5
- package/components/diagram/shapes/ellipse.js +5 -0
- package/components/diagram/shapes/generateShapes.d.ts +1 -1
- package/components/diagram/shapes/generateShapes.js +9 -0
- package/components/diagram/shapes/hexagon.js +26 -9
- package/components/diagram/shapes/image.js +9 -1
- package/components/diagram/shapes/line.d.ts +2 -2
- package/components/diagram/shapes/line.js +48 -13
- package/components/diagram/shapes/parallelogram.js +26 -9
- package/components/diagram/shapes/rectangle.js +9 -1
- package/components/diagram/shapes/shape.js +35 -6
- package/components/diagram/shapes/square.js +11 -3
- package/components/diagram/shapes/text.js +5 -0
- package/components/diagram/styles.js +1 -0
- package/components/dialog/alert.vdt.js +19 -9
- package/components/dialog/base.js +29 -1
- package/components/dialog/base.vdt.js +29 -14
- package/components/dialog/index.js +31 -6
- package/components/dialog/index.spec.js +554 -406
- package/components/dialog/staticMethods.d.ts +1 -1
- package/components/dialog/staticMethods.js +13 -2
- package/components/dialog/styles.js +11 -0
- package/components/dialog/useDraggable.js +6 -0
- package/components/dialog/useEscClosable.js +12 -4
- package/components/dialog/useFixBody.d.ts +1 -1
- package/components/dialog/useFixBody.js +11 -0
- package/components/dialog/usePosition.js +5 -0
- package/components/drawer/index.js +5 -0
- package/components/drawer/index.spec.js +168 -126
- package/components/drawer/index.vdt.js +9 -3
- package/components/drawer/styles.d.ts +2 -2
- package/components/drawer/styles.js +4 -0
- package/components/dropdown/dropdown.d.ts +2 -2
- package/components/dropdown/dropdown.js +89 -33
- package/components/dropdown/index.js +6 -2
- package/components/dropdown/index.spec.js +496 -388
- package/components/dropdown/item.js +25 -4
- package/components/dropdown/item.vdt.js +8 -5
- package/components/dropdown/menu.js +29 -12
- package/components/dropdown/menu.vdt.js +13 -5
- package/components/dropdown/styles.js +9 -0
- package/components/dropdown/useKeyboard.d.ts +2 -2
- package/components/dropdown/useKeyboard.js +30 -8
- package/components/dropdown/usePosition.d.ts +1 -1
- package/components/dropdown/usePosition.js +22 -12
- package/components/dropdown/useTransition.js +8 -0
- package/components/editable/index.d.ts +1 -1
- package/components/editable/index.js +28 -4
- package/components/editable/index.spec.js +189 -152
- package/components/editable/index.vdt.js +11 -8
- package/components/editable/styles.js +1 -0
- package/components/form/form.js +18 -0
- package/components/form/form.vdt.js +7 -4
- package/components/form/index.spec.js +1280 -1057
- package/components/form/item.d.ts +1 -1
- package/components/form/item.js +12 -0
- package/components/form/item.vdt.js +31 -17
- package/components/form/methods.d.ts +5 -5
- package/components/form/methods.js +12 -2
- package/components/form/styles.js +8 -0
- package/components/form/useDirty.js +7 -2
- package/components/form/useError.js +10 -2
- package/components/form/useValidate.d.ts +1 -1
- package/components/form/useValidate.js +24 -8
- package/components/grid/col.d.ts +3 -3
- package/components/grid/col.js +7 -0
- package/components/grid/col.vdt.js +13 -8
- package/components/grid/constants.d.ts +6 -6
- package/components/grid/row.js +5 -0
- package/components/grid/row.vdt.js +8 -5
- package/components/grid/styles.js +7 -0
- package/components/grid/useBreakpoints.js +5 -0
- package/components/grid/useGutter.js +25 -5
- package/components/icon/index.js +10 -0
- package/components/icon/index.vdt.js +13 -7
- package/components/icon/styles.js +1 -0
- package/components/input/index.d.ts +3 -3
- package/components/input/index.js +14 -0
- package/components/input/index.spec.js +239 -185
- package/components/input/index.vdt.js +49 -39
- package/components/input/search.js +20 -0
- package/components/input/search.vdt.js +9 -6
- package/components/input/styles.js +26 -0
- package/components/input/useAutoRows.js +18 -6
- package/components/input/useAutoWidth.js +5 -0
- package/components/input/useFrozen.js +6 -0
- package/components/input/useShowPassword.js +5 -2
- package/components/layout/aside.js +17 -5
- package/components/layout/aside.vdt.js +9 -5
- package/components/layout/body.js +17 -5
- package/components/layout/footer.js +7 -1
- package/components/layout/header.js +21 -7
- package/components/layout/layout.js +24 -9
- package/components/layout/styles.js +13 -2
- package/components/layout/template.vdt.js +4 -2
- package/components/layout/useParse.js +7 -0
- package/components/menu/index.spec.js +242 -189
- package/components/menu/item.js +16 -3
- package/components/menu/item.vdt.js +32 -20
- package/components/menu/menu.js +11 -2
- package/components/menu/menu.vdt.js +12 -6
- package/components/menu/styles.js +18 -0
- package/components/menu/useDropdown.js +9 -4
- package/components/menu/useExpanded.js +14 -0
- package/components/menu/useHighlight.js +36 -26
- package/components/message/index.spec.js +73 -58
- package/components/message/message.js +19 -0
- package/components/message/message.vdt.js +8 -5
- package/components/message/messages.js +12 -0
- package/components/message/messages.vdt.js +1 -0
- package/components/message/styles.js +9 -0
- package/components/pagination/index.d.ts +1 -1
- package/components/pagination/index.js +46 -10
- package/components/pagination/index.spec.js +173 -133
- package/components/pagination/index.vdt.js +34 -14
- package/components/pagination/styles.js +4 -0
- package/components/portal.d.ts +1 -1
- package/components/portal.js +29 -2
- package/components/position.d.ts +12 -12
- package/components/position.js +88 -32
- package/components/progress/index.d.ts +6 -6
- package/components/progress/index.js +12 -0
- package/components/progress/index.spec.js +191 -143
- package/components/progress/index.vdt.js +11 -8
- package/components/progress/styles.js +6 -0
- package/components/progress/useColor.js +7 -2
- package/components/progress/useStatus.d.ts +1 -1
- package/components/progress/useStatus.js +5 -2
- package/components/radio/index.js +18 -3
- package/components/radio/index.spec.js +149 -111
- package/components/radio/index.vdt.js +17 -14
- package/components/radio/styles.js +10 -0
- package/components/rate/index.js +7 -0
- package/components/rate/index.spec.js +79 -64
- package/components/rate/index.vdt.js +21 -8
- package/components/rate/styles.js +3 -0
- package/components/rate/useActiveValue.js +7 -2
- package/components/scrollSelect/index.d.ts +2 -2
- package/components/scrollSelect/index.js +7 -0
- package/components/scrollSelect/index.spec.js +131 -100
- package/components/scrollSelect/index.vdt.js +11 -6
- package/components/scrollSelect/styles.js +7 -0
- package/components/scrollSelect/useList.js +17 -3
- package/components/scrollSelect/useMouseEvents.js +49 -31
- package/components/scrollSelect/useTranslate.js +11 -1
- package/components/select/base.js +35 -5
- package/components/select/base.vdt.js +38 -23
- package/components/select/group.js +5 -0
- package/components/select/group.vdt.js +10 -4
- package/components/select/index.spec.js +452 -361
- package/components/select/menu.js +5 -0
- package/components/select/menu.vdt.js +33 -18
- package/components/select/option.js +16 -2
- package/components/select/option.vdt.js +14 -7
- package/components/select/select.d.ts +33 -0
- package/components/select/select.js +20 -3
- package/components/select/select.vdt.js +17 -9
- package/components/select/styles.js +33 -0
- package/components/select/useBaseLabel.d.ts +1 -1
- package/components/select/useBaseLabel.js +17 -4
- package/components/select/useCard.js +4 -0
- package/components/select/useEqualWidth.js +1 -0
- package/components/select/useFilterable.js +27 -5
- package/components/select/useFocusout.js +8 -0
- package/components/select/useInput.js +10 -6
- package/components/select/useLabel.js +13 -3
- package/components/select/useSearchable.js +10 -0
- package/components/skeleton/item.d.ts +1 -1
- package/components/skeleton/item.js +4 -0
- package/components/skeleton/item.vdt.js +6 -1
- package/components/skeleton/skeleton.js +4 -0
- package/components/skeleton/skeleton.vdt.js +12 -6
- package/components/skeleton/style.d.ts +1 -1
- package/components/skeleton/style.js +1 -0
- package/components/slider/index.d.ts +1 -1
- package/components/slider/index.js +7 -0
- package/components/slider/index.spec.js +585 -467
- package/components/slider/index.vdt.js +45 -32
- package/components/slider/styles.js +14 -0
- package/components/slider/useClick.js +11 -2
- package/components/slider/useDraggable.js +34 -23
- package/components/slider/useKeyboard.js +18 -7
- package/components/slider/useMarks.d.ts +5 -5
- package/components/slider/useMarks.js +13 -5
- package/components/slider/usePoints.d.ts +2 -2
- package/components/slider/usePoints.js +21 -7
- package/components/slider/useStyles.d.ts +1 -1
- package/components/slider/useStyles.js +10 -5
- package/components/slider/useTooltip.js +10 -2
- package/components/slider/useValue.d.ts +1 -1
- package/components/slider/useValue.js +22 -7
- package/components/spin/index.js +4 -0
- package/components/spin/index.vdt.js +11 -4
- package/components/spin/styles.js +2 -0
- package/components/spinner/index.d.ts +4 -4
- package/components/spinner/index.js +24 -9
- package/components/spinner/index.spec.js +460 -359
- package/components/spinner/index.vdt.js +13 -10
- package/components/spinner/styles.js +3 -0
- package/components/spinner/useChange.js +16 -4
- package/components/spinner/useFormatter.js +16 -6
- package/components/spinner/useStep.d.ts +3 -3
- package/components/spinner/useStep.js +20 -2
- package/components/spinner/useValue.js +26 -11
- package/components/split/index.js +7 -0
- package/components/split/index.spec.js +267 -223
- package/components/split/index.vdt.js +17 -8
- package/components/split/style.d.ts +1 -1
- package/components/split/style.js +8 -0
- package/components/split/useDraggable.js +35 -11
- package/components/split/useSize.js +5 -2
- package/components/steps/context.d.ts +2 -2
- package/components/steps/index.js +10 -2
- package/components/steps/index.spec.js +27 -21
- package/components/steps/index.vdt.js +10 -8
- package/components/steps/step.js +2 -0
- package/components/steps/step.vdt.js +12 -8
- package/components/steps/styles.js +27 -0
- package/components/switch/index.js +23 -2
- package/components/switch/index.spec.js +224 -188
- package/components/switch/index.vdt.js +32 -16
- package/components/switch/styles.js +14 -3
- package/components/switch/useDraggable.js +18 -10
- package/components/table/cell.js +6 -0
- package/components/table/cell.vdt.js +21 -14
- package/components/table/column.d.ts +1 -1
- package/components/table/column.js +5 -0
- package/components/table/column.vdt.js +30 -19
- package/components/table/exportTable.js +56 -45
- package/components/table/index.spec.js +984 -780
- package/components/table/row.d.ts +1 -1
- package/components/table/row.js +41 -12
- package/components/table/row.vdt.js +39 -27
- package/components/table/styles.js +11 -0
- package/components/table/table.d.ts +5 -5
- package/components/table/table.js +50 -18
- package/components/table/table.vdt.js +85 -61
- package/components/table/useChecked.d.ts +1 -1
- package/components/table/useChecked.js +61 -20
- package/components/table/useColumns.js +16 -3
- package/components/table/useDisableRow.js +12 -2
- package/components/table/useDraggable.js +12 -4
- package/components/table/useExpandable.js +5 -2
- package/components/table/useFixedColumns.d.ts +1 -1
- package/components/table/useFixedColumns.js +23 -4
- package/components/table/useGroup.d.ts +1 -1
- package/components/table/useGroup.js +24 -7
- package/components/table/useMerge.d.ts +4 -4
- package/components/table/useMerge.js +14 -2
- package/components/table/usePagination.js +18 -4
- package/components/table/useResizable.js +10 -2
- package/components/table/useRestRowStatus.js +6 -2
- package/components/table/useScroll.d.ts +1 -1
- package/components/table/useScroll.js +3 -0
- package/components/table/useSelected.js +5 -2
- package/components/table/useSortable.js +8 -2
- package/components/table/useStickyHeader.js +7 -3
- package/components/table/useStickyScrollbar.js +16 -6
- package/components/table/useTree.js +12 -1
- package/components/table/useWidth.js +30 -14
- package/components/tabs/index.js +51 -29
- package/components/tabs/index.spec.js +74 -56
- package/components/tabs/index.vdt.js +16 -13
- package/components/tabs/styles.js +16 -0
- package/components/tabs/tab.js +10 -0
- package/components/tabs/tab.vdt.js +10 -6
- package/components/tabs/useActiveBar.js +11 -2
- package/components/tabs/useScroll.js +20 -4
- package/components/tag/base.js +8 -0
- package/components/tag/index.js +4 -2
- package/components/tag/index.spec.js +25 -19
- package/components/tag/index.vdt.js +15 -8
- package/components/tag/styles.js +9 -0
- package/components/timeline/item.js +4 -0
- package/components/timeline/item.vdt.js +9 -4
- package/components/timeline/styles.d.ts +2 -2
- package/components/timeline/styles.js +4 -0
- package/components/timeline/timeline.js +2 -0
- package/components/timeline/timeline.vdt.js +5 -2
- package/components/timepicker/index.js +7 -2
- package/components/timepicker/index.spec.js +368 -293
- package/components/timepicker/panelPicker.d.ts +54 -0
- package/components/timepicker/panelPicker.js +11 -2
- package/components/timepicker/panelPicker.vdt.js +24 -14
- package/components/timepicker/selectPicker.js +5 -0
- package/components/timepicker/selectPicker.vdt.js +10 -5
- package/components/timepicker/styles.js +1 -0
- package/components/timepicker/useDisabled.js +4 -2
- package/components/timepicker/useFormats.js +13 -4
- package/components/timepicker/useStep.d.ts +1 -1
- package/components/timepicker/useStep.js +17 -8
- package/components/timepicker/useValue.js +21 -16
- package/components/tip/index.js +2 -0
- package/components/tip/index.vdt.js +17 -5
- package/components/tip/styles.js +3 -0
- package/components/tooltip/content.js +28 -0
- package/components/tooltip/content.vdt.js +25 -15
- package/components/tooltip/index.js +7 -3
- package/components/tooltip/index.spec.js +572 -434
- package/components/tooltip/styles.d.ts +1 -1
- package/components/tooltip/styles.js +10 -2
- package/components/tooltip/tooltip.js +15 -2
- package/components/tooltip/useArrow.js +14 -11
- package/components/transfer/index.d.ts +1 -1
- package/components/transfer/index.js +13 -1
- package/components/transfer/index.spec.js +194 -159
- package/components/transfer/index.vdt.js +34 -16
- package/components/transfer/styles.js +10 -0
- package/components/transfer/useCheck.d.ts +1 -1
- package/components/transfer/useCheck.js +15 -1
- package/components/transfer/useFilter.d.ts +1 -1
- package/components/transfer/useFilter.js +30 -9
- package/components/transfer/useTransfer.js +26 -10
- package/components/tree/index.d.ts +3 -3
- package/components/tree/index.js +22 -4
- package/components/tree/index.spec.js +355 -285
- package/components/tree/index.vdt.js +23 -12
- package/components/tree/styles.js +16 -2
- package/components/tree/useChecked.js +26 -3
- package/components/tree/useDraggable.js +42 -12
- package/components/tree/useExpanded.js +43 -26
- package/components/tree/useFilter.js +10 -3
- package/components/tree/useNodes.d.ts +1 -1
- package/components/tree/useNodes.js +4 -0
- package/components/tree/useSelected.js +38 -21
- package/components/tree/useTransitionEvent.js +5 -3
- package/components/treeSelect/index.d.ts +27 -0
- package/components/treeSelect/index.js +36 -9
- package/components/treeSelect/index.spec.js +160 -123
- package/components/treeSelect/index.vdt.js +20 -14
- package/components/treeSelect/styles.js +1 -0
- package/components/treeSelect/useValue.js +11 -0
- package/components/types.d.ts +3 -3
- package/components/upload/ajaxUploader.d.ts +1 -1
- package/components/upload/ajaxUploader.js +17 -0
- package/components/upload/index.d.ts +4 -4
- package/components/upload/index.js +14 -0
- package/components/upload/index.spec.js +249 -142
- package/components/upload/index.vdt.js +27 -12
- package/components/upload/styles.js +30 -0
- package/components/upload/useAccept.js +10 -2
- package/components/upload/useDrag.js +7 -0
- package/components/upload/useFiles.js +145 -103
- package/components/upload/useShowImage.js +3 -0
- package/components/upload/useUpload.js +69 -47
- package/components/utils.d.ts +3 -3
- package/components/utils.js +47 -12
- package/components/virtual.js +37 -9
- package/components/wave/index.js +31 -5
- package/hooks/useDelayClose.js +6 -2
- package/hooks/useDocumentClick.js +16 -8
- package/hooks/useDraggable.d.ts +1 -1
- package/hooks/useDraggable.js +9 -0
- package/hooks/useKeyboard.d.ts +3 -3
- package/hooks/useKeyboard.js +10 -0
- package/hooks/useMouseOutsidable.js +8 -0
- package/hooks/useReceive.d.ts +1 -1
- package/hooks/useReceive.js +4 -0
- package/hooks/useRecordComponent.js +6 -0
- package/hooks/useRouter.js +18 -7
- package/hooks/useShowHideEvents.js +3 -0
- package/hooks/useState.d.ts +2 -2
- package/hooks/useState.js +6 -2
- package/i18n/en-US.js +1 -0
- package/i18n/index.d.ts +1 -1
- package/i18n/index.js +7 -0
- package/index.d.ts +2 -2
- package/index.js +3 -2
- package/package.json +2 -2
- package/styles/global.js +3 -2
- package/styles/keyframes.js +1 -0
- package/styles/theme.d.ts +1 -1
- package/styles/theme.js +7 -4
- package/styles/utils.d.ts +1 -1
- package/styles/utils.js +17 -3
- package/yarn-error.log +0 -1013
|
@@ -4,14 +4,17 @@ import { getRestProps } from '../utils';
|
|
|
4
4
|
import { makeButtonGroupStyles } from './styles';
|
|
5
5
|
export default function ($props, $blocks, $__proto__) {
|
|
6
6
|
var _classNameObj;
|
|
7
|
+
|
|
7
8
|
$blocks || ($blocks = {});
|
|
8
9
|
$props || ($props = {});
|
|
9
10
|
var $this = this;
|
|
11
|
+
|
|
10
12
|
var _this$get = this.get(),
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
className = _this$get.className,
|
|
14
|
+
vertical = _this$get.vertical,
|
|
15
|
+
children = _this$get.children,
|
|
16
|
+
fluid = _this$get.fluid;
|
|
17
|
+
|
|
15
18
|
var classNameObj = (_classNameObj = {
|
|
16
19
|
'k-btns': true,
|
|
17
20
|
'k-vertical': vertical,
|
|
@@ -21,6 +21,7 @@ var typeDefs = {
|
|
|
21
21
|
tabindex: [String, Number],
|
|
22
22
|
ghost: Boolean
|
|
23
23
|
};
|
|
24
|
+
|
|
24
25
|
var defaults = function defaults() {
|
|
25
26
|
return {
|
|
26
27
|
type: 'default',
|
|
@@ -30,66 +31,89 @@ var defaults = function defaults() {
|
|
|
30
31
|
tabindex: '0'
|
|
31
32
|
};
|
|
32
33
|
};
|
|
34
|
+
|
|
33
35
|
export var Button = /*#__PURE__*/function (_Component) {
|
|
34
36
|
_inheritsLoose(Button, _Component);
|
|
37
|
+
|
|
35
38
|
function Button() {
|
|
36
39
|
var _context;
|
|
40
|
+
|
|
37
41
|
var _this;
|
|
42
|
+
|
|
38
43
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
39
44
|
args[_key] = arguments[_key];
|
|
40
45
|
}
|
|
46
|
+
|
|
41
47
|
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
42
48
|
_this.buttonGroup = inject(BUTTON_GROUP, null);
|
|
43
49
|
_this.elementRef = createRef();
|
|
44
50
|
return _this;
|
|
45
51
|
}
|
|
52
|
+
|
|
46
53
|
var _proto = Button.prototype;
|
|
54
|
+
|
|
47
55
|
_proto.showLoading = function showLoading() {
|
|
48
56
|
this.set('loading', true);
|
|
49
57
|
};
|
|
58
|
+
|
|
50
59
|
_proto.hideLoading = function hideLoading() {
|
|
51
60
|
this.set('loading', false);
|
|
52
61
|
};
|
|
62
|
+
|
|
53
63
|
_proto.disable = function disable() {
|
|
54
64
|
this.set('disabled', true);
|
|
55
65
|
};
|
|
66
|
+
|
|
56
67
|
_proto.enable = function enable() {
|
|
57
68
|
this.set('disabled', false);
|
|
58
69
|
};
|
|
70
|
+
|
|
59
71
|
_proto.isChecked = function isChecked() {
|
|
60
72
|
var group = this.buttonGroup;
|
|
61
73
|
if (!group) return false;
|
|
74
|
+
|
|
62
75
|
var _group$get = group.get(),
|
|
63
|
-
|
|
64
|
-
|
|
76
|
+
checkType = _group$get.checkType,
|
|
77
|
+
groupValue = _group$get.value;
|
|
78
|
+
|
|
65
79
|
var _this$get = this.get(),
|
|
66
|
-
|
|
80
|
+
value = _this$get.value;
|
|
81
|
+
|
|
67
82
|
return value !== undefined ? checkType === 'radio' ? value === groupValue : checkType === 'checkbox' ? Array.isArray(groupValue) && !!~groupValue.indexOf(value) : false : false;
|
|
68
83
|
};
|
|
84
|
+
|
|
69
85
|
_proto.onClick = function onClick(e) {
|
|
70
86
|
if (this.get('disabled') || this.get('loading')) {
|
|
71
87
|
e.preventDefault();
|
|
72
88
|
return;
|
|
73
89
|
}
|
|
90
|
+
|
|
74
91
|
var buttonGroup = this.buttonGroup;
|
|
92
|
+
|
|
75
93
|
if (buttonGroup) {
|
|
76
94
|
var value = this.get('value');
|
|
95
|
+
|
|
77
96
|
if (value !== undefined) {
|
|
78
97
|
buttonGroup.setValue(value);
|
|
79
98
|
}
|
|
80
99
|
}
|
|
100
|
+
|
|
81
101
|
e.$component = this;
|
|
82
102
|
this.trigger('click', e);
|
|
83
103
|
};
|
|
104
|
+
|
|
84
105
|
_proto.onMouseUp = function onMouseUp(e) {
|
|
85
106
|
// when click, blur it to remove the focus style
|
|
86
107
|
this.elementRef.value.blur();
|
|
87
108
|
this.trigger('mouseup', e);
|
|
88
109
|
};
|
|
110
|
+
|
|
89
111
|
return Button;
|
|
90
112
|
}(Component);
|
|
91
113
|
Button.template = template;
|
|
92
114
|
Button.typeDefs = typeDefs;
|
|
93
115
|
Button.defaults = defaults;
|
|
116
|
+
|
|
94
117
|
__decorate([bind], Button.prototype, "onClick", null);
|
|
118
|
+
|
|
95
119
|
__decorate([bind], Button.prototype, "onMouseUp", null);
|
|
@@ -12,93 +12,115 @@ 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
|
+
|
|
15
16
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
16
|
-
while (1)
|
|
17
|
-
|
|
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
|
-
|
|
17
|
+
while (1) {
|
|
18
|
+
switch (_context.prev = _context.next) {
|
|
19
|
+
case 0:
|
|
20
|
+
_mount = mount(GroupDemo), instance = _mount[0];
|
|
21
|
+
radioShanggaiElement = findDomFromVNode(instance.refs.__radioShanghai.$lastInput, true);
|
|
22
|
+
dispatchEvent(radioShanggaiElement, 'click');
|
|
23
|
+
_context.next = 5;
|
|
24
|
+
return wait();
|
|
25
|
+
|
|
26
|
+
case 5:
|
|
27
|
+
expect(instance.get('city')).to.eql('shanghai');
|
|
28
|
+
checkboxShanghaiElement = findDomFromVNode(instance.refs.__checkboxShanghai.$lastInput, true);
|
|
29
|
+
dispatchEvent(checkboxShanghaiElement, 'click');
|
|
30
|
+
_context.next = 10;
|
|
31
|
+
return wait();
|
|
32
|
+
|
|
33
|
+
case 10:
|
|
34
|
+
expect(instance.get('cities')).to.eql(['shanghai']);
|
|
35
|
+
dispatchEvent(checkboxShanghaiElement, 'click');
|
|
36
|
+
_context.next = 14;
|
|
37
|
+
return wait();
|
|
38
|
+
|
|
39
|
+
case 14:
|
|
40
|
+
expect(instance.get('cities')).to.eql([]); // should set value correctly, even if the type of value is not an array
|
|
41
|
+
|
|
42
|
+
instance.set('cities', '');
|
|
43
|
+
dispatchEvent(checkboxShanghaiElement, 'click');
|
|
44
|
+
_context.next = 19;
|
|
45
|
+
return wait();
|
|
46
|
+
|
|
47
|
+
case 19:
|
|
48
|
+
expect(instance.get('cities')).to.eql(['shanghai']);
|
|
49
|
+
|
|
50
|
+
case 20:
|
|
51
|
+
case "end":
|
|
52
|
+
return _context.stop();
|
|
53
|
+
}
|
|
46
54
|
}
|
|
47
55
|
}, _callee);
|
|
48
56
|
})));
|
|
49
57
|
it('method test', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
50
58
|
var _mount2, instance, element;
|
|
59
|
+
|
|
51
60
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
52
|
-
while (1)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
61
|
+
while (1) {
|
|
62
|
+
switch (_context2.prev = _context2.next) {
|
|
63
|
+
case 0:
|
|
64
|
+
_mount2 = mount(Button), instance = _mount2[0], element = _mount2[1];
|
|
65
|
+
instance.showLoading();
|
|
66
|
+
_context2.next = 4;
|
|
67
|
+
return wait();
|
|
68
|
+
|
|
69
|
+
case 4:
|
|
70
|
+
expect(element.classList.contains('k-loading')).to.be.true;
|
|
71
|
+
instance.hideLoading();
|
|
72
|
+
_context2.next = 8;
|
|
73
|
+
return wait();
|
|
74
|
+
|
|
75
|
+
case 8:
|
|
76
|
+
expect(element.classList.contains('k-loading')).to.be.false;
|
|
77
|
+
instance.disable();
|
|
78
|
+
_context2.next = 12;
|
|
79
|
+
return wait();
|
|
80
|
+
|
|
81
|
+
case 12:
|
|
82
|
+
expect(element.classList.contains('k-disabled')).to.be.true;
|
|
83
|
+
instance.enable();
|
|
84
|
+
_context2.next = 16;
|
|
85
|
+
return wait();
|
|
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
|
+
}
|
|
78
94
|
}
|
|
79
95
|
}, _callee2);
|
|
80
96
|
})));
|
|
81
97
|
it('should blur on mouse up', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
82
98
|
var _mount3, element;
|
|
99
|
+
|
|
83
100
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
84
|
-
while (1)
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
while (1) {
|
|
102
|
+
switch (_context3.prev = _context3.next) {
|
|
103
|
+
case 0:
|
|
104
|
+
_mount3 = mount(Button), element = _mount3[1];
|
|
105
|
+
element.focus(); // test color of focus style
|
|
106
|
+
|
|
107
|
+
_context3.next = 4;
|
|
108
|
+
return wait(500);
|
|
109
|
+
|
|
110
|
+
case 4:
|
|
111
|
+
// has transition
|
|
112
|
+
expect(tinycolor(getComputedStyle(element).color).toHexString()).to.eql(buttonStyles.hoverColor);
|
|
113
|
+
dispatchEvent(element, 'mouseup');
|
|
114
|
+
_context3.next = 8;
|
|
115
|
+
return wait(500);
|
|
116
|
+
|
|
117
|
+
case 8:
|
|
118
|
+
expect(tinycolor(getComputedStyle(element).color).toHexString()).to.eql(buttonStyles.color);
|
|
119
|
+
|
|
120
|
+
case 9:
|
|
121
|
+
case "end":
|
|
122
|
+
return _context3.stop();
|
|
123
|
+
}
|
|
102
124
|
}
|
|
103
125
|
}, _callee3);
|
|
104
126
|
})));
|
|
@@ -8,32 +8,37 @@ 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
|
+
|
|
11
12
|
$blocks || ($blocks = {});
|
|
12
13
|
$props || ($props = {});
|
|
13
14
|
var $this = this;
|
|
15
|
+
|
|
14
16
|
var _this$get = this.get(),
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
17
|
+
type = _this$get.type,
|
|
18
|
+
className = _this$get.className,
|
|
19
|
+
size = _this$get.size,
|
|
20
|
+
icon = _this$get.icon,
|
|
21
|
+
circle = _this$get.circle,
|
|
22
|
+
ref = _this$get.ref,
|
|
23
|
+
key = _this$get.key,
|
|
24
|
+
tabindex = _this$get.tabindex,
|
|
25
|
+
tagName = _this$get.tagName,
|
|
26
|
+
htmlType = _this$get.htmlType,
|
|
27
|
+
fluid = _this$get.fluid,
|
|
28
|
+
children = _this$get.children,
|
|
29
|
+
loading = _this$get.loading,
|
|
30
|
+
disabled = _this$get.disabled,
|
|
31
|
+
name = _this$get.name,
|
|
32
|
+
ghost = _this$get.ghost;
|
|
33
|
+
|
|
31
34
|
var checked = this.isChecked();
|
|
35
|
+
|
|
32
36
|
var isIcon = function isIcon(child) {
|
|
33
37
|
return child.tag === Icon || child.className && child.className.indexOf('icon') > -1;
|
|
34
38
|
};
|
|
35
|
-
|
|
36
|
-
// hack for loading transition of width
|
|
39
|
+
|
|
40
|
+
var iconSide; // hack for loading transition of width
|
|
41
|
+
|
|
37
42
|
if (!icon && Array.isArray(children)) {
|
|
38
43
|
children.forEach(function (child, index) {
|
|
39
44
|
if (child) {
|
|
@@ -50,17 +55,22 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
50
55
|
}
|
|
51
56
|
});
|
|
52
57
|
}
|
|
58
|
+
|
|
53
59
|
var classNameObj = (_classNameObj = {
|
|
54
60
|
'k-btn': true
|
|
55
61
|
}, _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({
|
|
56
62
|
iconSide: iconSide
|
|
57
63
|
})] = true, _classNameObj);
|
|
64
|
+
|
|
58
65
|
var loadingIcon = _$cc(Icon, {
|
|
59
66
|
'className': 'ion-load-c k-icon-loading',
|
|
60
|
-
'size': size
|
|
67
|
+
'size': size
|
|
68
|
+
/*loadingSizeMap[size]*/
|
|
69
|
+
,
|
|
61
70
|
'key': 'k-loading',
|
|
62
71
|
'rotate': true
|
|
63
72
|
}, 'k-loading');
|
|
73
|
+
|
|
64
74
|
var buttonGroup = this.buttonGroup;
|
|
65
75
|
var checkType = buttonGroup ? buttonGroup.get('checkType') : 'none';
|
|
66
76
|
var isCheckType = checkType !== 'none';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
|
-
type TypeStyles = {
|
|
2
|
+
declare 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
|
-
type SizeStyles = {
|
|
9
|
+
declare type SizeStyles = {
|
|
10
10
|
fontSize: string;
|
|
11
11
|
height: string;
|
|
12
12
|
padding: string;
|
|
@@ -9,39 +9,52 @@ var btnStyles = {
|
|
|
9
9
|
get color() {
|
|
10
10
|
return theme.color.text;
|
|
11
11
|
},
|
|
12
|
+
|
|
12
13
|
bgColor: '#fff',
|
|
13
14
|
lineHeight: '1.15',
|
|
15
|
+
|
|
14
16
|
get padding() {
|
|
15
17
|
return "0 " + theme.default.padding;
|
|
16
18
|
},
|
|
19
|
+
|
|
17
20
|
get borderColor() {
|
|
18
21
|
return theme.color.border;
|
|
19
22
|
},
|
|
23
|
+
|
|
20
24
|
get borderRadius() {
|
|
21
25
|
return theme.borderRadius;
|
|
22
26
|
},
|
|
27
|
+
|
|
23
28
|
get fontSize() {
|
|
24
29
|
return theme.default.fontSize;
|
|
25
30
|
},
|
|
31
|
+
|
|
26
32
|
get height() {
|
|
27
33
|
return theme.default.height;
|
|
28
34
|
},
|
|
35
|
+
|
|
29
36
|
get hoverBorderColor() {
|
|
30
37
|
return theme.color.primary;
|
|
31
38
|
},
|
|
39
|
+
|
|
32
40
|
get hoverColor() {
|
|
33
41
|
return theme.color.primary;
|
|
34
42
|
},
|
|
43
|
+
|
|
35
44
|
// ghost
|
|
36
45
|
ghost: {
|
|
37
46
|
color: '#fff',
|
|
47
|
+
|
|
38
48
|
get hoverColor() {
|
|
39
49
|
return palette(theme.color.primary, -1);
|
|
40
50
|
},
|
|
51
|
+
|
|
41
52
|
borderColor: '#fff',
|
|
53
|
+
|
|
42
54
|
get hoverBorderColor() {
|
|
43
55
|
return palette(theme.color.primary, -1);
|
|
44
56
|
}
|
|
57
|
+
|
|
45
58
|
},
|
|
46
59
|
// icon
|
|
47
60
|
icon: {
|
|
@@ -53,15 +66,19 @@ var btnStyles = {
|
|
|
53
66
|
get color() {
|
|
54
67
|
return theme.color.disabled;
|
|
55
68
|
},
|
|
69
|
+
|
|
56
70
|
get bgColor() {
|
|
57
71
|
return theme.color.disabledBg;
|
|
58
72
|
},
|
|
73
|
+
|
|
59
74
|
get borderColor() {
|
|
60
75
|
return theme.color.disabledBorder;
|
|
61
76
|
},
|
|
77
|
+
|
|
62
78
|
get ghostBorderColor() {
|
|
63
79
|
return theme.color.disabled;
|
|
64
80
|
}
|
|
81
|
+
|
|
65
82
|
}
|
|
66
83
|
};
|
|
67
84
|
var btnTypeStyles = types.reduce(function (memo, type) {
|
|
@@ -69,38 +86,49 @@ var btnTypeStyles = types.reduce(function (memo, type) {
|
|
|
69
86
|
// const color = theme.color;
|
|
70
87
|
memo[type] = {
|
|
71
88
|
color: '#fff',
|
|
89
|
+
|
|
72
90
|
get bgColor() {
|
|
73
91
|
return theme.color[type];
|
|
74
92
|
},
|
|
93
|
+
|
|
75
94
|
get borderColor() {
|
|
76
95
|
return theme.color[type];
|
|
77
96
|
},
|
|
97
|
+
|
|
78
98
|
get hoverBorderColor() {
|
|
79
99
|
return palette(theme.color[type], -1);
|
|
80
100
|
},
|
|
101
|
+
|
|
81
102
|
get ghostColor() {
|
|
82
103
|
return theme.color[type];
|
|
83
104
|
}
|
|
105
|
+
|
|
84
106
|
};
|
|
85
107
|
}
|
|
108
|
+
|
|
86
109
|
return memo;
|
|
87
110
|
}, {});
|
|
88
111
|
var btnActiveStyles = {
|
|
89
112
|
get color() {
|
|
90
113
|
return theme.color.primary;
|
|
91
114
|
},
|
|
115
|
+
|
|
92
116
|
get bgColor() {
|
|
93
117
|
return palette(theme.color.primary, -4);
|
|
94
118
|
},
|
|
119
|
+
|
|
95
120
|
get borderColor() {
|
|
96
121
|
return btnTypeStyles.primary.borderColor;
|
|
97
122
|
},
|
|
123
|
+
|
|
98
124
|
get hoverBorderColor() {
|
|
99
125
|
return btnTypeStyles.primary.hoverBorderColor;
|
|
100
126
|
},
|
|
127
|
+
|
|
101
128
|
get ghostColor() {
|
|
102
129
|
return btnTypeStyles.primary.ghostColor;
|
|
103
130
|
}
|
|
131
|
+
|
|
104
132
|
};
|
|
105
133
|
var btnSizeStyles = sizes.reduce(function (memo, size) {
|
|
106
134
|
// const defaultStyle = theme[size];
|
|
@@ -108,12 +136,15 @@ var btnSizeStyles = sizes.reduce(function (memo, size) {
|
|
|
108
136
|
get fontSize() {
|
|
109
137
|
return theme[size].fontSize;
|
|
110
138
|
},
|
|
139
|
+
|
|
111
140
|
get height() {
|
|
112
141
|
return theme[size].height;
|
|
113
142
|
},
|
|
143
|
+
|
|
114
144
|
get padding() {
|
|
115
145
|
return "0 " + theme[size].padding;
|
|
116
146
|
}
|
|
147
|
+
|
|
117
148
|
};
|
|
118
149
|
return memo;
|
|
119
150
|
}, {});
|
|
@@ -121,36 +152,45 @@ var defaults = deepDefaults({
|
|
|
121
152
|
get transition() {
|
|
122
153
|
return theme.transition.middle;
|
|
123
154
|
},
|
|
155
|
+
|
|
124
156
|
active: btnActiveStyles,
|
|
125
157
|
secondary: {
|
|
126
158
|
get color() {
|
|
127
159
|
return theme.color.primary;
|
|
128
160
|
},
|
|
161
|
+
|
|
129
162
|
get borderColor() {
|
|
130
163
|
return theme.color.primary;
|
|
131
164
|
},
|
|
165
|
+
|
|
132
166
|
get hoverBgColor() {
|
|
133
167
|
return palette(theme.color.primary, -4);
|
|
134
168
|
},
|
|
169
|
+
|
|
135
170
|
get activeBgColor() {
|
|
136
171
|
return palette(theme.color.primary, -3);
|
|
137
172
|
}
|
|
173
|
+
|
|
138
174
|
},
|
|
139
175
|
link: {
|
|
140
176
|
get color() {
|
|
141
177
|
return theme.color.link;
|
|
142
178
|
},
|
|
179
|
+
|
|
143
180
|
get hoverColor() {
|
|
144
181
|
return theme.color.linkHover;
|
|
145
182
|
},
|
|
183
|
+
|
|
146
184
|
get hoverBgColor() {
|
|
147
185
|
return theme.color.hoverBg;
|
|
148
186
|
}
|
|
187
|
+
|
|
149
188
|
},
|
|
150
189
|
none: {
|
|
151
190
|
get hoverBgColor() {
|
|
152
191
|
return theme.color.bg;
|
|
153
192
|
}
|
|
193
|
+
|
|
154
194
|
},
|
|
155
195
|
// ButtonGroup
|
|
156
196
|
group: {
|
|
@@ -158,21 +198,25 @@ var defaults = deepDefaults({
|
|
|
158
198
|
get borderColor() {
|
|
159
199
|
return darken(button.primary.borderColor, 3);
|
|
160
200
|
}
|
|
201
|
+
|
|
161
202
|
},
|
|
162
203
|
warning: {
|
|
163
204
|
get borderColor() {
|
|
164
205
|
return darken(button.warning.borderColor, 3);
|
|
165
206
|
}
|
|
207
|
+
|
|
166
208
|
},
|
|
167
209
|
danger: {
|
|
168
210
|
get borderColor() {
|
|
169
211
|
return darken(button.danger.borderColor, 3);
|
|
170
212
|
}
|
|
213
|
+
|
|
171
214
|
},
|
|
172
215
|
success: {
|
|
173
216
|
get borderColor() {
|
|
174
217
|
return darken(button.success.borderColor, 3);
|
|
175
218
|
}
|
|
219
|
+
|
|
176
220
|
}
|
|
177
221
|
}
|
|
178
222
|
}, btnStyles, btnTypeStyles, btnSizeStyles);
|
|
@@ -186,8 +230,8 @@ export { button };
|
|
|
186
230
|
export function makeButtonStyles(_ref) {
|
|
187
231
|
var iconSide = _ref.iconSide;
|
|
188
232
|
var _button = button,
|
|
189
|
-
|
|
190
|
-
|
|
233
|
+
secondary = _button.secondary,
|
|
234
|
+
link = _button.link;
|
|
191
235
|
return cx(
|
|
192
236
|
/*#__PURE__*/
|
|
193
237
|
// extract static styles to individual css method for performance
|
|
@@ -202,8 +246,8 @@ export function makeButtonStyles(_ref) {
|
|
|
202
246
|
return /*#__PURE__*/css("&.k-", type, "{&,&:hover{background:", palette(styles.bgColor, -2), ";color:", palette(styles.color, -2), ";border-color:", palette(styles.borderColor, -2), ";}}");
|
|
203
247
|
}), ";&,&: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) {
|
|
204
248
|
var _button$type = button[type],
|
|
205
|
-
|
|
206
|
-
|
|
249
|
+
ghostColor = _button$type.ghostColor,
|
|
250
|
+
borderColor = _button$type.borderColor;
|
|
207
251
|
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), ";}}");
|
|
208
252
|
}), "&.k-disabled{&,&:hover{color:", button.disabled.color, ";border-color:", button.disabled.ghostBorderColor, ";background:transparent;}}}"),
|
|
209
253
|
/*#__PURE__*/
|
|
@@ -7,9 +7,11 @@ var typeDefs = {
|
|
|
7
7
|
};
|
|
8
8
|
export var CardColumn = /*#__PURE__*/function (_Component) {
|
|
9
9
|
_inheritsLoose(CardColumn, _Component);
|
|
10
|
+
|
|
10
11
|
function CardColumn() {
|
|
11
12
|
return _Component.apply(this, arguments) || this;
|
|
12
13
|
}
|
|
14
|
+
|
|
13
15
|
return CardColumn;
|
|
14
16
|
}(Component);
|
|
15
17
|
CardColumn.template = template;
|
|
@@ -3,21 +3,26 @@ 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
|
+
|
|
6
7
|
$blocks || ($blocks = {});
|
|
7
8
|
$props || ($props = {});
|
|
8
9
|
var $this = this;
|
|
10
|
+
|
|
9
11
|
var _this$get = this.get(),
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
children = _this$get.children,
|
|
13
|
+
className = _this$get.className,
|
|
14
|
+
width = _this$get.width,
|
|
15
|
+
style = _this$get.style,
|
|
16
|
+
center = _this$get.center;
|
|
17
|
+
|
|
15
18
|
var _style = style;
|
|
19
|
+
|
|
16
20
|
if (width) {
|
|
17
21
|
_style = addStyle(style, {
|
|
18
22
|
width: width
|
|
19
23
|
});
|
|
20
24
|
}
|
|
25
|
+
|
|
21
26
|
var classNameObj = (_classNameObj = {
|
|
22
27
|
'k-card-column': true,
|
|
23
28
|
'k-fluid': !width,
|