@king-design/react 3.0.0-beta.1 → 3.0.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 +293 -286
- package/components/badge/styles.js +1 -1
- package/components/button/group.d.ts +1 -0
- package/components/button/group.js +2 -1
- package/components/button/group.vdt.js +4 -2
- package/components/button/index.vdt.js +1 -1
- package/components/button/styles.d.ts +1 -1
- package/components/button/styles.js +14 -9
- package/components/carousel/index.vdt.js +2 -2
- package/components/cascader/index.vdt.js +1 -1
- package/components/checkbox/styles.js +4 -8
- package/components/collapse/item.vdt.js +1 -1
- package/components/collapse/styles.js +2 -2
- package/components/copy/index.vdt.js +1 -1
- package/components/datepicker/calendar.vdt.js +6 -6
- package/components/datepicker/index.spec.js +170 -152
- package/components/datepicker/styles.js +1 -1
- package/components/datepicker/useValue.d.ts +3 -3
- package/components/datepicker/useValue.js +38 -9
- package/components/dialog/styles.js +1 -1
- package/components/dropdown/dropdown.js +2 -1
- package/components/form/index.spec.js +45 -0
- package/components/form/styles.js +1 -1
- package/components/icon/index.vdt.js +3 -2
- package/components/icon/styles.js +1 -1
- package/components/input/index.d.ts +3 -1
- package/components/input/index.js +4 -1
- package/components/input/index.vdt.js +21 -10
- package/components/input/search.vdt.js +2 -4
- package/components/input/styles.js +13 -6
- package/components/input/useFocus.d.ts +4 -0
- package/components/input/useFocus.js +21 -0
- package/components/menu/item.vdt.js +4 -1
- package/components/message/message.js +1 -1
- package/components/pagination/index.vdt.js +2 -2
- package/components/pagination/styles.js +2 -5
- package/components/popover/styles.js +1 -1
- package/components/progress/index.vdt.js +1 -1
- package/components/radio/styles.js +1 -1
- package/components/scrollSelect/styles.js +1 -1
- package/components/select/base.vdt.js +40 -20
- package/components/select/index.spec.js +23 -11
- package/components/select/menu.vdt.js +5 -5
- package/components/select/option.vdt.js +2 -1
- package/components/select/styles.js +2 -2
- package/components/spinner/index.vdt.js +4 -4
- package/components/spinner/styles.js +2 -2
- package/components/steps/step.vdt.js +2 -2
- package/components/steps/styles.js +6 -2
- package/components/switch/styles.js +10 -2
- package/components/table/cell.vdt.js +1 -1
- package/components/table/column.vdt.js +42 -24
- package/components/table/index.spec.js +37 -6
- package/components/table/styles.js +15 -8
- package/components/table/table.js +2 -1
- package/components/table/useGroup.d.ts +9 -3
- package/components/table/useGroup.js +46 -37
- package/components/tabs/index.vdt.js +7 -2
- package/components/tag/styles.js +1 -1
- package/components/tag/tags.vdt.js +14 -2
- package/components/tag/useNowrap.js +1 -1
- package/components/tip/styles.js +1 -1
- package/components/tooltip/index.spec.js +57 -0
- package/components/tooltip/tooltip.js +5 -1
- package/components/transfer/index.vdt.js +14 -3
- package/components/types.d.ts +1 -0
- package/components/upload/index.vdt.js +4 -4
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/package.json +1 -1
- package/styles/fonts/iconfont.eot +0 -0
- package/styles/fonts/iconfont.js +1 -1
- package/styles/fonts/iconfont.svg +36 -36
- package/styles/fonts/iconfont.ttf +0 -0
- package/styles/fonts/iconfont.woff +0 -0
- package/styles/global.js +1 -1
- package/styles/theme.js +1 -1
- package/components/select/useNowrap.d.ts +0 -3
- package/components/select/useNowrap.js +0 -19
|
@@ -83,7 +83,7 @@ export function makePanelStyles() {
|
|
|
83
83
|
return /*#__PURE__*/css("display:flex;.k-datepicker-shortcuts{width:", datepicker.shortcuts.width, ";padding:", datepicker.shortcuts.padding, ";border-right:", datepicker.border, ";}.k-datepicker-shortcut{height:", datepicker.shortcuts.shortcut.height, ";line-height:", datepicker.shortcuts.shortcut.height, ";padding:", datepicker.shortcuts.shortcut.padding, ";cursor:pointer;&:hover{background:", datepicker.shortcuts.shortcut.hoverBgcolor, ";}}.k-datepicker-calendars{display:flex;}.k-datepicker-calendar-wrapper{&:nth-child(2){border-left:", datepicker.border, ";}.k-tabs{border:none;.k-tabs-wrapper{float:none;}.k-tab{width:50%;}}}.k-datepicker-footer{border-top:", datepicker.border, ";padding:", datepicker.footer.padding, ";text-align:right;}");
|
|
84
84
|
}
|
|
85
85
|
export function makeCalendarStyles() {
|
|
86
|
-
return /*#__PURE__*/css("padding:", datepicker.padding, ";width:", datepicker.width, ";position:relative;.k-datepicker-month{display:flex;padding:", datepicker.month.padding, ";}.k-month-values{flex:1;font-size:14px;text-align:center;cursor:pointer;overflow:hidden;position:relative;}.k-month-value{margin:0 ", datepicker.month.valueGap, ";line-height:", theme.small.height, ";&:hover{color:", theme.color.primary, ";}},.k-weekdays{display:flex;border-bottom:", datepicker.border, ";padding:", datepicker.weekday.padding, ";}.k-weekday{flex:1;text-align:center;}.k-calendar-item{text-align:center;margin:", datepicker.item.gutter, ";aspect-ratio:1;display:flex;align-items:center;cursor:pointer;position:relative;.k-value{border-radius:", datepicker.item.borderRadius, ";}&.k-hover
|
|
86
|
+
return /*#__PURE__*/css("padding:", datepicker.padding, ";width:", datepicker.width, ";position:relative;.k-datepicker-month{display:flex;padding:", datepicker.month.padding, ";}.k-prev .k-icon,.k-next .k-icon{margin:0 -5px!important;}.k-month-values{flex:1;font-size:14px;text-align:center;cursor:pointer;overflow:hidden;position:relative;}.k-month-value{margin:0 ", datepicker.month.valueGap, ";line-height:", theme.small.height, ";&:hover{color:", theme.color.primary, ";}},.k-weekdays{display:flex;border-bottom:", datepicker.border, ";padding:", datepicker.weekday.padding, ";}.k-weekday{flex:1;text-align:center;}.k-calendar-item{text-align:center;margin:", datepicker.item.gutter, ";aspect-ratio:1;display:flex;align-items:center;cursor:pointer;position:relative;border-radius:", datepicker.item.borderRadius, ";.k-value{border-radius:", datepicker.item.borderRadius, ";}&.k-hover{background:", datepicker.item.hoverBgColor, ";}&.k-exceed{color:", datepicker.item.exceedColor, ";}&.k-today .k-value{border:", datepicker.item.todayBorder, ";}&.k-active{background:", datepicker.item.active.bgColor, ";color:", datepicker.item.active.color, ";&.k-today .k-value{border-color:", datepicker.item.active.todayBorderColor, ";}}&.k-disabled{color:", datepicker.item.disabled.color, ";cursor:not-allowed;background:", datepicker.item.disabled.hoverBgColor, ";}&.k-in-range:after{content:'';display:block;position:absolute;box-sizing:content-box;background:", datepicker.item.range.bgColor, ";width:100%;height:100%;left:-", datepicker.item.gutter, ";padding:0 ", datepicker.item.gutter, ";z-index:-1;}.k-value{flex:1;display:flex;align-items:center;justify-content:center;height:100%;}}.k-days{display:grid;grid-template-columns:repeat(7, 1fr);}.k-years{display:grid;grid-template-columns:repeat(4, 1fr);}");
|
|
87
87
|
}
|
|
88
88
|
export function makeTimeStyles() {
|
|
89
89
|
return /*#__PURE__*/css("display:flex;padding:", datepicker.padding, ";width:", datepicker.width, ";position:relative;.k-scroll-select{flex:1;height:305px;}");
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { StateValueItem, DayjsValue } from './basepicker';
|
|
2
|
-
import { Dayjs } from 'dayjs';
|
|
2
|
+
import dayjs, { Dayjs } from 'dayjs';
|
|
3
3
|
import type { useFormats } from './useFormats';
|
|
4
4
|
import type { useDisabled } from './useDisabled';
|
|
5
5
|
import { PanelFlags, usePanel } from './usePanel';
|
|
6
6
|
export declare function useValue(formats: ReturnType<typeof useFormats>, disabled: ReturnType<typeof useDisabled>, panel: ReturnType<typeof usePanel>): {
|
|
7
7
|
format: () => string | string[];
|
|
8
8
|
onConfirm: () => void;
|
|
9
|
-
onChangeTime: (date: Dayjs, flag: PanelFlags) => void;
|
|
10
|
-
getTimeValue: (flag: PanelFlags) => Dayjs | null | undefined;
|
|
9
|
+
onChangeTime: (date: dayjs.Dayjs, flag: PanelFlags) => void;
|
|
10
|
+
getTimeValue: (flag: PanelFlags) => dayjs.Dayjs | null | undefined;
|
|
11
11
|
convertToDayjs: (v: import("./basepicker").Value | [import("./basepicker").Value, import("./basepicker").Value] | import("./basepicker").Value[] | [import("./basepicker").Value, import("./basepicker").Value][] | null | undefined) => DayjsValue;
|
|
12
12
|
getDayjsValue: () => DayjsValue;
|
|
13
13
|
value: import("../../hooks/useState").State<import("./basepicker").StateValue>;
|
|
@@ -6,7 +6,9 @@ import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/slic
|
|
|
6
6
|
import _sortInstanceProperty from "@babel/runtime-corejs3/core-js/instance/sort";
|
|
7
7
|
import { useInstance } from 'intact-react';
|
|
8
8
|
import { useValue as useValueBase } from './basepicker';
|
|
9
|
+
import dayjs from 'dayjs';
|
|
9
10
|
import { last } from '../utils';
|
|
11
|
+
import { endTime } from './helpers';
|
|
10
12
|
import { PanelTypes, PanelFlags } from './usePanel';
|
|
11
13
|
export function useValue(formats, disabled, panel) {
|
|
12
14
|
var instance = useInstance();
|
|
@@ -41,21 +43,21 @@ export function useValue(formats, disabled, panel) {
|
|
|
41
43
|
type = _instance$get3.type,
|
|
42
44
|
range = _instance$get3.range;
|
|
43
45
|
|
|
44
|
-
var _value
|
|
45
|
-
|
|
46
|
-
var minDate = disabled.minDate.value;
|
|
47
|
-
|
|
48
|
-
if (minDate && _value.isBefore(minDate)) {
|
|
49
|
-
_value = minDate;
|
|
50
|
-
}
|
|
46
|
+
var _value;
|
|
51
47
|
|
|
52
48
|
if (range) {
|
|
53
49
|
var oldValue = last(value.value);
|
|
54
50
|
|
|
55
51
|
if (!oldValue || oldValue.length === 2) {
|
|
56
|
-
|
|
52
|
+
/**
|
|
53
|
+
* if we select the first value or re-select the value
|
|
54
|
+
* no matter what the flag is, we should set flag to start panel
|
|
55
|
+
* #877
|
|
56
|
+
*/
|
|
57
|
+
flag = PanelFlags.Start;
|
|
58
|
+
_value = [fixDatetimeWithMinDate(v)];
|
|
57
59
|
} else {
|
|
58
|
-
_value = [oldValue[0], v];
|
|
60
|
+
_value = [oldValue[0], fixDatetimeWithMaxDate(v)];
|
|
59
61
|
|
|
60
62
|
_sortInstanceProperty(_value).call(_value, function (a, b) {
|
|
61
63
|
return a.isAfter(b) ? 1 : -1;
|
|
@@ -63,6 +65,8 @@ export function useValue(formats, disabled, panel) {
|
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
instance.trigger('selecting', _value);
|
|
68
|
+
} else {
|
|
69
|
+
_value = fixDatetimeWithMinDate(v);
|
|
66
70
|
}
|
|
67
71
|
|
|
68
72
|
setValue(_value, false);
|
|
@@ -74,6 +78,31 @@ export function useValue(formats, disabled, panel) {
|
|
|
74
78
|
}
|
|
75
79
|
}
|
|
76
80
|
|
|
81
|
+
function fixDatetimeWithMinDate(v) {
|
|
82
|
+
// the datetime must be greater than minDate, #406
|
|
83
|
+
var minDate = disabled.minDate.value;
|
|
84
|
+
|
|
85
|
+
if (minDate && v.isBefore(minDate)) {
|
|
86
|
+
return minDate;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return v;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function fixDatetimeWithMaxDate(v) {
|
|
93
|
+
// the tiem of end datetime should be set to 23:59:59, #878
|
|
94
|
+
var maxDate = disabled.maxDate.value;
|
|
95
|
+
var date = v.toDate();
|
|
96
|
+
endTime(date);
|
|
97
|
+
v = dayjs(date);
|
|
98
|
+
|
|
99
|
+
if (maxDate && v.isAfter(maxDate)) {
|
|
100
|
+
return maxDate;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return v;
|
|
104
|
+
}
|
|
105
|
+
|
|
77
106
|
return _extends({
|
|
78
107
|
value: value,
|
|
79
108
|
setValue: setValue,
|
|
@@ -12,6 +12,7 @@ import { mount, unmount, dispatchEvent, wait } from '../../test/utils';
|
|
|
12
12
|
import { Component } from 'intact-react';
|
|
13
13
|
import { Form, FormItem } from './';
|
|
14
14
|
import { Input } from '../input';
|
|
15
|
+
import { Select } from '../select';
|
|
15
16
|
|
|
16
17
|
RemoteDemo.prototype.validateUserName = function (value) {
|
|
17
18
|
// mock api
|
|
@@ -1317,4 +1318,48 @@ describe('Form', function () {
|
|
|
1317
1318
|
}
|
|
1318
1319
|
}, _callee7);
|
|
1319
1320
|
})));
|
|
1321
|
+
it('should not validate when select is disabled on init', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
|
|
1322
|
+
var Demo, _mount8, instance, element;
|
|
1323
|
+
|
|
1324
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context11) {
|
|
1325
|
+
while (1) {
|
|
1326
|
+
switch (_context11.prev = _context11.next) {
|
|
1327
|
+
case 0:
|
|
1328
|
+
Demo = /*#__PURE__*/function (_Component3) {
|
|
1329
|
+
_inheritsLoose(Demo, _Component3);
|
|
1330
|
+
|
|
1331
|
+
function Demo() {
|
|
1332
|
+
var _context10;
|
|
1333
|
+
|
|
1334
|
+
var _this3;
|
|
1335
|
+
|
|
1336
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
1337
|
+
args[_key3] = arguments[_key3];
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
_this3 = _Component3.call.apply(_Component3, _concatInstanceProperty(_context10 = [this]).call(_context10, args)) || this;
|
|
1341
|
+
_this3.Form = Form;
|
|
1342
|
+
_this3.FormItem = FormItem;
|
|
1343
|
+
_this3.Select = Select;
|
|
1344
|
+
return _this3;
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
return Demo;
|
|
1348
|
+
}(Component);
|
|
1349
|
+
|
|
1350
|
+
Demo.template = "\n const {Form, FormItem, Select} = this;\n <Form ref=\"form\">\n <FormItem rules={{required: true}}>\n <Select disabled />\n </FormItem>\n </Form>\n ";
|
|
1351
|
+
_mount8 = mount(Demo), instance = _mount8[0], element = _mount8[1];
|
|
1352
|
+
_context11.next = 5;
|
|
1353
|
+
return wait(500);
|
|
1354
|
+
|
|
1355
|
+
case 5:
|
|
1356
|
+
expect(element.querySelector('.k-form-error')).to.be.null;
|
|
1357
|
+
|
|
1358
|
+
case 6:
|
|
1359
|
+
case "end":
|
|
1360
|
+
return _context11.stop();
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
}, _callee8);
|
|
1364
|
+
})));
|
|
1320
1365
|
});
|
|
@@ -50,7 +50,7 @@ setDefault(function () {
|
|
|
50
50
|
}).form;
|
|
51
51
|
});
|
|
52
52
|
export function makeItemStyles() {
|
|
53
|
-
return /*#__PURE__*/css("display:flex;position:relative;&:not(:last-of-type){margin-bottom:", form.item.gap, ";}&.k-fluid>.k-form-content{flex:1;}.k-form-label{display:flex;align-items:center;justify-content:", form.item.labelTextAlign === 'right' ? 'end' : 'start', ";width:", form.item.labelWidth, ";padding-right:", form.item.labelGap, ";max-height:", form.item.labelHeight, ";}.k-form-star{color:", form.item.starColor, ";margin-right:", form.item.starGap, ";}.k-form-content{position:relative;}.k-form-error{position:absolute;color:", form.item.errorColor, ";font-size:", form.item.errorFontSize, ";left:0;right:0;display:flex;align-items:center;&.k-ellipsis{.k-form-error-more{display:inline-block;}}}.k-form-error-more{line-height:", form.item.errorFontSize, ";display:none;}&.k-invalid{.k-input{.k-input-
|
|
53
|
+
return /*#__PURE__*/css("display:flex;position:relative;&:not(:last-of-type){margin-bottom:", form.item.gap, ";}&.k-fluid>.k-form-content{flex:1;}.k-form-label{display:flex;align-items:center;justify-content:", form.item.labelTextAlign === 'right' ? 'end' : 'start', ";width:", form.item.labelWidth, ";padding-right:", form.item.labelGap, ";max-height:", form.item.labelHeight, ";}.k-form-star{color:", form.item.starColor, ";margin-right:", form.item.starGap, ";}.k-form-content{position:relative;}.k-form-error{position:absolute;color:", form.item.errorColor, ";font-size:", form.item.errorFontSize, ";left:0;right:0;display:flex;align-items:center;&.k-ellipsis{.k-form-error-more{display:inline-block;}}}.k-form-error-more{line-height:", form.item.errorFontSize, ";display:none;}&.k-invalid{.k-input{.k-input-wrapper{border:", form.item.invalidBorder, ";position:relative;z-index:1;}}.k-select,.k-checkbox-wrapper,.k-radio-wrapper{border:", form.item.invalidBorder, "!important;}.k-select .k-input .k-input-wrapper{border:none;}}.k-form-append{padding:", form.item.appendPadding, ";vertical-align:middle;}");
|
|
54
54
|
}
|
|
55
55
|
export function makeFormStyles() {
|
|
56
56
|
var _context;
|
|
@@ -44,8 +44,9 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
return _$cv('i', _extends({
|
|
47
|
-
'className': _$cn(classNameObj)
|
|
47
|
+
'className': _$cn(classNameObj)
|
|
48
|
+
}, getRestProps(this), {
|
|
48
49
|
'style': addStyle(style, _style)
|
|
49
|
-
}
|
|
50
|
+
}), children);
|
|
50
51
|
}
|
|
51
52
|
;
|
|
@@ -41,5 +41,5 @@ export default function makeStyles(color) {
|
|
|
41
41
|
}), " ", _mapInstanceProperty(colors).call(colors, function (color) {
|
|
42
42
|
var _color = theme.color[color];
|
|
43
43
|
return /*#__PURE__*/css("&.k-", color, "{color:", _color, ";&.k-hoverable:hover{color:", palette(_color, -2), ";}}");
|
|
44
|
-
}), " &.k-rotate:before{animation:", rotate, " 1s infinite linear;}&:before{
|
|
44
|
+
}), " &.k-rotate:before{animation:", rotate, " 1s infinite linear;}&:before{font-size:inherit;}&.k-hoverable{cursor:pointer;transition:color ", icon.transition, ";", color && "\n &:hover {\n color: " + palette(color, -2) + " !important;\n }\n ", ";&:hover{color:", theme.color.primary, ";}}&.k-disabled{cursor:not-allowed;color:", icon.disabledColor, "!important;}");
|
|
45
45
|
}
|
|
@@ -2,7 +2,7 @@ import { Component, TypeDefs } from 'intact-react';
|
|
|
2
2
|
import { Sizes } from '../../styles/utils';
|
|
3
3
|
import { CommonInputHTMLAttributes, Events } from '../types';
|
|
4
4
|
export * from './search';
|
|
5
|
-
export declare type HTMLInputTypes = 'textarea' | 'button' | 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week' | (string & {});
|
|
5
|
+
export declare type HTMLInputTypes = 'textarea' | 'button' | 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week' | 'maxlength' | (string & {});
|
|
6
6
|
interface InputHTMLAttributes extends CommonInputHTMLAttributes {
|
|
7
7
|
pattern?: string;
|
|
8
8
|
dirname?: string;
|
|
@@ -31,6 +31,7 @@ export interface InputProps<V extends Value = Value> extends InputHTMLAttributes
|
|
|
31
31
|
resize?: 'none' | 'vertical' | 'horizontal' | 'both';
|
|
32
32
|
showPassword?: boolean;
|
|
33
33
|
flat?: boolean;
|
|
34
|
+
showCount?: boolean;
|
|
34
35
|
}
|
|
35
36
|
export declare type AutoRows = {
|
|
36
37
|
min?: number;
|
|
@@ -58,6 +59,7 @@ export declare class Input<V extends Value = Value> extends Component<InputProps
|
|
|
58
59
|
private frozen;
|
|
59
60
|
private autoRows;
|
|
60
61
|
private showPassword;
|
|
62
|
+
private focusHook;
|
|
61
63
|
focus(): void;
|
|
62
64
|
blur(): void;
|
|
63
65
|
select(): void;
|
|
@@ -9,6 +9,7 @@ import { useAutoWidth } from './useAutoWidth';
|
|
|
9
9
|
import { useFrozen } from './useFrozen';
|
|
10
10
|
import { useAutoRows } from './useAutoRows';
|
|
11
11
|
import { useShowPassword } from './useShowPassword';
|
|
12
|
+
import { useFocus } from './useFocus';
|
|
12
13
|
export * from './search';
|
|
13
14
|
var typeDefs = {
|
|
14
15
|
type: String,
|
|
@@ -29,7 +30,8 @@ var typeDefs = {
|
|
|
29
30
|
waveDisabled: Boolean,
|
|
30
31
|
resize: ['none', 'vertical', 'horizontal', 'both'],
|
|
31
32
|
showPassword: Boolean,
|
|
32
|
-
flat: Boolean
|
|
33
|
+
flat: Boolean,
|
|
34
|
+
showCount: Boolean
|
|
33
35
|
};
|
|
34
36
|
|
|
35
37
|
var defaults = function defaults() {
|
|
@@ -65,6 +67,7 @@ export var Input = /*#__PURE__*/function (_Component) {
|
|
|
65
67
|
_this.frozen = useFrozen();
|
|
66
68
|
_this.autoRows = useAutoRows(_this.inputRef);
|
|
67
69
|
_this.showPassword = useShowPassword();
|
|
70
|
+
_this.focusHook = useFocus();
|
|
68
71
|
return _this;
|
|
69
72
|
}
|
|
70
73
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs3/helpers/objectWithoutPropertiesLoose";
|
|
3
|
-
var _excluded = ["className", "style", "type", "value", "defaultValue", "placeholder", "clearable", "disabled", "size", "rows", "autoWidth", "fluid", "width", "stackClearIcon", "frozenOnInput", "readonly", "inline", "waveDisabled", "resize", "flat", "ev-click", "ev-mounseenter", "ev-mouseleave"];
|
|
3
|
+
var _excluded = ["className", "style", "type", "value", "defaultValue", "placeholder", "clearable", "disabled", "size", "rows", "autoWidth", "fluid", "width", "stackClearIcon", "frozenOnInput", "readonly", "inline", "waveDisabled", "resize", "flat", "showCount", "maxlength", "ev-click", "ev-mounseenter", "ev-mouseleave"];
|
|
4
4
|
import _flatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/flat";
|
|
5
|
-
import { createElementVNode as _$ce, className as _$cn, createUnknownComponentVNode as _$cc, noop as _$no, createVNode as _$cv } from 'intact-react';
|
|
5
|
+
import { createElementVNode as _$ce, className as _$cn, createUnknownComponentVNode as _$cc, noop as _$no, createVNode as _$cv, createTextVNode as _$ct } from 'intact-react';
|
|
6
6
|
import { Icon } from '../icon';
|
|
7
|
-
import { addStyle, isTextBlock, getRestProps } from '../utils';
|
|
7
|
+
import { addStyle, isTextBlock, getRestProps, stopPropagation } from '../utils';
|
|
8
8
|
import { makeStyles } from './styles';
|
|
9
9
|
import { noop, isNullOrUndefined, isStringOrNumber } from 'intact-shared';
|
|
10
10
|
import { Wave } from '../wave';
|
|
@@ -42,6 +42,8 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
42
42
|
waveDisabled = _this$get.waveDisabled,
|
|
43
43
|
resize = _this$get.resize,
|
|
44
44
|
flat = _flatInstanceProperty(_this$get),
|
|
45
|
+
showCount = _this$get.showCount,
|
|
46
|
+
maxlength = _this$get.maxlength,
|
|
45
47
|
click = _this$get['ev-click'],
|
|
46
48
|
mouseenter = _this$get['ev-mounseenter'],
|
|
47
49
|
mouseleave = _this$get['ev-mouseleave'],
|
|
@@ -53,10 +55,13 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
53
55
|
startInput = _this$frozen.startInput,
|
|
54
56
|
onInput = _this$frozen.onInput,
|
|
55
57
|
endInput = _this$frozen.endInput;
|
|
58
|
+
var _this$focusHook = this.focusHook,
|
|
59
|
+
isFocus = _this$focusHook.isFocus,
|
|
60
|
+
focusInputOnClick = _this$focusHook.focusInputOnClick;
|
|
56
61
|
var isNotAutoRows = isStringOrNumber(rows) && rows !== 'auto';
|
|
57
62
|
var classNameObj = (_classNameObj = {
|
|
58
63
|
'k-input': true
|
|
59
|
-
}, _classNameObj["k-" + size] = size !== 'default', _classNameObj['k-group'] = $blocks.prepend || $blocks.append, _classNameObj['k-disabled'] = disabled, _classNameObj['k-
|
|
64
|
+
}, _classNameObj["k-" + size] = size !== 'default', _classNameObj['k-group'] = $blocks.prepend || $blocks.append, _classNameObj['k-disabled'] = disabled, _classNameObj['k-clearable'] = clearable, _classNameObj['k-auto-width'] = autoWidth, _classNameObj['k-fluid'] = fluid, _classNameObj['k-stack-clear'] = stackClearIcon, _classNameObj['k-inline'] = inline, _classNameObj['k-flat'] = flat, _classNameObj['k-type-textarea'] = type === 'textarea', _classNameObj['k-focus'] = isFocus.value, _classNameObj["k-resize-" + resize] = type === 'textarea' && isNotAutoRows, _classNameObj["k-resize-none"] = type === 'textarea' && !isNotAutoRows, _classNameObj[className] = className, _classNameObj[makeStyles()] = true, _classNameObj);
|
|
60
65
|
var _this$showPassword = this.showPassword,
|
|
61
66
|
isShowPassword = _this$showPassword.isShow,
|
|
62
67
|
toggleShowPassword = _this$showPassword.toggleShow,
|
|
@@ -78,6 +83,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
78
83
|
readOnly: readonly,
|
|
79
84
|
placeholder: placeholder,
|
|
80
85
|
disabled: disabled,
|
|
86
|
+
maxLength: maxlength,
|
|
81
87
|
ref: this.inputRef,
|
|
82
88
|
style: autoWidth && fakeWidth ? {
|
|
83
89
|
width: fakeWidth + 'px'
|
|
@@ -98,6 +104,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
98
104
|
'children': function children(isInvalid) {
|
|
99
105
|
return _$cc(Wave, {
|
|
100
106
|
'disabled': waveDisabled || disabled || isInvalid,
|
|
107
|
+
'inset': '-2px',
|
|
101
108
|
'children': _$ce(2, 'div', [$blocks.prefix ? _$ce(2, 'div', (_$blocks['prefix'] = function ($super) {
|
|
102
109
|
return null;
|
|
103
110
|
}, __$blocks['prefix'] = function ($super, data) {
|
|
@@ -117,22 +124,22 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
117
124
|
'style': height.value ? addStyle(inputProps.style, {
|
|
118
125
|
height: height.value + 'px'
|
|
119
126
|
}) : inputProps.style
|
|
120
|
-
})), $blocks.suffix || clearable && !disabled || showPasswordIcon.value ? _$ce(2, 'div', [showPasswordIcon.value ? [_$cc(Icon, {
|
|
127
|
+
})), $blocks.suffix || clearable && !disabled || showPasswordIcon.value || showCount ? _$ce(2, 'div', [showPasswordIcon.value ? [_$cc(Icon, {
|
|
121
128
|
'hoverable': true,
|
|
122
129
|
'className': _$cn({
|
|
123
130
|
"k-input-show-password": true,
|
|
124
|
-
"
|
|
125
|
-
"
|
|
131
|
+
"k-icon-hidden": !isShowPassword.value,
|
|
132
|
+
"k-icon-visible": isShowPassword.value
|
|
126
133
|
}),
|
|
127
134
|
'ev-click': toggleShowPassword
|
|
128
135
|
}), ' '] : undefined, clearable && !disabled ? _$cc(Icon, {
|
|
129
136
|
'className': _$cn({
|
|
130
|
-
"k-input-clear
|
|
137
|
+
"k-input-clear k-icon-error-fill": true,
|
|
131
138
|
"k-input-show": hasValue
|
|
132
139
|
}),
|
|
133
140
|
'ev-click': _this.clear,
|
|
134
141
|
'hoverable': true
|
|
135
|
-
}) : undefined, ' ', (_$blocks['suffix'] = function ($super) {
|
|
142
|
+
}) : undefined, ' ', showCount ? _$ce(2, 'span', [hasValue ? value.length : 0, maxlength ? _$ce(2, 'span', [_$ct(' / '), maxlength], 0) : undefined], 0, 'k-input-count') : undefined, (_$blocks['suffix'] = function ($super) {
|
|
136
143
|
return null;
|
|
137
144
|
}, __$blocks['suffix'] = function ($super, data) {
|
|
138
145
|
var block = $blocks['suffix'];
|
|
@@ -142,7 +149,11 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
142
149
|
};
|
|
143
150
|
|
|
144
151
|
return block ? block.call($this, callBlock, data) : callBlock();
|
|
145
|
-
}, __$blocks['suffix'](_$no))], 0, 'k-input-suffix'
|
|
152
|
+
}, __$blocks['suffix'](_$no))], 0, 'k-input-suffix', {
|
|
153
|
+
'ev-click': stopPropagation
|
|
154
|
+
}) : undefined, autoWidth ? _$ce(2, 'div', _$ce(2, 'span', !hasValue ? placeholder : inputValue, 0, null, null, null, fakeRef), 2, 'k-input-fake') : undefined], 0, 'k-input-wrapper', {
|
|
155
|
+
'ev-click': focusInputOnClick
|
|
156
|
+
})
|
|
146
157
|
});
|
|
147
158
|
}
|
|
148
159
|
}), $blocks.append ? (_children = $blocks.append(noop), _$ce(2, 'div', _children, 0, _$cn({
|
|
@@ -23,10 +23,9 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
23
23
|
size = _this$get.size,
|
|
24
24
|
open = _this$get.open;
|
|
25
25
|
|
|
26
|
-
var isTypeNotDefault = type !== 'default';
|
|
27
26
|
var classNameObj = (_classNameObj = {
|
|
28
27
|
'k-search': true
|
|
29
|
-
}, _classNameObj[className] = className, _classNameObj['k-open'] = open, _classNameObj['k-hide'] = !open, _classNameObj["k-" + type] =
|
|
28
|
+
}, _classNameObj[className] = className, _classNameObj['k-open'] = open, _classNameObj['k-hide'] = !open, _classNameObj["k-" + type] = type, _classNameObj[makeSearchStyles()] = true, _classNameObj);
|
|
30
29
|
return _$cv('form', _extends({}, getRestProps(this), {
|
|
31
30
|
'className': _$cn(classNameObj),
|
|
32
31
|
'ev-submit': this.onSubmit,
|
|
@@ -39,8 +38,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
39
38
|
'ev-$change:value': this.onChangeValue,
|
|
40
39
|
'readonly': !open,
|
|
41
40
|
'size': size,
|
|
42
|
-
'
|
|
43
|
-
'waveDisabled': isTypeNotDefault
|
|
41
|
+
'waveDisabled': type !== 'default'
|
|
44
42
|
}, null, this.inputRef), _$cc(Button, {
|
|
45
43
|
'icon': true,
|
|
46
44
|
'type': 'none',
|
|
@@ -97,6 +97,13 @@ var defaults = deepDefaults({
|
|
|
97
97
|
return theme.color.bg;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
},
|
|
101
|
+
// count
|
|
102
|
+
count: {
|
|
103
|
+
get color() {
|
|
104
|
+
return theme.color.placeholder;
|
|
105
|
+
}
|
|
106
|
+
|
|
100
107
|
}
|
|
101
108
|
}, sizes.reduce(function (memo, size) {
|
|
102
109
|
var styles = theme[size];
|
|
@@ -125,18 +132,18 @@ setDefault(function () {
|
|
|
125
132
|
export function makeStyles() {
|
|
126
133
|
var _context;
|
|
127
134
|
|
|
128
|
-
return /*#__PURE__*/css("display:inline-block;width:", input.width, ";vertical-align:middle;.k-input-wrapper{display:inline-
|
|
135
|
+
return /*#__PURE__*/css("display:inline-block;width:", input.width, ";color:", input.color, ";vertical-align:middle;.k-input-wrapper{display:inline-flex;align-items:center;width:100%;position:relative;border:", input.border, ";background-color:", input.bgColor, ";transition:border ", input.transition, ",background ", input.transition, ",box-shadow ", input.transition, ";border-radius:", input.borderRadius, ";&:hover{border:", input.hoverBorder, ";z-index:1;}}&.k-focus .k-input-wrapper{border:", input.focusBorder, ";z-index:1;}.k-input-inner{flex:1;outline:none;color:inherit;font-size:inherit;border:none;background:transparent;padding:0;width:0;&::placeholder{color:", input.placeholderColor, ";}}&.k-fluid{width:100%;}.k-input-prefix,.k-input-suffix{display:flex;align-items:center;gap:", input.clearIconGap, ";color:", theme.color.lightBlack, ";position:relative;}.k-input-prefix{margin-right:", input.clearIconGap, ";}.k-input-suffix{margin-left:", input.clearIconGap, ";}.k-input-clear{opacity:0;transition:opacity ", input.transition, ";pointer-events:none;color:", input.clearIconColor, ";}&:hover .k-input-clear.k-input-show{opacity:1;pointer-events:all;}.k-input-show-password{color:", input.clearIconColor, ";}&.k-stack-clear{.k-input-clear{position:absolute;z-index:1;right:0;&.k-input-show+*{transition:opacity ", input.transition, ";}}&:hover{.k-input-clear.k-input-show+*{opacity:0;}}}&.k-group{display:inline-flex;.k-input-wrapper{border-radius:0;}.k-input-wrapper:first-child{border-radius:", input.borderRadius, " 0 0 ", input.borderRadius, ";}.k-input-wrapper:last-child{border-radius:0 ", input.borderRadius, " ", input.borderRadius, " 0;}}.k-input-prepend,.k-input-append{display:inline-flex;align-items:center;background-color:", input.groupBgColor, ";border:", input.border, ";white-space:nowrap;.k-btn{margin:-1px;border:none;&.k-none:hover{background:transparent;}}.k-select{margin:-1px;text-align:left;}}.k-input-prepend{&,.k-btn,.k-select{z-index:1;border-radius:", input.borderRadius, " 0 0 ", input.borderRadius, ";}}.k-input-append{&,.k-btn,.k-select{z-index:1;border-radius:0 ", input.borderRadius, " ", input.borderRadius, " 0;}}.k-input-padding{padding:0 ", input.groupPaddingGap, ";}.k-input-prepend{border-right:none;}.k-input-append{border-left:none;}&.k-flat{color:", _flatInstanceProperty(input).color, ";.k-input-wrapper{border:none;background:", _flatInstanceProperty(input).bgColor, ";}}&.k-disabled{color:", input.disabledColor, ";cursor:not-allowed;.k-input-wrapper{border-color:", input.disabledBorderColor, ";background:", input.disabledBgColor, ";}.k-input-inner{cursor:not-allowed;}}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
129
136
|
var styles = input[size];
|
|
130
|
-
var sizeClassName = /*#__PURE__*/css("font-size:", styles.fontSize, ";.k-input-
|
|
137
|
+
var sizeClassName = /*#__PURE__*/css("font-size:", styles.fontSize, ";.k-input-wrapper{height:", styles.height, ";padding:0 ", styles.paddingGap, ";}");
|
|
131
138
|
if (size === 'default') return sizeClassName;
|
|
132
139
|
return /*#__PURE__*/css("&.k-", size, "{", sizeClassName, ";}");
|
|
133
|
-
}), "&.k-inline{.k-input-
|
|
140
|
+
}), "&.k-inline{.k-input-wrapper{height:auto;border:none;border-radius:0;padding:0;}}&.k-type-textarea{.k-input-wrapper{display:inline-block;padding:0;height:auto;}.k-textarea{width:100%;padding:", input.textareaPadding, ";line-height:1.5;vertical-align:top;}.k-input-suffix{margin:0;justify-content:flex-end;}}", _mapInstanceProperty(_context = Input.typeDefs.resize).call(_context, function (type) {
|
|
134
141
|
return /*#__PURE__*/css("&.k-resize-", type, "{.k-textarea{resize:", type, ";}}");
|
|
135
|
-
}), ".k-input-fake{position:absolute;
|
|
142
|
+
}), ".k-input-fake{left:0;top:0;right:0;position:absolute;overflow:hidden;width:100%;visibility:hidden;white-space:nowrap;}&.k-auto-width{width:auto;max-width:100%;}.k-input-count{color:", input.count.color, ";}");
|
|
136
143
|
}
|
|
137
144
|
export function makeSearchStyles() {
|
|
138
|
-
return /*#__PURE__*/css("position:relative;display:inline-block;.k-input{transition:width ", input.transition, ";}.k-btn{position:absolute;top:0;right:0;z-index:1;}.k-input-suffix{margin-right:", input.search.suffixMarginRight, ";}&.k-hide{", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
145
|
+
return /*#__PURE__*/css("position:relative;display:inline-block;.k-input{transition:width ", input.transition, ";}.k-btn{position:absolute;top:0;right:0;z-index:1;}&.k-default .k-btn:hover{background:transparent;}.k-input-suffix{margin-right:", input.search.suffixMarginRight, ";}&.k-hide{", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
139
146
|
if (size == 'default') return;
|
|
140
147
|
return /*#__PURE__*/css(".k-input.k-", size, "{width:", input[size].height, ";}");
|
|
141
|
-
}), ";.k-input{width:", input.default.height, ";}.k-input-inner{padding:0!important;}}&.k-line{.k-input-
|
|
148
|
+
}), ";.k-input{width:", input.default.height, ";}.k-input-inner{padding:0!important;}}&.k-line{.k-input-wrapper{border-width:0;}&.k-open{.k-input-wrapper{border-bottom-width:1px;}.k-btn:hover{background:transparent;}}}");
|
|
142
149
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useInstance } from 'intact-react';
|
|
2
|
+
import { useState } from '../../hooks/useState';
|
|
3
|
+
export function useFocus() {
|
|
4
|
+
var instance = useInstance();
|
|
5
|
+
var isFocus = useState(false);
|
|
6
|
+
instance.on('focus', function () {
|
|
7
|
+
return isFocus.set(true);
|
|
8
|
+
});
|
|
9
|
+
instance.on('blur', function () {
|
|
10
|
+
return isFocus.set(false);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
function focusInputOnClick(e) {
|
|
14
|
+
instance.focus();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
isFocus: isFocus,
|
|
19
|
+
focusInputOnClick: focusInputOnClick
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -11,6 +11,9 @@ import { makeItemStyles, makeTitleStyles } from './styles';
|
|
|
11
11
|
var _$tmp0 = {
|
|
12
12
|
'className': 'k-menu-dot ion-record'
|
|
13
13
|
};
|
|
14
|
+
var _$tmp1 = {
|
|
15
|
+
'className': 'k-menu-arrow k-icon-down'
|
|
16
|
+
};
|
|
14
17
|
export default function ($props, $blocks, $__proto__) {
|
|
15
18
|
var _classNameObj,
|
|
16
19
|
_this = this;
|
|
@@ -56,7 +59,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
56
59
|
var title = function title(children) {
|
|
57
60
|
var _$cn2;
|
|
58
61
|
|
|
59
|
-
return _$ce(2, 'div', [showDot ? _$cc(Icon, _$tmp0) : undefined, _$ce(2, 'div', children, 0, 'k-menu-name'), subMenuVNode ? _$
|
|
62
|
+
return _$ce(2, 'div', [showDot ? _$cc(Icon, _$tmp0) : undefined, _$ce(2, 'div', children, 0, 'k-menu-name'), subMenuVNode ? _$cc(Icon, _$tmp1) : undefined], 0, _$cn((_$cn2 = {
|
|
60
63
|
'k-menu-title': true
|
|
61
64
|
}, _$cn2[makeTitleStyles()] = true, _$cn2)), {
|
|
62
65
|
'ev-click': _this.onClick.bind(_this, subMenuVNode)
|
|
@@ -9,10 +9,10 @@ import { Icon } from '../icon';
|
|
|
9
9
|
import { _$ } from '../../i18n';
|
|
10
10
|
import { makeStyles } from './styles';
|
|
11
11
|
var _$tmp0 = {
|
|
12
|
-
'className': 'k-icon-
|
|
12
|
+
'className': 'k-icon-left'
|
|
13
13
|
};
|
|
14
14
|
var _$tmp1 = {
|
|
15
|
-
'className': 'k-icon-
|
|
15
|
+
'className': 'k-icon-right'
|
|
16
16
|
};
|
|
17
17
|
export default function ($props, $blocks, $__proto__) {
|
|
18
18
|
var _classNameObj;
|
|
@@ -27,11 +27,8 @@ var defaults = deepDefaults({
|
|
|
27
27
|
|
|
28
28
|
get borderRadius() {
|
|
29
29
|
return theme.borderRadius;
|
|
30
|
-
}
|
|
30
|
+
} // get hoverBgColor() { return theme.color.hoverBg }
|
|
31
31
|
|
|
32
|
-
get hoverBgColor() {
|
|
33
|
-
return theme.color.hoverBg;
|
|
34
|
-
}
|
|
35
32
|
|
|
36
33
|
},
|
|
37
34
|
// goto
|
|
@@ -64,7 +61,7 @@ setDefault(function () {
|
|
|
64
61
|
}).pagination;
|
|
65
62
|
});
|
|
66
63
|
export function makeStyles() {
|
|
67
|
-
return /*#__PURE__*/css("font-size:", pagination.fontSize, ";>*{display:inline-block;vertical-align:middle;&:not(:first-child){margin-left:", pagination.gap, ";}}.k-pagination-ellipsis{background-color:transparent;border-color:transparent;}.k-btns{.k-btn{width:auto!important;min-width:", button.height, ";padding:", pagination.btn.padding, ";margin-right:", pagination.btn.gap, ";border-radius:", pagination.btn.borderRadius, "!important;&:last-of-type{margin:0!important;}
|
|
64
|
+
return /*#__PURE__*/css("font-size:", pagination.fontSize, ";>*{display:inline-block;vertical-align:middle;&:not(:first-child){margin-left:", pagination.gap, ";}}.k-pagination-ellipsis{background-color:transparent;border-color:transparent;}.k-btns{.k-btn{width:auto!important;min-width:", button.height, ";padding:", pagination.btn.padding, ";margin-right:", pagination.btn.gap, ";border-radius:", pagination.btn.borderRadius, "!important;&:last-of-type{margin:0!important;}}.k-icon{font-size:18px;}}.k-pagination-goto{.k-input{font-size:inherit;width:", pagination.goto.width, ";margin:", pagination.goto.gap, ";}.k-input-inner{text-align:center;}}.k-select{width:auto;}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
68
65
|
var styles = pagination[size];
|
|
69
66
|
var btnStyles = button[size];
|
|
70
67
|
return /*#__PURE__*/css("&.k-", size, "{font-size:", styles.fontSize, ";.k-btn{margin-right:", styles.btnGap, ";min-width:", btnStyles.height, ";.k-icon{font-size:", styles.iconFontSize, ";}}}");
|
|
@@ -61,5 +61,5 @@ setDefault(function () {
|
|
|
61
61
|
}).radio;
|
|
62
62
|
});
|
|
63
63
|
export function makeStyles() {
|
|
64
|
-
return /*#__PURE__*/css("display:inline-flex;align-items:center;cursor:pointer;vertical-align:middle;.k-radio-wrapper{width:", radio.width, ";height:", radio.width, ";border:1px solid ", radio.borderColor, ";border-radius:50%;transition:all ", radio.transition, ";position:relative;background:", radio.bgColor, ";flex:0 0 auto;&:before{content:\"\";display:block;position:absolute;width:", radio.innerWidth, ";height:", radio.innerWidth, ";top:50%;left:50%;margin-left:calc(-", radio.innerWidth, " / 2);margin-top:calc(-", radio.innerWidth, " / 2);border-radius:50%;background-color:", radio.checkedColor, ";transform:scale(0);transition:all ", radio.transition, ";}&:hover{border:1px solid ", radio.hoverBorderColor, ";}}input{width:100%;height:100%;opacity:0;cursor:pointer;position:absolute;}.k-radio-text{margin-left:", radio.textGap, ";flex:0 1 auto;}&.k-checked{.k-radio-wrapper{border-color:", radio.checkedColor, ";&:before{transform:scale(1);}}}&:focus{outline:none;.k-radio-wrapper{border-color:", radio.checkedColor, ";}}&.k-disabled{color:", radio.disabled.color, ";cursor:not-allowed;.k-radio-wrapper{border-color:", radio.disabled.borderColor, ";background:", radio.disabled.bgColor, ";}input{cursor:not-allowed;}&.k-checked{.k-radio-wrapper{border-color:", radio.disabled.checked.borderColor, ";background:", radio.disabled.checked.bgColor, ";&:before{background:", radio.disabled.checked.innerColor, ";}}}}");
|
|
64
|
+
return /*#__PURE__*/css("display:inline-flex;align-items:center;cursor:pointer;vertical-align:middle;.k-radio-wrapper{width:", radio.width, ";height:", radio.width, ";border:1px solid ", radio.borderColor, ";border-radius:50%;transition:all ", radio.transition, ";position:relative;background:", radio.bgColor, ";flex:0 0 auto;&:before{content:\"\";display:block;position:absolute;width:", radio.innerWidth, ";height:", radio.innerWidth, ";top:50%;left:50%;margin-left:calc(-", radio.innerWidth, " / 2);margin-top:calc(-", radio.innerWidth, " / 2);border-radius:50%;background-color:", radio.checkedColor, ";transform:scale(0);transition:all ", radio.transition, ";}}&:hover{.k-radio-wrapper{border:1px solid ", radio.hoverBorderColor, ";}}input{width:100%;height:100%;opacity:0;cursor:pointer;position:absolute;}.k-radio-text{margin-left:", radio.textGap, ";flex:0 1 auto;}&.k-checked{.k-radio-wrapper{border-color:", radio.checkedColor, ";&:before{transform:scale(1);}}}&:focus{outline:none;.k-radio-wrapper{border-color:", radio.checkedColor, ";}}&.k-disabled{color:", radio.disabled.color, ";cursor:not-allowed;.k-radio-wrapper{border-color:", radio.disabled.borderColor, ";background:", radio.disabled.bgColor, ";}input{cursor:not-allowed;}&.k-checked{.k-radio-wrapper{border-color:", radio.disabled.checked.borderColor, ";background:", radio.disabled.checked.bgColor, ";&:before{background:", radio.disabled.checked.innerColor, ";}}}}");
|
|
65
65
|
}
|