@tiny-design/react 1.4.0 → 1.5.1

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 (198) hide show
  1. package/es/alert/alert.js +2 -2
  2. package/es/alert/alert.js.map +1 -1
  3. package/es/alert/style/_index.scss +8 -4
  4. package/es/alert/style/index.css +7 -4
  5. package/es/auto-complete/style/_index.scss +4 -5
  6. package/es/auto-complete/style/index.css +4 -5
  7. package/es/breadcrumb/style/index.css +1 -1
  8. package/es/breadcrumb/types.d.ts +1 -1
  9. package/es/button/style/index.css +14 -14
  10. package/es/calendar/style/_index.scss +9 -9
  11. package/es/calendar/style/index.css +9 -9
  12. package/es/card/style/index.css +3 -3
  13. package/es/cascader/style/_index.scss +9 -9
  14. package/es/cascader/style/index.css +9 -9
  15. package/es/checkbox/style/_index.scss +9 -12
  16. package/es/checkbox/style/index.css +9 -12
  17. package/es/collapse/collapse-panel.js +20 -20
  18. package/es/collapse/collapse-panel.js.map +1 -1
  19. package/es/collapse/style/_index.scss +27 -10
  20. package/es/collapse/style/index.css +27 -12
  21. package/es/color-picker/style/_index.scss +7 -7
  22. package/es/color-picker/style/index.css +4 -4
  23. package/es/date-picker/style/_index.scss +1 -1
  24. package/es/date-picker/style/index.css +1 -1
  25. package/es/descriptions/style/_index.scss +5 -6
  26. package/es/descriptions/style/index.css +6 -6
  27. package/es/empty/style/_index.scss +1 -1
  28. package/es/empty/style/index.css +1 -1
  29. package/es/form/style/_index.scss +5 -6
  30. package/es/form/style/index.css +4 -4
  31. package/es/index.d.ts +2 -1
  32. package/es/index.js +2 -1
  33. package/es/input/style/_index.scss +5 -4
  34. package/es/input/style/_mixin.scss +1 -1
  35. package/es/input/style/index.css +21 -20
  36. package/es/input-number/input-number.js +11 -5
  37. package/es/input-number/input-number.js.map +1 -1
  38. package/es/input-number/style/_index.scss +5 -3
  39. package/es/input-number/style/index.css +13 -11
  40. package/es/input-otp/input-otp.js +5 -7
  41. package/es/input-otp/input-otp.js.map +1 -1
  42. package/es/input-otp/style/_index.scss +1 -1
  43. package/es/input-otp/style/index.css +8 -8
  44. package/es/list/list.js +2 -2
  45. package/es/list/list.js.map +1 -1
  46. package/es/list/style/_index.scss +3 -3
  47. package/es/list/style/index.css +3 -3
  48. package/es/marquee/index.d.ts +1 -0
  49. package/es/marquee/index.js +9 -0
  50. package/es/marquee/index.js.map +1 -0
  51. package/es/marquee/marquee.d.ts +8 -0
  52. package/es/marquee/marquee.js +42 -0
  53. package/es/marquee/marquee.js.map +1 -0
  54. package/es/marquee/style/_index.scss +77 -0
  55. package/es/marquee/style/index.css +64 -0
  56. package/es/marquee/style/index.d.ts +1 -0
  57. package/es/marquee/style/index.js +1 -0
  58. package/es/marquee/types.d.ts +21 -0
  59. package/es/native-select/style/index.css +4 -4
  60. package/es/notification/style/_index.scss +1 -1
  61. package/es/notification/style/index.css +1 -1
  62. package/es/pop-confirm/style/_index.scss +1 -1
  63. package/es/pop-confirm/style/index.css +1 -1
  64. package/es/popup/style/_index.scss +9 -9
  65. package/es/popup/style/index.css +10 -10
  66. package/es/radio/style/_index.scss +5 -8
  67. package/es/radio/style/index.css +5 -8
  68. package/es/segmented/style/_index.scss +10 -10
  69. package/es/segmented/style/index.css +9 -9
  70. package/es/select/style/_index.scss +16 -17
  71. package/es/select/style/index.css +15 -16
  72. package/es/speed-dial/style/_index.scss +2 -2
  73. package/es/speed-dial/style/index.css +2 -2
  74. package/es/statistic/style/_index.scss +2 -2
  75. package/es/statistic/style/index.css +2 -2
  76. package/es/strength-indicator/strength-indicator.js +4 -3
  77. package/es/strength-indicator/strength-indicator.js.map +1 -1
  78. package/es/style/_component.scss +1 -0
  79. package/es/style/base.css +57 -0
  80. package/es/table/style/_index.scss +6 -6
  81. package/es/table/style/index.css +5 -5
  82. package/es/tag/style/index.css +1 -1
  83. package/es/tag/tag.js +5 -5
  84. package/es/tag/tag.js.map +1 -1
  85. package/es/textarea/style/index.css +2 -2
  86. package/es/time-picker/style/_index.scss +1 -1
  87. package/es/time-picker/style/index.css +1 -1
  88. package/es/timeline/style/_index.scss +3 -3
  89. package/es/timeline/style/index.css +3 -3
  90. package/es/tooltip/style/index.css +1 -1
  91. package/es/transfer/style/_index.scss +4 -4
  92. package/es/transfer/style/index.css +4 -4
  93. package/es/tree/style/index.css +1 -1
  94. package/es/typography/style/_index.scss +2 -2
  95. package/es/typography/style/index.css +2 -2
  96. package/es/upload/style/_index.scss +4 -4
  97. package/es/upload/style/index.css +4 -4
  98. package/es/waterfall/waterfall.js +7 -2
  99. package/es/waterfall/waterfall.js.map +1 -1
  100. package/lib/alert/alert.js +2 -2
  101. package/lib/alert/alert.js.map +1 -1
  102. package/lib/alert/style/_index.scss +8 -4
  103. package/lib/alert/style/index.css +7 -4
  104. package/lib/auto-complete/style/_index.scss +4 -5
  105. package/lib/auto-complete/style/index.css +4 -5
  106. package/lib/breadcrumb/style/index.css +1 -1
  107. package/lib/breadcrumb/types.d.ts +1 -1
  108. package/lib/button/style/index.css +14 -14
  109. package/lib/calendar/style/_index.scss +9 -9
  110. package/lib/calendar/style/index.css +9 -9
  111. package/lib/card/style/index.css +3 -3
  112. package/lib/cascader/style/_index.scss +9 -9
  113. package/lib/cascader/style/index.css +9 -9
  114. package/lib/checkbox/style/_index.scss +9 -12
  115. package/lib/checkbox/style/index.css +9 -12
  116. package/lib/collapse/collapse-panel.js +20 -20
  117. package/lib/collapse/collapse-panel.js.map +1 -1
  118. package/lib/collapse/style/_index.scss +27 -10
  119. package/lib/collapse/style/index.css +27 -12
  120. package/lib/color-picker/style/_index.scss +7 -7
  121. package/lib/color-picker/style/index.css +4 -4
  122. package/lib/date-picker/style/_index.scss +1 -1
  123. package/lib/date-picker/style/index.css +1 -1
  124. package/lib/descriptions/style/_index.scss +5 -6
  125. package/lib/descriptions/style/index.css +6 -6
  126. package/lib/empty/style/_index.scss +1 -1
  127. package/lib/empty/style/index.css +1 -1
  128. package/lib/form/style/_index.scss +5 -6
  129. package/lib/form/style/index.css +4 -4
  130. package/lib/index.d.ts +2 -1
  131. package/lib/index.js +76 -74
  132. package/lib/input/style/_index.scss +5 -4
  133. package/lib/input/style/_mixin.scss +1 -1
  134. package/lib/input/style/index.css +21 -20
  135. package/lib/input-number/input-number.js +11 -5
  136. package/lib/input-number/input-number.js.map +1 -1
  137. package/lib/input-number/style/_index.scss +5 -3
  138. package/lib/input-number/style/index.css +13 -11
  139. package/lib/input-otp/input-otp.js +5 -7
  140. package/lib/input-otp/input-otp.js.map +1 -1
  141. package/lib/input-otp/style/_index.scss +1 -1
  142. package/lib/input-otp/style/index.css +8 -8
  143. package/lib/list/list.js +2 -2
  144. package/lib/list/list.js.map +1 -1
  145. package/lib/list/style/_index.scss +3 -3
  146. package/lib/list/style/index.css +3 -3
  147. package/lib/marquee/index.js +8 -0
  148. package/lib/marquee/index.js.map +1 -0
  149. package/lib/marquee/marquee.d.ts +8 -0
  150. package/lib/marquee/marquee.js +45 -0
  151. package/lib/marquee/marquee.js.map +1 -0
  152. package/lib/marquee/style/_index.scss +77 -0
  153. package/lib/marquee/style/index.css +64 -0
  154. package/lib/marquee/style/index.d.ts +1 -0
  155. package/lib/marquee/style/index.js +1 -0
  156. package/lib/marquee/types.d.ts +21 -0
  157. package/lib/native-select/style/index.css +4 -4
  158. package/lib/notification/style/_index.scss +1 -1
  159. package/lib/notification/style/index.css +1 -1
  160. package/lib/pop-confirm/style/_index.scss +1 -1
  161. package/lib/pop-confirm/style/index.css +1 -1
  162. package/lib/popup/style/_index.scss +9 -9
  163. package/lib/popup/style/index.css +10 -10
  164. package/lib/radio/style/_index.scss +5 -8
  165. package/lib/radio/style/index.css +5 -8
  166. package/lib/segmented/style/_index.scss +10 -10
  167. package/lib/segmented/style/index.css +9 -9
  168. package/lib/select/style/_index.scss +16 -17
  169. package/lib/select/style/index.css +15 -16
  170. package/lib/speed-dial/style/_index.scss +2 -2
  171. package/lib/speed-dial/style/index.css +2 -2
  172. package/lib/statistic/style/_index.scss +2 -2
  173. package/lib/statistic/style/index.css +2 -2
  174. package/lib/strength-indicator/strength-indicator.js +4 -3
  175. package/lib/strength-indicator/strength-indicator.js.map +1 -1
  176. package/lib/style/_component.scss +1 -0
  177. package/lib/style/base.css +57 -0
  178. package/lib/table/style/_index.scss +6 -6
  179. package/lib/table/style/index.css +5 -5
  180. package/lib/tag/style/index.css +1 -1
  181. package/lib/tag/tag.js +5 -5
  182. package/lib/tag/tag.js.map +1 -1
  183. package/lib/textarea/style/index.css +2 -2
  184. package/lib/time-picker/style/_index.scss +1 -1
  185. package/lib/time-picker/style/index.css +1 -1
  186. package/lib/timeline/style/_index.scss +3 -3
  187. package/lib/timeline/style/index.css +3 -3
  188. package/lib/tooltip/style/index.css +1 -1
  189. package/lib/transfer/style/_index.scss +4 -4
  190. package/lib/transfer/style/index.css +4 -4
  191. package/lib/tree/style/index.css +1 -1
  192. package/lib/typography/style/_index.scss +2 -2
  193. package/lib/typography/style/index.css +2 -2
  194. package/lib/upload/style/_index.scss +4 -4
  195. package/lib/upload/style/index.css +4 -4
  196. package/lib/waterfall/waterfall.js +7 -2
  197. package/lib/waterfall/waterfall.js.map +1 -1
  198. package/package.json +3 -3
package/es/alert/alert.js CHANGED
@@ -24,7 +24,7 @@ const Alert = React.forwardRef((props, forwardedRef) => {
24
24
  const closeBtnOnClick = (e) => {
25
25
  ref.current && setClosedStyle(ref.current);
26
26
  setShow(false);
27
- onClose && onClose(e);
27
+ onClose?.(e);
28
28
  };
29
29
  const closeIcon = (closable || closeText) && /* @__PURE__ */ jsx("button", {
30
30
  type: "button",
@@ -72,7 +72,7 @@ const Alert = React.forwardRef((props, forwardedRef) => {
72
72
  children: [
73
73
  icon && renderIcon(),
74
74
  /* @__PURE__ */ jsxs("div", { children: [title && /* @__PURE__ */ jsx("p", {
75
- className: `${prefixCls}__title`,
75
+ className: classNames(`${prefixCls}__title`, { [`${prefixCls}__title_has-content`]: children }),
76
76
  children: title
77
77
  }), children] }),
78
78
  closeIcon
@@ -1 +1 @@
1
- {"version":3,"file":"alert.js","names":["Transition"],"sources":["../../src/alert/alert.tsx"],"sourcesContent":["import React, { useState, useRef, useContext } from 'react';\nimport classNames from 'classnames';\nimport { ConfigContext } from '../config-provider/config-context';\nimport { getPrefixCls } from '../_utils/general';\nimport { CheckCircle, CloseCircle, InfoCircle, WarningCircle } from '../_utils/components';\nimport { AlertProps } from './types';\nimport Transition from '../transition';\n\nconst setClosedStyle = (node: HTMLElement): void => {\n node.style.borderTopWidth = '0';\n node.style.paddingTop = '0';\n node.style.marginTop = '0';\n node.style.height = '0';\n node.style.paddingBottom = '0';\n node.style.borderBottomWidth = '0';\n node.style.marginBottom = '0';\n};\n\nconst Alert = React.forwardRef<HTMLDivElement, AlertProps>((props, forwardedRef) => {\n const {\n type = 'info',\n iconSize = 14,\n prefixCls: customisedCls,\n title,\n icon,\n closeText,\n closable,\n afterClose,\n onClose,\n children,\n className,\n style,\n ...otherProps\n } = props;\n const [isShow, setShow] = useState(true);\n const ref = useRef<HTMLDivElement | null>(null);\n const configContext = useContext(ConfigContext);\n const prefixCls = getPrefixCls('alert', configContext.prefixCls, customisedCls);\n const cls = classNames(prefixCls, className, [`${prefixCls}_${type}`]);\n\n const closeBtnOnClick = (e: React.MouseEvent<HTMLSpanElement>): void => {\n ref.current && setClosedStyle(ref.current as HTMLDivElement);\n setShow(false);\n onClose && onClose(e);\n };\n\n // Setting close text attribute also allows to be closable\n const closeIcon = (closable || closeText) && (\n <button type=\"button\" className={`${prefixCls}__close-btn`} onClick={closeBtnOnClick} aria-label=\"Close\">\n {closeText || '✕'}\n </button>\n );\n\n const renderIcon = (): React.ReactNode => {\n if (typeof icon === 'boolean') {\n switch (type) {\n case 'success':\n return <CheckCircle size={iconSize} className={`${prefixCls}__icon`} />;\n case 'info':\n return <InfoCircle size={iconSize} className={`${prefixCls}__icon`} />;\n case 'warning':\n return <WarningCircle size={iconSize} className={`${prefixCls}__icon`} />;\n case 'error':\n return <CloseCircle size={iconSize} className={`${prefixCls}__icon`} />;\n }\n }\n\n return icon;\n };\n\n return (\n <Transition timeout={300} in={isShow} nodeRef={ref} onExited={afterClose}>\n <div {...otherProps} role=\"alert\" className={cls} style={style} ref={(node) => {\n ref.current = node;\n if (typeof forwardedRef === 'function') forwardedRef(node);\n else if (forwardedRef) forwardedRef.current = node;\n }}>\n {icon && renderIcon()}\n <div>\n {title && <p className={`${prefixCls}__title`}>{title}</p>}\n {children}\n </div>\n {closeIcon}\n </div>\n </Transition>\n );\n});\n\nAlert.displayName = 'Alert';\n\nexport default Alert;\n"],"mappings":";;;;;;;;AAQA,MAAM,kBAAkB,SAA4B;AAClD,MAAK,MAAM,iBAAiB;AAC5B,MAAK,MAAM,aAAa;AACxB,MAAK,MAAM,YAAY;AACvB,MAAK,MAAM,SAAS;AACpB,MAAK,MAAM,gBAAgB;AAC3B,MAAK,MAAM,oBAAoB;AAC/B,MAAK,MAAM,eAAe;;AAG5B,MAAM,QAAQ,MAAM,YAAwC,OAAO,iBAAiB;CAClF,MAAM,EACJ,OAAO,QACP,WAAW,IACX,WAAW,eACX,OACA,MACA,WACA,UACA,YACA,SACA,UACA,WACA,OACA,GAAG,eACD;CACJ,MAAM,CAAC,QAAQ,WAAW,SAAS,KAAK;CACxC,MAAM,MAAM,OAA8B,KAAK;CAE/C,MAAM,YAAY,aAAa,SADT,WAAW,cAAc,CACO,WAAW,cAAc;CAC/E,MAAM,MAAM,WAAW,WAAW,WAAW,CAAC,GAAG,UAAU,GAAG,OAAO,CAAC;CAEtE,MAAM,mBAAmB,MAA+C;AACtE,MAAI,WAAW,eAAe,IAAI,QAA0B;AAC5D,UAAQ,MAAM;AACd,aAAW,QAAQ,EAAE;;CAIvB,MAAM,aAAa,YAAY,cAC7B,oBAAC,UAAD;EAAQ,MAAK;EAAS,WAAW,GAAG,UAAU;EAAc,SAAS;EAAiB,cAAW;YAC9F,aAAa;EACP,CAAA;CAGX,MAAM,mBAAoC;AACxC,MAAI,OAAO,SAAS,UAClB,SAAQ,MAAR;GACE,KAAK,UACH,QAAO,oBAAC,aAAD;IAAa,MAAM;IAAU,WAAW,GAAG,UAAU;IAAW,CAAA;GACzE,KAAK,OACH,QAAO,oBAAC,YAAD;IAAY,MAAM;IAAU,WAAW,GAAG,UAAU;IAAW,CAAA;GACxE,KAAK,UACH,QAAO,oBAAC,eAAD;IAAe,MAAM;IAAU,WAAW,GAAG,UAAU;IAAW,CAAA;GAC3E,KAAK,QACH,QAAO,oBAAC,aAAD;IAAa,MAAM;IAAU,WAAW,GAAG,UAAU;IAAW,CAAA;;AAI7E,SAAO;;AAGT,QACE,oBAACA,oBAAD;EAAY,SAAS;EAAK,IAAI;EAAQ,SAAS;EAAK,UAAU;YAC5D,qBAAC,OAAD;GAAK,GAAI;GAAY,MAAK;GAAQ,WAAW;GAAY;GAAO,MAAM,SAAS;AAC7E,QAAI,UAAU;AACd,QAAI,OAAO,iBAAiB,WAAY,cAAa,KAAK;aACjD,aAAc,cAAa,UAAU;;aAHhD;IAKG,QAAQ,YAAY;IACrB,qBAAC,OAAD,EAAA,UAAA,CACG,SAAS,oBAAC,KAAD;KAAG,WAAW,GAAG,UAAU;eAAW;KAAU,CAAA,EACzD,SACG,EAAA,CAAA;IACL;IACG;;EACK,CAAA;EAEf;AAEF,MAAM,cAAc"}
1
+ {"version":3,"file":"alert.js","names":["Transition"],"sources":["../../src/alert/alert.tsx"],"sourcesContent":["import React, { useState, useRef, useContext } from 'react';\nimport classNames from 'classnames';\nimport { ConfigContext } from '../config-provider/config-context';\nimport { getPrefixCls } from '../_utils/general';\nimport { CheckCircle, CloseCircle, InfoCircle, WarningCircle } from '../_utils/components';\nimport { AlertProps } from './types';\nimport Transition from '../transition';\n\nconst setClosedStyle = (node: HTMLElement): void => {\n node.style.borderTopWidth = '0';\n node.style.paddingTop = '0';\n node.style.marginTop = '0';\n node.style.height = '0';\n node.style.paddingBottom = '0';\n node.style.borderBottomWidth = '0';\n node.style.marginBottom = '0';\n};\n\nconst Alert = React.forwardRef<HTMLDivElement, AlertProps>((props, forwardedRef) => {\n const {\n type = 'info',\n iconSize = 14,\n prefixCls: customisedCls,\n title,\n icon,\n closeText,\n closable,\n afterClose,\n onClose,\n children,\n className,\n style,\n ...otherProps\n } = props;\n const [isShow, setShow] = useState(true);\n const ref = useRef<HTMLDivElement | null>(null);\n const configContext = useContext(ConfigContext);\n const prefixCls = getPrefixCls('alert', configContext.prefixCls, customisedCls);\n const cls = classNames(prefixCls, className, [`${prefixCls}_${type}`]);\n\n const closeBtnOnClick = (e: React.MouseEvent<HTMLSpanElement>): void => {\n ref.current && setClosedStyle(ref.current as HTMLDivElement);\n setShow(false);\n onClose?.(e);\n };\n\n // Setting close text attribute also allows to be closable\n const closeIcon = (closable || closeText) && (\n <button type=\"button\" className={`${prefixCls}__close-btn`} onClick={closeBtnOnClick} aria-label=\"Close\">\n {closeText || '✕'}\n </button>\n );\n\n const renderIcon = (): React.ReactNode => {\n if (typeof icon === 'boolean') {\n switch (type) {\n case 'success':\n return <CheckCircle size={iconSize} className={`${prefixCls}__icon`} />;\n case 'info':\n return <InfoCircle size={iconSize} className={`${prefixCls}__icon`} />;\n case 'warning':\n return <WarningCircle size={iconSize} className={`${prefixCls}__icon`} />;\n case 'error':\n return <CloseCircle size={iconSize} className={`${prefixCls}__icon`} />;\n }\n }\n\n return icon;\n };\n\n return (\n <Transition timeout={300} in={isShow} nodeRef={ref} onExited={afterClose}>\n <div {...otherProps} role=\"alert\" className={cls} style={style} ref={(node) => {\n ref.current = node;\n if (typeof forwardedRef === 'function') forwardedRef(node);\n else if (forwardedRef) forwardedRef.current = node;\n }}>\n {icon && renderIcon()}\n <div>\n {title && <p className={classNames(`${prefixCls}__title`, { [`${prefixCls}__title_has-content`]: children })}>{title}</p>}\n {children}\n </div>\n {closeIcon}\n </div>\n </Transition>\n );\n});\n\nAlert.displayName = 'Alert';\n\nexport default Alert;\n"],"mappings":";;;;;;;;AAQA,MAAM,kBAAkB,SAA4B;AAClD,MAAK,MAAM,iBAAiB;AAC5B,MAAK,MAAM,aAAa;AACxB,MAAK,MAAM,YAAY;AACvB,MAAK,MAAM,SAAS;AACpB,MAAK,MAAM,gBAAgB;AAC3B,MAAK,MAAM,oBAAoB;AAC/B,MAAK,MAAM,eAAe;;AAG5B,MAAM,QAAQ,MAAM,YAAwC,OAAO,iBAAiB;CAClF,MAAM,EACJ,OAAO,QACP,WAAW,IACX,WAAW,eACX,OACA,MACA,WACA,UACA,YACA,SACA,UACA,WACA,OACA,GAAG,eACD;CACJ,MAAM,CAAC,QAAQ,WAAW,SAAS,KAAK;CACxC,MAAM,MAAM,OAA8B,KAAK;CAE/C,MAAM,YAAY,aAAa,SADT,WAAW,cAAc,CACO,WAAW,cAAc;CAC/E,MAAM,MAAM,WAAW,WAAW,WAAW,CAAC,GAAG,UAAU,GAAG,OAAO,CAAC;CAEtE,MAAM,mBAAmB,MAA+C;AACtE,MAAI,WAAW,eAAe,IAAI,QAA0B;AAC5D,UAAQ,MAAM;AACd,YAAU,EAAE;;CAId,MAAM,aAAa,YAAY,cAC7B,oBAAC,UAAD;EAAQ,MAAK;EAAS,WAAW,GAAG,UAAU;EAAc,SAAS;EAAiB,cAAW;YAC9F,aAAa;EACP,CAAA;CAGX,MAAM,mBAAoC;AACxC,MAAI,OAAO,SAAS,UAClB,SAAQ,MAAR;GACE,KAAK,UACH,QAAO,oBAAC,aAAD;IAAa,MAAM;IAAU,WAAW,GAAG,UAAU;IAAW,CAAA;GACzE,KAAK,OACH,QAAO,oBAAC,YAAD;IAAY,MAAM;IAAU,WAAW,GAAG,UAAU;IAAW,CAAA;GACxE,KAAK,UACH,QAAO,oBAAC,eAAD;IAAe,MAAM;IAAU,WAAW,GAAG,UAAU;IAAW,CAAA;GAC3E,KAAK,QACH,QAAO,oBAAC,aAAD;IAAa,MAAM;IAAU,WAAW,GAAG,UAAU;IAAW,CAAA;;AAI7E,SAAO;;AAGT,QACE,oBAACA,oBAAD;EAAY,SAAS;EAAK,IAAI;EAAQ,SAAS;EAAK,UAAU;YAC5D,qBAAC,OAAD;GAAK,GAAI;GAAY,MAAK;GAAQ,WAAW;GAAY;GAAO,MAAM,SAAS;AAC7E,QAAI,UAAU;AACd,QAAI,OAAO,iBAAiB,WAAY,cAAa,KAAK;aACjD,aAAc,cAAa,UAAU;;aAHhD;IAKG,QAAQ,YAAY;IACrB,qBAAC,OAAD,EAAA,UAAA,CACG,SAAS,oBAAC,KAAD;KAAG,WAAW,WAAW,GAAG,UAAU,UAAU,GAAG,GAAG,UAAU,uBAAuB,UAAU,CAAC;eAAG;KAAU,CAAA,EACxH,SACG,EAAA,CAAA;IACL;IACG;;EACK,CAAA;EAEf;AAEF,MAAM,cAAc"}
@@ -7,9 +7,9 @@
7
7
  box-sizing: border-box;
8
8
  padding: 10px 30px 10px 13px;
9
9
  position: relative;
10
- font-weight: $font-weight;
10
+ font-weight: var(--ty-font-weight);
11
11
  opacity: 1;
12
- font-size: $font-size-base;
12
+ font-size: var(--ty-font-size-base);
13
13
  transition: all 300ms;
14
14
  transform-origin: center top;
15
15
  overflow: hidden;
@@ -22,9 +22,13 @@
22
22
 
23
23
  &__title {
24
24
  box-sizing: border-box;
25
- margin: 0 0 5px;
26
- font-size: 18px;
25
+ margin: 0;
26
+ font-size: 17px;
27
27
  font-weight: 500;
28
+
29
+ &_has-content {
30
+ margin-bottom: 5px;
31
+ }
28
32
  }
29
33
 
30
34
  &__desc {
@@ -4,9 +4,9 @@
4
4
  box-sizing: border-box;
5
5
  padding: 10px 30px 10px 13px;
6
6
  position: relative;
7
- font-weight: 400;
7
+ font-weight: var(--ty-font-weight);
8
8
  opacity: 1;
9
- font-size: 1rem;
9
+ font-size: var(--ty-font-size-base);
10
10
  transition: all 300ms;
11
11
  transform-origin: center top;
12
12
  overflow: hidden;
@@ -18,10 +18,13 @@
18
18
  }
19
19
  .ty-alert__title {
20
20
  box-sizing: border-box;
21
- margin: 0 0 5px;
22
- font-size: 18px;
21
+ margin: 0;
22
+ font-size: 17px;
23
23
  font-weight: 500;
24
24
  }
25
+ .ty-alert__title_has-content {
26
+ margin-bottom: 5px;
27
+ }
25
28
  .ty-alert__desc {
26
29
  box-sizing: border-box;
27
30
  line-height: 16px;
@@ -18,12 +18,11 @@
18
18
  list-style-type: none;
19
19
  background-color: var(--ty-select-dropdown-bg);
20
20
  box-sizing: border-box;
21
- overflow-x: hidden;
22
- overflow-y: auto;
21
+ overflow: hidden auto;
23
22
  z-index: 10;
24
23
  box-shadow: var(--ty-shadow-popup);
25
- border-radius: $border-radius;
26
- font-size: $font-size-base;
24
+ border-radius: var(--ty-border-radius);
25
+ font-size: var(--ty-font-size-base);
27
26
  max-height: $select-dropdown-max-height;
28
27
  }
29
28
 
@@ -32,7 +31,7 @@
32
31
  padding: 16px;
33
32
  text-align: center;
34
33
  color: var(--ty-color-text-quaternary);
35
- font-size: $font-size-sm;
34
+ font-size: var(--ty-font-size-sm);
36
35
  }
37
36
  }
38
37
 
@@ -14,19 +14,18 @@
14
14
  list-style-type: none;
15
15
  background-color: var(--ty-select-dropdown-bg);
16
16
  box-sizing: border-box;
17
- overflow-x: hidden;
18
- overflow-y: auto;
17
+ overflow: hidden auto;
19
18
  z-index: 10;
20
19
  box-shadow: var(--ty-shadow-popup);
21
- border-radius: 2px;
22
- font-size: 1rem;
20
+ border-radius: var(--ty-border-radius);
21
+ font-size: var(--ty-font-size-base);
23
22
  max-height: 300px;
24
23
  }
25
24
  .ty-auto-complete__empty {
26
25
  padding: 16px;
27
26
  text-align: center;
28
27
  color: var(--ty-color-text-quaternary);
29
- font-size: 0.875rem;
28
+ font-size: var(--ty-font-size-sm);
30
29
  }
31
30
 
32
31
  .ty-auto-complete-option {
@@ -5,7 +5,7 @@
5
5
  display: flex;
6
6
  align-items: center;
7
7
  color: var(--ty-color-text-tertiary);
8
- font-size: 1rem;
8
+ font-size: var(--ty-font-size-base);
9
9
  }
10
10
  .ty-breadcrumb-item__separator {
11
11
  margin: 0 8px;
@@ -4,7 +4,7 @@ import React, { ReactElement } from "react";
4
4
  //#region src/breadcrumb/types.d.ts
5
5
  interface BreadcrumbProps extends BaseProps, React.PropsWithoutRef<JSX.IntrinsicElements['nav']> {
6
6
  separator?: React.ReactNode;
7
- children: ReactElement<BreadcrumbItemProps>;
7
+ children: ReactElement<BreadcrumbItemProps> | ReactElement<BreadcrumbItemProps>[];
8
8
  }
9
9
  interface BreadcrumbItemProps extends BaseProps, React.PropsWithoutRef<JSX.IntrinsicElements['li']> {
10
10
  separator?: React.ReactNode;
@@ -41,9 +41,9 @@
41
41
  -webkit-user-select: none;
42
42
  -moz-user-select: none;
43
43
  user-select: none;
44
- border-radius: 2px;
44
+ border-radius: var(--ty-border-radius);
45
45
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
46
- line-height: 1.5;
46
+ line-height: var(--ty-line-height-base);
47
47
  }
48
48
  .ty-btn__loader {
49
49
  display: inline-block;
@@ -59,7 +59,7 @@
59
59
  .ty-btn__icon-container, .ty-btn__loader {
60
60
  display: inline-block;
61
61
  pointer-events: none;
62
- line-height: 1.5;
62
+ line-height: var(--ty-line-height-base);
63
63
  vertical-align: middle;
64
64
  }
65
65
  .ty-btn__icon-container + span, .ty-btn__loader + span {
@@ -311,18 +311,18 @@
311
311
  }
312
312
  .ty-btn_sm {
313
313
  padding: 0 10px;
314
- font-size: 0.875rem;
315
- height: 24px;
314
+ font-size: var(--ty-font-size-sm);
315
+ height: var(--ty-height-sm);
316
316
  }
317
317
  .ty-btn_md {
318
318
  padding: 0 15px;
319
- font-size: 1rem;
320
- height: 32px;
319
+ font-size: var(--ty-font-size-base);
320
+ height: var(--ty-height-md);
321
321
  }
322
322
  .ty-btn_lg {
323
323
  padding: 0 28px;
324
- font-size: 1.25rem;
325
- height: 42px;
324
+ font-size: var(--ty-font-size-lg);
325
+ height: var(--ty-height-lg);
326
326
  }
327
327
  .ty-btn_block {
328
328
  width: 100%;
@@ -331,7 +331,7 @@
331
331
  margin: 0;
332
332
  }
333
333
  .ty-btn_round {
334
- border-radius: 42px;
334
+ border-radius: var(--ty-height-lg);
335
335
  }
336
336
  .ty-btn_loading {
337
337
  position: relative;
@@ -370,12 +370,12 @@
370
370
  z-index: 1;
371
371
  }
372
372
  .ty-btn-group .ty-btn:first-child {
373
- border-top-left-radius: 2px;
374
- border-bottom-left-radius: 2px;
373
+ border-top-left-radius: var(--ty-border-radius);
374
+ border-bottom-left-radius: var(--ty-border-radius);
375
375
  }
376
376
  .ty-btn-group .ty-btn:last-child {
377
- border-top-right-radius: 2px;
378
- border-bottom-right-radius: 2px;
377
+ border-top-right-radius: var(--ty-border-radius);
378
+ border-bottom-right-radius: var(--ty-border-radius);
379
379
  }
380
380
  .ty-btn-group_round .ty-btn:first-child {
381
381
  border-top-left-radius: 30px;
@@ -3,7 +3,7 @@
3
3
  .#{$prefix}-calendar {
4
4
  background: var(--ty-calendar-bg, #fff);
5
5
  border: 1px solid var(--ty-calendar-border, #{$gray-200});
6
- border-radius: $border-radius;
6
+ border-radius: var(--ty-border-radius);
7
7
 
8
8
  &_fullscreen {
9
9
  width: 100%;
@@ -30,7 +30,7 @@
30
30
  border: none;
31
31
  background: transparent;
32
32
  cursor: pointer;
33
- border-radius: $border-radius;
33
+ border-radius: var(--ty-border-radius);
34
34
  font-size: 18px;
35
35
  color: var(--ty-color-text, #{$gray-700});
36
36
 
@@ -41,7 +41,7 @@
41
41
 
42
42
  &__title {
43
43
  font-weight: 500;
44
- font-size: $font-size-base;
44
+ font-size: var(--ty-font-size-base);
45
45
  }
46
46
 
47
47
  &__title-btn {
@@ -51,7 +51,7 @@
51
51
  font-weight: inherit;
52
52
  font-size: inherit;
53
53
  padding: 4px 8px;
54
- border-radius: $border-radius;
54
+ border-radius: var(--ty-border-radius);
55
55
  color: var(--ty-color-text, #{$gray-800});
56
56
 
57
57
  &:hover {
@@ -73,7 +73,7 @@
73
73
  padding: 8px 0;
74
74
  text-align: center;
75
75
  font-weight: 500;
76
- font-size: $font-size-sm;
76
+ font-size: var(--ty-font-size-sm);
77
77
  color: var(--ty-color-text-secondary, #{$gray-600});
78
78
  }
79
79
 
@@ -111,7 +111,7 @@
111
111
  &_selected .#{$prefix}-calendar__cell-inner {
112
112
  background: var(--ty-color-primary, #{$primary-color});
113
113
  color: #fff;
114
- border-radius: $border-radius;
114
+ border-radius: var(--ty-border-radius);
115
115
  }
116
116
 
117
117
  &_selected .#{$prefix}-calendar__cell-date {
@@ -121,7 +121,7 @@
121
121
 
122
122
  &__cell-inner {
123
123
  padding: 4px;
124
- border-radius: $border-radius;
124
+ border-radius: var(--ty-border-radius);
125
125
  min-height: 24px;
126
126
  display: flex;
127
127
  flex-direction: column;
@@ -139,7 +139,7 @@
139
139
  line-height: 24px;
140
140
  min-width: 24px;
141
141
  text-align: center;
142
- font-size: $font-size-sm;
142
+ font-size: var(--ty-font-size-sm);
143
143
  }
144
144
 
145
145
  &__cell-content {
@@ -159,7 +159,7 @@
159
159
  text-align: center;
160
160
  padding: 16px 8px;
161
161
  cursor: pointer;
162
- border-radius: $border-radius;
162
+ border-radius: var(--ty-border-radius);
163
163
  transition: all 0.2s;
164
164
 
165
165
  &:hover {
@@ -1,7 +1,7 @@
1
1
  .ty-calendar {
2
2
  background: var(--ty-calendar-bg, #fff);
3
3
  border: 1px solid var(--ty-calendar-border, #e9ecef);
4
- border-radius: 2px;
4
+ border-radius: var(--ty-border-radius);
5
5
  }
6
6
  .ty-calendar_fullscreen {
7
7
  width: 100%;
@@ -25,7 +25,7 @@
25
25
  border: none;
26
26
  background: transparent;
27
27
  cursor: pointer;
28
- border-radius: 2px;
28
+ border-radius: var(--ty-border-radius);
29
29
  font-size: 18px;
30
30
  color: var(--ty-color-text, #525f7f);
31
31
  }
@@ -34,7 +34,7 @@
34
34
  }
35
35
  .ty-calendar__title {
36
36
  font-weight: 500;
37
- font-size: 1rem;
37
+ font-size: var(--ty-font-size-base);
38
38
  }
39
39
  .ty-calendar__title-btn {
40
40
  border: none;
@@ -43,7 +43,7 @@
43
43
  font-weight: inherit;
44
44
  font-size: inherit;
45
45
  padding: 4px 8px;
46
- border-radius: 2px;
46
+ border-radius: var(--ty-border-radius);
47
47
  color: var(--ty-color-text, #32325d);
48
48
  }
49
49
  .ty-calendar__title-btn:hover {
@@ -61,7 +61,7 @@
61
61
  padding: 8px 0;
62
62
  text-align: center;
63
63
  font-weight: 500;
64
- font-size: 0.875rem;
64
+ font-size: var(--ty-font-size-sm);
65
65
  color: var(--ty-color-text-secondary, #8898aa);
66
66
  }
67
67
  .ty-calendar__cell {
@@ -92,14 +92,14 @@
92
92
  .ty-calendar__cell_selected .ty-calendar__cell-inner {
93
93
  background: var(--ty-color-primary, #6e41bf);
94
94
  color: #fff;
95
- border-radius: 2px;
95
+ border-radius: var(--ty-border-radius);
96
96
  }
97
97
  .ty-calendar__cell_selected .ty-calendar__cell-date {
98
98
  color: inherit;
99
99
  }
100
100
  .ty-calendar__cell-inner {
101
101
  padding: 4px;
102
- border-radius: 2px;
102
+ border-radius: var(--ty-border-radius);
103
103
  min-height: 24px;
104
104
  display: flex;
105
105
  flex-direction: column;
@@ -115,7 +115,7 @@
115
115
  line-height: 24px;
116
116
  min-width: 24px;
117
117
  text-align: center;
118
- font-size: 0.875rem;
118
+ font-size: var(--ty-font-size-sm);
119
119
  }
120
120
  .ty-calendar__cell-content {
121
121
  font-size: 12px;
@@ -131,7 +131,7 @@
131
131
  text-align: center;
132
132
  padding: 16px 8px;
133
133
  cursor: pointer;
134
- border-radius: 2px;
134
+ border-radius: var(--ty-border-radius);
135
135
  transition: all 0.2s;
136
136
  }
137
137
  .ty-calendar__month-cell:hover {
@@ -2,7 +2,7 @@
2
2
  box-sizing: border-box;
3
3
  padding: 0;
4
4
  margin: 0;
5
- border-radius: 2px;
5
+ border-radius: var(--ty-border-radius);
6
6
  transition: all 0.3s;
7
7
  background-color: var(--ty-card-bg);
8
8
  }
@@ -10,7 +10,7 @@
10
10
  margin-top: 15px;
11
11
  }
12
12
  .ty-card > img:first-child {
13
- border-radius: 2px 2px 0 0;
13
+ border-radius: var(--ty-border-radius) var(--ty-border-radius) 0 0;
14
14
  }
15
15
  .ty-card_bordered {
16
16
  border: 1px solid var(--ty-card-border);
@@ -36,7 +36,7 @@
36
36
  font-size: 16px;
37
37
  background: transparent;
38
38
  border-bottom: 1px solid var(--ty-card-border);
39
- border-radius: 2px 2px 0 0;
39
+ border-radius: var(--ty-border-radius) var(--ty-border-radius) 0 0;
40
40
  }
41
41
  .ty-card__body {
42
42
  box-sizing: border-box;
@@ -11,20 +11,20 @@
11
11
  }
12
12
 
13
13
  &_sm &__selector {
14
- height: $height-sm;
15
- font-size: $font-size-sm;
14
+ height: var(--ty-height-sm);
15
+ font-size: var(--ty-font-size-sm);
16
16
  padding: 0 28px 0 8px;
17
17
  }
18
18
 
19
19
  &_md &__selector {
20
- height: $height-md;
21
- font-size: $font-size-base;
20
+ height: var(--ty-height-md);
21
+ font-size: var(--ty-font-size-base);
22
22
  padding: 0 32px 0 10px;
23
23
  }
24
24
 
25
25
  &_lg &__selector {
26
- height: $height-lg;
27
- font-size: $font-size-lg;
26
+ height: var(--ty-height-lg);
27
+ font-size: var(--ty-font-size-lg);
28
28
  padding: 0 36px 0 12px;
29
29
  }
30
30
 
@@ -33,7 +33,7 @@
33
33
  align-items: center;
34
34
  width: 100%;
35
35
  border: 1px solid var(--ty-cascader-border, #{$gray-300});
36
- border-radius: $border-radius;
36
+ border-radius: var(--ty-border-radius);
37
37
  background: var(--ty-cascader-bg, #fff);
38
38
  cursor: pointer;
39
39
  transition: all 0.2s;
@@ -95,9 +95,9 @@
95
95
 
96
96
  &__dropdown {
97
97
  background: var(--ty-cascader-dropdown-bg, #fff);
98
- border-radius: $border-radius;
98
+ border-radius: var(--ty-border-radius);
99
99
  box-shadow: $select-dropdown-shadow;
100
- font-size: $font-size-base;
100
+ font-size: var(--ty-font-size-base);
101
101
  }
102
102
 
103
103
  &__menus {
@@ -8,18 +8,18 @@
8
8
  pointer-events: none;
9
9
  }
10
10
  .ty-cascader_sm .ty-cascader__selector {
11
- height: 24px;
12
- font-size: 0.875rem;
11
+ height: var(--ty-height-sm);
12
+ font-size: var(--ty-font-size-sm);
13
13
  padding: 0 28px 0 8px;
14
14
  }
15
15
  .ty-cascader_md .ty-cascader__selector {
16
- height: 32px;
17
- font-size: 1rem;
16
+ height: var(--ty-height-md);
17
+ font-size: var(--ty-font-size-base);
18
18
  padding: 0 32px 0 10px;
19
19
  }
20
20
  .ty-cascader_lg .ty-cascader__selector {
21
- height: 42px;
22
- font-size: 1.25rem;
21
+ height: var(--ty-height-lg);
22
+ font-size: var(--ty-font-size-lg);
23
23
  padding: 0 36px 0 12px;
24
24
  }
25
25
  .ty-cascader__selector {
@@ -27,7 +27,7 @@
27
27
  align-items: center;
28
28
  width: 100%;
29
29
  border: 1px solid var(--ty-cascader-border, #dee2e6);
30
- border-radius: 2px;
30
+ border-radius: var(--ty-border-radius);
31
31
  background: var(--ty-cascader-bg, #fff);
32
32
  cursor: pointer;
33
33
  transition: all 0.2s;
@@ -79,9 +79,9 @@
79
79
  }
80
80
  .ty-cascader__dropdown {
81
81
  background: var(--ty-cascader-dropdown-bg, #fff);
82
- border-radius: 2px;
82
+ border-radius: var(--ty-border-radius);
83
83
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
84
- font-size: 1rem;
84
+ font-size: var(--ty-font-size-base);
85
85
  }
86
86
  .ty-cascader__menus {
87
87
  display: flex;
@@ -4,7 +4,7 @@
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
  box-sizing: border-box;
@@ -17,10 +17,7 @@
17
17
 
18
18
  &__native {
19
19
  position: absolute;
20
- top: 0;
21
- right: 0;
22
- bottom: 0;
23
- left: 0;
20
+ inset: 0;
24
21
  width: 100%;
25
22
  height: 100%;
26
23
  z-index: 1;
@@ -43,7 +40,7 @@
43
40
  line-height: 1;
44
41
  vertical-align: middle;
45
42
 
46
- &:before {
43
+ &::before {
47
44
  content: '';
48
45
  position: absolute;
49
46
  display: block;
@@ -56,7 +53,7 @@
56
53
  transform: scale(0);
57
54
  }
58
55
 
59
- &:after {
56
+ &::after {
60
57
  transform: rotate(45deg) scaleY(1);
61
58
  pointer-events: none;
62
59
  box-sizing: content-box;
@@ -83,12 +80,12 @@
83
80
  background-color: var(--ty-color-primary);
84
81
  border-color: var(--ty-color-primary);
85
82
 
86
- &:after {
83
+ &::after {
87
84
  content: '';
88
85
  transform: rotate(45deg) scale(1);
89
86
  }
90
87
 
91
- &:before {
88
+ &::before {
92
89
  transform: scale(0);
93
90
  }
94
91
  }
@@ -101,11 +98,11 @@
101
98
  background-color: var(--ty-color-primary);
102
99
  border-color: var(--ty-color-primary);
103
100
 
104
- &:before {
101
+ &::before {
105
102
  transform: scale(1);
106
103
  }
107
104
 
108
- &:after {
105
+ &::after {
109
106
  transform: rotate(45deg) scale(0);
110
107
  }
111
108
  }
@@ -122,7 +119,7 @@
122
119
  background-color: var(--ty-checkbox-disabled-bg);
123
120
  border-color: var(--ty-checkbox-border) !important;
124
121
 
125
- &:after {
122
+ &::after {
126
123
  border-color: var(--ty-color-text-quaternary);
127
124
  }
128
125
 
@@ -2,7 +2,7 @@
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
  box-sizing: border-box;
@@ -12,10 +12,7 @@
12
12
  }
13
13
  .ty-checkbox__native {
14
14
  position: absolute;
15
- top: 0;
16
- right: 0;
17
- bottom: 0;
18
- left: 0;
15
+ inset: 0;
19
16
  width: 100%;
20
17
  height: 100%;
21
18
  z-index: 1;
@@ -37,7 +34,7 @@
37
34
  line-height: 1;
38
35
  vertical-align: middle;
39
36
  }
40
- .ty-checkbox__inner:before {
37
+ .ty-checkbox__inner::before {
41
38
  content: "";
42
39
  position: absolute;
43
40
  display: block;
@@ -49,7 +46,7 @@
49
46
  transition: all 200ms;
50
47
  transform: scale(0);
51
48
  }
52
- .ty-checkbox__inner:after {
49
+ .ty-checkbox__inner::after {
53
50
  transform: rotate(45deg) scaleY(1);
54
51
  pointer-events: none;
55
52
  box-sizing: content-box;
@@ -71,21 +68,21 @@
71
68
  background-color: var(--ty-color-primary);
72
69
  border-color: var(--ty-color-primary);
73
70
  }
74
- .ty-checkbox_checked .ty-checkbox__inner:after {
71
+ .ty-checkbox_checked .ty-checkbox__inner::after {
75
72
  content: "";
76
73
  transform: rotate(45deg) scale(1);
77
74
  }
78
- .ty-checkbox_checked .ty-checkbox__inner:before {
75
+ .ty-checkbox_checked .ty-checkbox__inner::before {
79
76
  transform: scale(0);
80
77
  }
81
78
  .ty-checkbox_indeterminate .ty-checkbox__inner {
82
79
  background-color: var(--ty-color-primary);
83
80
  border-color: var(--ty-color-primary);
84
81
  }
85
- .ty-checkbox_indeterminate .ty-checkbox__inner:before {
82
+ .ty-checkbox_indeterminate .ty-checkbox__inner::before {
86
83
  transform: scale(1);
87
84
  }
88
- .ty-checkbox_indeterminate .ty-checkbox__inner:after {
85
+ .ty-checkbox_indeterminate .ty-checkbox__inner::after {
89
86
  transform: rotate(45deg) scale(0);
90
87
  }
91
88
  .ty-checkbox_disabled .ty-checkbox__native {
@@ -95,7 +92,7 @@
95
92
  background-color: var(--ty-checkbox-disabled-bg);
96
93
  border-color: var(--ty-checkbox-border) !important;
97
94
  }
98
- .ty-checkbox_disabled .ty-checkbox__inner:after {
95
+ .ty-checkbox_disabled .ty-checkbox__inner::after {
99
96
  border-color: var(--ty-color-text-quaternary);
100
97
  }
101
98
  .ty-checkbox_disabled .ty-checkbox__inner + span {