@nobak/design-system 1.0.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 (304) hide show
  1. package/LICENSE +73 -0
  2. package/README.md +142 -0
  3. package/lib/assets/icons.js +67 -0
  4. package/lib/components/AccountOverview/AccountOverview.js +122 -0
  5. package/lib/components/AdminPanel.js +58 -0
  6. package/lib/components/AssetExchange/AssetExchange.js +189 -0
  7. package/lib/components/AuthenticationFlow.js +216 -0
  8. package/lib/components/ConversationInterface/ConversationInterface.js +232 -0
  9. package/lib/components/DevFooter.js +38 -0
  10. package/lib/components/DevMenu.js +35 -0
  11. package/lib/components/DevSidebar.js +28 -0
  12. package/lib/components/DigitalDisplay.js +83 -0
  13. package/lib/components/Footer.js +45 -0
  14. package/lib/components/HeroContainer.js +10 -0
  15. package/lib/components/IntentRecognition/IntentRecognition.js +174 -0
  16. package/lib/components/Logo.js +259 -0
  17. package/lib/components/MenuBar.js +56 -0
  18. package/lib/components/NetworkSettings.js +223 -0
  19. package/lib/components/RecoverySetup/RecoverySetup.js +354 -0
  20. package/lib/components/RisingSun.js +122 -0
  21. package/lib/components/Symbol.js +226 -0
  22. package/lib/components/TransactionComposer/TransactionComposer.js +258 -0
  23. package/lib/components/TransactionConfirmation.js +184 -0
  24. package/lib/components/WalletMenu.js +33 -0
  25. package/lib/components/console/code/CodeBlock.js +150 -0
  26. package/lib/components/console/code/index.js +9 -0
  27. package/lib/components/console/data/DataTable.js +245 -0
  28. package/lib/components/console/data/MetricCard.js +79 -0
  29. package/lib/components/console/data/index.js +11 -0
  30. package/lib/components/console/documentation/index.js +10 -0
  31. package/lib/components/console/forms/APIKeyGenerator.js +261 -0
  32. package/lib/components/console/forms/SearchBar.js +210 -0
  33. package/lib/components/console/forms/index.js +10 -0
  34. package/lib/components/console/index.js +29 -0
  35. package/lib/components/console/layout/ConsoleCard.js +82 -0
  36. package/lib/components/console/layout/ConsoleLayout.js +86 -0
  37. package/lib/components/console/layout/index.js +10 -0
  38. package/lib/components/console/monitoring/StatusIndicator.js +128 -0
  39. package/lib/components/console/monitoring/index.js +9 -0
  40. package/lib/components/console/navigation/DevFooter.js +38 -0
  41. package/lib/components/console/navigation/DevMenu.js +35 -0
  42. package/lib/components/console/navigation/DevSidebar.js +28 -0
  43. package/lib/components/console/navigation/index.js +11 -0
  44. package/lib/components/console/settings/index.js +10 -0
  45. package/lib/components/index.js +12 -0
  46. package/lib/design/ColorPicker.stories.js +9 -0
  47. package/lib/design/HSLTool-V1.js +345 -0
  48. package/lib/design/HSLTool-V2.js +475 -0
  49. package/lib/design/HSLTool-V3.js +543 -0
  50. package/lib/design/HSLTool-V4.js +1139 -0
  51. package/lib/design/HSLTool.js +374 -0
  52. package/lib/design/OKLCHColorPicker.stories.js +24 -0
  53. package/lib/design/OKLCHTool.js +1014 -0
  54. package/lib/index.js +4 -0
  55. package/lib/shared/components/Avatar/Avatar.js +18 -0
  56. package/lib/shared/components/Avatar/index.js +1 -0
  57. package/lib/shared/components/Badge/Badge.js +34 -0
  58. package/lib/shared/components/Badge/index.js +1 -0
  59. package/lib/shared/components/Breadcrumb/Breadcrumb.js +13 -0
  60. package/lib/shared/components/Breadcrumb/index.js +1 -0
  61. package/lib/shared/components/Button/Button.js +184 -0
  62. package/lib/shared/components/Button/index.js +1 -0
  63. package/lib/shared/components/Calendar/Calendar.js +155 -0
  64. package/lib/shared/components/Calendar/CalendarDay.js +251 -0
  65. package/lib/shared/components/Calendar/CalendarHeader.js +88 -0
  66. package/lib/shared/components/Calendar/CalendarMonth.js +106 -0
  67. package/lib/shared/components/Calendar/CalendarWeek.js +267 -0
  68. package/lib/shared/components/Calendar/constants.js +73 -0
  69. package/lib/shared/components/Calendar/index.js +3 -0
  70. package/lib/shared/components/Calendar/types.d.js +0 -0
  71. package/lib/shared/components/Cartel/Cartel.js +44 -0
  72. package/lib/shared/components/Cartel/index.js +1 -0
  73. package/lib/shared/components/Cell/Cell.js +105 -0
  74. package/lib/shared/components/Cell/index.js +1 -0
  75. package/lib/shared/components/Checkbox/Checkbox.js +27 -0
  76. package/lib/shared/components/Checkbox/index.js +1 -0
  77. package/lib/shared/components/Clock/Clock.js +6 -0
  78. package/lib/shared/components/Clock/index.js +1 -0
  79. package/lib/shared/components/ColorChecker/ColorChecker.js +89 -0
  80. package/lib/shared/components/ColorChecker/index.js +2 -0
  81. package/lib/shared/components/ColorChecker/utils.js +159 -0
  82. package/lib/shared/components/Command/Command.js +95 -0
  83. package/lib/shared/components/Command/index.js +1 -0
  84. package/lib/shared/components/Container/Container.js +18 -0
  85. package/lib/shared/components/Container/index.js +1 -0
  86. package/lib/shared/components/Cover/Cover.js +17 -0
  87. package/lib/shared/components/Cover/index.js +1 -0
  88. package/lib/shared/components/DatePicker/DatePicker.js +52 -0
  89. package/lib/shared/components/DatePicker/components/Calendar.js +125 -0
  90. package/lib/shared/components/DatePicker/components/CalendarDay.js +23 -0
  91. package/lib/shared/components/DatePicker/components/DateWrapper.js +15 -0
  92. package/lib/shared/components/DatePicker/components/index.js +2 -0
  93. package/lib/shared/components/DatePicker/index.js +1 -0
  94. package/lib/shared/components/DateTime/DateTime.js +51 -0
  95. package/lib/shared/components/DateTime/index.js +1 -0
  96. package/lib/shared/components/Debug/Debug.js +12 -0
  97. package/lib/shared/components/Debug/index.js +1 -0
  98. package/lib/shared/components/Disclosure/Disclosure.js +31 -0
  99. package/lib/shared/components/Disclosure/index.js +1 -0
  100. package/lib/shared/components/Dropdown/Dropdown.js +91 -0
  101. package/lib/shared/components/Dropdown/index.js +1 -0
  102. package/lib/shared/components/EmptyState/EmptyState.js +40 -0
  103. package/lib/shared/components/EmptyState/index.js +1 -0
  104. package/lib/shared/components/Form/Form.js +41 -0
  105. package/lib/shared/components/Form/components/DynamicForm.js +66 -0
  106. package/lib/shared/components/Form/components/StepperForm.js +266 -0
  107. package/lib/shared/components/Form/components/index.js +2 -0
  108. package/lib/shared/components/Form/context/Form.js +164 -0
  109. package/lib/shared/components/Form/context/index.js +1 -0
  110. package/lib/shared/components/Form/index.js +1 -0
  111. package/lib/shared/components/Form/types.d.js +1 -0
  112. package/lib/shared/components/Form/utils/index.js +31 -0
  113. package/lib/shared/components/GroupItems/GroupItems.js +17 -0
  114. package/lib/shared/components/GroupItems/index.js +1 -0
  115. package/lib/shared/components/Header/Header.js +26 -0
  116. package/lib/shared/components/Header/index.js +1 -0
  117. package/lib/shared/components/Heading/Heading.js +5 -0
  118. package/lib/shared/components/Heading/index.js +1 -0
  119. package/lib/shared/components/Icon/Icon.js +28 -0
  120. package/lib/shared/components/Icon/index.js +1 -0
  121. package/lib/shared/components/Identicons/Identicons.js +6 -0
  122. package/lib/shared/components/Identicons/index.d.js +0 -0
  123. package/lib/shared/components/Identicons/index.js +1 -0
  124. package/lib/shared/components/Image/Image.js +22 -0
  125. package/lib/shared/components/Image/index.js +1 -0
  126. package/lib/shared/components/Input/Input.js +201 -0
  127. package/lib/shared/components/Input/components/CheckBoxInput.js +81 -0
  128. package/lib/shared/components/Input/components/DateInput.js +89 -0
  129. package/lib/shared/components/Input/components/DefaultInput.js +102 -0
  130. package/lib/shared/components/Input/components/FileReaderInput.js +88 -0
  131. package/lib/shared/components/Input/components/NumberInput.js +141 -0
  132. package/lib/shared/components/Input/components/PickerInput.js +122 -0
  133. package/lib/shared/components/Input/components/RCInput.js +112 -0
  134. package/lib/shared/components/Input/components/Radiobox/RadioboxBasic.js +56 -0
  135. package/lib/shared/components/Input/components/Radiobox/RadioboxCard.js +27 -0
  136. package/lib/shared/components/Input/components/Radiobox/RadioboxFull.js +44 -0
  137. package/lib/shared/components/Input/components/Radiobox/index.js +3 -0
  138. package/lib/shared/components/Input/components/RadioboxInput.js +102 -0
  139. package/lib/shared/components/Input/components/SelectInput.js +70 -0
  140. package/lib/shared/components/Input/components/TextAreaInput.js +67 -0
  141. package/lib/shared/components/Input/components/TextInput.js +139 -0
  142. package/lib/shared/components/Input/components/TimeInput.js +37 -0
  143. package/lib/shared/components/Input/components/UploadFileInput.js +123 -0
  144. package/lib/shared/components/Input/components/index.js +13 -0
  145. package/lib/shared/components/Input/components/types.d.js +0 -0
  146. package/lib/shared/components/Input/index.js +1 -0
  147. package/lib/shared/components/Input/types.d.js +0 -0
  148. package/lib/shared/components/Layout/Layout.js +13 -0
  149. package/lib/shared/components/Layout/index.js +1 -0
  150. package/lib/shared/components/List/List.js +30 -0
  151. package/lib/shared/components/List/index.js +1 -0
  152. package/lib/shared/components/Loader/Loader.js +27 -0
  153. package/lib/shared/components/Loader/index.js +1 -0
  154. package/lib/shared/components/Modal/Modal.js +102 -0
  155. package/lib/shared/components/Modal/index.js +1 -0
  156. package/lib/shared/components/Notification/Notification.js +39 -0
  157. package/lib/shared/components/Notification/index.js +1 -0
  158. package/lib/shared/components/Person/Person.js +81 -0
  159. package/lib/shared/components/Person/index.js +1 -0
  160. package/lib/shared/components/Popover/Popover.js +39 -0
  161. package/lib/shared/components/Popover/index.js +1 -0
  162. package/lib/shared/components/QRCode/QRCode.js +329 -0
  163. package/lib/shared/components/QRCode/index.js +1 -0
  164. package/lib/shared/components/RadioGroup/RadioGroup.js +35 -0
  165. package/lib/shared/components/RadioGroup/components/DefaultGroup.js +71 -0
  166. package/lib/shared/components/RadioGroup/components/VerticalGroup.js +83 -0
  167. package/lib/shared/components/RadioGroup/components/index.js +2 -0
  168. package/lib/shared/components/RadioGroup/index.js +1 -0
  169. package/lib/shared/components/Search/Search.js +12 -0
  170. package/lib/shared/components/Search/index.js +1 -0
  171. package/lib/shared/components/Select/Select.js +90 -0
  172. package/lib/shared/components/Select/index.js +1 -0
  173. package/lib/shared/components/Sidebar/Sidebar.js +42 -0
  174. package/lib/shared/components/Sidebar/index.js +1 -0
  175. package/lib/shared/components/SlideOver/SlideOver.js +81 -0
  176. package/lib/shared/components/SlideOver/index.js +1 -0
  177. package/lib/shared/components/Slider/Slider.js +80 -0
  178. package/lib/shared/components/Slider/index.js +1 -0
  179. package/lib/shared/components/Stepper/Stepper.js +32 -0
  180. package/lib/shared/components/Stepper/index.js +1 -0
  181. package/lib/shared/components/Steps/Steps.js +53 -0
  182. package/lib/shared/components/Steps/index.js +1 -0
  183. package/lib/shared/components/Switch/Switch.js +26 -0
  184. package/lib/shared/components/Switch/index.js +1 -0
  185. package/lib/shared/components/Tab/Tab.js +59 -0
  186. package/lib/shared/components/Tab/index.js +1 -0
  187. package/lib/shared/components/Table/Table.js +47 -0
  188. package/lib/shared/components/Table/index.js +1 -0
  189. package/lib/shared/components/Text/Text.js +11 -0
  190. package/lib/shared/components/Text/index.js +1 -0
  191. package/lib/shared/components/TextList/TextList.js +15 -0
  192. package/lib/shared/components/TextList/index.js +1 -0
  193. package/lib/shared/components/TimePicker/TimePicker.js +161 -0
  194. package/lib/shared/components/TimePicker/index.js +1 -0
  195. package/lib/shared/components/Tooltip/Tooltip.js +13 -0
  196. package/lib/shared/components/Tooltip/index.js +1 -0
  197. package/lib/shared/components/Uploader/Uploader.js +63 -0
  198. package/lib/shared/components/Uploader/index.js +1 -0
  199. package/lib/shared/components/Video/Video.js +20 -0
  200. package/lib/shared/components/Video/index.js +1 -0
  201. package/lib/shared/components/index.d.js +0 -0
  202. package/lib/shared/components/index.js +50 -0
  203. package/lib/shared/elements/Color/ColorPallet.js +20 -0
  204. package/lib/shared/elements/Color/index.js +1 -0
  205. package/lib/shared/elements/Text.js +37 -0
  206. package/lib/shared/elements/index.js +1 -0
  207. package/lib/shared/helpers/FakeLink.js +8 -0
  208. package/lib/shared/helpers/constants.js +359 -0
  209. package/lib/shared/helpers/index.js +2 -0
  210. package/lib/shared/helpers/isEqual.js +56 -0
  211. package/lib/shared/index.d.js +0 -0
  212. package/lib/shared/index.js +1 -0
  213. package/lib/shared/stories/components/Avatar.stories.js +17 -0
  214. package/lib/shared/stories/components/Badge.stories.dev.js +37 -0
  215. package/lib/shared/stories/components/Button.stories.js +553 -0
  216. package/lib/shared/stories/components/Calendar.stories.js +62 -0
  217. package/lib/shared/stories/components/Cartel.stories.js +32 -0
  218. package/lib/shared/stories/components/Checkbox.stories.js +15 -0
  219. package/lib/shared/stories/components/ColorChecker.stories.dev.js +16 -0
  220. package/lib/shared/stories/components/DateTime.stories.js +27 -0
  221. package/lib/shared/stories/components/Disclosure.stories.js +30 -0
  222. package/lib/shared/stories/components/Dropdown.stories.js +39 -0
  223. package/lib/shared/stories/components/Form/Default.stories.js +201 -0
  224. package/lib/shared/stories/components/Form/DummyForm.stories.js +48 -0
  225. package/lib/shared/stories/components/Form/DynamicForm.stories.js +155 -0
  226. package/lib/shared/stories/components/Form/StepperForm.stories.js +138 -0
  227. package/lib/shared/stories/components/Form/ValidateForm.stories.js +70 -0
  228. package/lib/shared/stories/components/Form/Validation.stories.js +184 -0
  229. package/lib/shared/stories/components/GroupItems.stories.js +23 -0
  230. package/lib/shared/stories/components/Header.stories.js +29 -0
  231. package/lib/shared/stories/components/Heading.stories.js +27 -0
  232. package/lib/shared/stories/components/Icon.stories.js +22 -0
  233. package/lib/shared/stories/components/Image.stories.js +23 -0
  234. package/lib/shared/stories/components/Input/Checkbox.stories.js +45 -0
  235. package/lib/shared/stories/components/Input/DatePicker.stories.js +23 -0
  236. package/lib/shared/stories/components/Input/Defaut.stories.js +24 -0
  237. package/lib/shared/stories/components/Input/Number.stories.js +24 -0
  238. package/lib/shared/stories/components/Input/RCI.stories.js +59 -0
  239. package/lib/shared/stories/components/Input/Radiobox.stories.dev.js +28 -0
  240. package/lib/shared/stories/components/Input/Select.stories.dev.js +27 -0
  241. package/lib/shared/stories/components/Input/SelectMultiple.stories.dev.js +510 -0
  242. package/lib/shared/stories/components/Input/Textarea.stories.js +24 -0
  243. package/lib/shared/stories/components/List.stories.js +34 -0
  244. package/lib/shared/stories/components/Loader.stories.js +15 -0
  245. package/lib/shared/stories/components/Modal.stories.js +50 -0
  246. package/lib/shared/stories/components/Notification.stories.js +22 -0
  247. package/lib/shared/stories/components/Person.stories.js +41 -0
  248. package/lib/shared/stories/components/Picker.stories.js +15 -0
  249. package/lib/shared/stories/components/Popover.stories.js +36 -0
  250. package/lib/shared/stories/components/QRCode.stories.js +20 -0
  251. package/lib/shared/stories/components/RadioGroup.stories.js +56 -0
  252. package/lib/shared/stories/components/Select.stories.js +50 -0
  253. package/lib/shared/stories/components/Sidebar.stories.js +35 -0
  254. package/lib/shared/stories/components/Slider.stories.dev.js +48 -0
  255. package/lib/shared/stories/components/Stepper/Stepper.stories.js +38 -0
  256. package/lib/shared/stories/components/Steps.stories.js +15 -0
  257. package/lib/shared/stories/components/Switch.stories.js +15 -0
  258. package/lib/shared/stories/components/Tab.stories.js +15 -0
  259. package/lib/shared/stories/components/Table.stories.js +95 -0
  260. package/lib/shared/stories/components/TextList.stories.js +23 -0
  261. package/lib/shared/stories/components/Tooltip.stories.dev.js +40 -0
  262. package/lib/shared/stories/elements/Color.stories.js +269 -0
  263. package/lib/shared/stories/elements/Text.stories.js +45 -0
  264. package/lib/shared/types/index.js +1 -0
  265. package/lib/stories/Foundation/BrandIdentity.prod.stories.js +510 -0
  266. package/lib/stories/Foundation/Logo.stories.js +19 -0
  267. package/lib/stories/Foundation/RisingSun.stories.js +16 -0
  268. package/lib/stories/Foundation/Shadows.stories.js +601 -0
  269. package/lib/stories/Foundation/Symbol.stories.js +18 -0
  270. package/lib/stories/HeroContainer.stories.js +18 -0
  271. package/lib/styles/accessibilityTokens.js +72 -0
  272. package/lib/styles/borderWidth.js +10 -0
  273. package/lib/styles/colors.js +303 -0
  274. package/lib/styles/elevation.js +240 -0
  275. package/lib/styles/icons.js +218 -0
  276. package/lib/styles/index.js +29 -0
  277. package/lib/styles/motion.js +668 -0
  278. package/lib/styles/opacity.js +10 -0
  279. package/lib/styles/radius.js +11 -0
  280. package/lib/styles/sizing.js +35 -0
  281. package/lib/styles/space.js +24 -0
  282. package/lib/styles/theme/darkTheme.js +471 -0
  283. package/lib/styles/theme/index.js +44 -0
  284. package/lib/styles/theme/lightTheme.js +480 -0
  285. package/lib/styles/theme/themeTypes.js +1 -0
  286. package/lib/styles/theme/themeUtils.js +63 -0
  287. package/lib/styles/typography-advanced.js +510 -0
  288. package/lib/styles/typography.js +1419 -0
  289. package/lib/styles/zIndex.js +19 -0
  290. package/lib/tokens/borders.js +161 -0
  291. package/lib/tokens/colors.js +426 -0
  292. package/lib/tokens/components.js +499 -0
  293. package/lib/tokens/index.js +84 -0
  294. package/lib/tokens/lighting.js +384 -0
  295. package/lib/tokens/motion.js +284 -0
  296. package/lib/tokens/semantic.js +367 -0
  297. package/lib/tokens/shadows.js +114 -0
  298. package/lib/tokens/spacing.js +189 -0
  299. package/lib/tokens/typography.js +268 -0
  300. package/package.json +176 -0
  301. package/styles/generated-tokens.css +677 -0
  302. package/styles/index.css +2 -0
  303. package/styles/main.css +610 -0
  304. package/tailwind.config.js +64 -0
@@ -0,0 +1,480 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ // src/styles/theme/lightTheme.ts
8
+ // Light Theme Definition
9
+ // Uses the global tokens and semantic tokens to define the light theme
10
+
11
+ import { colors } from "../colors";
12
+
13
+ // Import types from ./types
14
+
15
+ // Import global tokens and utils
16
+
17
+ var globalTokens = {
18
+ colors: colors.global
19
+ };
20
+ import { createThemeUtils } from "./themeUtils";
21
+ // ===========================
22
+ // LIGHT THEME SEMANTIC TOKENS
23
+ // ===========================
24
+
25
+ var lightSemanticTokens = {
26
+ background: {
27
+ "default": colors.global.neutral[100],
28
+ surface: colors.global["static"].white,
29
+ subtle: colors.global.neutral[200],
30
+ overlay: "".concat(colors.global["static"].black, "80"),
31
+ // 50% opacity
32
+ elevated: colors.global["static"].white,
33
+ inverse: colors.global.neutral[1400]
34
+ },
35
+ content: {
36
+ primary: colors.global.neutral[1400],
37
+ secondary: colors.global.neutral[1000],
38
+ tertiary: colors.global.neutral[800],
39
+ disabled: colors.global.neutral[500],
40
+ inverse: colors.global["static"].white,
41
+ link: colors.global.blue[600]
42
+ },
43
+ border: {
44
+ "default": colors.global.neutral[400],
45
+ subtle: colors.global.neutral[300],
46
+ strong: colors.global.neutral[600],
47
+ focus: colors.global.blue[600],
48
+ inverse: colors.global.neutral[800]
49
+ },
50
+ interactive: {
51
+ primary: {
52
+ "default": colors.global.blue[600],
53
+ hover: colors.global.blue[700],
54
+ pressed: colors.global.blue[800],
55
+ disabled: colors.global.neutral[300]
56
+ },
57
+ secondary: {
58
+ "default": colors.global.neutral[200],
59
+ hover: colors.global.neutral[300],
60
+ pressed: colors.global.neutral[400],
61
+ disabled: colors.global.neutral[200]
62
+ },
63
+ tertiary: {
64
+ "default": colors.global["static"].transparent,
65
+ hover: colors.global.neutral[100],
66
+ pressed: colors.global.neutral[200],
67
+ disabled: colors.global["static"].transparent
68
+ }
69
+ },
70
+ status: {
71
+ info: {
72
+ background: colors.global.blue[100],
73
+ border: colors.global.blue[300],
74
+ content: colors.global.blue[800],
75
+ icon: colors.global.blue[600]
76
+ },
77
+ success: {
78
+ background: colors.global.emerald[100],
79
+ border: colors.global.emerald[300],
80
+ content: colors.global.emerald[800],
81
+ icon: colors.global.emerald[600]
82
+ },
83
+ warning: {
84
+ background: colors.global.amber[100],
85
+ border: colors.global.amber[300],
86
+ content: colors.global.amber[800],
87
+ icon: colors.global.amber[600]
88
+ },
89
+ error: {
90
+ background: colors.global.red[100],
91
+ border: colors.global.red[300],
92
+ content: colors.global.red[800],
93
+ icon: colors.global.red[600]
94
+ }
95
+ }
96
+ };
97
+
98
+ // ===========================
99
+ // LIGHT THEME FINTECH TOKENS
100
+ // ===========================
101
+
102
+ var lightFintechTokens = {
103
+ market: {
104
+ profit: {
105
+ primary: colors.global.emerald[600],
106
+ background: colors.global.emerald[100],
107
+ border: colors.global.emerald[300]
108
+ },
109
+ loss: {
110
+ primary: colors.global.red[600],
111
+ background: colors.global.red[100],
112
+ border: colors.global.red[300]
113
+ },
114
+ neutral: {
115
+ primary: colors.global.neutral[600],
116
+ background: colors.global.neutral[100],
117
+ border: colors.global.neutral[300]
118
+ }
119
+ },
120
+ transaction: {
121
+ pending: {
122
+ primary: colors.global.amber[600],
123
+ background: colors.global.amber[100],
124
+ border: colors.global.amber[300]
125
+ },
126
+ processing: {
127
+ primary: colors.global.blue[600],
128
+ background: colors.global.blue[100],
129
+ border: colors.global.blue[300]
130
+ },
131
+ completed: {
132
+ primary: colors.global.emerald[600],
133
+ background: colors.global.emerald[100],
134
+ border: colors.global.emerald[300]
135
+ },
136
+ failed: {
137
+ primary: colors.global.red[600],
138
+ background: colors.global.red[100],
139
+ border: colors.global.red[300]
140
+ }
141
+ },
142
+ risk: {
143
+ veryLow: colors.global.emerald[300],
144
+ low: colors.global.emerald[500],
145
+ medium: colors.global.amber[500],
146
+ high: colors.global.red[600],
147
+ veryHigh: colors.global.red[700],
148
+ critical: colors.global.red[900]
149
+ },
150
+ security: {
151
+ verified: {
152
+ primary: colors.global.emerald[600],
153
+ background: colors.global.emerald[100],
154
+ border: colors.global.emerald[300]
155
+ },
156
+ unverified: {
157
+ primary: colors.global.neutral[500],
158
+ background: colors.global.neutral[100],
159
+ border: colors.global.neutral[300]
160
+ },
161
+ secure: {
162
+ primary: colors.global.emerald[600],
163
+ background: colors.global.emerald[100],
164
+ border: colors.global.emerald[300]
165
+ },
166
+ warning: {
167
+ primary: colors.global.amber[600],
168
+ background: colors.global.amber[100],
169
+ border: colors.global.amber[300]
170
+ },
171
+ critical: {
172
+ primary: colors.global.red[700],
173
+ background: colors.global.red[100],
174
+ border: colors.global.red[300]
175
+ }
176
+ },
177
+ account: {
178
+ basic: colors.global.neutral[600],
179
+ premium: colors.global.violet[600],
180
+ vip: colors.global.amber[600]
181
+ },
182
+ chart: {
183
+ primary: [colors.global.blue[600], colors.global.emerald[600], colors.global.red[600], colors.global.amber[600], colors.global.violet[600]],
184
+ sequential: [colors.global.blue[200], colors.global.blue[300], colors.global.blue[400], colors.global.blue[500], colors.global.blue[600], colors.global.blue[700], colors.global.blue[800], colors.global.blue[900]],
185
+ categorical: [colors.global.blue[600], colors.global.emerald[600], colors.global.red[600], colors.global.amber[600], colors.global.violet[600], colors.global.neutral[600]]
186
+ }
187
+ };
188
+
189
+ // ===========================
190
+ // LIGHT THEME COMPONENT TOKENS
191
+ // ===========================
192
+
193
+ var lightComponentTokens = {
194
+ button: {
195
+ primary: {
196
+ background: colors.global.blue[600],
197
+ backgroundHover: colors.global.blue[700],
198
+ backgroundPressed: colors.global.blue[800],
199
+ backgroundDisabled: colors.global.neutral[300],
200
+ content: colors.global["static"].white,
201
+ contentDisabled: colors.global.neutral[500],
202
+ border: colors.global.blue[600]
203
+ },
204
+ secondary: {
205
+ background: colors.global.neutral[200],
206
+ backgroundHover: colors.global.neutral[300],
207
+ backgroundPressed: colors.global.neutral[400],
208
+ backgroundDisabled: colors.global.neutral[100],
209
+ content: colors.global.neutral[900],
210
+ contentDisabled: colors.global.neutral[500],
211
+ border: colors.global.neutral[400]
212
+ },
213
+ destructive: {
214
+ background: colors.global.red[600],
215
+ backgroundHover: colors.global.red[700],
216
+ backgroundPressed: colors.global.red[800],
217
+ backgroundDisabled: colors.global.neutral[300],
218
+ content: colors.global["static"].white,
219
+ contentDisabled: colors.global.neutral[500],
220
+ border: colors.global.red[600]
221
+ },
222
+ tertiary: {
223
+ background: colors.global["static"].transparent,
224
+ backgroundHover: colors.global.neutral[100],
225
+ backgroundPressed: colors.global.neutral[200],
226
+ backgroundDisabled: colors.global["static"].transparent,
227
+ content: colors.global.blue[600],
228
+ contentDisabled: colors.global.neutral[400],
229
+ border: colors.global["static"].transparent
230
+ },
231
+ link: {
232
+ background: colors.global["static"].transparent,
233
+ backgroundHover: colors.global["static"].transparent,
234
+ backgroundPressed: colors.global["static"].transparent,
235
+ backgroundDisabled: colors.global["static"].transparent,
236
+ content: colors.global.blue[600],
237
+ contentDisabled: colors.global.neutral[400],
238
+ border: colors.global["static"].transparent
239
+ },
240
+ success: {
241
+ background: colors.global.emerald[500],
242
+ backgroundHover: colors.global.emerald[400],
243
+ backgroundPressed: colors.global.emerald[600],
244
+ backgroundDisabled: colors.global.neutral[300],
245
+ content: colors.global["static"].white,
246
+ contentDisabled: colors.global.neutral[500],
247
+ border: colors.global.emerald[500]
248
+ },
249
+ warning: {
250
+ background: colors.global.amber[500],
251
+ backgroundHover: colors.global.amber[400],
252
+ backgroundPressed: colors.global.amber[600],
253
+ backgroundDisabled: colors.global.neutral[300],
254
+ content: colors.global["static"].white,
255
+ contentDisabled: colors.global.neutral[500],
256
+ border: colors.global.amber[500]
257
+ },
258
+ ghost: {
259
+ background: colors.global["static"].transparent,
260
+ backgroundHover: colors.global["static"].transparent,
261
+ backgroundPressed: colors.global["static"].transparent,
262
+ backgroundDisabled: colors.global["static"].transparent,
263
+ content: colors.global.blue[600],
264
+ contentDisabled: colors.global.neutral[400],
265
+ border: colors.global["static"].transparent
266
+ }
267
+ },
268
+ input: {
269
+ background: colors.global["static"].white,
270
+ backgroundDisabled: colors.global.neutral[100],
271
+ content: colors.global.neutral[900],
272
+ contentPlaceholder: colors.global.neutral[500],
273
+ contentDisabled: colors.global.neutral[500],
274
+ border: colors.global.neutral[400],
275
+ borderFocus: colors.global.blue[600],
276
+ borderError: colors.global.red[600],
277
+ borderDisabled: colors.global.neutral[300]
278
+ },
279
+ card: {
280
+ background: colors.global["static"].white,
281
+ backgroundHover: colors.global.neutral[100],
282
+ backgroundPressed: colors.global.neutral[100],
283
+ content: colors.global.neutral[900],
284
+ border: colors.global.neutral[300]
285
+ },
286
+ navigation: {
287
+ background: colors.global["static"].white,
288
+ item: {
289
+ "default": colors.global.neutral[700],
290
+ hover: colors.global.neutral[900],
291
+ active: colors.global.blue[600],
292
+ disabled: colors.global.neutral[400]
293
+ },
294
+ border: colors.global.neutral[300]
295
+ },
296
+ modal: {
297
+ background: colors.global["static"].white,
298
+ overlay: "".concat(colors.global["static"].black, "80"),
299
+ content: colors.global.neutral[900],
300
+ border: colors.global.neutral[300]
301
+ },
302
+ toast: {
303
+ info: {
304
+ background: colors.global.blue[100],
305
+ content: colors.global.blue[900],
306
+ border: colors.global.blue[200]
307
+ },
308
+ success: {
309
+ background: colors.global.emerald[100],
310
+ content: colors.global.emerald[900],
311
+ border: colors.global.emerald[200]
312
+ },
313
+ warning: {
314
+ background: colors.global.amber[100],
315
+ content: colors.global.amber[900],
316
+ border: colors.global.amber[200]
317
+ },
318
+ error: {
319
+ background: colors.global.red[100],
320
+ content: colors.global.red[900],
321
+ border: colors.global.red[200]
322
+ }
323
+ },
324
+ "switch": {
325
+ trackBackground: colors.global.neutral[300],
326
+ trackBackgroundChecked: colors.global.blue[500],
327
+ trackBackgroundDisabled: colors.global.neutral[200],
328
+ thumbBackground: colors.global["static"].white,
329
+ thumbBackgroundDisabled: colors.global.neutral[100]
330
+ },
331
+ checkbox: {
332
+ background: colors.global["static"].white,
333
+ backgroundChecked: colors.global.blue[600],
334
+ backgroundDisabled: colors.global.neutral[200],
335
+ border: colors.global.neutral[400],
336
+ borderChecked: colors.global.blue[600],
337
+ borderDisabled: colors.global.neutral[400],
338
+ icon: colors.global["static"].white,
339
+ iconDisabled: colors.global.neutral[400]
340
+ },
341
+ radio: {
342
+ background: colors.global["static"].white,
343
+ backgroundChecked: colors.global.blue[600],
344
+ backgroundDisabled: colors.global.neutral[200],
345
+ border: colors.global.neutral[400],
346
+ borderChecked: colors.global.blue[600],
347
+ borderDisabled: colors.global.neutral[400],
348
+ dot: colors.global["static"].white,
349
+ dotDisabled: colors.global.neutral[400]
350
+ },
351
+ slider: {
352
+ trackBackground: colors.global.neutral[300],
353
+ trackBackgroundActive: colors.global.blue[500],
354
+ trackBackgroundDisabled: colors.global.neutral[200],
355
+ thumbBackground: colors.global["static"].white,
356
+ thumbBackgroundDisabled: colors.global.neutral[400]
357
+ },
358
+ tooltip: {
359
+ background: colors.global.neutral[900],
360
+ content: colors.global["static"].white
361
+ },
362
+ tag: {
363
+ "default": {
364
+ background: colors.global.neutral[100],
365
+ content: colors.global.neutral[900],
366
+ border: colors.global.neutral[300]
367
+ },
368
+ info: {
369
+ background: colors.global.blue[100],
370
+ content: colors.global.blue[900],
371
+ border: colors.global.blue[300]
372
+ },
373
+ success: {
374
+ background: colors.global.emerald[100],
375
+ content: colors.global.emerald[900],
376
+ border: colors.global.emerald[300]
377
+ },
378
+ warning: {
379
+ background: colors.global.amber[100],
380
+ content: colors.global.amber[900],
381
+ border: colors.global.amber[300]
382
+ },
383
+ error: {
384
+ background: colors.global.red[100],
385
+ content: colors.global.red[900],
386
+ border: colors.global.red[300]
387
+ }
388
+ },
389
+ avatar: {
390
+ background: colors.global.neutral[200],
391
+ content: colors.global.neutral[800],
392
+ border: colors.global.neutral[300]
393
+ },
394
+ badge: {
395
+ "default": {
396
+ background: colors.global.neutral[200],
397
+ content: colors.global.neutral[800]
398
+ },
399
+ primary: {
400
+ background: colors.global.blue[600],
401
+ content: colors.global["static"].white
402
+ },
403
+ success: {
404
+ background: colors.global.emerald[600],
405
+ content: colors.global["static"].white
406
+ },
407
+ warning: {
408
+ background: colors.global.amber[600],
409
+ content: colors.global["static"].white
410
+ },
411
+ error: {
412
+ background: colors.global.red[600],
413
+ content: colors.global["static"].white
414
+ }
415
+ },
416
+ alert: {
417
+ info: {
418
+ background: colors.global.blue[100],
419
+ content: colors.global.blue[900],
420
+ border: colors.global.blue[200],
421
+ icon: colors.global.blue[600]
422
+ },
423
+ success: {
424
+ background: colors.global.emerald[100],
425
+ content: colors.global.emerald[900],
426
+ border: colors.global.emerald[200],
427
+ icon: colors.global.emerald[600]
428
+ },
429
+ warning: {
430
+ background: colors.global.amber[100],
431
+ content: colors.global.amber[900],
432
+ border: colors.global.amber[200],
433
+ icon: colors.global.amber[600]
434
+ },
435
+ error: {
436
+ background: colors.global.red[100],
437
+ content: colors.global.red[900],
438
+ border: colors.global.red[200],
439
+ icon: colors.global.red[600]
440
+ }
441
+ },
442
+ divider: {
443
+ "default": colors.global.neutral[200],
444
+ subtle: colors.global.neutral[100]
445
+ },
446
+ progress: {
447
+ trackBackground: colors.global.neutral[200],
448
+ indicatorBackground: colors.global.blue[600]
449
+ },
450
+ spinner: {
451
+ primary: colors.global.blue[600],
452
+ secondary: colors.global.neutral[400]
453
+ },
454
+ skeleton: {
455
+ background: colors.global.neutral[100],
456
+ highlight: colors.global.neutral[200]
457
+ }
458
+ };
459
+
460
+ // Create the base theme object without utils
461
+ var baseTheme = {
462
+ name: 'light',
463
+ mode: 'light',
464
+ global: globalTokens,
465
+ semantic: lightSemanticTokens,
466
+ fintech: lightFintechTokens,
467
+ component: lightComponentTokens
468
+ };
469
+
470
+ // Function to create the light theme with utils
471
+ var createLightTheme = function createLightTheme() {
472
+ var themeWithUtils = _objectSpread(_objectSpread({}, baseTheme), {}, {
473
+ utils: createThemeUtils(baseTheme)
474
+ });
475
+ return themeWithUtils;
476
+ };
477
+
478
+ // Finally, define the lightTheme with utils included
479
+ export var lightTheme = createLightTheme();
480
+ export default lightTheme;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Creates theme utility functions
3
+ */
4
+ export var createThemeUtils = function createThemeUtils(theme) {
5
+ return {
6
+ // Get contrasting color (black or white) based on background color
7
+ getContrastingColor: function getContrastingColor(backgroundColor) {
8
+ // Convert hex to RGB
9
+ var hex = backgroundColor.replace('#', '');
10
+ var r = parseInt(hex.substring(0, 2), 16);
11
+ var g = parseInt(hex.substring(2, 4), 16);
12
+ var b = parseInt(hex.substring(4, 6), 16);
13
+
14
+ // Calculate relative luminance (perceived brightness)
15
+ var luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
16
+
17
+ // Return black for light colors, white for dark colors
18
+ return luminance > 0.5 ? '#000000' : '#FFFFFF';
19
+ },
20
+ // Get financial color based on value (emerald for positive, red for negative)
21
+ getFinancialColor: function getFinancialColor(value, context) {
22
+ if (context === 'profit') return theme.global.colors.emerald[500];
23
+ if (context === 'loss') return theme.global.colors.red[500];
24
+ if (context === 'neutral') return theme.global.colors.gray[500];
25
+ return value >= 0 ? theme.global.colors.emerald[500] : theme.global.colors.red[500];
26
+ },
27
+ // Get risk color based on level (1-5)
28
+ getRiskColor: function getRiskColor(riskLevel) {
29
+ var colors = [theme.global.colors.emerald[500],
30
+ // Low risk
31
+ theme.global.colors.amber[500],
32
+ // Low-medium risk
33
+ theme.global.colors.amber[500],
34
+ // Medium risk
35
+ theme.global.colors.amber[1100],
36
+ // Medium-high risk
37
+ theme.global.colors.red[500] // High risk
38
+ ];
39
+ var index = Math.min(Math.max(0, riskLevel - 1), colors.length - 1);
40
+ return colors[index];
41
+ },
42
+ // Add opacity to a color
43
+ withOpacity: function withOpacity(color, opacity) {
44
+ // If color is already in rgba format
45
+ if (color.startsWith('rgba')) {
46
+ return color.replace(/[^,]+(?=\s*\)$)/, opacity.toString());
47
+ }
48
+
49
+ // If color is in hex format
50
+ if (color.startsWith('#')) {
51
+ // Convert hex to RGB
52
+ var hex = color.replace('#', '');
53
+ var r = parseInt(hex.substring(0, 2), 16);
54
+ var g = parseInt(hex.substring(2, 4), 16);
55
+ var b = parseInt(hex.substring(4, 6), 16);
56
+ return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(opacity, ")");
57
+ }
58
+
59
+ // Default return if format is not recognized
60
+ return color;
61
+ }
62
+ };
63
+ };