@iota/apps-ui-kit 0.0.0-dev-20251015065834

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 (243) hide show
  1. package/CHANGELOG.md +145 -0
  2. package/LICENSE +201 -0
  3. package/README.md +16 -0
  4. package/dist/index.d.ts +1911 -0
  5. package/dist/index.es.js +6486 -0
  6. package/dist/index.es.js.map +1 -0
  7. package/dist/index.umd.js +66 -0
  8. package/dist/index.umd.js.map +1 -0
  9. package/dist/style.css +1 -0
  10. package/package.json +80 -0
  11. package/src/lib/components/atoms/badge/Badge.tsx +37 -0
  12. package/src/lib/components/atoms/badge/badge.classes.ts +33 -0
  13. package/src/lib/components/atoms/badge/badge.enums.ts +11 -0
  14. package/src/lib/components/atoms/badge/index.ts +6 -0
  15. package/src/lib/components/atoms/button/Button.tsx +110 -0
  16. package/src/lib/components/atoms/button/button-variants/ButtonPill.tsx +23 -0
  17. package/src/lib/components/atoms/button/button-variants/ButtonUnstyled.tsx +27 -0
  18. package/src/lib/components/atoms/button/button-variants/buttonVariants.types.ts +11 -0
  19. package/src/lib/components/atoms/button/button-variants/index.ts +5 -0
  20. package/src/lib/components/atoms/button/button.classes.ts +53 -0
  21. package/src/lib/components/atoms/button/button.enums.ts +21 -0
  22. package/src/lib/components/atoms/button/index.ts +7 -0
  23. package/src/lib/components/atoms/button-segment/ButtonSegment.tsx +98 -0
  24. package/src/lib/components/atoms/button-segment/buttonSegment.classes.ts +24 -0
  25. package/src/lib/components/atoms/button-segment/buttonSegment.enums.ts +7 -0
  26. package/src/lib/components/atoms/button-segment/index.ts +5 -0
  27. package/src/lib/components/atoms/checkbox/Checkbox.tsx +124 -0
  28. package/src/lib/components/atoms/checkbox/index.ts +4 -0
  29. package/src/lib/components/atoms/divider/Divider.tsx +48 -0
  30. package/src/lib/components/atoms/divider/divider.classes.ts +11 -0
  31. package/src/lib/components/atoms/divider/divider.enums.ts +7 -0
  32. package/src/lib/components/atoms/divider/index.ts +6 -0
  33. package/src/lib/components/atoms/header/Header.tsx +73 -0
  34. package/src/lib/components/atoms/header/index.ts +4 -0
  35. package/src/lib/components/atoms/image/Image.tsx +32 -0
  36. package/src/lib/components/atoms/image/index.ts +4 -0
  37. package/src/lib/components/atoms/index.ts +26 -0
  38. package/src/lib/components/atoms/info-box/InfoBox.tsx +68 -0
  39. package/src/lib/components/atoms/info-box/index.ts +5 -0
  40. package/src/lib/components/atoms/info-box/infoBox.classes.ts +18 -0
  41. package/src/lib/components/atoms/info-box/infoBox.enums.ts +14 -0
  42. package/src/lib/components/atoms/key-value-info/KeyValueInfo.tsx +157 -0
  43. package/src/lib/components/atoms/key-value-info/index.ts +6 -0
  44. package/src/lib/components/atoms/key-value-info/keyValue.enums.ts +7 -0
  45. package/src/lib/components/atoms/label-text/LabelText.tsx +92 -0
  46. package/src/lib/components/atoms/label-text/index.ts +5 -0
  47. package/src/lib/components/atoms/label-text/labelText.classes.ts +22 -0
  48. package/src/lib/components/atoms/label-text/labelText.enums.ts +8 -0
  49. package/src/lib/components/atoms/list-item/ListItem.tsx +88 -0
  50. package/src/lib/components/atoms/list-item/index.ts +4 -0
  51. package/src/lib/components/atoms/loading-indicator/LoadingIndicator.tsx +38 -0
  52. package/src/lib/components/atoms/loading-indicator/index.ts +4 -0
  53. package/src/lib/components/atoms/media-fallback/MediaFallback.tsx +12 -0
  54. package/src/lib/components/atoms/media-fallback/index.ts +4 -0
  55. package/src/lib/components/atoms/panel/Panel.tsx +28 -0
  56. package/src/lib/components/atoms/panel/index.ts +4 -0
  57. package/src/lib/components/atoms/placeholder/Placeholder.tsx +27 -0
  58. package/src/lib/components/atoms/placeholder/index.ts +4 -0
  59. package/src/lib/components/atoms/radio-button/RadioButton.tsx +64 -0
  60. package/src/lib/components/atoms/radio-button/index.ts +4 -0
  61. package/src/lib/components/atoms/secondary-text/SecondaryText.tsx +29 -0
  62. package/src/lib/components/atoms/secondary-text/index.ts +4 -0
  63. package/src/lib/components/atoms/skeleton/Skeleton.tsx +30 -0
  64. package/src/lib/components/atoms/skeleton/index.ts +4 -0
  65. package/src/lib/components/atoms/snackbar/Snackbar.tsx +69 -0
  66. package/src/lib/components/atoms/snackbar/index.ts +5 -0
  67. package/src/lib/components/atoms/snackbar/snackbar.classes.ts +18 -0
  68. package/src/lib/components/atoms/snackbar/snackbar.enums.tsx +9 -0
  69. package/src/lib/components/atoms/toggle/Toggle.tsx +140 -0
  70. package/src/lib/components/atoms/toggle/index.ts +6 -0
  71. package/src/lib/components/atoms/toggle/toggle.classes.ts +41 -0
  72. package/src/lib/components/atoms/toggle/toggle.enums.ts +12 -0
  73. package/src/lib/components/atoms/tooltip/Tooltip.tsx +139 -0
  74. package/src/lib/components/atoms/tooltip/index.ts +5 -0
  75. package/src/lib/components/atoms/tooltip/tooltip.classes.ts +11 -0
  76. package/src/lib/components/atoms/tooltip/tooltip.enums.ts +9 -0
  77. package/src/lib/components/atoms/video/Video.tsx +33 -0
  78. package/src/lib/components/atoms/video/index.ts +4 -0
  79. package/src/lib/components/atoms/video/video.constants.ts +31 -0
  80. package/src/lib/components/index.ts +6 -0
  81. package/src/lib/components/molecules/account/Account.tsx +195 -0
  82. package/src/lib/components/molecules/account/index.ts +4 -0
  83. package/src/lib/components/molecules/address/Address.tsx +101 -0
  84. package/src/lib/components/molecules/address/index.ts +4 -0
  85. package/src/lib/components/molecules/asset-media-renderer/AssetMediaRenderer.tsx +50 -0
  86. package/src/lib/components/molecules/asset-media-renderer/index.ts +4 -0
  87. package/src/lib/components/molecules/card/Card.tsx +70 -0
  88. package/src/lib/components/molecules/card/CardAction.tsx +78 -0
  89. package/src/lib/components/molecules/card/CardBody.tsx +73 -0
  90. package/src/lib/components/molecules/card/CardImage.tsx +43 -0
  91. package/src/lib/components/molecules/card/CardImagePlaceholder.tsx +146 -0
  92. package/src/lib/components/molecules/card/card.classes.ts +27 -0
  93. package/src/lib/components/molecules/card/card.enums.ts +26 -0
  94. package/src/lib/components/molecules/card/index.ts +8 -0
  95. package/src/lib/components/molecules/chip/Chip.tsx +146 -0
  96. package/src/lib/components/molecules/chip/chip.classes.ts +54 -0
  97. package/src/lib/components/molecules/chip/chip.enums.ts +15 -0
  98. package/src/lib/components/molecules/chip/index.ts +5 -0
  99. package/src/lib/components/molecules/display-stats/DisplayStats.tsx +142 -0
  100. package/src/lib/components/molecules/display-stats/displayStats.classes.ts +36 -0
  101. package/src/lib/components/molecules/display-stats/displayStats.enums.ts +13 -0
  102. package/src/lib/components/molecules/display-stats/index.ts +5 -0
  103. package/src/lib/components/molecules/dropdown/Dropdown.tsx +10 -0
  104. package/src/lib/components/molecules/dropdown/dropdownPosition.enums.ts +7 -0
  105. package/src/lib/components/molecules/dropdown/index.ts +5 -0
  106. package/src/lib/components/molecules/index.ts +19 -0
  107. package/src/lib/components/molecules/input/Input.tsx +261 -0
  108. package/src/lib/components/molecules/input/InputWrapper.tsx +97 -0
  109. package/src/lib/components/molecules/input/TextArea.tsx +148 -0
  110. package/src/lib/components/molecules/input/index.ts +8 -0
  111. package/src/lib/components/molecules/input/input.classes.ts +13 -0
  112. package/src/lib/components/molecules/input/input.enums.ts +14 -0
  113. package/src/lib/components/molecules/input/input.types.ts +29 -0
  114. package/src/lib/components/molecules/navbar-item/NavbarItem.tsx +47 -0
  115. package/src/lib/components/molecules/navbar-item/NavbarItemHorizontal.tsx +65 -0
  116. package/src/lib/components/molecules/navbar-item/NavbarItemVertical.tsx +54 -0
  117. package/src/lib/components/molecules/navbar-item/index.ts +5 -0
  118. package/src/lib/components/molecules/navbar-item/navbarItem.classes.ts +16 -0
  119. package/src/lib/components/molecules/navbar-item/navbarItem.enums.ts +7 -0
  120. package/src/lib/components/molecules/search/Search.tsx +219 -0
  121. package/src/lib/components/molecules/search/index.ts +5 -0
  122. package/src/lib/components/molecules/search/search.classes.ts +20 -0
  123. package/src/lib/components/molecules/search/search.enums.ts +7 -0
  124. package/src/lib/components/molecules/segmented-button/SegmentedButton.tsx +38 -0
  125. package/src/lib/components/molecules/segmented-button/index.ts +6 -0
  126. package/src/lib/components/molecules/segmented-button/segmentedButton.classes.ts +12 -0
  127. package/src/lib/components/molecules/segmented-button/segmentedButton.enums.ts +8 -0
  128. package/src/lib/components/molecules/select/Select.tsx +235 -0
  129. package/src/lib/components/molecules/select/index.ts +5 -0
  130. package/src/lib/components/molecules/select/select.enums.ts +7 -0
  131. package/src/lib/components/molecules/table-cell/TableCell.tsx +62 -0
  132. package/src/lib/components/molecules/table-cell/index.ts +4 -0
  133. package/src/lib/components/molecules/table-header-cell/TableHeaderCell.tsx +140 -0
  134. package/src/lib/components/molecules/table-header-cell/index.ts +5 -0
  135. package/src/lib/components/molecules/table-header-cell/tableHeaderCell.enums.ts +7 -0
  136. package/src/lib/components/molecules/title/Title.tsx +78 -0
  137. package/src/lib/components/molecules/title/index.ts +5 -0
  138. package/src/lib/components/molecules/title/titleClasses.constants.ts +14 -0
  139. package/src/lib/components/molecules/title/titleSize.enums.ts +7 -0
  140. package/src/lib/components/molecules/visual-asset-card/VisualAssetCard.tsx +89 -0
  141. package/src/lib/components/molecules/visual-asset-card/index.ts +5 -0
  142. package/src/lib/components/molecules/visual-asset-card/visualAssetCard.enums.ts +7 -0
  143. package/src/lib/components/organisms/accordion/Accordion.tsx +108 -0
  144. package/src/lib/components/organisms/accordion/accordion.classes.ts +4 -0
  145. package/src/lib/components/organisms/accordion/index.ts +4 -0
  146. package/src/lib/components/organisms/dialog/Dialog.tsx +157 -0
  147. package/src/lib/components/organisms/dialog/dialog.enums.ts +7 -0
  148. package/src/lib/components/organisms/dialog/index.ts +5 -0
  149. package/src/lib/components/organisms/index.ts +7 -0
  150. package/src/lib/components/organisms/navbar/Navbar.tsx +101 -0
  151. package/src/lib/components/organisms/navbar/NavbarSlideout.tsx +59 -0
  152. package/src/lib/components/organisms/navbar/index.ts +5 -0
  153. package/src/lib/components/organisms/table/Table.tsx +234 -0
  154. package/src/lib/components/organisms/table/TableContext.tsx +56 -0
  155. package/src/lib/components/organisms/table/index.ts +4 -0
  156. package/src/lib/constants/colors.constants.ts +239 -0
  157. package/src/lib/constants/index.ts +4 -0
  158. package/src/lib/enums/index.ts +5 -0
  159. package/src/lib/enums/screenSize.enums.ts +9 -0
  160. package/src/lib/enums/theme.enums.ts +8 -0
  161. package/src/lib/index.ts +10 -0
  162. package/src/lib/styles/base.css +144 -0
  163. package/src/lib/styles/components.css +735 -0
  164. package/src/lib/styles/fonts.css +7 -0
  165. package/src/lib/styles/index.css +18 -0
  166. package/src/lib/styles/utilities.css +61 -0
  167. package/src/lib/styles/variables/dark-variables.css +262 -0
  168. package/src/lib/styles/variables/general-variables.css +9 -0
  169. package/src/lib/styles/variables/light-variables.css +276 -0
  170. package/src/lib/styles/variables/names-variables.css +270 -0
  171. package/src/lib/tailwind/base.presets.ts +58 -0
  172. package/src/lib/tailwind/constants/customColors.constants.ts +13 -0
  173. package/src/lib/tailwind/constants/fontFamily.constants.ts +8 -0
  174. package/src/lib/tailwind/constants/fontSizes.constants.ts +201 -0
  175. package/src/lib/tailwind/constants/gradients.constants.ts +6 -0
  176. package/src/lib/tailwind/constants/index.ts +7 -0
  177. package/src/lib/tailwind/constants/scaling.constants.ts +41 -0
  178. package/src/lib/tailwind/constants/variableSpacing.constants.ts +66 -0
  179. package/src/lib/tailwind/helpers.ts +20 -0
  180. package/src/lib/tailwind/index.ts +5 -0
  181. package/src/lib/tailwind/plugins.ts +12 -0
  182. package/src/lib/tailwind/responsive.presets.ts +36 -0
  183. package/src/lib/tailwind/static.presets.ts +25 -0
  184. package/src/lib/tailwind/types.ts +6 -0
  185. package/src/lib/utils/format.ts +8 -0
  186. package/src/lib/utils/index.ts +4 -0
  187. package/src/storybook/blocks/Showcase.tsx +20 -0
  188. package/src/storybook/blocks/TypeSet.tsx +34 -0
  189. package/src/storybook/blocks/TypeSetItem.tsx +74 -0
  190. package/src/storybook/blocks/index.ts +6 -0
  191. package/src/storybook/constants/gradients.constants.ts +8 -0
  192. package/src/storybook/constants/index.ts +5 -0
  193. package/src/storybook/constants/typeset.constants.ts +39 -0
  194. package/src/storybook/constants/variableSpacing.constants.ts +6 -0
  195. package/src/storybook/helpers/formatGradientNames.ts +15 -0
  196. package/src/storybook/helpers/getFontSizeLabel.ts +15 -0
  197. package/src/storybook/helpers/index.ts +4 -0
  198. package/src/storybook/stories/atoms/Badge.stories.tsx +32 -0
  199. package/src/storybook/stories/atoms/Button.stories.tsx +45 -0
  200. package/src/storybook/stories/atoms/ButtonSegment.stories.tsx +45 -0
  201. package/src/storybook/stories/atoms/Checkbox.stories.tsx +34 -0
  202. package/src/storybook/stories/atoms/CustomScrollbar.stories.tsx +22 -0
  203. package/src/storybook/stories/atoms/Divider.stories.tsx +41 -0
  204. package/src/storybook/stories/atoms/Header.stories.tsx +58 -0
  205. package/src/storybook/stories/atoms/InfoBox.stories.tsx +67 -0
  206. package/src/storybook/stories/atoms/KeyValueInfo.stories.tsx +59 -0
  207. package/src/storybook/stories/atoms/LabelText.stories.tsx +55 -0
  208. package/src/storybook/stories/atoms/ListItem.stories.tsx +41 -0
  209. package/src/storybook/stories/atoms/LoadingIndicator.stories.tsx +32 -0
  210. package/src/storybook/stories/atoms/Panel.stories.tsx +36 -0
  211. package/src/storybook/stories/atoms/Placeholder.stories.tsx +33 -0
  212. package/src/storybook/stories/atoms/RadioButton.stories.tsx +51 -0
  213. package/src/storybook/stories/atoms/Skeleton.stories.tsx +33 -0
  214. package/src/storybook/stories/atoms/Snackbar.stories.tsx +43 -0
  215. package/src/storybook/stories/atoms/Toggle.stories.tsx +59 -0
  216. package/src/storybook/stories/atoms/Tooltip.stories.tsx +59 -0
  217. package/src/storybook/stories/atoms/VisualAssetCard.stories.tsx +57 -0
  218. package/src/storybook/stories/components/DocsSyncTheme.tsx +20 -0
  219. package/src/storybook/stories/components/VariableSpacingShowcase.tsx +46 -0
  220. package/src/storybook/stories/components/index.ts +5 -0
  221. package/src/storybook/stories/design-tokens/colors.stories.mdx +44 -0
  222. package/src/storybook/stories/design-tokens/icons.stories.mdx +19 -0
  223. package/src/storybook/stories/design-tokens/typeset.stories.mdx +17 -0
  224. package/src/storybook/stories/design-tokens/variable-spacing.stories.mdx +11 -0
  225. package/src/storybook/stories/molecules/Account.stories.tsx +71 -0
  226. package/src/storybook/stories/molecules/Address.stories.tsx +39 -0
  227. package/src/storybook/stories/molecules/Card.stories.tsx +112 -0
  228. package/src/storybook/stories/molecules/Chip.stories.tsx +127 -0
  229. package/src/storybook/stories/molecules/DisplayStats.stories.tsx +63 -0
  230. package/src/storybook/stories/molecules/Dropdown.stories.tsx +38 -0
  231. package/src/storybook/stories/molecules/Input.stories.tsx +239 -0
  232. package/src/storybook/stories/molecules/NavbarItem.stories.tsx +45 -0
  233. package/src/storybook/stories/molecules/Search.stories.tsx +101 -0
  234. package/src/storybook/stories/molecules/SegmentedButton.stories.tsx +108 -0
  235. package/src/storybook/stories/molecules/Select.stories.tsx +103 -0
  236. package/src/storybook/stories/molecules/TableCell.stories.tsx +46 -0
  237. package/src/storybook/stories/molecules/TableHeaderCell.stories.tsx +34 -0
  238. package/src/storybook/stories/molecules/TextArea.stories.tsx +80 -0
  239. package/src/storybook/stories/molecules/Title.stories.tsx +76 -0
  240. package/src/storybook/stories/organisms/Accordion.stories.tsx +70 -0
  241. package/src/storybook/stories/organisms/Dialog.stories.tsx +129 -0
  242. package/src/storybook/stories/organisms/Navbar.stories.tsx +78 -0
  243. package/src/storybook/stories/organisms/Table.stories.tsx +154 -0
@@ -0,0 +1,270 @@
1
+ :root.names {
2
+ /* FONTS */
3
+ --font-family-heading: theme('fontFamily.roboto-flex');
4
+ --font-family-text: theme('fontFamily.inter');
5
+ --display-lg-font-weight: 700;
6
+ --display-lg-line-height: 100%;
7
+ --display-md-font-weight: 700;
8
+ --display-md-line-height: 100%;
9
+ --display-sm-font-weight: 700;
10
+ --display-sm-line-height: 100%;
11
+ --headline-lg-font-weight: 600;
12
+ --headline-md-font-weight: 600;
13
+ --headline-sm-font-weight: 600;
14
+
15
+ /* COLORS */
16
+ --warning-surface: theme('colors.names-warning.20');
17
+ --on-warning: theme('colors.names-warning.90');
18
+ --error-surface: theme('colors.names-error.20');
19
+ --on-error: theme('colors.names-error.90');
20
+ --success-surface: theme('colors.names-tertiary.20');
21
+ --on-success: theme('colors.names-tertiary.90');
22
+ --default-surface: theme('colors.names-primary.20');
23
+ --on-default: theme('colors.names-neutral.90');
24
+
25
+ /* STATE LAYER */
26
+ --state-layer-bg-color: theme('colors.names-primary.60');
27
+ --state-layer-secondary-bg-color: theme('colors.shader-primary-dark.100');
28
+ --state-layer-inverted-bg-color: theme('colors.names-primary.80');
29
+
30
+ /* ---------------- ATOMS ---------------- */
31
+
32
+ /* BADGE */
33
+ --badge-bg-color-neutral: theme('colors.names-neutral.12');
34
+ --badge-text-color-neutral: theme('colors.names-neutral.92');
35
+ --badge-border-color-neutral: theme('colors.names-neutral.12');
36
+ --badge-bg-color-primary: theme('colors.names-primary.30');
37
+ --badge-border-color-primary: theme('colors.names-primary.30');
38
+ --badge-text-color-primary: theme('colors.names-neutral.100');
39
+ --badge-bg-color-primary-soft: theme('colors.names-primary.20');
40
+ --badge-text-color-primary-soft: theme('colors.names-primary.90');
41
+ --badge-border-color-soft: theme('colors.names-primary.20');
42
+
43
+ /* INFOBOX */
44
+ --infobox-text-title: theme('colors.names-neutral.92');
45
+ --infobox-supporting-text: theme('colors.names-neutral.92');
46
+
47
+ /* BUTTON */
48
+ --button-bg-color-primary: theme('colors.names-primary.30');
49
+ --button-bg-color-disabled-primary: theme('colors.names-neutral.30');
50
+ --button-bg-color-secondary: theme('colors.names-neutral.20');
51
+ --button-bg-color-error: theme('colors.names-error.20');
52
+ --button-border-color-outline: theme('colors.names-neutral.60');
53
+ --button-text-color-primary: theme('colors.names-primary.100');
54
+ --button-text-color-neutral: theme('colors.names-neutral.92');
55
+ --button-text-color-error: theme('colors.names-error.90');
56
+
57
+ /* BUTTON PILL */
58
+ --button-pill-border-color: theme('colors.names-neutral.40');
59
+ --button-pill-text-color: theme('colors.names-neutral.60');
60
+
61
+ /* HEADER */
62
+ --header-bg-color: theme('colors.names-neutral.6');
63
+ --header-text-color: theme('colors.names-neutral.92');
64
+
65
+ /* LABEL */
66
+ --label-text-primary-neutral: theme('colors.names-neutral.92');
67
+ --label-text-secondary-neutral: theme('colors.names-neutral.50');
68
+
69
+ /* KEY VALUE */
70
+ --key-supporting-text-color: theme('colors.names-neutral.50');
71
+ --key-value-hover-text-color: theme('colors.iota-neutral.92');
72
+ --key-value-key-text-color: theme('colors.names-neutral.70');
73
+
74
+ /* CHECKBOX */
75
+ --checkbox-border-color-default: theme('colors.names-neutral.20');
76
+ --checkbox-border-color-checked: theme('colors.names-primary.30');
77
+ --checkbox-border-color-disabled: theme('colors.names-neutral.30');
78
+ --checkbox-border-color-disabled-checked: theme('colors.names-neutral.50');
79
+ --checkbox-bg-color-checked: theme('colors.names-primary.30');
80
+ --checkbox-bg-color-disabled-checked: theme('colors.names-neutral.50');
81
+ --checkbox-text-color: theme('colors.names-neutral.70');
82
+ --checkbox-text-color-checked: theme('colors.names-neutral.100');
83
+ --checkbox-label-text-color: theme('colors.names-neutral.70');
84
+
85
+ /* DIVIDER */
86
+ --divider-bg-color: theme('colors.shader-neutral-dark.8');
87
+
88
+ /* BUTTON SEGMENT */
89
+ --button-segment-text-color-default: theme('colors.names-neutral.50');
90
+ --button-segment-text-color-hover: theme('colors.names-neutral.70');
91
+ --button-segment-text-color-focused: theme('colors.names-neutral.70');
92
+ --button-segment-text-color-selected: theme('colors.names-neutral.92');
93
+ --button-segment-underline-default-color: theme('colors.shader-neutral-dark.8');
94
+ --button-segment-underline-hover-color: theme('colors.names-neutral.40');
95
+ --button-segment-underline-selected-color: theme('colors.names-primary.80');
96
+ --button-segment-bg-color-selected: theme('colors.names-neutral.6');
97
+
98
+ /* LOADING INDICATOR */
99
+ --loading-indicator-color: theme('colors.names-primary.80');
100
+
101
+ /* LIST ITEM */
102
+ --list-item-color: theme('colors.names-neutral.92');
103
+ --list-item-border-color: theme('colors.shader-neutral-dark.8');
104
+ --list-item-highlight-bg: theme('colors.shader-primary-dark.12');
105
+
106
+ /* PANEL */
107
+ --panel-bg: theme('colors.names-neutral.6');
108
+ --panel-border-color: theme('colors.shader-neutral-dark.8');
109
+
110
+ /* RADIO BUTTON */
111
+ --radio-icon-color: theme('colors.names-neutral.70');
112
+ --radio-icon-checked-color: theme('colors.names-primary.30');
113
+ --radio-icon-checked-disabled-color: theme('colors.names-neutral.70');
114
+ --radio-label-color: theme('colors.names-neutral.70');
115
+
116
+ /* SECONDARY TEXT */
117
+ --secondary-text-color: theme('colors.names-neutral.70');
118
+ --secondary-text-error-color: theme('colors.names-error.80');
119
+
120
+ /* SKELETON */
121
+ --skeleton-bg: theme('colors.names-neutral.12');
122
+ --skeleton-secondary-bg: theme('colors.names-neutral.10');
123
+
124
+ /* TOGGLE */
125
+ --toggle-bg-active: theme('colors.names-primary.30');
126
+ --toggle-border-active: theme('colors.names-primary.30');
127
+ --toggle-bg-inactive: theme('colors.names-neutral.6');
128
+ --toggle-border-inactive: theme('colors.names-neutral.50');
129
+ --toggle-bg-disabled-active: theme('colors.names-neutral.50');
130
+ --toggle-border-disabled-active: theme('colors.names-neutral.50');
131
+ --toggle-thumb-color: theme('colors.names-neutral.50');
132
+ --toggle-thumb-color-checked: theme('colors.names-neutral.6');
133
+ --toggle-label-color: theme('colors.names-neutral.70');
134
+
135
+ /* TOOLTIP */
136
+ --tooltip-bg: theme('colors.names-neutral.0');
137
+ --tooltip-text-color: theme('colors.names-neutral.100');
138
+
139
+ /* VISUAL ASSET CARD */
140
+ --visual-asset-placeholder-bg: theme('colors.names-neutral.10');
141
+ --visual-asset-placeholder-icon: theme('colors.names-neutral.60');
142
+ --visual-asset-title-color: theme('colors.names-neutral.100');
143
+ --visual-asset-icon-color: theme('colors.names-neutral.100');
144
+
145
+ /* ACCOUNT */
146
+ --account-title-color: theme('colors.names-neutral.92');
147
+ --account-icon-color: theme('colors.names-neutral.70');
148
+ --account-check-active-color: theme('colors.names-primary.80');
149
+ --account-check-inactive-color: theme('colors.names-neutral.60');
150
+
151
+ /* ADDRESS */
152
+ --address-text-color: theme('colors.names-neutral.70');
153
+
154
+ /* CARD */
155
+ --card-filled-bg: theme('colors.names-neutral.10');
156
+ --card-image-bg-solid: theme('colors.names-neutral.10');
157
+ --card-image-bg-white: theme('colors.names-neutral.6');
158
+ --card-action-link-color: theme('colors.names-neutral.92');
159
+ --card-action-title-color: theme('colors.names-neutral.92');
160
+ --card-action-subtitle-color: theme('colors.names-neutral.40');
161
+ --card-body-title-color: theme('colors.names-neutral.92');
162
+ --card-body-subtitle-color: theme('colors.names-neutral.70');
163
+
164
+ /* CHIP */
165
+ --chip-bg-selected-outline: theme('colors.shader-primary-dark.16');
166
+ --chip-bg-elevated: theme('colors.names-neutral.12');
167
+ --chip-bg-brand: theme('colors.names-primary.30');
168
+ --chip-border-default: theme('colors.names-neutral.20');
169
+ --chip-text-default: theme('colors.names-neutral.92');
170
+ --chip-text-secondary: theme('colors.names-neutral.92');
171
+ --chip-focus-ring: theme('colors.names-primary.80');
172
+ --chip-border-color-brand: theme('colors.names-primary.30');
173
+ --chip-text-brand: theme('colors.names-primary.100');
174
+ --chip-bg-selected-overlay: theme('colors.shader-primary-dark.16');
175
+ --chip-close-icon-opacity: 0.4;
176
+
177
+ --chip-outline-color: theme('colors.shader-primary-dark.16');
178
+ --chip-outline-color-hover: theme('colors.shader-primary-dark.8');
179
+ --chip-outline-color-active: theme('colors.shader-primary-dark.12');
180
+
181
+ --chip-bg-color-hover: theme('colors.shader-primary-dark.8');
182
+ --chip-bg-color-active: theme('colors.shader-primary-dark.12');
183
+ --chip-bg-color-focus: theme('colors.shader-primary-dark.12');
184
+
185
+ /* DISPLAY STATS */
186
+ --display-stats-bg-default: theme('colors.names-neutral.10');
187
+ --display-stats-bg-highlight: theme('colors.names-primary.80');
188
+ --display-stats-bg-secondary: theme('colors.names-secondary.10');
189
+ --display-stats-text-default: theme('colors.names-neutral.92');
190
+ --display-stats-text-highlight: theme('colors.names-primary.10');
191
+ --display-stats-text-secondary: theme('colors.names-neutral.92');
192
+ --display-stats-icon-color: theme('colors.names-neutral.92');
193
+ --display-stats-copy-icon-color: theme('colors.names-neutral.40');
194
+
195
+ /* DROPDOWN */
196
+ --dropdown-bg: theme('colors.names-neutral.6');
197
+ --dropdown-border-color: theme('colors.names-neutral.20');
198
+
199
+ /* INPUT */
200
+ --input-text-color: theme('colors.names-neutral.92');
201
+ --input-placeholder-color: rgba(136, 146, 161, 0.4); /* neutral.60 with 40% opacity */
202
+ --input-label-color: theme('colors.names-neutral.60');
203
+ --input-border-color: theme('colors.names-neutral.20');
204
+ --input-border-hover-color: theme('colors.names-neutral.60');
205
+ --input-border-error-color: theme('colors.names-error.80');
206
+ --input-border-focus-color: theme('colors.names-primary.80');
207
+ --input-caret-color: theme('colors.names-primary.80');
208
+ --input-icon-color: theme('colors.names-neutral.92');
209
+ --input-copy-icon-color: theme('colors.names-neutral.40');
210
+ --input-visibility-bar-color: rgba(24, 27, 49, 0.6); /* neutral.10 with 60% opacity */
211
+
212
+ /* NAVBAR ITEM */
213
+ --navbar-item-icon-color: theme('colors.names-neutral.70');
214
+ --navbar-item-icon-selected-color: theme('colors.names-neutral.92');
215
+ --navbar-item-label-color: theme('colors.names-neutral.50');
216
+ --navbar-item-label-selected-color: theme('colors.names-neutral.92');
217
+
218
+ /* SEARCH */
219
+ --search-text-color: theme('colors.names-neutral.92');
220
+ --search-placeholder-color: theme('colors.names-neutral.70');
221
+ --search-border-color: theme('colors.names-neutral.40');
222
+ --search-bg-color-filled: theme('colors.names-neutral.12');
223
+ --search-suggestion-bg-color: theme('colors.names-neutral.12');
224
+ --search-selected-index-bg-color: theme('colors.shader-inverted-dark.16');
225
+
226
+ /* SEGMENTED BUTTON */
227
+ --segmented-filled-bg-color: theme('colors.names-neutral.10');
228
+ --segmented-outlined-border-color: theme('colors.names-neutral.40');
229
+
230
+ /* SELECT */
231
+ --select-border-color: theme('colors.names-neutral.20');
232
+ --select-border-hover-color: theme('colors.names-neutral.60');
233
+ --select-border-focus-color: theme('colors.names-primary.80');
234
+ --select-border-error-color: theme('colors.names-error.80');
235
+ --select-icon-color: theme('colors.names-neutral.92');
236
+ --select-label-color: theme('colors.names-neutral.92');
237
+
238
+ /* TABLE CELL */
239
+ --table-cell-supporting-label-color: theme('colors.names-neutral.40');
240
+ --table-cell-border-color: theme('colors.shader-neutral-dark.8');
241
+
242
+ /* TABLE HEADER CELL */
243
+ --table-header-text-color: theme('colors.names-neutral.92');
244
+
245
+ /* TITLE */
246
+ --title-main-color: theme('colors.names-neutral.92');
247
+ --title-subtitle-color: theme('colors.names-neutral.50');
248
+ --title-icon-color: theme('colors.names-neutral.50');
249
+
250
+ /* ---------------- ORGANISMS ---------------- */
251
+
252
+ /* ACCORDION */
253
+ --accordion-bg: theme('colors.names-neutral.6');
254
+ --accordion-icon-color: theme('colors.names-neutral.92');
255
+ --accordion-border-color: theme('colors.shader-neutral-dark.8');
256
+
257
+ /* DIALOG */
258
+ --dialog-content-bg: theme('colors.names-neutral.6');
259
+ --dialog-title-color: theme('colors.names-neutral.92');
260
+ --dialog-body-color: theme('colors.names-neutral.70');
261
+ --dialog-outline: 1px solid theme('colors.names-neutral.20');
262
+ --dialog-overlay-bg: theme('colors.names-neutral.0/0.12');
263
+
264
+ /* NAVBAR */
265
+ --navbar-icon-color: theme('colors.names-neutral.92');
266
+ --navbar-slideout-bg: theme('colors.names-neutral.6');
267
+
268
+ /* TABLE */
269
+ --table-text-color: theme('colors.names-neutral.70');
270
+ }
@@ -0,0 +1,58 @@
1
+ // Copyright (c) 2024 IOTA Stiftung
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ import type { Config } from 'tailwindcss';
5
+ import {
6
+ IOTA_PRIMITIVES_COLOR_PALETTE,
7
+ IOTA_NAMES_COLOR_PALETTE,
8
+ SHADER_COLOR_PALETTE,
9
+ } from '../constants/colors.constants';
10
+ import {
11
+ BORDER_RADIUS,
12
+ CUSTOM_FONT_SIZES,
13
+ CUSTOM_SPACING,
14
+ FONT_FAMILIES,
15
+ OPACITY,
16
+ generateVariableSpacing,
17
+ } from './constants';
18
+ import { THEMED_CUSTOM_COLORS } from './constants/customColors.constants';
19
+ import { firefoxPlugin, namesVariant } from './plugins';
20
+ import { NAMES_GRADIENTS } from './constants/gradients.constants';
21
+
22
+ export const BASE_CONFIG: Config = {
23
+ content: ['./src/**/*.{html,js,jsx,ts,tsx}'],
24
+ darkMode: 'selector',
25
+ plugins: [firefoxPlugin, namesVariant],
26
+ theme: {
27
+ extend: {
28
+ fontSize: {
29
+ ...CUSTOM_FONT_SIZES,
30
+ },
31
+ borderRadius: {
32
+ ...BORDER_RADIUS,
33
+ },
34
+ spacing: (utils) => {
35
+ const screens = utils.theme('screens');
36
+ const variableSpacing = generateVariableSpacing(screens);
37
+ return {
38
+ ...CUSTOM_SPACING,
39
+ ...variableSpacing,
40
+ };
41
+ },
42
+ opacity: {
43
+ ...OPACITY,
44
+ 30: '0.3',
45
+ },
46
+ colors: {
47
+ ...IOTA_PRIMITIVES_COLOR_PALETTE,
48
+ ...IOTA_NAMES_COLOR_PALETTE,
49
+ ...SHADER_COLOR_PALETTE,
50
+ ...THEMED_CUSTOM_COLORS,
51
+ },
52
+ fontFamily: FONT_FAMILIES,
53
+ backgroundImage: {
54
+ ...NAMES_GRADIENTS,
55
+ },
56
+ },
57
+ },
58
+ };
@@ -0,0 +1,13 @@
1
+ // Copyright (c) 2025 IOTA Stiftung
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ export const THEMED_CUSTOM_COLORS = {
5
+ 'default-surface': 'var(--default-surface)',
6
+ 'on-default': 'var(--on-default)',
7
+ 'warning-surface': 'var(--warning-surface)',
8
+ 'on-warning': 'var(--on-warning)',
9
+ 'error-surface': 'var(--error-surface)',
10
+ 'on-error': 'var(--on-error)',
11
+ 'success-surface': 'var(--success-surface)',
12
+ 'on-success': 'var(--on-success)',
13
+ } as const;
@@ -0,0 +1,8 @@
1
+ // Copyright (c) 2025 IOTA Stiftung
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ export const FONT_FAMILIES: Record<string, string[]> = {
5
+ inter: ['Inter', 'sans-serif'],
6
+ 'alliance-no2': ['AllianceNo2', 'sans-serif'],
7
+ 'roboto-flex': ['Roboto Flex Variable', 'sans-serif'],
8
+ } as const;
@@ -0,0 +1,201 @@
1
+ // Copyright (c) 2024 IOTA Stiftung
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ import type { ThemeConfig } from 'tailwindcss/types/config';
5
+
6
+ type TailwindFontSize = ThemeConfig['fontSize'];
7
+
8
+ export type TailwindFontSizeConfig = Partial<{
9
+ lineHeight: string;
10
+ letterSpacing: string;
11
+ fontWeight: string | number;
12
+ }>;
13
+
14
+ export type TailwindCustomFonts = Record<
15
+ string,
16
+ [
17
+ string,
18
+ Partial<{
19
+ lineHeight: string;
20
+ letterSpacing: string;
21
+ fontWeight: string | number;
22
+ }>,
23
+ ]
24
+ >;
25
+
26
+ export const TEXT_LABEL_CLASSES: TailwindCustomFonts = {
27
+ 'text-label-sm': [
28
+ '11px',
29
+ {
30
+ lineHeight: '16px',
31
+ letterSpacing: '0.2px',
32
+ fontWeight: 500,
33
+ },
34
+ ],
35
+ 'text-label-md': [
36
+ '12px',
37
+ {
38
+ lineHeight: '16px',
39
+ letterSpacing: '-0.1px',
40
+ fontWeight: 500,
41
+ },
42
+ ],
43
+ 'text-label-lg': [
44
+ '14px',
45
+ {
46
+ lineHeight: '20px',
47
+ letterSpacing: '-0.1px',
48
+ fontWeight: 500,
49
+ },
50
+ ],
51
+ } satisfies TailwindFontSize;
52
+
53
+ export const TEXT_BODY_CLASSES: TailwindCustomFonts = {
54
+ 'text-body-sm': [
55
+ '12px',
56
+ {
57
+ lineHeight: '16px',
58
+ letterSpacing: '0.1px',
59
+ fontWeight: 400,
60
+ },
61
+ ],
62
+ 'text-body-md': [
63
+ '14px',
64
+ {
65
+ lineHeight: '20px',
66
+ letterSpacing: '-0.1px',
67
+ fontWeight: 400,
68
+ },
69
+ ],
70
+ 'text-body-lg': [
71
+ '16px',
72
+ {
73
+ lineHeight: '24px',
74
+ letterSpacing: '0.1px',
75
+ fontWeight: 400,
76
+ },
77
+ ],
78
+ };
79
+
80
+ export const TEXT_BODY_DISAMBIGUOUS_CLASSES: TailwindCustomFonts = {
81
+ 'text-body-ds-sm': [
82
+ '12px',
83
+ {
84
+ lineHeight: '16px',
85
+ letterSpacing: '0.1px',
86
+ fontWeight: 400,
87
+ },
88
+ ],
89
+ 'text-body-ds-md': [
90
+ '14px',
91
+ {
92
+ lineHeight: '20px',
93
+ letterSpacing: '-0.1px',
94
+ fontWeight: 400,
95
+ },
96
+ ],
97
+ 'text-body-ds-lg': [
98
+ '16px',
99
+ {
100
+ lineHeight: '24px',
101
+ letterSpacing: '0.2px',
102
+ fontWeight: 400,
103
+ },
104
+ ],
105
+ };
106
+
107
+ export const TEXT_TITLE_CLASSES: TailwindCustomFonts = {
108
+ 'text-title-sm': [
109
+ '14px',
110
+ {
111
+ lineHeight: '120%',
112
+ letterSpacing: '-0.1px',
113
+ fontWeight: 500,
114
+ },
115
+ ],
116
+ 'text-title-md': [
117
+ '16px',
118
+ {
119
+ lineHeight: '120%',
120
+ letterSpacing: '-0.15px',
121
+ fontWeight: 500,
122
+ },
123
+ ],
124
+ 'text-title-lg': [
125
+ '20px',
126
+ {
127
+ lineHeight: '120%',
128
+ letterSpacing: '-0.4px',
129
+ fontWeight: 500,
130
+ },
131
+ ],
132
+ };
133
+
134
+ export const TEXT_HEADLINE_CLASSES: TailwindCustomFonts = {
135
+ 'text-headline-sm': [
136
+ '24px',
137
+ {
138
+ lineHeight: '120%',
139
+ fontWeight: 'var(--headline-sm-font-weight)',
140
+ letterSpacing: '-0.2px',
141
+ },
142
+ ],
143
+ 'text-headline-md': [
144
+ '28px',
145
+ {
146
+ lineHeight: '120%',
147
+ fontWeight: 'var(--headline-md-font-weight)',
148
+ letterSpacing: '-0.4px',
149
+ },
150
+ ],
151
+ 'text-headline-lg': [
152
+ '32px',
153
+ {
154
+ lineHeight: '120%',
155
+ fontWeight: 'var(--headline-lg-font-weight)',
156
+ letterSpacing: '-0.4px',
157
+ },
158
+ ],
159
+ };
160
+
161
+ export const TEXT_DISPLAY_CLASSES: TailwindCustomFonts = {
162
+ 'text-display-sm': [
163
+ '36px',
164
+ {
165
+ lineHeight: 'var(--display-sm-line-height)',
166
+ fontWeight: 'var(--display-sm-font-weight)',
167
+ },
168
+ ],
169
+ 'text-display-md': [
170
+ '48px',
171
+ {
172
+ lineHeight: 'var(--display-md-line-height)',
173
+ fontWeight: 'var(--display-md-font-weight)',
174
+ },
175
+ ],
176
+ 'text-display-lg': [
177
+ '60px',
178
+ {
179
+ lineHeight: 'var(--display-lg-line-height)',
180
+ fontWeight: 'var(--display-lg-font-weight)',
181
+ },
182
+ ],
183
+ };
184
+
185
+ const CUSTOM_TEXT_CLASSES: TailwindCustomFonts = {
186
+ ...TEXT_LABEL_CLASSES,
187
+ ...TEXT_BODY_CLASSES,
188
+ ...TEXT_BODY_DISAMBIGUOUS_CLASSES,
189
+ ...TEXT_TITLE_CLASSES,
190
+ ...TEXT_HEADLINE_CLASSES,
191
+ ...TEXT_DISPLAY_CLASSES,
192
+ };
193
+
194
+ // Remove the 'text-' prefix from the keys to match the TailwindCSS font size keys
195
+ export const CUSTOM_FONT_SIZES: TailwindCustomFonts = Object.entries(CUSTOM_TEXT_CLASSES).reduce(
196
+ (acc, [className, properties]) => {
197
+ const key = className.startsWith('text-') ? className.replace('text-', '') : className;
198
+ return { ...acc, [key]: properties };
199
+ },
200
+ {},
201
+ );
@@ -0,0 +1,6 @@
1
+ // Copyright (c) 2025 IOTA Stiftung
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ export const NAMES_GRADIENTS = {
5
+ 'names-gradient-primary': `var(--names-gradient-primary)`,
6
+ };
@@ -0,0 +1,7 @@
1
+ // Copyright (c) 2024 IOTA Stiftung
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ export * from './scaling.constants';
5
+ export * from './fontSizes.constants';
6
+ export * from './variableSpacing.constants';
7
+ export * from './fontFamily.constants';
@@ -0,0 +1,41 @@
1
+ // Copyright (c) 2024 IOTA Stiftung
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ import { pxToRem } from '../helpers';
5
+
6
+ type TailwindScale = Record<string, string> & { DEFAULT?: string };
7
+
8
+ export const BORDER_RADIUS: TailwindScale = {
9
+ none: pxToRem(0),
10
+ sm: pxToRem(2),
11
+ DEFAULT: pxToRem(4),
12
+ md: pxToRem(6),
13
+ lg: pxToRem(8),
14
+ xl: pxToRem(12),
15
+ '2xl': pxToRem(16),
16
+ '3xl': pxToRem(24),
17
+ full: pxToRem(120),
18
+ };
19
+
20
+ export const CUSTOM_SPACING: TailwindScale = {
21
+ none: pxToRem(0),
22
+ xxxs: pxToRem(2),
23
+ xxs: pxToRem(4),
24
+ xs: pxToRem(8),
25
+ sm: pxToRem(12),
26
+ md: pxToRem(16),
27
+ lg: pxToRem(24),
28
+ xl: pxToRem(32),
29
+ '2xl': pxToRem(48),
30
+ };
31
+
32
+ export const OPACITY: TailwindScale = {
33
+ 0: '0',
34
+ 8: '0.08',
35
+ 12: '0.12',
36
+ 16: '0.16',
37
+ 40: '0.4',
38
+ 60: '0.6',
39
+ 80: '0.8',
40
+ 100: '1',
41
+ };
@@ -0,0 +1,66 @@
1
+ // Copyright (c) 2024 IOTA Stiftung
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ import { ScreenSize } from '../../enums/screenSize.enums';
5
+
6
+ enum VariableSpacingClassPrefix {
7
+ Xs = 'xs--rs',
8
+ Sm = 'sm--rs',
9
+ Md = 'md--rs',
10
+ }
11
+
12
+ type DefaultValue = string;
13
+ type ScreenMdValue = string;
14
+ type ScreenLgValue = string;
15
+ type ScreenXlValue = string;
16
+
17
+ const VARIABLE_SPACING: Record<
18
+ VariableSpacingClassPrefix,
19
+ [DefaultValue, ScreenMdValue, ScreenLgValue?, ScreenXlValue?]
20
+ > = {
21
+ [VariableSpacingClassPrefix.Xs]: ['4px', '8px'],
22
+ [VariableSpacingClassPrefix.Sm]: ['8px', '12px'],
23
+ [VariableSpacingClassPrefix.Md]: ['16px', '24px'],
24
+ };
25
+
26
+ function getClampedSpacingValues(
27
+ key: VariableSpacingClassPrefix,
28
+ screens: Record<string, string>,
29
+ ): string {
30
+ const CUSTOM_SCREEN_SIZES: ScreenSize[] = [
31
+ ScreenSize.Sm,
32
+ ScreenSize.Md,
33
+ ScreenSize.Lg,
34
+ ScreenSize.Xl,
35
+ ];
36
+
37
+ const values = VARIABLE_SPACING[key];
38
+ // Use the first value as the default value, since it doesn't need to be clamped.
39
+ let clampValue = `${values[0]}`;
40
+ for (let i = 1; i < values.length; i++) {
41
+ if (values[i]) {
42
+ // Iterate the tailwind screens and check if desired the breakpoint exists.
43
+ const breakpoint = screens[CUSTOM_SCREEN_SIZES[i]];
44
+ if (breakpoint) {
45
+ // Clamp the spacing value using the screen breakpoint as reference.
46
+ clampValue = `clamp(${clampValue}, (100vw - ${breakpoint}) * 99, ${values[i]})`;
47
+ }
48
+ }
49
+ }
50
+
51
+ return clampValue;
52
+ }
53
+
54
+ export function generateVariableSpacing(tailwindScreens: Record<string, string>) {
55
+ const variableSpacing = Object.keys(VARIABLE_SPACING).reduce((acc, variableSpacingPrefix) => {
56
+ const clampedSpacing = getClampedSpacingValues(
57
+ variableSpacingPrefix as VariableSpacingClassPrefix,
58
+ tailwindScreens,
59
+ );
60
+ return {
61
+ ...acc,
62
+ [variableSpacingPrefix]: clampedSpacing,
63
+ };
64
+ }, {});
65
+ return variableSpacing;
66
+ }