react-miui 0.20.0 → 0.21.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 (319) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/components/form/input/Input.css.d.ts +47 -0
  3. package/dist/components/form/input/Input.css.d.ts.map +1 -0
  4. package/dist/components/form/input/Input.css.js +52 -0
  5. package/dist/components/form/input/Input.css.js.map +1 -0
  6. package/dist/components/form/input/Input.styled.d.ts +68 -36
  7. package/dist/components/form/input/Input.styled.d.ts.map +1 -1
  8. package/dist/components/form/input/Input.styled.js +3 -48
  9. package/dist/components/form/input/Input.styled.js.map +1 -1
  10. package/dist/components/form/textarea/TextArea.d.ts.map +1 -0
  11. package/dist/components/form/{TextArea.js → textarea/TextArea.js} +3 -10
  12. package/dist/components/form/textarea/TextArea.js.map +1 -0
  13. package/dist/components/form/textarea/TextArea.stories.d.ts +8 -0
  14. package/dist/components/form/textarea/TextArea.stories.d.ts.map +1 -0
  15. package/dist/components/form/textarea/TextArea.stories.js +15 -0
  16. package/dist/components/form/textarea/TextArea.stories.js.map +1 -0
  17. package/dist/components/{layout/list/Value.styled.d.ts → form/textarea/TextArea.styled.d.ts} +24 -12
  18. package/dist/components/form/textarea/TextArea.styled.d.ts.map +1 -0
  19. package/dist/components/form/textarea/TextArea.styled.js +9 -0
  20. package/dist/components/form/textarea/TextArea.styled.js.map +1 -0
  21. package/dist/components/icons/Icon.js +1 -2
  22. package/dist/components/icons/Icon.js.map +1 -1
  23. package/dist/components/layout/list/Header.d.ts +174 -7
  24. package/dist/components/layout/list/Header.d.ts.map +1 -1
  25. package/dist/components/layout/list/Header.js +36 -11
  26. package/dist/components/layout/list/Header.js.map +1 -1
  27. package/dist/components/layout/list/Header.stories.d.ts +8 -0
  28. package/dist/components/layout/list/Header.stories.d.ts.map +1 -0
  29. package/dist/components/layout/list/Header.stories.js +33 -0
  30. package/dist/components/layout/list/Header.stories.js.map +1 -0
  31. package/dist/components/layout/list/Item.d.ts +88 -7
  32. package/dist/components/layout/list/Item.d.ts.map +1 -1
  33. package/dist/components/layout/list/Item.js +66 -33
  34. package/dist/components/layout/list/Item.js.map +1 -1
  35. package/dist/components/layout/list/Item.stories.d.ts +10 -0
  36. package/dist/components/layout/list/Item.stories.d.ts.map +1 -0
  37. package/dist/components/layout/list/Item.stories.js +65 -0
  38. package/dist/components/layout/list/Item.stories.js.map +1 -0
  39. package/dist/components/layout/list/Label.d.ts +83 -5
  40. package/dist/components/layout/list/Label.d.ts.map +1 -1
  41. package/dist/components/layout/list/Label.js +24 -6
  42. package/dist/components/layout/list/Label.js.map +1 -1
  43. package/dist/components/layout/list/Label.stories.d.ts +8 -0
  44. package/dist/components/layout/list/Label.stories.d.ts.map +1 -0
  45. package/dist/components/layout/list/Label.stories.js +35 -0
  46. package/dist/components/layout/list/Label.stories.js.map +1 -0
  47. package/dist/components/layout/list/List.d.ts +86 -7
  48. package/dist/components/layout/list/List.d.ts.map +1 -1
  49. package/dist/components/layout/list/List.js +15 -9
  50. package/dist/components/layout/list/List.js.map +1 -1
  51. package/dist/components/layout/list/List.stories.d.ts +9 -0
  52. package/dist/components/layout/list/List.stories.d.ts.map +1 -0
  53. package/dist/components/layout/list/List.stories.js +53 -0
  54. package/dist/components/layout/list/List.stories.js.map +1 -0
  55. package/dist/components/layout/list/Value.d.ts +81 -1
  56. package/dist/components/layout/list/Value.d.ts.map +1 -1
  57. package/dist/components/layout/list/Value.js +9 -2
  58. package/dist/components/layout/list/Value.js.map +1 -1
  59. package/dist/components/layout/list/Value.stories.d.ts +8 -0
  60. package/dist/components/layout/list/Value.stories.d.ts.map +1 -0
  61. package/dist/components/layout/list/Value.stories.js +29 -0
  62. package/dist/components/layout/list/Value.stories.js.map +1 -0
  63. package/dist/components/layout/section/Section.d.ts +83 -8
  64. package/dist/components/layout/section/Section.d.ts.map +1 -1
  65. package/dist/components/layout/section/Section.js +17 -15
  66. package/dist/components/layout/section/Section.js.map +1 -1
  67. package/dist/components/layout/section/Section.stories.d.ts +8 -0
  68. package/dist/components/layout/section/Section.stories.d.ts.map +1 -0
  69. package/dist/components/layout/section/Section.stories.js +37 -0
  70. package/dist/components/layout/section/Section.stories.js.map +1 -0
  71. package/dist/components/layout/section/SectionContainer.d.ts +80 -5
  72. package/dist/components/layout/section/SectionContainer.d.ts.map +1 -1
  73. package/dist/components/layout/section/SectionContainer.js +9 -8
  74. package/dist/components/layout/section/SectionContainer.js.map +1 -1
  75. package/dist/components/ui/message/Message.d.ts +17 -9
  76. package/dist/components/ui/message/Message.d.ts.map +1 -1
  77. package/dist/components/ui/message/Message.styled.d.ts +17 -9
  78. package/dist/components/ui/message/Message.styled.d.ts.map +1 -1
  79. package/dist/index.d.ts +2 -2
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js +2 -2
  82. package/dist/index.js.map +1 -1
  83. package/dist/scrollbars.css.d.ts +4 -0
  84. package/dist/scrollbars.css.d.ts.map +1 -0
  85. package/dist/scrollbars.css.js +34 -0
  86. package/dist/scrollbars.css.js.map +1 -0
  87. package/dist/theme.d.ts +125 -69
  88. package/dist/theme.d.ts.map +1 -1
  89. package/dist/theme.js +2 -0
  90. package/dist/theme.js.map +1 -1
  91. package/docs/assets/search.js +1 -1
  92. package/docs/classes/Drawer.html +14 -16
  93. package/docs/classes/Pop.html +14 -16
  94. package/docs/classes/ToasterProvider.html +10 -12
  95. package/docs/enums/ICON.html +14 -16
  96. package/docs/functions/Action.html +6 -8
  97. package/docs/functions/Button.html +6 -8
  98. package/docs/functions/Card.html +6 -8
  99. package/docs/functions/Checkbox.html +6 -8
  100. package/docs/functions/Choice.html +7 -9
  101. package/docs/functions/CoveringLoader.html +6 -8
  102. package/docs/functions/DirectionPad.html +6 -8
  103. package/docs/functions/EqualActions.html +6 -8
  104. package/docs/functions/FullLoader.html +6 -8
  105. package/docs/functions/HandleEsc.html +6 -8
  106. package/docs/functions/Header.html +6 -8
  107. package/docs/functions/HeaderIconAction.html +6 -8
  108. package/docs/functions/Icon-1.html +6 -8
  109. package/docs/functions/If.html +6 -8
  110. package/docs/functions/Input.html +7 -9
  111. package/docs/functions/KeyValue.html +6 -8
  112. package/docs/functions/Label.html +6 -8
  113. package/docs/functions/List-1.html +18 -10
  114. package/docs/functions/Loader.html +6 -8
  115. package/docs/functions/Loading.html +6 -8
  116. package/docs/functions/Message.html +6 -8
  117. package/docs/functions/Modal-1.html +6 -8
  118. package/docs/functions/ModalButtons-1.html +6 -8
  119. package/docs/functions/PopLoader.html +6 -8
  120. package/docs/functions/PopOption.html +6 -8
  121. package/docs/functions/SearchContainer.html +6 -8
  122. package/docs/functions/Section.html +146 -0
  123. package/docs/functions/Select.html +6 -8
  124. package/docs/functions/Selector.html +7 -9
  125. package/docs/functions/Spacer.html +6 -8
  126. package/docs/functions/Stats.html +6 -8
  127. package/docs/functions/StickyHeader-1.html +6 -8
  128. package/docs/functions/StickyHeader.Content.html +5 -7
  129. package/docs/functions/Table.html +6 -8
  130. package/docs/functions/TextArea.html +6 -8
  131. package/docs/functions/Toggle.html +6 -8
  132. package/docs/functions/getCssText.html +6 -8
  133. package/docs/functions/styled.html +6 -8
  134. package/docs/functions/useToaster.html +7 -9
  135. package/docs/index.html +6 -8
  136. package/docs/modules/List.html +10 -9
  137. package/docs/modules/Modal.html +6 -8
  138. package/docs/modules/ModalButtons.html +6 -8
  139. package/docs/modules/StickyHeader.html +6 -8
  140. package/docs/modules.html +9 -13
  141. package/docs/pages/tutorials/Test.html +6 -8
  142. package/docs/types/ThemeCSS.html +7 -9
  143. package/docs/variables/List.Header.html +8 -9
  144. package/docs/variables/List.Item.html +54 -0
  145. package/docs/variables/Modal.NegateMargin.html +5 -7
  146. package/docs/variables/ModalButtons.Button.html +5 -7
  147. package/docs/variables/cssReset.html +7 -9
  148. package/docs/variables/miuiScrollbars.html +96 -0
  149. package/esm/components/form/input/Input.css.d.ts +47 -0
  150. package/esm/components/form/input/Input.css.d.ts.map +1 -0
  151. package/esm/components/form/input/Input.css.js +48 -0
  152. package/esm/components/form/input/Input.css.js.map +1 -0
  153. package/esm/components/form/input/Input.styled.d.ts +68 -36
  154. package/esm/components/form/input/Input.styled.d.ts.map +1 -1
  155. package/esm/components/form/input/Input.styled.js +4 -49
  156. package/esm/components/form/input/Input.styled.js.map +1 -1
  157. package/esm/components/form/textarea/TextArea.d.ts.map +1 -0
  158. package/esm/components/form/textarea/TextArea.js +16 -0
  159. package/esm/components/form/textarea/TextArea.js.map +1 -0
  160. package/esm/components/form/textarea/TextArea.stories.d.ts +8 -0
  161. package/esm/components/form/textarea/TextArea.stories.d.ts.map +1 -0
  162. package/esm/components/form/textarea/TextArea.stories.js +12 -0
  163. package/esm/components/form/textarea/TextArea.stories.js.map +1 -0
  164. package/esm/components/{layout/list/Value.styled.d.ts → form/textarea/TextArea.styled.d.ts} +24 -12
  165. package/esm/components/form/textarea/TextArea.styled.d.ts.map +1 -0
  166. package/esm/components/form/textarea/TextArea.styled.js +14 -0
  167. package/esm/components/form/textarea/TextArea.styled.js.map +1 -0
  168. package/esm/components/layout/list/Header.d.ts +174 -7
  169. package/esm/components/layout/list/Header.d.ts.map +1 -1
  170. package/esm/components/layout/list/Header.js +24 -11
  171. package/esm/components/layout/list/Header.js.map +1 -1
  172. package/esm/components/layout/list/Header.stories.d.ts +8 -0
  173. package/esm/components/layout/list/Header.stories.d.ts.map +1 -0
  174. package/esm/components/layout/list/Header.stories.js +27 -0
  175. package/esm/components/layout/list/Header.stories.js.map +1 -0
  176. package/esm/components/layout/list/Item.d.ts +88 -7
  177. package/esm/components/layout/list/Item.d.ts.map +1 -1
  178. package/esm/components/layout/list/Item.js +64 -33
  179. package/esm/components/layout/list/Item.js.map +1 -1
  180. package/esm/components/layout/list/Item.stories.d.ts +10 -0
  181. package/esm/components/layout/list/Item.stories.d.ts.map +1 -0
  182. package/esm/components/layout/list/Item.stories.js +57 -0
  183. package/esm/components/layout/list/Item.stories.js.map +1 -0
  184. package/esm/components/layout/list/Label.d.ts +83 -5
  185. package/esm/components/layout/list/Label.d.ts.map +1 -1
  186. package/esm/components/layout/list/Label.js +12 -6
  187. package/esm/components/layout/list/Label.js.map +1 -1
  188. package/esm/components/layout/list/Label.stories.d.ts +8 -0
  189. package/esm/components/layout/list/Label.stories.d.ts.map +1 -0
  190. package/esm/components/layout/list/Label.stories.js +29 -0
  191. package/esm/components/layout/list/Label.stories.js.map +1 -0
  192. package/esm/components/layout/list/List.d.ts +86 -7
  193. package/esm/components/layout/list/List.d.ts.map +1 -1
  194. package/esm/components/layout/list/List.js +15 -9
  195. package/esm/components/layout/list/List.js.map +1 -1
  196. package/esm/components/layout/list/List.stories.d.ts +9 -0
  197. package/esm/components/layout/list/List.stories.d.ts.map +1 -0
  198. package/esm/components/layout/list/List.stories.js +46 -0
  199. package/esm/components/layout/list/List.stories.js.map +1 -0
  200. package/esm/components/layout/list/Value.d.ts +81 -1
  201. package/esm/components/layout/list/Value.d.ts.map +1 -1
  202. package/esm/components/layout/list/Value.js +9 -1
  203. package/esm/components/layout/list/Value.js.map +1 -1
  204. package/esm/components/layout/list/Value.stories.d.ts +8 -0
  205. package/esm/components/layout/list/Value.stories.d.ts.map +1 -0
  206. package/esm/components/layout/list/Value.stories.js +23 -0
  207. package/esm/components/layout/list/Value.stories.js.map +1 -0
  208. package/esm/components/layout/section/Section.d.ts +83 -8
  209. package/esm/components/layout/section/Section.d.ts.map +1 -1
  210. package/esm/components/layout/section/Section.js +17 -12
  211. package/esm/components/layout/section/Section.js.map +1 -1
  212. package/esm/components/layout/section/Section.stories.d.ts +8 -0
  213. package/esm/components/layout/section/Section.stories.d.ts.map +1 -0
  214. package/esm/components/layout/section/Section.stories.js +31 -0
  215. package/esm/components/layout/section/Section.stories.js.map +1 -0
  216. package/esm/components/layout/section/SectionContainer.d.ts +80 -5
  217. package/esm/components/layout/section/SectionContainer.d.ts.map +1 -1
  218. package/esm/components/layout/section/SectionContainer.js +9 -5
  219. package/esm/components/layout/section/SectionContainer.js.map +1 -1
  220. package/esm/components/ui/message/Message.d.ts +17 -9
  221. package/esm/components/ui/message/Message.d.ts.map +1 -1
  222. package/esm/components/ui/message/Message.styled.d.ts +17 -9
  223. package/esm/components/ui/message/Message.styled.d.ts.map +1 -1
  224. package/esm/index.d.ts +2 -2
  225. package/esm/index.d.ts.map +1 -1
  226. package/esm/index.js +2 -2
  227. package/esm/index.js.map +1 -1
  228. package/esm/scrollbars.css.d.ts +4 -0
  229. package/esm/scrollbars.css.d.ts.map +1 -0
  230. package/esm/scrollbars.css.js +49 -0
  231. package/esm/scrollbars.css.js.map +1 -0
  232. package/esm/theme.d.ts +125 -69
  233. package/esm/theme.d.ts.map +1 -1
  234. package/esm/theme.js +2 -0
  235. package/esm/theme.js.map +1 -1
  236. package/package.json +7 -6
  237. package/src/components/form/input/Input.css.ts +60 -0
  238. package/src/components/form/input/Input.styled.ts +4 -52
  239. package/src/components/form/textarea/TextArea.stories.tsx +21 -0
  240. package/src/components/form/textarea/TextArea.styled.ts +19 -0
  241. package/src/components/form/{TextArea.tsx → textarea/TextArea.tsx} +10 -9
  242. package/src/components/layout/list/Header.stories.tsx +40 -0
  243. package/src/components/layout/list/Header.tsx +43 -26
  244. package/src/components/layout/list/Item.stories.tsx +69 -0
  245. package/src/components/layout/list/Item.tsx +118 -46
  246. package/src/components/layout/list/Label.stories.tsx +45 -0
  247. package/src/components/layout/list/Label.tsx +21 -12
  248. package/src/components/layout/list/List.stories.tsx +84 -0
  249. package/src/components/layout/list/List.tsx +34 -23
  250. package/src/components/layout/list/Value.stories.tsx +37 -0
  251. package/src/components/layout/list/Value.tsx +15 -1
  252. package/src/components/layout/section/Section.stories.tsx +54 -0
  253. package/src/components/layout/section/Section.tsx +27 -27
  254. package/src/components/layout/section/SectionContainer.tsx +10 -13
  255. package/src/demo/components/form/Choice.tsx +3 -3
  256. package/src/demo/components/form/Form.tsx +1 -1
  257. package/src/demo/components/form/Search.tsx +3 -1
  258. package/src/demo/components/form/Toggle.tsx +3 -1
  259. package/src/demo/components/layout/card/Card.tsx +3 -3
  260. package/src/demo/components/ui/icons/Icons.tsx +3 -1
  261. package/src/demo/components/ui/keyValue/KeyValue.tsx +1 -1
  262. package/src/demo/components/ui/modal/Modal.tsx +4 -2
  263. package/src/demo/components/ui/pop/Pop.tsx +1 -1
  264. package/src/demo/componentsMap.ts +0 -52
  265. package/src/index.ts +3 -2
  266. package/src/pages/_app.tsx +2 -0
  267. package/src/scrollbars.css.ts +56 -0
  268. package/src/theme.ts +5 -3
  269. package/dist/components/form/TextArea.d.ts.map +0 -1
  270. package/dist/components/form/TextArea.js.map +0 -1
  271. package/dist/components/layout/list/Header.module.scss +0 -8
  272. package/dist/components/layout/list/Item.module.scss +0 -46
  273. package/dist/components/layout/list/Label.module.scss +0 -9
  274. package/dist/components/layout/list/List.module.scss +0 -8
  275. package/dist/components/layout/list/Value.styled.d.ts.map +0 -1
  276. package/dist/components/layout/list/Value.styled.js +0 -13
  277. package/dist/components/layout/list/Value.styled.js.map +0 -1
  278. package/dist/components/layout/section/Section.module.scss +0 -24
  279. package/dist/components/layout/section/SectionContainer.module.scss +0 -4
  280. package/docs/functions/Item-1.html +0 -109
  281. package/docs/functions/Section-1.html +0 -109
  282. package/docs/modules/Item.html +0 -64
  283. package/docs/modules/Section.html +0 -61
  284. package/docs/variables/Item.Label.html +0 -56
  285. package/docs/variables/Item.Value.html +0 -56
  286. package/docs/variables/Section.Container.html +0 -55
  287. package/esm/components/form/TextArea.d.ts.map +0 -1
  288. package/esm/components/form/TextArea.js +0 -20
  289. package/esm/components/form/TextArea.js.map +0 -1
  290. package/esm/components/layout/list/Header.module.scss +0 -8
  291. package/esm/components/layout/list/Item.module.scss +0 -46
  292. package/esm/components/layout/list/Label.module.scss +0 -9
  293. package/esm/components/layout/list/List.module.scss +0 -8
  294. package/esm/components/layout/list/Value.styled.d.ts.map +0 -1
  295. package/esm/components/layout/list/Value.styled.js +0 -10
  296. package/esm/components/layout/list/Value.styled.js.map +0 -1
  297. package/esm/components/layout/section/Section.module.scss +0 -24
  298. package/esm/components/layout/section/SectionContainer.module.scss +0 -4
  299. package/src/components/layout/list/Header.module.scss +0 -8
  300. package/src/components/layout/list/Item.module.scss +0 -46
  301. package/src/components/layout/list/Label.module.scss +0 -9
  302. package/src/components/layout/list/List.module.scss +0 -8
  303. package/src/components/layout/list/Value.styled.ts +0 -13
  304. package/src/components/layout/section/Section.module.scss +0 -24
  305. package/src/components/layout/section/SectionContainer.module.scss +0 -4
  306. package/src/demo/components/form/Input.tsx +0 -28
  307. package/src/demo/components/layout/list/Header.tsx +0 -23
  308. package/src/demo/components/layout/list/Inset.tsx +0 -23
  309. package/src/demo/components/layout/list/ItemRatio.tsx +0 -20
  310. package/src/demo/components/layout/list/Label.tsx +0 -31
  311. package/src/demo/components/layout/list/List.Item.module.scss +0 -7
  312. package/src/demo/components/layout/list/List.Item.tsx +0 -24
  313. package/src/demo/components/layout/list/Selection.tsx +0 -16
  314. package/src/demo/components/layout/list/Value.module.scss +0 -4
  315. package/src/demo/components/layout/list/Value.tsx +0 -25
  316. package/src/demo/components/layout/section/Section.tsx +0 -33
  317. package/src/demo/components/ui/message/Message.tsx +0 -27
  318. /package/dist/components/form/{TextArea.d.ts → textarea/TextArea.d.ts} +0 -0
  319. /package/esm/components/form/{TextArea.d.ts → textarea/TextArea.d.ts} +0 -0
package/esm/theme.d.ts CHANGED
@@ -66,17 +66,25 @@ declare const styled: <Type extends import("react").ComponentType<any> | keyof J
66
66
  tableStripedBg: string;
67
67
  };
68
68
  }, import("@stitches/react/types/config").DefaultThemeMap, {
69
- mx: (value: string) => {
70
- marginLeft: string;
71
- marginRight: string;
69
+ mx: (value: string | number) => {
70
+ marginLeft: string | number;
71
+ marginRight: string | number;
72
72
  };
73
- my: (value: string) => {
74
- marginTop: string;
75
- marginBottom: string;
73
+ my: (value: string | number) => {
74
+ marginTop: string | number;
75
+ marginBottom: string | number;
76
76
  };
77
- size: (value: string) => {
78
- width: string;
79
- height: string;
77
+ px: (value: string | number) => {
78
+ paddingLeft: string | number;
79
+ paddingRight: string | number;
80
+ };
81
+ py: (value: string | number) => {
82
+ paddingTop: string | number;
83
+ paddingBottom: string | number;
84
+ };
85
+ size: (value: string | number) => {
86
+ width: string | number;
87
+ height: string | number;
80
88
  };
81
89
  }>>(type: Type, ...composers: { [K in keyof Composers]: string extends Composers[K] ? Composers[K] : Composers[K] extends string | import("react").ComponentType<any> | import("@stitches/react/types/util").Function ? Composers[K] : import("@stitches/react/types/stitches").RemoveIndex<CSS> & {
82
90
  variants?: {
@@ -85,11 +93,11 @@ declare const styled: <Type extends import("react").ComponentType<any> | keyof J
85
93
  [x: number]: CSS;
86
94
  };
87
95
  };
88
- compoundVariants?: (("variants" extends keyof Composers[K] ? Composers[K][keyof Composers[K] & "variants"] extends infer T ? { [Name in keyof T]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]>; } : never : import("@stitches/react/types/util").WideObject) & {
96
+ compoundVariants?: (("variants" extends keyof Composers[K] ? { [Name in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]>; } : import("@stitches/react/types/util").WideObject) & {
89
97
  css: CSS;
90
98
  })[];
91
- defaultVariants?: "variants" extends keyof Composers[K] ? Composers[K][keyof Composers[K] & "variants"] extends infer T_1 ? { [Name_1 in keyof T_1]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]>; } : never : import("@stitches/react/types/util").WideObject;
92
- } & CSS & (Composers[K] extends infer T_2 ? { [K2 in keyof T_2]: K2 extends "compoundVariants" | "defaultVariants" | "variants" ? unknown : K2 extends keyof CSS ? CSS[K2] : unknown; } : never); }) => StyledComponent<Type, import("@stitches/react/types/styled-component").StyledComponentProps<Composers>, {}, import("@stitches/react/types/css-util").CSS<{}, {
99
+ defaultVariants?: "variants" extends keyof Composers[K] ? { [Name_1 in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]>; } : import("@stitches/react/types/util").WideObject;
100
+ } & CSS & { [K2 in keyof Composers[K]]: K2 extends "compoundVariants" | "defaultVariants" | "variants" ? unknown : K2 extends keyof CSS ? CSS[K2] : unknown; }; }) => StyledComponent<Type, import("@stitches/react/types/styled-component").StyledComponentProps<Composers>, {}, import("@stitches/react/types/css-util").CSS<{}, {
93
101
  colors: {
94
102
  background: string;
95
103
  mainColor: string;
@@ -148,17 +156,25 @@ declare const styled: <Type extends import("react").ComponentType<any> | keyof J
148
156
  tableStripedBg: string;
149
157
  };
150
158
  }, import("@stitches/react/types/config").DefaultThemeMap, {
151
- mx: (value: string) => {
152
- marginLeft: string;
153
- marginRight: string;
159
+ mx: (value: string | number) => {
160
+ marginLeft: string | number;
161
+ marginRight: string | number;
162
+ };
163
+ my: (value: string | number) => {
164
+ marginTop: string | number;
165
+ marginBottom: string | number;
166
+ };
167
+ px: (value: string | number) => {
168
+ paddingLeft: string | number;
169
+ paddingRight: string | number;
154
170
  };
155
- my: (value: string) => {
156
- marginTop: string;
157
- marginBottom: string;
171
+ py: (value: string | number) => {
172
+ paddingTop: string | number;
173
+ paddingBottom: string | number;
158
174
  };
159
- size: (value: string) => {
160
- width: string;
161
- height: string;
175
+ size: (value: string | number) => {
176
+ width: string | number;
177
+ height: string | number;
162
178
  };
163
179
  }>>, css: <Composers extends (string | import("react").JSXElementConstructor<any> | import("react").ExoticComponent<any> | import("@stitches/react/types/util").Function | {
164
180
  [name: string]: unknown;
@@ -221,17 +237,25 @@ declare const styled: <Type extends import("react").ComponentType<any> | keyof J
221
237
  tableStripedBg: string;
222
238
  };
223
239
  }, import("@stitches/react/types/config").DefaultThemeMap, {
224
- mx: (value: string) => {
225
- marginLeft: string;
226
- marginRight: string;
240
+ mx: (value: string | number) => {
241
+ marginLeft: string | number;
242
+ marginRight: string | number;
227
243
  };
228
- my: (value: string) => {
229
- marginTop: string;
230
- marginBottom: string;
244
+ my: (value: string | number) => {
245
+ marginTop: string | number;
246
+ marginBottom: string | number;
231
247
  };
232
- size: (value: string) => {
233
- width: string;
234
- height: string;
248
+ px: (value: string | number) => {
249
+ paddingLeft: string | number;
250
+ paddingRight: string | number;
251
+ };
252
+ py: (value: string | number) => {
253
+ paddingTop: string | number;
254
+ paddingBottom: string | number;
255
+ };
256
+ size: (value: string | number) => {
257
+ width: string | number;
258
+ height: string | number;
235
259
  };
236
260
  }>>(...composers: { [K in keyof Composers]: string extends Composers[K] ? Composers[K] : Composers[K] extends string | import("react").JSXElementConstructor<any> | import("react").ExoticComponent<any> | import("@stitches/react/types/util").Function ? Composers[K] : import("@stitches/react/types/stitches").RemoveIndex<CSS> & {
237
261
  variants?: {
@@ -240,11 +264,11 @@ declare const styled: <Type extends import("react").ComponentType<any> | keyof J
240
264
  [x: number]: CSS;
241
265
  };
242
266
  };
243
- compoundVariants?: (("variants" extends keyof Composers[K] ? Composers[K][keyof Composers[K] & "variants"] extends infer T ? { [Name in keyof T]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]>; } : never : import("@stitches/react/types/util").WideObject) & {
267
+ compoundVariants?: (("variants" extends keyof Composers[K] ? { [Name in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]>; } : import("@stitches/react/types/util").WideObject) & {
244
268
  css: CSS;
245
269
  })[];
246
- defaultVariants?: "variants" extends keyof Composers[K] ? Composers[K][keyof Composers[K] & "variants"] extends infer T_1 ? { [Name_1 in keyof T_1]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]>; } : never : import("@stitches/react/types/util").WideObject;
247
- } & CSS & (Composers[K] extends infer T_2 ? { [K2 in keyof T_2]: K2 extends "compoundVariants" | "defaultVariants" | "variants" ? unknown : K2 extends keyof CSS ? CSS[K2] : unknown; } : never); }) => import("@stitches/react/types/styled-component").CssComponent<import("@stitches/react/types/styled-component").StyledComponentType<Composers>, import("@stitches/react/types/styled-component").StyledComponentProps<Composers>, {}, CSS>, globalCss: <Styles extends {
270
+ defaultVariants?: "variants" extends keyof Composers[K] ? { [Name_1 in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]>; } : import("@stitches/react/types/util").WideObject;
271
+ } & CSS & { [K2 in keyof Composers[K]]: K2 extends "compoundVariants" | "defaultVariants" | "variants" ? unknown : K2 extends keyof CSS ? CSS[K2] : unknown; }; }) => import("@stitches/react/types/styled-component").CssComponent<import("@stitches/react/types/styled-component").StyledComponentType<Composers>, import("@stitches/react/types/styled-component").StyledComponentProps<Composers>, {}, CSS>, globalCss: <Styles extends {
248
272
  [K: string]: any;
249
273
  }>(...styles: ({
250
274
  '@import'?: unknown;
@@ -309,17 +333,25 @@ declare const styled: <Type extends import("react").ComponentType<any> | keyof J
309
333
  tableStripedBg: string;
310
334
  };
311
335
  }, import("@stitches/react/types/config").DefaultThemeMap, {
312
- mx: (value: string) => {
313
- marginLeft: string;
314
- marginRight: string;
336
+ mx: (value: string | number) => {
337
+ marginLeft: string | number;
338
+ marginRight: string | number;
339
+ };
340
+ my: (value: string | number) => {
341
+ marginTop: string | number;
342
+ marginBottom: string | number;
315
343
  };
316
- my: (value: string) => {
317
- marginTop: string;
318
- marginBottom: string;
344
+ px: (value: string | number) => {
345
+ paddingLeft: string | number;
346
+ paddingRight: string | number;
319
347
  };
320
- size: (value: string) => {
321
- width: string;
322
- height: string;
348
+ py: (value: string | number) => {
349
+ paddingTop: string | number;
350
+ paddingBottom: string | number;
351
+ };
352
+ size: (value: string | number) => {
353
+ width: string | number;
354
+ height: string | number;
323
355
  };
324
356
  }>;
325
357
  } : K extends `@property ${string}` ? import("@stitches/react/types/css").AtRule.Property : import("@stitches/react/types/css-util").CSS<{}, {
@@ -381,17 +413,25 @@ declare const styled: <Type extends import("react").ComponentType<any> | keyof J
381
413
  tableStripedBg: string;
382
414
  };
383
415
  }, import("@stitches/react/types/config").DefaultThemeMap, {
384
- mx: (value: string) => {
385
- marginLeft: string;
386
- marginRight: string;
416
+ mx: (value: string | number) => {
417
+ marginLeft: string | number;
418
+ marginRight: string | number;
419
+ };
420
+ my: (value: string | number) => {
421
+ marginTop: string | number;
422
+ marginBottom: string | number;
387
423
  };
388
- my: (value: string) => {
389
- marginTop: string;
390
- marginBottom: string;
424
+ px: (value: string | number) => {
425
+ paddingLeft: string | number;
426
+ paddingRight: string | number;
391
427
  };
392
- size: (value: string) => {
393
- width: string;
394
- height: string;
428
+ py: (value: string | number) => {
429
+ paddingTop: string | number;
430
+ paddingBottom: string | number;
431
+ };
432
+ size: (value: string | number) => {
433
+ width: string | number;
434
+ height: string | number;
395
435
  };
396
436
  }>; })[]) => () => string, keyframes: (style: {
397
437
  [offset: string]: import("@stitches/react/types/css-util").CSS<{}, {
@@ -453,17 +493,25 @@ declare const styled: <Type extends import("react").ComponentType<any> | keyof J
453
493
  tableStripedBg: string;
454
494
  };
455
495
  }, import("@stitches/react/types/config").DefaultThemeMap, {
456
- mx: (value: string) => {
457
- marginLeft: string;
458
- marginRight: string;
496
+ mx: (value: string | number) => {
497
+ marginLeft: string | number;
498
+ marginRight: string | number;
499
+ };
500
+ my: (value: string | number) => {
501
+ marginTop: string | number;
502
+ marginBottom: string | number;
459
503
  };
460
- my: (value: string) => {
461
- marginTop: string;
462
- marginBottom: string;
504
+ px: (value: string | number) => {
505
+ paddingLeft: string | number;
506
+ paddingRight: string | number;
463
507
  };
464
- size: (value: string) => {
465
- width: string;
466
- height: string;
508
+ py: (value: string | number) => {
509
+ paddingTop: string | number;
510
+ paddingBottom: string | number;
511
+ };
512
+ size: (value: string | number) => {
513
+ width: string | number;
514
+ height: string | number;
467
515
  };
468
516
  }>;
469
517
  }) => {
@@ -723,17 +771,25 @@ declare const styled: <Type extends import("react").ComponentType<any> | keyof J
723
771
  };
724
772
  themeMap: import("@stitches/react/types/config").DefaultThemeMap;
725
773
  utils: {
726
- mx: (value: string) => {
727
- marginLeft: string;
728
- marginRight: string;
774
+ mx: (value: string | number) => {
775
+ marginLeft: string | number;
776
+ marginRight: string | number;
777
+ };
778
+ my: (value: string | number) => {
779
+ marginTop: string | number;
780
+ marginBottom: string | number;
781
+ };
782
+ px: (value: string | number) => {
783
+ paddingLeft: string | number;
784
+ paddingRight: string | number;
729
785
  };
730
- my: (value: string) => {
731
- marginTop: string;
732
- marginBottom: string;
786
+ py: (value: string | number) => {
787
+ paddingTop: string | number;
788
+ paddingBottom: string | number;
733
789
  };
734
- size: (value: string) => {
735
- width: string;
736
- height: string;
790
+ size: (value: string | number) => {
791
+ width: string | number;
792
+ height: string | number;
737
793
  };
738
794
  };
739
795
  };
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,KAAK,EAAE,GAAG,IAAI,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAS1D,QAAA,MAAM,OAAO,OAAQ,MAAM,WAAoB,CAAC;AAChD,QAAA,MAAM,iBAAiB,OAAQ,MAAM,WAAoC,CAAC;AAC1E,QAAA,MAAM,aAAa,OAAQ,MAAM,WAAgC,CAAC;AAClE,QAAA,MAAM,WAAW,OAAQ,MAAM,WAA8B,CAAC;AAE9D,QAAA,MACI,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAkFU,MAAM;;;;gBACN,MAAM;;;;kBACJ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA2EU,MAAM,GAAG,MAAM;;;;oBACf,MAAM,GAAG,MAAM;;;;oBACf,MAAM,GAAG,MAAM;;;;oBACf,MAAM,GAAG,MAAM;;;;sBACb,MAAM,GAAG,MAAM;;;;;CAEnC,CAAC;AAEH,KAAK,QAAQ,GAAG,WAAW,CAAC,OAAO,MAAM,CAAC,CAAC;AAE3C,KAAK,cAAc,CAEf,CAAC,SAAS,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,EAExD,KAAK,EAAE,IAAI,GAAG,GAAG,EAAE,QAAQ,GAAG,GAAG,EAAE,KAAK,GAAG,GAAG,EAAE,MAAM,GAAG,GAAG,IAC5D,eAAe,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAEhD,YAAY,EACR,QAAQ,EACR,cAAc,GACjB,CAAC;AAEF,OAAO,EACH,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAEzE,OAAO,EACP,iBAAiB,EACjB,aAAa,EACb,WAAW,GACd,CAAC"}
package/esm/theme.js CHANGED
@@ -71,6 +71,8 @@ const { styled, css, globalCss, keyframes, getCssText, theme, createTheme, confi
71
71
  utils: {
72
72
  mx: (value) => ({ marginLeft: value, marginRight: value }),
73
73
  my: (value) => ({ marginTop: value, marginBottom: value }),
74
+ px: (value) => ({ paddingLeft: value, paddingRight: value }),
75
+ py: (value) => ({ paddingTop: value, paddingBottom: value }),
74
76
  size: (value) => ({ width: value, height: value }),
75
77
  },
76
78
  });
package/esm/theme.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAKjD,MAAM,MAA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B,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;QAC3E,EAAE,EAAE,CAAC,KAAsB,EAAE,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;QAC7E,EAAE,EAAE,CAAC,KAAsB,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;QAC7E,IAAI,EAAE,CAAC,KAAsB,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;KACtE;CACJ,CAAC,CAAC;AAgBH,OAAO,EACH,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAEzE,OAAO,EACP,iBAAiB,EACjB,aAAa,EACb,WAAW,GACd,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-miui",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "author": "Jacek Nowacki",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -15,6 +15,7 @@
15
15
  "prepack": "yarn compile",
16
16
  "prepublishOnly": "yarn audit && yarn lint && yarn test && yarn docs",
17
17
  "start:dev": "yarn storybook",
18
+ "start:dev:legacy": "next dev",
18
19
  "deploy:dev": "next build && next export && netlify deploy --dir out",
19
20
  "updates": "npx --yes npm-check-updates --dep prod",
20
21
  "updates:dev": "npx --yes npm-check-updates --dep dev",
@@ -39,9 +40,9 @@
39
40
  "oop-timers": "^5.0.0"
40
41
  },
41
42
  "devDependencies": {
42
- "@babel/core": "^7.21.4",
43
- "@babel/preset-env": "^7.21.4",
44
- "@babel/preset-typescript": "^7.21.4",
43
+ "@babel/core": "^7.22.5",
44
+ "@babel/preset-env": "^7.22.5",
45
+ "@babel/preset-typescript": "^7.22.5",
45
46
  "@dzek69/eslint-config-base": "^2.4.0",
46
47
  "@dzek69/eslint-config-import": "^1.2.0",
47
48
  "@dzek69/eslint-config-import-typescript": "^1.0.0",
@@ -71,7 +72,7 @@
71
72
  "fs-extra": "^11.1.1",
72
73
  "jest": "^29.5.0",
73
74
  "must": "^0.13.4",
74
- "next": "^13.1.6",
75
+ "next": "^13.4.4",
75
76
  "nodemon": "^2.0.22",
76
77
  "prettier": "^2.8.7",
77
78
  "react": "^18.2.0",
@@ -81,7 +82,7 @@
81
82
  "storybook": "^7.0.11",
82
83
  "ts-node": "^10.9.1",
83
84
  "typedoc": "^0.23.28",
84
- "typescript": "^5.0.4"
85
+ "typescript": "^5.1.3"
85
86
  },
86
87
  "peerDependencies": {
87
88
  "react": "^18.2.0",
@@ -0,0 +1,60 @@
1
+ // import type { ThemeCSS } from "../../../theme"; TODO restore
2
+
3
+ import { dimensionsPxToRem, fontPxToRem, borderPxToRem } from "../../../theme.js";
4
+
5
+ const input = {
6
+ "height": dimensionsPxToRem(103),
7
+ "fontSize": fontPxToRem(25),
8
+ "color": "$text",
9
+ "border": "none",
10
+ "display": "block",
11
+ "width": "100%",
12
+ "background": "none",
13
+ "fontFamily": "inherit",
14
+ "padding": "1.2em 0",
15
+ "flex": 1,
16
+
17
+ "&::placeholder": {
18
+ color: "$sub",
19
+ },
20
+
21
+ "&:read-only, &:disabled": {
22
+ color: "inherit",
23
+ },
24
+ };
25
+ // satisfies ThemeCSS; @TODO restore
26
+
27
+ const wrapper = {
28
+ background: "white",
29
+ display: "inline-flex",
30
+ width: "100%",
31
+ borderRadius: "2px",
32
+ padding: `0 ${dimensionsPxToRem(36)}`,
33
+ border: `${borderPxToRem(1)} solid $border`,
34
+ alignItems: "center",
35
+
36
+ variants: {
37
+ disabled: {
38
+ true: {
39
+ background: "$inputDisabledBg",
40
+ color: "$inputDisabledText",
41
+ },
42
+ },
43
+ readOnly: {
44
+ true: {
45
+ color: "$inputDisabledText",
46
+ },
47
+ },
48
+ focused: {
49
+ true: {
50
+ borderColor: "$focusColor",
51
+ },
52
+ },
53
+ },
54
+ };
55
+ // satisfies ThemeCSS; TODO restore
56
+
57
+ export {
58
+ input,
59
+ wrapper,
60
+ };
@@ -1,58 +1,10 @@
1
- import { borderPxToRem, dimensionsPxToRem, fontPxToRem, styled } from "../../../theme.js";
1
+ import { dimensionsPxToRem, styled } from "../../../theme.js";
2
2
 
3
- const StyledInput = styled("input", {
4
- "height": dimensionsPxToRem(103),
5
- "fontSize": fontPxToRem(34),
6
- "color": "$text",
7
- "border": "none",
8
- "display": "block",
9
- "width": "100%",
10
- "background": "none",
11
- "fontFamily": "inherit",
12
- "padding": "1.2em 0",
13
- "flex": 1,
3
+ import { input, wrapper } from "./Input.css.js";
14
4
 
15
- "&::placeholder": {
16
- color: "$sub",
17
- },
18
- });
19
-
20
- const StyledWrapper = styled("div", {
21
- background: "white",
22
- display: "inline-flex",
23
- width: "100%",
24
- borderRadius: "2px",
25
- padding: `0 ${dimensionsPxToRem(36)}`,
26
- border: `${borderPxToRem(1)} solid $border`,
27
- alignItems: "center",
28
-
29
- variants: {
30
- disabled: {
31
- true: {
32
- background: "$inputDisabledBg",
33
- color: "$inputDisabledText",
5
+ const StyledInput = styled("input", input);
34
6
 
35
- [StyledInput.toString()]: {
36
- color: "$inputDisabledText",
37
- },
38
- },
39
- },
40
- readOnly: {
41
- true: {
42
- color: "$inputDisabledText",
43
-
44
- [StyledInput.toString()]: {
45
- color: "$inputDisabledText",
46
- },
47
- },
48
- },
49
- focused: {
50
- true: {
51
- borderColor: "$focusColor",
52
- },
53
- },
54
- },
55
- });
7
+ const StyledWrapper = styled("div", wrapper);
56
8
 
57
9
  const StyledPrefix = styled("div", {
58
10
  marginRight: dimensionsPxToRem(36),
@@ -0,0 +1,21 @@
1
+ import type { StoryObj, Meta } from "@storybook/react";
2
+
3
+ import { TextArea } from "./TextArea.js";
4
+
5
+ const meta: Meta = {
6
+ title: "Components/Form/TextArea",
7
+ component: TextArea,
8
+ tags: ["autodocs", "form"],
9
+ };
10
+
11
+ type Story = StoryObj<typeof TextArea>;
12
+
13
+ const Primary: Story = {
14
+ args: {},
15
+ };
16
+
17
+ export {
18
+ Primary,
19
+ };
20
+
21
+ export default meta;
@@ -0,0 +1,19 @@
1
+ import { dimensionsPxToRem, styled } from "../../../theme.js";
2
+ import { input, wrapper } from "../input/Input.css";
3
+ import { miuiScrollbars } from "../../../scrollbars.css";
4
+
5
+ const StyledTextArea = styled("textarea", {
6
+ ...miuiScrollbars,
7
+ ...input,
8
+ ...wrapper,
9
+
10
+ padding: `1.2em ${dimensionsPxToRem(36)}`,
11
+ height: "unset",
12
+ resize: "vertical",
13
+ minHeight: dimensionsPxToRem(103),
14
+
15
+ });
16
+
17
+ export {
18
+ StyledTextArea,
19
+ };
@@ -1,15 +1,13 @@
1
1
  import React, { useCallback, useState } from "react";
2
2
 
3
- import classnames from "classnames";
4
-
5
- import styles from "./input/Input.module.scss";
3
+ import { StyledTextArea } from "./TextArea.styled";
6
4
 
7
5
  interface Props {
8
6
  children?: never;
9
7
  }
10
8
 
11
9
  const TextArea: React.FC<React.TextareaHTMLAttributes<HTMLTextAreaElement> & Props> = ({
12
- className, children,
10
+ children,
13
11
  onFocus, onBlur,
14
12
  ...props
15
13
  }) => {
@@ -25,12 +23,15 @@ const TextArea: React.FC<React.TextareaHTMLAttributes<HTMLTextAreaElement> & Pro
25
23
  onBlur?.(e);
26
24
  }, [onBlur]);
27
25
 
28
- const cls = classnames(styles.wrapper, {
29
- [styles.wrapperFocused]: focused,
30
- }, styles.input, styles.textarea, className);
31
-
32
26
  return (
33
- <textarea {...props} onFocus={handleFocus} onBlur={handleBlur} className={cls} />
27
+ <StyledTextArea
28
+ {...props}
29
+ disabled={Boolean(props.disabled)}
30
+ readOnly={Boolean(props.readOnly)}
31
+ focused={focused}
32
+ onFocus={handleFocus}
33
+ onBlur={handleBlur}
34
+ />
34
35
  );
35
36
  };
36
37
 
@@ -0,0 +1,40 @@
1
+ import React from "react";
2
+
3
+ import type { StoryObj, Meta } from "@storybook/react";
4
+
5
+ import { Header } from "./Header.js";
6
+ import { List } from "./List.js";
7
+
8
+ const meta: Meta = {
9
+ title: "Components/Layout/List/Header",
10
+ component: Header,
11
+ tags: ["autodocs", "layout"],
12
+ };
13
+
14
+ type Story = StoryObj<typeof Header>;
15
+
16
+ const Primary: Story = {
17
+ args: {
18
+ children: "Section name",
19
+ },
20
+ render: (args) => {
21
+ return (
22
+ <List>
23
+ <Header {...args} />
24
+ <List.Item>Item 1</List.Item>
25
+ <List.Item>Item 2</List.Item>
26
+ <List.Item>Item 3</List.Item>
27
+ <Header {...args} />
28
+ <List.Item>Item 1</List.Item>
29
+ <List.Item>Item 2</List.Item>
30
+ <List.Item>Item 3</List.Item>
31
+ </List>
32
+ );
33
+ },
34
+ };
35
+
36
+ export {
37
+ Primary,
38
+ };
39
+
40
+ export default meta;