@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
|
@@ -15,53 +15,41 @@ var typeDefs = {
|
|
|
15
15
|
size: sizes,
|
|
16
16
|
open: Boolean
|
|
17
17
|
};
|
|
18
|
-
|
|
19
18
|
var defaults = function defaults() {
|
|
20
19
|
return {
|
|
21
20
|
get placeholder() {
|
|
22
21
|
return _$('请输入关键字');
|
|
23
22
|
},
|
|
24
|
-
|
|
25
23
|
value: '',
|
|
26
24
|
type: 'default',
|
|
27
25
|
size: 'default',
|
|
28
26
|
open: false
|
|
29
27
|
};
|
|
30
28
|
};
|
|
31
|
-
|
|
32
29
|
export var Search = /*#__PURE__*/function (_Component) {
|
|
33
30
|
_inheritsLoose(Search, _Component);
|
|
34
|
-
|
|
35
31
|
function Search() {
|
|
36
32
|
var _context;
|
|
37
|
-
|
|
38
33
|
var _this;
|
|
39
|
-
|
|
40
34
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
41
35
|
args[_key] = arguments[_key];
|
|
42
36
|
}
|
|
43
|
-
|
|
44
37
|
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
45
38
|
_this.elementRef = createRef();
|
|
46
39
|
_this.inputRef = createRef();
|
|
47
40
|
return _this;
|
|
48
41
|
}
|
|
49
|
-
|
|
50
42
|
var _proto = Search.prototype;
|
|
51
|
-
|
|
52
43
|
_proto.init = function init() {
|
|
53
44
|
useDocumentClick(this.elementRef, this.hide.bind(this));
|
|
54
45
|
};
|
|
55
|
-
|
|
56
46
|
_proto.open = function open() {
|
|
57
47
|
this.set('open', true);
|
|
58
48
|
this.inputRef.value.select();
|
|
59
49
|
};
|
|
60
|
-
|
|
61
50
|
_proto.hide = function hide() {
|
|
62
51
|
this.set('open', false);
|
|
63
52
|
};
|
|
64
|
-
|
|
65
53
|
_proto.onClickBtn = function onClickBtn() {
|
|
66
54
|
// if the box is open, then submit the form
|
|
67
55
|
if (this.get('open')) {
|
|
@@ -70,31 +58,23 @@ export var Search = /*#__PURE__*/function (_Component) {
|
|
|
70
58
|
this.open();
|
|
71
59
|
}
|
|
72
60
|
};
|
|
73
|
-
|
|
74
61
|
_proto.onChangeValue = function onChangeValue(v) {
|
|
75
62
|
if (!this.get('open')) return;
|
|
76
63
|
this.set('value', v);
|
|
77
64
|
};
|
|
78
|
-
|
|
79
65
|
_proto.onSubmit = function onSubmit(e) {
|
|
80
66
|
e.preventDefault();
|
|
81
67
|
this.submit();
|
|
82
68
|
};
|
|
83
|
-
|
|
84
69
|
_proto.submit = function submit() {
|
|
85
70
|
var _context2;
|
|
86
|
-
|
|
87
71
|
this.trigger('submit', _trimInstanceProperty(_context2 = this.get('value')).call(_context2));
|
|
88
72
|
};
|
|
89
|
-
|
|
90
73
|
return Search;
|
|
91
74
|
}(Component);
|
|
92
75
|
Search.template = template;
|
|
93
76
|
Search.typeDefs = typeDefs;
|
|
94
77
|
Search.defaults = defaults;
|
|
95
|
-
|
|
96
78
|
__decorate([bind], Search.prototype, "onClickBtn", null);
|
|
97
|
-
|
|
98
79
|
__decorate([bind], Search.prototype, "onChangeValue", null);
|
|
99
|
-
|
|
100
80
|
__decorate([bind], Search.prototype, "onSubmit", null);
|
|
@@ -10,19 +10,16 @@ var _$tmp0 = {
|
|
|
10
10
|
};
|
|
11
11
|
export default function ($props, $blocks, $__proto__) {
|
|
12
12
|
var _classNameObj;
|
|
13
|
-
|
|
14
13
|
$blocks || ($blocks = {});
|
|
15
14
|
$props || ($props = {});
|
|
16
15
|
var $this = this;
|
|
17
|
-
|
|
18
16
|
var _this$get = this.get(),
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
className = _this$get.className,
|
|
18
|
+
placeholder = _this$get.placeholder,
|
|
19
|
+
value = _this$get.value,
|
|
20
|
+
type = _this$get.type,
|
|
21
|
+
size = _this$get.size,
|
|
22
|
+
open = _this$get.open;
|
|
26
23
|
var isTypeNotDefault = type !== 'default';
|
|
27
24
|
var classNameObj = (_classNameObj = {
|
|
28
25
|
'k-search': true
|
|
@@ -8,80 +8,60 @@ var defaults = deepDefaults({
|
|
|
8
8
|
get transition() {
|
|
9
9
|
return theme.transition.middle;
|
|
10
10
|
},
|
|
11
|
-
|
|
12
11
|
get fontSize() {
|
|
13
12
|
return theme.default.fontSize;
|
|
14
13
|
},
|
|
15
|
-
|
|
16
14
|
get height() {
|
|
17
15
|
return theme.default.height;
|
|
18
16
|
},
|
|
19
|
-
|
|
20
17
|
width: '300px',
|
|
21
|
-
|
|
22
18
|
get border() {
|
|
23
19
|
return "1px solid " + theme.color.border;
|
|
24
20
|
},
|
|
25
|
-
|
|
26
21
|
get paddingGap() {
|
|
27
22
|
return theme.default.padding;
|
|
28
23
|
},
|
|
29
|
-
|
|
30
24
|
bgColor: '#fff',
|
|
31
|
-
|
|
32
25
|
get color() {
|
|
33
26
|
return theme.color.text;
|
|
34
27
|
},
|
|
35
|
-
|
|
36
28
|
get focusBorder() {
|
|
37
29
|
return "1px solid " + theme.color.primary;
|
|
38
30
|
},
|
|
39
|
-
|
|
40
31
|
// get hoverBorder() { return `1px solid ${theme.color.darkBorder}` },
|
|
41
32
|
get hoverBorder() {
|
|
42
33
|
return "1px solid " + theme.color.primary;
|
|
43
34
|
},
|
|
44
|
-
|
|
45
35
|
get borderRadius() {
|
|
46
36
|
return theme.borderRadius;
|
|
47
37
|
},
|
|
48
|
-
|
|
49
38
|
get placeholderColor() {
|
|
50
39
|
return theme.color.placeholder;
|
|
51
40
|
},
|
|
52
|
-
|
|
53
41
|
// clearable
|
|
54
42
|
get clearIconColor() {
|
|
55
43
|
return theme.color.placeholder;
|
|
56
44
|
},
|
|
57
|
-
|
|
58
45
|
clearIconGap: '3px',
|
|
59
|
-
|
|
60
46
|
// textarea
|
|
61
47
|
get textareaPadding() {
|
|
62
48
|
return "6px " + input.paddingGap;
|
|
63
49
|
},
|
|
64
|
-
|
|
65
50
|
// group
|
|
66
51
|
get groupBgColor() {
|
|
67
52
|
return theme.color.bg;
|
|
68
53
|
},
|
|
69
|
-
|
|
70
54
|
groupPaddingGap: '16px',
|
|
71
|
-
|
|
72
55
|
// disabled
|
|
73
56
|
get disabledBorderColor() {
|
|
74
57
|
return theme.color.disabledBorder;
|
|
75
58
|
},
|
|
76
|
-
|
|
77
59
|
get disabledColor() {
|
|
78
60
|
return theme.color.disabled;
|
|
79
61
|
},
|
|
80
|
-
|
|
81
62
|
get disabledBgColor() {
|
|
82
63
|
return theme.color.disabledBg;
|
|
83
64
|
},
|
|
84
|
-
|
|
85
65
|
// search input
|
|
86
66
|
search: {
|
|
87
67
|
suffixMarginRight: '15px'
|
|
@@ -92,17 +72,13 @@ var defaults = deepDefaults({
|
|
|
92
72
|
get fontSize() {
|
|
93
73
|
return styles.fontSize;
|
|
94
74
|
},
|
|
95
|
-
|
|
96
75
|
get height() {
|
|
97
76
|
return styles.height;
|
|
98
77
|
},
|
|
99
|
-
|
|
100
78
|
get paddingGap() {
|
|
101
79
|
return styles.padding;
|
|
102
80
|
}
|
|
103
|
-
|
|
104
81
|
};
|
|
105
|
-
|
|
106
82
|
if (size === 'large') {
|
|
107
83
|
// use default padding for large size
|
|
108
84
|
Object.defineProperty(memo.large, 'paddingGap', {
|
|
@@ -111,7 +87,6 @@ var defaults = deepDefaults({
|
|
|
111
87
|
}
|
|
112
88
|
});
|
|
113
89
|
}
|
|
114
|
-
|
|
115
90
|
return memo;
|
|
116
91
|
}, {}));
|
|
117
92
|
var input;
|
|
@@ -122,7 +97,6 @@ setDefault(function () {
|
|
|
122
97
|
});
|
|
123
98
|
export function makeStyles() {
|
|
124
99
|
var _context;
|
|
125
|
-
|
|
126
100
|
return /*#__PURE__*/css("display:inline-block;width:", input.width, ";vertical-align:middle;.k-input-wrapper{display:inline-block;width:100%;position:relative;}.k-input-inner{display:inline-block;width:100%;border:", input.border, ";background-color:", input.bgColor, ";transition:border ", input.transition, ",background ", input.transition, ",box-shadow ", input.transition, ";border-radius:", input.borderRadius, ";outline:none;position:relative;color:", input.color, ";&:hover{border:", input.hoverBorder, ";z-index:1;}&:focus{border:", input.focusBorder, ";z-index:1;}&::placeholder{color:", input.placeholderColor, ";}}&.k-fluid{width:100%;}.k-input-prefix,.k-input-suffix{position:absolute;top:50%;transform:translateY(-50%);z-index:2;}.k-input-clear{opacity:0;transition:opacity ", input.transition, ";pointer-events:none;color:", input.clearIconColor, ";+*{margin-left:", input.clearIconGap, ";}}&:hover .k-input-clear.k-input-show{opacity:1;pointer-events:all;}.k-input-show-password{color:", input.clearIconColor, ";}&.k-stack-clear{.k-input-clear{position:absolute;z-index:1;right:0;&.k-input-show+i{transition:opacity ", input.transition, ";}}&:hover{.k-input-clear.k-input-show+i{opacity:0;}}}&.k-group{display:table;.k-input-inner{border-radius:0;}.k-input-wrapper:first-child{.k-input-inner{border-radius:", input.borderRadius, " 0 0 ", input.borderRadius, ";}}.k-input-wrapper:last-child{.k-input-inner{border-radius:0 ", input.borderRadius, " ", input.borderRadius, " 0;}}}.k-input-prepend,.k-input-append{display:table-cell;width:1px;vertical-align:middle;background-color:", input.groupBgColor, ";border:", input.border, ";text-align:center;white-space:nowrap;.k-btn{margin:-1px 0;border-radius:0;border:none;}.k-select{margin:-1px;text-align:left;}}.k-input-prepend{border-radius:", input.borderRadius, " 0 0 ", input.borderRadius, ";.k-select{z-index:1;.k-select-wrapper{border-radius:", theme.borderRadius, " 0 0 ", theme.borderRadius, ";}}}.k-input-append{border-radius:0 ", input.borderRadius, " ", input.borderRadius, " 0;.k-select{.k-select-wrapper{border-radius:0 ", theme.borderRadius, " ", theme.borderRadius, " 0;}}}.k-input-padding{padding:0 ", input.groupPaddingGap, ";}.k-input-prepend{border-right:none;}.k-input-append{border-left:none;}&.k-disabled{color:", input.disabledColor, ";cursor:not-allowed;.k-input-inner{color:", input.disabledColor, ";border-color:", input.disabledBorderColor, ";background:", input.disabledBgColor, ";cursor:not-allowed;}}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
127
101
|
var styles = input[size];
|
|
128
102
|
var sizeClassName = /*#__PURE__*/css("font-size:", styles.fontSize, ";.k-input-inner{height:", styles.height, ";line-height:", styles.height, ";font-size:", styles.fontSize, ";padding:0 ", styles.paddingGap, ";}.k-input-prefix{left:", styles.paddingGap, ";}.k-input-suffix{right:", styles.paddingGap, ";}&.k-with-prefix{.k-input-inner{padding-left:calc(", styles.paddingGap, " + 1rem + ", input.clearIconGap, ");}}&.k-with-suffix,&.k-clearable{.k-input-inner{padding-right:calc(", styles.paddingGap, " + 1rem + ", input.clearIconGap, ");}}&:not(.k-stack-clear).k-with-suffix.k-clearable{.k-input-inner{padding-right:calc(", styles.paddingGap, " + 2rem + ", input.clearIconGap, " * 2);}}");
|
|
@@ -8,7 +8,6 @@ export function useAutoRows(inputRef) {
|
|
|
8
8
|
var paddingTop;
|
|
9
9
|
var paddingBottom;
|
|
10
10
|
var isBorderBox;
|
|
11
|
-
|
|
12
11
|
function getStyles() {
|
|
13
12
|
if (instance.get('type') === 'textarea') {
|
|
14
13
|
var styles = getComputedStyle(inputRef.value);
|
|
@@ -18,7 +17,6 @@ export function useAutoRows(inputRef) {
|
|
|
18
17
|
isBorderBox = styles.boxSizing === 'border-box';
|
|
19
18
|
}
|
|
20
19
|
}
|
|
21
|
-
|
|
22
20
|
onMounted(getStyles);
|
|
23
21
|
instance.watch('type', getStyles, {
|
|
24
22
|
presented: true
|
|
@@ -36,44 +34,34 @@ export function useAutoRows(inputRef) {
|
|
|
36
34
|
presented: true
|
|
37
35
|
});
|
|
38
36
|
onMounted(adjust);
|
|
39
|
-
|
|
40
37
|
function adjust() {
|
|
41
38
|
var _instance$get = instance.get(),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
rows = _instance$get.rows,
|
|
40
|
+
type = _instance$get.type;
|
|
45
41
|
if (type === 'textarea' && (rows === 'auto' || isObject(rows))) {
|
|
46
42
|
var textarea = inputRef.value;
|
|
47
|
-
var originheight = textarea.style.height;
|
|
43
|
+
var originheight = textarea.style.height;
|
|
44
|
+
// we shuold remove height before get scrollHeight,
|
|
48
45
|
// otherwise we cannot shrink the height when we remove the text
|
|
49
|
-
|
|
50
46
|
textarea.style.height = '';
|
|
51
47
|
var scrollHeight = textarea.scrollHeight;
|
|
52
48
|
var lines = (scrollHeight - paddingTop - paddingBottom) / lineHeight;
|
|
53
49
|
textarea.style.height = originheight;
|
|
54
50
|
var actualLines = lines;
|
|
55
|
-
|
|
56
51
|
if (rows !== 'auto') {
|
|
57
52
|
var min = rows.min,
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
max = rows.max;
|
|
60
54
|
if (min && lines <= min) {
|
|
61
55
|
actualLines = min;
|
|
62
56
|
}
|
|
63
|
-
|
|
64
57
|
if (max && lines >= max) {
|
|
65
58
|
actualLines = max;
|
|
66
59
|
}
|
|
67
60
|
}
|
|
68
|
-
|
|
69
|
-
height.set(lineHeight * actualLines + (isBorderBox ? paddingTop + paddingBottom + 2
|
|
70
|
-
/* border */
|
|
71
|
-
: 0));
|
|
61
|
+
height.set(lineHeight * actualLines + (isBorderBox ? paddingTop + paddingBottom + 2 /* border */ : 0));
|
|
72
62
|
return;
|
|
73
63
|
}
|
|
74
|
-
|
|
75
64
|
height.set(0);
|
|
76
65
|
}
|
|
77
|
-
|
|
78
66
|
return height;
|
|
79
67
|
}
|
|
@@ -13,27 +13,22 @@ export function useAutoWidth() {
|
|
|
13
13
|
presented: true
|
|
14
14
|
});
|
|
15
15
|
onMounted(adjustWidth);
|
|
16
|
-
|
|
17
16
|
function adjustWidth() {
|
|
18
17
|
if (instance.get('autoWidth')) {
|
|
19
18
|
nextTick(function () {
|
|
20
19
|
var fakeElem = fakeRef.value;
|
|
21
|
-
|
|
22
20
|
if (isVisible(fakeElem)) {
|
|
23
21
|
var _width = fakeElem.offsetWidth || 1;
|
|
24
|
-
|
|
25
22
|
width.set(_width);
|
|
26
23
|
}
|
|
27
24
|
});
|
|
28
25
|
}
|
|
29
26
|
}
|
|
30
|
-
|
|
31
27
|
return {
|
|
32
28
|
fakeRef: fakeRef,
|
|
33
29
|
width: width
|
|
34
30
|
};
|
|
35
31
|
}
|
|
36
|
-
|
|
37
32
|
function isVisible(elem) {
|
|
38
33
|
return elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);
|
|
39
34
|
}
|
|
@@ -5,29 +5,24 @@ export function useFrozen() {
|
|
|
5
5
|
var instance = useInstance();
|
|
6
6
|
var inputing = useState(false);
|
|
7
7
|
var originalValue = useState('');
|
|
8
|
-
|
|
9
8
|
function startInput(e) {
|
|
10
9
|
inputing.set(true);
|
|
11
10
|
originalValue.set(e.target.value);
|
|
12
11
|
instance.trigger('focus', e);
|
|
13
12
|
}
|
|
14
|
-
|
|
15
13
|
function endInput(e) {
|
|
16
14
|
// ignore dispatch event, #523
|
|
17
15
|
if (e._dispatch) return;
|
|
18
16
|
var propValue = (instance.$vNode.props || EMPTY_OBJ).value;
|
|
19
|
-
|
|
20
17
|
if (!isNullOrUndefined(propValue)) {
|
|
21
18
|
// set the value as the value that parent passes to it
|
|
22
19
|
instance.set({
|
|
23
20
|
value: propValue
|
|
24
21
|
});
|
|
25
22
|
}
|
|
26
|
-
|
|
27
23
|
inputing.set(false);
|
|
28
24
|
instance.trigger('blur', e);
|
|
29
25
|
}
|
|
30
|
-
|
|
31
26
|
function onInput(e) {
|
|
32
27
|
var value = e.target.value;
|
|
33
28
|
instance.set({
|
|
@@ -36,7 +31,6 @@ export function useFrozen() {
|
|
|
36
31
|
originalValue.set(value);
|
|
37
32
|
instance.trigger('input', e);
|
|
38
33
|
}
|
|
39
|
-
|
|
40
34
|
return {
|
|
41
35
|
inputing: inputing,
|
|
42
36
|
originalValue: originalValue,
|
|
@@ -11,17 +11,14 @@ export function useShowPassword() {
|
|
|
11
11
|
});
|
|
12
12
|
useReceive(['type', 'showPassword'], function () {
|
|
13
13
|
var _instance$get = instance.get(),
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
showPassword = _instance$get.showPassword,
|
|
15
|
+
type = _instance$get.type;
|
|
17
16
|
showIcon.set(type === 'password' && !!showPassword);
|
|
18
17
|
});
|
|
19
|
-
|
|
20
18
|
function toggleShow() {
|
|
21
19
|
isShow.set(!isShow.value);
|
|
22
20
|
type.set(isShow.value ? 'text' : 'password');
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
return {
|
|
26
23
|
isShow: isShow,
|
|
27
24
|
type: type,
|
|
@@ -11,54 +11,42 @@ var typeDefs = {
|
|
|
11
11
|
theme: themes,
|
|
12
12
|
width: [Number, String]
|
|
13
13
|
};
|
|
14
|
-
|
|
15
14
|
var defaults = function defaults() {
|
|
16
15
|
return {
|
|
17
16
|
theme: 'dark',
|
|
18
17
|
width: defaultWidth
|
|
19
18
|
};
|
|
20
19
|
};
|
|
21
|
-
|
|
22
20
|
export var Aside = /*#__PURE__*/function (_Component) {
|
|
23
21
|
_inheritsLoose(Aside, _Component);
|
|
24
|
-
|
|
25
22
|
function Aside() {
|
|
26
23
|
var _context;
|
|
27
|
-
|
|
28
24
|
var _this;
|
|
29
|
-
|
|
30
25
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
31
26
|
args[_key] = arguments[_key];
|
|
32
27
|
}
|
|
33
|
-
|
|
34
28
|
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
35
29
|
_this.rootLayout = inject(ROOT_LAYOUT);
|
|
36
30
|
return _this;
|
|
37
31
|
}
|
|
38
|
-
|
|
39
32
|
var _proto = Aside.prototype;
|
|
40
|
-
|
|
41
33
|
_proto.getStyles = function getStyles() {
|
|
42
34
|
var _this$get = this.get(),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
35
|
+
fixed = _this$get.fixed,
|
|
36
|
+
width = _this$get.width,
|
|
37
|
+
collapse = _this$get.collapse;
|
|
47
38
|
var style = addStyle(this.get('style'), {
|
|
48
39
|
width: !collapse ? getStyle(width) : getCollapseWidth()
|
|
49
40
|
});
|
|
50
41
|
if (!fixed) return style;
|
|
51
|
-
|
|
52
42
|
var _this$rootLayout$pars = this.rootLayout.parse(),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
43
|
+
hasFixedHeader = _this$rootLayout$pars.hasFixedHeader,
|
|
44
|
+
headerHeight = _this$rootLayout$pars.headerHeight;
|
|
56
45
|
if (!hasFixedHeader) return style;
|
|
57
46
|
return addStyle(style, {
|
|
58
47
|
top: getStyle(headerHeight)
|
|
59
48
|
});
|
|
60
49
|
};
|
|
61
|
-
|
|
62
50
|
return Aside;
|
|
63
51
|
}(Component);
|
|
64
52
|
Aside.template = template;
|
|
@@ -6,18 +6,15 @@ import { Menu } from '../menu';
|
|
|
6
6
|
import { makeAsideStyles } from './styles';
|
|
7
7
|
export default function ($props, $blocks, $__proto__) {
|
|
8
8
|
var _classNameObj;
|
|
9
|
-
|
|
10
9
|
$blocks || ($blocks = {});
|
|
11
10
|
$props || ($props = {});
|
|
12
11
|
var $this = this;
|
|
13
|
-
|
|
14
12
|
var _this$get = this.get(),
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
className = _this$get.className,
|
|
14
|
+
children = _this$get.children,
|
|
15
|
+
collapse = _this$get.collapse,
|
|
16
|
+
fixed = _this$get.fixed,
|
|
17
|
+
theme = _this$get.theme;
|
|
21
18
|
var vNodes = mapChildren(children, function (vNode) {
|
|
22
19
|
if (vNode.tag === Menu) {
|
|
23
20
|
var vNodeClone = directClone(vNode);
|
|
@@ -26,7 +23,6 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
26
23
|
});
|
|
27
24
|
return _$ce(2, 'div', vNodeClone, 0, 'k-layout-wrapper');
|
|
28
25
|
}
|
|
29
|
-
|
|
30
26
|
return vNode;
|
|
31
27
|
});
|
|
32
28
|
var classNameObj = (_classNameObj = {
|
|
@@ -6,50 +6,38 @@ import { LAYOUT, getStyle } from './helpers';
|
|
|
6
6
|
import { addStyle } from '../utils';
|
|
7
7
|
export var Body = /*#__PURE__*/function (_Component) {
|
|
8
8
|
_inheritsLoose(Body, _Component);
|
|
9
|
-
|
|
10
9
|
function Body() {
|
|
11
10
|
var _context;
|
|
12
|
-
|
|
13
11
|
var _this;
|
|
14
|
-
|
|
15
12
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
16
13
|
args[_key] = arguments[_key];
|
|
17
14
|
}
|
|
18
|
-
|
|
19
15
|
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
20
16
|
_this.layout = inject(LAYOUT);
|
|
21
17
|
return _this;
|
|
22
18
|
}
|
|
23
|
-
|
|
24
19
|
var _proto = Body.prototype;
|
|
25
|
-
|
|
26
20
|
_proto.getClassNames = function getClassNames() {
|
|
27
21
|
var _ref;
|
|
28
|
-
|
|
29
22
|
var _this$get = this.get(),
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
className = _this$get.className;
|
|
32
24
|
return _ref = {
|
|
33
25
|
'k-layout-body': true
|
|
34
26
|
}, _ref[className] = className, _ref;
|
|
35
27
|
};
|
|
36
|
-
|
|
37
28
|
_proto.getStyles = function getStyles() {
|
|
38
29
|
var style = this.get('style');
|
|
39
|
-
|
|
40
30
|
var _this$layout$parse = this.layout.parse(),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
31
|
+
hasFixedAside = _this$layout$parse.hasFixedAside,
|
|
32
|
+
asideWidth = _this$layout$parse.asideWidth,
|
|
33
|
+
hasFixedHeader = _this$layout$parse.hasFixedHeader,
|
|
34
|
+
headerHeight = _this$layout$parse.headerHeight;
|
|
46
35
|
if (!hasFixedAside && !hasFixedHeader) return style;
|
|
47
36
|
return addStyle(style, {
|
|
48
37
|
paddingLeft: hasFixedAside ? getStyle(asideWidth) : null,
|
|
49
38
|
marginTop: hasFixedHeader ? getStyle(headerHeight) : null
|
|
50
39
|
});
|
|
51
40
|
};
|
|
52
|
-
|
|
53
41
|
return Body;
|
|
54
42
|
}(Component);
|
|
55
43
|
Body.template = template;
|
|
@@ -3,24 +3,18 @@ import { Component } from 'intact-vue-next';
|
|
|
3
3
|
import template from './template.vdt';
|
|
4
4
|
export var Footer = /*#__PURE__*/function (_Component) {
|
|
5
5
|
_inheritsLoose(Footer, _Component);
|
|
6
|
-
|
|
7
6
|
function Footer() {
|
|
8
7
|
return _Component.apply(this, arguments) || this;
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
var _proto = Footer.prototype;
|
|
12
|
-
|
|
13
10
|
_proto.getClassNames = function getClassNames() {
|
|
14
11
|
var _ref;
|
|
15
|
-
|
|
16
12
|
var _this$get = this.get(),
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
className = _this$get.className;
|
|
19
14
|
return _ref = {
|
|
20
15
|
'k-layout-footer': true
|
|
21
16
|
}, _ref[className] = className, _ref;
|
|
22
17
|
};
|
|
23
|
-
|
|
24
18
|
return Footer;
|
|
25
19
|
}(Component);
|
|
26
20
|
Footer.template = template;
|
|
@@ -11,62 +11,48 @@ var typeDefs = {
|
|
|
11
11
|
style: [String, Object],
|
|
12
12
|
theme: themes
|
|
13
13
|
};
|
|
14
|
-
|
|
15
14
|
var defaults = function defaults() {
|
|
16
15
|
return {
|
|
17
16
|
height: defaultHeight,
|
|
18
17
|
theme: 'dark'
|
|
19
18
|
};
|
|
20
19
|
};
|
|
21
|
-
|
|
22
20
|
export var Header = /*#__PURE__*/function (_Component) {
|
|
23
21
|
_inheritsLoose(Header, _Component);
|
|
24
|
-
|
|
25
22
|
function Header() {
|
|
26
23
|
var _context;
|
|
27
|
-
|
|
28
24
|
var _this;
|
|
29
|
-
|
|
30
25
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
31
26
|
args[_key] = arguments[_key];
|
|
32
27
|
}
|
|
33
|
-
|
|
34
28
|
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
35
29
|
_this.rootLayout = inject(ROOT_LAYOUT);
|
|
36
30
|
return _this;
|
|
37
31
|
}
|
|
38
|
-
|
|
39
32
|
var _proto = Header.prototype;
|
|
40
|
-
|
|
41
33
|
_proto.getClassNames = function getClassNames() {
|
|
42
34
|
var _ref;
|
|
43
|
-
|
|
44
35
|
var _this$get = this.get(),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
className = _this$get.className,
|
|
37
|
+
fixed = _this$get.fixed,
|
|
38
|
+
theme = _this$get.theme;
|
|
49
39
|
return _ref = {
|
|
50
40
|
'k-layout-header': true,
|
|
51
41
|
'k-fixed': fixed
|
|
52
42
|
}, _ref["k-" + theme] = true, _ref[className] = className, _ref[makeHeaderStyles()] = true, _ref;
|
|
53
43
|
};
|
|
54
|
-
|
|
55
44
|
_proto.getStyles = function getStyles() {
|
|
56
45
|
var _this$get2 = this.get(),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
46
|
+
style = _this$get2.style,
|
|
47
|
+
height = _this$get2.height;
|
|
60
48
|
var _this$rootLayout$pars = this.rootLayout.parse(),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
49
|
+
hasFixedAside = _this$rootLayout$pars.hasFixedAside,
|
|
50
|
+
asideWidth = _this$rootLayout$pars.asideWidth;
|
|
64
51
|
return addStyle(style, {
|
|
65
52
|
height: getStyle(height),
|
|
66
53
|
left: hasFixedAside ? getStyle(asideWidth) : null
|
|
67
54
|
});
|
|
68
55
|
};
|
|
69
|
-
|
|
70
56
|
return Header;
|
|
71
57
|
}(Component);
|
|
72
58
|
Header.template = template;
|