@king-design/react 2.0.0-beta.0
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/README.md +22 -0
- package/__tests__/__snapshots__/React Demos.md +1769 -0
- package/__tests__/components/dropdown.spec.tsx +35 -0
- package/__tests__/index.ts +46 -0
- package/__tests__/karma.conf.js +52 -0
- package/__tests__/webpack.config.js +17 -0
- package/components/affix/index.d.ts +32 -0
- package/components/affix/index.js +35 -0
- package/components/affix/index.spec.d.ts +4 -0
- package/components/affix/index.spec.js +132 -0
- package/components/affix/index.vdt.js +35 -0
- package/components/affix/styles.d.ts +5 -0
- package/components/affix/styles.js +18 -0
- package/components/affix/useStyle.d.ts +8 -0
- package/components/affix/useStyle.js +125 -0
- package/components/badge/index.d.ts +13 -0
- package/components/badge/index.js +21 -0
- package/components/badge/index.vdt.js +32 -0
- package/components/badge/styles.d.ts +5 -0
- package/components/badge/styles.js +28 -0
- package/components/breadcrumb/index.d.ts +18 -0
- package/components/breadcrumb/index.js +28 -0
- package/components/breadcrumb/index.spec.d.ts +4 -0
- package/components/breadcrumb/index.spec.js +46 -0
- package/components/breadcrumb/index.vdt.js +62 -0
- package/components/breadcrumb/item.d.ts +13 -0
- package/components/breadcrumb/item.js +52 -0
- package/components/breadcrumb/item.vdt.js +27 -0
- package/components/breadcrumb/styles.d.ts +5 -0
- package/components/breadcrumb/styles.js +30 -0
- package/components/button/constants.d.ts +4 -0
- package/components/button/constants.js +3 -0
- package/components/button/dynamicButton.d.ts +11 -0
- package/components/button/dynamicButton.js +24 -0
- package/components/button/group.d.ts +17 -0
- package/components/button/group.js +51 -0
- package/components/button/group.vdt.js +29 -0
- package/components/button/index.d.ts +51 -0
- package/components/button/index.js +121 -0
- package/components/button/index.spec.d.ts +4 -0
- package/components/button/index.spec.js +129 -0
- package/components/button/index.vdt.js +95 -0
- package/components/button/styles.d.ts +11 -0
- package/components/button/styles.js +257 -0
- package/components/card/column.d.ts +12 -0
- package/components/card/column.js +20 -0
- package/components/card/column.vdt.js +38 -0
- package/components/card/index.d.ts +21 -0
- package/components/card/index.js +29 -0
- package/components/card/index.vdt.js +79 -0
- package/components/card/styles.d.ts +5 -0
- package/components/card/styles.js +23 -0
- package/components/carousel/index.d.ts +26 -0
- package/components/carousel/index.js +106 -0
- package/components/carousel/index.spec.d.ts +4 -0
- package/components/carousel/index.spec.js +200 -0
- package/components/carousel/index.vdt.js +79 -0
- package/components/carousel/item.d.ts +12 -0
- package/components/carousel/item.js +20 -0
- package/components/carousel/item.vdt.js +35 -0
- package/components/carousel/styles.d.ts +6 -0
- package/components/carousel/styles.js +46 -0
- package/components/carousel/useAutoplay.d.ts +7 -0
- package/components/carousel/useAutoplay.js +37 -0
- package/components/carousel/useItems.d.ts +9 -0
- package/components/carousel/useItems.js +93 -0
- package/components/carousel/useSlide.d.ts +12 -0
- package/components/carousel/useSlide.js +191 -0
- package/components/cascader/index.d.ts +37 -0
- package/components/cascader/index.js +93 -0
- package/components/cascader/index.spec.d.ts +4 -0
- package/components/cascader/index.spec.js +283 -0
- package/components/cascader/index.vdt.js +151 -0
- package/components/cascader/styles.d.ts +6 -0
- package/components/cascader/styles.js +52 -0
- package/components/cascader/useFilterable.d.ts +11 -0
- package/components/cascader/useFilterable.js +65 -0
- package/components/cascader/useLabel.d.ts +6 -0
- package/components/cascader/useLabel.js +43 -0
- package/components/cascader/useLoad.d.ts +5 -0
- package/components/cascader/useLoad.js +54 -0
- package/components/cascader/useValue.d.ts +14 -0
- package/components/cascader/useValue.js +125 -0
- package/components/checkbox/index.d.ts +27 -0
- package/components/checkbox/index.js +122 -0
- package/components/checkbox/index.spec.d.ts +4 -0
- package/components/checkbox/index.spec.js +217 -0
- package/components/checkbox/index.vdt.js +67 -0
- package/components/checkbox/styles.d.ts +5 -0
- package/components/checkbox/styles.js +77 -0
- package/components/code/crossDomain.d.ts +4 -0
- package/components/code/crossDomain.js +48 -0
- package/components/code/index.d.ts +26 -0
- package/components/code/index.js +58 -0
- package/components/code/index.spec.d.ts +4 -0
- package/components/code/index.spec.js +73 -0
- package/components/code/index.vdt.js +54 -0
- package/components/code/styles.d.ts +5 -0
- package/components/code/styles.js +16 -0
- package/components/code/useEditor.d.ts +9 -0
- package/components/code/useEditor.js +81 -0
- package/components/collapse/index.d.ts +23 -0
- package/components/collapse/index.js +57 -0
- package/components/collapse/index.spec.d.ts +4 -0
- package/components/collapse/index.spec.js +84 -0
- package/components/collapse/index.vdt.js +47 -0
- package/components/collapse/item.d.ts +24 -0
- package/components/collapse/item.js +52 -0
- package/components/collapse/item.vdt.js +64 -0
- package/components/collapse/styles.d.ts +7 -0
- package/components/collapse/styles.js +33 -0
- package/components/colorpicker/drag.d.ts +18 -0
- package/components/colorpicker/drag.js +27 -0
- package/components/colorpicker/drag.vdt.js +12 -0
- package/components/colorpicker/index.d.ts +18 -0
- package/components/colorpicker/index.js +35 -0
- package/components/colorpicker/index.spec.d.ts +4 -0
- package/components/colorpicker/index.spec.js +312 -0
- package/components/colorpicker/index.vdt.js +54 -0
- package/components/colorpicker/panel.d.ts +14 -0
- package/components/colorpicker/panel.js +31 -0
- package/components/colorpicker/panel.vdt.js +166 -0
- package/components/colorpicker/styles.d.ts +8 -0
- package/components/colorpicker/styles.js +135 -0
- package/components/colorpicker/useDrag.d.ts +6 -0
- package/components/colorpicker/useDrag.js +42 -0
- package/components/colorpicker/useInput.d.ts +19 -0
- package/components/colorpicker/useInput.js +78 -0
- package/components/colorpicker/usePointer.d.ts +9 -0
- package/components/colorpicker/usePointer.js +53 -0
- package/components/colorpicker/useValue.d.ts +14 -0
- package/components/colorpicker/useValue.js +58 -0
- package/components/context.d.ts +14 -0
- package/components/context.js +90 -0
- package/components/datepicker/basepicker.d.ts +62 -0
- package/components/datepicker/basepicker.js +341 -0
- package/components/datepicker/calendar.d.ts +81 -0
- package/components/datepicker/calendar.js +66 -0
- package/components/datepicker/calendar.vdt.js +128 -0
- package/components/datepicker/constants.d.ts +16 -0
- package/components/datepicker/constants.js +20 -0
- package/components/datepicker/dayjs.d.ts +6 -0
- package/components/datepicker/dayjs.js +6 -0
- package/components/datepicker/helpers.d.ts +13 -0
- package/components/datepicker/helpers.js +86 -0
- package/components/datepicker/index.d.ts +66 -0
- package/components/datepicker/index.js +123 -0
- package/components/datepicker/index.spec.d.ts +4 -0
- package/components/datepicker/index.spec.js +1703 -0
- package/components/datepicker/index.vdt.js +142 -0
- package/components/datepicker/shortcuts.d.ts +24 -0
- package/components/datepicker/shortcuts.js +140 -0
- package/components/datepicker/styles.d.ts +9 -0
- package/components/datepicker/styles.js +89 -0
- package/components/datepicker/time.d.ts +33 -0
- package/components/datepicker/time.js +107 -0
- package/components/datepicker/time.vdt.js +48 -0
- package/components/datepicker/useDays.d.ts +19 -0
- package/components/datepicker/useDays.js +47 -0
- package/components/datepicker/useDisabled.d.ts +14 -0
- package/components/datepicker/useDisabled.js +97 -0
- package/components/datepicker/useFocusDate.d.ts +8 -0
- package/components/datepicker/useFocusDate.js +18 -0
- package/components/datepicker/useFormats.d.ts +13 -0
- package/components/datepicker/useFormats.js +57 -0
- package/components/datepicker/useKeyboards.d.ts +8 -0
- package/components/datepicker/useKeyboards.js +98 -0
- package/components/datepicker/useMonths.d.ts +18 -0
- package/components/datepicker/useMonths.js +47 -0
- package/components/datepicker/usePanel.d.ts +21 -0
- package/components/datepicker/usePanel.js +57 -0
- package/components/datepicker/useShowDate.d.ts +19 -0
- package/components/datepicker/useShowDate.js +160 -0
- package/components/datepicker/useStatus.d.ts +11 -0
- package/components/datepicker/useStatus.js +62 -0
- package/components/datepicker/useValue.d.ts +19 -0
- package/components/datepicker/useValue.js +84 -0
- package/components/datepicker/useYears.d.ts +21 -0
- package/components/datepicker/useYears.js +72 -0
- package/components/diagram/constants.d.ts +6 -0
- package/components/diagram/constants.js +5 -0
- package/components/diagram/defaultStyle.d.ts +117 -0
- package/components/diagram/defaultStyle.js +116 -0
- package/components/diagram/diagram.d.ts +43 -0
- package/components/diagram/diagram.js +176 -0
- package/components/diagram/diagram.vdt.js +25 -0
- package/components/diagram/graph.d.ts +5 -0
- package/components/diagram/graph.js +30 -0
- package/components/diagram/index.d.ts +25 -0
- package/components/diagram/index.js +30 -0
- package/components/diagram/index.spec.d.ts +4 -0
- package/components/diagram/index.spec.js +631 -0
- package/components/diagram/layouts/circle.d.ts +19 -0
- package/components/diagram/layouts/circle.js +56 -0
- package/components/diagram/layouts/flow.d.ts +19 -0
- package/components/diagram/layouts/flow.js +69 -0
- package/components/diagram/layouts/layout.d.ts +28 -0
- package/components/diagram/layouts/layout.js +113 -0
- package/components/diagram/layouts/organic.d.ts +18 -0
- package/components/diagram/layouts/organic.js +51 -0
- package/components/diagram/layouts/partition.d.ts +17 -0
- package/components/diagram/layouts/partition.js +55 -0
- package/components/diagram/layouts/radial.d.ts +21 -0
- package/components/diagram/layouts/radial.js +72 -0
- package/components/diagram/layouts/stack.d.ts +19 -0
- package/components/diagram/layouts/stack.js +66 -0
- package/components/diagram/layouts/tree.d.ts +22 -0
- package/components/diagram/layouts/tree.js +77 -0
- package/components/diagram/mxgraph/handler/mxConnectionHandler.d.ts +4 -0
- package/components/diagram/mxgraph/handler/mxConnectionHandler.js +53 -0
- package/components/diagram/mxgraph/handler/mxConstraintHandler.d.ts +5 -0
- package/components/diagram/mxgraph/handler/mxConstraintHandler.js +16 -0
- package/components/diagram/mxgraph/handler/mxEdgeHandler.d.ts +5 -0
- package/components/diagram/mxgraph/handler/mxEdgeHandler.js +45 -0
- package/components/diagram/mxgraph/handler/mxGraphHandler.d.ts +4 -0
- package/components/diagram/mxgraph/handler/mxGraphHandler.js +25 -0
- package/components/diagram/mxgraph/handler/mxRubberband.d.ts +4 -0
- package/components/diagram/mxgraph/handler/mxRubberband.js +10 -0
- package/components/diagram/mxgraph/handler/mxVertexHandler.d.ts +7 -0
- package/components/diagram/mxgraph/handler/mxVertexHandler.js +32 -0
- package/components/diagram/mxgraph/index.d.ts +5 -0
- package/components/diagram/mxgraph/index.js +49 -0
- package/components/diagram/mxgraph/mx.d.ts +6 -0
- package/components/diagram/mxgraph/mx.js +16 -0
- package/components/diagram/mxgraph/shape/mxCloud.d.ts +4 -0
- package/components/diagram/mxgraph/shape/mxCloud.js +9 -0
- package/components/diagram/mxgraph/shape/mxCylinder.d.ts +4 -0
- package/components/diagram/mxgraph/shape/mxCylinder.js +32 -0
- package/components/diagram/mxgraph/shape/mxEllipse.d.ts +4 -0
- package/components/diagram/mxgraph/shape/mxEllipse.js +9 -0
- package/components/diagram/mxgraph/shape/mxHexagon.d.ts +4 -0
- package/components/diagram/mxgraph/shape/mxHexagon.js +9 -0
- package/components/diagram/mxgraph/shape/mxLine.d.ts +4 -0
- package/components/diagram/mxgraph/shape/mxLine.js +9 -0
- package/components/diagram/mxgraph/shape/mxRectangleShape.d.ts +4 -0
- package/components/diagram/mxgraph/shape/mxRectangleShape.js +9 -0
- package/components/diagram/mxgraph/shape/mxRhombus.d.ts +4 -0
- package/components/diagram/mxgraph/shape/mxRhombus.js +41 -0
- package/components/diagram/mxgraph/shape/mxShape.d.ts +4 -0
- package/components/diagram/mxgraph/shape/mxShape.js +10 -0
- package/components/diagram/mxgraph/shape/mxTriangle.d.ts +4 -0
- package/components/diagram/mxgraph/shape/mxTriangle.js +9 -0
- package/components/diagram/mxgraph/util/mxConstants.d.ts +4 -0
- package/components/diagram/mxgraph/util/mxConstants.js +21 -0
- package/components/diagram/mxgraph/util/mxGuide.d.ts +4 -0
- package/components/diagram/mxgraph/util/mxGuide.js +22 -0
- package/components/diagram/mxgraph/view/mxCellEditor.d.ts +4 -0
- package/components/diagram/mxgraph/view/mxCellEditor.js +96 -0
- package/components/diagram/mxgraph/view/mxCellRenderer.d.ts +4 -0
- package/components/diagram/mxgraph/view/mxCellRenderer.js +15 -0
- package/components/diagram/mxgraph/view/mxGraph.d.ts +4 -0
- package/components/diagram/mxgraph/view/mxGraph.js +141 -0
- package/components/diagram/shapes/base.d.ts +45 -0
- package/components/diagram/shapes/base.js +156 -0
- package/components/diagram/shapes/callout.d.ts +24 -0
- package/components/diagram/shapes/callout.js +80 -0
- package/components/diagram/shapes/circle.d.ts +25 -0
- package/components/diagram/shapes/circle.js +38 -0
- package/components/diagram/shapes/document.d.ts +24 -0
- package/components/diagram/shapes/document.js +71 -0
- package/components/diagram/shapes/ellipse.d.ts +24 -0
- package/components/diagram/shapes/ellipse.js +30 -0
- package/components/diagram/shapes/generateShapes.d.ts +32 -0
- package/components/diagram/shapes/generateShapes.js +62 -0
- package/components/diagram/shapes/hexagon.d.ts +24 -0
- package/components/diagram/shapes/hexagon.js +101 -0
- package/components/diagram/shapes/image.d.ts +30 -0
- package/components/diagram/shapes/image.js +38 -0
- package/components/diagram/shapes/line.d.ts +46 -0
- package/components/diagram/shapes/line.js +193 -0
- package/components/diagram/shapes/parallelogram.d.ts +24 -0
- package/components/diagram/shapes/parallelogram.js +103 -0
- package/components/diagram/shapes/rectangle.d.ts +30 -0
- package/components/diagram/shapes/rectangle.js +38 -0
- package/components/diagram/shapes/shape.d.ts +35 -0
- package/components/diagram/shapes/shape.js +153 -0
- package/components/diagram/shapes/square.d.ts +26 -0
- package/components/diagram/shapes/square.js +40 -0
- package/components/diagram/shapes/text.d.ts +24 -0
- package/components/diagram/shapes/text.js +28 -0
- package/components/diagram/styles.d.ts +5 -0
- package/components/diagram/styles.js +16 -0
- package/components/dialog/alert.vdt.js +71 -0
- package/components/dialog/base.d.ts +70 -0
- package/components/dialog/base.js +167 -0
- package/components/dialog/base.vdt.js +146 -0
- package/components/dialog/constants.d.ts +6 -0
- package/components/dialog/constants.js +5 -0
- package/components/dialog/index.d.ts +24 -0
- package/components/dialog/index.js +104 -0
- package/components/dialog/index.spec.d.ts +4 -0
- package/components/dialog/index.spec.js +654 -0
- package/components/dialog/staticMethods.d.ts +13 -0
- package/components/dialog/staticMethods.js +66 -0
- package/components/dialog/styles.d.ts +7 -0
- package/components/dialog/styles.js +100 -0
- package/components/dialog/useDraggable.d.ts +8 -0
- package/components/dialog/useDraggable.js +56 -0
- package/components/dialog/useEscClosable.d.ts +4 -0
- package/components/dialog/useEscClosable.js +46 -0
- package/components/dialog/useFixBody.d.ts +5 -0
- package/components/dialog/useFixBody.js +71 -0
- package/components/dialog/usePosition.d.ts +5 -0
- package/components/dialog/usePosition.js +42 -0
- package/components/drawer/index.d.ts +14 -0
- package/components/drawer/index.js +30 -0
- package/components/drawer/index.spec.d.ts +4 -0
- package/components/drawer/index.spec.js +164 -0
- package/components/drawer/index.vdt.js +38 -0
- package/components/drawer/styles.d.ts +9 -0
- package/components/drawer/styles.js +45 -0
- package/components/dropdown/dropdown.d.ts +60 -0
- package/components/dropdown/dropdown.js +314 -0
- package/components/dropdown/index.d.ts +12 -0
- package/components/dropdown/index.js +39 -0
- package/components/dropdown/index.spec.d.ts +4 -0
- package/components/dropdown/index.spec.js +488 -0
- package/components/dropdown/item.d.ts +29 -0
- package/components/dropdown/item.js +117 -0
- package/components/dropdown/item.vdt.js +32 -0
- package/components/dropdown/menu.d.ts +24 -0
- package/components/dropdown/menu.js +108 -0
- package/components/dropdown/menu.vdt.js +53 -0
- package/components/dropdown/styles.d.ts +6 -0
- package/components/dropdown/styles.js +58 -0
- package/components/dropdown/useKeyboard.d.ts +26 -0
- package/components/dropdown/useKeyboard.js +195 -0
- package/components/dropdown/usePosition.d.ts +11 -0
- package/components/dropdown/usePosition.js +115 -0
- package/components/dropdown/useTransition.d.ts +11 -0
- package/components/dropdown/useTransition.js +80 -0
- package/components/editable/index.d.ts +32 -0
- package/components/editable/index.js +133 -0
- package/components/editable/index.spec.d.ts +4 -0
- package/components/editable/index.spec.js +225 -0
- package/components/editable/index.vdt.js +47 -0
- package/components/editable/styles.d.ts +7 -0
- package/components/editable/styles.js +27 -0
- package/components/form/form.d.ts +41 -0
- package/components/form/form.js +103 -0
- package/components/form/form.vdt.js +29 -0
- package/components/form/index.d.ts +5 -0
- package/components/form/index.js +4 -0
- package/components/form/index.spec.d.ts +4 -0
- package/components/form/index.spec.js +1322 -0
- package/components/form/item.d.ts +40 -0
- package/components/form/item.js +76 -0
- package/components/form/item.vdt.js +130 -0
- package/components/form/methods.d.ts +10 -0
- package/components/form/methods.js +175 -0
- package/components/form/styles.d.ts +6 -0
- package/components/form/styles.js +63 -0
- package/components/form/useDirty.d.ts +9 -0
- package/components/form/useDirty.js +41 -0
- package/components/form/useError.d.ts +11 -0
- package/components/form/useError.js +59 -0
- package/components/form/useValidate.d.ts +14 -0
- package/components/form/useValidate.js +118 -0
- package/components/grid/col.d.ts +20 -0
- package/components/grid/col.js +43 -0
- package/components/grid/col.vdt.js +42 -0
- package/components/grid/constants.d.ts +19 -0
- package/components/grid/constants.js +14 -0
- package/components/grid/index.d.ts +5 -0
- package/components/grid/index.js +4 -0
- package/components/grid/row.d.ts +15 -0
- package/components/grid/row.js +34 -0
- package/components/grid/row.vdt.js +36 -0
- package/components/grid/styles.d.ts +6 -0
- package/components/grid/styles.js +56 -0
- package/components/grid/useBreakpoints.d.ts +6 -0
- package/components/grid/useBreakpoints.js +51 -0
- package/components/grid/useGutter.d.ts +11 -0
- package/components/grid/useGutter.js +104 -0
- package/components/icon/index.d.ts +18 -0
- package/components/icon/index.js +48 -0
- package/components/icon/index.vdt.js +50 -0
- package/components/icon/styles.d.ts +9 -0
- package/components/icon/styles.js +35 -0
- package/components/input/index.d.ts +58 -0
- package/components/input/index.js +99 -0
- package/components/input/index.spec.d.ts +4 -0
- package/components/input/index.spec.js +129 -0
- package/components/input/index.vdt.js +126 -0
- package/components/input/search.d.ts +29 -0
- package/components/input/search.js +102 -0
- package/components/input/search.vdt.js +52 -0
- package/components/input/styles.d.ts +6 -0
- package/components/input/styles.js +132 -0
- package/components/input/useAutoWidth.d.ts +7 -0
- package/components/input/useAutoWidth.js +31 -0
- package/components/input/useFrozen.d.ts +12 -0
- package/components/input/useFrozen.js +49 -0
- package/components/layout/aside.d.ts +18 -0
- package/components/layout/aside.js +68 -0
- package/components/layout/aside.vdt.js +44 -0
- package/components/layout/body.d.ts +10 -0
- package/components/layout/body.js +57 -0
- package/components/layout/footer.d.ts +8 -0
- package/components/layout/footer.js +28 -0
- package/components/layout/header.d.ts +19 -0
- package/components/layout/header.js +76 -0
- package/components/layout/helpers.d.ts +8 -0
- package/components/layout/helpers.js +10 -0
- package/components/layout/index.d.ts +8 -0
- package/components/layout/index.js +7 -0
- package/components/layout/layout.d.ts +18 -0
- package/components/layout/layout.js +75 -0
- package/components/layout/styles.d.ts +9 -0
- package/components/layout/styles.js +81 -0
- package/components/layout/template.vdt.js +20 -0
- package/components/layout/useParse.d.ts +10 -0
- package/components/layout/useParse.js +65 -0
- package/components/menu/index.d.ts +5 -0
- package/components/menu/index.js +4 -0
- package/components/menu/index.spec.d.ts +4 -0
- package/components/menu/index.spec.js +218 -0
- package/components/menu/item.d.ts +29 -0
- package/components/menu/item.js +88 -0
- package/components/menu/item.vdt.js +103 -0
- package/components/menu/menu.d.ts +29 -0
- package/components/menu/menu.js +61 -0
- package/components/menu/menu.vdt.js +57 -0
- package/components/menu/styles.d.ts +9 -0
- package/components/menu/styles.js +138 -0
- package/components/menu/useDropdown.d.ts +19 -0
- package/components/menu/useDropdown.js +83 -0
- package/components/menu/useExpanded.d.ts +13 -0
- package/components/menu/useExpanded.js +80 -0
- package/components/menu/useHighlight.d.ts +13 -0
- package/components/menu/useHighlight.js +60 -0
- package/components/message/index.d.ts +4 -0
- package/components/message/index.js +3 -0
- package/components/message/index.spec.d.ts +4 -0
- package/components/message/index.spec.js +97 -0
- package/components/message/message.d.ts +23 -0
- package/components/message/message.js +112 -0
- package/components/message/message.vdt.js +54 -0
- package/components/message/messages.d.ts +11 -0
- package/components/message/messages.js +51 -0
- package/components/message/messages.vdt.js +20 -0
- package/components/message/styles.d.ts +6 -0
- package/components/message/styles.js +62 -0
- package/components/pagination/index.d.ts +40 -0
- package/components/pagination/index.js +167 -0
- package/components/pagination/index.spec.d.ts +4 -0
- package/components/pagination/index.spec.js +146 -0
- package/components/pagination/index.vdt.js +173 -0
- package/components/pagination/styles.d.ts +5 -0
- package/components/pagination/styles.js +65 -0
- package/components/portal.d.ts +23 -0
- package/components/portal.js +148 -0
- package/components/position.d.ts +77 -0
- package/components/position.js +489 -0
- package/components/progress/index.d.ts +31 -0
- package/components/progress/index.js +72 -0
- package/components/progress/index.spec.d.ts +4 -0
- package/components/progress/index.spec.js +235 -0
- package/components/progress/index.vdt.js +82 -0
- package/components/progress/styles.d.ts +6 -0
- package/components/progress/styles.js +88 -0
- package/components/progress/useColor.d.ts +7 -0
- package/components/progress/useColor.js +36 -0
- package/components/progress/useStatus.d.ts +4 -0
- package/components/progress/useStatus.js +24 -0
- package/components/radio/index.d.ts +24 -0
- package/components/radio/index.js +84 -0
- package/components/radio/index.spec.d.ts +4 -0
- package/components/radio/index.spec.js +192 -0
- package/components/radio/index.vdt.js +66 -0
- package/components/radio/styles.d.ts +5 -0
- package/components/radio/styles.js +49 -0
- package/components/rate/index.d.ts +25 -0
- package/components/rate/index.js +48 -0
- package/components/rate/index.spec.d.ts +4 -0
- package/components/rate/index.spec.js +112 -0
- package/components/rate/index.vdt.js +76 -0
- package/components/rate/styles.d.ts +5 -0
- package/components/rate/styles.js +28 -0
- package/components/rate/useActiveValue.d.ts +9 -0
- package/components/rate/useActiveValue.js +42 -0
- package/components/scrollSelect/index.d.ts +30 -0
- package/components/scrollSelect/index.js +48 -0
- package/components/scrollSelect/index.spec.d.ts +4 -0
- package/components/scrollSelect/index.spec.js +174 -0
- package/components/scrollSelect/index.vdt.js +59 -0
- package/components/scrollSelect/styles.d.ts +7 -0
- package/components/scrollSelect/styles.js +38 -0
- package/components/scrollSelect/useList.d.ts +9 -0
- package/components/scrollSelect/useList.js +82 -0
- package/components/scrollSelect/useMouseEvents.d.ts +12 -0
- package/components/scrollSelect/useMouseEvents.js +112 -0
- package/components/scrollSelect/useTranslate.d.ts +12 -0
- package/components/scrollSelect/useTranslate.js +78 -0
- package/components/select/base.d.ts +63 -0
- package/components/select/base.js +156 -0
- package/components/select/base.vdt.js +194 -0
- package/components/select/constants.d.ts +5 -0
- package/components/select/constants.js +4 -0
- package/components/select/group.d.ts +17 -0
- package/components/select/group.js +31 -0
- package/components/select/group.vdt.js +41 -0
- package/components/select/index.d.ts +6 -0
- package/components/select/index.js +5 -0
- package/components/select/index.spec.d.ts +4 -0
- package/components/select/index.spec.js +680 -0
- package/components/select/menu.d.ts +13 -0
- package/components/select/menu.js +31 -0
- package/components/select/menu.vdt.js +138 -0
- package/components/select/option.d.ts +16 -0
- package/components/select/option.js +74 -0
- package/components/select/option.vdt.js +65 -0
- package/components/select/select.d.ts +36 -0
- package/components/select/select.js +93 -0
- package/components/select/select.vdt.js +62 -0
- package/components/select/styles.d.ts +7 -0
- package/components/select/styles.js +201 -0
- package/components/select/useBaseLabel.d.ts +12 -0
- package/components/select/useBaseLabel.js +80 -0
- package/components/select/useCard.d.ts +11 -0
- package/components/select/useCard.js +41 -0
- package/components/select/useEqualWidth.d.ts +4 -0
- package/components/select/useEqualWidth.js +16 -0
- package/components/select/useFilterable.d.ts +10 -0
- package/components/select/useFilterable.js +120 -0
- package/components/select/useFocusout.d.ts +12 -0
- package/components/select/useFocusout.js +49 -0
- package/components/select/useInput.d.ts +10 -0
- package/components/select/useInput.js +53 -0
- package/components/select/useLabel.d.ts +8 -0
- package/components/select/useLabel.js +59 -0
- package/components/select/useSearchable.d.ts +14 -0
- package/components/select/useSearchable.js +71 -0
- package/components/slider/index.d.ts +50 -0
- package/components/slider/index.js +86 -0
- package/components/slider/index.spec.d.ts +4 -0
- package/components/slider/index.spec.js +737 -0
- package/components/slider/index.vdt.js +154 -0
- package/components/slider/styles.d.ts +5 -0
- package/components/slider/styles.js +79 -0
- package/components/slider/useClick.d.ts +9 -0
- package/components/slider/useClick.js +46 -0
- package/components/slider/useDraggable.d.ts +16 -0
- package/components/slider/useDraggable.js +107 -0
- package/components/slider/useKeyboard.d.ts +10 -0
- package/components/slider/useKeyboard.js +59 -0
- package/components/slider/useMarks.d.ts +18 -0
- package/components/slider/useMarks.js +59 -0
- package/components/slider/usePoints.d.ts +16 -0
- package/components/slider/usePoints.js +85 -0
- package/components/slider/useStyles.d.ts +12 -0
- package/components/slider/useStyles.js +69 -0
- package/components/slider/useTooltip.d.ts +13 -0
- package/components/slider/useTooltip.js +70 -0
- package/components/slider/useValue.d.ts +12 -0
- package/components/slider/useValue.js +100 -0
- package/components/spin/index.d.ts +20 -0
- package/components/spin/index.js +30 -0
- package/components/spin/index.vdt.js +51 -0
- package/components/spin/styles.d.ts +5 -0
- package/components/spin/styles.js +36 -0
- package/components/spinner/index.d.ts +47 -0
- package/components/spinner/index.js +106 -0
- package/components/spinner/index.spec.d.ts +4 -0
- package/components/spinner/index.spec.js +553 -0
- package/components/spinner/index.vdt.js +73 -0
- package/components/spinner/styles.d.ts +5 -0
- package/components/spinner/styles.js +70 -0
- package/components/spinner/useChange.d.ts +11 -0
- package/components/spinner/useChange.js +55 -0
- package/components/spinner/useFormatter.d.ts +7 -0
- package/components/spinner/useFormatter.js +49 -0
- package/components/spinner/useStep.d.ts +16 -0
- package/components/spinner/useStep.js +100 -0
- package/components/spinner/useValue.d.ts +17 -0
- package/components/spinner/useValue.js +91 -0
- package/components/split/index.d.ts +31 -0
- package/components/split/index.js +55 -0
- package/components/split/index.spec.d.ts +4 -0
- package/components/split/index.spec.js +332 -0
- package/components/split/index.vdt.js +69 -0
- package/components/split/style.d.ts +7 -0
- package/components/split/style.js +57 -0
- package/components/split/useDraggable.d.ts +11 -0
- package/components/split/useDraggable.js +151 -0
- package/components/split/useSize.d.ts +7 -0
- package/components/split/useSize.js +35 -0
- package/components/steps/context.d.ts +7 -0
- package/components/steps/context.js +4 -0
- package/components/steps/index.d.ts +17 -0
- package/components/steps/index.js +49 -0
- package/components/steps/index.spec.d.ts +4 -0
- package/components/steps/index.spec.js +44 -0
- package/components/steps/index.vdt.js +52 -0
- package/components/steps/step.d.ts +12 -0
- package/components/steps/step.js +20 -0
- package/components/steps/step.vdt.js +49 -0
- package/components/steps/styles.d.ts +6 -0
- package/components/steps/styles.js +156 -0
- package/components/switch/index.d.ts +41 -0
- package/components/switch/index.js +115 -0
- package/components/switch/index.spec.d.ts +4 -0
- package/components/switch/index.spec.js +267 -0
- package/components/switch/index.vdt.js +135 -0
- package/components/switch/styles.d.ts +5 -0
- package/components/switch/styles.js +87 -0
- package/components/switch/useDraggable.d.ts +10 -0
- package/components/switch/useDraggable.js +75 -0
- package/components/table/cell.d.ts +25 -0
- package/components/table/cell.js +34 -0
- package/components/table/cell.vdt.js +67 -0
- package/components/table/column.d.ts +38 -0
- package/components/table/column.js +50 -0
- package/components/table/column.vdt.js +149 -0
- package/components/table/exportTable.d.ts +6 -0
- package/components/table/exportTable.js +82 -0
- package/components/table/index.d.ts +5 -0
- package/components/table/index.js +4 -0
- package/components/table/index.spec.d.ts +4 -0
- package/components/table/index.spec.js +1044 -0
- package/components/table/row.d.ts +49 -0
- package/components/table/row.js +122 -0
- package/components/table/row.vdt.js +128 -0
- package/components/table/styles.d.ts +6 -0
- package/components/table/styles.js +86 -0
- package/components/table/table.d.ts +97 -0
- package/components/table/table.js +238 -0
- package/components/table/table.vdt.js +332 -0
- package/components/table/useChecked.d.ts +27 -0
- package/components/table/useChecked.js +242 -0
- package/components/table/useColumns.d.ts +19 -0
- package/components/table/useColumns.js +111 -0
- package/components/table/useDisableRow.d.ts +11 -0
- package/components/table/useDisableRow.js +59 -0
- package/components/table/useDraggable.d.ts +11 -0
- package/components/table/useDraggable.js +62 -0
- package/components/table/useExpandable.d.ts +7 -0
- package/components/table/useExpandable.js +26 -0
- package/components/table/useFixedColumns.d.ts +27 -0
- package/components/table/useFixedColumns.js +142 -0
- package/components/table/useGroup.d.ts +17 -0
- package/components/table/useGroup.js +70 -0
- package/components/table/useMerge.d.ts +18 -0
- package/components/table/useMerge.js +79 -0
- package/components/table/useResizable.d.ts +14 -0
- package/components/table/useResizable.js +62 -0
- package/components/table/useRestRowStatus.d.ts +7 -0
- package/components/table/useRestRowStatus.js +47 -0
- package/components/table/useScroll.d.ts +9 -0
- package/components/table/useScroll.js +32 -0
- package/components/table/useSelected.d.ts +7 -0
- package/components/table/useSelected.js +31 -0
- package/components/table/useSortable.d.ts +10 -0
- package/components/table/useSortable.js +36 -0
- package/components/table/useStickyHeader.d.ts +12 -0
- package/components/table/useStickyHeader.js +36 -0
- package/components/table/useStickyScrollbar.d.ts +15 -0
- package/components/table/useStickyScrollbar.js +86 -0
- package/components/table/useTree.d.ts +10 -0
- package/components/table/useTree.js +61 -0
- package/components/table/useWidth.d.ts +13 -0
- package/components/table/useWidth.js +129 -0
- package/components/tabs/constants.d.ts +4 -0
- package/components/tabs/constants.js +3 -0
- package/components/tabs/index.d.ts +30 -0
- package/components/tabs/index.js +119 -0
- package/components/tabs/index.spec.d.ts +4 -0
- package/components/tabs/index.spec.js +98 -0
- package/components/tabs/index.vdt.js +62 -0
- package/components/tabs/styles.d.ts +5 -0
- package/components/tabs/styles.js +95 -0
- package/components/tabs/tab.d.ts +19 -0
- package/components/tabs/tab.js +55 -0
- package/components/tabs/tab.vdt.js +46 -0
- package/components/tabs/useActiveBar.d.ts +4 -0
- package/components/tabs/useActiveBar.js +61 -0
- package/components/tabs/useScroll.d.ts +13 -0
- package/components/tabs/useScroll.js +116 -0
- package/components/tag/base.d.ts +26 -0
- package/components/tag/base.js +54 -0
- package/components/tag/index.d.ts +7 -0
- package/components/tag/index.js +19 -0
- package/components/tag/index.spec.d.ts +4 -0
- package/components/tag/index.spec.js +42 -0
- package/components/tag/index.vdt.js +63 -0
- package/components/tag/styles.d.ts +5 -0
- package/components/tag/styles.js +95 -0
- package/components/timeline/index.d.ts +5 -0
- package/components/timeline/index.js +4 -0
- package/components/timeline/item.d.ts +20 -0
- package/components/timeline/item.js +31 -0
- package/components/timeline/item.vdt.js +39 -0
- package/components/timeline/styles.d.ts +10 -0
- package/components/timeline/styles.js +67 -0
- package/components/timeline/timeline.d.ts +9 -0
- package/components/timeline/timeline.js +15 -0
- package/components/timeline/timeline.vdt.js +25 -0
- package/components/timepicker/constants.d.ts +18 -0
- package/components/timepicker/constants.js +15 -0
- package/components/timepicker/index.d.ts +11 -0
- package/components/timepicker/index.js +40 -0
- package/components/timepicker/index.spec.d.ts +4 -0
- package/components/timepicker/index.spec.js +425 -0
- package/components/timepicker/panelPicker.d.ts +57 -0
- package/components/timepicker/panelPicker.js +55 -0
- package/components/timepicker/panelPicker.vdt.js +109 -0
- package/components/timepicker/selectPicker.d.ts +30 -0
- package/components/timepicker/selectPicker.js +33 -0
- package/components/timepicker/selectPicker.vdt.js +57 -0
- package/components/timepicker/styles.d.ts +5 -0
- package/components/timepicker/styles.js +31 -0
- package/components/timepicker/useDisabled.d.ts +13 -0
- package/components/timepicker/useDisabled.js +20 -0
- package/components/timepicker/useFormats.d.ts +15 -0
- package/components/timepicker/useFormats.js +49 -0
- package/components/timepicker/useStep.d.ts +13 -0
- package/components/timepicker/useStep.js +70 -0
- package/components/timepicker/useValue.d.ts +19 -0
- package/components/timepicker/useValue.js +54 -0
- package/components/tip/index.d.ts +15 -0
- package/components/tip/index.js +15 -0
- package/components/tip/index.vdt.js +86 -0
- package/components/tip/styles.d.ts +5 -0
- package/components/tip/styles.js +30 -0
- package/components/tooltip/content.d.ts +21 -0
- package/components/tooltip/content.js +94 -0
- package/components/tooltip/content.vdt.js +86 -0
- package/components/tooltip/index.d.ts +16 -0
- package/components/tooltip/index.js +30 -0
- package/components/tooltip/index.spec.d.ts +4 -0
- package/components/tooltip/index.spec.js +576 -0
- package/components/tooltip/styles.d.ts +7 -0
- package/components/tooltip/styles.js +82 -0
- package/components/tooltip/tooltip.d.ts +31 -0
- package/components/tooltip/tooltip.js +78 -0
- package/components/tooltip/useArrow.d.ts +7 -0
- package/components/tooltip/useArrow.js +53 -0
- package/components/transfer/index.d.ts +51 -0
- package/components/transfer/index.js +90 -0
- package/components/transfer/index.spec.d.ts +4 -0
- package/components/transfer/index.spec.js +242 -0
- package/components/transfer/index.vdt.js +161 -0
- package/components/transfer/styles.d.ts +5 -0
- package/components/transfer/styles.js +73 -0
- package/components/transfer/useCheck.d.ts +10 -0
- package/components/transfer/useCheck.js +91 -0
- package/components/transfer/useFilter.d.ts +10 -0
- package/components/transfer/useFilter.js +113 -0
- package/components/transfer/useTransfer.d.ts +10 -0
- package/components/transfer/useTransfer.js +86 -0
- package/components/tree/index.d.ts +60 -0
- package/components/tree/index.js +124 -0
- package/components/tree/index.spec.d.ts +4 -0
- package/components/tree/index.spec.js +428 -0
- package/components/tree/index.vdt.js +134 -0
- package/components/tree/styles.d.ts +5 -0
- package/components/tree/styles.js +71 -0
- package/components/tree/useChecked.d.ts +9 -0
- package/components/tree/useChecked.js +144 -0
- package/components/tree/useDraggable.d.ts +19 -0
- package/components/tree/useDraggable.js +174 -0
- package/components/tree/useExpanded.d.ts +9 -0
- package/components/tree/useExpanded.js +96 -0
- package/components/tree/useFilter.d.ts +6 -0
- package/components/tree/useFilter.js +55 -0
- package/components/tree/useNodes.d.ts +25 -0
- package/components/tree/useNodes.js +54 -0
- package/components/tree/useSelected.d.ts +10 -0
- package/components/tree/useSelected.js +92 -0
- package/components/tree/useTransitionEvent.d.ts +11 -0
- package/components/tree/useTransitionEvent.js +23 -0
- package/components/treeSelect/index.d.ts +30 -0
- package/components/treeSelect/index.js +141 -0
- package/components/treeSelect/index.spec.d.ts +4 -0
- package/components/treeSelect/index.spec.js +210 -0
- package/components/treeSelect/index.vdt.js +68 -0
- package/components/treeSelect/styles.d.ts +5 -0
- package/components/treeSelect/styles.js +19 -0
- package/components/treeSelect/useLabel.d.ts +4 -0
- package/components/treeSelect/useLabel.js +3 -0
- package/components/treeSelect/useValue.d.ts +12 -0
- package/components/treeSelect/useValue.js +71 -0
- package/components/types.d.ts +13 -0
- package/components/types.js +3 -0
- package/components/upload/ajaxUploader.d.ts +22 -0
- package/components/upload/ajaxUploader.js +89 -0
- package/components/upload/index.d.ts +66 -0
- package/components/upload/index.js +102 -0
- package/components/upload/index.spec.d.ts +4 -0
- package/components/upload/index.spec.js +544 -0
- package/components/upload/index.vdt.js +182 -0
- package/components/upload/styles.d.ts +6 -0
- package/components/upload/styles.js +156 -0
- package/components/upload/useAccept.d.ts +6 -0
- package/components/upload/useAccept.js +55 -0
- package/components/upload/useDrag.d.ts +10 -0
- package/components/upload/useDrag.js +47 -0
- package/components/upload/useFiles.d.ts +8 -0
- package/components/upload/useFiles.js +210 -0
- package/components/upload/useShowImage.d.ts +10 -0
- package/components/upload/useShowImage.js +25 -0
- package/components/upload/useUpload.d.ts +12 -0
- package/components/upload/useUpload.js +121 -0
- package/components/utils.d.ts +42 -0
- package/components/utils.js +361 -0
- package/hooks/useDelayClose.d.ts +7 -0
- package/hooks/useDelayClose.js +37 -0
- package/hooks/useDocumentClick.d.ts +9 -0
- package/hooks/useDocumentClick.js +37 -0
- package/hooks/useDraggable.d.ts +12 -0
- package/hooks/useDraggable.js +49 -0
- package/hooks/useKeyboard.d.ts +14 -0
- package/hooks/useKeyboard.js +54 -0
- package/hooks/useMouseOutsidable.d.ts +11 -0
- package/hooks/useMouseOutsidable.js +53 -0
- package/hooks/useReceive.d.ts +7 -0
- package/hooks/useReceive.js +30 -0
- package/hooks/useRecordComponent.d.ts +9 -0
- package/hooks/useRecordComponent.js +49 -0
- package/hooks/useResizeObserver.d.ts +5 -0
- package/hooks/useResizeObserver.js +16 -0
- package/hooks/useRouter.d.ts +4 -0
- package/hooks/useRouter.js +78 -0
- package/hooks/useShowHideEvents.d.ts +4 -0
- package/hooks/useShowHideEvents.js +27 -0
- package/hooks/useState.d.ts +11 -0
- package/hooks/useState.js +46 -0
- package/i18n/en-US.d.ts +94 -0
- package/i18n/en-US.js +108 -0
- package/i18n/index.d.ts +8 -0
- package/i18n/index.js +47 -0
- package/index.d.ts +61 -0
- package/index.js +63 -0
- package/package.json +51 -0
- package/styles/fonts/iconfont.d.ts +4 -0
- package/styles/fonts/iconfont.eot +0 -0
- package/styles/fonts/iconfont.js +8 -0
- package/styles/fonts/iconfont.svg +371 -0
- package/styles/fonts/iconfont.ttf +0 -0
- package/styles/fonts/iconfont.woff +0 -0
- package/styles/fonts/ionicons.d.ts +4 -0
- package/styles/fonts/ionicons.eot +0 -0
- package/styles/fonts/ionicons.js +19 -0
- package/styles/fonts/ionicons.svg +2230 -0
- package/styles/fonts/ionicons.ttf +0 -0
- package/styles/fonts/ionicons.woff +0 -0
- package/styles/global.d.ts +4 -0
- package/styles/global.js +18 -0
- package/styles/keyframes.d.ts +4 -0
- package/styles/keyframes.js +13 -0
- package/styles/theme.d.ts +108 -0
- package/styles/theme.js +130 -0
- package/styles/utils.d.ts +17 -0
- package/styles/utils.js +116 -0
- package/tsconfig.json +3 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
3
|
+
import { Component } from 'intact-react';
|
|
4
|
+
import { typeDefs } from './constants';
|
|
5
|
+
import template from './selectPicker.vdt';
|
|
6
|
+
import { useFormats } from './useFormats';
|
|
7
|
+
import { useDisabled } from '../datepicker/useDisabled';
|
|
8
|
+
import { useStep } from './useStep';
|
|
9
|
+
export var SelectPicker = /*#__PURE__*/function (_Component) {
|
|
10
|
+
_inheritsLoose(SelectPicker, _Component);
|
|
11
|
+
|
|
12
|
+
function SelectPicker() {
|
|
13
|
+
var _context;
|
|
14
|
+
|
|
15
|
+
var _this;
|
|
16
|
+
|
|
17
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
18
|
+
args[_key] = arguments[_key];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
22
|
+
_this.formats = useFormats();
|
|
23
|
+
_this.disabled = useDisabled(_this.formats);
|
|
24
|
+
_this.step = useStep(_this.disabled, _this.formats);
|
|
25
|
+
return _this;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return SelectPicker;
|
|
29
|
+
}(Component);
|
|
30
|
+
SelectPicker.template = template;
|
|
31
|
+
SelectPicker.typeDefs = typeDefs;
|
|
32
|
+
|
|
33
|
+
export {normalize} from 'intact-react';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs3/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["className", "value", "placeholder"];
|
|
4
|
+
import { createUnknownComponentVNode as _$cc, className as _$cn, map as _$ma, extend as _$ex, EMPTY_OBJ as _$em } from 'intact-react';
|
|
5
|
+
import { Select, Option } from '../select';
|
|
6
|
+
import { Icon } from '../icon';
|
|
7
|
+
import { _$ } from '../../i18n';
|
|
8
|
+
var _$tmp0 = {
|
|
9
|
+
'className': 'k-icon-time'
|
|
10
|
+
};
|
|
11
|
+
export default function ($props, $blocks, $__proto__) {
|
|
12
|
+
$blocks || ($blocks = {});
|
|
13
|
+
$props || ($props = {});
|
|
14
|
+
var $this = this;
|
|
15
|
+
|
|
16
|
+
var _this$get = this.get(),
|
|
17
|
+
className = _this$get.className,
|
|
18
|
+
value = _this$get.value,
|
|
19
|
+
placeholder = _this$get.placeholder,
|
|
20
|
+
rest = _objectWithoutPropertiesLoose(_this$get, _excluded);
|
|
21
|
+
|
|
22
|
+
var options = this.step.options.value;
|
|
23
|
+
return _$cc(Select, _extends({}, rest, {
|
|
24
|
+
'placeholder': placeholder || _$('请选择时间'),
|
|
25
|
+
'filterable': true,
|
|
26
|
+
'className': _$cn(className),
|
|
27
|
+
'children': _$ma(options, function ($value, $key) {
|
|
28
|
+
return _$cc(Option, {
|
|
29
|
+
'value': $value.value,
|
|
30
|
+
'children': $value.label
|
|
31
|
+
});
|
|
32
|
+
}, $this),
|
|
33
|
+
'$blocks': function ($blocks) {
|
|
34
|
+
var _$blocks = {},
|
|
35
|
+
__$blocks = _$ex({}, $blocks);
|
|
36
|
+
|
|
37
|
+
return (_$blocks['suffix'] = function ($super) {
|
|
38
|
+
return _$cc(Icon, _$tmp0);
|
|
39
|
+
}, __$blocks['suffix'] = function ($super, data) {
|
|
40
|
+
var block = $blocks['suffix'];
|
|
41
|
+
|
|
42
|
+
var callBlock = function callBlock() {
|
|
43
|
+
return _$blocks['suffix'].call($this, $super, data);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
return block ? block.call($this, callBlock, data) : callBlock();
|
|
47
|
+
}), __$blocks;
|
|
48
|
+
}.call($this, _$em),
|
|
49
|
+
'ev-$model:value': function ev$modelValue($v) {
|
|
50
|
+
$this.set('value', $v);
|
|
51
|
+
},
|
|
52
|
+
'value': $this.get('value')
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
;
|
|
56
|
+
|
|
57
|
+
export {normalize} from 'intact-react';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { css, cx } from '@emotion/css';
|
|
2
|
+
import { theme, setDefault } from '../../styles/theme';
|
|
3
|
+
import { deepDefaults } from '../../styles/utils';
|
|
4
|
+
import '../../styles/global';
|
|
5
|
+
import { datepicker, makePanelStyles as makePanelStylesBase } from '../datepicker/styles';
|
|
6
|
+
var defaults = {
|
|
7
|
+
get border() {
|
|
8
|
+
return datepicker.border;
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
padding: "16px",
|
|
12
|
+
scrollHeight: "160px",
|
|
13
|
+
// range
|
|
14
|
+
range: {
|
|
15
|
+
width: "200px",
|
|
16
|
+
padding: "16px",
|
|
17
|
+
titleGap: "8px",
|
|
18
|
+
scrollHeight: "140px"
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
var timepicker;
|
|
22
|
+
setDefault(function () {
|
|
23
|
+
timepicker = deepDefaults(theme, {
|
|
24
|
+
timepicker: defaults
|
|
25
|
+
}).timepicker;
|
|
26
|
+
});
|
|
27
|
+
export function makePanelStyles() {
|
|
28
|
+
return cx(makePanelStylesBase(), /*#__PURE__*/css("&.k-time-content{.k-datepicker-time{padding:", timepicker.padding, ";}.k-scroll-select{height:", timepicker.scrollHeight, ";}}&.k-range{.k-datepicker-time{width:auto;border:", timepicker.border, ";}.k-scroll-select{height:", timepicker.range.scrollHeight, ";}.k-datepicker-calendar-wrapper{padding:", timepicker.range.padding, ";width:", timepicker.range.width, ";border:none;}.k-timepicker-title{text-align:center;margin-bottom:", timepicker.range.titleGap, ";}}"));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export {normalize} from 'intact-react';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { useFormats } from './useFormats';
|
|
2
|
+
import { PanelFlags } from '../datepicker/usePanel';
|
|
3
|
+
export declare function useDisabled(formats: ReturnType<typeof useFormats>): {
|
|
4
|
+
isDisabled: (value: import("dayjs").Dayjs, type?: import("dayjs").OpUnitType) => boolean;
|
|
5
|
+
isDisabledConfirm: () => boolean;
|
|
6
|
+
maxDate: import("../../hooks/useState").State<import("dayjs").Dayjs | null>;
|
|
7
|
+
minDate: import("../../hooks/useState").State<import("dayjs").Dayjs | null>;
|
|
8
|
+
isDisabledTime: (value: import("dayjs").Dayjs, flag: PanelFlags) => boolean;
|
|
9
|
+
isDisabledTimeByStep: (value: string, flag: PanelFlags) => boolean;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
export {normalize} from 'intact-react';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs3/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["isDisabledTime"];
|
|
4
|
+
import { useDisabled as useDisabledBase } from '../datepicker/useDisabled';
|
|
5
|
+
export function useDisabled(formats) {
|
|
6
|
+
var _useDisabledBase = useDisabledBase(formats),
|
|
7
|
+
isDisabledTime = _useDisabledBase.isDisabledTime,
|
|
8
|
+
rest = _objectWithoutPropertiesLoose(_useDisabledBase, _excluded);
|
|
9
|
+
|
|
10
|
+
function isDisabledTimeByStep(value, flag) {
|
|
11
|
+
return isDisabledTime(formats.createDateByValueFormat(value), flag);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return _extends({
|
|
15
|
+
isDisabledTime: isDisabledTime,
|
|
16
|
+
isDisabledTimeByStep: isDisabledTimeByStep
|
|
17
|
+
}, rest);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export {normalize} from 'intact-react';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Component } from 'intact-react';
|
|
2
|
+
import dayjs, { Dayjs } from '../datepicker/dayjs';
|
|
3
|
+
import type { TimepickerProps } from './';
|
|
4
|
+
import type { Value } from '../datepicker/basepicker';
|
|
5
|
+
export declare function useFormats<T extends Component<TimepickerProps>>(): {
|
|
6
|
+
getValueFormat: () => string;
|
|
7
|
+
getShowFormat: () => string;
|
|
8
|
+
createDateByValueFormat: (value: Value) => dayjs.Dayjs;
|
|
9
|
+
createDateByShowFormat: (value: Value) => dayjs.Dayjs;
|
|
10
|
+
getShowString: (value: Dayjs) => string;
|
|
11
|
+
getValueString: (value: Dayjs) => string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
export {normalize} from 'intact-react';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { useInstance } from 'intact-react';
|
|
2
|
+
import dayjs from '../datepicker/dayjs';
|
|
3
|
+
import { YEAR_FORMAT, TIME_FORMAT, PREFIX } from './constants';
|
|
4
|
+
export function useFormats() {
|
|
5
|
+
var instance = useInstance();
|
|
6
|
+
|
|
7
|
+
function getValueFormat() {
|
|
8
|
+
var _instance$get = instance.get(),
|
|
9
|
+
format = _instance$get.format,
|
|
10
|
+
valueFormat = _instance$get.valueFormat;
|
|
11
|
+
|
|
12
|
+
return valueFormat || format || TIME_FORMAT;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function getShowFormat() {
|
|
16
|
+
var _instance$get2 = instance.get(),
|
|
17
|
+
format = _instance$get2.format,
|
|
18
|
+
showFormat = _instance$get2.showFormat;
|
|
19
|
+
|
|
20
|
+
return showFormat || format || TIME_FORMAT;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function createDateByValueFormat(value) {
|
|
24
|
+
return dayjs(PREFIX + value, YEAR_FORMAT + getValueFormat());
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function createDateByShowFormat(value) {
|
|
28
|
+
return dayjs(PREFIX + value, YEAR_FORMAT + getShowFormat(), true); // strict parsing
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function getShowString(value) {
|
|
32
|
+
return value.format(getShowFormat());
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function getValueString(value) {
|
|
36
|
+
return value.format(getValueFormat());
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
getValueFormat: getValueFormat,
|
|
41
|
+
getShowFormat: getShowFormat,
|
|
42
|
+
createDateByValueFormat: createDateByValueFormat,
|
|
43
|
+
createDateByShowFormat: createDateByShowFormat,
|
|
44
|
+
getShowString: getShowString,
|
|
45
|
+
getValueString: getValueString
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export {normalize} from 'intact-react';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { useDisabled } from '../datepicker/useDisabled';
|
|
2
|
+
import type { useFormats } from './useFormats';
|
|
3
|
+
declare type Option = {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function useStep({ maxDate, minDate }: ReturnType<typeof useDisabled>, { getValueString, getShowString }: ReturnType<typeof useFormats>): {
|
|
8
|
+
options: import("../../hooks/useState").State<Option[] | null>;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
export {normalize} from 'intact-react';
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
|
|
2
|
+
import { useInstance } from 'intact-react';
|
|
3
|
+
import { useState } from '../../hooks/useState';
|
|
4
|
+
import { NOW } from './constants';
|
|
5
|
+
import { useReceive } from '../../hooks/useReceive';
|
|
6
|
+
export function useStep(_ref, _ref2) {
|
|
7
|
+
var maxDate = _ref.maxDate,
|
|
8
|
+
minDate = _ref.minDate;
|
|
9
|
+
var getValueString = _ref2.getValueString,
|
|
10
|
+
getShowString = _ref2.getShowString;
|
|
11
|
+
var instance = useInstance();
|
|
12
|
+
var options = useState(null);
|
|
13
|
+
useReceive(['step', 'min', 'max'], generateOptions);
|
|
14
|
+
|
|
15
|
+
function generateOptions() {
|
|
16
|
+
var _instance$get = instance.get(),
|
|
17
|
+
step = _instance$get.step;
|
|
18
|
+
|
|
19
|
+
if (step) {
|
|
20
|
+
var data = [];
|
|
21
|
+
var maxValue = maxDate.value || NOW.hour(23).minute(59).second(59);
|
|
22
|
+
var stepValue = parseTime(step);
|
|
23
|
+
var value = minDate.value || NOW;
|
|
24
|
+
|
|
25
|
+
var push = function push(value) {
|
|
26
|
+
data.push({
|
|
27
|
+
value: getValueString(value),
|
|
28
|
+
label: getShowString(value)
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
for (;; value = value.add(stepValue, 'second')) {
|
|
33
|
+
if (value <= maxValue) {
|
|
34
|
+
push(value);
|
|
35
|
+
if (+value === +maxValue) break;
|
|
36
|
+
} else if (data.length) {
|
|
37
|
+
// it the last value is less than maxValue,
|
|
38
|
+
// add the maxValue to the last
|
|
39
|
+
push(maxValue);
|
|
40
|
+
break;
|
|
41
|
+
} else {
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
options.set(data);
|
|
47
|
+
} else {
|
|
48
|
+
options.set(null);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function parseTime(time) {
|
|
53
|
+
var _context;
|
|
54
|
+
|
|
55
|
+
var _time$split$map = _mapInstanceProperty(_context = time.split(':')).call(_context, function (item) {
|
|
56
|
+
return parseInt(item, 10);
|
|
57
|
+
}),
|
|
58
|
+
hours = _time$split$map[0],
|
|
59
|
+
minutes = _time$split$map[1],
|
|
60
|
+
seconds = _time$split$map[2];
|
|
61
|
+
|
|
62
|
+
return (hours * 60 + (minutes || 0)) * 60 + (seconds || 0);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
options: options
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export {normalize} from 'intact-react';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { useFormats } from './useFormats';
|
|
2
|
+
import { StateValueItem } from '../datepicker/basepicker';
|
|
3
|
+
import type { useDisabled } from '../datepicker/useDisabled';
|
|
4
|
+
import type { usePanel } from '../datepicker/usePanel';
|
|
5
|
+
import { PanelFlags } from '../datepicker/usePanel';
|
|
6
|
+
export declare function useValue(formats: ReturnType<typeof useFormats>, disabled: ReturnType<typeof useDisabled>, panel: ReturnType<typeof usePanel>): {
|
|
7
|
+
format: () => string | string[];
|
|
8
|
+
onConfirm: () => void;
|
|
9
|
+
getTimeValue: (flag: PanelFlags) => import("dayjs").Dayjs | null | undefined;
|
|
10
|
+
convertToDayjs: (v: import("../datepicker/basepicker").Value | [import("../datepicker/basepicker").Value, import("../datepicker/basepicker").Value] | import("../datepicker/basepicker").Value[] | [import("../datepicker/basepicker").Value, import("../datepicker/basepicker").Value][] | null | undefined) => import("../datepicker/basepicker").DayjsValue;
|
|
11
|
+
value: import("../../hooks/useState").State<import("../datepicker/basepicker").StateValue>;
|
|
12
|
+
setValue: (v: StateValueItem, fromInput: boolean) => void;
|
|
13
|
+
getDayjsValue: () => import("../datepicker/basepicker").DayjsValue;
|
|
14
|
+
onChangeTime: (date: import("dayjs").Dayjs, flag: PanelFlags) => void;
|
|
15
|
+
onChangeTimeByStep: (v: string, flag: PanelFlags) => void;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export {normalize} from 'intact-react';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs3/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["value", "getDayjsValue", "setValue", "onChangeTime"];
|
|
4
|
+
import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/slice";
|
|
5
|
+
import { useInstance } from 'intact-react';
|
|
6
|
+
import { last } from '../utils';
|
|
7
|
+
import { useValue as useValueBase } from '../datepicker/basepicker';
|
|
8
|
+
import { NOW } from './constants';
|
|
9
|
+
export function useValue(formats, disabled, panel) {
|
|
10
|
+
var instance = useInstance();
|
|
11
|
+
|
|
12
|
+
var _useValueBase = useValueBase(formats, disabled, panel, function (v) {
|
|
13
|
+
return false;
|
|
14
|
+
}, function (v) {
|
|
15
|
+
// pop the last value when input
|
|
16
|
+
// because it is a placeholder date
|
|
17
|
+
value.value.pop();
|
|
18
|
+
setValue(v, true);
|
|
19
|
+
}, function () {
|
|
20
|
+
return 'second';
|
|
21
|
+
}, function (dayjsValue, value) {
|
|
22
|
+
value.set(_sliceInstanceProperty(dayjsValue).call(dayjsValue, 0));
|
|
23
|
+
}),
|
|
24
|
+
value = _useValueBase.value,
|
|
25
|
+
getDayjsValue = _useValueBase.getDayjsValue,
|
|
26
|
+
setValue = _useValueBase.setValue,
|
|
27
|
+
onChangeTime = _useValueBase.onChangeTime,
|
|
28
|
+
rest = _objectWithoutPropertiesLoose(_useValueBase, _excluded);
|
|
29
|
+
|
|
30
|
+
setValue(getPlaceholderDates(), false);
|
|
31
|
+
instance.watch('value', function (value) {
|
|
32
|
+
var dayjsValue = getDayjsValue();
|
|
33
|
+
setValue(last(dayjsValue) || getPlaceholderDates(), false);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
function getPlaceholderDates() {
|
|
37
|
+
return instance.get('range') ? [NOW, NOW] : NOW;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function onChangeTimeByStep(v, flag) {
|
|
41
|
+
var date = formats.createDateByValueFormat(v);
|
|
42
|
+
onChangeTime(date, flag);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return _extends({
|
|
46
|
+
value: value,
|
|
47
|
+
setValue: setValue,
|
|
48
|
+
getDayjsValue: getDayjsValue,
|
|
49
|
+
onChangeTime: onChangeTime,
|
|
50
|
+
onChangeTimeByStep: onChangeTimeByStep
|
|
51
|
+
}, rest);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export {normalize} from 'intact-react';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Tag, TagProps, TagEvents, TagBlocks } from '../tag/base';
|
|
2
|
+
export interface TipProps extends TagProps {
|
|
3
|
+
}
|
|
4
|
+
export interface TipEvents extends TagEvents {
|
|
5
|
+
}
|
|
6
|
+
export interface TipBlocks extends TagBlocks {
|
|
7
|
+
title: null;
|
|
8
|
+
close: null;
|
|
9
|
+
}
|
|
10
|
+
export declare class Tip extends Tag<TipProps, TipEvents, TipBlocks> {
|
|
11
|
+
static template: string | import("vdt").Template<any>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
export {normalize} from 'intact-react';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import template from './index.vdt';
|
|
3
|
+
import { Tag } from '../tag/base';
|
|
4
|
+
export var Tip = /*#__PURE__*/function (_Tag) {
|
|
5
|
+
_inheritsLoose(Tip, _Tag);
|
|
6
|
+
|
|
7
|
+
function Tip() {
|
|
8
|
+
return _Tag.apply(this, arguments) || this;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return Tip;
|
|
12
|
+
}(Tag);
|
|
13
|
+
Tip.template = template;
|
|
14
|
+
|
|
15
|
+
export {normalize} from 'intact-react';
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { superCall as _$su, className as _$cn, extend as _$ex, EMPTY_OBJ as _$em, createElementVNode as _$ce, noop as _$no, createUnknownComponentVNode as _$cc } from 'intact-react';
|
|
2
|
+
import { Button } from '../button';
|
|
3
|
+
import { Icon } from '../icon';
|
|
4
|
+
import { makeStyles } from './styles';
|
|
5
|
+
export default function ($props, $blocks, $__proto__) {
|
|
6
|
+
var _classNameObj;
|
|
7
|
+
|
|
8
|
+
$blocks || ($blocks = {});
|
|
9
|
+
$props || ($props = {});
|
|
10
|
+
var $this = this;
|
|
11
|
+
var _$blocks = {};
|
|
12
|
+
var __$blocks = {};
|
|
13
|
+
|
|
14
|
+
var _this$get = this.get(),
|
|
15
|
+
children = _this$get.children,
|
|
16
|
+
closable = _this$get.closable,
|
|
17
|
+
type = _this$get.type,
|
|
18
|
+
disabled = _this$get.disabled;
|
|
19
|
+
|
|
20
|
+
var classNameObj = (_classNameObj = {
|
|
21
|
+
'k-tip': true
|
|
22
|
+
}, _classNameObj[makeStyles()] = true, _classNameObj);
|
|
23
|
+
return _$su.call($this, {
|
|
24
|
+
'className': _$cn(classNameObj),
|
|
25
|
+
'name': 'k-fade'
|
|
26
|
+
}, function ($blocks) {
|
|
27
|
+
var _$blocks = {},
|
|
28
|
+
__$blocks = _$ex({}, $blocks);
|
|
29
|
+
|
|
30
|
+
return (_$blocks['body'] = function ($super) {
|
|
31
|
+
return _$ce(2, 'div', [$blocks.title ? _$ce(2, 'div', (_$blocks['title'] = function ($super) {
|
|
32
|
+
return null;
|
|
33
|
+
}, __$blocks['title'] = function ($super, data) {
|
|
34
|
+
var block = $blocks['title'];
|
|
35
|
+
|
|
36
|
+
var callBlock = function callBlock() {
|
|
37
|
+
return _$blocks['title'].call($this, $super, data);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return block ? block.call($this, callBlock, data) : callBlock();
|
|
41
|
+
}, __$blocks['title'](_$no)), 0, 'k-tip-title') : undefined, children], 0, 'k-tip-wrapper');
|
|
42
|
+
}, __$blocks['body'] = function ($super, data) {
|
|
43
|
+
var block = $blocks['body'];
|
|
44
|
+
|
|
45
|
+
var callBlock = function callBlock() {
|
|
46
|
+
return _$blocks['body'].call($this, $super, data);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
return block ? block.call($this, callBlock, data) : callBlock();
|
|
50
|
+
}), (_$blocks['_close'] = function ($super) {
|
|
51
|
+
return closable ? _$cc(Button, {
|
|
52
|
+
'type': !$blocks.close ? 'none' : 'link',
|
|
53
|
+
'icon': !$blocks.close,
|
|
54
|
+
'ev-click': this.onClose,
|
|
55
|
+
'className': 'k-tip-close',
|
|
56
|
+
'children': (_$blocks['close'] = function ($super) {
|
|
57
|
+
return _$cc(Icon, {
|
|
58
|
+
'className': 'ion-ios-close-empty',
|
|
59
|
+
'size': 'large',
|
|
60
|
+
'color': type,
|
|
61
|
+
'hoverable': !disabled
|
|
62
|
+
});
|
|
63
|
+
}, __$blocks['close'] = function ($super, data) {
|
|
64
|
+
var block = $blocks['close'];
|
|
65
|
+
|
|
66
|
+
var callBlock = function callBlock() {
|
|
67
|
+
return _$blocks['close'].call($this, $super, data);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
return block ? block.call($this, callBlock, data) : callBlock();
|
|
71
|
+
}, __$blocks['close'](_$no))
|
|
72
|
+
}) : undefined;
|
|
73
|
+
}, __$blocks['_close'] = function ($super, data) {
|
|
74
|
+
var block = $blocks['_close'];
|
|
75
|
+
|
|
76
|
+
var callBlock = function callBlock() {
|
|
77
|
+
return _$blocks['_close'].call($this, $super, data);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
return block ? block.call($this, callBlock, data) : callBlock();
|
|
81
|
+
}), __$blocks;
|
|
82
|
+
}.call($this, $blocks), $__proto__);
|
|
83
|
+
}
|
|
84
|
+
;
|
|
85
|
+
|
|
86
|
+
export {normalize} from 'intact-react';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { theme, setDefault } from '../../styles/theme';
|
|
2
|
+
import { css } from '@emotion/css';
|
|
3
|
+
import '../../styles/global';
|
|
4
|
+
import { deepDefaults } from '../../styles/utils';
|
|
5
|
+
var defaults = {
|
|
6
|
+
title: {
|
|
7
|
+
fontSize: '14px',
|
|
8
|
+
gap: '8px'
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
get color() {
|
|
12
|
+
return theme.color.text;
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
get padding() {
|
|
16
|
+
return "6px " + theme.default.padding;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
};
|
|
20
|
+
var tip;
|
|
21
|
+
setDefault(function () {
|
|
22
|
+
tip = deepDefaults(theme, {
|
|
23
|
+
tip: defaults
|
|
24
|
+
}).tip;
|
|
25
|
+
});
|
|
26
|
+
export function makeStyles() {
|
|
27
|
+
return /*#__PURE__*/css("&.k-tip{display:flex;height:auto;padding:0;color:", tip.color, "!important;align-items:flex-start;}.k-tip-wrapper{flex:1;padding:", tip.padding, ";}.k-tip-title{font-size:", tip.title.fontSize, ";margin-bottom:", tip.title.gap, ";}&.k-fade-leave-active{position:relative;}");
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export {normalize} from 'intact-react';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DropdownMenu, DropdownMenuProps, DropdownMenuEvents, DropdownMenuBlocks } from '../dropdown/menu';
|
|
2
|
+
export interface TooltipContentProps extends DropdownMenuProps {
|
|
3
|
+
}
|
|
4
|
+
export interface TooltipContentEvents extends DropdownMenuEvents {
|
|
5
|
+
}
|
|
6
|
+
export interface TooltipContentBlocks extends DropdownMenuBlocks {
|
|
7
|
+
buttons: null;
|
|
8
|
+
}
|
|
9
|
+
export declare class TooltipContent extends DropdownMenu<TooltipContentProps, TooltipContentEvents, TooltipContentBlocks> {
|
|
10
|
+
static template: string | import('intact-react').Template<any>;
|
|
11
|
+
private isEmptyChildren;
|
|
12
|
+
private arrow;
|
|
13
|
+
init(): void;
|
|
14
|
+
private onEnter;
|
|
15
|
+
protected onMouseEnter(e: MouseEvent): void;
|
|
16
|
+
private ok;
|
|
17
|
+
private cancel;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export {normalize} from 'intact-react';
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
3
|
+
import { __decorate } from "tslib";
|
|
4
|
+
import { DropdownMenu } from '../dropdown/menu';
|
|
5
|
+
import template from './content.vdt';
|
|
6
|
+
import { bind } from '../utils';
|
|
7
|
+
import { useArrow } from './useArrow';
|
|
8
|
+
export var TooltipContent = /*#__PURE__*/function (_DropdownMenu) {
|
|
9
|
+
_inheritsLoose(TooltipContent, _DropdownMenu);
|
|
10
|
+
|
|
11
|
+
function TooltipContent() {
|
|
12
|
+
var _context;
|
|
13
|
+
|
|
14
|
+
var _this;
|
|
15
|
+
|
|
16
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
17
|
+
args[_key] = arguments[_key];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
_this = _DropdownMenu.call.apply(_DropdownMenu, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
21
|
+
_this.isEmptyChildren = true;
|
|
22
|
+
_this.arrow = useArrow();
|
|
23
|
+
return _this;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var _proto = TooltipContent.prototype;
|
|
27
|
+
|
|
28
|
+
_proto.init = function init() {
|
|
29
|
+
var _this2 = this;
|
|
30
|
+
|
|
31
|
+
_DropdownMenu.prototype.init.call(this);
|
|
32
|
+
|
|
33
|
+
this.on('$receive:children', function (vNodes) {
|
|
34
|
+
_this2.isEmptyChildren = isEmptyChildren(vNodes);
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
_proto.onEnter = function onEnter() {
|
|
39
|
+
this.dropdown.position();
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
_proto.onMouseEnter = function onMouseEnter(e) {
|
|
43
|
+
var dropdown = this.dropdown;
|
|
44
|
+
|
|
45
|
+
if (dropdown.get('hoverable')) {
|
|
46
|
+
dropdown.show();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
dropdown.trigger('mouseenter', e);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
_proto.ok = function ok() {
|
|
53
|
+
var dropdown = this.dropdown;
|
|
54
|
+
dropdown.hide(true);
|
|
55
|
+
dropdown.trigger('ok');
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
_proto.cancel = function cancel() {
|
|
59
|
+
var dropdown = this.dropdown;
|
|
60
|
+
dropdown.hide(true);
|
|
61
|
+
dropdown.trigger('cancel');
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
return TooltipContent;
|
|
65
|
+
}(DropdownMenu);
|
|
66
|
+
TooltipContent.template = template;
|
|
67
|
+
|
|
68
|
+
__decorate([bind], TooltipContent.prototype, "onEnter", null);
|
|
69
|
+
|
|
70
|
+
__decorate([bind], TooltipContent.prototype, "onMouseEnter", null);
|
|
71
|
+
|
|
72
|
+
__decorate([bind], TooltipContent.prototype, "ok", null);
|
|
73
|
+
|
|
74
|
+
__decorate([bind], TooltipContent.prototype, "cancel", null);
|
|
75
|
+
|
|
76
|
+
function isEmptyChildren(vNodes) {
|
|
77
|
+
if (!vNodes) return true;
|
|
78
|
+
|
|
79
|
+
if (Array.isArray(vNodes)) {
|
|
80
|
+
return vNodes.every(function (vNode) {
|
|
81
|
+
return isEmptyChildren(vNode);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (vNodes.type === 1) {
|
|
86
|
+
return !vNodes.children;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
;
|
|
93
|
+
|
|
94
|
+
export {normalize} from 'intact-react';
|