@tiny-design/react 1.4.0 → 1.5.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/es/alert/style/_index.scss +2 -2
- package/es/alert/style/index.css +2 -2
- package/es/auto-complete/style/_index.scss +4 -5
- package/es/auto-complete/style/index.css +4 -5
- package/es/breadcrumb/style/index.css +1 -1
- package/es/breadcrumb/types.d.ts +1 -1
- package/es/button/style/index.css +14 -14
- package/es/calendar/style/_index.scss +9 -9
- package/es/calendar/style/index.css +9 -9
- package/es/card/style/index.css +3 -3
- package/es/cascader/style/_index.scss +9 -9
- package/es/cascader/style/index.css +9 -9
- package/es/checkbox/style/_index.scss +9 -12
- package/es/checkbox/style/index.css +9 -12
- package/es/collapse/style/index.css +3 -3
- package/es/color-picker/style/_index.scss +7 -7
- package/es/color-picker/style/index.css +4 -4
- package/es/date-picker/style/_index.scss +1 -1
- package/es/date-picker/style/index.css +1 -1
- package/es/descriptions/style/_index.scss +5 -6
- package/es/descriptions/style/index.css +6 -6
- package/es/empty/style/_index.scss +1 -1
- package/es/empty/style/index.css +1 -1
- package/es/form/style/_index.scss +5 -6
- package/es/form/style/index.css +4 -4
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/input/style/_index.scss +5 -4
- package/es/input/style/_mixin.scss +1 -1
- package/es/input/style/index.css +21 -20
- package/es/input-number/input-number.js +11 -5
- package/es/input-number/input-number.js.map +1 -1
- package/es/input-number/style/_index.scss +5 -3
- package/es/input-number/style/index.css +13 -11
- package/es/input-otp/style/_index.scss +1 -1
- package/es/input-otp/style/index.css +8 -8
- package/es/list/style/_index.scss +3 -3
- package/es/list/style/index.css +3 -3
- package/es/marquee/index.d.ts +1 -0
- package/es/marquee/index.js +9 -0
- package/es/marquee/index.js.map +1 -0
- package/es/marquee/marquee.d.ts +8 -0
- package/es/marquee/marquee.js +42 -0
- package/es/marquee/marquee.js.map +1 -0
- package/es/marquee/style/_index.scss +77 -0
- package/es/marquee/style/index.css +64 -0
- package/es/marquee/style/index.d.ts +1 -0
- package/es/marquee/style/index.js +1 -0
- package/es/marquee/types.d.ts +21 -0
- package/es/native-select/style/index.css +4 -4
- package/es/notification/style/_index.scss +1 -1
- package/es/notification/style/index.css +1 -1
- package/es/pop-confirm/style/_index.scss +1 -1
- package/es/pop-confirm/style/index.css +1 -1
- package/es/popup/style/_index.scss +9 -9
- package/es/popup/style/index.css +10 -10
- package/es/radio/style/_index.scss +5 -8
- package/es/radio/style/index.css +5 -8
- package/es/segmented/style/_index.scss +10 -10
- package/es/segmented/style/index.css +9 -9
- package/es/select/style/_index.scss +16 -17
- package/es/select/style/index.css +15 -16
- package/es/speed-dial/style/_index.scss +2 -2
- package/es/speed-dial/style/index.css +2 -2
- package/es/statistic/style/_index.scss +2 -2
- package/es/statistic/style/index.css +2 -2
- package/es/style/_component.scss +1 -0
- package/es/style/base.css +57 -0
- package/es/table/style/_index.scss +6 -6
- package/es/table/style/index.css +5 -5
- package/es/tag/style/index.css +1 -1
- package/es/textarea/style/index.css +2 -2
- package/es/time-picker/style/_index.scss +1 -1
- package/es/time-picker/style/index.css +1 -1
- package/es/timeline/style/_index.scss +3 -3
- package/es/timeline/style/index.css +3 -3
- package/es/tooltip/style/index.css +1 -1
- package/es/transfer/style/_index.scss +4 -4
- package/es/transfer/style/index.css +4 -4
- package/es/tree/style/index.css +1 -1
- package/es/typography/style/_index.scss +2 -2
- package/es/typography/style/index.css +2 -2
- package/es/upload/style/_index.scss +4 -4
- package/es/upload/style/index.css +4 -4
- package/lib/alert/style/_index.scss +2 -2
- package/lib/alert/style/index.css +2 -2
- package/lib/auto-complete/style/_index.scss +4 -5
- package/lib/auto-complete/style/index.css +4 -5
- package/lib/breadcrumb/style/index.css +1 -1
- package/lib/breadcrumb/types.d.ts +1 -1
- package/lib/button/style/index.css +14 -14
- package/lib/calendar/style/_index.scss +9 -9
- package/lib/calendar/style/index.css +9 -9
- package/lib/card/style/index.css +3 -3
- package/lib/cascader/style/_index.scss +9 -9
- package/lib/cascader/style/index.css +9 -9
- package/lib/checkbox/style/_index.scss +9 -12
- package/lib/checkbox/style/index.css +9 -12
- package/lib/collapse/style/index.css +3 -3
- package/lib/color-picker/style/_index.scss +7 -7
- package/lib/color-picker/style/index.css +4 -4
- package/lib/date-picker/style/_index.scss +1 -1
- package/lib/date-picker/style/index.css +1 -1
- package/lib/descriptions/style/_index.scss +5 -6
- package/lib/descriptions/style/index.css +6 -6
- package/lib/empty/style/_index.scss +1 -1
- package/lib/empty/style/index.css +1 -1
- package/lib/form/style/_index.scss +5 -6
- package/lib/form/style/index.css +4 -4
- package/lib/index.d.ts +2 -1
- package/lib/index.js +76 -74
- package/lib/input/style/_index.scss +5 -4
- package/lib/input/style/_mixin.scss +1 -1
- package/lib/input/style/index.css +21 -20
- package/lib/input-number/input-number.js +11 -5
- package/lib/input-number/input-number.js.map +1 -1
- package/lib/input-number/style/_index.scss +5 -3
- package/lib/input-number/style/index.css +13 -11
- package/lib/input-otp/style/_index.scss +1 -1
- package/lib/input-otp/style/index.css +8 -8
- package/lib/list/style/_index.scss +3 -3
- package/lib/list/style/index.css +3 -3
- package/lib/marquee/index.js +8 -0
- package/lib/marquee/index.js.map +1 -0
- package/lib/marquee/marquee.d.ts +8 -0
- package/lib/marquee/marquee.js +45 -0
- package/lib/marquee/marquee.js.map +1 -0
- package/lib/marquee/style/_index.scss +77 -0
- package/lib/marquee/style/index.css +64 -0
- package/lib/marquee/style/index.d.ts +1 -0
- package/lib/marquee/style/index.js +1 -0
- package/lib/marquee/types.d.ts +21 -0
- package/lib/native-select/style/index.css +4 -4
- package/lib/notification/style/_index.scss +1 -1
- package/lib/notification/style/index.css +1 -1
- package/lib/pop-confirm/style/_index.scss +1 -1
- package/lib/pop-confirm/style/index.css +1 -1
- package/lib/popup/style/_index.scss +9 -9
- package/lib/popup/style/index.css +10 -10
- package/lib/radio/style/_index.scss +5 -8
- package/lib/radio/style/index.css +5 -8
- package/lib/segmented/style/_index.scss +10 -10
- package/lib/segmented/style/index.css +9 -9
- package/lib/select/style/_index.scss +16 -17
- package/lib/select/style/index.css +15 -16
- package/lib/speed-dial/style/_index.scss +2 -2
- package/lib/speed-dial/style/index.css +2 -2
- package/lib/statistic/style/_index.scss +2 -2
- package/lib/statistic/style/index.css +2 -2
- package/lib/style/_component.scss +1 -0
- package/lib/style/base.css +57 -0
- package/lib/table/style/_index.scss +6 -6
- package/lib/table/style/index.css +5 -5
- package/lib/tag/style/index.css +1 -1
- package/lib/textarea/style/index.css +2 -2
- package/lib/time-picker/style/_index.scss +1 -1
- package/lib/time-picker/style/index.css +1 -1
- package/lib/timeline/style/_index.scss +3 -3
- package/lib/timeline/style/index.css +3 -3
- package/lib/tooltip/style/index.css +1 -1
- package/lib/transfer/style/_index.scss +4 -4
- package/lib/transfer/style/index.css +4 -4
- package/lib/tree/style/index.css +1 -1
- package/lib/typography/style/_index.scss +2 -2
- package/lib/typography/style/index.css +2 -2
- package/lib/upload/style/_index.scss +4 -4
- package/lib/upload/style/index.css +4 -4
- package/package.json +3 -3
|
@@ -15,8 +15,12 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
15
15
|
const isValid = (val) => {
|
|
16
16
|
return !isNaN(+val);
|
|
17
17
|
};
|
|
18
|
+
const getDecimalPrecision = (num) => {
|
|
19
|
+
const str = String(num);
|
|
20
|
+
const dotIndex = str.indexOf(".");
|
|
21
|
+
return dotIndex === -1 ? 0 : str.length - dotIndex - 1;
|
|
22
|
+
};
|
|
18
23
|
const toPrecision = (val, precision) => {
|
|
19
|
-
if (precision === void 0) return val;
|
|
20
24
|
return parseFloat(val.toFixed(precision));
|
|
21
25
|
};
|
|
22
26
|
const InputNumber = react.default.forwardRef((props, ref) => {
|
|
@@ -27,16 +31,18 @@ const InputNumber = react.default.forwardRef((props, ref) => {
|
|
|
27
31
|
[`${prefixCls}_disabled`]: disabled,
|
|
28
32
|
[`${prefixCls}_always-controls`]: controls
|
|
29
33
|
});
|
|
34
|
+
const resolvedPrecision = precision ?? Math.max(getDecimalPrecision(step), getDecimalPrecision(defaultValue));
|
|
30
35
|
const [value, setValue] = (0, react.useState)("value" in props ? props.value : defaultValue);
|
|
31
36
|
const inputOnChange = (e) => {
|
|
32
|
-
const
|
|
37
|
+
const raw = Number(e.target.value.trim());
|
|
38
|
+
const val = resolvedPrecision > 0 ? toPrecision(raw, resolvedPrecision) : raw;
|
|
33
39
|
!("value" in props) && setValue(val);
|
|
34
40
|
onChange && isValid(val) && onChange(val, e);
|
|
35
41
|
};
|
|
36
42
|
const plusOnClick = (e) => {
|
|
37
43
|
e.stopPropagation();
|
|
38
44
|
if (!disabled && isValid(step)) {
|
|
39
|
-
const val = toPrecision(+value + +step,
|
|
45
|
+
const val = toPrecision(+value + +step, resolvedPrecision);
|
|
40
46
|
if (val <= max) {
|
|
41
47
|
!("value" in props) && setValue(val);
|
|
42
48
|
onChange && onChange(val, e);
|
|
@@ -46,7 +52,7 @@ const InputNumber = react.default.forwardRef((props, ref) => {
|
|
|
46
52
|
const minusOnClick = (e) => {
|
|
47
53
|
e.stopPropagation();
|
|
48
54
|
if (!disabled && isValid(step)) {
|
|
49
|
-
const val = toPrecision(+value - +step,
|
|
55
|
+
const val = toPrecision(+value - +step, resolvedPrecision);
|
|
50
56
|
if (val >= min) {
|
|
51
57
|
!("value" in props) && setValue(val);
|
|
52
58
|
onChange && onChange(val, e);
|
|
@@ -63,7 +69,7 @@ const InputNumber = react.default.forwardRef((props, ref) => {
|
|
|
63
69
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
64
70
|
autoComplete: "off",
|
|
65
71
|
disabled,
|
|
66
|
-
value:
|
|
72
|
+
value: resolvedPrecision > 0 ? value.toFixed(resolvedPrecision) : value,
|
|
67
73
|
type: "number",
|
|
68
74
|
className: `${prefixCls}__input`,
|
|
69
75
|
max,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-number.js","names":["React","ConfigContext","getPrefixCls","ArrowDown"],"sources":["../../src/input-number/input-number.tsx"],"sourcesContent":["import React, { useEffect, useState, MouseEvent, useContext } from 'react';\nimport classNames from 'classnames';\nimport { ConfigContext } from '../config-provider/config-context';\nimport { getPrefixCls } from '../_utils/general';\nimport { InputNumberProps } from './types';\nimport { ArrowDown } from '../_utils/components';\n\n/**\n * Valid the string is a number\n * @param val\n */\nconst isValid = (val: string | number): boolean => {\n return !isNaN(+val);\n};\n\nconst
|
|
1
|
+
{"version":3,"file":"input-number.js","names":["React","ConfigContext","getPrefixCls","ArrowDown"],"sources":["../../src/input-number/input-number.tsx"],"sourcesContent":["import React, { useEffect, useState, MouseEvent, useContext } from 'react';\nimport classNames from 'classnames';\nimport { ConfigContext } from '../config-provider/config-context';\nimport { getPrefixCls } from '../_utils/general';\nimport { InputNumberProps } from './types';\nimport { ArrowDown } from '../_utils/components';\n\n/**\n * Valid the string is a number\n * @param val\n */\nconst isValid = (val: string | number): boolean => {\n return !isNaN(+val);\n};\n\nconst getDecimalPrecision = (num: number): number => {\n const str = String(num);\n const dotIndex = str.indexOf('.');\n return dotIndex === -1 ? 0 : str.length - dotIndex - 1;\n};\n\nconst toPrecision = (val: number, precision: number): number => {\n return parseFloat(val.toFixed(precision));\n};\n\nconst InputNumber = React.forwardRef<HTMLDivElement, InputNumberProps>((props, ref) => {\n const {\n size = 'md',\n disabled = false,\n defaultValue = 0,\n step = 1,\n precision,\n controls = false,\n min = Number.NEGATIVE_INFINITY,\n max = Number.POSITIVE_INFINITY,\n onChange,\n className,\n prefixCls: customisedCls,\n style,\n } = props;\n const configContext = useContext(ConfigContext);\n const prefixCls = getPrefixCls('input-number', configContext.prefixCls, customisedCls);\n const inputSize = props.size || configContext.componentSize || size;\n const cls = classNames(prefixCls, className, `${prefixCls}_${inputSize}`, {\n [`${prefixCls}_disabled`]: disabled,\n [`${prefixCls}_always-controls`]: controls,\n });\n const resolvedPrecision = precision ?? Math.max(getDecimalPrecision(step), getDecimalPrecision(defaultValue));\n const [value, setValue] = useState<number>(\n 'value' in props ? (props.value as number) : defaultValue\n );\n\n const inputOnChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n const raw = Number(e.target.value.trim());\n const val = resolvedPrecision > 0 ? toPrecision(raw, resolvedPrecision) : raw;\n !('value' in props) && setValue(val);\n onChange && isValid(val) && onChange(val, e);\n };\n\n const plusOnClick = (e: MouseEvent<HTMLSpanElement>): void => {\n e.stopPropagation();\n if (!disabled && isValid(step)) {\n const val = toPrecision(+value + +step, resolvedPrecision);\n if (val <= max) {\n !('value' in props) && setValue(val);\n onChange && onChange(val, e);\n }\n }\n };\n\n const minusOnClick = (e: MouseEvent<HTMLSpanElement>): void => {\n e.stopPropagation();\n if (!disabled && isValid(step)) {\n const val = toPrecision(+value - +step, resolvedPrecision);\n if (val >= min) {\n !('value' in props) && setValue(val);\n onChange && onChange(val, e);\n }\n }\n };\n\n useEffect(() => {\n 'value' in props && setValue(props.value as number);\n }, [props]);\n\n return (\n <div ref={ref} className={cls} style={style}>\n <input\n autoComplete=\"off\"\n disabled={disabled}\n value={resolvedPrecision > 0 ? value.toFixed(resolvedPrecision) : value}\n type=\"number\"\n className={`${prefixCls}__input`}\n max={max}\n min={min}\n step={step}\n onChange={inputOnChange}\n aria-valuenow={value}\n aria-valuemax={max}\n aria-valuemin={min}\n aria-disabled={disabled}\n />\n <div className={`${prefixCls}__controls`}>\n <span className={`${prefixCls}__up`} onClick={plusOnClick}>\n <ArrowDown size={8} className={`${prefixCls}__icon ${prefixCls}__icon_reverse`} />\n </span>\n <span className={`${prefixCls}__down`} onClick={minusOnClick}>\n <ArrowDown size={8} className={`${prefixCls}__icon`} />\n </span>\n </div>\n </div>\n );\n});\n\nInputNumber.displayName = 'InputNumber';\n\nexport default InputNumber;\n"],"mappings":";;;;;;;;;;;;;;AAWA,MAAM,WAAW,QAAkC;AACjD,QAAO,CAAC,MAAM,CAAC,IAAI;;AAGrB,MAAM,uBAAuB,QAAwB;CACnD,MAAM,MAAM,OAAO,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5
|
position: relative;
|
|
6
6
|
box-sizing: border-box;
|
|
7
|
+
width: 100%;
|
|
7
8
|
|
|
8
9
|
&:hover {
|
|
9
10
|
.#{$prefix}-input-number__controls {
|
|
@@ -12,13 +13,14 @@
|
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
&__input {
|
|
15
|
-
@include input-default
|
|
16
|
+
@include input-default;
|
|
17
|
+
|
|
16
18
|
padding-left: 7px;
|
|
17
19
|
padding-right: 25px;
|
|
18
20
|
|
|
19
21
|
&::-webkit-inner-spin-button,
|
|
20
22
|
&::-webkit-outer-spin-button {
|
|
21
|
-
|
|
23
|
+
appearance: none;
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
26
|
|
|
@@ -112,7 +114,7 @@
|
|
|
112
114
|
&_disabled {
|
|
113
115
|
.#{$prefix}-input-number {
|
|
114
116
|
&__input {
|
|
115
|
-
@include input-default-disabled
|
|
117
|
+
@include input-default-disabled;
|
|
116
118
|
}
|
|
117
119
|
|
|
118
120
|
&__up,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
.ty-input-number {
|
|
2
2
|
position: relative;
|
|
3
3
|
box-sizing: border-box;
|
|
4
|
+
width: 100%;
|
|
4
5
|
}
|
|
5
6
|
.ty-input-number:hover .ty-input-number__controls {
|
|
6
7
|
opacity: 1;
|
|
@@ -13,8 +14,8 @@
|
|
|
13
14
|
border: 1px solid var(--ty-input-border);
|
|
14
15
|
transition: all 0.3s;
|
|
15
16
|
outline: 0;
|
|
16
|
-
border-radius:
|
|
17
|
-
font-size:
|
|
17
|
+
border-radius: var(--ty-border-radius);
|
|
18
|
+
font-size: var(--ty-font-size-base);
|
|
18
19
|
background-color: var(--ty-input-bg);
|
|
19
20
|
}
|
|
20
21
|
.ty-input-number__input:hover {
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
}
|
|
37
38
|
.ty-input-number__input::-webkit-inner-spin-button, .ty-input-number__input::-webkit-outer-spin-button {
|
|
38
39
|
-webkit-appearance: none;
|
|
40
|
+
appearance: none;
|
|
39
41
|
}
|
|
40
42
|
.ty-input-number__controls {
|
|
41
43
|
box-sizing: border-box;
|
|
@@ -84,19 +86,19 @@
|
|
|
84
86
|
transform: rotate(180deg);
|
|
85
87
|
}
|
|
86
88
|
.ty-input-number_sm .ty-input-number__input {
|
|
87
|
-
font-size:
|
|
88
|
-
height:
|
|
89
|
-
line-height:
|
|
89
|
+
font-size: var(--ty-font-size-sm);
|
|
90
|
+
height: var(--ty-height-sm);
|
|
91
|
+
line-height: var(--ty-height-sm);
|
|
90
92
|
}
|
|
91
93
|
.ty-input-number_md .ty-input-number__input {
|
|
92
|
-
font-size:
|
|
93
|
-
height:
|
|
94
|
-
line-height:
|
|
94
|
+
font-size: var(--ty-font-size-base);
|
|
95
|
+
height: var(--ty-height-md);
|
|
96
|
+
line-height: var(--ty-height-md);
|
|
95
97
|
}
|
|
96
98
|
.ty-input-number_lg .ty-input-number__input {
|
|
97
|
-
font-size:
|
|
98
|
-
height:
|
|
99
|
-
line-height:
|
|
99
|
+
font-size: var(--ty-font-size-lg);
|
|
100
|
+
height: var(--ty-height-lg);
|
|
101
|
+
line-height: var(--ty-height-lg);
|
|
100
102
|
}
|
|
101
103
|
.ty-input-number_disabled .ty-input-number__input {
|
|
102
104
|
cursor: not-allowed;
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
border: 1px solid var(--ty-input-border);
|
|
12
12
|
transition: all 0.3s;
|
|
13
13
|
outline: 0;
|
|
14
|
-
border-radius:
|
|
15
|
-
font-size:
|
|
14
|
+
border-radius: var(--ty-border-radius);
|
|
15
|
+
font-size: var(--ty-font-size-base);
|
|
16
16
|
background-color: var(--ty-input-bg);
|
|
17
17
|
}
|
|
18
18
|
.ty-input-otp__cell:hover {
|
|
@@ -33,24 +33,24 @@
|
|
|
33
33
|
height: 36px;
|
|
34
34
|
text-align: center;
|
|
35
35
|
padding: 0;
|
|
36
|
-
font-size:
|
|
37
|
-
border-radius:
|
|
36
|
+
font-size: var(--ty-font-size-base);
|
|
37
|
+
border-radius: var(--ty-border-radius);
|
|
38
38
|
caret-color: currentcolor;
|
|
39
39
|
}
|
|
40
40
|
.ty-input-otp__cell_sm {
|
|
41
41
|
width: 28px;
|
|
42
42
|
height: 28px;
|
|
43
|
-
font-size:
|
|
43
|
+
font-size: var(--ty-font-size-sm);
|
|
44
44
|
}
|
|
45
45
|
.ty-input-otp__cell_md {
|
|
46
46
|
width: 36px;
|
|
47
47
|
height: 36px;
|
|
48
|
-
font-size:
|
|
48
|
+
font-size: var(--ty-font-size-base);
|
|
49
49
|
}
|
|
50
50
|
.ty-input-otp__cell_lg {
|
|
51
51
|
width: 44px;
|
|
52
52
|
height: 44px;
|
|
53
|
-
font-size:
|
|
53
|
+
font-size: var(--ty-font-size-lg);
|
|
54
54
|
}
|
|
55
55
|
.ty-input-otp__cell_disabled {
|
|
56
56
|
cursor: not-allowed;
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
display: inline-flex;
|
|
65
65
|
align-items: center;
|
|
66
66
|
color: var(--ty-color-text-secondary);
|
|
67
|
-
font-size:
|
|
67
|
+
font-size: var(--ty-font-size-base);
|
|
68
68
|
}
|
|
69
69
|
.ty-input-otp_disabled {
|
|
70
70
|
cursor: not-allowed;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
.#{$prefix}-list {
|
|
4
4
|
color: var(--ty-color-text, #{$gray-800});
|
|
5
|
-
font-size:
|
|
5
|
+
font-size: var(--ty-font-size-base);
|
|
6
6
|
|
|
7
7
|
&_bordered {
|
|
8
8
|
border: 1px solid var(--ty-list-border, #{$gray-300});
|
|
9
|
-
border-radius:
|
|
9
|
+
border-radius: var(--ty-border-radius);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
&_sm {
|
|
@@ -136,6 +136,6 @@
|
|
|
136
136
|
|
|
137
137
|
&__description {
|
|
138
138
|
color: var(--ty-color-text-secondary, #{$gray-600});
|
|
139
|
-
font-size:
|
|
139
|
+
font-size: var(--ty-font-size-sm);
|
|
140
140
|
}
|
|
141
141
|
}
|
package/lib/list/style/index.css
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
.ty-list {
|
|
2
2
|
color: var(--ty-color-text, #32325d);
|
|
3
|
-
font-size:
|
|
3
|
+
font-size: var(--ty-font-size-base);
|
|
4
4
|
}
|
|
5
5
|
.ty-list_bordered {
|
|
6
6
|
border: 1px solid var(--ty-list-border, #dee2e6);
|
|
7
|
-
border-radius:
|
|
7
|
+
border-radius: var(--ty-border-radius);
|
|
8
8
|
}
|
|
9
9
|
.ty-list_sm .ty-list-item {
|
|
10
10
|
padding: 8px 16px;
|
|
@@ -104,5 +104,5 @@
|
|
|
104
104
|
}
|
|
105
105
|
.ty-list-item-meta__description {
|
|
106
106
|
color: var(--ty-color-text-secondary, #8898aa);
|
|
107
|
-
font-size:
|
|
107
|
+
font-size: var(--ty-font-size-sm);
|
|
108
108
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["Marquee"],"sources":["../../src/marquee/index.tsx"],"sourcesContent":["import Marquee from './marquee';\n\nexport default Marquee;\n"],"mappings":";AAEA,IAAA,0CAAeA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MarqueeProps } from "./types.js";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/marquee/marquee.d.ts
|
|
5
|
+
declare const Marquee: React.MemoExoticComponent<React.ForwardRefExoticComponent<MarqueeProps & React.RefAttributes<HTMLDivElement>>>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { Marquee };
|
|
8
|
+
//# sourceMappingURL=marquee.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const require_runtime = require("../_virtual/_rolldown/runtime.js");
|
|
2
|
+
const require_config_context = require("../config-provider/config-context.js");
|
|
3
|
+
const require_general = require("../_utils/general.js");
|
|
4
|
+
let react = require("react");
|
|
5
|
+
react = require_runtime.__toESM(react);
|
|
6
|
+
let classnames = require("classnames");
|
|
7
|
+
classnames = require_runtime.__toESM(classnames);
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
//#region src/marquee/marquee.tsx
|
|
10
|
+
const Marquee = react.default.memo(react.default.forwardRef((props, ref) => {
|
|
11
|
+
const { direction = "left", duration = 50, pauseOnHover = true, gap = 16, fade = false, infinite = true, prefixCls: customisedCls, className, style, children, ...otherProps } = props;
|
|
12
|
+
const prefixCls = require_general.getPrefixCls("marquee", (0, react.useContext)(require_config_context.ConfigContext).prefixCls, customisedCls);
|
|
13
|
+
const cls = (0, classnames.default)(prefixCls, { [`${prefixCls}_fade`]: fade }, className);
|
|
14
|
+
const trackCls = (0, classnames.default)(`${prefixCls}__track`, {
|
|
15
|
+
[`${prefixCls}__track_reverse`]: direction === "right",
|
|
16
|
+
[`${prefixCls}__track_pause-on-hover`]: pauseOnHover,
|
|
17
|
+
[`${prefixCls}__track_once`]: !infinite
|
|
18
|
+
});
|
|
19
|
+
const trackStyle = {
|
|
20
|
+
"--ty-marquee-duration": `${duration}s`,
|
|
21
|
+
"--ty-marquee-gap": `${gap}px`
|
|
22
|
+
};
|
|
23
|
+
const items = (0, react.useMemo)(() => {
|
|
24
|
+
const childArray = react.default.Children.toArray(children);
|
|
25
|
+
if (!infinite) return childArray;
|
|
26
|
+
const cloned = childArray.map((child) => react.default.isValidElement(child) ? react.default.cloneElement(child, { key: `${child.key}-dup` }) : child);
|
|
27
|
+
return [...childArray, ...cloned];
|
|
28
|
+
}, [children, infinite]);
|
|
29
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
30
|
+
...otherProps,
|
|
31
|
+
ref,
|
|
32
|
+
className: cls,
|
|
33
|
+
style,
|
|
34
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
35
|
+
className: trackCls,
|
|
36
|
+
style: trackStyle,
|
|
37
|
+
children: items
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
}));
|
|
41
|
+
Marquee.displayName = "Marquee";
|
|
42
|
+
//#endregion
|
|
43
|
+
exports.default = Marquee;
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=marquee.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marquee.js","names":["React","getPrefixCls","ConfigContext"],"sources":["../../src/marquee/marquee.tsx"],"sourcesContent":["import React, { useContext, useMemo } from 'react';\nimport classNames from 'classnames';\nimport { ConfigContext } from '../config-provider/config-context';\nimport { getPrefixCls } from '../_utils/general';\nimport { MarqueeProps } from './types';\n\nconst Marquee = React.memo(\n React.forwardRef<HTMLDivElement, MarqueeProps>((props, ref) => {\n const {\n direction = 'left',\n duration = 50,\n pauseOnHover = true,\n gap = 16,\n fade = false,\n infinite = true,\n prefixCls: customisedCls,\n className,\n style,\n children,\n ...otherProps\n } = props;\n\n const configContext = useContext(ConfigContext);\n const prefixCls = getPrefixCls('marquee', configContext.prefixCls, customisedCls);\n\n const cls = classNames(\n prefixCls,\n {\n [`${prefixCls}_fade`]: fade,\n },\n className\n );\n\n const trackCls = classNames(`${prefixCls}__track`, {\n [`${prefixCls}__track_reverse`]: direction === 'right',\n [`${prefixCls}__track_pause-on-hover`]: pauseOnHover,\n [`${prefixCls}__track_once`]: !infinite,\n });\n\n const trackStyle: React.CSSProperties = {\n '--ty-marquee-duration': `${duration}s`,\n '--ty-marquee-gap': `${gap}px`,\n } as React.CSSProperties;\n\n const items = useMemo(() => {\n const childArray = React.Children.toArray(children);\n if (!infinite) return childArray;\n const cloned = childArray.map((child) =>\n React.isValidElement(child)\n ? React.cloneElement(child, { key: `${child.key}-dup` })\n : child\n );\n return [...childArray, ...cloned];\n }, [children, infinite]);\n\n return (\n <div {...otherProps} ref={ref} className={cls} style={style}>\n <div className={trackCls} style={trackStyle}>\n {items}\n </div>\n </div>\n );\n })\n);\n\nMarquee.displayName = 'Marquee';\n\nexport default Marquee;\n"],"mappings":";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+
.#{$prefix}-marquee {
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
width: 0;
|
|
6
|
+
min-width: 100%;
|
|
7
|
+
|
|
8
|
+
&_fade {
|
|
9
|
+
mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
|
|
10
|
+
mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&__track {
|
|
14
|
+
display: flex;
|
|
15
|
+
gap: var(--ty-marquee-gap, 16px);
|
|
16
|
+
width: max-content;
|
|
17
|
+
animation: ty-marquee-left var(--ty-marquee-duration, 50s) linear infinite;
|
|
18
|
+
|
|
19
|
+
&_reverse {
|
|
20
|
+
animation-name: ty-marquee-right;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&_pause-on-hover:hover {
|
|
24
|
+
animation-play-state: paused;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&_once {
|
|
28
|
+
animation-iteration-count: 1;
|
|
29
|
+
animation-fill-mode: forwards;
|
|
30
|
+
animation-name: ty-marquee-once-left;
|
|
31
|
+
|
|
32
|
+
&.#{$prefix}-marquee__track_reverse {
|
|
33
|
+
animation-name: ty-marquee-once-right;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@keyframes ty-marquee-left {
|
|
40
|
+
from {
|
|
41
|
+
transform: translateX(0);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
to {
|
|
45
|
+
transform: translateX(-50%);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@keyframes ty-marquee-right {
|
|
50
|
+
from {
|
|
51
|
+
transform: translateX(-50%);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
to {
|
|
55
|
+
transform: translateX(0);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@keyframes ty-marquee-once-left {
|
|
60
|
+
from {
|
|
61
|
+
transform: translateX(0);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
to {
|
|
65
|
+
transform: translateX(-100%);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@keyframes ty-marquee-once-right {
|
|
70
|
+
from {
|
|
71
|
+
transform: translateX(-100%);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
to {
|
|
75
|
+
transform: translateX(0);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
.ty-marquee {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
width: 0;
|
|
4
|
+
min-width: 100%;
|
|
5
|
+
}
|
|
6
|
+
.ty-marquee_fade {
|
|
7
|
+
-webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
|
|
8
|
+
mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
|
|
9
|
+
mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
|
|
10
|
+
}
|
|
11
|
+
.ty-marquee__track {
|
|
12
|
+
display: flex;
|
|
13
|
+
gap: var(--ty-marquee-gap, 16px);
|
|
14
|
+
width: -moz-max-content;
|
|
15
|
+
width: max-content;
|
|
16
|
+
animation: ty-marquee-left var(--ty-marquee-duration, 50s) linear infinite;
|
|
17
|
+
}
|
|
18
|
+
.ty-marquee__track_reverse {
|
|
19
|
+
animation-name: ty-marquee-right;
|
|
20
|
+
}
|
|
21
|
+
.ty-marquee__track_pause-on-hover:hover {
|
|
22
|
+
animation-play-state: paused;
|
|
23
|
+
}
|
|
24
|
+
.ty-marquee__track_once {
|
|
25
|
+
animation-iteration-count: 1;
|
|
26
|
+
animation-fill-mode: forwards;
|
|
27
|
+
animation-name: ty-marquee-once-left;
|
|
28
|
+
}
|
|
29
|
+
.ty-marquee__track_once.ty-marquee__track_reverse {
|
|
30
|
+
animation-name: ty-marquee-once-right;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@keyframes ty-marquee-left {
|
|
34
|
+
from {
|
|
35
|
+
transform: translateX(0);
|
|
36
|
+
}
|
|
37
|
+
to {
|
|
38
|
+
transform: translateX(-50%);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
@keyframes ty-marquee-right {
|
|
42
|
+
from {
|
|
43
|
+
transform: translateX(-50%);
|
|
44
|
+
}
|
|
45
|
+
to {
|
|
46
|
+
transform: translateX(0);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
@keyframes ty-marquee-once-left {
|
|
50
|
+
from {
|
|
51
|
+
transform: translateX(0);
|
|
52
|
+
}
|
|
53
|
+
to {
|
|
54
|
+
transform: translateX(-100%);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
@keyframes ty-marquee-once-right {
|
|
58
|
+
from {
|
|
59
|
+
transform: translateX(-100%);
|
|
60
|
+
}
|
|
61
|
+
to {
|
|
62
|
+
transform: translateX(0);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require("./_index.css");
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseProps } from "../_utils/props.js";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/marquee/types.d.ts
|
|
5
|
+
interface MarqueeProps extends BaseProps, React.PropsWithoutRef<JSX.IntrinsicElements['div']> {
|
|
6
|
+
/** Scroll direction */
|
|
7
|
+
direction?: 'left' | 'right';
|
|
8
|
+
/** Animation duration in seconds */
|
|
9
|
+
duration?: number;
|
|
10
|
+
/** Pause animation on hover */
|
|
11
|
+
pauseOnHover?: boolean;
|
|
12
|
+
/** Gap between items in pixels */
|
|
13
|
+
gap?: number;
|
|
14
|
+
/** Apply edge fade mask */
|
|
15
|
+
fade?: boolean;
|
|
16
|
+
/** Loop the animation infinitely (duplicates children for seamless loop) */
|
|
17
|
+
infinite?: boolean;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { MarqueeProps };
|
|
21
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
vertical-align: middle;
|
|
10
10
|
box-sizing: border-box;
|
|
11
11
|
border: 1px solid var(--ty-input-border);
|
|
12
|
-
border-radius:
|
|
12
|
+
border-radius: var(--ty-border-radius);
|
|
13
13
|
background-color: var(--ty-native-select-bg);
|
|
14
14
|
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDEyIDE2Ij4gIDxwYXRoIGZpbGw9IiMzOTNFNDgiIGQ9Ik0wLjIyMiw1LjYxMyBMNS40NTEsMC4yMjMgQzUuNzU2MjEyMDksLTAuMDc0MzYzMjMzMyA2LjI0Mjc4NzkxLC0wLjA3NDM2MzIzMzMgNi41NDgsMC4yMjMgTDExLjc3OCw1LjYxMyBDMTIuMTgsNi4wMjcgMTIuMDI1LDYuNjY3IDExLjQwNyw2LjY2NyBMMC41OTIsNi42NjcgQy0wLjAyNCw2LjY2NyAtMC4xOCw2LjAyNyAwLjIyMiw1LjYxMyBaIE0wLjU5Miw5LjMzMyBMMTEuNDA3LDkuMzMzIEMxMi4wMjUsOS4zMzMgMTIuMTgsOS45NzMgMTEuNzc3LDEwLjM4NyBMNi41NDcsMTUuNzc3IEM2LjI0MTkxMjU4LDE2LjA3MzcxNDMgNS43NTYwODc0MiwxNi4wNzM3MTQzIDUuNDUxLDE1Ljc3NyBMMC4yMjIsMTAuMzg3IEMtMC4xOCw5Ljk3MyAtMC4wMjQsOS4zMzMgMC41OTIsOS4zMzMgWiIvPjwvc3ZnPg==");
|
|
15
15
|
background-repeat: no-repeat, repeat;
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
}
|
|
44
44
|
.ty-select-native_sm {
|
|
45
45
|
padding: 3px 25px 3px 7px;
|
|
46
|
-
font-size:
|
|
46
|
+
font-size: var(--ty-font-size-sm);
|
|
47
47
|
}
|
|
48
48
|
.ty-select-native_md {
|
|
49
49
|
padding: 6px 25px 6px 7px;
|
|
50
|
-
font-size:
|
|
50
|
+
font-size: var(--ty-font-size-base);
|
|
51
51
|
}
|
|
52
52
|
.ty-select-native_lg {
|
|
53
53
|
padding: 9px 25px 9px 7px;
|
|
54
|
-
font-size:
|
|
54
|
+
font-size: var(--ty-font-size-lg);
|
|
55
55
|
}
|
|
@@ -5,19 +5,19 @@
|
|
|
5
5
|
box-sizing: border-box;
|
|
6
6
|
border-radius: $popover-border-radius;
|
|
7
7
|
white-space: nowrap;
|
|
8
|
-
font-size:
|
|
8
|
+
font-size: var(--ty-font-size-base);
|
|
9
9
|
text-align: left;
|
|
10
10
|
box-shadow: var(--ty-shadow-popup);
|
|
11
11
|
z-index: 999;
|
|
12
12
|
|
|
13
|
-
&__arrow, &__arrow
|
|
13
|
+
&__arrow, &__arrow::before {
|
|
14
14
|
width: $popover-arrow-size;
|
|
15
15
|
height: $popover-arrow-size;
|
|
16
16
|
box-sizing: border-box;
|
|
17
17
|
position: absolute;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
&__arrow
|
|
20
|
+
&__arrow::before {
|
|
21
21
|
content: '';
|
|
22
22
|
transform: rotate(45deg);
|
|
23
23
|
}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
background-color: var(--ty-popup-light-bg);
|
|
27
27
|
color: var(--ty-color-text-secondary);
|
|
28
28
|
.#{$prefix}-popup {
|
|
29
|
-
&__arrow
|
|
29
|
+
&__arrow::before {
|
|
30
30
|
background: var(--ty-popup-light-bg);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
background-color: var(--ty-popup-dark-bg);
|
|
37
37
|
color: #fff;
|
|
38
38
|
.#{$prefix}-popup {
|
|
39
|
-
&__arrow
|
|
39
|
+
&__arrow::before {
|
|
40
40
|
background: var(--ty-popup-dark-bg);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
& > .#{$prefix}-popup__arrow {
|
|
47
47
|
bottom: math.div(-$popover-arrow-size, 2);
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
&::before {
|
|
50
50
|
box-shadow: 3px 3px 7px var(--ty-popup-arrow-shadow);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
> .#{$prefix}-popup__arrow {
|
|
57
57
|
top: math.div(-$popover-arrow-size, 2);
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
&::before {
|
|
60
60
|
box-shadow: -2px -2px 5px var(--ty-popup-arrow-shadow);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
> .#{$prefix}-popup__arrow {
|
|
67
67
|
right: math.div(-$popover-arrow-size, 2);
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
&::before {
|
|
70
70
|
box-shadow: 3px -3px 7px var(--ty-popup-arrow-shadow);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
> .#{$prefix}-popup__arrow {
|
|
77
77
|
left: math.div(-$popover-arrow-size, 2);
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
&::before {
|
|
80
80
|
box-shadow: -3px 3px 7px var(--ty-popup-arrow-shadow);
|
|
81
81
|
}
|
|
82
82
|
}
|