@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.
Files changed (168) hide show
  1. package/es/alert/style/_index.scss +2 -2
  2. package/es/alert/style/index.css +2 -2
  3. package/es/auto-complete/style/_index.scss +4 -5
  4. package/es/auto-complete/style/index.css +4 -5
  5. package/es/breadcrumb/style/index.css +1 -1
  6. package/es/breadcrumb/types.d.ts +1 -1
  7. package/es/button/style/index.css +14 -14
  8. package/es/calendar/style/_index.scss +9 -9
  9. package/es/calendar/style/index.css +9 -9
  10. package/es/card/style/index.css +3 -3
  11. package/es/cascader/style/_index.scss +9 -9
  12. package/es/cascader/style/index.css +9 -9
  13. package/es/checkbox/style/_index.scss +9 -12
  14. package/es/checkbox/style/index.css +9 -12
  15. package/es/collapse/style/index.css +3 -3
  16. package/es/color-picker/style/_index.scss +7 -7
  17. package/es/color-picker/style/index.css +4 -4
  18. package/es/date-picker/style/_index.scss +1 -1
  19. package/es/date-picker/style/index.css +1 -1
  20. package/es/descriptions/style/_index.scss +5 -6
  21. package/es/descriptions/style/index.css +6 -6
  22. package/es/empty/style/_index.scss +1 -1
  23. package/es/empty/style/index.css +1 -1
  24. package/es/form/style/_index.scss +5 -6
  25. package/es/form/style/index.css +4 -4
  26. package/es/index.d.ts +2 -1
  27. package/es/index.js +2 -1
  28. package/es/input/style/_index.scss +5 -4
  29. package/es/input/style/_mixin.scss +1 -1
  30. package/es/input/style/index.css +21 -20
  31. package/es/input-number/input-number.js +11 -5
  32. package/es/input-number/input-number.js.map +1 -1
  33. package/es/input-number/style/_index.scss +5 -3
  34. package/es/input-number/style/index.css +13 -11
  35. package/es/input-otp/style/_index.scss +1 -1
  36. package/es/input-otp/style/index.css +8 -8
  37. package/es/list/style/_index.scss +3 -3
  38. package/es/list/style/index.css +3 -3
  39. package/es/marquee/index.d.ts +1 -0
  40. package/es/marquee/index.js +9 -0
  41. package/es/marquee/index.js.map +1 -0
  42. package/es/marquee/marquee.d.ts +8 -0
  43. package/es/marquee/marquee.js +42 -0
  44. package/es/marquee/marquee.js.map +1 -0
  45. package/es/marquee/style/_index.scss +77 -0
  46. package/es/marquee/style/index.css +64 -0
  47. package/es/marquee/style/index.d.ts +1 -0
  48. package/es/marquee/style/index.js +1 -0
  49. package/es/marquee/types.d.ts +21 -0
  50. package/es/native-select/style/index.css +4 -4
  51. package/es/notification/style/_index.scss +1 -1
  52. package/es/notification/style/index.css +1 -1
  53. package/es/pop-confirm/style/_index.scss +1 -1
  54. package/es/pop-confirm/style/index.css +1 -1
  55. package/es/popup/style/_index.scss +9 -9
  56. package/es/popup/style/index.css +10 -10
  57. package/es/radio/style/_index.scss +5 -8
  58. package/es/radio/style/index.css +5 -8
  59. package/es/segmented/style/_index.scss +10 -10
  60. package/es/segmented/style/index.css +9 -9
  61. package/es/select/style/_index.scss +16 -17
  62. package/es/select/style/index.css +15 -16
  63. package/es/speed-dial/style/_index.scss +2 -2
  64. package/es/speed-dial/style/index.css +2 -2
  65. package/es/statistic/style/_index.scss +2 -2
  66. package/es/statistic/style/index.css +2 -2
  67. package/es/style/_component.scss +1 -0
  68. package/es/style/base.css +57 -0
  69. package/es/table/style/_index.scss +6 -6
  70. package/es/table/style/index.css +5 -5
  71. package/es/tag/style/index.css +1 -1
  72. package/es/textarea/style/index.css +2 -2
  73. package/es/time-picker/style/_index.scss +1 -1
  74. package/es/time-picker/style/index.css +1 -1
  75. package/es/timeline/style/_index.scss +3 -3
  76. package/es/timeline/style/index.css +3 -3
  77. package/es/tooltip/style/index.css +1 -1
  78. package/es/transfer/style/_index.scss +4 -4
  79. package/es/transfer/style/index.css +4 -4
  80. package/es/tree/style/index.css +1 -1
  81. package/es/typography/style/_index.scss +2 -2
  82. package/es/typography/style/index.css +2 -2
  83. package/es/upload/style/_index.scss +4 -4
  84. package/es/upload/style/index.css +4 -4
  85. package/lib/alert/style/_index.scss +2 -2
  86. package/lib/alert/style/index.css +2 -2
  87. package/lib/auto-complete/style/_index.scss +4 -5
  88. package/lib/auto-complete/style/index.css +4 -5
  89. package/lib/breadcrumb/style/index.css +1 -1
  90. package/lib/breadcrumb/types.d.ts +1 -1
  91. package/lib/button/style/index.css +14 -14
  92. package/lib/calendar/style/_index.scss +9 -9
  93. package/lib/calendar/style/index.css +9 -9
  94. package/lib/card/style/index.css +3 -3
  95. package/lib/cascader/style/_index.scss +9 -9
  96. package/lib/cascader/style/index.css +9 -9
  97. package/lib/checkbox/style/_index.scss +9 -12
  98. package/lib/checkbox/style/index.css +9 -12
  99. package/lib/collapse/style/index.css +3 -3
  100. package/lib/color-picker/style/_index.scss +7 -7
  101. package/lib/color-picker/style/index.css +4 -4
  102. package/lib/date-picker/style/_index.scss +1 -1
  103. package/lib/date-picker/style/index.css +1 -1
  104. package/lib/descriptions/style/_index.scss +5 -6
  105. package/lib/descriptions/style/index.css +6 -6
  106. package/lib/empty/style/_index.scss +1 -1
  107. package/lib/empty/style/index.css +1 -1
  108. package/lib/form/style/_index.scss +5 -6
  109. package/lib/form/style/index.css +4 -4
  110. package/lib/index.d.ts +2 -1
  111. package/lib/index.js +76 -74
  112. package/lib/input/style/_index.scss +5 -4
  113. package/lib/input/style/_mixin.scss +1 -1
  114. package/lib/input/style/index.css +21 -20
  115. package/lib/input-number/input-number.js +11 -5
  116. package/lib/input-number/input-number.js.map +1 -1
  117. package/lib/input-number/style/_index.scss +5 -3
  118. package/lib/input-number/style/index.css +13 -11
  119. package/lib/input-otp/style/_index.scss +1 -1
  120. package/lib/input-otp/style/index.css +8 -8
  121. package/lib/list/style/_index.scss +3 -3
  122. package/lib/list/style/index.css +3 -3
  123. package/lib/marquee/index.js +8 -0
  124. package/lib/marquee/index.js.map +1 -0
  125. package/lib/marquee/marquee.d.ts +8 -0
  126. package/lib/marquee/marquee.js +45 -0
  127. package/lib/marquee/marquee.js.map +1 -0
  128. package/lib/marquee/style/_index.scss +77 -0
  129. package/lib/marquee/style/index.css +64 -0
  130. package/lib/marquee/style/index.d.ts +1 -0
  131. package/lib/marquee/style/index.js +1 -0
  132. package/lib/marquee/types.d.ts +21 -0
  133. package/lib/native-select/style/index.css +4 -4
  134. package/lib/notification/style/_index.scss +1 -1
  135. package/lib/notification/style/index.css +1 -1
  136. package/lib/pop-confirm/style/_index.scss +1 -1
  137. package/lib/pop-confirm/style/index.css +1 -1
  138. package/lib/popup/style/_index.scss +9 -9
  139. package/lib/popup/style/index.css +10 -10
  140. package/lib/radio/style/_index.scss +5 -8
  141. package/lib/radio/style/index.css +5 -8
  142. package/lib/segmented/style/_index.scss +10 -10
  143. package/lib/segmented/style/index.css +9 -9
  144. package/lib/select/style/_index.scss +16 -17
  145. package/lib/select/style/index.css +15 -16
  146. package/lib/speed-dial/style/_index.scss +2 -2
  147. package/lib/speed-dial/style/index.css +2 -2
  148. package/lib/statistic/style/_index.scss +2 -2
  149. package/lib/statistic/style/index.css +2 -2
  150. package/lib/style/_component.scss +1 -0
  151. package/lib/style/base.css +57 -0
  152. package/lib/table/style/_index.scss +6 -6
  153. package/lib/table/style/index.css +5 -5
  154. package/lib/tag/style/index.css +1 -1
  155. package/lib/textarea/style/index.css +2 -2
  156. package/lib/time-picker/style/_index.scss +1 -1
  157. package/lib/time-picker/style/index.css +1 -1
  158. package/lib/timeline/style/_index.scss +3 -3
  159. package/lib/timeline/style/index.css +3 -3
  160. package/lib/tooltip/style/index.css +1 -1
  161. package/lib/transfer/style/_index.scss +4 -4
  162. package/lib/transfer/style/index.css +4 -4
  163. package/lib/tree/style/index.css +1 -1
  164. package/lib/typography/style/_index.scss +2 -2
  165. package/lib/typography/style/index.css +2 -2
  166. package/lib/upload/style/_index.scss +4 -4
  167. package/lib/upload/style/index.css +4 -4
  168. package/package.json +3 -3
@@ -2,11 +2,11 @@
2
2
 
3
3
  .#{$prefix}-list {
4
4
  color: var(--ty-color-text, #{$gray-800});
5
- font-size: $font-size-base;
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: $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: $font-size-sm;
139
+ font-size: var(--ty-font-size-sm);
140
140
  }
141
141
  }
@@ -1,10 +1,10 @@
1
1
  .ty-list {
2
2
  color: var(--ty-color-text, #32325d);
3
- font-size: 1rem;
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: 2px;
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: 0.875rem;
107
+ font-size: var(--ty-font-size-sm);
108
108
  }
@@ -0,0 +1 @@
1
+ import { Marquee } from "./marquee.js";
@@ -0,0 +1,9 @@
1
+ import '../style/base.css';
2
+ import './style/index.css';
3
+ import Marquee from "./marquee.js";
4
+ //#region src/marquee/index.tsx
5
+ var marquee_default = Marquee;
6
+ //#endregion
7
+ export { marquee_default as default };
8
+
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/marquee/index.tsx"],"sourcesContent":["import Marquee from './marquee';\n\nexport default Marquee;\n"],"mappings":";;AAEA,IAAA,kBAAe"}
@@ -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,42 @@
1
+ import { ConfigContext } from "../config-provider/config-context.js";
2
+ import { getPrefixCls } from "../_utils/general.js";
3
+ import React, { useContext, useMemo } from "react";
4
+ import classNames from "classnames";
5
+ import { jsx } from "react/jsx-runtime";
6
+ //#region src/marquee/marquee.tsx
7
+ const Marquee = React.memo(React.forwardRef((props, ref) => {
8
+ const { direction = "left", duration = 50, pauseOnHover = true, gap = 16, fade = false, infinite = true, prefixCls: customisedCls, className, style, children, ...otherProps } = props;
9
+ const prefixCls = getPrefixCls("marquee", useContext(ConfigContext).prefixCls, customisedCls);
10
+ const cls = classNames(prefixCls, { [`${prefixCls}_fade`]: fade }, className);
11
+ const trackCls = classNames(`${prefixCls}__track`, {
12
+ [`${prefixCls}__track_reverse`]: direction === "right",
13
+ [`${prefixCls}__track_pause-on-hover`]: pauseOnHover,
14
+ [`${prefixCls}__track_once`]: !infinite
15
+ });
16
+ const trackStyle = {
17
+ "--ty-marquee-duration": `${duration}s`,
18
+ "--ty-marquee-gap": `${gap}px`
19
+ };
20
+ const items = useMemo(() => {
21
+ const childArray = React.Children.toArray(children);
22
+ if (!infinite) return childArray;
23
+ const cloned = childArray.map((child) => React.isValidElement(child) ? React.cloneElement(child, { key: `${child.key}-dup` }) : child);
24
+ return [...childArray, ...cloned];
25
+ }, [children, infinite]);
26
+ return /* @__PURE__ */ jsx("div", {
27
+ ...otherProps,
28
+ ref,
29
+ className: cls,
30
+ style,
31
+ children: /* @__PURE__ */ jsx("div", {
32
+ className: trackCls,
33
+ style: trackStyle,
34
+ children: items
35
+ })
36
+ });
37
+ }));
38
+ Marquee.displayName = "Marquee";
39
+ //#endregion
40
+ export { Marquee as default };
41
+
42
+ //# sourceMappingURL=marquee.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marquee.js","names":[],"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":";;;;;;AAMA,MAAM,UAAU,MAAM,KACpB,MAAM,YAA0C,OAAO,QAAQ;CAC7D,MAAM,EACJ,YAAY,QACZ,WAAW,IACX,eAAe,MACf,MAAM,IACN,OAAO,OACP,WAAW,MACX,WAAW,eACX,WACA,OACA,UACA,GAAG,eACD;CAGJ,MAAM,YAAY,aAAa,WADT,WAAW,cAAc,CACS,WAAW,cAAc;CAEjF,MAAM,MAAM,WACV,WACA,GACG,GAAG,UAAU,SAAS,MACxB,EACD,UACD;CAED,MAAM,WAAW,WAAW,GAAG,UAAU,UAAU;GAChD,GAAG,UAAU,mBAAmB,cAAc;GAC9C,GAAG,UAAU,0BAA0B;GACvC,GAAG,UAAU,gBAAgB,CAAC;EAChC,CAAC;CAEF,MAAM,aAAkC;EACtC,yBAAyB,GAAG,SAAS;EACrC,oBAAoB,GAAG,IAAI;EAC5B;CAED,MAAM,QAAQ,cAAc;EAC1B,MAAM,aAAa,MAAM,SAAS,QAAQ,SAAS;AACnD,MAAI,CAAC,SAAU,QAAO;EACtB,MAAM,SAAS,WAAW,KAAK,UAC7B,MAAM,eAAe,MAAM,GACvB,MAAM,aAAa,OAAO,EAAE,KAAK,GAAG,MAAM,IAAI,OAAO,CAAC,GACtD,MACL;AACD,SAAO,CAAC,GAAG,YAAY,GAAG,OAAO;IAChC,CAAC,UAAU,SAAS,CAAC;AAExB,QACE,oBAAC,OAAD;EAAK,GAAI;EAAiB;EAAK,WAAW;EAAY;YACpD,oBAAC,OAAD;GAAK,WAAW;GAAU,OAAO;aAC9B;GACG,CAAA;EACF,CAAA;EAER,CACH;AAED,QAAQ,cAAc"}
@@ -0,0 +1,77 @@
1
+ @use '../../style/variables' as *;
2
+
3
+ .#{$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
+ import "./_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: 2px;
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: 0.875rem;
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: 1rem;
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: 1.25rem;
54
+ font-size: var(--ty-font-size-lg);
55
55
  }
@@ -5,7 +5,7 @@
5
5
  padding: 16px 24px;
6
6
  border-radius: 3px;
7
7
  color: var(--ty-color-text-secondary);
8
- font-size: $font-size-base;
8
+ font-size: var(--ty-font-size-base);
9
9
  box-shadow: var(--ty-shadow-modal);
10
10
  box-sizing: border-box;
11
11
  display: flex;
@@ -3,7 +3,7 @@
3
3
  padding: 16px 24px;
4
4
  border-radius: 3px;
5
5
  color: var(--ty-color-text-secondary);
6
- font-size: 1rem;
6
+ font-size: var(--ty-font-size-base);
7
7
  box-shadow: var(--ty-shadow-modal);
8
8
  box-sizing: border-box;
9
9
  display: flex;
@@ -9,7 +9,7 @@
9
9
 
10
10
  &__messages {
11
11
  padding: 0 0 12px;
12
- font-size: $font-size-base;
12
+ font-size: var(--ty-font-size-base);
13
13
  display: flex;
14
14
  align-items: center;
15
15
  }
@@ -6,7 +6,7 @@
6
6
  }
7
7
  .ty-pop-confirm__messages {
8
8
  padding: 0 0 12px;
9
- font-size: 1rem;
9
+ font-size: var(--ty-font-size-base);
10
10
  display: flex;
11
11
  align-items: center;
12
12
  }
@@ -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: $font-size-base;
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:before {
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:before {
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:before {
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:before {
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
- &:before {
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
- &:before {
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
- &:before {
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
- &:before {
79
+ &::before {
80
80
  box-shadow: -3px 3px 7px var(--ty-popup-arrow-shadow);
81
81
  }
82
82
  }
@@ -1,19 +1,19 @@
1
1
  .ty-popup {
2
2
  box-sizing: border-box;
3
- border-radius: 2px;
3
+ border-radius: var(--ty-border-radius);
4
4
  white-space: nowrap;
5
- font-size: 1rem;
5
+ font-size: var(--ty-font-size-base);
6
6
  text-align: left;
7
7
  box-shadow: var(--ty-shadow-popup);
8
8
  z-index: 999;
9
9
  }
10
- .ty-popup__arrow, .ty-popup__arrow:before {
10
+ .ty-popup__arrow, .ty-popup__arrow::before {
11
11
  width: 8px;
12
12
  height: 8px;
13
13
  box-sizing: border-box;
14
14
  position: absolute;
15
15
  }
16
- .ty-popup__arrow:before {
16
+ .ty-popup__arrow::before {
17
17
  content: "";
18
18
  transform: rotate(45deg);
19
19
  }
@@ -21,37 +21,37 @@
21
21
  background-color: var(--ty-popup-light-bg);
22
22
  color: var(--ty-color-text-secondary);
23
23
  }
24
- .ty-popup_light .ty-popup__arrow:before {
24
+ .ty-popup_light .ty-popup__arrow::before {
25
25
  background: var(--ty-popup-light-bg);
26
26
  }
27
27
  .ty-popup_dark {
28
28
  background-color: var(--ty-popup-dark-bg);
29
29
  color: #fff;
30
30
  }
31
- .ty-popup_dark .ty-popup__arrow:before {
31
+ .ty-popup_dark .ty-popup__arrow::before {
32
32
  background: var(--ty-popup-dark-bg);
33
33
  }
34
34
  .ty-popup[data-popper-placement^=top] > .ty-popup__arrow {
35
35
  bottom: -4px;
36
36
  }
37
- .ty-popup[data-popper-placement^=top] > .ty-popup__arrow:before {
37
+ .ty-popup[data-popper-placement^=top] > .ty-popup__arrow::before {
38
38
  box-shadow: 3px 3px 7px var(--ty-popup-arrow-shadow);
39
39
  }
40
40
  .ty-popup[data-popper-placement^=bottom] > .ty-popup__arrow {
41
41
  top: -4px;
42
42
  }
43
- .ty-popup[data-popper-placement^=bottom] > .ty-popup__arrow:before {
43
+ .ty-popup[data-popper-placement^=bottom] > .ty-popup__arrow::before {
44
44
  box-shadow: -2px -2px 5px var(--ty-popup-arrow-shadow);
45
45
  }
46
46
  .ty-popup[data-popper-placement^=left] > .ty-popup__arrow {
47
47
  right: -4px;
48
48
  }
49
- .ty-popup[data-popper-placement^=left] > .ty-popup__arrow:before {
49
+ .ty-popup[data-popper-placement^=left] > .ty-popup__arrow::before {
50
50
  box-shadow: 3px -3px 7px var(--ty-popup-arrow-shadow);
51
51
  }
52
52
  .ty-popup[data-popper-placement^=right] > .ty-popup__arrow {
53
53
  left: -4px;
54
54
  }
55
- .ty-popup[data-popper-placement^=right] > .ty-popup__arrow:before {
55
+ .ty-popup[data-popper-placement^=right] > .ty-popup__arrow::before {
56
56
  box-shadow: -3px 3px 7px var(--ty-popup-arrow-shadow);
57
57
  }
@@ -4,16 +4,13 @@
4
4
  position: relative;
5
5
  display: inline-flex;
6
6
  align-items: center;
7
- font-size: $font-size-base;
7
+ font-size: var(--ty-font-size-base);
8
8
  margin-right: 8px;
9
9
  color: var(--ty-color-text);
10
10
 
11
11
  &__native {
12
12
  position: absolute;
13
- top: 0;
14
- right: 0;
15
- bottom: 0;
16
- left: 0;
13
+ inset: 0;
17
14
  width: 100%;
18
15
  height: 100%;
19
16
  z-index: 1;
@@ -34,7 +31,7 @@
34
31
  align-items: center;
35
32
  justify-content: center;
36
33
 
37
- &:after {
34
+ &::after {
38
35
  box-sizing: border-box;
39
36
  display: inline-block;
40
37
  content: '';
@@ -54,7 +51,7 @@
54
51
 
55
52
  &_checked {
56
53
  .#{$prefix}-radio {
57
- &__inner:after {
54
+ &__inner::after {
58
55
  transform: scale(1);
59
56
  }
60
57
  }
@@ -69,7 +66,7 @@
69
66
  &__inner {
70
67
  border-color: var(--ty-radio-disabled-border);
71
68
 
72
- &:after {
69
+ &::after {
73
70
  background-color: var(--ty-radio-disabled-dot);
74
71
  }
75
72
 
@@ -2,16 +2,13 @@
2
2
  position: relative;
3
3
  display: inline-flex;
4
4
  align-items: center;
5
- font-size: 1rem;
5
+ font-size: var(--ty-font-size-base);
6
6
  margin-right: 8px;
7
7
  color: var(--ty-color-text);
8
8
  }
9
9
  .ty-radio__native {
10
10
  position: absolute;
11
- top: 0;
12
- right: 0;
13
- bottom: 0;
14
- left: 0;
11
+ inset: 0;
15
12
  width: 100%;
16
13
  height: 100%;
17
14
  z-index: 1;
@@ -31,7 +28,7 @@
31
28
  align-items: center;
32
29
  justify-content: center;
33
30
  }
34
- .ty-radio__inner:after {
31
+ .ty-radio__inner::after {
35
32
  box-sizing: border-box;
36
33
  display: inline-block;
37
34
  content: "";
@@ -46,7 +43,7 @@
46
43
  padding: 0 5px;
47
44
  line-height: 16px;
48
45
  }
49
- .ty-radio_checked .ty-radio__inner:after {
46
+ .ty-radio_checked .ty-radio__inner::after {
50
47
  transform: scale(1);
51
48
  }
52
49
  .ty-radio_disabled .ty-radio__native {
@@ -55,7 +52,7 @@
55
52
  .ty-radio_disabled .ty-radio__inner {
56
53
  border-color: var(--ty-radio-disabled-border);
57
54
  }
58
- .ty-radio_disabled .ty-radio__inner:after {
55
+ .ty-radio_disabled .ty-radio__inner::after {
59
56
  background-color: var(--ty-radio-disabled-dot);
60
57
  }
61
58
  .ty-radio_disabled .ty-radio__inner + span {
@@ -5,7 +5,7 @@
5
5
  align-items: center;
6
6
  padding: 2px;
7
7
  background: var(--ty-segmented-bg, #{$gray-200});
8
- border-radius: $border-radius;
8
+ border-radius: var(--ty-border-radius);
9
9
  box-sizing: border-box;
10
10
 
11
11
  &_block {
@@ -30,20 +30,20 @@
30
30
 
31
31
  &_sm .#{$prefix}-segmented__item {
32
32
  padding: 0 8px;
33
- height: calc(#{$height-sm} - 4px);
34
- font-size: $font-size-sm;
33
+ height: calc(var(--ty-height-sm) - 4px);
34
+ font-size: var(--ty-font-size-sm);
35
35
  }
36
36
 
37
37
  &_md .#{$prefix}-segmented__item {
38
38
  padding: 0 12px;
39
- height: calc(#{$height-md} - 4px);
40
- font-size: $font-size-base;
39
+ height: calc(var(--ty-height-md) - 4px);
40
+ font-size: var(--ty-font-size-base);
41
41
  }
42
42
 
43
43
  &_lg .#{$prefix}-segmented__item {
44
44
  padding: 0 16px;
45
- height: calc(#{$height-lg} - 4px);
46
- font-size: $font-size-lg;
45
+ height: calc(var(--ty-height-lg) - 4px);
46
+ font-size: var(--ty-font-size-lg);
47
47
  }
48
48
 
49
49
  &__item {
@@ -52,19 +52,19 @@
52
52
  align-items: center;
53
53
  gap: 4px;
54
54
  cursor: pointer;
55
- border-radius: $border-radius;
55
+ border-radius: var(--ty-border-radius);
56
56
  transition: all 0.2s;
57
57
  user-select: none;
58
58
  white-space: nowrap;
59
59
 
60
- &:hover:not(&_active):not(&_disabled) {
60
+ &:hover:not(&_active, &_disabled) {
61
61
  color: var(--ty-color-text, #{$gray-900});
62
62
  }
63
63
 
64
64
  &_active {
65
65
  background: var(--ty-segmented-active-bg, #fff);
66
66
  color: var(--ty-color-text, #{$gray-900});
67
- box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1);
67
+ box-shadow: 0 1px 2px 0 rgb(0 0 0 / 6%), 0 1px 3px 0 rgb(0 0 0 / 10%);
68
68
  font-weight: 500;
69
69
  }
70
70