@itcase/ui-react-native 1.10.81

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 (771) hide show
  1. package/.storybook-react-native/index.ts +15 -0
  2. package/.storybook-react-native/main.ts +13 -0
  3. package/.storybook-react-native/preview.tsx +83 -0
  4. package/.storybook-react-native/tsconfig.json +5 -0
  5. package/.storybook-react-native-web/main.ts +49 -0
  6. package/.storybook-react-native-web/preview.tsx +104 -0
  7. package/.storybook-react-native-web/tsconfig.json +5 -0
  8. package/demoApp/.bundle/config +2 -0
  9. package/demoApp/.watchmanconfig +8 -0
  10. package/demoApp/App.tsx +61 -0
  11. package/demoApp/Gemfile +17 -0
  12. package/demoApp/README.md +97 -0
  13. package/demoApp/android/app/build.gradle +119 -0
  14. package/demoApp/android/app/debug.keystore +0 -0
  15. package/demoApp/android/app/proguard-rules.pro +10 -0
  16. package/demoApp/android/app/src/main/AndroidManifest.xml +27 -0
  17. package/demoApp/android/app/src/main/java/com/demoapp/MainActivity.kt +22 -0
  18. package/demoApp/android/app/src/main/java/com/demoapp/MainApplication.kt +27 -0
  19. package/demoApp/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
  20. package/demoApp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  21. package/demoApp/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  22. package/demoApp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  23. package/demoApp/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  24. package/demoApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  25. package/demoApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  26. package/demoApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  27. package/demoApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  28. package/demoApp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  29. package/demoApp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  30. package/demoApp/android/app/src/main/res/values/strings.xml +3 -0
  31. package/demoApp/android/app/src/main/res/values/styles.xml +9 -0
  32. package/demoApp/android/build.gradle +21 -0
  33. package/demoApp/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  34. package/demoApp/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  35. package/demoApp/android/gradle.properties +49 -0
  36. package/demoApp/android/gradlew +251 -0
  37. package/demoApp/android/gradlew.bat +99 -0
  38. package/demoApp/android/settings.gradle +6 -0
  39. package/demoApp/app.json +4 -0
  40. package/demoApp/babel.config.js +7 -0
  41. package/demoApp/index.js +9 -0
  42. package/demoApp/ios/.xcode.env +11 -0
  43. package/demoApp/ios/Podfile +34 -0
  44. package/demoApp/ios/Podfile.lock +2445 -0
  45. package/demoApp/ios/demoApp/AppDelegate.swift +48 -0
  46. package/demoApp/ios/demoApp/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  47. package/demoApp/ios/demoApp/Images.xcassets/Contents.json +6 -0
  48. package/demoApp/ios/demoApp/Info.plist +60 -0
  49. package/demoApp/ios/demoApp/LaunchScreen.storyboard +47 -0
  50. package/demoApp/ios/demoApp/PrivacyInfo.xcprivacy +37 -0
  51. package/demoApp/ios/demoApp.xcodeproj/project.pbxproj +494 -0
  52. package/demoApp/ios/demoApp.xcodeproj/xcshareddata/xcschemes/demoApp.xcscheme +88 -0
  53. package/demoApp/ios/demoApp.xcworkspace/contents.xcworkspacedata +10 -0
  54. package/demoApp/metro-transformer.js +16 -0
  55. package/demoApp/metro.config.js +296 -0
  56. package/demoApp/package-lock.json +41233 -0
  57. package/demoApp/package.json +56 -0
  58. package/demoApp/tsconfig.json +8 -0
  59. package/package.json +58 -0
  60. package/postcss.config.mjs +1 -0
  61. package/src/components/Avatar/Avatar.appearance.ts +14 -0
  62. package/src/components/Avatar/Avatar.interface.ts +99 -0
  63. package/src/components/Avatar/Avatar.styles.ts +11 -0
  64. package/src/components/Avatar/Avatar.tsx +181 -0
  65. package/src/components/Avatar/appearance/avatarShape.ts +24 -0
  66. package/src/components/Avatar/appearance/avatarSize.ts +66 -0
  67. package/src/components/Avatar/appearance/avatarStyle.ts +17 -0
  68. package/src/components/Avatar/appearance/avatarSurface.ts +42 -0
  69. package/src/components/Avatar/index.ts +36 -0
  70. package/src/components/Avatar/stories/AvatarCount.stories.tsx +35 -0
  71. package/src/components/Avatar/stories/AvatarImage.stories.tsx +36 -0
  72. package/src/components/Avatar/stories/AvatarInteraction.stories.tsx +25 -0
  73. package/src/components/Avatar/stories/AvatarLetters.stories.tsx +36 -0
  74. package/src/components/Avatar/stories/AvatarShape.stories.tsx +54 -0
  75. package/src/components/Avatar/stories/AvatarSize.stories.tsx +78 -0
  76. package/src/components/Avatar/stories/AvatarStories.config.ts +12 -0
  77. package/src/components/Avatar/stories/AvatarStyle.stories.tsx +42 -0
  78. package/src/components/Avatar/styles/avatar.ts +32 -0
  79. package/src/components/Avatar/styles/avatarShape.ts +34 -0
  80. package/src/components/Avatar/styles/avatarSize.ts +22 -0
  81. package/src/components/AvatarStack/AvatarStack.interface.ts +19 -0
  82. package/src/components/AvatarStack/AvatarStack.styles.ts +11 -0
  83. package/src/components/AvatarStack/AvatarStack.tsx +82 -0
  84. package/src/components/AvatarStack/index.ts +7 -0
  85. package/src/components/AvatarStack/stories/AvatarStack.stories.tsx +56 -0
  86. package/src/components/AvatarStack/styles/avatarStack.ts +17 -0
  87. package/src/components/AvatarStack/styles/avatarStackDirection.ts +22 -0
  88. package/src/components/AvatarStack/styles/avatarStackSize.ts +76 -0
  89. package/src/components/Badge/Badge.appearance.ts +14 -0
  90. package/src/components/Badge/Badge.interface.ts +50 -0
  91. package/src/components/Badge/Badge.styles.ts +13 -0
  92. package/src/components/Badge/Badge.tsx +93 -0
  93. package/src/components/Badge/appearance/badgeAccent.ts +10 -0
  94. package/src/components/Badge/appearance/badgeDanger.ts +10 -0
  95. package/src/components/Badge/appearance/badgeExtra.ts +10 -0
  96. package/src/components/Badge/appearance/badgeShape.ts +24 -0
  97. package/src/components/Badge/index.ts +34 -0
  98. package/src/components/Badge/stories/BadgeDefault.stories.tsx +39 -0
  99. package/src/components/Badge/stories/BadgeShape.stories.tsx +57 -0
  100. package/src/components/Badge/stories/BadgeSize.stories.tsx +33 -0
  101. package/src/components/Badge/stories/BadgeStatus.stories.tsx +23 -0
  102. package/src/components/Badge/styles/badge.ts +13 -0
  103. package/src/components/Badge/styles/badgeShape.ts +34 -0
  104. package/src/components/Badge/styles/badgeSize.ts +25 -0
  105. package/src/components/Badge/styles/badgeType.ts +20 -0
  106. package/src/components/Breadcrumbs/Breadcrumbs.appearance.ts +12 -0
  107. package/src/components/Breadcrumbs/Breadcrumbs.interface.ts +46 -0
  108. package/src/components/Breadcrumbs/Breadcrumbs.styles.ts +9 -0
  109. package/src/components/Breadcrumbs/Breadcrumbs.tsx +94 -0
  110. package/src/components/Breadcrumbs/appearance/breadcrumbsAccent.ts +10 -0
  111. package/src/components/Breadcrumbs/appearance/breadcrumbsSize.ts +22 -0
  112. package/src/components/Breadcrumbs/appearance/breadcrumbsSurface.ts +22 -0
  113. package/src/components/Breadcrumbs/index.ts +26 -0
  114. package/src/components/Breadcrumbs/stories/Breadcrumbs.stories.tsx +35 -0
  115. package/src/components/Breadcrumbs/styles/breadcrumbs.ts +18 -0
  116. package/src/components/Breadcrumbs/styles/breadcrumbsSize.ts +28 -0
  117. package/src/components/Button/Button.appearance.ts +16 -0
  118. package/src/components/Button/Button.interface.ts +76 -0
  119. package/src/components/Button/Button.styles.ts +11 -0
  120. package/src/components/Button/Button.tsx +147 -0
  121. package/src/components/Button/appearance/buttonAccent.ts +24 -0
  122. package/src/components/Button/appearance/buttonDanger.ts +14 -0
  123. package/src/components/Button/appearance/buttonExtra.ts +14 -0
  124. package/src/components/Button/appearance/buttonStyle.ts +17 -0
  125. package/src/components/Button/appearance/buttonSurface.ts +30 -0
  126. package/src/components/Button/index.ts +30 -0
  127. package/src/components/Button/stories/ButtonDefault.stories.tsx +77 -0
  128. package/src/components/Button/stories/ButtonDisabled.stories.tsx +23 -0
  129. package/src/components/Button/stories/ButtonSize.stories.tsx +63 -0
  130. package/src/components/Button/stories/ButtonStories.config.ts +46 -0
  131. package/src/components/Button/stories/ButtonStyle.stories.tsx +47 -0
  132. package/src/components/Button/styles/button.ts +26 -0
  133. package/src/components/Button/styles/buttonSize.ts +42 -0
  134. package/src/components/Button/styles/buttonText.ts +28 -0
  135. package/src/components/Cell/Cell.interface.ts +45 -0
  136. package/src/components/Cell/Cell.styles.ts +13 -0
  137. package/src/components/Cell/Cell.tsx +96 -0
  138. package/src/components/Cell/index.ts +17 -0
  139. package/src/components/Cell/stories/Cell.stories.tsx +35 -0
  140. package/src/components/Cell/styles/cell.ts +9 -0
  141. package/src/components/Cell/styles/cellDirection.ts +24 -0
  142. package/src/components/Cell/styles/cellShape.ts +16 -0
  143. package/src/components/Cell/styles/cellSize.ts +21 -0
  144. package/src/components/Checkbox/Checkbox.appearance.ts +22 -0
  145. package/src/components/Checkbox/Checkbox.interface.ts +99 -0
  146. package/src/components/Checkbox/Checkbox.styles.ts +13 -0
  147. package/src/components/Checkbox/Checkbox.tsx +193 -0
  148. package/src/components/Checkbox/appearance/checkboxDefault.ts +42 -0
  149. package/src/components/Checkbox/appearance/checkboxDisabled.ts +15 -0
  150. package/src/components/Checkbox/appearance/checkboxError.ts +15 -0
  151. package/src/components/Checkbox/appearance/checkboxRequire.ts +15 -0
  152. package/src/components/Checkbox/appearance/checkboxShape.ts +12 -0
  153. package/src/components/Checkbox/appearance/checkboxSize.ts +26 -0
  154. package/src/components/Checkbox/appearance/checkboxStyle.ts +22 -0
  155. package/src/components/Checkbox/appearance/checkboxSuccess.ts +15 -0
  156. package/src/components/Checkbox/index.ts +36 -0
  157. package/src/components/Checkbox/stories/Checkbox.stories.tsx +31 -0
  158. package/src/components/Checkbox/stories/CheckboxDisabled.stories.tsx +18 -0
  159. package/src/components/Checkbox/stories/CheckboxError.stories.tsx +53 -0
  160. package/src/components/Checkbox/stories/CheckboxLabel.stories.tsx +32 -0
  161. package/src/components/Checkbox/stories/CheckboxLabelDesc.stories.tsx +33 -0
  162. package/src/components/Checkbox/stories/CheckboxShape.stories.tsx +29 -0
  163. package/src/components/Checkbox/stories/CheckboxSize.stories.tsx +40 -0
  164. package/src/components/Checkbox/stories/CheckboxStories.config.tsx +26 -0
  165. package/src/components/Checkbox/styles/checkbox.ts +35 -0
  166. package/src/components/Checkbox/styles/checkboxAlign.ts +23 -0
  167. package/src/components/Checkbox/styles/checkboxShape.ts +37 -0
  168. package/src/components/Checkbox/styles/checkboxSize.ts +60 -0
  169. package/src/components/Checkmark/Checkmark.interface.ts +8 -0
  170. package/src/components/Checkmark/Checkmark.styles.ts +7 -0
  171. package/src/components/Checkmark/Checkmark.tsx +38 -0
  172. package/src/components/Checkmark/index.ts +5 -0
  173. package/src/components/Checkmark/stories/Checkmark.stories.tsx +22 -0
  174. package/src/components/Checkmark/styles/checkmark.ts +17 -0
  175. package/src/components/Chips/Chips.appearance.ts +32 -0
  176. package/src/components/Chips/Chips.interface.ts +103 -0
  177. package/src/components/Chips/Chips.styles.ts +11 -0
  178. package/src/components/Chips/Chips.tsx +187 -0
  179. package/src/components/Chips/appearance/chipsAccent.ts +24 -0
  180. package/src/components/Chips/appearance/chipsDanger.ts +20 -0
  181. package/src/components/Chips/appearance/chipsDisabled.ts +14 -0
  182. package/src/components/Chips/appearance/chipsError.ts +20 -0
  183. package/src/components/Chips/appearance/chipsExtra.ts +20 -0
  184. package/src/components/Chips/appearance/chipsInfo.ts +20 -0
  185. package/src/components/Chips/appearance/chipsShape.ts +24 -0
  186. package/src/components/Chips/appearance/chipsSize.ts +48 -0
  187. package/src/components/Chips/appearance/chipsSpecial.ts +20 -0
  188. package/src/components/Chips/appearance/chipsStyle.ts +17 -0
  189. package/src/components/Chips/appearance/chipsSuccess.ts +20 -0
  190. package/src/components/Chips/appearance/chipsSurface.ts +40 -0
  191. package/src/components/Chips/appearance/chipsWarning.ts +20 -0
  192. package/src/components/Chips/index.ts +30 -0
  193. package/src/components/Chips/stories/ChipsCheckLeft.stories.tsx +38 -0
  194. package/src/components/Chips/stories/ChipsCheckRight.stories.tsx +38 -0
  195. package/src/components/Chips/stories/ChipsClear.stories.tsx +38 -0
  196. package/src/components/Chips/stories/ChipsDefault.stories.tsx +90 -0
  197. package/src/components/Chips/stories/ChipsShape.stories.tsx +51 -0
  198. package/src/components/Chips/stories/ChipsSize.stories.tsx +57 -0
  199. package/src/components/Chips/stories/ChipsStyle.stories.tsx +39 -0
  200. package/src/components/Chips/styles/chips.ts +15 -0
  201. package/src/components/Chips/styles/chipsShape.ts +34 -0
  202. package/src/components/Chips/styles/chipsSize.ts +65 -0
  203. package/src/components/Choice/Choice.appearance.ts +22 -0
  204. package/src/components/Choice/Choice.interface.ts +119 -0
  205. package/src/components/Choice/Choice.styles.ts +13 -0
  206. package/src/components/Choice/Choice.tsx +258 -0
  207. package/src/components/Choice/appearance/choiceDefault.ts +34 -0
  208. package/src/components/Choice/appearance/choiceDisabled.ts +19 -0
  209. package/src/components/Choice/appearance/choiceError.ts +19 -0
  210. package/src/components/Choice/appearance/choiceRequire.ts +20 -0
  211. package/src/components/Choice/appearance/choiceShape.ts +24 -0
  212. package/src/components/Choice/appearance/choiceSize.ts +21 -0
  213. package/src/components/Choice/appearance/choiceStyle.ts +17 -0
  214. package/src/components/Choice/appearance/choiceSuccess.ts +20 -0
  215. package/src/components/Choice/index.ts +31 -0
  216. package/src/components/Choice/stories/ChoiceIcon.stories.tsx +50 -0
  217. package/src/components/Choice/stories/ChoiceLabel.stories.tsx +50 -0
  218. package/src/components/Choice/stories/ChoiceLabelIcon.stories.tsx +50 -0
  219. package/src/components/Choice/stories/ChoiceSize.stories.tsx +40 -0
  220. package/src/components/Choice/stories/ChoiceStories.config.tsx +77 -0
  221. package/src/components/Choice/stories/ChoiceStyle.stories.tsx +46 -0
  222. package/src/components/Choice/styles/choice.ts +45 -0
  223. package/src/components/Choice/styles/choiceShape.ts +34 -0
  224. package/src/components/Choice/styles/choiceSize.ts +58 -0
  225. package/src/components/Choice/styles/choiceWrap.ts +19 -0
  226. package/src/components/Code/Code.appearance.ts +20 -0
  227. package/src/components/Code/Code.interface.ts +43 -0
  228. package/src/components/Code/Code.styles.ts +11 -0
  229. package/src/components/Code/Code.tsx +75 -0
  230. package/src/components/Code/appearance/codeDefault.ts +11 -0
  231. package/src/components/Code/appearance/codeDisabled.ts +11 -0
  232. package/src/components/Code/appearance/codeError.ts +11 -0
  233. package/src/components/Code/appearance/codeShape.ts +15 -0
  234. package/src/components/Code/appearance/codeSize.ts +18 -0
  235. package/src/components/Code/appearance/codeStyle.ts +16 -0
  236. package/src/components/Code/appearance/codeSuccess.ts +11 -0
  237. package/src/components/Code/index.ts +22 -0
  238. package/src/components/Code/stories/Code.stories.tsx +41 -0
  239. package/src/components/Code/styles/code.ts +16 -0
  240. package/src/components/Code/styles/codeSize.ts +25 -0
  241. package/src/components/Code/styles/codeVariant.ts +19 -0
  242. package/src/components/ColorInput/ColorInput.appearance.ts +22 -0
  243. package/src/components/ColorInput/ColorInput.helpers.ts +7 -0
  244. package/src/components/ColorInput/ColorInput.interface.ts +48 -0
  245. package/src/components/ColorInput/ColorInput.styles.ts +9 -0
  246. package/src/components/ColorInput/ColorInput.tsx +105 -0
  247. package/src/components/ColorInput/appearance/colorInputDefault.ts +22 -0
  248. package/src/components/ColorInput/appearance/colorInputDisabled.ts +21 -0
  249. package/src/components/ColorInput/appearance/colorInputError.ts +21 -0
  250. package/src/components/ColorInput/appearance/colorInputRequire.ts +21 -0
  251. package/src/components/ColorInput/appearance/colorInputShape.ts +15 -0
  252. package/src/components/ColorInput/appearance/colorInputSize.ts +22 -0
  253. package/src/components/ColorInput/appearance/colorInputStyle.ts +16 -0
  254. package/src/components/ColorInput/appearance/colorInputSuccess.ts +21 -0
  255. package/src/components/ColorInput/index.ts +26 -0
  256. package/src/components/ColorInput/stories/ColorInput.stories.tsx +36 -0
  257. package/src/components/ColorInput/styles/colorInput.ts +17 -0
  258. package/src/components/ColorInput/styles/colorInputSize.ts +58 -0
  259. package/src/components/DatePicker/DatePicker.appearance.ts +12 -0
  260. package/src/components/DatePicker/DatePicker.constants.ts +3 -0
  261. package/src/components/DatePicker/DatePicker.helpers.ts +28 -0
  262. package/src/components/DatePicker/DatePicker.interface.ts +68 -0
  263. package/src/components/DatePicker/DatePicker.styles.ts +7 -0
  264. package/src/components/DatePicker/DatePicker.tsx +189 -0
  265. package/src/components/DatePicker/appearance/datePickerSize.ts +24 -0
  266. package/src/components/DatePicker/appearance/datePickerStyle.ts +14 -0
  267. package/src/components/DatePicker/appearance/datePickerSurface.ts +15 -0
  268. package/src/components/DatePicker/index.ts +22 -0
  269. package/src/components/DatePicker/stories/DatePicker.stories.tsx +50 -0
  270. package/src/components/DatePicker/styles/datePicker.ts +45 -0
  271. package/src/components/Divider/Divider.appearance.ts +22 -0
  272. package/src/components/Divider/Divider.interface.ts +40 -0
  273. package/src/components/Divider/Divider.styles.ts +11 -0
  274. package/src/components/Divider/Divider.tsx +65 -0
  275. package/src/components/Divider/appearance/dividerAccent.ts +9 -0
  276. package/src/components/Divider/appearance/dividerError.ts +9 -0
  277. package/src/components/Divider/appearance/dividerExtra.ts +9 -0
  278. package/src/components/Divider/appearance/dividerSize.ts +15 -0
  279. package/src/components/Divider/appearance/dividerSpecial.ts +9 -0
  280. package/src/components/Divider/appearance/dividerSuccess.ts +9 -0
  281. package/src/components/Divider/appearance/dividerSurface.ts +18 -0
  282. package/src/components/Divider/appearance/dividerWarning.ts +9 -0
  283. package/src/components/Divider/index.ts +28 -0
  284. package/src/components/Divider/stories/DividerAppearance.stories.tsx +75 -0
  285. package/src/components/Divider/stories/DividerDirection.stories.tsx +34 -0
  286. package/src/components/Divider/stories/DividerSize.stories.tsx +33 -0
  287. package/src/components/Divider/styles/divider.ts +9 -0
  288. package/src/components/Divider/styles/dividerDirection.ts +25 -0
  289. package/src/components/Divider/styles/dividerSize.ts +32 -0
  290. package/src/components/Dot/Dot.interface.ts +18 -0
  291. package/src/components/Dot/Dot.styles.ts +11 -0
  292. package/src/components/Dot/Dot.tsx +33 -0
  293. package/src/components/Dot/index.ts +9 -0
  294. package/src/components/Dot/stories/Dot.stories.tsx +23 -0
  295. package/src/components/Dot/styles/dot.ts +9 -0
  296. package/src/components/Dot/styles/dotShape.ts +22 -0
  297. package/src/components/Dot/styles/dotSize.ts +25 -0
  298. package/src/components/Drawer/Drawer.appearance.ts +10 -0
  299. package/src/components/Drawer/Drawer.interface.ts +67 -0
  300. package/src/components/Drawer/Drawer.styles.ts +7 -0
  301. package/src/components/Drawer/Drawer.tsx +132 -0
  302. package/src/components/Drawer/appearance/drawerSize.ts +36 -0
  303. package/src/components/Drawer/appearance/drawerSurface.ts +12 -0
  304. package/src/components/Drawer/index.ts +22 -0
  305. package/src/components/Drawer/stories/Drawer.stories.tsx +71 -0
  306. package/src/components/Drawer/styles/drawer.ts +60 -0
  307. package/src/components/Dropdown/Dropdown.appearance.ts +16 -0
  308. package/src/components/Dropdown/Dropdown.interface.ts +152 -0
  309. package/src/components/Dropdown/Dropdown.styles.ts +9 -0
  310. package/src/components/Dropdown/Dropdown.tsx +134 -0
  311. package/src/components/Dropdown/DropdownItem.appearance.ts +16 -0
  312. package/src/components/Dropdown/DropdownItem.tsx +141 -0
  313. package/src/components/Dropdown/appearance/dropdownAccent.ts +17 -0
  314. package/src/components/Dropdown/appearance/dropdownShape.ts +24 -0
  315. package/src/components/Dropdown/appearance/dropdownSize.ts +21 -0
  316. package/src/components/Dropdown/appearance/dropdownStyle.ts +17 -0
  317. package/src/components/Dropdown/appearance/dropdownSurface.ts +25 -0
  318. package/src/components/Dropdown/index.ts +45 -0
  319. package/src/components/Dropdown/stories/Dropdown.stories.tsx +62 -0
  320. package/src/components/Dropdown/styles/dropdown.ts +31 -0
  321. package/src/components/Dropdown/styles/dropdownSize.ts +36 -0
  322. package/src/components/Group/Group.appearance.ts +8 -0
  323. package/src/components/Group/Group.interface.ts +53 -0
  324. package/src/components/Group/Group.styles.ts +15 -0
  325. package/src/components/Group/Group.tsx +80 -0
  326. package/src/components/Group/appearance/groupSurface.ts +10 -0
  327. package/src/components/Group/index.ts +36 -0
  328. package/src/components/Group/stories/Group.stories.tsx +39 -0
  329. package/src/components/Group/styles/group.ts +9 -0
  330. package/src/components/Group/styles/groupAlign.ts +37 -0
  331. package/src/components/Group/styles/groupDirection.ts +40 -0
  332. package/src/components/Group/styles/groupJustify.ts +40 -0
  333. package/src/components/Group/styles/groupWrap.ts +22 -0
  334. package/src/components/HeroTitle/HeroTitle.appearance.ts +8 -0
  335. package/src/components/HeroTitle/HeroTitle.interface.ts +51 -0
  336. package/src/components/HeroTitle/HeroTitle.styles.ts +7 -0
  337. package/src/components/HeroTitle/HeroTitle.tsx +78 -0
  338. package/src/components/HeroTitle/appearance/heroTitleSize.ts +24 -0
  339. package/src/components/HeroTitle/index.ts +16 -0
  340. package/src/components/HeroTitle/stories/HeroTitle.stories.tsx +22 -0
  341. package/src/components/HeroTitle/styles/heroTitle.ts +11 -0
  342. package/src/components/Icon/Icon.interface.ts +42 -0
  343. package/src/components/Icon/Icon.styles.ts +11 -0
  344. package/src/components/Icon/Icon.tsx +96 -0
  345. package/src/components/Icon/index.ts +9 -0
  346. package/src/components/Icon/stories/Icon.stories.tsx +45 -0
  347. package/src/components/Icon/styles/icon.ts +12 -0
  348. package/src/components/Icon/styles/iconShape.ts +19 -0
  349. package/src/components/Icon/styles/iconSize.ts +61 -0
  350. package/src/components/Image/Image.interface.ts +31 -0
  351. package/src/components/Image/Image.styles.ts +7 -0
  352. package/src/components/Image/Image.tsx +95 -0
  353. package/src/components/Image/index.ts +5 -0
  354. package/src/components/Image/stories/Image.stories.tsx +18 -0
  355. package/src/components/Image/styles/image.ts +17 -0
  356. package/src/components/Input/Input.appearance.ts +22 -0
  357. package/src/components/Input/Input.interface.ts +86 -0
  358. package/src/components/Input/Input.styles.ts +11 -0
  359. package/src/components/Input/Input.tsx +159 -0
  360. package/src/components/Input/appearance/inputDefault.ts +20 -0
  361. package/src/components/Input/appearance/inputDisabled.ts +17 -0
  362. package/src/components/Input/appearance/inputError.ts +19 -0
  363. package/src/components/Input/appearance/inputRequire.ts +19 -0
  364. package/src/components/Input/appearance/inputShape.ts +24 -0
  365. package/src/components/Input/appearance/inputSize.ts +22 -0
  366. package/src/components/Input/appearance/inputStyle.ts +17 -0
  367. package/src/components/Input/appearance/inputSuccess.ts +19 -0
  368. package/src/components/Input/index.ts +30 -0
  369. package/src/components/Input/stories/InputDefault.stories.tsx +31 -0
  370. package/src/components/Input/stories/InputDisabled.stories.tsx +34 -0
  371. package/src/components/Input/stories/InputError.stories.tsx +30 -0
  372. package/src/components/Input/stories/InputReadonly.stories.tsx +21 -0
  373. package/src/components/Input/stories/InputRequire.stories.tsx +30 -0
  374. package/src/components/Input/stories/InputShape.stories.tsx +52 -0
  375. package/src/components/Input/stories/InputSize.stories.tsx +40 -0
  376. package/src/components/Input/stories/InputStyle.stories.tsx +40 -0
  377. package/src/components/Input/stories/InputSuccess.stories.tsx +30 -0
  378. package/src/components/Input/styles/input.ts +26 -0
  379. package/src/components/Input/styles/inputShape.ts +31 -0
  380. package/src/components/Input/styles/inputSize.ts +33 -0
  381. package/src/components/InputNumber/InputNumber.appearance.ts +20 -0
  382. package/src/components/InputNumber/InputNumber.interface.ts +79 -0
  383. package/src/components/InputNumber/InputNumber.styles.ts +11 -0
  384. package/src/components/InputNumber/InputNumber.tsx +224 -0
  385. package/src/components/InputNumber/appearance/inputNumberDefault.ts +14 -0
  386. package/src/components/InputNumber/appearance/inputNumberError.ts +14 -0
  387. package/src/components/InputNumber/appearance/inputNumberRequire.ts +14 -0
  388. package/src/components/InputNumber/appearance/inputNumberShape.ts +24 -0
  389. package/src/components/InputNumber/appearance/inputNumberSize.ts +30 -0
  390. package/src/components/InputNumber/appearance/inputNumberStyle.ts +19 -0
  391. package/src/components/InputNumber/appearance/inputNumberSuccess.ts +14 -0
  392. package/src/components/InputNumber/index.ts +34 -0
  393. package/src/components/InputNumber/stories/InputNumber.stories.tsx +93 -0
  394. package/src/components/InputNumber/styles/inputNumber.ts +25 -0
  395. package/src/components/InputNumber/styles/inputNumberShape.ts +34 -0
  396. package/src/components/InputNumber/styles/inputNumberSize.ts +36 -0
  397. package/src/components/InputPassword/InputPassword.appearance.ts +22 -0
  398. package/src/components/InputPassword/InputPassword.interface.ts +90 -0
  399. package/src/components/InputPassword/InputPassword.styles.ts +11 -0
  400. package/src/components/InputPassword/InputPassword.tsx +202 -0
  401. package/src/components/InputPassword/appearance/inputPasswordDefault.ts +22 -0
  402. package/src/components/InputPassword/appearance/inputPasswordDisabled.ts +19 -0
  403. package/src/components/InputPassword/appearance/inputPasswordError.ts +19 -0
  404. package/src/components/InputPassword/appearance/inputPasswordRequire.ts +19 -0
  405. package/src/components/InputPassword/appearance/inputPasswordShape.ts +24 -0
  406. package/src/components/InputPassword/appearance/inputPasswordSize.ts +26 -0
  407. package/src/components/InputPassword/appearance/inputPasswordStyle.ts +19 -0
  408. package/src/components/InputPassword/appearance/inputPasswordSuccess.ts +19 -0
  409. package/src/components/InputPassword/index.ts +36 -0
  410. package/src/components/InputPassword/stories/InputPassword.stories.tsx +67 -0
  411. package/src/components/InputPassword/styles/inputPassword.ts +22 -0
  412. package/src/components/InputPassword/styles/inputPasswordShape.ts +34 -0
  413. package/src/components/InputPassword/styles/inputPasswordSize.ts +36 -0
  414. package/src/components/Label/Label.appearance.ts +20 -0
  415. package/src/components/Label/Label.interface.ts +59 -0
  416. package/src/components/Label/Label.styles.ts +11 -0
  417. package/src/components/Label/Label.tsx +126 -0
  418. package/src/components/Label/Label.web.tsx +124 -0
  419. package/src/components/Label/appearance/labelAccent.ts +10 -0
  420. package/src/components/Label/appearance/labelDanger.ts +10 -0
  421. package/src/components/Label/appearance/labelExtra.ts +10 -0
  422. package/src/components/Label/appearance/labelGradient.ts +10 -0
  423. package/src/components/Label/appearance/labelShape.ts +9 -0
  424. package/src/components/Label/appearance/labelSize.ts +13 -0
  425. package/src/components/Label/appearance/labelSurface.ts +22 -0
  426. package/src/components/Label/index.ts +24 -0
  427. package/src/components/Label/stories/LabelShape.stories.tsx +33 -0
  428. package/src/components/Label/stories/LabelSize.stories.tsx +57 -0
  429. package/src/components/Label/stories/LabelText.stories.tsx +45 -0
  430. package/src/components/Label/styles/label.ts +13 -0
  431. package/src/components/Label/styles/labelShape.ts +23 -0
  432. package/src/components/Label/styles/labelSize.ts +55 -0
  433. package/src/components/Link/Link.appearance.ts +16 -0
  434. package/src/components/Link/Link.interface.ts +54 -0
  435. package/src/components/Link/Link.styles.ts +7 -0
  436. package/src/components/Link/Link.tsx +119 -0
  437. package/src/components/Link/appearance/linkAccent.ts +12 -0
  438. package/src/components/Link/appearance/linkDanger.ts +9 -0
  439. package/src/components/Link/appearance/linkExtra.ts +9 -0
  440. package/src/components/Link/appearance/linkStyle.ts +14 -0
  441. package/src/components/Link/appearance/linkSurface.ts +12 -0
  442. package/src/components/Link/index.ts +18 -0
  443. package/src/components/Link/stories/Link.stories.tsx +23 -0
  444. package/src/components/Link/styles/link.ts +14 -0
  445. package/src/components/List/List.appearance.ts +28 -0
  446. package/src/components/List/List.context.ts +7 -0
  447. package/src/components/List/List.interface.ts +94 -0
  448. package/src/components/List/List.styles.ts +9 -0
  449. package/src/components/List/List.tsx +119 -0
  450. package/src/components/List/ListItem.tsx +68 -0
  451. package/src/components/List/appearance/listAccent.ts +10 -0
  452. package/src/components/List/appearance/listDanger.ts +9 -0
  453. package/src/components/List/appearance/listError.ts +9 -0
  454. package/src/components/List/appearance/listExtra.ts +9 -0
  455. package/src/components/List/appearance/listInfo.ts +14 -0
  456. package/src/components/List/appearance/listSize.ts +27 -0
  457. package/src/components/List/appearance/listSpecial.ts +9 -0
  458. package/src/components/List/appearance/listStyle.ts +19 -0
  459. package/src/components/List/appearance/listSuccess.ts +9 -0
  460. package/src/components/List/appearance/listSurface.ts +18 -0
  461. package/src/components/List/appearance/listWarning.ts +9 -0
  462. package/src/components/List/index.ts +42 -0
  463. package/src/components/List/stories/List.stories.tsx +48 -0
  464. package/src/components/List/styles/list.ts +22 -0
  465. package/src/components/List/styles/listDirection.ts +40 -0
  466. package/src/components/List/styles/listSize.ts +6 -0
  467. package/src/components/Loader/Loader.appearance.ts +30 -0
  468. package/src/components/Loader/Loader.interface.ts +75 -0
  469. package/src/components/Loader/Loader.styles.ts +11 -0
  470. package/src/components/Loader/Loader.tsx +135 -0
  471. package/src/components/Loader/appearance/loaderAccent.ts +16 -0
  472. package/src/components/Loader/appearance/loaderDanger.ts +11 -0
  473. package/src/components/Loader/appearance/loaderError.ts +11 -0
  474. package/src/components/Loader/appearance/loaderExtra.ts +11 -0
  475. package/src/components/Loader/appearance/loaderInfo.ts +11 -0
  476. package/src/components/Loader/appearance/loaderShape.ts +24 -0
  477. package/src/components/Loader/appearance/loaderSize.ts +18 -0
  478. package/src/components/Loader/appearance/loaderSpecial.ts +11 -0
  479. package/src/components/Loader/appearance/loaderStyle.ts +17 -0
  480. package/src/components/Loader/appearance/loaderSuccess.ts +11 -0
  481. package/src/components/Loader/appearance/loaderSurface.ts +26 -0
  482. package/src/components/Loader/appearance/loaderWarning.ts +11 -0
  483. package/src/components/Loader/index.ts +36 -0
  484. package/src/components/Loader/stories/LoaderDefault.stories.tsx +69 -0
  485. package/src/components/Loader/stories/LoaderShape.stories.tsx +51 -0
  486. package/src/components/Loader/stories/LoaderSize.stories.tsx +33 -0
  487. package/src/components/Loader/stories/LoaderStyle.stories.tsx +39 -0
  488. package/src/components/Loader/stories/LoaderText.stories.tsx +30 -0
  489. package/src/components/Loader/styles/loader.ts +14 -0
  490. package/src/components/Loader/styles/loaderShape.ts +34 -0
  491. package/src/components/Loader/styles/loaderSize.ts +28 -0
  492. package/src/components/Logo/Logo.interface.ts +16 -0
  493. package/src/components/Logo/Logo.styles.ts +11 -0
  494. package/src/components/Logo/Logo.tsx +53 -0
  495. package/src/components/Logo/index.ts +9 -0
  496. package/src/components/Logo/stories/Logo.stories.tsx +31 -0
  497. package/src/components/Logo/styles/logo.ts +13 -0
  498. package/src/components/Logo/styles/logoAlign.ts +28 -0
  499. package/src/components/Logo/styles/logoSize.ts +34 -0
  500. package/src/components/MenuItem/MenuItem.appearance.ts +18 -0
  501. package/src/components/MenuItem/MenuItem.interface.ts +100 -0
  502. package/src/components/MenuItem/MenuItem.styles.ts +13 -0
  503. package/src/components/MenuItem/MenuItem.tsx +173 -0
  504. package/src/components/MenuItem/appearance/menuItemAccent.ts +26 -0
  505. package/src/components/MenuItem/appearance/menuItemError.ts +19 -0
  506. package/src/components/MenuItem/appearance/menuItemShape.ts +24 -0
  507. package/src/components/MenuItem/appearance/menuItemSize.ts +48 -0
  508. package/src/components/MenuItem/appearance/menuItemStyle.ts +17 -0
  509. package/src/components/MenuItem/appearance/menuItemSurface.ts +38 -0
  510. package/src/components/MenuItem/index.ts +36 -0
  511. package/src/components/MenuItem/stories/MenuItem.stories.tsx +52 -0
  512. package/src/components/MenuItem/styles/menuItem.ts +25 -0
  513. package/src/components/MenuItem/styles/menuItemJustify.ts +18 -0
  514. package/src/components/MenuItem/styles/menuItemShape.ts +37 -0
  515. package/src/components/MenuItem/styles/menuItemSize.ts +65 -0
  516. package/src/components/Modal/Modal.interface.ts +35 -0
  517. package/src/components/Modal/Modal.styles.ts +7 -0
  518. package/src/components/Modal/Modal.tsx +73 -0
  519. package/src/components/Modal/index.ts +5 -0
  520. package/src/components/Modal/stories/Modal.stories.tsx +47 -0
  521. package/src/components/Modal/styles/modal.ts +36 -0
  522. package/src/components/Overlay/Overlay.appearance.ts +8 -0
  523. package/src/components/Overlay/Overlay.interface.ts +34 -0
  524. package/src/components/Overlay/Overlay.styles.ts +7 -0
  525. package/src/components/Overlay/Overlay.tsx +46 -0
  526. package/src/components/Overlay/appearance/overlayDefault.ts +12 -0
  527. package/src/components/Overlay/index.ts +16 -0
  528. package/src/components/Overlay/stories/Overlay.stories.tsx +24 -0
  529. package/src/components/Overlay/styles/overlay.ts +18 -0
  530. package/src/components/Pagination/Pagination.appearance.ts +12 -0
  531. package/src/components/Pagination/Pagination.interface.ts +46 -0
  532. package/src/components/Pagination/Pagination.styles.ts +9 -0
  533. package/src/components/Pagination/Pagination.tsx +107 -0
  534. package/src/components/Pagination/appearance/paginationAccent.ts +12 -0
  535. package/src/components/Pagination/appearance/paginationSize.ts +22 -0
  536. package/src/components/Pagination/appearance/paginationSurface.ts +12 -0
  537. package/src/components/Pagination/index.ts +24 -0
  538. package/src/components/Pagination/stories/Pagination.stories.tsx +37 -0
  539. package/src/components/Pagination/styles/pagination.ts +14 -0
  540. package/src/components/Pagination/styles/paginationSize.ts +46 -0
  541. package/src/components/Radio/Radio.appearance.ts +22 -0
  542. package/src/components/Radio/Radio.interface.ts +83 -0
  543. package/src/components/Radio/Radio.styles.ts +11 -0
  544. package/src/components/Radio/Radio.tsx +159 -0
  545. package/src/components/Radio/appearance/radioDefault.ts +54 -0
  546. package/src/components/Radio/appearance/radioDisabled.ts +17 -0
  547. package/src/components/Radio/appearance/radioError.ts +17 -0
  548. package/src/components/Radio/appearance/radioRequire.ts +17 -0
  549. package/src/components/Radio/appearance/radioShape.ts +24 -0
  550. package/src/components/Radio/appearance/radioSize.ts +21 -0
  551. package/src/components/Radio/appearance/radioStyle.ts +20 -0
  552. package/src/components/Radio/appearance/radioSuccess.ts +17 -0
  553. package/src/components/Radio/index.ts +27 -0
  554. package/src/components/Radio/stories/RadioDefault.stories.tsx +26 -0
  555. package/src/components/Radio/stories/RadioDisabled.stories.tsx +27 -0
  556. package/src/components/Radio/stories/RadioError.stories.tsx +26 -0
  557. package/src/components/Radio/stories/RadioRequire.stories.tsx +26 -0
  558. package/src/components/Radio/stories/RadioSize.stories.tsx +36 -0
  559. package/src/components/Radio/stories/RadioStyle.stories.tsx +41 -0
  560. package/src/components/Radio/stories/RadioSuccess.stories.tsx +26 -0
  561. package/src/components/Radio/styles/radio.ts +37 -0
  562. package/src/components/Radio/styles/radioShape.ts +27 -0
  563. package/src/components/Radio/styles/radioSize.ts +25 -0
  564. package/src/components/RangeSlider/RangeSlider.interface.ts +35 -0
  565. package/src/components/RangeSlider/RangeSlider.styles.ts +7 -0
  566. package/src/components/RangeSlider/RangeSlider.tsx +212 -0
  567. package/src/components/RangeSlider/index.ts +9 -0
  568. package/src/components/RangeSlider/stories/RangeSlider.stories.tsx +55 -0
  569. package/src/components/RangeSlider/styles/rangeSlider.ts +37 -0
  570. package/src/components/Response/Response.interface.ts +29 -0
  571. package/src/components/Response/Response.styles.ts +7 -0
  572. package/src/components/Response/Response.tsx +68 -0
  573. package/src/components/Response/index.ts +5 -0
  574. package/src/components/Response/stories/Response.stories.tsx +22 -0
  575. package/src/components/Response/styles/response.ts +22 -0
  576. package/src/components/Scrollbar/Scrollbar.interface.ts +19 -0
  577. package/src/components/Scrollbar/Scrollbar.styles.ts +7 -0
  578. package/src/components/Scrollbar/Scrollbar.tsx +38 -0
  579. package/src/components/Scrollbar/index.ts +5 -0
  580. package/src/components/Scrollbar/stories/Scrollbar.stories.tsx +61 -0
  581. package/src/components/Scrollbar/styles/scrollbar.ts +12 -0
  582. package/src/components/Search/Search.interface.ts +23 -0
  583. package/src/components/Search/Search.styles.ts +7 -0
  584. package/src/components/Search/Search.tsx +69 -0
  585. package/src/components/Search/index.ts +5 -0
  586. package/src/components/Search/stories/Search.stories.tsx +24 -0
  587. package/src/components/Search/styles/search.ts +28 -0
  588. package/src/components/Segmented/Segmented.appearance.ts +22 -0
  589. package/src/components/Segmented/Segmented.interface.ts +101 -0
  590. package/src/components/Segmented/Segmented.styles.ts +13 -0
  591. package/src/components/Segmented/Segmented.tsx +219 -0
  592. package/src/components/Segmented/appearance/segmentedDefault.ts +26 -0
  593. package/src/components/Segmented/appearance/segmentedDisabled.ts +15 -0
  594. package/src/components/Segmented/appearance/segmentedError.ts +15 -0
  595. package/src/components/Segmented/appearance/segmentedRequire.ts +14 -0
  596. package/src/components/Segmented/appearance/segmentedShape.ts +24 -0
  597. package/src/components/Segmented/appearance/segmentedSize.ts +31 -0
  598. package/src/components/Segmented/appearance/segmentedStyle.ts +19 -0
  599. package/src/components/Segmented/appearance/segmentedSuccess.ts +15 -0
  600. package/src/components/Segmented/index.ts +38 -0
  601. package/src/components/Segmented/stories/SegmentedDisabled.stories.tsx +25 -0
  602. package/src/components/Segmented/stories/SegmentedIcon.stories.tsx +46 -0
  603. package/src/components/Segmented/stories/SegmentedLabel.stories.tsx +43 -0
  604. package/src/components/Segmented/stories/SegmentedLabelIcon.stories.tsx +40 -0
  605. package/src/components/Segmented/stories/SegmentedShape.stories.tsx +54 -0
  606. package/src/components/Segmented/stories/SegmentedSize.stories.tsx +56 -0
  607. package/src/components/Segmented/stories/SegmentedStories.config.tsx +89 -0
  608. package/src/components/Segmented/stories/SegmentedStyle.stories.tsx +42 -0
  609. package/src/components/Segmented/styles/segmented.ts +27 -0
  610. package/src/components/Segmented/styles/segmentedShape.ts +37 -0
  611. package/src/components/Segmented/styles/segmentedSize.ts +65 -0
  612. package/src/components/Segmented/styles/segmentedWidth.ts +33 -0
  613. package/src/components/Select/Select.appearance.ts +22 -0
  614. package/src/components/Select/Select.interface.ts +80 -0
  615. package/src/components/Select/Select.styles.ts +9 -0
  616. package/src/components/Select/Select.tsx +178 -0
  617. package/src/components/Select/appearance/selectDefault.ts +17 -0
  618. package/src/components/Select/appearance/selectDisabled.ts +13 -0
  619. package/src/components/Select/appearance/selectError.ts +17 -0
  620. package/src/components/Select/appearance/selectRequire.ts +17 -0
  621. package/src/components/Select/appearance/selectShape.ts +21 -0
  622. package/src/components/Select/appearance/selectSize.ts +30 -0
  623. package/src/components/Select/appearance/selectStyle.ts +17 -0
  624. package/src/components/Select/appearance/selectSuccess.ts +17 -0
  625. package/src/components/Select/index.ts +29 -0
  626. package/src/components/Select/stories/Select.stories.tsx +67 -0
  627. package/src/components/Select/styles/select.ts +30 -0
  628. package/src/components/Select/styles/selectSize.ts +48 -0
  629. package/src/components/Switch/Switch.appearance.ts +20 -0
  630. package/src/components/Switch/Switch.interface.ts +70 -0
  631. package/src/components/Switch/Switch.styles.ts +11 -0
  632. package/src/components/Switch/Switch.tsx +143 -0
  633. package/src/components/Switch/appearance/switchDefault.ts +14 -0
  634. package/src/components/Switch/appearance/switchDisabled.ts +14 -0
  635. package/src/components/Switch/appearance/switchError.ts +14 -0
  636. package/src/components/Switch/appearance/switchRequire.ts +14 -0
  637. package/src/components/Switch/appearance/switchShape.ts +7 -0
  638. package/src/components/Switch/appearance/switchSize.ts +21 -0
  639. package/src/components/Switch/appearance/switchStyle.ts +19 -0
  640. package/src/components/Switch/appearance/switchSuccess.ts +14 -0
  641. package/src/components/Switch/index.ts +32 -0
  642. package/src/components/Switch/stories/SwitchDefault.stories.tsx +46 -0
  643. package/src/components/Switch/stories/SwitchDisabled.stories.tsx +51 -0
  644. package/src/components/Switch/stories/SwitchError.stories.tsx +46 -0
  645. package/src/components/Switch/stories/SwitchRequire.stories.tsx +46 -0
  646. package/src/components/Switch/stories/SwitchSize.stories.tsx +37 -0
  647. package/src/components/Switch/stories/SwitchStories.config.tsx +28 -0
  648. package/src/components/Switch/stories/SwitchSuccess.stories.tsx +46 -0
  649. package/src/components/Switch/stories/SwitchTitleDescSwitch.stories.tsx +50 -0
  650. package/src/components/Switch/stories/SwitchTitleSwitch.stories.tsx +49 -0
  651. package/src/components/Switch/styles/switch.ts +43 -0
  652. package/src/components/Switch/styles/switchAlign.ts +29 -0
  653. package/src/components/Switch/styles/switchSize.ts +40 -0
  654. package/src/components/Tab/Tab.interface.ts +21 -0
  655. package/src/components/Tab/Tab.styles.ts +9 -0
  656. package/src/components/Tab/Tab.tsx +44 -0
  657. package/src/components/Tab/index.ts +7 -0
  658. package/src/components/Tab/stories/Tab.stories.tsx +67 -0
  659. package/src/components/Tab/styles/tab.ts +19 -0
  660. package/src/components/Tab/styles/tabSize.ts +41 -0
  661. package/src/components/Text/Text.interface.ts +32 -0
  662. package/src/components/Text/Text.styles.ts +7 -0
  663. package/src/components/Text/Text.tsx +56 -0
  664. package/src/components/Text/index.ts +5 -0
  665. package/src/components/Text/stories/Text.stories.tsx +84 -0
  666. package/src/components/Text/styles/text.ts +7 -0
  667. package/src/components/Textarea/Textarea.appearance.ts +22 -0
  668. package/src/components/Textarea/Textarea.interface.ts +81 -0
  669. package/src/components/Textarea/Textarea.styles.ts +11 -0
  670. package/src/components/Textarea/Textarea.tsx +158 -0
  671. package/src/components/Textarea/appearance/textareaDefault.ts +26 -0
  672. package/src/components/Textarea/appearance/textareaDisabled.ts +17 -0
  673. package/src/components/Textarea/appearance/textareaError.ts +17 -0
  674. package/src/components/Textarea/appearance/textareaRequire.ts +17 -0
  675. package/src/components/Textarea/appearance/textareaShape.ts +24 -0
  676. package/src/components/Textarea/appearance/textareaSize.ts +22 -0
  677. package/src/components/Textarea/appearance/textareaStyle.ts +17 -0
  678. package/src/components/Textarea/appearance/textareaSuccess.ts +17 -0
  679. package/src/components/Textarea/index.ts +36 -0
  680. package/src/components/Textarea/stories/Textarea.stories.tsx +61 -0
  681. package/src/components/Textarea/styles/textarea.ts +17 -0
  682. package/src/components/Textarea/styles/textareaShape.ts +34 -0
  683. package/src/components/Textarea/styles/textareaSize.ts +32 -0
  684. package/src/components/Tile/Tile.appearance.ts +14 -0
  685. package/src/components/Tile/Tile.interface.ts +97 -0
  686. package/src/components/Tile/Tile.styles.ts +11 -0
  687. package/src/components/Tile/Tile.tsx +174 -0
  688. package/src/components/Tile/appearance/tileShape.ts +24 -0
  689. package/src/components/Tile/appearance/tileSize.ts +42 -0
  690. package/src/components/Tile/appearance/tileStyle.ts +17 -0
  691. package/src/components/Tile/appearance/tileSurface.ts +34 -0
  692. package/src/components/Tile/index.ts +30 -0
  693. package/src/components/Tile/stories/TileBadge.stories.tsx +20 -0
  694. package/src/components/Tile/stories/TileDefault.stories.tsx +40 -0
  695. package/src/components/Tile/stories/TileIcon.stories.tsx +23 -0
  696. package/src/components/Tile/stories/TileShape.stories.tsx +52 -0
  697. package/src/components/Tile/stories/TileSize.stories.tsx +53 -0
  698. package/src/components/Tile/stories/TileStyle.stories.tsx +40 -0
  699. package/src/components/Tile/stories/TileSwap.stories.tsx +60 -0
  700. package/src/components/Tile/styles/tile.ts +27 -0
  701. package/src/components/Tile/styles/tileShape.ts +34 -0
  702. package/src/components/Tile/styles/tileSize.ts +62 -0
  703. package/src/components/Title/Title.interface.ts +26 -0
  704. package/src/components/Title/Title.styles.ts +7 -0
  705. package/src/components/Title/Title.tsx +46 -0
  706. package/src/components/Title/index.ts +5 -0
  707. package/src/components/Title/stories/Title.stories.tsx +68 -0
  708. package/src/components/Title/styles/title.ts +7 -0
  709. package/src/components/Tooltip/Tooltip.appearance.ts +22 -0
  710. package/src/components/Tooltip/Tooltip.interface.ts +81 -0
  711. package/src/components/Tooltip/Tooltip.styles.ts +7 -0
  712. package/src/components/Tooltip/Tooltip.tsx +116 -0
  713. package/src/components/Tooltip/appearance/tooltipDefault.ts +12 -0
  714. package/src/components/Tooltip/appearance/tooltipDisabled.ts +11 -0
  715. package/src/components/Tooltip/appearance/tooltipError.ts +12 -0
  716. package/src/components/Tooltip/appearance/tooltipRequire.ts +12 -0
  717. package/src/components/Tooltip/appearance/tooltipShape.ts +24 -0
  718. package/src/components/Tooltip/appearance/tooltipSize.ts +21 -0
  719. package/src/components/Tooltip/appearance/tooltipStyle.ts +17 -0
  720. package/src/components/Tooltip/appearance/tooltipSuccess.ts +12 -0
  721. package/src/components/Tooltip/index.ts +26 -0
  722. package/src/components/Tooltip/stories/Tooltip.stories.tsx +61 -0
  723. package/src/components/Tooltip/styles/tooltip.ts +36 -0
  724. package/src/components/Warning/Warning.appearance.ts +22 -0
  725. package/src/components/Warning/Warning.interface.ts +86 -0
  726. package/src/components/Warning/Warning.styles.ts +11 -0
  727. package/src/components/Warning/Warning.tsx +116 -0
  728. package/src/components/Warning/appearance/warningAccent.ts +28 -0
  729. package/src/components/Warning/appearance/warningError.ts +28 -0
  730. package/src/components/Warning/appearance/warningInfo.ts +38 -0
  731. package/src/components/Warning/appearance/warningShape.ts +24 -0
  732. package/src/components/Warning/appearance/warningSize.ts +20 -0
  733. package/src/components/Warning/appearance/warningStyle.ts +17 -0
  734. package/src/components/Warning/appearance/warningSuccess.ts +18 -0
  735. package/src/components/Warning/appearance/warningWarning.ts +38 -0
  736. package/src/components/Warning/index.ts +28 -0
  737. package/src/components/Warning/stories/WarningDefault.stories.tsx +52 -0
  738. package/src/components/Warning/stories/WarningMuted.stories.tsx +40 -0
  739. package/src/components/Warning/stories/WarningShape.stories.tsx +52 -0
  740. package/src/components/Warning/stories/WarningSize.stories.tsx +28 -0
  741. package/src/components/Warning/stories/WarningStyle.stories.tsx +40 -0
  742. package/src/components/Warning/styles/warning.ts +13 -0
  743. package/src/components/Warning/styles/warningShape.ts +38 -0
  744. package/src/components/Warning/styles/warningSize.ts +31 -0
  745. package/src/icons/app_logo.svg +56 -0
  746. package/src/icons/connection.svg +9 -0
  747. package/src/icons/reject.svg +4 -0
  748. package/src/images/manager.png +0 -0
  749. package/src/index.tsx +957 -0
  750. package/src/module.d.ts +19 -0
  751. package/src/styles/borderColor/index.ts +35 -0
  752. package/src/styles/direction/index.ts +30 -0
  753. package/src/styles/fill/index.ts +58 -0
  754. package/src/styles/gap/index.ts +19 -0
  755. package/src/styles/iconFill/index.ts +46 -0
  756. package/src/styles/shape/index.ts +29 -0
  757. package/src/styles/textAlign/index.ts +22 -0
  758. package/src/styles/textColor/index.ts +18 -0
  759. package/src/styles/textSize/index.ts +55 -0
  760. package/src/styles/textWeight/index.ts +28 -0
  761. package/src/styles/titleSize/index.ts +50 -0
  762. package/src/styles/tokens.ts +31 -0
  763. package/src/styles/width/index.ts +29 -0
  764. package/src/utils/colorTokens/colorTokens.interface.ts +3 -0
  765. package/src/utils/colorTokens/colorTokens.ts +17 -0
  766. package/src/utils/colorTokens/index.ts +7 -0
  767. package/src/utils/getVariantsPropsList/getVariantsPropsList.interface.ts +10 -0
  768. package/src/utils/getVariantsPropsList/getVariantsPropsList.ts +51 -0
  769. package/src/utils/getVariantsPropsList/index.ts +5 -0
  770. package/src/utils/index.ts +15 -0
  771. package/tsconfig.json +14 -0
@@ -0,0 +1,12 @@
1
+ import { paginationAppearanceAccent } from './appearance/paginationAccent'
2
+ import { paginationAppearanceSize } from './appearance/paginationSize'
3
+ import { paginationAppearanceSurface } from './appearance/paginationSurface'
4
+ import type { PaginationAppearance } from './Pagination.interface'
5
+
6
+ const paginationAppearance = {
7
+ ...paginationAppearanceAccent,
8
+ ...paginationAppearanceSize,
9
+ ...paginationAppearanceSurface,
10
+ } satisfies PaginationAppearance
11
+
12
+ export { paginationAppearance }
@@ -0,0 +1,46 @@
1
+ import type { StyleProp, ViewStyle } from 'react-native'
2
+
3
+ import type {
4
+ AppearanceConfig,
5
+ AppearanceKeysDefault,
6
+ FillActiveProps,
7
+ FillProps,
8
+ TextColorProps,
9
+ TextSizeProps,
10
+ } from '@itcase/types-ui'
11
+
12
+ import type { paginationSizePropsType } from './styles/paginationSize'
13
+
14
+ interface PaginationAppearanceProps {
15
+ fill?: FillProps
16
+ fillActive?: FillActiveProps
17
+ size?: paginationSizePropsType
18
+ textColor?: TextColorProps
19
+ textColorActive?: TextColorProps
20
+ textSize?: TextSizeProps
21
+ }
22
+
23
+ type PaginationAppearanceKey = AppearanceKeysDefault
24
+ type PaginationConfig = AppearanceConfig<
25
+ AppearanceKeysDefault,
26
+ PaginationAppearanceProps
27
+ >
28
+ type PaginationAppearance = PaginationConfig['appearance']
29
+
30
+ interface PaginationProps extends PaginationAppearanceProps {
31
+ isDisabled?: boolean
32
+ onPageChange: (page: number) => void
33
+ appearance?: PaginationAppearanceKey
34
+ page: number
35
+ pageCount: number
36
+ size?: paginationSizePropsType
37
+ style?: StyleProp<ViewStyle>
38
+ }
39
+
40
+ export type {
41
+ PaginationAppearance,
42
+ PaginationAppearanceKey,
43
+ PaginationAppearanceProps,
44
+ PaginationConfig,
45
+ PaginationProps,
46
+ }
@@ -0,0 +1,9 @@
1
+ import { paginationStyles as paginationBaseStyles } from './styles/pagination'
2
+ import { paginationSizeStyles } from './styles/paginationSize'
3
+
4
+ const styles = {
5
+ ...paginationBaseStyles,
6
+ ...paginationSizeStyles,
7
+ }
8
+
9
+ export { styles }
@@ -0,0 +1,107 @@
1
+ import { useMemo } from 'react'
2
+ import { View } from 'react-native'
3
+
4
+ import { tokens } from '../../styles/tokens'
5
+ import { Button } from '../Button'
6
+ import { Text } from '../Text'
7
+ import { paginationAppearance } from './Pagination.appearance'
8
+ import type { PaginationConfig, PaginationProps } from './Pagination.interface'
9
+ import { styles } from './Pagination.styles'
10
+
11
+ const DEFAULT_PAGINATION_APPEARANCE = 'surfacePrimary'
12
+ const DEFAULT_PAGINATION_SIZE = 'm'
13
+
14
+ const paginationConfig: PaginationConfig = {
15
+ appearance: {},
16
+ setAppearance: (newComponent) => {
17
+ paginationConfig.appearance = newComponent
18
+ },
19
+ }
20
+
21
+ paginationConfig.setAppearance(paginationAppearance)
22
+
23
+ function Pagination(props: PaginationProps) {
24
+ const {
25
+ appearance = DEFAULT_PAGINATION_APPEARANCE,
26
+ size,
27
+ fill,
28
+ fillActive,
29
+ textColor,
30
+ textColorActive,
31
+ textSize,
32
+ page,
33
+ pageCount,
34
+ style,
35
+ isDisabled,
36
+ onPageChange,
37
+ } = props
38
+
39
+ const appearanceConfig = useMemo(() => {
40
+ if (!appearance || !paginationConfig.appearance) {
41
+ return undefined
42
+ }
43
+
44
+ return paginationConfig.appearance[appearance]
45
+ }, [appearance])
46
+
47
+ const sizeKey = size || appearanceConfig?.size || DEFAULT_PAGINATION_SIZE
48
+ const fillKey = fill || appearanceConfig?.fill
49
+ const fillActiveKey = fillActive || appearanceConfig?.fillActive
50
+ const textColorKey = textColor || appearanceConfig?.textColor
51
+ const textColorActiveKey =
52
+ textColorActive || appearanceConfig?.textColorActive
53
+ const textSizeKey = textSize || appearanceConfig?.textSize
54
+ const isPrevDisabled = isDisabled || page <= 1
55
+ const isNextDisabled = isDisabled || page >= pageCount
56
+
57
+ return (
58
+ <View
59
+ style={[
60
+ styles.pagination,
61
+ styles[`pagination_size_${sizeKey}`],
62
+ style && style,
63
+ ]}
64
+ >
65
+ <Button
66
+ appearance="surfaceSecondary"
67
+ size={sizeKey}
68
+ label="‹"
69
+ isDisabled={isPrevDisabled}
70
+ onPress={() => {
71
+ onPageChange(page - 1)
72
+ }}
73
+ />
74
+ <View
75
+ style={[
76
+ styles.pagination__current,
77
+ styles[`pagination_size_${sizeKey}__current`],
78
+ fillActiveKey
79
+ ? tokens[`fill_${fillActiveKey}`]
80
+ : fillKey && tokens[`fill_${fillKey}`],
81
+ ]}
82
+ >
83
+ <Text
84
+ size={textSizeKey}
85
+ textColor={textColorActiveKey || textColorKey}
86
+ weight="600"
87
+ >
88
+ {page}
89
+ </Text>
90
+ </View>
91
+ <Text size={textSizeKey} textColor={textColorKey}>
92
+ / {pageCount}
93
+ </Text>
94
+ <Button
95
+ appearance="surfaceSecondary"
96
+ size={sizeKey}
97
+ label="›"
98
+ isDisabled={isNextDisabled}
99
+ onPress={() => {
100
+ onPageChange(page + 1)
101
+ }}
102
+ />
103
+ </View>
104
+ )
105
+ }
106
+
107
+ export { Pagination, paginationConfig }
@@ -0,0 +1,12 @@
1
+ import type { PaginationAppearance } from '../Pagination.interface'
2
+
3
+ const paginationAppearanceAccent = {
4
+ accentPrimary: {
5
+ fill: 'accentPrimary',
6
+ fillActive: 'accentActiveQuaternary',
7
+ textColor: 'accentTextPrimary',
8
+ textColorActive: 'accentTextPrimary',
9
+ },
10
+ } satisfies PaginationAppearance
11
+
12
+ export { paginationAppearanceAccent }
@@ -0,0 +1,22 @@
1
+ import type { PaginationAppearance } from '../Pagination.interface'
2
+
3
+ const paginationAppearanceSize = {
4
+ sizeL: {
5
+ size: 'l',
6
+ textSize: 'l',
7
+ },
8
+ sizeM: {
9
+ size: 'm',
10
+ textSize: 'm',
11
+ },
12
+ sizeS: {
13
+ size: 's',
14
+ textSize: 's',
15
+ },
16
+ sizeXS: {
17
+ size: 'xs',
18
+ textSize: 'xs',
19
+ },
20
+ } satisfies PaginationAppearance
21
+
22
+ export { paginationAppearanceSize }
@@ -0,0 +1,12 @@
1
+ import type { PaginationAppearance } from '../Pagination.interface'
2
+
3
+ const paginationAppearanceSurface = {
4
+ surfacePrimary: {
5
+ fill: 'surfacePrimary',
6
+ fillActive: 'accentPrimary',
7
+ textColor: 'surfaceTextPrimary',
8
+ textColorActive: 'accentTextPrimary',
9
+ },
10
+ } satisfies PaginationAppearance
11
+
12
+ export { paginationAppearanceSurface }
@@ -0,0 +1,24 @@
1
+ import { Pagination, paginationConfig } from './Pagination'
2
+ import { paginationAppearance } from './Pagination.appearance'
3
+ import type {
4
+ PaginationAppearance,
5
+ PaginationAppearanceKey,
6
+ PaginationConfig,
7
+ PaginationProps,
8
+ } from './Pagination.interface'
9
+ import { paginationSizeList } from './styles/paginationSize'
10
+ import type { paginationSizePropsType } from './styles/paginationSize'
11
+
12
+ export {
13
+ Pagination,
14
+ paginationAppearance,
15
+ paginationConfig,
16
+ paginationSizeList,
17
+ }
18
+ export type {
19
+ PaginationAppearance,
20
+ PaginationAppearanceKey,
21
+ PaginationConfig,
22
+ PaginationProps,
23
+ paginationSizePropsType,
24
+ }
@@ -0,0 +1,37 @@
1
+ import type { Meta, StoryObj } from '@storybook/react'
2
+
3
+ import { Pagination } from '../Pagination'
4
+
5
+ const PaginationMeta: Meta<typeof Pagination> = {
6
+ title: 'Molecules / Pagination',
7
+ component: Pagination,
8
+ args: {
9
+ appearance: 'surfacePrimary',
10
+ size: 'm',
11
+ page: 2,
12
+ pageCount: 10,
13
+ onPageChange: () => undefined,
14
+ },
15
+ }
16
+
17
+ export default PaginationMeta
18
+
19
+ export const Default: StoryObj<typeof Pagination> = {}
20
+
21
+ export const FirstPage: StoryObj<typeof Pagination> = {
22
+ args: {
23
+ page: 1,
24
+ },
25
+ }
26
+
27
+ export const LastPage: StoryObj<typeof Pagination> = {
28
+ args: {
29
+ page: 10,
30
+ },
31
+ }
32
+
33
+ export const Compact: StoryObj<typeof Pagination> = {
34
+ args: {
35
+ size: 's',
36
+ },
37
+ }
@@ -0,0 +1,14 @@
1
+ import { StyleSheet } from 'react-native'
2
+
3
+ const paginationStyles = StyleSheet.create({
4
+ pagination: {
5
+ flexDirection: 'row',
6
+ alignItems: 'center',
7
+ },
8
+ pagination__current: {
9
+ justifyContent: 'center',
10
+ alignItems: 'center',
11
+ },
12
+ })
13
+
14
+ export { paginationStyles }
@@ -0,0 +1,46 @@
1
+ import { StyleSheet } from 'react-native'
2
+
3
+ import { getVariantsPropsList } from '../../../utils'
4
+
5
+ const paginationSizeStyles = StyleSheet.create({
6
+ pagination_size_l: {
7
+ gap: 8,
8
+ },
9
+ pagination_size_l__current: {
10
+ minWidth: 40,
11
+ minHeight: 40,
12
+ },
13
+ pagination_size_m: {
14
+ gap: 8,
15
+ },
16
+ pagination_size_m__current: {
17
+ minWidth: 32,
18
+ minHeight: 32,
19
+ },
20
+ pagination_size_s: {
21
+ gap: 4,
22
+ },
23
+ pagination_size_s__current: {
24
+ minWidth: 24,
25
+ minHeight: 24,
26
+ },
27
+ pagination_size_xs: {
28
+ gap: 4,
29
+ },
30
+ pagination_size_xs__current: {
31
+ minWidth: 20,
32
+ minHeight: 20,
33
+ },
34
+ })
35
+
36
+ const paginationSizeList = ['l', 'm', 's', 'xs'] as const
37
+
38
+ const paginationSizeStyleList = getVariantsPropsList(
39
+ paginationSizeStyles,
40
+ 'pagination_size_',
41
+ )
42
+
43
+ type paginationSizePropsType = (typeof paginationSizeList)[number]
44
+
45
+ export { paginationSizeList, paginationSizeStyleList, paginationSizeStyles }
46
+ export type { paginationSizePropsType }
@@ -0,0 +1,22 @@
1
+ import { radioAppearanceDefault } from './appearance/radioDefault'
2
+ import { radioAppearanceDisabled } from './appearance/radioDisabled'
3
+ import { radioAppearanceError } from './appearance/radioError'
4
+ import { radioAppearanceRequire } from './appearance/radioRequire'
5
+ import { radioAppearanceShape } from './appearance/radioShape'
6
+ import { radioAppearanceSize } from './appearance/radioSize'
7
+ import { radioAppearanceStyle } from './appearance/radioStyle'
8
+ import { radioAppearanceSuccess } from './appearance/radioSuccess'
9
+ import type { RadioAppearance } from './Radio.interface'
10
+
11
+ const radioAppearance = {
12
+ ...radioAppearanceDefault,
13
+ ...radioAppearanceError,
14
+ ...radioAppearanceSuccess,
15
+ ...radioAppearanceRequire,
16
+ ...radioAppearanceDisabled,
17
+ ...radioAppearanceSize,
18
+ ...radioAppearanceShape,
19
+ ...radioAppearanceStyle,
20
+ } satisfies RadioAppearance
21
+
22
+ export { radioAppearance }
@@ -0,0 +1,83 @@
1
+ import type { GestureResponderEvent, StyleProp, ViewStyle } from 'react-native'
2
+
3
+ import type {
4
+ AppearanceConfig,
5
+ AppearanceKeysState,
6
+ AppearancePartialRecord,
7
+ AppearanceRecord,
8
+ AppearanceShapeKey,
9
+ AppearanceSizeKey,
10
+ AppearanceStyleKey,
11
+ BorderColorActiveProps,
12
+ BorderColorProps,
13
+ CompositeAppearanceKeys,
14
+ FillActiveProps,
15
+ FillProps,
16
+ ShapeProps,
17
+ TextColorProps,
18
+ TextSizeProps,
19
+ TextWeightProps,
20
+ } from '@itcase/types-ui'
21
+
22
+ import type { radioSizePropsType } from './styles/radioSize'
23
+
24
+ interface RadioAppearanceProps {
25
+ borderColor?: BorderColorProps
26
+ borderRadioColor?: BorderColorProps
27
+ borderRadioColorActive?: BorderColorActiveProps
28
+ descTextColor?: TextColorProps
29
+ descTextSize?: TextSizeProps
30
+ descTextWeight?: TextWeightProps
31
+ fill?: FillProps
32
+ fillCheckmark?: FillProps
33
+ fillRadio?: FillProps
34
+ fillRadioActive?: FillActiveProps
35
+ labelTextColor?: TextColorProps
36
+ labelTextSize?: TextSizeProps
37
+ labelTextWeight?: TextWeightProps
38
+ shape?: ShapeProps
39
+ size?: radioSizePropsType
40
+ }
41
+
42
+ type RadioAppearanceKey = AppearanceKeysState | CompositeAppearanceKeys
43
+ type RadioConfig = AppearanceConfig<AppearanceKeysState, RadioAppearanceProps>
44
+ type RadioAppearance = RadioConfig['appearance']
45
+ type RadioAppearanceStyle = AppearanceRecord<
46
+ AppearanceStyleKey,
47
+ RadioAppearanceProps,
48
+ 'borderColor' | 'borderRadioColor' | 'borderRadioColorActive' | 'fill'
49
+ >
50
+ type RadioAppearanceShape = AppearancePartialRecord<
51
+ AppearanceShapeKey,
52
+ RadioAppearanceProps,
53
+ 'shape'
54
+ >
55
+ type RadioAppearanceSize = AppearancePartialRecord<
56
+ AppearanceSizeKey,
57
+ RadioAppearanceProps,
58
+ 'descTextSize' | 'labelTextSize' | 'size'
59
+ >
60
+
61
+ interface RadioProps extends RadioAppearanceProps {
62
+ isActive?: boolean
63
+ isChecked?: boolean
64
+ isDisabled?: boolean
65
+ onPress?: (event: GestureResponderEvent) => void
66
+ appearance?: RadioAppearanceKey
67
+ appearanceStyle?: AppearanceStyleKey
68
+ checked?: boolean
69
+ desc?: string
70
+ label?: string
71
+ style?: StyleProp<ViewStyle>
72
+ }
73
+
74
+ export type {
75
+ RadioAppearance,
76
+ RadioAppearanceKey,
77
+ RadioAppearanceProps,
78
+ RadioAppearanceShape,
79
+ RadioAppearanceSize,
80
+ RadioAppearanceStyle,
81
+ RadioConfig,
82
+ RadioProps,
83
+ }
@@ -0,0 +1,11 @@
1
+ import { radioStyles as radioBaseStyles } from './styles/radio'
2
+ import { radioShapeStyles } from './styles/radioShape'
3
+ import { radioSizeStyles } from './styles/radioSize'
4
+
5
+ const styles = {
6
+ ...radioBaseStyles,
7
+ ...radioShapeStyles,
8
+ ...radioSizeStyles,
9
+ }
10
+
11
+ export { styles }
@@ -0,0 +1,159 @@
1
+ import { useMemo } from 'react'
2
+ import { Pressable, View } from 'react-native'
3
+
4
+ import { tokens } from '../../styles/tokens'
5
+ import { Text } from '../Text'
6
+ import { radioAppearance } from './Radio.appearance'
7
+ import type {
8
+ RadioAppearanceProps,
9
+ RadioConfig,
10
+ RadioProps,
11
+ } from './Radio.interface'
12
+ import { styles } from './Radio.styles'
13
+
14
+ const DEFAULT_RADIO_APPEARANCE = 'defaultPrimary'
15
+ const DEFAULT_RADIO_APPEARANCE_STYLE = 'solid'
16
+ const DEFAULT_RADIO_SIZE = 'm'
17
+ const DEFAULT_RADIO_SHAPE = 'circular'
18
+
19
+ const radioConfig: RadioConfig = {
20
+ appearance: {},
21
+ setAppearance: (newComponent) => {
22
+ radioConfig.appearance = newComponent
23
+ },
24
+ }
25
+
26
+ radioConfig.setAppearance(radioAppearance)
27
+
28
+ function Radio(props: RadioProps) {
29
+ const {
30
+ appearance,
31
+ size,
32
+ fill,
33
+ fillCheckmark,
34
+ fillRadio,
35
+ fillRadioActive,
36
+ label,
37
+ labelTextColor,
38
+ labelTextSize,
39
+ labelTextWeight,
40
+ desc,
41
+ descTextColor,
42
+ descTextSize,
43
+ descTextWeight,
44
+ borderColor,
45
+ borderRadioColor,
46
+ borderRadioColorActive,
47
+ appearanceStyle,
48
+ checked,
49
+ shape,
50
+ style,
51
+ isActive,
52
+ isChecked,
53
+ isDisabled,
54
+ onPress,
55
+ } = props
56
+
57
+ const appearanceConfig = useMemo(() => {
58
+ const appearanceTokens = (appearance || DEFAULT_RADIO_APPEARANCE).split(' ')
59
+ const isCompositeAppearance = appearanceTokens.length > 1
60
+ const sizeAppearanceKey = size && `size${size.toUpperCase()}`
61
+ const appearanceKeys = isCompositeAppearance
62
+ ? appearanceTokens
63
+ : [
64
+ ...appearanceTokens,
65
+ appearanceStyle || DEFAULT_RADIO_APPEARANCE_STYLE,
66
+ sizeAppearanceKey,
67
+ shape,
68
+ ]
69
+
70
+ return appearanceKeys.reduce<RadioAppearanceProps>(
71
+ (resultConfig, appearanceKey) => {
72
+ return Object.assign(
73
+ resultConfig,
74
+ appearanceKey &&
75
+ radioConfig.appearance?.[
76
+ appearanceKey as keyof NonNullable<typeof radioConfig.appearance>
77
+ ],
78
+ )
79
+ },
80
+ {},
81
+ )
82
+ }, [appearance, appearanceStyle, shape, size])
83
+
84
+ const isSelected = Boolean(checked || isActive || isChecked)
85
+ const sizeKey = size || appearanceConfig.size || DEFAULT_RADIO_SIZE
86
+ const shapeKey = shape || appearanceConfig.shape || DEFAULT_RADIO_SHAPE
87
+ const fillKey = fill || appearanceConfig.fill
88
+ const radioFillKey = isSelected
89
+ ? fillRadioActive || appearanceConfig.fillRadioActive
90
+ : fillRadio || appearanceConfig.fillRadio
91
+ const radioBorderKey = isSelected
92
+ ? borderRadioColorActive || appearanceConfig.borderRadioColorActive
93
+ : borderRadioColor ||
94
+ appearanceConfig.borderRadioColor ||
95
+ borderColor ||
96
+ appearanceConfig.borderColor
97
+ const checkmarkFillKey =
98
+ fillCheckmark || appearanceConfig.fillCheckmark || 'surfaceQuaternary'
99
+
100
+ return (
101
+ <Pressable
102
+ disabled={isDisabled}
103
+ style={[
104
+ styles.radio,
105
+ fillKey && tokens[`fill_${fillKey}`],
106
+ style && style,
107
+ ]}
108
+ onPress={onPress}
109
+ >
110
+ <View
111
+ style={[
112
+ styles.radio__item,
113
+ sizeKey && styles[`radio__item_size_${sizeKey}`],
114
+ ]}
115
+ >
116
+ <View
117
+ style={[
118
+ styles.radio__state,
119
+ shapeKey && styles[`radio_shape_${shapeKey}`],
120
+ radioFillKey && tokens[`fill_${radioFillKey}`],
121
+ radioBorderKey && tokens[`border_color_${radioBorderKey}`],
122
+ ]}
123
+ />
124
+ {isSelected && (
125
+ <View
126
+ style={[
127
+ styles.radio__checkmark,
128
+ checkmarkFillKey && tokens[`fill_${checkmarkFillKey}`],
129
+ ]}
130
+ />
131
+ )}
132
+ </View>
133
+ {(label || desc) && (
134
+ <View style={styles.radio__text}>
135
+ {label && (
136
+ <Text
137
+ size={labelTextSize || appearanceConfig.labelTextSize}
138
+ textColor={labelTextColor || appearanceConfig.labelTextColor}
139
+ weight={labelTextWeight || appearanceConfig.labelTextWeight}
140
+ >
141
+ {label}
142
+ </Text>
143
+ )}
144
+ {desc && (
145
+ <Text
146
+ size={descTextSize || appearanceConfig.descTextSize}
147
+ textColor={descTextColor || appearanceConfig.descTextColor}
148
+ weight={descTextWeight || appearanceConfig.descTextWeight}
149
+ >
150
+ {desc}
151
+ </Text>
152
+ )}
153
+ </View>
154
+ )}
155
+ </Pressable>
156
+ )
157
+ }
158
+
159
+ export { Radio, radioConfig }
@@ -0,0 +1,54 @@
1
+ import type { RadioAppearance } from '../Radio.interface'
2
+
3
+ const radioAppearanceDefault = {
4
+ defaultPrimary: {
5
+ fill: 'surfaceSecondary',
6
+ fillCheckmark: 'surfaceQuaternary',
7
+ fillRadio: 'surfaceSecondary',
8
+ fillRadioActive: 'surfaceQuaternary',
9
+ labelTextColor: 'surfaceTextPrimary',
10
+ descTextColor: 'surfaceTextPrimary',
11
+ borderColor: 'surfaceBorderQuaternary',
12
+ borderRadioColor: 'surfaceBorderQuaternary',
13
+ borderRadioColorActive: 'surfaceBorderQuaternary',
14
+ shape: 'circular',
15
+ },
16
+ defaultQuaternary: {
17
+ fill: 'surfaceQuaternary',
18
+ fillCheckmark: 'surfaceQuaternary',
19
+ fillRadio: 'surfaceQuaternary',
20
+ fillRadioActive: 'surfaceQuaternary',
21
+ labelTextColor: 'surfaceTextPrimary',
22
+ descTextColor: 'surfaceTextPrimary',
23
+ borderColor: 'surfaceBorderQuaternary',
24
+ borderRadioColor: 'surfaceBorderQuaternary',
25
+ borderRadioColorActive: 'surfaceBorderQuaternary',
26
+ shape: 'circular',
27
+ },
28
+ defaultSecondary: {
29
+ fill: 'surfaceSecondary',
30
+ fillCheckmark: 'surfaceQuaternary',
31
+ fillRadio: 'surfaceSecondary',
32
+ fillRadioActive: 'surfaceQuaternary',
33
+ labelTextColor: 'surfaceTextPrimary',
34
+ descTextColor: 'surfaceTextPrimary',
35
+ borderColor: 'surfaceBorderQuaternary',
36
+ borderRadioColor: 'surfaceBorderQuaternary',
37
+ borderRadioColorActive: 'surfaceBorderQuaternary',
38
+ shape: 'circular',
39
+ },
40
+ defaultTertiary: {
41
+ fill: 'surfaceTertiary',
42
+ fillCheckmark: 'surfaceQuaternary',
43
+ fillRadio: 'surfaceTertiary',
44
+ fillRadioActive: 'surfaceQuaternary',
45
+ labelTextColor: 'surfaceTextPrimary',
46
+ descTextColor: 'surfaceTextPrimary',
47
+ borderColor: 'surfaceBorderQuaternary',
48
+ borderRadioColor: 'surfaceBorderQuaternary',
49
+ borderRadioColorActive: 'surfaceBorderQuaternary',
50
+ shape: 'circular',
51
+ },
52
+ } satisfies RadioAppearance
53
+
54
+ export { radioAppearanceDefault }