@tiny-design/react 1.0.4 → 1.0.10

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 (165) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +107 -0
  3. package/es/alert/style/_index.scss +0 -0
  4. package/es/alert/style/_mixin.scss +0 -0
  5. package/es/avatar/style/_index.scss +0 -0
  6. package/es/back-top/style/_index.scss +0 -0
  7. package/es/badge/style/_index.scss +0 -0
  8. package/es/breadcrumb/style/_index.scss +0 -0
  9. package/es/button/style/_index.scss +0 -0
  10. package/es/button/style/_mixin.scss +0 -0
  11. package/es/button/style/index.css +1 -1
  12. package/es/carousel/style/_index.scss +0 -0
  13. package/es/checkbox/style/_index.scss +0 -0
  14. package/es/collapse/style/_index.scss +0 -0
  15. package/es/date-picker/style/_index.scss +0 -0
  16. package/es/divider/style/_index.scss +0 -0
  17. package/es/empty/style/_index.scss +0 -0
  18. package/es/flip/style/_index.scss +0 -0
  19. package/es/form/style/_index.scss +0 -0
  20. package/es/grid/style/_index.scss +0 -0
  21. package/es/index.d.ts +2 -2
  22. package/es/index.js +2 -2
  23. package/es/input/style/_index.scss +0 -0
  24. package/es/input/style/_mixin.scss +0 -0
  25. package/es/input-number/style/_index.scss +0 -0
  26. package/es/input-password/style/_index.scss +0 -0
  27. package/es/layout/sidebar.js +2 -5
  28. package/es/layout/sidebar.js.map +1 -1
  29. package/es/layout/style/_index.scss +0 -0
  30. package/es/list/list.js.map +1 -1
  31. package/es/loader/style/_index.scss +0 -0
  32. package/es/loading-bar/style/_index.scss +0 -0
  33. package/es/message/style/_index.scss +0 -0
  34. package/es/modal/style/_index.scss +0 -0
  35. package/es/native-select/style/_index.scss +0 -0
  36. package/es/notification/style/_index.scss +0 -0
  37. package/es/overlay/style/_index.scss +0 -0
  38. package/es/pop-confirm/style/_index.scss +0 -0
  39. package/es/popover/style/_index.scss +0 -0
  40. package/es/popup/style/_index.scss +0 -0
  41. package/es/progress/style/_index.scss +0 -0
  42. package/es/radio/style/_index.scss +0 -0
  43. package/es/rate/rate.js +2 -5
  44. package/es/rate/rate.js.map +1 -1
  45. package/es/rate/style/_index.scss +0 -0
  46. package/es/split/style/_index.scss +0 -0
  47. package/es/style/_component.scss +1 -1
  48. package/es/style/base.css +12 -3
  49. package/es/style/index.scss +0 -0
  50. package/es/switch/style/_index.scss +0 -0
  51. package/es/switch/style/_mixin.scss +0 -0
  52. package/es/switch/style/index.css +3 -3
  53. package/es/table/table.js.map +1 -1
  54. package/es/tag/style/_index.scss +0 -0
  55. package/es/textarea/style/_index.scss +0 -0
  56. package/es/time-picker/style/_index.scss +0 -0
  57. package/es/timeline/style/_index.scss +0 -0
  58. package/es/tooltip/style/_index.scss +0 -0
  59. package/es/typography/heading.d.ts +2 -1
  60. package/es/typography/heading.js +11 -18
  61. package/es/typography/heading.js.map +1 -1
  62. package/es/typography/style/_index.scss +0 -18
  63. package/es/typography/style/index.css +0 -13
  64. package/es/typography/text.d.ts +2 -1
  65. package/es/typography/text.js +4 -2
  66. package/es/typography/text.js.map +1 -1
  67. package/es/typography/types.d.ts +1 -1
  68. package/es/with-spin/index.d.ts +1 -0
  69. package/es/with-spin/style/_index.scss +5 -0
  70. package/es/with-spin/style/index.css +3 -0
  71. package/es/with-spin/with-spin.d.ts +9 -0
  72. package/es/with-spin/with-spin.js +20 -0
  73. package/es/with-spin/with-spin.js.map +1 -0
  74. package/lib/alert/style/_index.scss +0 -0
  75. package/lib/alert/style/_mixin.scss +0 -0
  76. package/lib/avatar/style/_index.scss +0 -0
  77. package/lib/back-top/style/_index.scss +0 -0
  78. package/lib/badge/style/_index.scss +0 -0
  79. package/lib/breadcrumb/style/_index.scss +0 -0
  80. package/lib/button/style/_index.scss +0 -0
  81. package/lib/button/style/_mixin.scss +0 -0
  82. package/lib/button/style/index.css +1 -1
  83. package/lib/carousel/style/_index.scss +0 -0
  84. package/lib/checkbox/style/_index.scss +0 -0
  85. package/lib/collapse/style/_index.scss +0 -0
  86. package/lib/date-picker/style/_index.scss +0 -0
  87. package/lib/divider/style/_index.scss +0 -0
  88. package/lib/empty/style/_index.scss +0 -0
  89. package/lib/flip/style/_index.scss +0 -0
  90. package/lib/form/style/_index.scss +0 -0
  91. package/lib/grid/style/_index.scss +0 -0
  92. package/lib/index.d.ts +2 -2
  93. package/lib/index.js +96 -96
  94. package/lib/input/style/_index.scss +0 -0
  95. package/lib/input/style/_mixin.scss +0 -0
  96. package/lib/input-number/style/_index.scss +0 -0
  97. package/lib/input-password/style/_index.scss +0 -0
  98. package/lib/layout/sidebar.js +2 -5
  99. package/lib/layout/sidebar.js.map +1 -1
  100. package/lib/layout/style/_index.scss +0 -0
  101. package/lib/list/list.js.map +1 -1
  102. package/lib/loader/style/_index.scss +0 -0
  103. package/lib/loading-bar/style/_index.scss +0 -0
  104. package/lib/message/style/_index.scss +0 -0
  105. package/lib/modal/style/_index.scss +0 -0
  106. package/lib/native-select/style/_index.scss +0 -0
  107. package/lib/notification/style/_index.scss +0 -0
  108. package/lib/overlay/style/_index.scss +0 -0
  109. package/lib/pop-confirm/style/_index.scss +0 -0
  110. package/lib/popover/style/_index.scss +0 -0
  111. package/lib/popup/style/_index.scss +0 -0
  112. package/lib/progress/style/_index.scss +0 -0
  113. package/lib/radio/style/_index.scss +0 -0
  114. package/lib/rate/rate.js +2 -5
  115. package/lib/rate/rate.js.map +1 -1
  116. package/lib/rate/style/_index.scss +0 -0
  117. package/lib/split/style/_index.scss +0 -0
  118. package/lib/style/_component.scss +1 -1
  119. package/lib/style/base.css +12 -3
  120. package/lib/style/index.scss +0 -0
  121. package/lib/switch/style/_index.scss +0 -0
  122. package/lib/switch/style/_mixin.scss +0 -0
  123. package/lib/switch/style/index.css +3 -3
  124. package/lib/table/table.js.map +1 -1
  125. package/lib/tag/style/_index.scss +0 -0
  126. package/lib/textarea/style/_index.scss +0 -0
  127. package/lib/time-picker/style/_index.scss +0 -0
  128. package/lib/timeline/style/_index.scss +0 -0
  129. package/lib/tooltip/style/_index.scss +0 -0
  130. package/lib/typography/heading.d.ts +2 -1
  131. package/lib/typography/heading.js +11 -18
  132. package/lib/typography/heading.js.map +1 -1
  133. package/lib/typography/style/_index.scss +0 -18
  134. package/lib/typography/style/index.css +0 -13
  135. package/lib/typography/text.d.ts +2 -1
  136. package/lib/typography/text.js +4 -2
  137. package/lib/typography/text.js.map +1 -1
  138. package/lib/typography/types.d.ts +1 -1
  139. package/lib/with-spin/style/_index.scss +5 -0
  140. package/lib/with-spin/style/index.css +3 -0
  141. package/lib/with-spin/with-spin.d.ts +9 -0
  142. package/lib/with-spin/with-spin.js +22 -0
  143. package/lib/with-spin/with-spin.js.map +1 -0
  144. package/package.json +19 -15
  145. package/es/icon/icon.d.ts +0 -8
  146. package/es/icon/icon.js +0 -25
  147. package/es/icon/icon.js.map +0 -1
  148. package/es/icon/index.d.ts +0 -1
  149. package/es/icon/index.js +0 -9
  150. package/es/icon/index.js.map +0 -1
  151. package/es/icon/style/_index.scss +0 -16
  152. package/es/icon/style/index.css +0 -987
  153. package/es/icon/types.d.ts +0 -15
  154. package/lib/icon/icon.d.ts +0 -8
  155. package/lib/icon/icon.js +0 -28
  156. package/lib/icon/icon.js.map +0 -1
  157. package/lib/icon/index.js +0 -8
  158. package/lib/icon/index.js.map +0 -1
  159. package/lib/icon/style/_index.scss +0 -16
  160. package/lib/icon/style/index.css +0 -987
  161. package/lib/icon/types.d.ts +0 -15
  162. /package/es/{icon → with-spin}/style/index.d.ts +0 -0
  163. /package/es/{icon → with-spin}/style/index.js +0 -0
  164. /package/lib/{icon → with-spin}/style/index.d.ts +0 -0
  165. /package/lib/{icon → with-spin}/style/index.js +0 -0
package/lib/index.js CHANGED
@@ -35,55 +35,55 @@ const require_index$28 = require("./empty/index.js");
35
35
  const require_index$29 = require("./flex/index.js");
36
36
  const require_index$30 = require("./flip/index.js");
37
37
  const require_index$31 = require("./form/index.js");
38
- const require_index$32 = require("./icon/index.js");
39
- const require_index$33 = require("./image/index.js");
40
- const require_index$34 = require("./input/index.js");
41
- const require_index$35 = require("./input-number/index.js");
42
- const require_index$36 = require("./input-password/index.js");
43
- const require_index$37 = require("./keyboard/index.js");
44
- const require_index$38 = require("./layout/index.js");
45
- const require_index$39 = require("./link/index.js");
46
- const require_index$40 = require("./pagination/index.js");
47
- const require_index$41 = require("./list/index.js");
48
- const require_index$42 = require("./loader/index.js");
49
- const require_index$43 = require("./loading-bar/index.js");
50
- const require_index$44 = require("./menu/index.js");
51
- const require_index$45 = require("./message/index.js");
52
- const require_index$46 = require("./native-select/index.js");
53
- const require_index$47 = require("./row/index.js");
54
- const require_index$48 = require("./modal/index.js");
55
- const require_index$49 = require("./notification/index.js");
56
- const require_index$50 = require("./popover/index.js");
57
- const require_index$51 = require("./pop-confirm/index.js");
58
- const require_index$52 = require("./progress/index.js");
59
- const require_index$53 = require("./radio/index.js");
60
- const require_index$54 = require("./rate/index.js");
61
- const require_index$55 = require("./result/index.js");
62
- const require_index$56 = require("./scroll-indicator/index.js");
63
- const require_index$57 = require("./segmented/index.js");
64
- const require_index$58 = require("./select/index.js");
65
- const require_index$59 = require("./skeleton/index.js");
66
- const require_index$60 = require("./tooltip/index.js");
67
- const require_index$61 = require("./slider/index.js");
68
- const require_index$62 = require("./split/index.js");
69
- const require_index$63 = require("./split-button/index.js");
70
- const require_index$64 = require("./space/index.js");
71
- const require_index$65 = require("./speed-dial/index.js");
72
- const require_index$66 = require("./steps/index.js");
73
- const require_index$67 = require("./statistic/index.js");
74
- const require_index$68 = require("./strength-indicator/index.js");
75
- const require_index$69 = require("./switch/index.js");
76
- const require_index$70 = require("./table/index.js");
77
- const require_index$71 = require("./tabs/index.js");
78
- const require_index$72 = require("./tag/index.js");
79
- const require_index$73 = require("./textarea/index.js");
80
- const require_index$74 = require("./timeline/index.js");
81
- const require_index$75 = require("./time-picker/index.js");
82
- const require_index$76 = require("./transfer/index.js");
83
- const require_index$77 = require("./tree/index.js");
84
- const require_index$78 = require("./typography/index.js");
85
- const require_index$79 = require("./upload/index.js");
38
+ const require_index$32 = require("./image/index.js");
39
+ const require_index$33 = require("./input/index.js");
40
+ const require_index$34 = require("./input-number/index.js");
41
+ const require_index$35 = require("./input-password/index.js");
42
+ const require_index$36 = require("./keyboard/index.js");
43
+ const require_index$37 = require("./layout/index.js");
44
+ const require_index$38 = require("./link/index.js");
45
+ const require_index$39 = require("./pagination/index.js");
46
+ const require_index$40 = require("./list/index.js");
47
+ const require_index$41 = require("./loader/index.js");
48
+ const require_index$42 = require("./loading-bar/index.js");
49
+ const require_index$43 = require("./menu/index.js");
50
+ const require_index$44 = require("./message/index.js");
51
+ const require_index$45 = require("./native-select/index.js");
52
+ const require_index$46 = require("./row/index.js");
53
+ const require_index$47 = require("./modal/index.js");
54
+ const require_index$48 = require("./notification/index.js");
55
+ const require_index$49 = require("./popover/index.js");
56
+ const require_index$50 = require("./pop-confirm/index.js");
57
+ const require_index$51 = require("./progress/index.js");
58
+ const require_index$52 = require("./radio/index.js");
59
+ const require_index$53 = require("./rate/index.js");
60
+ const require_index$54 = require("./result/index.js");
61
+ const require_index$55 = require("./scroll-indicator/index.js");
62
+ const require_index$56 = require("./segmented/index.js");
63
+ const require_index$57 = require("./select/index.js");
64
+ const require_index$58 = require("./skeleton/index.js");
65
+ const require_index$59 = require("./tooltip/index.js");
66
+ const require_index$60 = require("./slider/index.js");
67
+ const require_index$61 = require("./split/index.js");
68
+ const require_index$62 = require("./split-button/index.js");
69
+ const require_index$63 = require("./space/index.js");
70
+ const require_index$64 = require("./speed-dial/index.js");
71
+ const require_index$65 = require("./steps/index.js");
72
+ const require_index$66 = require("./statistic/index.js");
73
+ const require_index$67 = require("./strength-indicator/index.js");
74
+ const require_index$68 = require("./switch/index.js");
75
+ const require_index$69 = require("./table/index.js");
76
+ const require_index$70 = require("./tabs/index.js");
77
+ const require_index$71 = require("./tag/index.js");
78
+ const require_index$72 = require("./textarea/index.js");
79
+ const require_index$73 = require("./timeline/index.js");
80
+ const require_index$74 = require("./time-picker/index.js");
81
+ const require_index$75 = require("./transfer/index.js");
82
+ const require_index$76 = require("./tree/index.js");
83
+ const require_index$77 = require("./typography/index.js");
84
+ const require_index$78 = require("./upload/index.js");
86
85
  const require_with_locale = require("./intl-provider/with-locale.js");
86
+ const require_with_spin = require("./with-spin/with-spin.js");
87
87
  const require_zh_CN = require("./locale/zh_CN.js");
88
88
  const require_use_theme = require("./_utils/use-theme.js");
89
89
  exports.Alert = require_index$1;
@@ -115,60 +115,60 @@ exports.Empty = require_index$28;
115
115
  exports.Flex = require_index$29;
116
116
  exports.Flip = require_index$30;
117
117
  exports.Form = require_index$31;
118
- exports.Icon = require_index$32;
119
- exports.Image = require_index$33;
120
- exports.Input = require_index$34;
121
- exports.InputNumber = require_index$35;
122
- exports.InputPassword = require_index$36;
118
+ exports.Image = require_index$32;
119
+ exports.Input = require_index$33;
120
+ exports.InputNumber = require_index$34;
121
+ exports.InputPassword = require_index$35;
123
122
  exports.IntlProvider = require_index$15;
124
- exports.Keyboard = require_index$37;
125
- exports.Layout = require_index$38;
126
- exports.Link = require_index$39;
127
- exports.List = require_index$41;
128
- exports.Loader = require_index$42;
129
- exports.LoadingBar = require_index$43;
130
- exports.Menu = require_index$44;
131
- exports.Message = require_index$45;
132
- exports.Modal = require_index$48;
133
- exports.NativeSelect = require_index$46;
134
- exports.Notification = require_index$49;
123
+ exports.Keyboard = require_index$36;
124
+ exports.Layout = require_index$37;
125
+ exports.Link = require_index$38;
126
+ exports.List = require_index$40;
127
+ exports.Loader = require_index$41;
128
+ exports.LoadingBar = require_index$42;
129
+ exports.Menu = require_index$43;
130
+ exports.Message = require_index$44;
131
+ exports.Modal = require_index$47;
132
+ exports.NativeSelect = require_index$45;
133
+ exports.Notification = require_index$48;
135
134
  exports.Overlay = require_index$26;
136
- exports.Pagination = require_index$40;
137
- exports.PopConfirm = require_index$51;
138
- exports.Popover = require_index$50;
139
- exports.Progress = require_index$52;
140
- exports.Radio = require_index$53;
141
- exports.Rate = require_index$54;
142
- exports.Result = require_index$55;
143
- exports.Row = require_index$47;
144
- exports.ScrollIndicator = require_index$56;
145
- exports.Segmented = require_index$57;
146
- exports.Select = require_index$58;
147
- exports.Skeleton = require_index$59;
148
- exports.Slider = require_index$61;
149
- exports.Space = require_index$64;
150
- exports.SpeedDial = require_index$65;
151
- exports.Split = require_index$62;
152
- exports.SplitButton = require_index$63;
153
- exports.Statistic = require_index$67;
154
- exports.Steps = require_index$66;
135
+ exports.Pagination = require_index$39;
136
+ exports.PopConfirm = require_index$50;
137
+ exports.Popover = require_index$49;
138
+ exports.Progress = require_index$51;
139
+ exports.Radio = require_index$52;
140
+ exports.Rate = require_index$53;
141
+ exports.Result = require_index$54;
142
+ exports.Row = require_index$46;
143
+ exports.ScrollIndicator = require_index$55;
144
+ exports.Segmented = require_index$56;
145
+ exports.Select = require_index$57;
146
+ exports.Skeleton = require_index$58;
147
+ exports.Slider = require_index$60;
148
+ exports.Space = require_index$63;
149
+ exports.SpeedDial = require_index$64;
150
+ exports.Split = require_index$61;
151
+ exports.SplitButton = require_index$62;
152
+ exports.Statistic = require_index$66;
153
+ exports.Steps = require_index$65;
155
154
  exports.Sticky = require_index$2;
156
- exports.StrengthIndicator = require_index$68;
157
- exports.Switch = require_index$69;
158
- exports.Table = require_index$70;
159
- exports.Tabs = require_index$71;
160
- exports.Tag = require_index$72;
161
- exports.Textarea = require_index$73;
162
- exports.TimePicker = require_index$75;
163
- exports.Timeline = require_index$74;
164
- exports.Tooltip = require_index$60;
165
- exports.Transfer = require_index$76;
155
+ exports.StrengthIndicator = require_index$67;
156
+ exports.Switch = require_index$68;
157
+ exports.Table = require_index$69;
158
+ exports.Tabs = require_index$70;
159
+ exports.Tag = require_index$71;
160
+ exports.Textarea = require_index$72;
161
+ exports.TimePicker = require_index$74;
162
+ exports.Timeline = require_index$73;
163
+ exports.Tooltip = require_index$59;
164
+ exports.Transfer = require_index$75;
166
165
  exports.Transition = require_index;
167
- exports.Tree = require_index$77;
168
- exports.Typography = require_index$78;
169
- exports.Upload = require_index$79;
166
+ exports.Tree = require_index$76;
167
+ exports.Typography = require_index$77;
168
+ exports.Upload = require_index$78;
170
169
  exports.en_US = require_en_US;
171
170
  exports.useLocale = require_use_locale.useLocale;
172
171
  exports.useTheme = require_use_theme.useTheme;
173
172
  exports.withLocale = require_with_locale.withLocale;
173
+ exports.withSpin = require_with_spin.withSpin;
174
174
  exports.zh_CN = require_zh_CN;
File without changes
File without changes
File without changes
File without changes
@@ -1,13 +1,13 @@
1
1
  const require_runtime = require("../_virtual/_rolldown/runtime.js");
2
2
  const require_config_context = require("../config-provider/config-context.js");
3
3
  const require_general = require("../_utils/general.js");
4
- const require_index = require("../icon/index.js");
5
4
  const require_sidebar_context = require("./sidebar-context.js");
6
5
  let react = require("react");
7
6
  react = require_runtime.__toESM(react);
8
7
  let classnames = require("classnames");
9
8
  classnames = require_runtime.__toESM(classnames);
10
9
  let react_jsx_runtime = require("react/jsx-runtime");
10
+ let _tiny_design_icons = require("@tiny-design/icons");
11
11
  //#region src/layout/sidebar.tsx
12
12
  const Sidebar = react.default.forwardRef((props, ref) => {
13
13
  const { defaultCollapsed = false, width = 200, collapsedWidth = 70, theme = "light", trigger = null, collapsible = false, onCollapse, className, style, children, prefixCls: customisedCls, ...otherProps } = props;
@@ -35,10 +35,7 @@ const Sidebar = react.default.forwardRef((props, ref) => {
35
35
  className: `${prefixCls}__trigger`,
36
36
  onClick: _collapseBtnOnClick,
37
37
  "aria-label": "Toggle sidebar",
38
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index.default, {
39
- name: "left",
40
- className: `${prefixCls}__trigger-icon`
41
- })
38
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_tiny_design_icons.IconLeft, { className: `${prefixCls}__trigger-icon` })
42
39
  });
43
40
  };
44
41
  (0, react.useEffect)(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.js","names":["React","SidebarContext","getPrefixCls","ConfigContext","Icon"],"sources":["../../src/layout/sidebar.tsx"],"sourcesContent":["import React from 'react';\nimport { useState, useContext, useEffect } from 'react';\nimport classNames from 'classnames';\nimport Icon from '../icon';\nimport { SidebarContext } from './sidebar-context';\nimport { ConfigContext } from '../config-provider/config-context';\nimport { getPrefixCls } from '../_utils/general';\nimport { SidebarProps } from './types';\n\nconst Sidebar = React.forwardRef<HTMLDivElement, SidebarProps>(\n (props: SidebarProps, ref): JSX.Element => {\n const {\n defaultCollapsed = false,\n width = 200,\n collapsedWidth = 70,\n theme = 'light',\n trigger = null,\n collapsible = false,\n onCollapse,\n className,\n style,\n children,\n prefixCls: customisedCls,\n ...otherProps\n } = props;\n\n const [sideCollapsed, setSideCollapsed] = useState(\n 'collapsed' in props ? props.collapsed : defaultCollapsed\n );\n const sidebarContext = useContext(SidebarContext);\n const sidebarWidth = sideCollapsed ? collapsedWidth : width;\n\n const outerStyle = {\n ...style,\n width: sidebarWidth,\n maxWidth: sidebarWidth,\n minWidth: sidebarWidth,\n };\n\n const configContext = useContext(ConfigContext);\n const prefixCls = getPrefixCls('layout-sidebar', configContext.prefixCls, customisedCls);\n const cls = classNames(prefixCls, className, {\n [`${prefixCls}_light`]: theme === 'light',\n });\n\n const _collapseBtnOnClick = () => {\n const collapsedVal = !sideCollapsed;\n if (!('collapsed' in props)) {\n setSideCollapsed(collapsedVal);\n }\n onCollapse && onCollapse(collapsedVal);\n };\n\n const renderTrigger = () => {\n if (!collapsible) {\n return null;\n }\n\n if (trigger) {\n return trigger;\n }\n\n return (\n <button type=\"button\" className={`${prefixCls}__trigger`} onClick={_collapseBtnOnClick} aria-label=\"Toggle sidebar\">\n <Icon name=\"left\" className={`${prefixCls}__trigger-icon`} />\n </button>\n );\n };\n\n useEffect(() => {\n 'collapsed' in props && setSideCollapsed(props.collapsed);\n sidebarContext.addSidebar();\n\n return () => {\n sidebarContext.removeSidebar();\n };\n }, [props, sidebarContext]);\n\n return (\n <div {...otherProps} ref={ref} className={cls} style={outerStyle}>\n <div className={`${prefixCls}__children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AAe,eAAe;;IAE/B,CAAC,OAAO,eAAe,CAAC;AAE3B,QACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EAAK,GAAI;EAAiB;EAAK,WAAW;EAAK,OAAO;YAAtD,CACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;GAAK,WAAW,GAAG,UAAU;GAAc;GAAe,CAAA,EACzD,eAAe,CACZ;;EAGX;AAED,QAAQ,cAAc"}
1
+ {"version":3,"file":"sidebar.js","names":["React","SidebarContext","getPrefixCls","ConfigContext","IconLeft"],"sources":["../../src/layout/sidebar.tsx"],"sourcesContent":["import React from 'react';\nimport { useState, useContext, useEffect } from 'react';\nimport classNames from 'classnames';\nimport { IconLeft } from '@tiny-design/icons';\nimport { SidebarContext } from './sidebar-context';\nimport { ConfigContext } from '../config-provider/config-context';\nimport { getPrefixCls } from '../_utils/general';\nimport { SidebarProps } from './types';\n\nconst Sidebar = React.forwardRef<HTMLDivElement, SidebarProps>(\n (props: SidebarProps, ref): JSX.Element => {\n const {\n defaultCollapsed = false,\n width = 200,\n collapsedWidth = 70,\n theme = 'light',\n trigger = null,\n collapsible = false,\n onCollapse,\n className,\n style,\n children,\n prefixCls: customisedCls,\n ...otherProps\n } = props;\n\n const [sideCollapsed, setSideCollapsed] = useState(\n 'collapsed' in props ? props.collapsed : defaultCollapsed\n );\n const sidebarContext = useContext(SidebarContext);\n const sidebarWidth = sideCollapsed ? collapsedWidth : width;\n\n const outerStyle = {\n ...style,\n width: sidebarWidth,\n maxWidth: sidebarWidth,\n minWidth: sidebarWidth,\n };\n\n const configContext = useContext(ConfigContext);\n const prefixCls = getPrefixCls('layout-sidebar', configContext.prefixCls, customisedCls);\n const cls = classNames(prefixCls, className, {\n [`${prefixCls}_light`]: theme === 'light',\n });\n\n const _collapseBtnOnClick = () => {\n const collapsedVal = !sideCollapsed;\n if (!('collapsed' in props)) {\n setSideCollapsed(collapsedVal);\n }\n onCollapse && onCollapse(collapsedVal);\n };\n\n const renderTrigger = () => {\n if (!collapsible) {\n return null;\n }\n\n if (trigger) {\n return trigger;\n }\n\n return (\n <button type=\"button\" className={`${prefixCls}__trigger`} onClick={_collapseBtnOnClick} aria-label=\"Toggle sidebar\">\n <IconLeft className={`${prefixCls}__trigger-icon`} />\n </button>\n );\n };\n\n useEffect(() => {\n 'collapsed' in props && setSideCollapsed(props.collapsed);\n sidebarContext.addSidebar();\n\n return () => {\n sidebarContext.removeSidebar();\n };\n }, [props, sidebarContext]);\n\n return (\n <div {...otherProps} ref={ref} className={cls} style={outerStyle}>\n <div className={`${prefixCls}__children`}>{children}</div>\n {renderTrigger()}\n </div>\n );\n }\n);\n\nSidebar.displayName = 'Sidebar';\n\nexport default Sidebar;\n"],"mappings":";;;;;;;;;;;AASA,MAAM,UAAUA,MAAAA,QAAM,YACnB,OAAqB,QAAqB;CACzC,MAAM,EACJ,mBAAmB,OACnB,QAAQ,KACR,iBAAiB,IACjB,QAAQ,SACR,UAAU,MACV,cAAc,OACd,YACA,WACA,OACA,UACA,WAAW,eACX,GAAG,eACD;CAEJ,MAAM,CAAC,eAAe,qBAAA,GAAA,MAAA,UACpB,eAAe,QAAQ,MAAM,YAAY,iBAC1C;CACD,MAAM,kBAAA,GAAA,MAAA,YAA4BC,wBAAAA,eAAe;CACjD,MAAM,eAAe,gBAAgB,iBAAiB;CAEtD,MAAM,aAAa;EACjB,GAAG;EACH,OAAO;EACP,UAAU;EACV,UAAU;EACX;CAGD,MAAM,YAAYC,gBAAAA,aAAa,mBAAA,GAAA,MAAA,YADEC,uBAAAA,cAAc,CACgB,WAAW,cAAc;CACxF,MAAM,OAAA,GAAA,WAAA,SAAiB,WAAW,WAAW,GAC1C,GAAG,UAAU,UAAU,UAAU,SACnC,CAAC;CAEF,MAAM,4BAA4B;EAChC,MAAM,eAAe,CAAC;AACtB,MAAI,EAAE,eAAe,OACnB,kBAAiB,aAAa;AAEhC,gBAAc,WAAW,aAAa;;CAGxC,MAAM,sBAAsB;AAC1B,MAAI,CAAC,YACH,QAAO;AAGT,MAAI,QACF,QAAO;AAGT,SACE,iBAAA,GAAA,kBAAA,KAAC,UAAD;GAAQ,MAAK;GAAS,WAAW,GAAG,UAAU;GAAY,SAAS;GAAqB,cAAW;aACjG,iBAAA,GAAA,kBAAA,KAACC,mBAAAA,UAAD,EAAU,WAAW,GAAG,UAAU,iBAAmB,CAAA;GAC9C,CAAA;;AAIb,EAAA,GAAA,MAAA,iBAAgB;AACd,iBAAe,SAAS,iBAAiB,MAAM,UAAU;AACzD,iBAAe,YAAY;AAE3B,eAAa;AACX,kBAAe,eAAe;;IAE/B,CAAC,OAAO,eAAe,CAAC;AAE3B,QACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EAAK,GAAI;EAAiB;EAAK,WAAW;EAAK,OAAO;YAAtD,CACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;GAAK,WAAW,GAAG,UAAU;GAAc;GAAe,CAAA,EACzD,eAAe,CACZ;;EAGX;AAED,QAAQ,cAAc"}
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","names":["React","ConfigContext","getPrefixCls","useVirtualScroll","Pagination"],"sources":["../../src/list/list.tsx"],"sourcesContent":["import React, { useContext, useState } from 'react';\nimport classNames from 'classnames';\nimport { ConfigContext } from '../config-provider/config-context';\nimport { getPrefixCls } from '../_utils/general';\nimport { useVirtualScroll } from '../_utils/use-virtual-scroll';\nimport Pagination from '../pagination';\nimport { ListProps } from './types';\n\nconst ITEM_HEIGHT_MAP = { sm: 41, md: 49, lg: 57 } as const;\n\nconst List = React.forwardRef<HTMLDivElement, ListProps>((props, ref) => {\n const {\n dataSource = [],\n renderItem,\n header,\n footer,\n loading = false,\n bordered = false,\n split = true,\n size,\n grid,\n locale,\n virtual = false,\n height,\n itemHeight: itemHeightProp,\n pagination,\n prefixCls: customisedCls,\n className,\n style,\n children,\n ...otherProps\n } = props;\n\n const configContext = useContext(ConfigContext);\n const prefixCls = getPrefixCls('list', configContext.prefixCls, customisedCls);\n const listSize = size || configContext.componentSize || 'md';\n\n if (virtual && height == null) {\n console.warn('[tiny-ui: List] `height` is required when `virtual` is enabled.');\n }\n if (virtual && grid) {\n console.warn('[tiny-ui: List] `virtual` is not supported with `grid` mode. Falling back to normal rendering.');\n }\n\n const isVirtual = virtual && height != null && !grid;\n\n const [currentPage, setCurrentPage] = useState(1);\n const pageSize = pagination && pagination.pageSize ? pagination.pageSize : 10;\n\n const itemHeight = itemHeightProp ?? ITEM_HEIGHT_MAP[listSize] ?? ITEM_HEIGHT_MAP.md;\n const { visibleRange, totalHeight, offsetY, onScroll } = useVirtualScroll({\n itemCount: dataSource.length,\n itemHeight,\n containerHeight: height ?? 0,\n });\n\n const cls = classNames(prefixCls, className, {\n [`${prefixCls}_${listSize}`]: listSize,\n [`${prefixCls}_bordered`]: bordered,\n [`${prefixCls}_split`]: split,\n [`${prefixCls}_loading`]: loading,\n [`${prefixCls}_grid`]: grid,\n });\n\n const paginatedData = () => {\n if (!pagination) return dataSource;\n const page = pagination.current ?? currentPage;\n const start = (page - 1) * pageSize;\n return dataSource.slice(start, start + pageSize);\n };\n\n const handlePageChange = (page: number) => {\n setCurrentPage(page);\n pagination && pagination.onChange?.(page, pageSize);\n };\n\n const renderItems = () => {\n if (isVirtual) {\n if (dataSource.length === 0) {\n return (\n <div className={`${prefixCls}__empty`}>\n {locale?.emptyText ?? 'No Data'}\n </div>\n );\n }\n if (renderItem) {\n const [start, end] = visibleRange;\n const visibleItems = dataSource.slice(start, end + 1).map((item, i) => renderItem(item, start + i));\n return (\n <div style={{ height: totalHeight, position: 'relative' }}>\n <div style={{ position: 'absolute', top: 0, left: 0, right: 0, transform: `translateY(${offsetY}px)` }}>\n {visibleItems}\n </div>\n </div>\n );\n }\n return children;\n }\n\n const items = paginatedData();\n if (items.length === 0 && !children) {\n return (\n <div className={`${prefixCls}__empty`}>\n {locale?.emptyText ?? 'No Data'}\n </div>\n );\n }\n if (renderItem) {\n const rendered = items.map((item, index) => renderItem(item, index));\n if (grid) {\n return (\n <div\n className={`${prefixCls}__grid`}\n style={{\n display: 'grid',\n gridTemplateColumns: `repeat(${grid.column || 3}, 1fr)`,\n gap: grid.gutter ? `${grid.gutter}px` : undefined,\n }}\n >\n {rendered}\n </div>\n );\n }\n return rendered;\n }\n return children;\n };\n\n const showPagination = pagination && !isVirtual;\n const paginationConfig = pagination && typeof pagination === 'object' ? pagination : undefined;\n const totalItems = paginationConfig?.total ?? dataSource.length;\n const activePage = paginationConfig?.current ?? currentPage;\n\n const bodyCls = classNames(`${prefixCls}__body`, {\n [`${prefixCls}__body_virtual`]: isVirtual,\n });\n\n const bodyStyle: React.CSSProperties | undefined = isVirtual\n ? { height, overflowY: 'auto' }\n : undefined;\n\n return (\n <div {...otherProps} ref={ref} className={cls} style={style}>\n {header && <div className={`${prefixCls}__header`}>{header}</div>}\n <div className={bodyCls} style={bodyStyle} onScroll={isVirtual ? onScroll : undefined}>\n {loading ? (\n <div className={`${prefixCls}__loading`}>Loading...</div>\n ) : (\n renderItems()\n )}\n </div>\n {footer && <div className={`${prefixCls}__footer`}>{footer}</div>}\n {showPagination && (\n <Pagination\n current={activePage}\n total={totalItems}\n pageSize={pageSize}\n align={paginationConfig?.align ?? 'right'}\n size={paginationConfig?.size}\n disabled={paginationConfig?.disabled}\n onChange={(page) => handlePageChange(page)}\n style={{ padding: 16 }}\n />\n )}\n </div>\n );\n});\n\nList.displayName = 'List';\nexport default List;\n"],"mappings":";;;;;;;;;;;AAQA,MAAM,kBAAkB;CAAE,IAAI;CAAI,IAAI;CAAI,IAAI;CAAI;AAElD,MAAM,OAAOA,MAAAA,QAAM,YAAuC,OAAO,QAAQ;CACvE,MAAM,EACJ,aAAa,EAAE,EACf,YACA,QACA,QACA,UAAU,OACV,WAAW,OACX,QAAQ,MACR,MACA,MACA,QACA,UAAU,OACV,QACA,YAAY,gBACZ,YACA,WAAW,eACX,WACA,OACA,UACA,GAAG,eACD;CAEJ,MAAM,iBAAA,GAAA,MAAA,YAA2BC,uBAAAA,cAAc;CA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;cAAY;IAAa,CAAA;GACjE,iBAAA,GAAA,kBAAA,KAAC,OAAD;IAAK,WAAW;IAAS,OAAO;IAAW,UAAU,YAAY,WAAW,KAAA;cACzE,UACC,iBAAA,GAAA,kBAAA,KAAC,OAAD;KAAK,WAAW,GAAG,UAAU;eAAY;KAAgB,CAAA,GAEzD,aAAa;IAEX,CAAA;GACL,UAAU,iBAAA,GAAA,kBAAA,KAAC,OAAD;IAAK,WAAW,GAAG,UAAU;cAAY;IAAa,CAAA;GAChE,kBACC,iBAAA,GAAA,kBAAA,KAACC,cAAAA,SAAD;IACE,SAAS;IACT,OAAO;IACG;IACV,OAAO,kBAAkB,SAAS;IAClC,MAAM,kBAAkB;IACxB,UAAU,kBAAkB;IAC5B,WAAW,SAAS,iBAAiB,KAAK;IAC1C,OAAO,EAAE,SAAS,IAAI;IACtB,CAAA;GAEA;;EAER;AAEF,KAAK,cAAc"}
1
+ {"version":3,"file":"list.js","names":["React","ConfigContext","getPrefixCls","useVirtualScroll","Pagination"],"sources":["../../src/list/list.tsx"],"sourcesContent":["import React, { useContext, useState } from 'react';\nimport classNames from 'classnames';\nimport { ConfigContext } from '../config-provider/config-context';\nimport { getPrefixCls } from '../_utils/general';\nimport { useVirtualScroll } from '../_utils/use-virtual-scroll';\nimport Pagination from '../pagination';\nimport { ListProps } from './types';\n\nconst ITEM_HEIGHT_MAP = { sm: 41, md: 49, lg: 57 } as const;\n\nconst List = React.forwardRef<HTMLDivElement, ListProps>((props, ref) => {\n const {\n dataSource = [],\n renderItem,\n header,\n footer,\n loading = false,\n bordered = false,\n split = true,\n size,\n grid,\n locale,\n virtual = false,\n height,\n itemHeight: itemHeightProp,\n pagination,\n prefixCls: customisedCls,\n className,\n style,\n children,\n ...otherProps\n } = props;\n\n const configContext = useContext(ConfigContext);\n const prefixCls = getPrefixCls('list', configContext.prefixCls, customisedCls);\n const listSize = size || configContext.componentSize || 'md';\n\n if (virtual && height == null) {\n console.warn('[tiny-design: List] `height` is required when `virtual` is enabled.');\n }\n if (virtual && grid) {\n console.warn('[tiny-design: List] `virtual` is not supported with `grid` mode. Falling back to normal rendering.');\n }\n\n const isVirtual = virtual && height != null && !grid;\n\n const [currentPage, setCurrentPage] = useState(1);\n const pageSize = pagination && pagination.pageSize ? pagination.pageSize : 10;\n\n const itemHeight = itemHeightProp ?? ITEM_HEIGHT_MAP[listSize] ?? ITEM_HEIGHT_MAP.md;\n const { visibleRange, totalHeight, offsetY, onScroll } = useVirtualScroll({\n itemCount: dataSource.length,\n itemHeight,\n containerHeight: height ?? 0,\n });\n\n const cls = classNames(prefixCls, className, {\n [`${prefixCls}_${listSize}`]: listSize,\n [`${prefixCls}_bordered`]: bordered,\n [`${prefixCls}_split`]: split,\n [`${prefixCls}_loading`]: loading,\n [`${prefixCls}_grid`]: grid,\n });\n\n const paginatedData = () => {\n if (!pagination) return dataSource;\n const page = pagination.current ?? currentPage;\n const start = (page - 1) * pageSize;\n return dataSource.slice(start, start + pageSize);\n };\n\n const handlePageChange = (page: number) => {\n setCurrentPage(page);\n pagination && pagination.onChange?.(page, pageSize);\n };\n\n const renderItems = () => {\n if (isVirtual) {\n if (dataSource.length === 0) {\n return (\n <div className={`${prefixCls}__empty`}>\n {locale?.emptyText ?? 'No Data'}\n </div>\n );\n }\n if (renderItem) {\n const [start, end] = visibleRange;\n const visibleItems = dataSource.slice(start, end + 1).map((item, i) => renderItem(item, start + i));\n return (\n <div style={{ height: totalHeight, position: 'relative' }}>\n <div style={{ position: 'absolute', top: 0, left: 0, right: 0, transform: `translateY(${offsetY}px)` }}>\n {visibleItems}\n </div>\n </div>\n );\n }\n return children;\n }\n\n const items = paginatedData();\n if (items.length === 0 && !children) {\n return (\n <div className={`${prefixCls}__empty`}>\n {locale?.emptyText ?? 'No Data'}\n </div>\n );\n }\n if (renderItem) {\n const rendered = items.map((item, index) => renderItem(item, index));\n if (grid) {\n return (\n <div\n className={`${prefixCls}__grid`}\n style={{\n display: 'grid',\n gridTemplateColumns: `repeat(${grid.column || 3}, 1fr)`,\n gap: grid.gutter ? `${grid.gutter}px` : undefined,\n }}\n >\n {rendered}\n </div>\n );\n }\n return rendered;\n }\n return children;\n };\n\n const showPagination = pagination && !isVirtual;\n const paginationConfig = pagination && typeof pagination === 'object' ? pagination : undefined;\n const totalItems = paginationConfig?.total ?? dataSource.length;\n const activePage = paginationConfig?.current ?? currentPage;\n\n const bodyCls = classNames(`${prefixCls}__body`, {\n [`${prefixCls}__body_virtual`]: isVirtual,\n });\n\n const bodyStyle: React.CSSProperties | undefined = isVirtual\n ? { height, overflowY: 'auto' }\n : undefined;\n\n return (\n <div {...otherProps} ref={ref} className={cls} style={style}>\n {header && <div className={`${prefixCls}__header`}>{header}</div>}\n <div className={bodyCls} style={bodyStyle} onScroll={isVirtual ? onScroll : undefined}>\n {loading ? (\n <div className={`${prefixCls}__loading`}>Loading...</div>\n ) : (\n renderItems()\n )}\n </div>\n {footer && <div className={`${prefixCls}__footer`}>{footer}</div>}\n {showPagination && (\n <Pagination\n current={activePage}\n total={totalItems}\n pageSize={pageSize}\n align={paginationConfig?.align ?? 'right'}\n size={paginationConfig?.size}\n disabled={paginationConfig?.disabled}\n onChange={(page) => handlePageChange(page)}\n style={{ padding: 16 }}\n />\n )}\n </div>\n );\n});\n\nList.displayName = 'List';\nexport default List;\n"],"mappings":";;;;;;;;;;;AAQA,MAAM,kBAAkB;CAAE,IAAI;CAAI,IAAI;CAAI,IAAI;CAAI;AAElD,MAAM,OAAOA,MAAAA,QAAM,YAAuC,OAAO,QAAQ;CACvE,MAAM,EACJ,aAAa,EAAE,EACf,YACA,QACA,QACA,UAAU,OACV,WAAW,OACX,QAAQ,MACR,MACA,MACA,QACA,UAAU,OACV,QACA,YAAY,gBACZ,YACA,WAAW,eACX,WACA,OACA,UACA,GAAG,eACD;CAEJ,MAAM,iBAAA,GAAA,MAAA,YAA2BC,uBAAAA,cAAc;CAC/C,MAAM,YAAYC,gBAAAA,aAAa,QAAQ,cAAc,WAAW,cAAc;CAC9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WAAW;IAAS,OAAO;IAAW,UAAU,YAAY,WAAW,KAAA;cACzE,UACC,iBAAA,GAAA,kBAAA,KAAC,OAAD;KAAK,WAAW,GAAG,UAAU;eAAY;KAAgB,CAAA,GAEzD,aAAa;IAEX,CAAA;GACL,UAAU,iBAAA,GAAA,kBAAA,KAAC,OAAD;IAAK,WAAW,GAAG,UAAU;cAAY;IAAa,CAAA;GAChE,kBACC,iBAAA,GAAA,kBAAA,KAACC,cAAAA,SAAD;IACE,SAAS;IACT,OAAO;IACG;IACV,OAAO,kBAAkB,SAAS;IAClC,MAAM,kBAAkB;IACxB,UAAU,kBAAkB;IAC5B,WAAW,SAAS,iBAAiB,KAAK;IAC1C,OAAO,EAAE,SAAS,IAAI;IACtB,CAAA;GAEA;;EAER;AAEF,KAAK,cAAc"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/lib/rate/rate.js CHANGED
@@ -1,19 +1,16 @@
1
1
  const require_runtime = require("../_virtual/_rolldown/runtime.js");
2
2
  const require_config_context = require("../config-provider/config-context.js");
3
3
  const require_general = require("../_utils/general.js");
4
- const require_index = require("../icon/index.js");
5
4
  const require_rate_item = require("./rate-item.js");
6
5
  let react = require("react");
7
6
  react = require_runtime.__toESM(react);
8
7
  let classnames = require("classnames");
9
8
  classnames = require_runtime.__toESM(classnames);
10
9
  let react_jsx_runtime = require("react/jsx-runtime");
10
+ let _tiny_design_icons = require("@tiny-design/icons");
11
11
  //#region src/rate/rate.tsx
12
12
  const Rate = react.default.forwardRef((props, ref) => {
13
- const { color = "#FADB14", character = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index.default, {
14
- name: "star-fill",
15
- size: 20
16
- }), clearable = true, half = false, count = 5, defaultValue = 0, disabled = false, onChange, className, style, prefixCls: customisedCls, ...otherProps } = props;
13
+ const { color = "#FADB14", character = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_tiny_design_icons.IconStarFill, { size: 20 }), clearable = true, half = false, count = 5, defaultValue = 0, disabled = false, onChange, className, style, prefixCls: customisedCls, ...otherProps } = props;
17
14
  const prefixCls = require_general.getPrefixCls("rate", (0, react.useContext)(require_config_context.ConfigContext).prefixCls, customisedCls);
18
15
  const cls = (0, classnames.default)(prefixCls, className);
19
16
  const [value, setValue] = (0, react.useState)("value" in props ? props.value : defaultValue);
@@ -1 +1 @@
1
- {"version":3,"file":"rate.js","names":["React","Icon","getPrefixCls","ConfigContext","RateItem"],"sources":["../../src/rate/rate.tsx"],"sourcesContent":["import React, { useState, useEffect, useContext } from 'react';\nimport classNames from 'classnames';\nimport Icon from '../icon';\nimport { ConfigContext } from '../config-provider/config-context';\nimport { getPrefixCls } from '../_utils/general';\nimport { RateProps } from './types';\nimport RateItem from './rate-item';\n\nconst Rate = React.forwardRef<HTMLUListElement, RateProps>(\n (props: RateProps, ref): JSX.Element => {\n const {\n color = '#FADB14',\n character = <Icon name=\"star-fill\" size={20} />,\n clearable = true,\n half = false,\n count = 5,\n defaultValue = 0,\n disabled = false,\n onChange,\n className,\n style,\n prefixCls: customisedCls,\n ...otherProps\n } = props;\n const configContext = useContext(ConfigContext);\n const prefixCls = getPrefixCls('rate', configContext.prefixCls, customisedCls);\n const cls = classNames(prefixCls, className);\n const [value, setValue] = useState<number>(\n 'value' in props ? (props.value as number) : defaultValue\n );\n // tepValue is for setting the value when the mouse is hovering the bar\n const [tmpValue, setTmpValue] = useState<number>(\n 'value' in props ? (props.value as number) : defaultValue\n );\n\n /**\n * Callback when the mouse enters each star item\n * @param index\n */\n const onMouseEnter = (index: number): void => {\n !disabled && setTmpValue(index);\n };\n\n const onClick = (): void => {\n if (!disabled && clearable) {\n const val = tmpValue === value ? 0 : tmpValue;\n setTmpValue(val);\n !('value' in props) && setValue(val);\n onChange && onChange(val);\n } else {\n !('value' in props) && setValue(tmpValue);\n onChange && onChange(tmpValue);\n }\n };\n\n /**\n * When the mouse leaves the rate component\n */\n const onMouseLeave = (): void => {\n setTmpValue(value);\n };\n\n useEffect(() => {\n 'value' in props && setValue(props.value as number);\n }, [props]);\n\n return (\n <ul\n {...otherProps}\n ref={ref}\n className={cls}\n style={style}\n role=\"radiogroup\"\n aria-label=\"Rating\"\n tabIndex={disabled ? -1 : 0}\n onMouseLeave={onMouseLeave}\n onKeyDown={(e: React.KeyboardEvent) => {\n if (disabled) return;\n if (e.key === 'ArrowRight' || e.key === 'ArrowUp') {\n e.preventDefault();\n const step = half ? 0.5 : 1;\n const newVal = Math.min(tmpValue + step, count);\n setTmpValue(newVal);\n !('value' in props) && setValue(newVal);\n onChange?.(newVal);\n } else if (e.key === 'ArrowLeft' || e.key === 'ArrowDown') {\n e.preventDefault();\n const step = half ? 0.5 : 1;\n const newVal = Math.max(tmpValue - step, 0);\n setTmpValue(newVal);\n !('value' in props) && setValue(newVal);\n onChange?.(newVal);\n }\n }}>\n {Array(count)\n .fill(0)\n .map((_, idx) => (\n <RateItem\n key={idx}\n index={idx + 1}\n half={half}\n character={character}\n prefixCls={prefixCls}\n onMouseEnter={onMouseEnter}\n onClick={onClick}\n value={half ? tmpValue : Math.round(tmpValue)}\n color={color}\n />\n ))}\n </ul>\n );\n }\n);\n\nRate.displayName = 'Rate';\n\nexport default Rate;\n"],"mappings":";;;;;;;;;;;AAQA,MAAM,OAAOA,MAAAA,QAAM,YAChB,OAAkB,QAAqB;CACtC,MAAM,EACJ,QAAQ,WACR,YAAY,iBAAA,GAAA,kBAAA,KAACC,cAAAA,SAAD;EAAM,MAAK;EAAY,MAAM;EAAM,CAAA,EAC/C,YAAY,MACZ,OAAO,OACP,QAAQ,GACR,eAAe,GACf,WAAW,OACX,UACA,WACA,OACA,WAAW,eACX,GAAG,eACD;CAEJ,MAAM,YAAYC,gBAAAA,aAAa,SAAA,GAAA,MAAA,YADEC,uBAAAA,cAAc,CACM,WAAW,cAAc;CAC9E,MAAM,OAAA,GAAA,WAAA,SAAiB,WAAW,UAAU;CAC5C,MAAM,CAAC,OAAO,aAAA,GAAA,M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BAAA,GAAA,kBAAA,KAACC,kBAAAA,SAAD;GAEE,OAAO,MAAM;GACP;GACK;GACA;GACG;GACL;GACT,OAAO,OAAO,WAAW,KAAK,MAAM,SAAS;GACtC;GACP,EATK,IASL,CACF;EACD,CAAA;EAGV;AAED,KAAK,cAAc"}
1
+ {"version":3,"file":"rate.js","names":["React","IconStarFill","getPrefixCls","ConfigContext","RateItem"],"sources":["../../src/rate/rate.tsx"],"sourcesContent":["import React, { useState, useEffect, useContext } from 'react';\nimport classNames from 'classnames';\nimport { IconStarFill } from '@tiny-design/icons';\nimport { ConfigContext } from '../config-provider/config-context';\nimport { getPrefixCls } from '../_utils/general';\nimport { RateProps } from './types';\nimport RateItem from './rate-item';\n\nconst Rate = React.forwardRef<HTMLUListElement, RateProps>(\n (props: RateProps, ref): JSX.Element => {\n const {\n color = '#FADB14',\n character = <IconStarFill size={20} />,\n clearable = true,\n half = false,\n count = 5,\n defaultValue = 0,\n disabled = false,\n onChange,\n className,\n style,\n prefixCls: customisedCls,\n ...otherProps\n } = props;\n const configContext = useContext(ConfigContext);\n const prefixCls = getPrefixCls('rate', configContext.prefixCls, customisedCls);\n const cls = classNames(prefixCls, className);\n const [value, setValue] = useState<number>(\n 'value' in props ? (props.value as number) : defaultValue\n );\n // tepValue is for setting the value when the mouse is hovering the bar\n const [tmpValue, setTmpValue] = useState<number>(\n 'value' in props ? (props.value as number) : defaultValue\n );\n\n /**\n * Callback when the mouse enters each star item\n * @param index\n */\n const onMouseEnter = (index: number): void => {\n !disabled && setTmpValue(index);\n };\n\n const onClick = (): void => {\n if (!disabled && clearable) {\n const val = tmpValue === value ? 0 : tmpValue;\n setTmpValue(val);\n !('value' in props) && setValue(val);\n onChange && onChange(val);\n } else {\n !('value' in props) && setValue(tmpValue);\n onChange && onChange(tmpValue);\n }\n };\n\n /**\n * When the mouse leaves the rate component\n */\n const onMouseLeave = (): void => {\n setTmpValue(value);\n };\n\n useEffect(() => {\n 'value' in props && setValue(props.value as number);\n }, [props]);\n\n return (\n <ul\n {...otherProps}\n ref={ref}\n className={cls}\n style={style}\n role=\"radiogroup\"\n aria-label=\"Rating\"\n tabIndex={disabled ? -1 : 0}\n onMouseLeave={onMouseLeave}\n onKeyDown={(e: React.KeyboardEvent) => {\n if (disabled) return;\n if (e.key === 'ArrowRight' || e.key === 'ArrowUp') {\n e.preventDefault();\n const step = half ? 0.5 : 1;\n const newVal = Math.min(tmpValue + step, count);\n setTmpValue(newVal);\n !('value' in props) && setValue(newVal);\n onChange?.(newVal);\n } else if (e.key === 'ArrowLeft' || e.key === 'ArrowDown') {\n e.preventDefault();\n const step = half ? 0.5 : 1;\n const newVal = Math.max(tmpValue - step, 0);\n setTmpValue(newVal);\n !('value' in props) && setValue(newVal);\n onChange?.(newVal);\n }\n }}>\n {Array(count)\n .fill(0)\n .map((_, idx) => (\n <RateItem\n key={idx}\n index={idx + 1}\n half={half}\n character={character}\n prefixCls={prefixCls}\n onMouseEnter={onMouseEnter}\n onClick={onClick}\n value={half ? tmpValue : Math.round(tmpValue)}\n color={color}\n />\n ))}\n </ul>\n );\n }\n);\n\nRate.displayName = 'Rate';\n\nexport default Rate;\n"],"mappings":";;;;;;;;;;;AAQA,MAAM,OAAOA,MAAAA,QAAM,YAChB,OAAkB,QAAqB;CACtC,MAAM,EACJ,QAAQ,WACR,YAAY,iBAAA,GAAA,kBAAA,KAACC,mBAAAA,cAAD,EAAc,MAAM,IAAM,CAAA,EACtC,YAAY,MACZ,OAAO,OACP,QAAQ,GACR,eAAe,GACf,WAAW,OACX,UACA,WACA,OACA,WAAW,eACX,GAAG,eACD;CAEJ,MAAM,YAAYC,gBAAAA,aAAa,SAAA,GAAA,MAAA,YADEC,uBAAAA,cAAc,CACM,WAAW,cAAc;CAC9E,MAAM,OAAA,GAAA,WAAA,SAAiB,WAAW,UAAU;CAC5C,MAAM,CAAC,OAAO,aAAA,GAAA,MAAA,UACZ,WAAW,QAAS,MAAM,QAAmB,aAC9C;CAED,MAAM,CAAC,UAAU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K;GACA;GACG;GACL;GACT,OAAO,OAAO,WAAW,KAAK,MAAM,SAAS;GACtC;GACP,EATK,IASL,CACF;EACD,CAAA;EAGV;AAED,KAAK,cAAc"}
File without changes
File without changes
@@ -25,7 +25,6 @@
25
25
  @use "../flip/style/index" as *;
26
26
  @use "../form/style/index" as *;
27
27
  @use "../grid/style/index" as *;
28
- @use "../icon/style/index" as *;
29
28
  @use "../image/style/index" as *;
30
29
  @use "../input/style/index" as *;
31
30
  @use "../input-number/style/index" as *;
@@ -76,3 +75,4 @@
76
75
  @use "../tree/style/index" as *;
77
76
  @use "../typography/style/index" as *;
78
77
  @use "../upload/style/index" as *;
78
+ @use "../with-spin/style/index" as *;
@@ -800,6 +800,7 @@ html[data-tiny-theme=dark] {
800
800
  --ty-calendar-hover: #2a2a2a;
801
801
  }
802
802
  }
803
+ /* stylelint-disable scss/comment-no-empty */
803
804
  /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
804
805
  /**
805
806
  * 1. Correct the line height in all browsers.
@@ -808,7 +809,9 @@ html[data-tiny-theme=dark] {
808
809
  html {
809
810
  font-size: 14px;
810
811
  line-height: 1.15; /* 1 */
811
- -webkit-text-size-adjust: 100%; /* 2 */
812
+ -webkit-text-size-adjust: 100%;
813
+ -moz-text-size-adjust: 100%;
814
+ text-size-adjust: 100%; /* 2 */
812
815
  }
813
816
 
814
817
  /* Sections
@@ -1000,6 +1003,8 @@ button,
1000
1003
  [type=reset],
1001
1004
  [type=submit] {
1002
1005
  -webkit-appearance: button;
1006
+ -moz-appearance: button;
1007
+ appearance: button;
1003
1008
  }
1004
1009
 
1005
1010
  /**
@@ -1082,7 +1087,9 @@ textarea {
1082
1087
  * 2. Correct the outline style in Safari.
1083
1088
  */
1084
1089
  [type=search] {
1085
- -webkit-appearance: textfield; /* 1 */
1090
+ -webkit-appearance: textfield;
1091
+ -moz-appearance: textfield;
1092
+ appearance: textfield; /* 1 */
1086
1093
  outline-offset: -2px; /* 2 */
1087
1094
  }
1088
1095
 
@@ -1091,6 +1098,7 @@ textarea {
1091
1098
  */
1092
1099
  [type=search]::-webkit-search-decoration {
1093
1100
  -webkit-appearance: none;
1101
+ appearance: none;
1094
1102
  }
1095
1103
 
1096
1104
  /**
@@ -1098,7 +1106,8 @@ textarea {
1098
1106
  * 2. Change font properties to `inherit` in Safari.
1099
1107
  */
1100
1108
  ::-webkit-file-upload-button {
1101
- -webkit-appearance: button; /* 1 */
1109
+ -webkit-appearance: button;
1110
+ appearance: button; /* 1 */
1102
1111
  font: inherit; /* 2 */
1103
1112
  }
1104
1113
 
File without changes
File without changes
File without changes
@@ -112,7 +112,7 @@
112
112
  height: 1em;
113
113
  position: relative;
114
114
  border-width: 2px;
115
- border-color: currentColor currentColor transparent transparent;
115
+ border-color: currentcolor currentcolor transparent transparent;
116
116
  border-style: solid;
117
117
  border-radius: 50%;
118
118
  animation: ty-rotate-reverse 600ms infinite linear;
@@ -144,7 +144,7 @@
144
144
  height: 1em;
145
145
  position: relative;
146
146
  border-width: 2px;
147
- border-color: currentColor currentColor transparent transparent;
147
+ border-color: currentcolor currentcolor transparent transparent;
148
148
  border-style: solid;
149
149
  border-radius: 50%;
150
150
  animation: ty-rotate-reverse 600ms infinite linear;
@@ -176,7 +176,7 @@
176
176
  height: 1em;
177
177
  position: relative;
178
178
  border-width: 2px;
179
- border-color: currentColor currentColor transparent transparent;
179
+ border-color: currentcolor currentcolor transparent transparent;
180
180
  border-style: solid;
181
181
  border-radius: 50%;
182
182
  animation: ty-rotate-reverse 600ms infinite linear;