@king-design/intact 2.1.1 → 3.0.0-beta.1
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 +1 -1
- package/components/button/demos/basic.md +1 -0
- package/components/button/demos/group.md +11 -0
- package/components/button/demos/icon.md +1 -0
- package/components/button/index.md +1 -1
- package/components/button/index.ts +2 -2
- package/components/button/styles.ts +10 -2
- package/components/card/styles.ts +3 -2
- package/components/checkbox/styles.ts +31 -6
- package/components/collapse/styles.ts +4 -1
- package/components/copy/demos/basic.md +12 -0
- package/components/copy/demos/children.md +37 -0
- package/components/copy/index.md +21 -0
- package/components/copy/index.spec.ts +21 -0
- package/components/copy/index.ts +37 -0
- package/components/copy/index.vdt +23 -0
- package/components/copy/styles.ts +9 -0
- package/components/copy/useCopy.ts +91 -0
- package/components/datepicker/demos/basic.md +1 -0
- package/components/datepicker/index.md +2 -0
- package/components/datepicker/index.spec.ts +2 -2
- package/components/datepicker/index.vdt +2 -2
- package/components/datepicker/styles.ts +13 -5
- package/components/dialog/alert.vdt +10 -6
- package/components/dialog/base.vdt +4 -5
- package/components/dialog/index.spec.ts +4 -4
- package/components/dialog/styles.ts +18 -13
- package/components/drawer/styles.ts +20 -10
- package/components/dropdown/demos/tooltip.md +1 -1
- package/components/dropdown/index.spec.ts +1 -1
- package/components/dropdown/styles.ts +1 -1
- package/components/form/index.spec.ts +1 -1
- package/components/form/item.vdt +1 -1
- package/components/form/styles.ts +21 -26
- package/components/grid/useGutter.ts +7 -6
- package/components/icon/demos/disabled.md +21 -0
- package/components/icon/demos/icons.md +87 -116
- package/components/icon/index.md +1 -0
- package/components/icon/index.ts +2 -0
- package/components/icon/index.vdt +6 -2
- package/components/icon/styles.ts +8 -1
- package/components/input/demos/flat.md +16 -0
- package/components/input/index.md +1 -0
- package/components/input/index.ts +4 -10
- package/components/input/index.vdt +2 -1
- package/components/input/styles.ts +29 -21
- package/components/message/demos/basic.md +1 -1
- package/components/message/demos/duration.md +3 -3
- package/components/message/index.md +1 -1
- package/components/message/message.ts +2 -2
- package/components/message/message.vdt +6 -6
- package/components/message/styles.ts +10 -19
- package/components/pagination/demos/flat.md +22 -0
- package/components/pagination/index.md +1 -1
- package/components/pagination/index.spec.ts +1 -1
- package/components/pagination/index.ts +2 -2
- package/components/pagination/index.vdt +15 -18
- package/components/pagination/styles.ts +13 -9
- package/components/popover/content.ts +40 -0
- package/components/popover/content.vdt +32 -0
- package/components/popover/demos/basic.md +47 -0
- package/components/popover/demos/button.md +49 -0
- package/components/popover/demos/content.md +36 -0
- package/components/popover/demos/text.md +38 -0
- package/components/popover/demos/type.md +51 -0
- package/components/popover/index.md +54 -0
- package/components/popover/index.spec.ts +91 -0
- package/components/popover/index.ts +52 -0
- package/components/popover/styles.ts +45 -0
- package/components/progress/demos/children.md +1 -1
- package/components/progress/demos/circleSize.md +84 -0
- package/components/progress/demos/customColor.md +1 -3
- package/components/progress/index.ts +1 -1
- package/components/progress/index.vdt +36 -7
- package/components/progress/styles.ts +34 -21
- package/components/radio/styles.ts +28 -9
- package/components/rate/styles.ts +1 -0
- package/components/select/base.ts +8 -2
- package/components/select/base.vdt +40 -39
- package/components/select/demos/basic.md +21 -12
- package/components/select/demos/creatable.md +1 -1
- package/components/select/demos/draggable.md +55 -0
- package/components/select/demos/flat.md +42 -0
- package/components/select/demos/nowrap.md +24 -0
- package/components/select/demos/size.md +41 -1
- package/components/select/index.md +2 -0
- package/components/select/index.spec.ts +2 -2
- package/components/select/menu.vdt +5 -5
- package/components/select/styles.ts +55 -64
- package/components/select/useDraggble.ts +12 -0
- package/components/select/useNowrap.ts +24 -0
- package/components/slider/index.spec.ts +32 -1
- package/components/slider/index.ts +2 -2
- package/components/slider/index.vdt +34 -16
- package/components/slider/styles.ts +21 -13
- package/components/slider/useValue.ts +15 -3
- package/components/spinner/index.md +1 -1
- package/components/spinner/index.ts +0 -9
- package/components/spinner/index.vdt +13 -8
- package/components/spinner/styles.ts +36 -36
- package/components/spinner/useChange.ts +2 -2
- package/components/spinner/useValue.ts +9 -1
- package/components/split/index.vdt +13 -3
- package/components/split/memo.ts +29 -0
- package/components/steps/demos/basic.md +2 -1
- package/components/steps/demos/clickable.md +6 -0
- package/components/steps/demos/error.md +25 -5
- package/components/steps/demos/line.md +7 -6
- package/components/steps/demos/simple.md +0 -6
- package/components/steps/demos/vertical.md +79 -0
- package/components/steps/index.md +2 -1
- package/components/steps/index.spec.ts +1 -1
- package/components/steps/index.ts +7 -5
- package/components/steps/index.vdt +5 -3
- package/components/steps/step.vdt +16 -13
- package/components/steps/styles.ts +422 -255
- package/components/switch/demos/basic.md +1 -2
- package/components/switch/demos/disabled.md +20 -0
- package/components/switch/demos/onOff.md +5 -0
- package/components/switch/index.spec.ts +15 -10
- package/components/switch/styles.ts +29 -37
- package/components/table/styles.ts +11 -6
- package/components/table/useDraggable.ts +4 -3
- package/components/table/useStickyScrollbar.ts +2 -2
- package/components/table/useWidth.ts +2 -2
- package/components/tabs/demos/basic.md +0 -1
- package/components/tabs/demos/beforeChange.md +2 -2
- package/components/tabs/demos/card.md +2 -11
- package/components/tabs/demos/closable.md +7 -6
- package/components/tabs/demos/scroll.md +104 -0
- package/components/tabs/demos/vertical.md +1 -9
- package/components/tabs/index.md +1 -1
- package/components/tabs/index.spec.ts +36 -0
- package/components/tabs/index.ts +11 -12
- package/components/tabs/index.vdt +8 -9
- package/components/tabs/styles.ts +205 -186
- package/components/tabs/useScroll.ts +101 -42
- package/components/tag/base.ts +2 -2
- package/components/tag/demos/border.md +2 -2
- package/components/tag/demos/draggable.md +49 -0
- package/components/tag/demos/tags.md +72 -0
- package/components/tag/index.md +12 -1
- package/components/tag/index.spec.ts +70 -2
- package/components/tag/index.ts +2 -0
- package/components/tag/styles.ts +59 -9
- package/components/tag/tags.ts +54 -0
- package/components/tag/tags.vdt +49 -0
- package/components/tag/useChildren.ts +42 -0
- package/components/tag/useDraggable.ts +97 -0
- package/components/tag/useNowrap.ts +117 -0
- package/components/timepicker/index.md +2 -0
- package/components/timepicker/index.spec.ts +1 -1
- package/components/tip/index.vdt +1 -3
- package/components/tip/styles.ts +8 -2
- package/components/tooltip/content.ts +6 -6
- package/components/tooltip/content.vdt +8 -7
- package/components/tooltip/index.md +3 -6
- package/components/tooltip/index.spec.ts +6 -36
- package/components/tooltip/styles.ts +10 -8
- package/components/transfer/index.vdt +3 -2
- package/components/transfer/styles.ts +1 -0
- package/components/transfer/useCheck.ts +9 -2
- package/components/treeSelect/index.md +2 -0
- package/components/upload/demos/manually.md +12 -13
- package/components/upload/index.spec.ts +4 -4
- package/components/upload/index.vdt +40 -34
- package/components/upload/styles.ts +58 -64
- package/components/utils.ts +25 -4
- package/es/components/button/index.d.ts +1 -1
- package/es/components/button/index.js +1 -1
- package/es/components/button/styles.js +3 -3
- package/es/components/card/styles.js +10 -2
- package/es/components/checkbox/styles.js +21 -10
- package/es/components/collapse/styles.js +6 -1
- package/es/components/copy/index.d.ts +17 -0
- package/es/components/copy/index.js +43 -0
- package/es/components/copy/index.spec.d.ts +1 -0
- package/es/components/copy/index.spec.js +52 -0
- package/es/components/copy/index.vdt.js +45 -0
- package/es/components/copy/styles.d.ts +2 -0
- package/es/components/copy/styles.js +14 -0
- package/es/components/copy/useCopy.d.ts +4 -0
- package/es/components/copy/useCopy.js +90 -0
- package/es/components/datepicker/index.spec.js +1 -1
- package/es/components/datepicker/index.vdt.js +1 -1
- package/es/components/datepicker/styles.d.ts +1 -1
- package/es/components/datepicker/styles.js +5 -2
- package/es/components/diagram/shapes/callout.d.ts +1 -1
- package/es/components/diagram/shapes/circle.d.ts +1 -1
- package/es/components/diagram/shapes/document.d.ts +1 -1
- package/es/components/diagram/shapes/ellipse.d.ts +1 -1
- package/es/components/diagram/shapes/hexagon.d.ts +1 -1
- package/es/components/diagram/shapes/image.d.ts +1 -1
- package/es/components/diagram/shapes/parallelogram.d.ts +1 -1
- package/es/components/diagram/shapes/rectangle.d.ts +1 -1
- package/es/components/diagram/shapes/square.d.ts +1 -1
- package/es/components/diagram/shapes/text.d.ts +1 -1
- package/es/components/dialog/alert.vdt.js +6 -5
- package/es/components/dialog/base.vdt.js +5 -6
- package/es/components/dialog/index.spec.js +4 -4
- package/es/components/dialog/styles.js +16 -14
- package/es/components/drawer/styles.js +20 -5
- package/es/components/dropdown/styles.js +1 -1
- package/es/components/form/index.spec.js +4 -2
- package/es/components/form/item.vdt.js +2 -1
- package/es/components/form/styles.js +5 -5
- package/es/components/grid/useGutter.js +8 -8
- package/es/components/icon/index.d.ts +1 -0
- package/es/components/icon/index.js +2 -1
- package/es/components/icon/index.vdt.js +4 -2
- package/es/components/icon/styles.js +10 -2
- package/es/components/input/index.d.ts +1 -0
- package/es/components/input/index.js +4 -11
- package/es/components/input/index.vdt.js +4 -2
- package/es/components/input/styles.js +13 -11
- package/es/components/message/message.js +1 -1
- package/es/components/message/message.vdt.js +7 -6
- package/es/components/message/styles.js +8 -8
- package/es/components/pagination/index.d.ts +1 -1
- package/es/components/pagination/index.js +1 -1
- package/es/components/pagination/index.spec.js +4 -2
- package/es/components/pagination/index.vdt.js +16 -18
- package/es/components/pagination/styles.js +12 -3
- package/es/components/popover/content.d.ts +19 -0
- package/es/components/popover/content.js +31 -0
- package/es/components/popover/content.vdt.js +68 -0
- package/es/components/popover/index.d.ts +16 -0
- package/es/components/popover/index.js +44 -0
- package/es/components/popover/index.spec.d.ts +1 -0
- package/es/components/popover/index.spec.js +195 -0
- package/es/components/popover/styles.d.ts +1 -0
- package/es/components/popover/styles.js +22 -0
- package/es/components/progress/index.js +1 -1
- package/es/components/progress/index.vdt.js +46 -8
- package/es/components/progress/styles.js +19 -13
- package/es/components/radio/styles.js +16 -6
- package/es/components/rate/styles.js +1 -1
- package/es/components/select/base.d.ts +5 -2
- package/es/components/select/base.js +7 -3
- package/es/components/select/base.vdt.js +46 -38
- package/es/components/select/index.spec.js +2 -2
- package/es/components/select/menu.vdt.js +1 -1
- package/es/components/select/styles.js +14 -28
- package/es/components/select/useDraggble.d.ts +2 -0
- package/es/components/select/useDraggble.js +11 -0
- package/es/components/select/useNowrap.d.ts +3 -0
- package/es/components/select/useNowrap.js +19 -0
- package/es/components/slider/index.spec.js +48 -9
- package/es/components/slider/index.vdt.js +23 -12
- package/es/components/slider/styles.js +23 -14
- package/es/components/slider/useValue.d.ts +3 -1
- package/es/components/slider/useValue.js +12 -0
- package/es/components/spinner/index.d.ts +0 -1
- package/es/components/spinner/index.js +1 -19
- package/es/components/spinner/index.vdt.js +15 -8
- package/es/components/spinner/styles.js +33 -5
- package/es/components/spinner/useChange.d.ts +1 -1
- package/es/components/spinner/useChange.js +2 -2
- package/es/components/spinner/useValue.d.ts +1 -0
- package/es/components/spinner/useValue.js +16 -1
- package/es/components/split/index.vdt.js +32 -20
- package/es/components/split/memo.d.ts +9 -0
- package/es/components/split/memo.js +26 -0
- package/es/components/steps/index.d.ts +3 -2
- package/es/components/steps/index.js +4 -3
- package/es/components/steps/index.spec.js +1 -1
- package/es/components/steps/index.vdt.js +8 -4
- package/es/components/steps/step.vdt.js +17 -9
- package/es/components/steps/styles.d.ts +2 -1
- package/es/components/steps/styles.js +106 -72
- package/es/components/switch/index.spec.js +82 -65
- package/es/components/switch/styles.js +20 -34
- package/es/components/table/styles.js +9 -4
- package/es/components/table/useDraggable.js +3 -10
- package/es/components/table/useStickyScrollbar.js +2 -2
- package/es/components/table/useWidth.js +2 -2
- package/es/components/tabs/index.d.ts +1 -1
- package/es/components/tabs/index.js +1 -1
- package/es/components/tabs/index.spec.js +67 -0
- package/es/components/tabs/index.vdt.js +5 -5
- package/es/components/tabs/styles.js +73 -29
- package/es/components/tabs/useScroll.d.ts +1 -1
- package/es/components/tabs/useScroll.js +75 -48
- package/es/components/tag/base.d.ts +1 -0
- package/es/components/tag/base.js +2 -2
- package/es/components/tag/index.d.ts +1 -0
- package/es/components/tag/index.js +2 -1
- package/es/components/tag/index.spec.js +147 -4
- package/es/components/tag/styles.d.ts +67 -0
- package/es/components/tag/styles.js +42 -12
- package/es/components/tag/tags.d.ts +27 -0
- package/es/components/tag/tags.js +51 -0
- package/es/components/tag/tags.vdt.js +79 -0
- package/es/components/tag/useChildren.d.ts +2 -0
- package/es/components/tag/useChildren.js +39 -0
- package/es/components/tag/useDraggable.d.ts +3 -0
- package/es/components/tag/useDraggable.js +89 -0
- package/es/components/tag/useNowrap.d.ts +7 -0
- package/es/components/tag/useNowrap.js +115 -0
- package/es/components/timepicker/index.spec.js +1 -1
- package/es/components/tip/index.vdt.js +1 -3
- package/es/components/tip/styles.js +4 -3
- package/es/components/tooltip/content.d.ts +2 -2
- package/es/components/tooltip/content.vdt.js +23 -13
- package/es/components/tooltip/index.spec.js +56 -108
- package/es/components/tooltip/styles.d.ts +1 -0
- package/es/components/tooltip/styles.js +13 -8
- package/es/components/transfer/index.vdt.js +3 -1
- package/es/components/transfer/styles.js +1 -1
- package/es/components/transfer/useCheck.d.ts +1 -0
- package/es/components/transfer/useCheck.js +8 -1
- package/es/components/upload/index.spec.js +5 -6
- package/es/components/upload/index.vdt.js +24 -21
- package/es/components/upload/styles.js +22 -30
- package/es/components/utils.d.ts +2 -0
- package/es/components/utils.js +24 -3
- package/es/hooks/useResizeObserver.d.ts +1 -1
- package/es/hooks/useResizeObserver.js +19 -6
- package/es/i18n/en-US.d.ts +6 -2
- package/es/i18n/en-US.js +8 -3
- package/es/index.d.ts +4 -2
- package/es/index.js +4 -2
- package/es/packages/kpc-react/__tests__/components/drawer.spec.js +74 -6
- package/es/site/data/components/button/demos/basic/react.js +3 -1
- package/es/site/data/components/button/demos/group/react.js +26 -0
- package/es/site/data/components/button/demos/icon/react.js +6 -0
- package/es/site/data/components/copy/demos/basic/react.js +23 -0
- package/es/site/data/components/copy/demos/children/react.js +44 -0
- package/es/site/data/components/copy/index.d.ts +57 -0
- package/es/site/data/components/copy/index.js +42 -0
- package/es/site/data/components/datepicker/demos/basic/react.js +8 -0
- package/es/site/data/components/dropdown/demos/tooltip/react.js +2 -1
- package/es/site/data/components/icon/demos/disabled/index.d.ts +6 -0
- package/es/site/data/components/icon/demos/disabled/index.js +18 -0
- package/es/site/data/components/icon/demos/disabled/react.d.ts +5 -0
- package/es/site/data/components/icon/demos/disabled/react.js +33 -0
- package/es/site/data/components/icon/demos/icons/index.js +1 -1
- package/es/site/data/components/icon/demos/icons/react.js +1 -1
- package/es/site/data/components/input/demos/flat/index.d.ts +5 -0
- package/es/site/data/components/input/demos/flat/index.js +17 -0
- package/es/site/data/components/input/demos/flat/react.d.ts +4 -0
- package/es/site/data/components/input/demos/flat/react.js +29 -0
- package/es/site/data/components/message/demos/duration/index.js +2 -2
- package/es/site/data/components/message/demos/duration/react.js +2 -2
- package/es/site/data/components/pagination/demos/flat/index.d.ts +6 -0
- package/es/site/data/components/pagination/demos/flat/index.js +18 -0
- package/es/site/data/components/pagination/demos/flat/react.d.ts +5 -0
- package/es/site/data/components/pagination/demos/{noBoard → flat}/react.js +12 -8
- package/es/site/data/components/popover/demos/basic/react.d.ts +8 -0
- package/es/site/data/components/{tooltip/demos/confirm → popover/demos/basic}/react.js +14 -9
- package/es/site/data/components/popover/demos/button/index.d.ts +8 -0
- package/es/site/data/components/popover/demos/button/index.js +42 -0
- package/es/site/data/components/popover/demos/button/react.d.ts +8 -0
- package/es/site/data/components/popover/demos/button/react.js +73 -0
- package/es/site/data/components/popover/demos/content/index.d.ts +7 -0
- package/es/site/data/components/popover/demos/content/index.js +28 -0
- package/es/site/data/components/{tooltip/demos/confirm → popover/demos/content}/react.d.ts +0 -1
- package/es/site/data/components/popover/demos/content/react.js +43 -0
- package/es/site/data/components/popover/demos/text/index.d.ts +7 -0
- package/es/site/data/components/popover/demos/text/index.js +28 -0
- package/es/site/data/components/popover/demos/text/react.d.ts +6 -0
- package/es/site/data/components/popover/demos/text/react.js +36 -0
- package/es/site/data/components/popover/demos/type/index.d.ts +11 -0
- package/es/site/data/components/popover/demos/type/index.js +34 -0
- package/es/site/data/components/popover/demos/type/react.d.ts +11 -0
- package/es/site/data/components/popover/demos/type/react.js +58 -0
- package/es/site/data/components/popover/index.d.ts +57 -0
- package/es/site/data/components/popover/index.js +42 -0
- package/es/site/data/components/progress/demos/children/react.js +4 -4
- package/es/site/data/components/progress/demos/circleSize/index.d.ts +14 -0
- package/es/site/data/components/progress/demos/circleSize/index.js +43 -0
- package/es/site/data/components/progress/demos/circleSize/react.d.ts +14 -0
- package/es/site/data/components/progress/demos/circleSize/react.js +98 -0
- package/es/site/data/components/progress/demos/customColor/react.js +4 -4
- package/es/site/data/components/select/demos/basic/react.js +19 -7
- package/es/site/data/components/select/demos/creatable/react.js +2 -1
- package/es/site/data/components/select/demos/draggable/index.d.ts +10 -0
- package/es/site/data/components/select/demos/draggable/index.js +24 -0
- package/es/site/data/components/select/demos/draggable/react.d.ts +10 -0
- package/es/site/data/components/select/demos/draggable/react.js +85 -0
- package/es/site/data/components/select/demos/flat/index.d.ts +5 -0
- package/es/site/data/components/select/demos/flat/index.js +17 -0
- package/es/site/data/components/select/demos/flat/react.d.ts +4 -0
- package/es/site/data/components/select/demos/flat/react.js +73 -0
- package/es/site/data/components/select/demos/inline/index.d.ts +5 -0
- package/es/site/data/components/select/demos/inline/index.js +17 -0
- package/es/site/data/components/select/demos/inline/react.d.ts +4 -0
- package/es/site/data/components/select/demos/nowrap/index.d.ts +5 -0
- package/es/site/data/components/select/demos/nowrap/index.js +17 -0
- package/es/site/data/components/select/demos/nowrap/react.d.ts +4 -0
- package/es/site/data/components/select/demos/nowrap/react.js +41 -0
- package/es/site/data/components/select/demos/size/index.d.ts +1 -0
- package/es/site/data/components/select/demos/size/index.js +2 -1
- package/es/site/data/components/select/demos/size/react.d.ts +1 -0
- package/es/site/data/components/select/demos/size/react.js +93 -1
- package/es/site/data/components/steps/demos/basic/react.js +1 -1
- package/es/site/data/components/steps/demos/clickable/react.js +15 -0
- package/es/site/data/components/steps/demos/error/react.js +22 -2
- package/es/site/data/components/steps/demos/line/react.js +15 -11
- package/es/site/data/components/steps/demos/simple/react.js +1 -11
- package/es/site/data/components/steps/demos/vertical/index.d.ts +14 -0
- package/es/site/data/components/steps/demos/vertical/index.js +40 -0
- package/es/site/data/components/steps/demos/vertical/react.d.ts +14 -0
- package/es/site/data/components/steps/demos/vertical/react.js +124 -0
- package/es/site/data/components/switch/demos/basic/react.js +0 -2
- package/es/site/data/components/switch/demos/disabled/index.d.ts +6 -0
- package/es/site/data/components/switch/demos/disabled/index.js +18 -0
- package/es/site/data/components/switch/demos/disabled/react.d.ts +5 -0
- package/es/site/data/components/switch/demos/disabled/react.js +27 -0
- package/es/site/data/components/switch/demos/onOff/react.js +11 -0
- package/es/site/data/components/tabs/demos/card/react.js +1 -15
- package/es/site/data/components/tabs/demos/closable/index.js +1 -1
- package/es/site/data/components/tabs/demos/closable/react.js +9 -3
- package/es/site/data/components/tabs/demos/scroll/index.d.ts +18 -0
- package/es/site/data/components/tabs/demos/scroll/index.js +87 -0
- package/es/site/data/components/tabs/demos/scroll/react.d.ts +18 -0
- package/es/site/data/components/tabs/demos/scroll/react.js +166 -0
- package/es/site/data/components/tabs/demos/vertical/react.js +1 -16
- package/es/site/data/components/tag/demos/border/index.js +1 -1
- package/es/site/data/components/tag/demos/border/react.js +1 -1
- package/es/site/data/components/tag/demos/draggable/index.d.ts +11 -0
- package/es/site/data/components/tag/demos/draggable/index.js +24 -0
- package/es/site/data/components/tag/demos/draggable/react.d.ts +11 -0
- package/es/site/data/components/tag/demos/draggable/react.js +62 -0
- package/es/site/data/components/tag/demos/tags/index.d.ts +12 -0
- package/es/site/data/components/tag/demos/tags/index.js +39 -0
- package/es/site/data/components/tag/demos/tags/react.d.ts +12 -0
- package/es/site/data/components/tag/demos/tags/react.js +83 -0
- package/es/site/data/components/upload/demos/manually/react.js +5 -7
- package/es/site/src/pages/document/styles.js +1 -1
- package/es/styles/fonts/iconfont.eot +0 -0
- package/es/styles/fonts/iconfont.js +2 -2
- package/es/styles/fonts/iconfont.svg +189 -369
- package/es/styles/fonts/iconfont.ttf +0 -0
- package/es/styles/fonts/iconfont.woff +0 -0
- package/es/styles/fonts/ionicons.js +2 -2
- package/es/styles/global.js +1 -1
- package/es/styles/theme.d.ts +10 -2
- package/es/styles/theme.js +23 -21
- package/hooks/useResizeObserver.ts +19 -7
- package/i18n/en-US.ts +8 -2
- package/index.ts +4 -2
- package/package.json +5 -1
- package/styles/fonts/iconfont.css +172 -289
- package/styles/fonts/iconfont.eot +0 -0
- package/styles/fonts/iconfont.svg +189 -369
- package/styles/fonts/iconfont.ts +256 -370
- package/styles/fonts/iconfont.ttf +0 -0
- package/styles/fonts/iconfont.woff +0 -0
- package/styles/fonts/iconfont.woff2 +0 -0
- package/styles/fonts/ionicons.ts +2 -2
- package/styles/global.ts +3 -3
- package/styles/theme.ts +23 -19
- package/components/pagination/demos/noBoard.md +0 -22
- package/components/table/useResizeObserver.ts +0 -22
- package/components/tooltip/demos/confirm.md +0 -41
- package/es/components/table/useResizeObserver.d.ts +0 -2
- package/es/components/table/useResizeObserver.js +0 -20
- /package/components/select/demos/{noBorder.md → inline.md} +0 -0
- /package/es/site/data/components/{select/demos/noBorder → copy/demos/basic}/index.d.ts +0 -0
- /package/es/site/data/components/{select/demos/noBorder → copy/demos/basic}/index.js +0 -0
- /package/es/site/data/components/{select/demos/noBorder → copy/demos/basic}/react.d.ts +0 -0
- /package/es/site/data/components/{pagination/demos/noBoard → copy/demos/children}/index.d.ts +0 -0
- /package/es/site/data/components/{pagination/demos/noBoard → copy/demos/children}/index.js +0 -0
- /package/es/site/data/components/{pagination/demos/noBoard → copy/demos/children}/react.d.ts +0 -0
- /package/es/site/data/components/{tooltip/demos/confirm → popover/demos/basic}/index.d.ts +0 -0
- /package/es/site/data/components/{tooltip/demos/confirm → popover/demos/basic}/index.js +0 -0
- /package/es/site/data/components/select/demos/{noBorder → inline}/react.js +0 -0
|
@@ -9,7 +9,6 @@ import BasicDemo from '~/components/tooltip/demos/basic';
|
|
|
9
9
|
import PositionDemo from '~/components/tooltip/demos/position';
|
|
10
10
|
import TriggerDemo from '~/components/tooltip/demos/trigger';
|
|
11
11
|
import ContentDemo from '~/components/tooltip/demos/content';
|
|
12
|
-
import ConfirmDemo from '~/components/tooltip/demos/confirm';
|
|
13
12
|
import AlwaysDemo from '~/components/tooltip/demos/always';
|
|
14
13
|
import { Tooltip } from './';
|
|
15
14
|
import { Dialog } from '../dialog';
|
|
@@ -252,7 +251,7 @@ describe('Tooltip', function () {
|
|
|
252
251
|
return wait(500);
|
|
253
252
|
|
|
254
253
|
case 13:
|
|
255
|
-
content1 = getElement('.k-tooltip-content'); // should not hide when move mouse from button to tooltip content
|
|
254
|
+
content1 = getElement('.k-tooltip-content'); // should not hide when move mouse from button to tooltip content
|
|
256
255
|
|
|
257
256
|
expect(content1).eql(content);
|
|
258
257
|
dispatchEvent(canHover, 'mouseleave');
|
|
@@ -294,81 +293,30 @@ describe('Tooltip', function () {
|
|
|
294
293
|
}
|
|
295
294
|
}, _callee5);
|
|
296
295
|
})));
|
|
297
|
-
it('should
|
|
298
|
-
var _mount6,
|
|
296
|
+
it('should always show tooltip', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
|
|
297
|
+
var _mount6, element, content;
|
|
299
298
|
|
|
300
299
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
301
300
|
while (1) {
|
|
302
301
|
switch (_context6.prev = _context6.next) {
|
|
303
302
|
case 0:
|
|
304
|
-
_mount6 = mount(
|
|
305
|
-
cancelCb = sinon.spy();
|
|
306
|
-
okCb = sinon.spy();
|
|
307
|
-
|
|
308
|
-
instance.refs.__test.on('cancel', cancelCb);
|
|
309
|
-
|
|
310
|
-
instance.refs.__test.on('ok', okCb);
|
|
311
|
-
|
|
312
|
-
dispatchEvent(element.children[0], 'click');
|
|
313
|
-
_context6.next = 8;
|
|
314
|
-
return wait();
|
|
315
|
-
|
|
316
|
-
case 8:
|
|
317
|
-
content = getElement('.k-tooltip-content');
|
|
318
|
-
expect(content.querySelector('.k-tooltip-buttons').outerHTML).to.matchSnapshot();
|
|
319
|
-
content.querySelector('.k-btn').click();
|
|
320
|
-
_context6.next = 13;
|
|
321
|
-
return wait(500);
|
|
322
|
-
|
|
323
|
-
case 13:
|
|
324
|
-
expect(content.style.display).eql('none');
|
|
325
|
-
dispatchEvent(element.firstElementChild, 'click');
|
|
326
|
-
_context6.next = 17;
|
|
327
|
-
return wait();
|
|
328
|
-
|
|
329
|
-
case 17:
|
|
330
|
-
content = getElement('.k-tooltip-content');
|
|
331
|
-
_Array$from5 = _Array$from2(content.querySelectorAll('.k-btn')), btn = _Array$from5[1];
|
|
332
|
-
btn.click();
|
|
333
|
-
_context6.next = 22;
|
|
334
|
-
return wait(500);
|
|
335
|
-
|
|
336
|
-
case 22:
|
|
337
|
-
expect(content.style.display).eql('none');
|
|
338
|
-
expect(cancelCb.callCount).eql(1);
|
|
339
|
-
expect(okCb.callCount).eql(1);
|
|
340
|
-
|
|
341
|
-
case 25:
|
|
342
|
-
case "end":
|
|
343
|
-
return _context6.stop();
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
}, _callee6);
|
|
347
|
-
})));
|
|
348
|
-
it('should always show tooltip', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
|
|
349
|
-
var _mount7, element, content;
|
|
350
|
-
|
|
351
|
-
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
352
|
-
while (1) {
|
|
353
|
-
switch (_context7.prev = _context7.next) {
|
|
354
|
-
case 0:
|
|
355
|
-
_mount7 = mount(AlwaysDemo), element = _mount7[1];
|
|
303
|
+
_mount6 = mount(AlwaysDemo), element = _mount6[1];
|
|
356
304
|
content = getElement('.k-tooltip-content');
|
|
357
305
|
expect(content.textContent).eql('hello');
|
|
358
306
|
document.body.click();
|
|
359
|
-
|
|
307
|
+
_context6.next = 6;
|
|
360
308
|
return wait(500);
|
|
361
309
|
|
|
362
310
|
case 6:
|
|
363
311
|
expect(getElement('.k-tooltip-content')).eql(content);
|
|
364
312
|
element.querySelector('span').click();
|
|
365
|
-
|
|
313
|
+
_context6.next = 10;
|
|
366
314
|
return wait(500);
|
|
367
315
|
|
|
368
316
|
case 10:
|
|
369
317
|
expect(getElement('.k-tooltip-content')).eql(content);
|
|
370
318
|
dispatchEvent(content, 'mouseleave');
|
|
371
|
-
|
|
319
|
+
_context6.next = 14;
|
|
372
320
|
return wait(600);
|
|
373
321
|
|
|
374
322
|
case 14:
|
|
@@ -376,10 +324,10 @@ describe('Tooltip', function () {
|
|
|
376
324
|
|
|
377
325
|
case 15:
|
|
378
326
|
case "end":
|
|
379
|
-
return
|
|
327
|
+
return _context6.stop();
|
|
380
328
|
}
|
|
381
329
|
}
|
|
382
|
-
},
|
|
330
|
+
}, _callee6);
|
|
383
331
|
}))); // it('should hide tooltip when v-show is false in Vue', async () => {
|
|
384
332
|
// interface IData {
|
|
385
333
|
// show: boolean
|
|
@@ -403,7 +351,7 @@ describe('Tooltip', function () {
|
|
|
403
351
|
// document.body.appendChild(container);
|
|
404
352
|
// const app = new Vue({
|
|
405
353
|
// render: h => h(
|
|
406
|
-
// 'Test',
|
|
354
|
+
// 'Test',
|
|
407
355
|
// {ref: 'test'}),
|
|
408
356
|
// components: {Test},
|
|
409
357
|
// }).$mount(container);
|
|
@@ -432,7 +380,7 @@ describe('Tooltip', function () {
|
|
|
432
380
|
// </div>
|
|
433
381
|
// `,
|
|
434
382
|
// components: {
|
|
435
|
-
// Tooltip: Tooltip as any,
|
|
383
|
+
// Tooltip: Tooltip as any,
|
|
436
384
|
// Radio: Radio as any,
|
|
437
385
|
// },
|
|
438
386
|
// data: {
|
|
@@ -449,18 +397,18 @@ describe('Tooltip', function () {
|
|
|
449
397
|
// document.body.removeChild(app.$el);
|
|
450
398
|
// });
|
|
451
399
|
|
|
452
|
-
it('should hide layer when we have disabled Tooltip and also hide on next updating', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
453
|
-
var Demo,
|
|
400
|
+
it('should hide layer when we have disabled Tooltip and also hide on next updating', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
|
|
401
|
+
var Demo, _mount7, i, content;
|
|
454
402
|
|
|
455
|
-
return _regeneratorRuntime.wrap(function
|
|
403
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context8) {
|
|
456
404
|
while (1) {
|
|
457
|
-
switch (
|
|
405
|
+
switch (_context8.prev = _context8.next) {
|
|
458
406
|
case 0:
|
|
459
407
|
Demo = /*#__PURE__*/function (_Component) {
|
|
460
408
|
_inheritsLoose(Demo, _Component);
|
|
461
409
|
|
|
462
410
|
function Demo() {
|
|
463
|
-
var
|
|
411
|
+
var _context7;
|
|
464
412
|
|
|
465
413
|
var _this;
|
|
466
414
|
|
|
@@ -468,7 +416,7 @@ describe('Tooltip', function () {
|
|
|
468
416
|
args[_key] = arguments[_key];
|
|
469
417
|
}
|
|
470
418
|
|
|
471
|
-
_this = _Component.call.apply(_Component, _concatInstanceProperty(
|
|
419
|
+
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context7 = [this]).call(_context7, args)) || this;
|
|
472
420
|
_this.Tooltip = Tooltip;
|
|
473
421
|
return _this;
|
|
474
422
|
}
|
|
@@ -484,23 +432,23 @@ describe('Tooltip', function () {
|
|
|
484
432
|
};
|
|
485
433
|
};
|
|
486
434
|
|
|
487
|
-
|
|
435
|
+
_mount7 = mount(Demo), i = _mount7[0];
|
|
488
436
|
dispatchEvent(i.refs.test, 'mouseenter');
|
|
489
|
-
|
|
437
|
+
_context8.next = 7;
|
|
490
438
|
return wait();
|
|
491
439
|
|
|
492
440
|
case 7:
|
|
493
441
|
content = getElement('.k-tooltip-content');
|
|
494
442
|
expect(content.textContent).eql('hello');
|
|
495
443
|
i.set('disabled', true);
|
|
496
|
-
|
|
444
|
+
_context8.next = 12;
|
|
497
445
|
return wait(500);
|
|
498
446
|
|
|
499
447
|
case 12:
|
|
500
448
|
content = getElement('.k-tooltip-content');
|
|
501
449
|
expect(content).eql(undefined);
|
|
502
450
|
i.set('disabled', false);
|
|
503
|
-
|
|
451
|
+
_context8.next = 17;
|
|
504
452
|
return wait();
|
|
505
453
|
|
|
506
454
|
case 17:
|
|
@@ -509,23 +457,23 @@ describe('Tooltip', function () {
|
|
|
509
457
|
|
|
510
458
|
case 19:
|
|
511
459
|
case "end":
|
|
512
|
-
return
|
|
460
|
+
return _context8.stop();
|
|
513
461
|
}
|
|
514
462
|
}
|
|
515
|
-
},
|
|
463
|
+
}, _callee7);
|
|
516
464
|
})));
|
|
517
|
-
it('should not detect collison when target is not in viewport', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
518
|
-
var Demo,
|
|
465
|
+
it('should not detect collison when target is not in viewport', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
|
|
466
|
+
var Demo, _mount8, i, content;
|
|
519
467
|
|
|
520
|
-
return _regeneratorRuntime.wrap(function
|
|
468
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context10) {
|
|
521
469
|
while (1) {
|
|
522
|
-
switch (
|
|
470
|
+
switch (_context10.prev = _context10.next) {
|
|
523
471
|
case 0:
|
|
524
472
|
Demo = /*#__PURE__*/function (_Component2) {
|
|
525
473
|
_inheritsLoose(Demo, _Component2);
|
|
526
474
|
|
|
527
475
|
function Demo() {
|
|
528
|
-
var
|
|
476
|
+
var _context9;
|
|
529
477
|
|
|
530
478
|
var _this2;
|
|
531
479
|
|
|
@@ -533,7 +481,7 @@ describe('Tooltip', function () {
|
|
|
533
481
|
args[_key2] = arguments[_key2];
|
|
534
482
|
}
|
|
535
483
|
|
|
536
|
-
_this2 = _Component2.call.apply(_Component2, _concatInstanceProperty(
|
|
484
|
+
_this2 = _Component2.call.apply(_Component2, _concatInstanceProperty(_context9 = [this]).call(_context9, args)) || this;
|
|
537
485
|
_this2.Tooltip = Tooltip;
|
|
538
486
|
return _this2;
|
|
539
487
|
}
|
|
@@ -559,11 +507,11 @@ describe('Tooltip', function () {
|
|
|
559
507
|
};
|
|
560
508
|
};
|
|
561
509
|
|
|
562
|
-
|
|
510
|
+
_mount8 = mount(Demo), i = _mount8[0]; // await wait(500);
|
|
563
511
|
// window.scrollTo(0, 10000);
|
|
564
512
|
|
|
565
513
|
i.set('show', true);
|
|
566
|
-
|
|
514
|
+
_context10.next = 7;
|
|
567
515
|
return wait(500);
|
|
568
516
|
|
|
569
517
|
case 7:
|
|
@@ -574,23 +522,23 @@ describe('Tooltip', function () {
|
|
|
574
522
|
|
|
575
523
|
case 11:
|
|
576
524
|
case "end":
|
|
577
|
-
return
|
|
525
|
+
return _context10.stop();
|
|
578
526
|
}
|
|
579
527
|
}
|
|
580
|
-
},
|
|
528
|
+
}, _callee8);
|
|
581
529
|
})));
|
|
582
|
-
it('should add className', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
583
|
-
var Demo,
|
|
530
|
+
it('should add className', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
|
|
531
|
+
var Demo, _mount9, instance, element, trigger, dropdown;
|
|
584
532
|
|
|
585
|
-
return _regeneratorRuntime.wrap(function
|
|
533
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context12) {
|
|
586
534
|
while (1) {
|
|
587
|
-
switch (
|
|
535
|
+
switch (_context12.prev = _context12.next) {
|
|
588
536
|
case 0:
|
|
589
537
|
Demo = /*#__PURE__*/function (_Component3) {
|
|
590
538
|
_inheritsLoose(Demo, _Component3);
|
|
591
539
|
|
|
592
540
|
function Demo() {
|
|
593
|
-
var
|
|
541
|
+
var _context11;
|
|
594
542
|
|
|
595
543
|
var _this3;
|
|
596
544
|
|
|
@@ -598,7 +546,7 @@ describe('Tooltip', function () {
|
|
|
598
546
|
args[_key3] = arguments[_key3];
|
|
599
547
|
}
|
|
600
548
|
|
|
601
|
-
_this3 = _Component3.call.apply(_Component3, _concatInstanceProperty(
|
|
549
|
+
_this3 = _Component3.call.apply(_Component3, _concatInstanceProperty(_context11 = [this]).call(_context11, args)) || this;
|
|
602
550
|
_this3.Tooltip = Tooltip;
|
|
603
551
|
return _this3;
|
|
604
552
|
}
|
|
@@ -607,11 +555,11 @@ describe('Tooltip', function () {
|
|
|
607
555
|
}(Component);
|
|
608
556
|
|
|
609
557
|
Demo.template = "\n const Tooltip = this.Tooltip;\n <div>\n <Tooltip content=\"hello\" class=\"a\">\n <div ref=\"test\" class=\"b\">test</div>\n </Tooltip>\n </div>\n ";
|
|
610
|
-
|
|
558
|
+
_mount9 = mount(Demo), instance = _mount9[0], element = _mount9[1];
|
|
611
559
|
trigger = instance.refs.test;
|
|
612
560
|
expect(trigger.className).to.eql('b a');
|
|
613
561
|
dispatchEvent(trigger, 'mouseenter');
|
|
614
|
-
|
|
562
|
+
_context12.next = 8;
|
|
615
563
|
return wait();
|
|
616
564
|
|
|
617
565
|
case 8:
|
|
@@ -620,23 +568,23 @@ describe('Tooltip', function () {
|
|
|
620
568
|
|
|
621
569
|
case 10:
|
|
622
570
|
case "end":
|
|
623
|
-
return
|
|
571
|
+
return _context12.stop();
|
|
624
572
|
}
|
|
625
573
|
}
|
|
626
|
-
},
|
|
574
|
+
}, _callee9);
|
|
627
575
|
})));
|
|
628
|
-
it('should fix the width in small container', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
629
|
-
var Demo,
|
|
576
|
+
it('should fix the width in small container', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10() {
|
|
577
|
+
var Demo, _mount10, instance, element, trigger, expecedWidth, content, width, newWidth;
|
|
630
578
|
|
|
631
|
-
return _regeneratorRuntime.wrap(function
|
|
579
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context14) {
|
|
632
580
|
while (1) {
|
|
633
|
-
switch (
|
|
581
|
+
switch (_context14.prev = _context14.next) {
|
|
634
582
|
case 0:
|
|
635
583
|
Demo = /*#__PURE__*/function (_Component4) {
|
|
636
584
|
_inheritsLoose(Demo, _Component4);
|
|
637
585
|
|
|
638
586
|
function Demo() {
|
|
639
|
-
var
|
|
587
|
+
var _context13;
|
|
640
588
|
|
|
641
589
|
var _this4;
|
|
642
590
|
|
|
@@ -644,7 +592,7 @@ describe('Tooltip', function () {
|
|
|
644
592
|
args[_key4] = arguments[_key4];
|
|
645
593
|
}
|
|
646
594
|
|
|
647
|
-
_this4 = _Component4.call.apply(_Component4, _concatInstanceProperty(
|
|
595
|
+
_this4 = _Component4.call.apply(_Component4, _concatInstanceProperty(_context13 = [this]).call(_context13, args)) || this;
|
|
648
596
|
_this4.Tooltip = Tooltip;
|
|
649
597
|
_this4.Dialog = Dialog;
|
|
650
598
|
return _this4;
|
|
@@ -653,12 +601,12 @@ describe('Tooltip', function () {
|
|
|
653
601
|
return Demo;
|
|
654
602
|
}(Component);
|
|
655
603
|
|
|
656
|
-
Demo.template = "\n const {Tooltip, Dialog} = this;\n <div style=\"text-align: right; position: relative; width:
|
|
657
|
-
|
|
604
|
+
Demo.template = "\n const {Tooltip, Dialog} = this;\n <div style=\"text-align: right; position: relative; width: 350px;\">\n <Tooltip content=\"\u8FD9\u662F\u4E00\u6BB5\u5F88\u957F\u7684\u63CF\u8FF0\u6587\u5B57\uFF0C\u8FD9\u662F\u4E00\u6BB5\u5F88\u957F\u7684\u63CF\u8FF0\u6587\u5B57\uFF0C\u8FD9\u662F\u4E00\u6BB5\u5F88\u957F\u7684\u63CF\u8FF0\u6587\u5B57\" container={dom => dom}>\n <span class=\"trigger\">test</span>\n </Tooltip>\n </div>\n ";
|
|
605
|
+
_mount10 = mount(Demo), instance = _mount10[0], element = _mount10[1];
|
|
658
606
|
trigger = element.querySelector('.trigger');
|
|
659
607
|
expecedWidth = parseInt(tooltipTheme.maxWidth);
|
|
660
608
|
dispatchEvent(trigger, 'mouseenter');
|
|
661
|
-
|
|
609
|
+
_context14.next = 8;
|
|
662
610
|
return wait();
|
|
663
611
|
|
|
664
612
|
case 8:
|
|
@@ -666,12 +614,12 @@ describe('Tooltip', function () {
|
|
|
666
614
|
width = content.offsetWidth;
|
|
667
615
|
expect(width).to.eql(expecedWidth);
|
|
668
616
|
dispatchEvent(trigger, 'mouseleave');
|
|
669
|
-
|
|
617
|
+
_context14.next = 14;
|
|
670
618
|
return wait();
|
|
671
619
|
|
|
672
620
|
case 14:
|
|
673
621
|
dispatchEvent(trigger, 'mouseenter');
|
|
674
|
-
|
|
622
|
+
_context14.next = 17;
|
|
675
623
|
return wait();
|
|
676
624
|
|
|
677
625
|
case 17:
|
|
@@ -680,9 +628,9 @@ describe('Tooltip', function () {
|
|
|
680
628
|
|
|
681
629
|
case 19:
|
|
682
630
|
case "end":
|
|
683
|
-
return
|
|
631
|
+
return _context14.stop();
|
|
684
632
|
}
|
|
685
633
|
}
|
|
686
|
-
},
|
|
634
|
+
}, _callee10);
|
|
687
635
|
})));
|
|
688
636
|
});
|
|
@@ -13,11 +13,16 @@ var defaults = {
|
|
|
13
13
|
|
|
14
14
|
bgColor: '#fff',
|
|
15
15
|
lineHeight: 1.4,
|
|
16
|
-
maxWidth: '
|
|
16
|
+
maxWidth: '312px',
|
|
17
|
+
|
|
18
|
+
get boxShadow() {
|
|
19
|
+
return theme.middleBoxShadow;
|
|
20
|
+
},
|
|
21
|
+
|
|
17
22
|
// arrow
|
|
18
23
|
arrow: {
|
|
19
|
-
borderColor: 'rgba(
|
|
20
|
-
width: '
|
|
24
|
+
borderColor: 'rgba(221, 221, 221, .5)',
|
|
25
|
+
width: '6px'
|
|
21
26
|
},
|
|
22
27
|
// confirm
|
|
23
28
|
confirm: {
|
|
@@ -26,13 +31,13 @@ var defaults = {
|
|
|
26
31
|
// dark
|
|
27
32
|
dark: {
|
|
28
33
|
get bgColor() {
|
|
29
|
-
return theme.color.
|
|
34
|
+
return theme.color.title;
|
|
30
35
|
},
|
|
31
36
|
|
|
32
37
|
color: '#fff',
|
|
33
38
|
|
|
34
39
|
get arrowBorderColor() {
|
|
35
|
-
return theme.color.
|
|
40
|
+
return theme.color.title;
|
|
36
41
|
}
|
|
37
42
|
|
|
38
43
|
},
|
|
@@ -53,9 +58,9 @@ var directionMap = {
|
|
|
53
58
|
};
|
|
54
59
|
export default function makeStyles() {
|
|
55
60
|
var arrowLong = tooltip.arrow.width;
|
|
56
|
-
var arrowShort = "calc(" + arrowLong + " -
|
|
61
|
+
var arrowShort = "calc(" + arrowLong + " - 1px)"; // use &.k-tooltip-content to override css in dropdown menu
|
|
57
62
|
|
|
58
|
-
return /*#__PURE__*/css("&.k-tooltip-content{max-width:", tooltip.maxWidth, ";min-width:0;padding:", tooltip.padding, ";line-height:", tooltip.lineHeight, ";word-wrap:break-word;pointer-events:none;&.k-hoverable,&.k-always{pointer-events:all;}.k-tooltip-arrow{pointer-events:none;&:before,&{position:absolute;display:block;border-style:solid;border-color:transparent;}&:before{content:' ';}&.k-top,&.k-bottom{&:before,&{border-width:", arrowLong, " ", arrowShort, ";}&:before{left:calc(-1 * ", arrowShort, ");}}&.k-top{top:calc(-2 * ", arrowLong, ");&:before{top:calc(-", arrowLong, " + 1px);}}&.k-bottom{bottom:calc(-2 * ", arrowLong, ");&:before{bottom:calc(-", arrowLong, " + 1px);}}&.k-left,&.k-right{&:before,&{border-width:", arrowShort, " ", arrowLong, ";}&:before{top:calc(-1 * ", arrowShort, ");}}&.k-left{left:calc(-2 * ", arrowLong, ");&:before{left:calc(-", arrowLong, " + 1px);}}&.k-right{right:calc(-2 * ", arrowLong, ");&:before{right:calc(-", arrowLong, " + 1px);}}}", _mapInstanceProperty(themes).call(themes, function (theme) {
|
|
63
|
+
return /*#__PURE__*/css("&.k-tooltip-content{max-width:", tooltip.maxWidth, ";min-width:0;padding:", tooltip.padding, ";line-height:", tooltip.lineHeight, ";word-wrap:break-word;pointer-events:none;box-shadow:", tooltip.boxShadow, ";&.k-hoverable,&.k-always{pointer-events:all;}.k-tooltip-arrow{pointer-events:none;&:before,&{position:absolute;display:block;border-style:solid;border-color:transparent;}&:before{content:' ';}&.k-top,&.k-bottom{&:before,&{border-width:", arrowLong, " ", arrowShort, ";}&:before{left:calc(-1 * ", arrowShort, ");}}&.k-top{top:calc(-2 * ", arrowLong, ");&:before{top:calc(-", arrowLong, " + 1px);}}&.k-bottom{bottom:calc(-2 * ", arrowLong, ");&:before{bottom:calc(-", arrowLong, " + 1px);}}&.k-left,&.k-right{&:before,&{border-width:", arrowShort, " ", arrowLong, ";}&:before{top:calc(-1 * ", arrowShort, ");}}&.k-left{left:calc(-2 * ", arrowLong, ");&:before{left:calc(-", arrowLong, " + 1px);}}&.k-right{right:calc(-2 * ", arrowLong, ");&:before{right:calc(-", arrowLong, " + 1px);}}}", _mapInstanceProperty(themes).call(themes, function (theme) {
|
|
59
64
|
var _context;
|
|
60
65
|
|
|
61
66
|
var borderColor;
|
|
@@ -76,5 +81,5 @@ export default function makeStyles() {
|
|
|
76
81
|
var borderDirection = directionMap[direction];
|
|
77
82
|
return /*#__PURE__*/css("&.k-", direction, "{border-", borderDirection, "-color:", borderColor, ";&:before{border-", borderDirection, "-color:", bgColor, ";}}");
|
|
78
83
|
}), ";}}");
|
|
79
|
-
}), ".k-tooltip-
|
|
84
|
+
}), ".k-tooltip-footer{padding-top:", tooltip.confirm.gaps, ";.k-btn:not(:first-of-type){margin-left:", tooltip.confirm.gaps, ";}}&.k-small{padding:", tooltip.smallPadding, ";}}");
|
|
80
85
|
}
|
|
@@ -37,7 +37,8 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
37
37
|
var _this$check = this.check,
|
|
38
38
|
isCheckAll = _this$check.isCheckAll,
|
|
39
39
|
toggleCheckAll = _this$check.toggleCheckAll,
|
|
40
|
-
onCheckboxChange = _this$check.onCheckboxChange
|
|
40
|
+
onCheckboxChange = _this$check.onCheckboxChange,
|
|
41
|
+
isIndeterminate = _this$check.isIndeterminate;
|
|
41
42
|
var classNameObj = (_classNameObj = {
|
|
42
43
|
'k-transfer': true
|
|
43
44
|
}, _classNameObj[className] = className, _classNameObj[makeStyles()] = true, _classNameObj);
|
|
@@ -50,6 +51,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
50
51
|
return [_$ce(2, 'div', [this.get(model + "CheckedKeys.length"), _$ct(' /\n '), data.length], 0, 'k-transfer-count'), _$cc(Checkbox, {
|
|
51
52
|
'className': 'c-ellipsis',
|
|
52
53
|
'value': isCheckAll(model),
|
|
54
|
+
'indeterminate': isIndeterminate(model),
|
|
53
55
|
'ev-click': toggleCheckAll.bind(null, model),
|
|
54
56
|
'children': title
|
|
55
57
|
})];
|
|
@@ -63,5 +63,5 @@ setDefault(function () {
|
|
|
63
63
|
}).transfer;
|
|
64
64
|
});
|
|
65
65
|
export function makeStyles() {
|
|
66
|
-
return /*#__PURE__*/css("font-size:", transfer.fontSize, ";.k-transfer-panel,.k-transfer-arrows{display:inline-block;vertical-align:middle;}.k-transfer-panel{width:", transfer.panel.width, ";border:", transfer.panel.border, ";border-radius:", transfer.panel.borderRadius, ";height:", transfer.panel.height, ";display:inline-flex;flex-direction:column;}.k-transfer-title{line-height:", transfer.title.lineHeight, ";background:", transfer.title.bgColor, ";padding:", transfer.title.padding, ";.k-checkbox{color:", transfer.title.color, ";font-size:", transfer.title.fontSize, ";}}.k-transfer-count{float:right;margin-left:", transfer.title.countGap, ";}.k-transfer-list{overflow:auto;position:relative;flex:1;}.k-transfer-item{color:", transfer.item.color, ";background:", transfer.item.bgColor, ";user-select:none;width:100%;&:not(.k-disabled):hover{background:", transfer.item.hoverBgColor, ";color:", transfer.item.hoverColor, ";p{color:", transfer.item.hoverColor, ";}}.k-checkbox{padding:", transfer.item.padding, ";display:flex;}p{margin:0;color:", transfer.item.descColor, ";}&.k-disabled{p{color:", theme.color.disabled, ";}}}.k-input{width:auto;margin:", transfer.searchGap, ";}.k-transfer-arrows{.k-btn{display:flex;margin:", transfer.arrow.gap, ";}}");
|
|
66
|
+
return /*#__PURE__*/css("font-size:", transfer.fontSize, ";.k-transfer-panel,.k-transfer-arrows{display:inline-block;vertical-align:middle;}.k-transfer-panel{width:", transfer.panel.width, ";border:", transfer.panel.border, ";border-radius:", transfer.panel.borderRadius, ";height:", transfer.panel.height, ";display:inline-flex;flex-direction:column;overflow:auto;}.k-transfer-title{line-height:", transfer.title.lineHeight, ";background:", transfer.title.bgColor, ";padding:", transfer.title.padding, ";.k-checkbox{color:", transfer.title.color, ";font-size:", transfer.title.fontSize, ";}}.k-transfer-count{float:right;margin-left:", transfer.title.countGap, ";}.k-transfer-list{overflow:auto;position:relative;flex:1;}.k-transfer-item{color:", transfer.item.color, ";background:", transfer.item.bgColor, ";user-select:none;width:100%;&:not(.k-disabled):hover{background:", transfer.item.hoverBgColor, ";color:", transfer.item.hoverColor, ";p{color:", transfer.item.hoverColor, ";}}.k-checkbox{padding:", transfer.item.padding, ";display:flex;}p{margin:0;color:", transfer.item.descColor, ";}&.k-disabled{p{color:", theme.color.disabled, ";}}}.k-input{width:auto;margin:", transfer.searchGap, ";}.k-transfer-arrows{.k-btn{display:flex;margin:", transfer.arrow.gap, ";}}");
|
|
67
67
|
}
|
|
@@ -4,4 +4,5 @@ export declare function useCheck({ getEnabledData, getShowedData }: ReturnType<t
|
|
|
4
4
|
isCheckAll: (model: Model) => boolean | 0;
|
|
5
5
|
toggleCheckAll: (model: Model, e: MouseEvent) => void;
|
|
6
6
|
onCheckboxChange: (model: Model, index: number, e: MouseEvent) => void;
|
|
7
|
+
isIndeterminate: (model: Model) => boolean;
|
|
7
8
|
};
|
|
@@ -33,6 +33,12 @@ export function useCheck(_ref) {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
function isIndeterminate(model) {
|
|
37
|
+
var checked = instance.get(model + "CheckedKeys");
|
|
38
|
+
var data = getEnabledData(model);
|
|
39
|
+
return checked.length > 0 && checked.length < data.length;
|
|
40
|
+
}
|
|
41
|
+
|
|
36
42
|
function onCheckboxChange(model, index, e) {
|
|
37
43
|
if (startIndex === undefined || !e.shiftKey) {
|
|
38
44
|
startIndex = index;
|
|
@@ -84,6 +90,7 @@ export function useCheck(_ref) {
|
|
|
84
90
|
return {
|
|
85
91
|
isCheckAll: isCheckAll,
|
|
86
92
|
toggleCheckAll: toggleCheckAll,
|
|
87
|
-
onCheckboxChange: onCheckboxChange
|
|
93
|
+
onCheckboxChange: onCheckboxChange,
|
|
94
|
+
isIndeterminate: isIndeterminate
|
|
88
95
|
};
|
|
89
96
|
}
|
|
@@ -100,8 +100,7 @@ describe('Upload', function () {
|
|
|
100
100
|
|
|
101
101
|
var upload = instance.$lastInput.children;
|
|
102
102
|
upload.on('success', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
103
|
-
var remove, dialog,
|
|
104
|
-
|
|
103
|
+
var remove, dialog, cancel, ok;
|
|
105
104
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
106
105
|
while (1) {
|
|
107
106
|
switch (_context.prev = _context.next) {
|
|
@@ -119,7 +118,7 @@ describe('Upload', function () {
|
|
|
119
118
|
|
|
120
119
|
case 7:
|
|
121
120
|
dialog = getElement('.k-dialog');
|
|
122
|
-
|
|
121
|
+
cancel = dialog.querySelector('.k-dialog-footer .k-dialog-cancel');
|
|
123
122
|
cancel.click();
|
|
124
123
|
_context.next = 12;
|
|
125
124
|
return wait(500);
|
|
@@ -132,7 +131,7 @@ describe('Upload', function () {
|
|
|
132
131
|
|
|
133
132
|
case 16:
|
|
134
133
|
dialog = getElement('.k-dialog');
|
|
135
|
-
|
|
134
|
+
ok = dialog.querySelector('.k-dialog-footer .k-dialog-ok');
|
|
136
135
|
ok.click();
|
|
137
136
|
_context.next = 21;
|
|
138
137
|
return wait(500);
|
|
@@ -222,7 +221,7 @@ describe('Upload', function () {
|
|
|
222
221
|
|
|
223
222
|
case 2:
|
|
224
223
|
expect(element.innerHTML.replace(/blob:[^"]*/g, '')).to.matchSnapshot();
|
|
225
|
-
view = element.querySelector('.k-upload-
|
|
224
|
+
view = element.querySelector('.k-upload-zoom');
|
|
226
225
|
view.click();
|
|
227
226
|
_context3.next = 7;
|
|
228
227
|
return wait();
|
|
@@ -257,7 +256,7 @@ describe('Upload', function () {
|
|
|
257
256
|
instance = _mount4[0],
|
|
258
257
|
element = _mount4[1];
|
|
259
258
|
|
|
260
|
-
var upload = instance
|
|
259
|
+
var upload = instance.refs.instance;
|
|
261
260
|
upload.on('success', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
|
262
261
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
263
262
|
while (1) {
|