@tiny-design/react 1.3.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 (190) 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.scss +16 -11
  8. package/es/button/style/index.css +40 -19
  9. package/es/calendar/style/_index.scss +9 -9
  10. package/es/calendar/style/index.css +9 -9
  11. package/es/card/style/index.css +3 -3
  12. package/es/cascader/style/_index.scss +9 -9
  13. package/es/cascader/style/index.css +9 -9
  14. package/es/checkbox/style/_index.scss +9 -12
  15. package/es/checkbox/style/index.css +9 -12
  16. package/es/collapse/style/index.css +3 -3
  17. package/es/color-picker/style/_index.scss +7 -7
  18. package/es/color-picker/style/index.css +4 -4
  19. package/es/date-picker/style/_index.scss +1 -1
  20. package/es/date-picker/style/index.css +1 -1
  21. package/es/descriptions/style/_index.scss +5 -6
  22. package/es/descriptions/style/index.css +6 -6
  23. package/es/empty/style/_index.scss +1 -1
  24. package/es/empty/style/index.css +1 -1
  25. package/es/form/style/_index.scss +5 -6
  26. package/es/form/style/index.css +4 -4
  27. package/es/index.d.ts +2 -1
  28. package/es/index.js +2 -1
  29. package/es/input/style/_index.scss +5 -4
  30. package/es/input/style/_mixin.scss +1 -1
  31. package/es/input/style/index.css +21 -20
  32. package/es/input-number/input-number.js +11 -5
  33. package/es/input-number/input-number.js.map +1 -1
  34. package/es/input-number/style/_index.scss +5 -3
  35. package/es/input-number/style/index.css +13 -11
  36. package/es/input-otp/style/_index.scss +1 -1
  37. package/es/input-otp/style/index.css +8 -8
  38. package/es/list/style/_index.scss +3 -3
  39. package/es/list/style/index.css +3 -3
  40. package/es/marquee/index.d.ts +1 -0
  41. package/es/marquee/index.js +9 -0
  42. package/es/marquee/index.js.map +1 -0
  43. package/es/marquee/marquee.d.ts +8 -0
  44. package/es/marquee/marquee.js +42 -0
  45. package/es/marquee/marquee.js.map +1 -0
  46. package/es/marquee/style/_index.scss +77 -0
  47. package/es/marquee/style/index.css +64 -0
  48. package/es/marquee/style/index.d.ts +1 -0
  49. package/es/marquee/style/index.js +1 -0
  50. package/es/marquee/types.d.ts +21 -0
  51. package/es/native-select/style/index.css +4 -4
  52. package/es/notification/style/_index.scss +1 -1
  53. package/es/notification/style/index.css +1 -1
  54. package/es/pop-confirm/style/_index.scss +5 -1
  55. package/es/pop-confirm/style/index.css +5 -1
  56. package/es/popup/style/_index.scss +9 -9
  57. package/es/popup/style/index.css +10 -10
  58. package/es/radio/style/_index.scss +5 -8
  59. package/es/radio/style/index.css +5 -8
  60. package/es/segmented/style/_index.scss +10 -10
  61. package/es/segmented/style/index.css +9 -9
  62. package/es/select/style/_index.scss +16 -17
  63. package/es/select/style/index.css +15 -16
  64. package/es/slider/style/_index.scss +1 -9
  65. package/es/slider/style/index.css +1 -6
  66. package/es/speed-dial/style/_index.scss +8 -9
  67. package/es/speed-dial/style/index.css +7 -7
  68. package/es/statistic/style/_index.scss +2 -2
  69. package/es/statistic/style/index.css +2 -2
  70. package/es/style/_component.scss +1 -0
  71. package/es/style/base.css +81 -3
  72. package/es/table/style/_index.scss +6 -6
  73. package/es/table/style/index.css +5 -5
  74. package/es/tag/style/_index.scss +24 -0
  75. package/es/tag/style/index.css +21 -1
  76. package/es/tag/types.d.ts +2 -1
  77. package/es/tag/types.js +7 -2
  78. package/es/tag/types.js.map +1 -1
  79. package/es/textarea/style/index.css +2 -2
  80. package/es/time-picker/style/_index.scss +14 -1
  81. package/es/time-picker/style/index.css +11 -1
  82. package/es/time-picker/time-panel.js +28 -28
  83. package/es/time-picker/time-panel.js.map +1 -1
  84. package/es/time-picker/time-picker.js +50 -29
  85. package/es/time-picker/time-picker.js.map +1 -1
  86. package/es/timeline/style/_index.scss +3 -3
  87. package/es/timeline/style/index.css +3 -3
  88. package/es/tooltip/style/index.css +1 -1
  89. package/es/transfer/style/_index.scss +4 -4
  90. package/es/transfer/style/index.css +4 -4
  91. package/es/tree/style/index.css +1 -1
  92. package/es/typography/style/_index.scss +2 -2
  93. package/es/typography/style/index.css +2 -2
  94. package/es/upload/style/_index.scss +4 -4
  95. package/es/upload/style/index.css +4 -4
  96. package/lib/alert/style/_index.scss +2 -2
  97. package/lib/alert/style/index.css +2 -2
  98. package/lib/auto-complete/style/_index.scss +4 -5
  99. package/lib/auto-complete/style/index.css +4 -5
  100. package/lib/breadcrumb/style/index.css +1 -1
  101. package/lib/breadcrumb/types.d.ts +1 -1
  102. package/lib/button/style/_index.scss +16 -11
  103. package/lib/button/style/index.css +40 -19
  104. package/lib/calendar/style/_index.scss +9 -9
  105. package/lib/calendar/style/index.css +9 -9
  106. package/lib/card/style/index.css +3 -3
  107. package/lib/cascader/style/_index.scss +9 -9
  108. package/lib/cascader/style/index.css +9 -9
  109. package/lib/checkbox/style/_index.scss +9 -12
  110. package/lib/checkbox/style/index.css +9 -12
  111. package/lib/collapse/style/index.css +3 -3
  112. package/lib/color-picker/style/_index.scss +7 -7
  113. package/lib/color-picker/style/index.css +4 -4
  114. package/lib/date-picker/style/_index.scss +1 -1
  115. package/lib/date-picker/style/index.css +1 -1
  116. package/lib/descriptions/style/_index.scss +5 -6
  117. package/lib/descriptions/style/index.css +6 -6
  118. package/lib/empty/style/_index.scss +1 -1
  119. package/lib/empty/style/index.css +1 -1
  120. package/lib/form/style/_index.scss +5 -6
  121. package/lib/form/style/index.css +4 -4
  122. package/lib/index.d.ts +2 -1
  123. package/lib/index.js +76 -74
  124. package/lib/input/style/_index.scss +5 -4
  125. package/lib/input/style/_mixin.scss +1 -1
  126. package/lib/input/style/index.css +21 -20
  127. package/lib/input-number/input-number.js +11 -5
  128. package/lib/input-number/input-number.js.map +1 -1
  129. package/lib/input-number/style/_index.scss +5 -3
  130. package/lib/input-number/style/index.css +13 -11
  131. package/lib/input-otp/style/_index.scss +1 -1
  132. package/lib/input-otp/style/index.css +8 -8
  133. package/lib/list/style/_index.scss +3 -3
  134. package/lib/list/style/index.css +3 -3
  135. package/lib/marquee/index.js +8 -0
  136. package/lib/marquee/index.js.map +1 -0
  137. package/lib/marquee/marquee.d.ts +8 -0
  138. package/lib/marquee/marquee.js +45 -0
  139. package/lib/marquee/marquee.js.map +1 -0
  140. package/lib/marquee/style/_index.scss +77 -0
  141. package/lib/marquee/style/index.css +64 -0
  142. package/lib/marquee/style/index.d.ts +1 -0
  143. package/lib/marquee/style/index.js +1 -0
  144. package/lib/marquee/types.d.ts +21 -0
  145. package/lib/native-select/style/index.css +4 -4
  146. package/lib/notification/style/_index.scss +1 -1
  147. package/lib/notification/style/index.css +1 -1
  148. package/lib/pop-confirm/style/_index.scss +5 -1
  149. package/lib/pop-confirm/style/index.css +5 -1
  150. package/lib/popup/style/_index.scss +9 -9
  151. package/lib/popup/style/index.css +10 -10
  152. package/lib/radio/style/_index.scss +5 -8
  153. package/lib/radio/style/index.css +5 -8
  154. package/lib/segmented/style/_index.scss +10 -10
  155. package/lib/segmented/style/index.css +9 -9
  156. package/lib/select/style/_index.scss +16 -17
  157. package/lib/select/style/index.css +15 -16
  158. package/lib/slider/style/_index.scss +1 -9
  159. package/lib/slider/style/index.css +1 -6
  160. package/lib/speed-dial/style/_index.scss +8 -9
  161. package/lib/speed-dial/style/index.css +7 -7
  162. package/lib/statistic/style/_index.scss +2 -2
  163. package/lib/statistic/style/index.css +2 -2
  164. package/lib/style/_component.scss +1 -0
  165. package/lib/style/base.css +81 -3
  166. package/lib/table/style/_index.scss +6 -6
  167. package/lib/table/style/index.css +5 -5
  168. package/lib/tag/style/_index.scss +24 -0
  169. package/lib/tag/style/index.css +21 -1
  170. package/lib/tag/types.d.ts +2 -1
  171. package/lib/tag/types.js +7 -2
  172. package/lib/tag/types.js.map +1 -1
  173. package/lib/textarea/style/index.css +2 -2
  174. package/lib/time-picker/style/_index.scss +14 -1
  175. package/lib/time-picker/style/index.css +11 -1
  176. package/lib/time-picker/time-panel.js +28 -28
  177. package/lib/time-picker/time-panel.js.map +1 -1
  178. package/lib/time-picker/time-picker.js +50 -29
  179. package/lib/time-picker/time-picker.js.map +1 -1
  180. package/lib/timeline/style/_index.scss +3 -3
  181. package/lib/timeline/style/index.css +3 -3
  182. package/lib/tooltip/style/index.css +1 -1
  183. package/lib/transfer/style/_index.scss +4 -4
  184. package/lib/transfer/style/index.css +4 -4
  185. package/lib/tree/style/index.css +1 -1
  186. package/lib/typography/style/_index.scss +2 -2
  187. package/lib/typography/style/index.css +2 -2
  188. package/lib/upload/style/_index.scss +4 -4
  189. package/lib/upload/style/index.css +4 -4
  190. package/package.json +3 -3
@@ -4,6 +4,7 @@
4
4
  .#{$prefix}-input-number {
5
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
- -webkit-appearance: none;
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: 2px;
17
- font-size: 1rem;
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: 0.875rem;
88
- height: 24px;
89
- line-height: 24px;
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: 1rem;
93
- height: 32px;
94
- line-height: 32px;
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: 1.25rem;
98
- height: 42px;
99
- line-height: 42px;
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;
@@ -44,7 +44,7 @@
44
44
  display: inline-flex;
45
45
  align-items: center;
46
46
  color: var(--ty-color-text-secondary);
47
- font-size: $font-size-base;
47
+ font-size: var(--ty-font-size-base);
48
48
  }
49
49
 
50
50
  &_disabled {
@@ -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: 2px;
15
- font-size: 1rem;
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: 1rem;
37
- border-radius: 2px;
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: 0.875rem;
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: 1rem;
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: 1.25rem;
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: 1rem;
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: $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,12 +9,16 @@
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
  }
16
16
 
17
17
  &__buttons {
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: flex-end;
21
+ gap: 8px;
18
22
  text-align: right;
19
23
  }
20
24
 
@@ -6,11 +6,15 @@
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
  }
13
13
  .ty-pop-confirm__buttons {
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: flex-end;
17
+ gap: 8px;
14
18
  text-align: right;
15
19
  }
16
20
  .ty-pop-confirm__title {
@@ -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
  }