@king-design/react 3.0.0 → 3.1.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/__tests__/__snapshots__/Dialog.md +1 -1
- package/__tests__/__snapshots__/React Demos.md +268 -268
- package/components/affix/index.d.ts +1 -0
- package/components/affix/index.js +2 -0
- package/components/affix/index.vdt.js +5 -5
- package/components/affix/styles.d.ts +1 -1
- package/components/affix/styles.js +1 -1
- package/components/badge/index.d.ts +1 -0
- package/components/badge/index.js +13 -1
- package/components/badge/index.vdt.js +5 -4
- package/components/badge/styles.d.ts +1 -1
- package/components/badge/styles.js +2 -2
- package/components/breadcrumb/index.d.ts +1 -0
- package/components/breadcrumb/index.js +13 -1
- package/components/breadcrumb/index.vdt.js +4 -5
- package/components/breadcrumb/item.d.ts +1 -0
- package/components/breadcrumb/item.js +2 -0
- package/components/breadcrumb/item.vdt.js +4 -5
- package/components/breadcrumb/styles.d.ts +1 -1
- package/components/breadcrumb/styles.js +2 -2
- package/components/button/group.d.ts +1 -0
- package/components/button/group.js +13 -1
- package/components/button/group.vdt.js +2 -6
- package/components/button/index.d.ts +1 -0
- package/components/button/index.js +2 -0
- package/components/button/index.vdt.js +7 -7
- package/components/button/styles.d.ts +2 -4
- package/components/button/styles.js +19 -20
- package/components/card/column.d.ts +1 -0
- package/components/card/column.js +13 -1
- package/components/card/column.vdt.js +2 -5
- package/components/card/index.d.ts +1 -0
- package/components/card/index.js +13 -1
- package/components/card/index.vdt.js +5 -11
- package/components/card/styles.d.ts +1 -1
- package/components/card/styles.js +2 -2
- package/components/carousel/index.d.ts +1 -0
- package/components/carousel/index.js +2 -0
- package/components/carousel/index.vdt.js +15 -19
- package/components/carousel/item.d.ts +1 -0
- package/components/carousel/item.js +13 -1
- package/components/carousel/item.vdt.js +2 -3
- package/components/carousel/styles.d.ts +2 -2
- package/components/carousel/styles.js +4 -4
- package/components/cascader/index.vdt.js +20 -29
- package/components/cascader/styles.d.ts +2 -2
- package/components/cascader/styles.js +3 -3
- package/components/checkbox/index.d.ts +1 -0
- package/components/checkbox/index.js +2 -0
- package/components/checkbox/index.vdt.js +4 -8
- package/components/checkbox/styles.d.ts +1 -1
- package/components/checkbox/styles.js +2 -2
- package/components/code/index.d.ts +1 -0
- package/components/code/index.js +2 -0
- package/components/code/index.vdt.js +2 -3
- package/components/code/styles.d.ts +1 -1
- package/components/code/styles.js +1 -1
- package/components/collapse/index.d.ts +1 -0
- package/components/collapse/index.js +13 -1
- package/components/collapse/index.vdt.js +2 -3
- package/components/collapse/item.d.ts +1 -0
- package/components/collapse/item.js +2 -0
- package/components/collapse/item.vdt.js +6 -8
- package/components/collapse/styles.d.ts +2 -3
- package/components/collapse/styles.js +5 -9
- package/components/colorpicker/drag.d.ts +1 -0
- package/components/colorpicker/drag.js +2 -0
- package/components/colorpicker/drag.vdt.js +3 -2
- package/components/colorpicker/index.d.ts +1 -0
- package/components/colorpicker/index.js +13 -1
- package/components/colorpicker/index.vdt.js +5 -6
- package/components/colorpicker/panel.d.ts +1 -0
- package/components/colorpicker/panel.js +2 -0
- package/components/colorpicker/panel.vdt.js +16 -19
- package/components/colorpicker/styles.d.ts +3 -3
- package/components/colorpicker/styles.js +8 -8
- package/components/config/index.d.ts +10 -0
- package/components/config/index.js +23 -0
- package/components/config/index.spec.d.ts +1 -0
- package/components/config/index.spec.js +71 -0
- package/components/context.d.ts +2 -1
- package/components/context.js +8 -2
- package/components/copy/index.d.ts +1 -0
- package/components/copy/index.js +2 -0
- package/components/copy/index.vdt.js +9 -9
- package/components/copy/styles.d.ts +1 -1
- package/components/copy/styles.js +1 -1
- package/components/datepicker/calendar.d.ts +1 -0
- package/components/datepicker/calendar.js +2 -0
- package/components/datepicker/calendar.vdt.js +38 -51
- package/components/datepicker/index.vdt.js +13 -16
- package/components/datepicker/styles.d.ts +3 -3
- package/components/datepicker/styles.js +6 -6
- package/components/datepicker/time.d.ts +1 -0
- package/components/datepicker/time.js +2 -0
- package/components/datepicker/time.vdt.js +2 -3
- package/components/diagram/diagram.d.ts +1 -0
- package/components/diagram/diagram.js +2 -0
- package/components/diagram/diagram.vdt.js +3 -4
- package/components/diagram/styles.d.ts +1 -1
- package/components/diagram/styles.js +1 -1
- package/components/dialog/alert.vdt.js +6 -10
- package/components/dialog/base.d.ts +4 -0
- package/components/dialog/base.js +2 -0
- package/components/dialog/base.vdt.js +15 -21
- package/components/dialog/index.d.ts +1 -1
- package/components/dialog/styles.d.ts +3 -3
- package/components/dialog/styles.js +12 -12
- package/components/drawer/index.vdt.js +3 -4
- package/components/drawer/styles.d.ts +1 -1
- package/components/drawer/styles.js +3 -3
- package/components/dropdown/dropdown.d.ts +1 -0
- package/components/dropdown/dropdown.js +4 -3
- package/components/dropdown/item.d.ts +1 -0
- package/components/dropdown/item.js +2 -0
- package/components/dropdown/item.vdt.js +2 -4
- package/components/dropdown/menu.d.ts +1 -0
- package/components/dropdown/menu.js +2 -0
- package/components/dropdown/menu.vdt.js +2 -3
- package/components/dropdown/styles.d.ts +2 -2
- package/components/dropdown/styles.js +4 -4
- package/components/dropdown/usePosition.js +2 -2
- package/components/editable/index.d.ts +1 -0
- package/components/editable/index.js +2 -0
- package/components/editable/index.vdt.js +3 -7
- package/components/editable/styles.d.ts +1 -1
- package/components/editable/styles.js +2 -2
- package/components/form/form.d.ts +1 -0
- package/components/form/form.js +2 -0
- package/components/form/form.vdt.js +2 -3
- package/components/form/item.d.ts +1 -0
- package/components/form/item.js +2 -0
- package/components/form/item.vdt.js +13 -19
- package/components/form/styles.d.ts +2 -2
- package/components/form/styles.js +5 -5
- package/components/form/useError.d.ts +1 -0
- package/components/grid/col.d.ts +1 -0
- package/components/grid/col.js +2 -0
- package/components/grid/col.vdt.js +3 -6
- package/components/grid/row.d.ts +1 -0
- package/components/grid/row.js +2 -0
- package/components/grid/row.vdt.js +2 -3
- package/components/grid/styles.d.ts +2 -2
- package/components/grid/styles.js +8 -18
- package/components/grid/useBreakpoints.d.ts +1 -1
- package/components/grid/useBreakpoints.js +2 -2
- package/components/grid/useGutter.d.ts +1 -0
- package/components/icon/index.d.ts +1 -0
- package/components/icon/index.js +2 -0
- package/components/icon/index.vdt.js +7 -11
- package/components/icon/styles.d.ts +1 -2
- package/components/icon/styles.js +7 -5
- package/components/input/index.d.ts +1 -0
- package/components/input/index.js +2 -0
- package/components/input/index.vdt.js +16 -26
- package/components/input/search.d.ts +1 -0
- package/components/input/search.js +2 -0
- package/components/input/search.vdt.js +5 -7
- package/components/input/styles.d.ts +2 -2
- package/components/input/styles.js +11 -11
- package/components/layout/aside.d.ts +1 -0
- package/components/layout/aside.js +2 -0
- package/components/layout/aside.vdt.js +5 -8
- package/components/layout/body.d.ts +2 -0
- package/components/layout/body.js +11 -5
- package/components/layout/footer.d.ts +1 -0
- package/components/layout/footer.js +15 -4
- package/components/layout/header.d.ts +3 -0
- package/components/layout/header.js +10 -6
- package/components/layout/helpers.d.ts +1 -0
- package/components/layout/helpers.js +1 -0
- package/components/layout/index.spec.d.ts +1 -0
- package/components/layout/index.spec.js +53 -0
- package/components/layout/layout.d.ts +2 -0
- package/components/layout/layout.js +7 -5
- package/components/layout/styles.d.ts +3 -3
- package/components/layout/styles.js +11 -11
- package/components/layout/template.vdt.js +2 -1
- package/components/menu/item.d.ts +1 -0
- package/components/menu/item.js +2 -0
- package/components/menu/item.vdt.js +7 -12
- package/components/menu/menu.d.ts +1 -0
- package/components/menu/menu.js +2 -0
- package/components/menu/menu.vdt.js +3 -6
- package/components/menu/styles.d.ts +3 -3
- package/components/menu/styles.js +11 -11
- package/components/menu/useDropdown.js +6 -1
- package/components/message/message.d.ts +1 -0
- package/components/message/message.js +2 -0
- package/components/message/message.vdt.js +12 -17
- package/components/message/messages.d.ts +1 -0
- package/components/message/messages.js +2 -0
- package/components/message/messages.vdt.js +2 -3
- package/components/message/styles.d.ts +2 -2
- package/components/message/styles.js +4 -4
- package/components/pagination/index.d.ts +1 -0
- package/components/pagination/index.js +2 -0
- package/components/pagination/index.vdt.js +14 -17
- package/components/pagination/styles.d.ts +1 -1
- package/components/pagination/styles.js +4 -4
- package/components/popover/content.vdt.js +5 -4
- package/components/popover/styles.d.ts +1 -1
- package/components/popover/styles.js +2 -2
- package/components/portal.d.ts +1 -0
- package/components/portal.js +3 -1
- package/components/progress/index.d.ts +1 -0
- package/components/progress/index.js +2 -0
- package/components/progress/index.vdt.js +14 -17
- package/components/progress/styles.d.ts +1 -1
- package/components/progress/styles.js +6 -6
- package/components/radio/index.d.ts +1 -0
- package/components/radio/index.js +2 -0
- package/components/radio/index.vdt.js +4 -7
- package/components/radio/styles.d.ts +1 -1
- package/components/radio/styles.js +2 -2
- package/components/rate/index.d.ts +1 -0
- package/components/rate/index.js +2 -0
- package/components/rate/index.vdt.js +4 -8
- package/components/rate/styles.d.ts +1 -1
- package/components/rate/styles.js +2 -2
- package/components/scrollSelect/index.d.ts +1 -0
- package/components/scrollSelect/index.js +2 -0
- package/components/scrollSelect/index.vdt.js +7 -12
- package/components/scrollSelect/styles.d.ts +1 -1
- package/components/scrollSelect/styles.js +2 -2
- package/components/select/base.d.ts +4 -0
- package/components/select/base.js +2 -0
- package/components/select/base.vdt.js +17 -21
- package/components/select/group.d.ts +1 -0
- package/components/select/group.js +2 -0
- package/components/select/group.vdt.js +3 -4
- package/components/select/menu.d.ts +1 -0
- package/components/select/menu.js +2 -0
- package/components/select/menu.vdt.js +9 -13
- package/components/select/option.d.ts +1 -0
- package/components/select/option.js +2 -0
- package/components/select/option.vdt.js +6 -8
- package/components/select/styles.d.ts +3 -3
- package/components/select/styles.js +8 -8
- package/components/select/useSearchable.d.ts +1 -0
- package/components/skeleton/item.d.ts +1 -0
- package/components/skeleton/item.js +13 -1
- package/components/skeleton/item.vdt.js +4 -7
- package/components/skeleton/skeleton.d.ts +1 -0
- package/components/skeleton/skeleton.js +13 -1
- package/components/skeleton/skeleton.vdt.js +4 -6
- package/components/skeleton/styles.d.ts +6 -0
- package/components/skeleton/styles.js +35 -0
- package/components/slider/index.d.ts +1 -0
- package/components/slider/index.js +2 -0
- package/components/slider/index.vdt.js +18 -22
- package/components/slider/styles.d.ts +1 -1
- package/components/slider/styles.js +2 -2
- package/components/spin/index.d.ts +1 -0
- package/components/spin/index.js +13 -1
- package/components/spin/index.vdt.js +6 -7
- package/components/spin/styles.d.ts +1 -1
- package/components/spin/styles.js +4 -4
- package/components/spinner/index.d.ts +1 -0
- package/components/spinner/index.js +2 -0
- package/components/spinner/index.vdt.js +15 -21
- package/components/spinner/styles.d.ts +1 -1
- package/components/spinner/styles.js +7 -7
- package/components/split/index.d.ts +2 -1
- package/components/split/index.js +2 -0
- package/components/split/index.vdt.js +7 -9
- package/components/split/styles.d.ts +4 -0
- package/components/split/styles.js +55 -0
- package/components/steps/context.d.ts +1 -0
- package/components/steps/index.d.ts +1 -0
- package/components/steps/index.js +13 -1
- package/components/steps/index.vdt.js +2 -3
- package/components/steps/step.d.ts +1 -0
- package/components/steps/step.js +13 -1
- package/components/steps/step.vdt.js +10 -16
- package/components/steps/styles.d.ts +3 -3
- package/components/steps/styles.js +18 -18
- package/components/switch/index.d.ts +1 -0
- package/components/switch/index.js +2 -0
- package/components/switch/index.vdt.js +6 -7
- package/components/switch/styles.d.ts +1 -1
- package/components/switch/styles.js +4 -4
- package/components/table/cell.d.ts +1 -0
- package/components/table/cell.js +13 -1
- package/components/table/cell.vdt.js +6 -6
- package/components/table/column.d.ts +1 -0
- package/components/table/column.js +2 -0
- package/components/table/column.vdt.js +24 -32
- package/components/table/index.spec.js +1 -1
- package/components/table/row.d.ts +1 -0
- package/components/table/row.js +21 -2
- package/components/table/row.vdt.js +3 -10
- package/components/table/styles.d.ts +2 -2
- package/components/table/styles.js +6 -6
- package/components/table/table.d.ts +2 -1
- package/components/table/table.js +3 -1
- package/components/table/table.vdt.js +16 -20
- package/components/table/useColumns.d.ts +1 -0
- package/components/table/useFixedColumns.d.ts +2 -1
- package/components/table/useGroup.d.ts +1 -0
- package/components/table/usePagination.js +1 -1
- package/components/table/useResizable.d.ts +1 -0
- package/components/table/useSortable.d.ts +1 -0
- package/components/tabs/index.d.ts +4 -0
- package/components/tabs/index.js +2 -0
- package/components/tabs/index.vdt.js +9 -10
- package/components/tabs/styles.d.ts +1 -1
- package/components/tabs/styles.js +15 -15
- package/components/tabs/tab.d.ts +1 -0
- package/components/tabs/tab.js +2 -0
- package/components/tabs/tab.vdt.js +3 -5
- package/components/tabs/useActiveBar.js +2 -1
- package/components/tabs/useScroll.js +2 -1
- package/components/tag/base.d.ts +1 -0
- package/components/tag/base.js +13 -1
- package/components/tag/index.vdt.js +4 -5
- package/components/tag/styles.d.ts +2 -2
- package/components/tag/styles.js +7 -7
- package/components/tag/tags.d.ts +1 -0
- package/components/tag/tags.js +2 -0
- package/components/tag/tags.vdt.js +5 -11
- package/components/timeline/item.d.ts +1 -0
- package/components/timeline/item.js +13 -1
- package/components/timeline/item.vdt.js +4 -5
- package/components/timeline/styles.d.ts +2 -2
- package/components/timeline/styles.js +6 -6
- package/components/timeline/timeline.d.ts +1 -0
- package/components/timeline/timeline.js +13 -1
- package/components/timeline/timeline.vdt.js +2 -3
- package/components/timepicker/index.d.ts +2 -1
- package/components/timepicker/panelPicker.vdt.js +13 -17
- package/components/timepicker/selectPicker.d.ts +1 -0
- package/components/timepicker/selectPicker.js +2 -0
- package/components/timepicker/selectPicker.vdt.js +4 -4
- package/components/timepicker/styles.d.ts +1 -1
- package/components/timepicker/styles.js +2 -2
- package/components/tip/index.vdt.js +5 -6
- package/components/tip/styles.d.ts +1 -1
- package/components/tip/styles.js +2 -2
- package/components/tooltip/content.vdt.js +4 -9
- package/components/tooltip/styles.d.ts +1 -1
- package/components/tooltip/styles.js +6 -6
- package/components/transfer/index.d.ts +1 -0
- package/components/transfer/index.js +2 -0
- package/components/transfer/index.vdt.js +20 -25
- package/components/transfer/styles.d.ts +1 -1
- package/components/transfer/styles.js +2 -2
- package/components/tree/index.d.ts +1 -0
- package/components/tree/index.js +2 -0
- package/components/tree/index.vdt.js +19 -30
- package/components/tree/styles.d.ts +1 -1
- package/components/tree/styles.js +2 -2
- package/components/treeSelect/index.vdt.js +2 -3
- package/components/treeSelect/styles.d.ts +1 -1
- package/components/treeSelect/styles.js +1 -1
- package/components/upload/index.d.ts +1 -0
- package/components/upload/index.js +2 -0
- package/components/upload/index.vdt.js +39 -50
- package/components/upload/styles.d.ts +2 -2
- package/components/upload/styles.js +3 -3
- package/components/utils.d.ts +3 -1
- package/components/utils.js +36 -9
- package/components/virtual.js +5 -2
- package/components/wave/index.d.ts +1 -0
- package/components/wave/index.js +4 -2
- package/components/wave/styles.d.ts +1 -1
- package/components/wave/styles.js +2 -2
- package/index.d.ts +3 -2
- package/index.js +3 -2
- package/package.json +2 -2
- package/styles/fonts/iconfont.d.ts +1 -1
- package/styles/fonts/iconfont.js +4 -1
- package/styles/global.js +4 -4
- package/styles/theme.d.ts +1 -1
- package/styles/theme.js +4 -53
- package/styles/utils.d.ts +1 -0
- package/styles/utils.js +3 -0
- package/components/skeleton/style.d.ts +0 -6
- package/components/skeleton/style.js +0 -35
- package/components/split/style.d.ts +0 -4
- package/components/split/style.js +0 -55
|
@@ -14,6 +14,7 @@ import { useInput } from './useInput';
|
|
|
14
14
|
import { useFocusout } from './useFocusout';
|
|
15
15
|
import { isNullOrUndefined } from 'intact-shared';
|
|
16
16
|
import { useDraggable } from './useDraggble';
|
|
17
|
+
import { useConfigContext } from '../config';
|
|
17
18
|
var typeDefs = {
|
|
18
19
|
value: null,
|
|
19
20
|
multiple: Boolean,
|
|
@@ -65,6 +66,7 @@ export var BaseSelect = /*#__PURE__*/function (_Component) {
|
|
|
65
66
|
_this.input = useInput(_this.resetKeywords);
|
|
66
67
|
_this.focusout = useFocusout();
|
|
67
68
|
_this.draggable = useDraggable();
|
|
69
|
+
_this.config = useConfigContext();
|
|
68
70
|
return _this;
|
|
69
71
|
}
|
|
70
72
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
2
|
import _flatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/flat";
|
|
3
3
|
import _valuesInstanceProperty from "@babel/runtime-corejs3/core-js/instance/values";
|
|
4
|
-
import { createUnknownComponentVNode as _$cc,
|
|
4
|
+
import { createUnknownComponentVNode as _$cc, className as _$cn, createVNode as _$cv, createElementVNode as _$ce, noop as _$no, map as _$ma, extend as _$ex, EMPTY_OBJ as _$em } from 'intact-react';
|
|
5
5
|
import { TransitionGroup, Transition } from 'intact';
|
|
6
6
|
import { Input } from '../input';
|
|
7
7
|
import { Icon } from '../icon';
|
|
@@ -16,9 +16,6 @@ var _$tmp0 = {
|
|
|
16
16
|
'className': 'ion-load-c',
|
|
17
17
|
'rotate': true
|
|
18
18
|
};
|
|
19
|
-
var _$tmp1 = {
|
|
20
|
-
'className': 'k-icon-search'
|
|
21
|
-
};
|
|
22
19
|
export default function ($props, $blocks, $__proto__) {
|
|
23
20
|
var _classNameObj,
|
|
24
21
|
_this = this;
|
|
@@ -51,10 +48,8 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
51
48
|
nowrap = _this$get.nowrap,
|
|
52
49
|
draggable = _this$get.draggable;
|
|
53
50
|
|
|
54
|
-
var
|
|
55
|
-
|
|
56
|
-
'k-disabled': disabled
|
|
57
|
-
}, _classNameObj["k-" + size] = size !== 'default', _classNameObj['k-fluid'] = fluid, _classNameObj['k-inline'] = inline, _classNameObj['k-flat'] = flat, _classNameObj['k-nowrap'] = nowrap, _classNameObj[className] = className, _classNameObj[$props.className] = $props.className, _classNameObj[makeStyles()] = true, _classNameObj);
|
|
51
|
+
var k = this.config.k;
|
|
52
|
+
var classNameObj = (_classNameObj = {}, _classNameObj[k + "-select"] = true, _classNameObj[k + "-disabled"] = disabled, _classNameObj[k + "-" + size] = size !== 'default', _classNameObj[k + "-fluid"] = fluid, _classNameObj[k + "-inline"] = inline, _classNameObj[k + "-flat"] = flat, _classNameObj[k + "-nowrap"] = nowrap, _classNameObj[className] = className, _classNameObj[$props.className] = $props.className, _classNameObj[makeStyles(k)] = true, _classNameObj);
|
|
58
53
|
var placeholder = this.getPlaceholder();
|
|
59
54
|
var label = this.getLabel();
|
|
60
55
|
var hasValue = this.hasValue();
|
|
@@ -66,7 +61,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
66
61
|
onFocusout = _this$focusout.onFocusout,
|
|
67
62
|
triggerRef = _this$focusout.triggerRef;
|
|
68
63
|
var filterInput = filterable ? _$cc(Input, {
|
|
69
|
-
'className':
|
|
64
|
+
'className': _$cn(k + "-select-input"),
|
|
70
65
|
'value': keywords,
|
|
71
66
|
'ev-$change:value': onInput,
|
|
72
67
|
'disabled': disabled,
|
|
@@ -83,6 +78,8 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
83
78
|
return _$cc(ErrorContext.Consumer, {
|
|
84
79
|
'defaultValue': false,
|
|
85
80
|
'children': function children(isInvalid) {
|
|
81
|
+
var _$cn2;
|
|
82
|
+
|
|
86
83
|
return _$cc(Wave, {
|
|
87
84
|
'disabled': disabled || isInvalid || inline,
|
|
88
85
|
'inset': '-2px',
|
|
@@ -111,7 +108,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
111
108
|
};
|
|
112
109
|
|
|
113
110
|
return block ? block.call($this, callBlock, data) : callBlock();
|
|
114
|
-
}, __$blocks['prefix'](_$no)), 0,
|
|
111
|
+
}, __$blocks['prefix'](_$no)), 0, _$cn(k + "-select-prefix")) : undefined, _$ce(2, 'div', [_$ce(64, 'input', null, 1, null, {
|
|
115
112
|
'type': 'hidden',
|
|
116
113
|
'value': value,
|
|
117
114
|
'name': name
|
|
@@ -131,7 +128,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
131
128
|
'readonly': !show,
|
|
132
129
|
'waveDisabled': true,
|
|
133
130
|
'flat': flat
|
|
134
|
-
}, 'input', inputRef) : !filterable && !hasValue ? _$ce(2, 'div', placeholder, 0,
|
|
131
|
+
}, 'input', inputRef) : !filterable && !hasValue ? _$ce(2, 'div', placeholder, 0, _$cn(k + "-select-placeholder c-ellipsis"), null, 'placeholder') : !multiple ? _$ce(2, 'div', (_$blocks['value'] = function ($super) {
|
|
135
132
|
return label;
|
|
136
133
|
}, __$blocks['value'] = function ($super, data) {
|
|
137
134
|
var block = $blocks['value'];
|
|
@@ -141,7 +138,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
141
138
|
};
|
|
142
139
|
|
|
143
140
|
return block ? block.call($this, callBlock, data) : callBlock();
|
|
144
|
-
}, __$blocks['value'](_$no, [value, label])), 0,
|
|
141
|
+
}, __$blocks['value'](_$no, [value, label])), 0, _$cn(k + "-select-value c-ellipsis"), null, 'value') : _$ce(2, 'div', [(_$blocks['values'] = function ($super) {
|
|
145
142
|
return label && label.length || filterable ? _$cc(Tags, {
|
|
146
143
|
'nowrap': nowrap,
|
|
147
144
|
'size': size,
|
|
@@ -192,17 +189,16 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
192
189
|
};
|
|
193
190
|
|
|
194
191
|
return block ? block.call($this, callBlock, data) : callBlock();
|
|
195
|
-
}, _valuesInstanceProperty(__$blocks).call(__$blocks, _$no, [value, label])), $blocks && _valuesInstanceProperty($blocks) ? filterInput : undefined], 0,
|
|
196
|
-
})], 0,
|
|
197
|
-
'className': _$cn({
|
|
198
|
-
"k-select-clear ion-ios-close": true,
|
|
199
|
-
"k-show": hasValue
|
|
200
|
-
}),
|
|
192
|
+
}, _valuesInstanceProperty(__$blocks).call(__$blocks, _$no, [value, label])), $blocks && _valuesInstanceProperty($blocks) ? filterInput : undefined], 0, _$cn(k + "-select-values"), null, 'values')
|
|
193
|
+
})], 0, _$cn(k + "-select-main")), !hideIcon || clearable || loading || $blocks.suffix ? _$ce(2, 'span', [clearable && !disabled ? _$cc(Icon, {
|
|
194
|
+
'className': _$cn((_$cn2 = {}, _$cn2[k + "-select-clear ion-ios-close"] = true, _$cn2[k + "-show"] = hasValue, _$cn2)),
|
|
201
195
|
'ev-click': _this.clear,
|
|
202
196
|
'hoverable': true
|
|
203
197
|
}) : undefined, _$ce(2, 'span', (_$blocks['suffix'] = function ($super) {
|
|
204
|
-
return loading ? _$cc(Icon, _$tmp0) : !hideIcon ? filterable && show ? _$cc(Icon,
|
|
205
|
-
'className':
|
|
198
|
+
return loading ? _$cc(Icon, _$tmp0) : !hideIcon ? filterable && show ? _$cc(Icon, {
|
|
199
|
+
'className': _$cn(k + "-icon-search")
|
|
200
|
+
}) : _$cc(Icon, {
|
|
201
|
+
'className': _$cn(k + "-select-arrow " + k + "-icon-down"),
|
|
206
202
|
'disabled': $props.isDisableArrow
|
|
207
203
|
}) : undefined;
|
|
208
204
|
}, __$blocks['suffix'] = function ($super, data) {
|
|
@@ -213,7 +209,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
213
209
|
};
|
|
214
210
|
|
|
215
211
|
return block ? block.call($this, callBlock, data) : callBlock();
|
|
216
|
-
}, __$blocks['suffix'](_$no)), 0,
|
|
212
|
+
}, __$blocks['suffix'](_$no)), 0, _$cn(k + "-select-suffix-icon"))], 0, _$cn(k + "-select-suffix")) : undefined]), (_$blocks['base-menu'] = function ($super) {
|
|
217
213
|
return _$ce(2, 'div', 'should be implemeted', 16);
|
|
218
214
|
}, __$blocks['base-menu'] = function ($super, data) {
|
|
219
215
|
var block = $blocks['base-menu'];
|
|
@@ -3,6 +3,7 @@ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/con
|
|
|
3
3
|
import { Component, inject, VNode } from 'intact-react';
|
|
4
4
|
import template from './group.vdt';
|
|
5
5
|
import { SELECT } from './constants';
|
|
6
|
+
import { useConfigContext } from '../config';
|
|
6
7
|
var typeDefs = {
|
|
7
8
|
label: [String, Number, VNode]
|
|
8
9
|
};
|
|
@@ -20,6 +21,7 @@ export var OptionGroup = /*#__PURE__*/function (_Component) {
|
|
|
20
21
|
|
|
21
22
|
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
22
23
|
_this.select = inject(SELECT);
|
|
24
|
+
_this.config = useConfigContext();
|
|
23
25
|
return _this;
|
|
24
26
|
}
|
|
25
27
|
|
|
@@ -19,9 +19,8 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
19
19
|
var _this$select$get = this.select.get(),
|
|
20
20
|
card = _this$select$get.card;
|
|
21
21
|
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
}, _classNameObj[className] = className, _classNameObj[makeGroupStyles()] = true, _classNameObj);
|
|
22
|
+
var k = this.config.k;
|
|
23
|
+
var classNameObj = (_classNameObj = {}, _classNameObj[k + "-select-group"] = true, _classNameObj[className] = className, _classNameObj[makeGroupStyles(k)] = true, _classNameObj);
|
|
25
24
|
return _$cv('div', _extends({}, getRestProps(this), {
|
|
26
25
|
'className': _$cn(classNameObj)
|
|
27
26
|
}), [!card ? _$ce(2, 'div', (_$blocks['label'] = function ($super) {
|
|
@@ -34,6 +33,6 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
34
33
|
};
|
|
35
34
|
|
|
36
35
|
return block ? block.call($this, callBlock, data) : callBlock();
|
|
37
|
-
}, __$blocks['label'](_$no)), 0,
|
|
36
|
+
}, __$blocks['label'](_$no)), 0, _$cn(k + "-select-group-label")) : undefined, children]);
|
|
38
37
|
}
|
|
39
38
|
;
|
|
@@ -5,6 +5,7 @@ import template from './menu.vdt';
|
|
|
5
5
|
import { SELECT } from './constants';
|
|
6
6
|
import { useCard } from './useCard';
|
|
7
7
|
import { useSearchable } from './useSearchable';
|
|
8
|
+
import { useConfigContext } from '../config';
|
|
8
9
|
export var SelectMenu = /*#__PURE__*/function (_Component) {
|
|
9
10
|
_inheritsLoose(SelectMenu, _Component);
|
|
10
11
|
|
|
@@ -21,6 +22,7 @@ export var SelectMenu = /*#__PURE__*/function (_Component) {
|
|
|
21
22
|
_this.select = inject(SELECT);
|
|
22
23
|
_this.card = useCard(_this.select.label.activeIndices);
|
|
23
24
|
_this.searchable = useSearchable();
|
|
25
|
+
_this.config = useConfigContext();
|
|
24
26
|
return _this;
|
|
25
27
|
}
|
|
26
28
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createUnknownComponentVNode as _$cc, map as _$ma, createElementVNode as _$ce,
|
|
1
|
+
import { createUnknownComponentVNode as _$cc, map as _$ma, createElementVNode as _$ce, className as _$cn, extend as _$ex, EMPTY_OBJ as _$em } from 'intact-react';
|
|
2
2
|
import { DropdownMenu } from '../dropdown';
|
|
3
3
|
import { _$ } from '../../i18n';
|
|
4
4
|
import { makeMenuStyles } from './styles';
|
|
@@ -10,9 +10,6 @@ import { Button } from '../button';
|
|
|
10
10
|
import { Icon } from '../icon';
|
|
11
11
|
import { context } from './useSearchable';
|
|
12
12
|
import { Tabs, Tab } from '../tabs';
|
|
13
|
-
var _$tmp0 = {
|
|
14
|
-
'className': 'k-icon-search'
|
|
15
|
-
};
|
|
16
13
|
export default function ($props, $blocks, $__proto__) {
|
|
17
14
|
var _classNameObj;
|
|
18
15
|
|
|
@@ -29,11 +26,8 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
29
26
|
searchable = _this$select$get.searchable,
|
|
30
27
|
multiple = _this$select$get.multiple;
|
|
31
28
|
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
'k-card': card,
|
|
35
|
-
'k-searchable': searchable
|
|
36
|
-
}, _classNameObj[className] = className, _classNameObj[makeMenuStyles()] = true, _classNameObj);
|
|
29
|
+
var k = this.config.k;
|
|
30
|
+
var classNameObj = (_classNameObj = {}, _classNameObj[k + "-select-menu"] = true, _classNameObj[k + "-card"] = card, _classNameObj[k + "-searchable"] = searchable, _classNameObj[className] = className, _classNameObj[makeMenuStyles(k)] = true, _classNameObj);
|
|
37
31
|
|
|
38
32
|
if (card) {
|
|
39
33
|
var _this$card = this.card,
|
|
@@ -61,7 +55,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
61
55
|
}
|
|
62
56
|
|
|
63
57
|
if (isEmptyChildren(children)) {
|
|
64
|
-
children = _$ce(2, 'div', _$('无数据'), 0,
|
|
58
|
+
children = _$ce(2, 'div', _$('无数据'), 0, _$cn(k + "-select-empty"));
|
|
65
59
|
}
|
|
66
60
|
|
|
67
61
|
if (searchable) {
|
|
@@ -90,7 +84,9 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
90
84
|
__$blocks = _$ex({}, $blocks);
|
|
91
85
|
|
|
92
86
|
return (_$blocks['suffix'] = function ($super) {
|
|
93
|
-
return _$cc(Icon,
|
|
87
|
+
return _$cc(Icon, {
|
|
88
|
+
'className': _$cn(k + "-icon-search")
|
|
89
|
+
});
|
|
94
90
|
}, __$blocks['suffix'] = function ($super, data) {
|
|
95
91
|
var block = $blocks['suffix'];
|
|
96
92
|
|
|
@@ -116,7 +112,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
116
112
|
'size': 'small',
|
|
117
113
|
'ev-click': unselectAll,
|
|
118
114
|
'children': _$('清空')
|
|
119
|
-
})], 4,
|
|
115
|
+
})], 4, _$cn(k + "-select-op")) : undefined], 0, _$cn(k + "-select-header")), _$ce(2, 'div', children, 0, _$cn(k + "-select-body")), multiple ? _$ce(2, 'div', [_$cc(Button, {
|
|
120
116
|
'size': 'small',
|
|
121
117
|
'ev-click': this.select.hide,
|
|
122
118
|
'children': _$('取消')
|
|
@@ -125,7 +121,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
125
121
|
'size': 'small',
|
|
126
122
|
'ev-click': confirm,
|
|
127
123
|
'children': _$('确定')
|
|
128
|
-
})], 4,
|
|
124
|
+
})], 4, _$cn(k + "-select-footer")) : undefined]
|
|
129
125
|
});
|
|
130
126
|
}
|
|
131
127
|
|
|
@@ -6,6 +6,7 @@ import { Component, inject } from 'intact-react';
|
|
|
6
6
|
import template from './option.vdt';
|
|
7
7
|
import { bind, toggleArray } from '../utils';
|
|
8
8
|
import { SELECT } from './constants';
|
|
9
|
+
import { useConfigContext } from '../config';
|
|
9
10
|
var typeDefs = {
|
|
10
11
|
value: {
|
|
11
12
|
required: true
|
|
@@ -27,6 +28,7 @@ export var Option = /*#__PURE__*/function (_Component) {
|
|
|
27
28
|
|
|
28
29
|
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
29
30
|
_this.select = inject(SELECT);
|
|
31
|
+
_this.config = useConfigContext();
|
|
30
32
|
return _this;
|
|
31
33
|
}
|
|
32
34
|
|
|
@@ -6,10 +6,6 @@ import { isEmptyChildren } from '../utils';
|
|
|
6
6
|
import { Icon } from '../icon';
|
|
7
7
|
import { Checkbox } from '../checkbox';
|
|
8
8
|
import { context } from './useSearchable';
|
|
9
|
-
var _$tmp0 = {
|
|
10
|
-
'className': 'k-select-checkmark ion-ios-checkmark-empty',
|
|
11
|
-
'color': 'primary'
|
|
12
|
-
};
|
|
13
9
|
export default function ($props, $blocks, $__proto__) {
|
|
14
10
|
var _classNameObj,
|
|
15
11
|
_this = this;
|
|
@@ -28,10 +24,9 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
28
24
|
multiple = _this$select$get.multiple,
|
|
29
25
|
searchable = _this$select$get.searchable;
|
|
30
26
|
|
|
27
|
+
var k = this.config.k;
|
|
31
28
|
var isActive = this.isActive();
|
|
32
|
-
var classNameObj = (_classNameObj = {
|
|
33
|
-
'k-select-option': true
|
|
34
|
-
}, _classNameObj[className] = className, _classNameObj['k-active'] = isActive, _classNameObj);
|
|
29
|
+
var classNameObj = (_classNameObj = {}, _classNameObj[k + "-select-option"] = true, _classNameObj[className] = className, _classNameObj[k + "-active"] = isActive, _classNameObj);
|
|
35
30
|
|
|
36
31
|
var _children = isEmptyChildren(children) ? label : children;
|
|
37
32
|
|
|
@@ -57,7 +52,10 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
57
52
|
'hideOnSelect': !multiple,
|
|
58
53
|
'children': [_children, !searchable ? _$cc(Transition, {
|
|
59
54
|
'name': 'k-scale',
|
|
60
|
-
'children': multiple && isActive ? _$cc(Icon,
|
|
55
|
+
'children': multiple && isActive ? _$cc(Icon, {
|
|
56
|
+
'className': _$cn(k + "-select-checkmark ion-ios-checkmark-empty"),
|
|
57
|
+
'color': 'primary'
|
|
58
|
+
}) : undefined
|
|
61
59
|
}) : undefined]
|
|
62
60
|
});
|
|
63
61
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
|
-
export default function makeStyles(): string;
|
|
3
|
-
export declare function makeMenuStyles(): string;
|
|
4
|
-
export declare function makeGroupStyles(): string;
|
|
2
|
+
export default function makeStyles(k: string): string;
|
|
3
|
+
export declare function makeMenuStyles(k: string): string;
|
|
4
|
+
export declare function makeGroupStyles(k: string): string;
|
|
@@ -173,18 +173,18 @@ setDefault(function () {
|
|
|
173
173
|
select: defaults
|
|
174
174
|
}).select;
|
|
175
175
|
});
|
|
176
|
-
export default function makeStyles() {
|
|
177
|
-
return /*#__PURE__*/css("display:inline-flex;align-items:center;vertical-align:middle;position:relative;width:", select.width, ";cursor:pointer;outline:none;border:", select.border, ";background:", select.bgColor, ";transition:border ", select.transition, ",background ", select.transition, ",box-shadow ", select.transition, ";border-radius:", select.borderRadius, ";.k-select-main{flex:1;min-width:0;}.k-select-prefix,.k-select-suffix{display:flex;align-items:center;position:relative;}.k-select-suffix{margin-left:", select.suffixGap, ";}.k-select-placeholder{color:", select.placeholderColor, ";user-select:none;}.k-input .k-input-inner{background:transparent;}&.k-fluid{width:100%;}.k-select-clear{opacity:0;transition:opacity ", select.transition, ",color ", select.transition, "!important;pointer-events:none;position:absolute;z-index:1;top:50%;left:50%;transform:translate(-50%, -50%);}&:hover{border:", select.hoverBorder, ";.k-select-clear.k-show{opacity:1;pointer-events:all;+.k-select-suffix-icon{opacity:0;}}}.k-select-suffix-icon{display:inline-flex;align-items:center;transition:opacity ", select.transition, ";}.k-select-arrow{display:inline-block;transition:transform ", select.transition, ";}&.k-dropdown-open{border:", select.focusBorder, ";.k-select-arrow{transform:rotateX(180deg);}}&:focus{outline:none;border:", select.focusBorder, ";}.k-tags{padding:3px 0;}.k-tag{word-break:
|
|
176
|
+
export default function makeStyles(k) {
|
|
177
|
+
return /*#__PURE__*/css("display:inline-flex;align-items:center;vertical-align:middle;position:relative;width:", select.width, ";cursor:pointer;outline:none;border:", select.border, ";background:", select.bgColor, ";transition:border ", select.transition, ",background ", select.transition, ",box-shadow ", select.transition, ";border-radius:", select.borderRadius, ";.", k, "-select-main{flex:1;min-width:0;}.", k, "-select-prefix,.", k, "-select-suffix{display:flex;align-items:center;position:relative;}.", k, "-select-suffix{margin-left:", select.suffixGap, ";}.", k, "-select-placeholder{color:", select.placeholderColor, ";user-select:none;}.", k, "-input .", k, "-input-inner{background:transparent;}&.", k, "-fluid{width:100%;}.", k, "-select-clear{opacity:0;transition:opacity ", select.transition, ",color ", select.transition, "!important;pointer-events:none;position:absolute;z-index:1;top:50%;left:50%;transform:translate(-50%, -50%);}&:hover{border:", select.hoverBorder, ";.", k, "-select-clear.", k, "-show{opacity:1;pointer-events:all;+.", k, "-select-suffix-icon{opacity:0;}}}.", k, "-select-suffix-icon{display:inline-flex;align-items:center;transition:opacity ", select.transition, ";}.", k, "-select-arrow{display:inline-block;transition:transform ", select.transition, ";}&.", k, "-dropdown-open{border:", select.focusBorder, ";.", k, "-select-arrow{transform:rotateX(180deg);}}&:focus{outline:none;border:", select.focusBorder, ";}.", k, "-tags{padding:3px 0;}.", k, "-tag{word-break:bre.", k, "-word;height:auto;max-width:calc(100% - ", getRight(select.tag.margin), " - 1px);}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
178
178
|
var styles = select[size];
|
|
179
179
|
var className = /*#__PURE__*/css("font-size:", styles.fontSize, ";min-height:", styles.height, ";padding:", styles.padding, ";");
|
|
180
180
|
if (size === 'default') return className;
|
|
181
|
-
return /*#__PURE__*/css("&.k-", size, "{", className, ";}");
|
|
182
|
-
}), "&.k-inline{width:auto;border:none;min-height:0;background:transparent;.k-select-placeholder,.k-select-value{line-height:inherit;}}&.k-flat{border:none;background:", theme.color.bg, ";color:", _flatInstanceProperty(defaults).color, ";.k-tag{background:", select.tag.disabledBgColor, ";}}&.k-disabled{color:", select.disabled.color, ";cursor:not-allowed;background:", select.disabled.bgColor, ";border-color:", select.disabled.borderColor, ";.k-tag{background:", select.tag.disabledBgColor, ";}}&.k-nowrap{.k-select-values{display:flex;align-items:center;}.k-tags{flex:1;}.k-select-text{white-space:nowrap;overflow:hidden;text-overlay:ellipsis;}}");
|
|
181
|
+
return /*#__PURE__*/css("&.", k, "-", size, "{", className, ";}");
|
|
182
|
+
}), "&.", k, "-inline{width:auto;border:none;min-height:0;background:transparent;.", k, "-select-placeholder,.", k, "-select-value{line-height:inherit;}}&.", k, "-flat{border:none;background:", theme.color.bg, ";color:", _flatInstanceProperty(defaults).color, ";.", k, "-tag{background:", select.tag.disabledBgColor, ";}}&.", k, "-disabled{color:", select.disabled.color, ";cursor:not-allowed;background:", select.disabled.bgColor, ";border-color:", select.disabled.borderColor, ";.", k, "-tag{background:", select.tag.disabledBgColor, ";}}&.", k, "-nowrap{.", k, "-select-values{display:flex;align-items:center;}.", k, "-tags{flex:1;}.", k, "-select-text{white-space:nowrap;overflow:hidden;text-overlay:ellipsis;}}");
|
|
183
183
|
}
|
|
184
|
-
export function makeMenuStyles() {
|
|
184
|
+
export function makeMenuStyles(k) {
|
|
185
185
|
var searchable = select.searchable;
|
|
186
|
-
return /*#__PURE__*/css("min-width:auto;max-height:", select.menuMaxHeight, ";overflow:auto;&:not([class*=\"-active\"]){transition:left ", select.transition, ",top ", select.transition, ";}.k-select-empty{padding:", select.empty.padding, ";color:", select.empty.color, ";text-align:center;}.k-select-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;&.k-active{color:", select.activeColor, ";}}&.k-card{display:flex;height:", select.card.height, ";.k-tabs{border:none;overflow:auto;}.k-select-group{flex:1;overflow:auto;}.k-select-option.k-hover{background:", select.card.itemHoverBgColor, ";color:", select.card.itemHoverColor, ";}}&.k-searchable{max-height:none;padding:", searchable.padding, ";.k-select-option{padding:", searchable.optionPadding, ";}}.k-select-header{display:flex;padding:", searchable.header.padding, ";border-bottom:", searchable.border, ";margin-bottom:", searchable.header.gap, ";}.k-select-op{white-space:nowrap;.k-btn{padding:", searchable.header.btnPadding, ";margin-left:", searchable.header.btnGap, ";}}.k-select-body{max-height:", select.menuMaxHeight, ";overflow:auto;}.k-select-footer{border-top:", searchable.border, ";padding:", searchable.footer.padding, ";text-align:right;margin-top:", searchable.footer.gap, ";.k-btn{margin-left:", searchable.footer.btnGap, ";}}.k-select-option{.k-checkbox{margin:0 -", getRight(searchable.optionPadding), " 0 -", getLeft(searchable.optionPadding), ";padding:", searchable.optionPadding, ";}}.k-select-checkmark{float:right;height:100%;font-size:", select.multiple.checkmark.fontSize, ";}");
|
|
186
|
+
return /*#__PURE__*/css("min-width:auto;max-height:", select.menuMaxHeight, ";overflow:auto;&:not([class*=\"-active\"]){transition:left ", select.transition, ",top ", select.transition, ";}.", k, "-select-empty{padding:", select.empty.padding, ";color:", select.empty.color, ";text-align:center;}.", k, "-select-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;&.", k, "-active{color:", select.activeColor, ";}}&.", k, "-card{display:flex;height:", select.card.height, ";.", k, "-tabs{border:none;overflow:auto;}.", k, "-select-group{flex:1;overflow:auto;}.", k, "-select-option.", k, "-hover{background:", select.card.itemHoverBgColor, ";color:", select.card.itemHoverColor, ";}}&.", k, "-searchable{max-height:none;padding:", searchable.padding, ";.", k, "-select-option{padding:", searchable.optionPadding, ";}}.", k, "-select-header{display:flex;padding:", searchable.header.padding, ";border-bottom:", searchable.border, ";margin-bottom:", searchable.header.gap, ";}.", k, "-select-op{white-space:nowrap;.", k, "-btn{padding:", searchable.header.btnPadding, ";margin-left:", searchable.header.btnGap, ";}}.", k, "-select-body{max-height:", select.menuMaxHeight, ";overflow:auto;}.", k, "-select-footer{border-top:", searchable.border, ";padding:", searchable.footer.padding, ";text-align:right;margin-top:", searchable.footer.gap, ";.", k, "-btn{margin-left:", searchable.footer.btnGap, ";}}.", k, "-select-option{.", k, "-checkbox{margin:0 -", getRight(searchable.optionPadding), " 0 -", getLeft(searchable.optionPadding), ";padding:", searchable.optionPadding, ";}}.", k, "-select-checkmark{float:right;height:100%;font-size:", select.multiple.checkmark.fontSize, ";}");
|
|
187
187
|
}
|
|
188
|
-
export function makeGroupStyles() {
|
|
189
|
-
return /*#__PURE__*/css(".k-select-group-label{color:", select.group.labelColor, ";padding:", select.group.labelPadding, ";}");
|
|
188
|
+
export function makeGroupStyles(k) {
|
|
189
|
+
return /*#__PURE__*/css(".", k, "-select-group-label{color:", select.group.labelColor, ";padding:", select.group.labelPadding, ";}");
|
|
190
190
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const context: {
|
|
2
2
|
Provider: import('intact-react').ComponentConstructor<import("intact").Component<import("../context").ProviderProps<any>, {}, {}, {}>>;
|
|
3
3
|
Consumer: import("intact").ComponentConstructor<import("intact").Component<import("../context").ConsumerProps<any>, {}, {}, {}>>;
|
|
4
|
+
useContext: () => import("intact").RefObject<any>;
|
|
4
5
|
};
|
|
5
6
|
export declare function useSearchable(): {
|
|
6
7
|
checkedKeys: import("../../hooks/useState").State<any[]>;
|
|
@@ -12,5 +12,6 @@ export declare class SkeletonItem extends Component<SkeletonItemProps, SkeletonI
|
|
|
12
12
|
static template: string | import("intact").Template<any>;
|
|
13
13
|
static typeDefs: Required<TypeDefs<SkeletonItemProps>>;
|
|
14
14
|
static defaults: () => Partial<SkeletonItemProps>;
|
|
15
|
+
private config;
|
|
15
16
|
}
|
|
16
17
|
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
2
3
|
import { Component } from 'intact-react';
|
|
3
4
|
import template from './item.vdt';
|
|
5
|
+
import { useConfigContext } from '../config';
|
|
4
6
|
export var ItemTypeMap = ['text', 'avator', 'image', 'button', 'input'];
|
|
5
7
|
var typeDefs = {
|
|
6
8
|
type: ItemTypeMap
|
|
@@ -16,7 +18,17 @@ export var SkeletonItem = /*#__PURE__*/function (_Component) {
|
|
|
16
18
|
_inheritsLoose(SkeletonItem, _Component);
|
|
17
19
|
|
|
18
20
|
function SkeletonItem() {
|
|
19
|
-
|
|
21
|
+
var _context;
|
|
22
|
+
|
|
23
|
+
var _this;
|
|
24
|
+
|
|
25
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26
|
+
args[_key] = arguments[_key];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
30
|
+
_this.config = useConfigContext();
|
|
31
|
+
return _this;
|
|
20
32
|
}
|
|
21
33
|
|
|
22
34
|
return SkeletonItem;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
2
|
import { createVNode as _$cv, className as _$cn, createElementVNode as _$ce } from 'intact-react';
|
|
3
|
-
import { makeItemStyles } from './
|
|
3
|
+
import { makeItemStyles } from './styles';
|
|
4
4
|
import { getRestProps } from '../utils';
|
|
5
5
|
var _$tmp0 = {
|
|
6
6
|
'd': 'M64 896V128h896v768H64z m64-128l192-192 116.352 116.352L640 448l256 307.2V192H128v576z m224-480a96 96 0 1 1-0.064 192.064A96 96 0 0 1 352 288z'
|
|
@@ -19,12 +19,9 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
19
19
|
var _this$get = this.get(),
|
|
20
20
|
type = _this$get.type;
|
|
21
21
|
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
var ItemklsObj = (_ItemklsObj = {
|
|
26
|
-
'k-skeleton-item-box': true
|
|
27
|
-
}, _ItemklsObj["skeleton-item-" + type] = true, _ItemklsObj);
|
|
22
|
+
var k = this.config.k;
|
|
23
|
+
var classNameObj = (_classNameObj = {}, _classNameObj[k + "-skeleton-item"] = true, _classNameObj[makeItemStyles(k)] = true, _classNameObj);
|
|
24
|
+
var ItemklsObj = (_ItemklsObj = {}, _ItemklsObj[k + "-skeleton-item-box"] = true, _ItemklsObj[k + "-skeleton-item-" + type] = true, _ItemklsObj);
|
|
28
25
|
|
|
29
26
|
var skeletonItem = _$cv('div', _extends({
|
|
30
27
|
'className': _$cn(ItemklsObj)
|
|
@@ -14,4 +14,5 @@ export declare class Skeleton extends Component<SkeletonProps, SkeletonEvents, S
|
|
|
14
14
|
static template: string | import("intact").Template<any>;
|
|
15
15
|
static typeDefs: Required<TypeDefs<SkeletonProps>>;
|
|
16
16
|
static defaults: () => Partial<SkeletonProps>;
|
|
17
|
+
private config;
|
|
17
18
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
2
3
|
import { Component } from 'intact-react';
|
|
3
4
|
import template from './skeleton.vdt';
|
|
5
|
+
import { useConfigContext } from '../config';
|
|
4
6
|
var typeDefs = {
|
|
5
7
|
loading: Boolean,
|
|
6
8
|
animated: Boolean,
|
|
@@ -20,7 +22,17 @@ export var Skeleton = /*#__PURE__*/function (_Component) {
|
|
|
20
22
|
_inheritsLoose(Skeleton, _Component);
|
|
21
23
|
|
|
22
24
|
function Skeleton() {
|
|
23
|
-
|
|
25
|
+
var _context;
|
|
26
|
+
|
|
27
|
+
var _this;
|
|
28
|
+
|
|
29
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
30
|
+
args[_key] = arguments[_key];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
34
|
+
_this.config = useConfigContext();
|
|
35
|
+
return _this;
|
|
24
36
|
}
|
|
25
37
|
|
|
26
38
|
return Skeleton;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _fillInstanceProperty from "@babel/runtime-corejs3/core-js/instance/fill";
|
|
2
2
|
import { map as _$ma, createUnknownComponentVNode as _$cc, createElementVNode as _$ce, className as _$cn } from 'intact-react';
|
|
3
3
|
import { SkeletonItem } from './item';
|
|
4
|
-
import { makeStyles, kls } from './
|
|
4
|
+
import { makeStyles, kls } from './styles';
|
|
5
5
|
var _$tmp0 = {
|
|
6
6
|
'type': 'avator'
|
|
7
7
|
};
|
|
@@ -20,6 +20,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
20
20
|
loading = _this$get.loading,
|
|
21
21
|
size = _this$get.size;
|
|
22
22
|
|
|
23
|
+
var k = this.config.k;
|
|
23
24
|
var targetRows = typeof rows !== 'number' ? 3 : rows < 1 ? 1 : parseInt(rows);
|
|
24
25
|
|
|
25
26
|
var skeletonList = _fillInstanceProperty(_context = Array(targetRows + 2)).call(_context);
|
|
@@ -28,10 +29,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
28
29
|
return _$cc(SkeletonItem);
|
|
29
30
|
}, $this);
|
|
30
31
|
|
|
31
|
-
var classNameObj = (_classNameObj = {
|
|
32
|
-
|
|
33
|
-
'k-animated': animated
|
|
34
|
-
}, _classNameObj[makeStyles(size)] = true, _classNameObj);
|
|
35
|
-
return loading ? _$ce(2, 'div', children ? _$ce(2, 'div', children, 0) : avator ? _$ce(2, 'div', [_$cc(SkeletonItem, _$tmp0), _$ce(2, 'div', skeletonItems, 0, 'k-skeleton-items')], 4, _$cn(kls('avator-box'))) : _$ce(2, 'div', skeletonItems, 0, 'k-skeleton-items'), 2, _$cn(classNameObj)) : undefined;
|
|
32
|
+
var classNameObj = (_classNameObj = {}, _classNameObj[k + "-skeleton"] = true, _classNameObj[k + "-animated"] = animated, _classNameObj[makeStyles(k, size)] = true, _classNameObj);
|
|
33
|
+
return loading ? _$ce(2, 'div', children ? _$ce(2, 'div', children, 0) : avator ? _$ce(2, 'div', [_$cc(SkeletonItem, _$tmp0), _$ce(2, 'div', skeletonItems, 0, _$cn(k + "-skeleton-items"))], 4, _$cn(kls('avator-box', k))) : _$ce(2, 'div', skeletonItems, 0, _$cn(k + "-skeleton-items")), 2, _$cn(classNameObj)) : undefined;
|
|
36
34
|
}
|
|
37
35
|
;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import '../../styles/global';
|
|
2
|
+
export declare const kls: (className: string, k: string) => string;
|
|
3
|
+
declare type ItemSize = 'default' | 'large' | 'small' | 'mini';
|
|
4
|
+
export declare function makeStyles(k: string, size: ItemSize): string;
|
|
5
|
+
export declare function makeItemStyles(k: string): string;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
|
+
|
|
3
|
+
import { deepDefaults } from '../../styles/utils';
|
|
4
|
+
import { theme, setDefault } from '../../styles/theme';
|
|
5
|
+
import { css, keyframes } from '@emotion/css';
|
|
6
|
+
import '../../styles/global';
|
|
7
|
+
export var kls = function kls(className, k) {
|
|
8
|
+
return k + "-skeleton-" + className;
|
|
9
|
+
};
|
|
10
|
+
var defaults = {
|
|
11
|
+
item: {
|
|
12
|
+
bgColor: '#dcdde0'
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
var skeleton;
|
|
16
|
+
setDefault(function () {
|
|
17
|
+
skeleton = deepDefaults(theme, {
|
|
18
|
+
skeleton: defaults
|
|
19
|
+
}).skeleton;
|
|
20
|
+
});
|
|
21
|
+
export function makeStyles(k, size) {
|
|
22
|
+
return /*#__PURE__*/css("&.", k, "-animated{.", kls('item', k), "{&>.", k, "-skeleton-item-box{background:linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%);background-size:400% 100%;animation:", skeletonLoading, " 1.4s ease infinite;}}}.", k, "-skeleton-items{.", kls('item', k), ":first-child{.", k, "-skeleton-item-text{width:33%;}}.", kls('item', k), ":last-child{.", k, "-skeleton-item-text{width:61%;}}}.", kls('avator-box', k), "{display:flex;&>div:last-child{flex-grow:1;padding-left:20px;}}.", k, "-skeleton-item-button,.", k, "-skeleton-item-input{height:", theme[size].height, ";}");
|
|
23
|
+
}
|
|
24
|
+
var skeletonLoading = /*#__PURE__*/keyframes(process.env.NODE_ENV === "production" ? {
|
|
25
|
+
name: "1jmexzm",
|
|
26
|
+
styles: "0%{background-position:100% 50%;}to{background-position:0 50%;}"
|
|
27
|
+
} : {
|
|
28
|
+
name: "1jmexzm",
|
|
29
|
+
styles: "0%{background-position:100% 50%;}to{background-position:0 50%;}",
|
|
30
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
31
|
+
});
|
|
32
|
+
export function makeItemStyles(k) {
|
|
33
|
+
var skeletonItem = skeleton.item;
|
|
34
|
+
return /*#__PURE__*/css("&>div{background:", skeletonItem.bgColor, ";}.", k, "-skeleton-item-text{width:100%;height:16px;border-radius:4px;margin-top:16px;}.", k, "-skeleton-item-avator{width:40px;height:40px;border-radius:50%;}.", k, "-skeleton-item-image{display:flex;justify-content:center;align-items:center;width:200px;height:200px;&>svg{width:48px;height:48px;fill:", skeletonItem.bgColor, ";}}.", k, "-skeleton-item-button{width:64px;background:", skeletonItem.bgColor, ";}.", k, "-skeleton-item-input{width:160px;background:", skeletonItem.bgColor, ";}");
|
|
35
|
+
}
|
|
@@ -11,6 +11,7 @@ import { useClick } from './useClick';
|
|
|
11
11
|
import { usePoints } from './usePoints';
|
|
12
12
|
import { useMarks } from './useMarks';
|
|
13
13
|
import { useTooltip } from './useTooltip';
|
|
14
|
+
import { useConfigContext } from '../config';
|
|
14
15
|
var typeDefs = {
|
|
15
16
|
max: Number,
|
|
16
17
|
min: Number,
|
|
@@ -73,6 +74,7 @@ export var Slider = /*#__PURE__*/function (_Component) {
|
|
|
73
74
|
_this.click = useClick(_this.draggable.getSlidingValue, _this.value.fixValue, _this.value.showValue, _this.value.setValue);
|
|
74
75
|
_this.points = usePoints(_this.value.showValue, _this.step);
|
|
75
76
|
_this.marks = useMarks();
|
|
77
|
+
_this.config = useConfigContext();
|
|
76
78
|
return _this;
|
|
77
79
|
}
|
|
78
80
|
|