@iota/apps-ui-kit 0.6.0 → 0.7.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 (96) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/index.d.ts +177 -18
  3. package/dist/index.es.js +3319 -6032
  4. package/dist/index.es.js.map +1 -1
  5. package/dist/index.umd.js +28 -160
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/style.css +1 -1
  8. package/package.json +10 -4
  9. package/src/lib/components/atoms/badge/badge.classes.ts +18 -18
  10. package/src/lib/components/atoms/badge/badge.enums.ts +1 -1
  11. package/src/lib/components/atoms/button/button-variants/ButtonPill.tsx +1 -1
  12. package/src/lib/components/atoms/button/button.classes.ts +12 -12
  13. package/src/lib/components/atoms/button-segment/buttonSegment.classes.ts +15 -36
  14. package/src/lib/components/atoms/checkbox/Checkbox.tsx +20 -9
  15. package/src/lib/components/atoms/divider/divider.classes.ts +1 -1
  16. package/src/lib/components/atoms/header/Header.tsx +1 -1
  17. package/src/lib/components/atoms/image/Image.tsx +32 -0
  18. package/src/lib/components/atoms/image/index.ts +4 -0
  19. package/src/lib/components/atoms/index.ts +3 -1
  20. package/src/lib/components/atoms/info-box/InfoBox.tsx +2 -8
  21. package/src/lib/components/atoms/info-box/infoBox.classes.ts +8 -9
  22. package/src/lib/components/atoms/key-value-info/KeyValueInfo.tsx +5 -5
  23. package/src/lib/components/atoms/label-text/LabelText.tsx +4 -6
  24. package/src/lib/components/atoms/list-item/ListItem.tsx +3 -4
  25. package/src/lib/components/atoms/loading-indicator/LoadingIndicator.tsx +1 -1
  26. package/src/lib/components/atoms/media-fallback/MediaFallback.tsx +12 -0
  27. package/src/lib/components/atoms/media-fallback/index.ts +4 -0
  28. package/src/lib/components/atoms/panel/Panel.tsx +2 -4
  29. package/src/lib/components/atoms/radio-button/RadioButton.tsx +4 -8
  30. package/src/lib/components/atoms/secondary-text/SecondaryText.tsx +3 -2
  31. package/src/lib/components/atoms/skeleton/Skeleton.tsx +1 -3
  32. package/src/lib/components/atoms/snackbar/snackbar.classes.ts +8 -8
  33. package/src/lib/components/atoms/toggle/toggle.classes.ts +6 -6
  34. package/src/lib/components/atoms/tooltip/Tooltip.tsx +3 -2
  35. package/src/lib/components/atoms/video/Video.tsx +33 -0
  36. package/src/lib/components/atoms/video/index.ts +4 -0
  37. package/src/lib/components/atoms/video/video.constants.ts +31 -0
  38. package/src/lib/components/molecules/account/Account.tsx +4 -4
  39. package/src/lib/components/molecules/address/Address.tsx +1 -1
  40. package/src/lib/components/molecules/asset-media-renderer/AssetMediaRenderer.tsx +50 -0
  41. package/src/lib/components/molecules/asset-media-renderer/index.ts +4 -0
  42. package/src/lib/components/molecules/card/CardAction.tsx +3 -5
  43. package/src/lib/components/molecules/card/CardBody.tsx +3 -2
  44. package/src/lib/components/molecules/card/card.classes.ts +3 -3
  45. package/src/lib/components/molecules/chip/Chip.tsx +9 -2
  46. package/src/lib/components/molecules/chip/chip.classes.ts +5 -5
  47. package/src/lib/components/molecules/chip/chip.enums.ts +5 -0
  48. package/src/lib/components/molecules/chip/index.ts +1 -0
  49. package/src/lib/components/molecules/display-stats/DisplayStats.tsx +2 -2
  50. package/src/lib/components/molecules/display-stats/displayStats.classes.ts +6 -6
  51. package/src/lib/components/molecules/dropdown/Dropdown.tsx +1 -1
  52. package/src/lib/components/molecules/index.ts +2 -0
  53. package/src/lib/components/molecules/input/Input.tsx +3 -5
  54. package/src/lib/components/molecules/input/InputWrapper.tsx +1 -1
  55. package/src/lib/components/molecules/input/TextArea.tsx +2 -5
  56. package/src/lib/components/molecules/input/input.classes.ts +7 -8
  57. package/src/lib/components/molecules/navbar-item/navbarItem.classes.ts +4 -4
  58. package/src/lib/components/molecules/search/Search.tsx +10 -7
  59. package/src/lib/components/molecules/search/search.classes.ts +5 -5
  60. package/src/lib/components/molecules/segmented-button/segmentedButton.classes.ts +2 -2
  61. package/src/lib/components/molecules/select/Select.tsx +6 -13
  62. package/src/lib/components/molecules/table-cell/TableCell.tsx +2 -2
  63. package/src/lib/components/molecules/table-header-cell/TableHeaderCell.tsx +2 -2
  64. package/src/lib/components/molecules/title/Title.tsx +3 -3
  65. package/src/lib/components/{atoms → molecules}/visual-asset-card/VisualAssetCard.tsx +26 -40
  66. package/src/lib/components/organisms/accordion/Accordion.tsx +2 -3
  67. package/src/lib/components/organisms/accordion/accordion.classes.ts +1 -1
  68. package/src/lib/components/organisms/dialog/Dialog.tsx +4 -4
  69. package/src/lib/components/organisms/navbar/Navbar.tsx +2 -2
  70. package/src/lib/components/organisms/navbar/NavbarSlideout.tsx +1 -1
  71. package/src/lib/components/organisms/table/Table.tsx +2 -2
  72. package/src/lib/constants/colors.constants.ts +107 -8
  73. package/src/lib/styles/base.css +97 -0
  74. package/src/lib/styles/components.css +687 -0
  75. package/src/lib/styles/fonts.css +2 -0
  76. package/src/lib/styles/index.css +754 -136
  77. package/src/lib/styles/utilities.css +53 -0
  78. package/src/lib/tailwind/base.presets.ts +14 -9
  79. package/src/lib/tailwind/constants/customColors.constants.ts +13 -0
  80. package/src/lib/tailwind/constants/fontFamily.constants.ts +8 -0
  81. package/src/lib/tailwind/constants/fontSizes.constants.ts +9 -9
  82. package/src/lib/tailwind/constants/index.ts +1 -0
  83. package/src/lib/tailwind/plugins.ts +4 -0
  84. package/src/storybook/blocks/Showcase.tsx +2 -2
  85. package/src/storybook/blocks/TypeSetItem.tsx +3 -3
  86. package/src/storybook/stories/atoms/Skeleton.stories.tsx +1 -1
  87. package/src/storybook/stories/atoms/Tooltip.stories.tsx +4 -2
  88. package/src/storybook/stories/atoms/VisualAssetCard.stories.tsx +3 -2
  89. package/src/storybook/stories/components/VariableSpacingShowcase.tsx +2 -2
  90. package/src/storybook/stories/design-tokens/colors.stories.mdx +9 -0
  91. package/src/storybook/stories/molecules/Account.stories.tsx +3 -1
  92. package/src/storybook/stories/molecules/Search.stories.tsx +2 -2
  93. package/src/storybook/stories/molecules/TableCell.stories.tsx +1 -1
  94. package/src/storybook/stories/molecules/TextArea.stories.tsx +1 -1
  95. /package/src/lib/components/{atoms → molecules}/visual-asset-card/index.ts +0 -0
  96. /package/src/lib/components/{atoms → molecules}/visual-asset-card/visualAssetCard.enums.ts +0 -0
@@ -137,21 +137,17 @@ export const Select = forwardRef<HTMLButtonElement, SelectProps>(
137
137
  onClick={onSelectorClick}
138
138
  disabled={disabled}
139
139
  className={cx(
140
- 'flex flex-row items-center gap-x-3 rounded-lg border border-neutral-80 py-sm hover:enabled:border-neutral-50 focus-visible:enabled:border-primary-30 active:enabled:border-primary-30 disabled:cursor-not-allowed group-[.errored]:border-error-30 group-[.opened]:border-primary-30 dark:border-neutral-20 dark:hover:enabled:border-neutral-60 dark:group-[.errored]:border-error-80 dark:group-[.opened]:border-primary-80 [&:is(:focus,_:focus-visible,_:active)]:enabled:border-primary-30 dark:[&:is(:focus,_:focus-visible,_:active)]:enabled:border-primary-80 [&_svg]:h-5 [&_svg]:w-5',
140
+ 'select-border-color focus-visible:enabled:select-border-focus-color active:enabled:select-border-focus-color group-[.errored]:select-border-error-color group-[.opened]:select-border-focus-color [&:is(:focus,_:focus-visible,_:active)]:enabled:select-border-focus-color hover:enabled:select-border-hover-color flex flex-row items-center gap-x-3 rounded-lg border py-sm disabled:cursor-not-allowed [&_svg]:h-5 [&_svg]:w-5',
141
141
  selectPadding,
142
142
  )}
143
143
  >
144
- {leadingIcon && (
145
- <span className="text-neutral-10 dark:text-neutral-92">
146
- {leadingIcon}
147
- </span>
148
- )}
144
+ {leadingIcon && <span className="select-icon-color">{leadingIcon}</span>}
149
145
 
150
146
  <div className="flex w-full flex-row items-baseline gap-x-3">
151
147
  {selectorText && (
152
148
  <div
153
149
  className={cx(
154
- 'block w-full text-start text-neutral-10 dark:text-neutral-92',
150
+ 'select-label-color block w-full text-start',
155
151
  textSize,
156
152
  )}
157
153
  >
@@ -167,12 +163,9 @@ export const Select = forwardRef<HTMLButtonElement, SelectProps>(
167
163
  </div>
168
164
 
169
165
  <TriangleDown
170
- className={cx(
171
- 'text-neutral-10 transition-transform dark:text-neutral-92',
172
- {
173
- ' rotate-180': isOpen,
174
- },
175
- )}
166
+ className={cx('select-icon-color transition-transform', {
167
+ ' rotate-180': isOpen,
168
+ })}
176
169
  />
177
170
  </ButtonUnstyled>
178
171
 
@@ -27,7 +27,7 @@ export function TableCellBase({
27
27
  return (
28
28
  <td
29
29
  className={cx(
30
- 'h-14 border-b border-shader-neutral-light-8 px-md dark:border-shader-neutral-dark-8',
30
+ 'table-cell-border-color h-14 border-b px-md',
31
31
  { 'last:border-none': hasLastBorderNoneClass },
32
32
  { 'flex items-center justify-center': isContentCentered },
33
33
  )}
@@ -49,7 +49,7 @@ export function TableCellText({
49
49
  <div className="flex flex-row items-baseline gap-1">
50
50
  <span>{children}</span>
51
51
  {supportingLabel && (
52
- <span className="text-body-sm text-neutral-60 dark:text-neutral-40">
52
+ <span className="table-cell-supporting-label-color text-body-sm">
53
53
  {supportingLabel}
54
54
  </span>
55
55
  )}
@@ -79,7 +79,7 @@ export function TableHeaderCell({
79
79
  }
80
80
  };
81
81
 
82
- const textColorClass = 'text-neutral-10 dark:text-neutral-92';
82
+ const textColorClass = 'table-header-text-color';
83
83
  const textSizeClass = 'text-label-lg';
84
84
 
85
85
  const sortElement = (() => {
@@ -102,7 +102,7 @@ export function TableHeaderCell({
102
102
  <th
103
103
  onClick={hasSort ? handleSort : undefined}
104
104
  className={cx(
105
- 'state-layer group relative h-14 border-b border-shader-neutral-light-8 px-md after:pointer-events-none dark:border-shader-neutral-dark-8',
105
+ 'state-layer table-cell-border-color group relative h-14 border-b px-md after:pointer-events-none',
106
106
  {
107
107
  'cursor-pointer': hasSort,
108
108
  },
@@ -60,15 +60,15 @@ export function Title({
60
60
  >
61
61
  <div className="flex flex-row items-center gap-x-xxxs">
62
62
  <div className="flex flex-col justify-start">
63
- <div className="flex flex-row items-center gap-x-0.5 text-neutral-10 dark:text-neutral-92">
63
+ <div className="title-main-color flex flex-row items-center gap-x-0.5">
64
64
  <h4 className={cx(TITLE_SIZE[size])}>{title}</h4>
65
65
  {tooltipText && (
66
66
  <Tooltip text={tooltipText} position={tooltipPosition}>
67
- <Info />
67
+ <Info className="title-icon-color" />
68
68
  </Tooltip>
69
69
  )}
70
70
  </div>
71
- <p className="text-label-md text-neutral-60 dark:text-neutral-40">{subtitle}</p>
71
+ <p className="title-subtitle-color text-label-md">{subtitle}</p>
72
72
  </div>
73
73
  {supportingElement}
74
74
  </div>
@@ -1,25 +1,13 @@
1
1
  // Copyright (c) 2024 IOTA Stiftung
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import { VisualAssetType } from './visualAssetCard.enums';
5
- import { ButtonUnstyled } from '../button';
6
- import { MoreHoriz, PlaceholderReplace } from '@iota/apps-ui-icons';
4
+ import { ButtonUnstyled } from '../../atoms/button';
5
+ import { MoreHoriz } from '@iota/apps-ui-icons';
7
6
  import cx from 'classnames';
8
- import { useState } from 'react';
7
+ import { AssetMediaRenderer } from '../../molecules/asset-media-renderer';
8
+ import type { AssetMediaRendererProps } from '../../molecules/asset-media-renderer';
9
9
 
10
- export interface VisualAssetCardProps {
11
- /**
12
- * The type of the asset to be displayed.
13
- */
14
- assetType?: VisualAssetType;
15
- /**
16
- * The source of the image to be displayed.
17
- */
18
- assetSrc: string;
19
- /**
20
- * Alt text for the image.
21
- */
22
- altText: string;
10
+ interface VisualAssetBaseProps {
23
11
  /**
24
12
  * The onClick event for the icon.
25
13
  */
@@ -42,23 +30,31 @@ export interface VisualAssetCardProps {
42
30
  isHoverable?: boolean;
43
31
  }
44
32
 
33
+ interface CustomAssetDisplayProps {
34
+ /**
35
+ * The media to be displayed inside the card.
36
+ */
37
+ renderAsset?: React.ReactNode;
38
+ }
39
+
40
+ export type VisualAssetCardProps = VisualAssetBaseProps &
41
+ (AssetMediaRendererProps | CustomAssetDisplayProps);
42
+
45
43
  export function VisualAssetCard({
46
- assetType = VisualAssetType.Image,
47
- assetSrc,
48
- altText,
49
44
  onIconClick,
50
45
  onClick,
51
46
  icon = <MoreHoriz />,
52
47
  assetTitle,
53
48
  isHoverable = true,
54
- }: VisualAssetCardProps): React.JSX.Element {
55
- const [imageError, setImageError] = useState(false);
56
-
49
+ ...assetProps
50
+ }: VisualAssetBaseProps & (AssetMediaRendererProps | CustomAssetDisplayProps)): React.JSX.Element {
57
51
  const handleIconClick = (event: React.MouseEvent<HTMLButtonElement>) => {
58
52
  onIconClick?.(event);
59
53
  event?.stopPropagation();
60
54
  };
61
55
 
56
+ const isCustomAsset = !('src' in assetProps);
57
+
62
58
  return (
63
59
  <div
64
60
  className={cx('relative aspect-square w-full overflow-hidden rounded-xl', {
@@ -66,26 +62,16 @@ export function VisualAssetCard({
66
62
  })}
67
63
  onClick={onClick}
68
64
  >
69
- {assetType === VisualAssetType.Video ? (
70
- <video src={assetSrc} className="h-full w-full object-cover" autoPlay loop muted />
71
- ) : imageError ? (
72
- <div className="flex h-full w-full items-center justify-center bg-neutral-96 dark:bg-neutral-10">
73
- <PlaceholderReplace className="h-4 w-4 text-neutral-40 dark:text-neutral-60" />
74
- </div>
75
- ) : (
76
- <img
77
- src={assetSrc}
78
- alt={altText}
79
- className="h-full w-full object-cover"
80
- onError={() => setImageError(true)}
81
- />
82
- )}
65
+ {!isCustomAsset && <AssetMediaRenderer {...assetProps} />}
66
+
67
+ {isCustomAsset && assetProps.renderAsset}
68
+
83
69
  {isHoverable && (
84
- <div className="absolute left-0 top-0 h-full w-full bg-cover bg-center bg-no-repeat group-hover:bg-shader-neutral-light-48 group-hover:transition group-hover:duration-300 group-hover:ease-in-out group-hover:dark:bg-shader-primary-dark-48" />
70
+ <div className="absolute left-0 top-0 h-full w-full bg-cover bg-center bg-no-repeat group-hover:bg-shader-neutral-light-48 group-hover:transition group-hover:duration-300 group-hover:ease-in-out group-hover:names:bg-shader-inverted-light-48 group-hover:dark:bg-shader-primary-dark-48" />
85
71
  )}
86
72
  {isHoverable && onIconClick && (
87
73
  <ButtonUnstyled
88
- className="absolute right-2 top-2 h-9 w-9 cursor-pointer rounded-full p-xs opacity-0 transition-opacity duration-300 group-hover:bg-shader-neutral-light-72 group-hover:opacity-100 [&_svg]:h-5 [&_svg]:w-5 [&_svg]:text-primary-100"
74
+ className="visual-asset-icon-color absolute right-2 top-2 h-9 w-9 cursor-pointer rounded-full p-xs opacity-0 transition-opacity duration-300 group-hover:bg-shader-neutral-light-72 group-hover:opacity-100 [&_svg]:h-5 [&_svg]:w-5"
89
75
  onClick={handleIconClick}
90
76
  >
91
77
  {icon}
@@ -93,7 +79,7 @@ export function VisualAssetCard({
93
79
  )}
94
80
  {isHoverable && assetTitle && (
95
81
  <div className="absolute bottom-0 flex items-center justify-center p-xs opacity-0 transition-opacity duration-300 group-hover:opacity-100">
96
- <span className="text-title-md text-neutral-100">{assetTitle}</span>
82
+ <span className="visual-asset-title-color text-title-md">{assetTitle}</span>
97
83
  </div>
98
84
  )}
99
85
  </div>
@@ -98,9 +98,8 @@ export function Accordion({
98
98
  }): React.JSX.Element {
99
99
  return (
100
100
  <div
101
- className={cx('rounded-xl bg-neutral-100 dark:bg-neutral-6', {
102
- 'border border-shader-neutral-light-8 dark:border-shader-neutral-dark-8':
103
- !hideBorder,
101
+ className={cx('accordion-bg rounded-xl', {
102
+ 'accordion-border-color border': !hideBorder,
104
103
  })}
105
104
  >
106
105
  {children}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) 2024 IOTA Stiftung
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- export const ICON_STYLE = 'text-neutral-10 dark:text-neutral-92 transition-transform ease-linear';
4
+ export const ICON_STYLE = 'accordion-icon-color transition-transform ease-linear';
@@ -41,7 +41,7 @@ const DialogOverlay = React.forwardRef<
41
41
  >(({ showCloseIcon, position, ...props }, ref) => (
42
42
  <RadixDialog.Overlay
43
43
  ref={ref}
44
- className={cx('inset-0 z-[99998] bg-shader-neutral-light-48 backdrop-blur-md', {
44
+ className={cx('dialog-overlay-bg inset-0 z-[99998] backdrop-blur-md', {
45
45
  fixed: position === DialogPosition.Right,
46
46
  absolute: position === DialogPosition.Center,
47
47
  })}
@@ -98,7 +98,7 @@ const DialogContent = React.forwardRef<
98
98
  <RadixDialog.Content
99
99
  ref={ref}
100
100
  className={cx(
101
- 'fixed z-[99999] flex flex-col justify-center bg-primary-100 dark:bg-neutral-6',
101
+ 'dialog-content-bg dialog-outline fixed z-[99999] flex flex-col justify-center',
102
102
  positionClass,
103
103
  widthClass,
104
104
  )}
@@ -122,7 +122,7 @@ const DialogTitle = React.forwardRef<
122
122
  >((props, ref) => (
123
123
  <RadixDialog.Title
124
124
  ref={ref}
125
- className="font-inter text-title-lg text-neutral-10 dark:text-neutral-92"
125
+ className="dialog-title-color font-inter text-title-lg"
126
126
  {...props}
127
127
  />
128
128
  ));
@@ -132,7 +132,7 @@ const DialogBody = React.forwardRef<React.ElementRef<'div'>, React.ComponentProp
132
132
  (props, ref) => (
133
133
  <div
134
134
  ref={ref}
135
- className="flex-1 overflow-y-auto p-md--rs text-body-sm text-neutral-40 dark:text-neutral-60"
135
+ className="dialog-body-color flex-1 overflow-y-auto p-md--rs text-body-sm"
136
136
  {...props}
137
137
  />
138
138
  ),
@@ -56,10 +56,10 @@ export function Navbar({
56
56
  {isCollapsible && (
57
57
  <div className="flex w-full items-center justify-between sm:mb-[48px] sm:flex-col">
58
58
  <div className="flex justify-center [&_svg]:h-[38px] [&_svg]:w-[38px]">
59
- <IotaLogoMark className="text-neutral-10 dark:text-neutral-92" />
59
+ <IotaLogoMark className="navbar-icon-color" />
60
60
  </div>
61
61
  <div
62
- className="state-layer relative rounded-full p-xs hover:cursor-pointer dark:text-neutral-92 sm:hidden [&_svg]:h-6 [&_svg]:w-6"
62
+ className="state-layer navbar-icon-color relative rounded-full p-xs hover:cursor-pointer sm:hidden [&_svg]:h-6 [&_svg]:w-6"
63
63
  onClick={onToggleNavbar}
64
64
  >
65
65
  <MenuIcon />
@@ -25,7 +25,7 @@ export function NavbarSlideout({
25
25
  />
26
26
  <div
27
27
  className={cx(
28
- 'z-999 rounded-tb-3xl fixed left-0 top-0 h-full w-11/12 rounded-tr-3xl bg-white px-lg py-lg transition-transform duration-300 ease-out dark:bg-neutral-6',
28
+ 'z-999 rounded-tb-3xl navbar-slideout-bg fixed left-0 top-0 h-full w-11/12 rounded-tr-3xl px-lg py-lg transition-transform duration-300 ease-out',
29
29
  {
30
30
  'translate-x-0': isOpen,
31
31
  '-translate-x-full': !isOpen,
@@ -149,7 +149,7 @@ export function Table({
149
149
  {supportingLabel || pageSizeSelector ? (
150
150
  <div className="flex flex-row items-center gap-x-sm">
151
151
  {supportingLabel && (
152
- <span className=" text-label-md text-neutral-40 dark:text-neutral-60">
152
+ <span className="table-text-color text-label-md">
153
153
  {supportingLabel}
154
154
  </span>
155
155
  )}
@@ -182,7 +182,7 @@ export function TableRow({
182
182
  );
183
183
  }
184
184
 
185
- const TEXT_COLOR_CLASS = 'text-neutral-40 dark:text-neutral-60';
185
+ const TEXT_COLOR_CLASS = 'table-text-color';
186
186
  const TEXT_SIZE_CLASS = 'text-body-md';
187
187
 
188
188
  export function TableBody({ children }: PropsWithChildren): JSX.Element {
@@ -2,7 +2,7 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  export const IOTA_PRIMITIVES_COLOR_PALETTE = {
5
- primary: {
5
+ 'iota-primary': {
6
6
  '0': '#000000',
7
7
  '10': '#061244',
8
8
  '20': '#182b8a',
@@ -15,7 +15,7 @@ export const IOTA_PRIMITIVES_COLOR_PALETTE = {
15
15
  '90': '#d5e8ff',
16
16
  '100': '#ffffff',
17
17
  },
18
- secondary: {
18
+ 'iota-secondary': {
19
19
  '0': '#000000',
20
20
  '10': '#051631',
21
21
  '20': '#17345f',
@@ -28,7 +28,7 @@ export const IOTA_PRIMITIVES_COLOR_PALETTE = {
28
28
  '90': '#dde9f7',
29
29
  '100': '#ffffff',
30
30
  },
31
- tertiary: {
31
+ 'iota-tertiary': {
32
32
  '0': '#000000',
33
33
  '10': '#071f22',
34
34
  '20': '#18393b',
@@ -41,7 +41,7 @@ export const IOTA_PRIMITIVES_COLOR_PALETTE = {
41
41
  '90': '#c2f1f4',
42
42
  '100': '#ffffff',
43
43
  },
44
- error: {
44
+ 'iota-error': {
45
45
  '0': '#000000',
46
46
  '10': '#330009',
47
47
  '20': '#610012',
@@ -54,7 +54,7 @@ export const IOTA_PRIMITIVES_COLOR_PALETTE = {
54
54
  '90': '#ffd9e0',
55
55
  '100': '#ffffff',
56
56
  },
57
- neutral: {
57
+ 'iota-neutral': {
58
58
  '0': '#000000',
59
59
  '4': '#0a0f17',
60
60
  '6': '#0f141c',
@@ -73,11 +73,110 @@ export const IOTA_PRIMITIVES_COLOR_PALETTE = {
73
73
  '98': '#f8fafc',
74
74
  '100': '#ffffff',
75
75
  },
76
- warning: {
77
- '10': '#422C00',
78
- '20': '#2D1E00',
76
+ 'iota-warning': {
77
+ '0': '#000000',
78
+ '10': '#2D1E00',
79
+ '20': '#422C00',
80
+ '30': '#674500',
81
+ '40': '#8C5D00',
82
+ '50': '#A47518',
83
+ '60': '#BE8F32',
84
+ '70': '#D9AA4D',
85
+ '80': '#F4C568',
86
+ '90': '#FFE3AB',
87
+ '100': '#FFFFFF',
88
+ },
89
+ };
90
+ export const IOTA_NAMES_COLOR_PALETTE = {
91
+ 'names-primary': {
92
+ '0': '#000000',
93
+ '10': '#061244',
94
+ '20': '#182b8a',
95
+ '30': '#3131ff',
96
+ '40': '#2563f5',
97
+ '50': '#3f80f0',
98
+ '60': '#5b9cfe',
99
+ '70': '#85b5fb',
100
+ '80': '#adceff',
101
+ '90': '#d5e8ff',
102
+ '100': '#ffffff',
103
+ },
104
+ 'names-secondary': {
105
+ '0': '#000000',
106
+ '10': '#051631',
107
+ '20': '#17345f',
108
+ '30': '#2d4c7a',
109
+ '40': '#4b648a',
110
+ '50': '#637ca2',
111
+ '60': '#7e97bd',
112
+ '70': '#96b3d5',
113
+ '80': '#b6cde8',
114
+ '90': '#dde9f7',
115
+ '100': '#ffffff',
116
+ },
117
+ 'names-tertiary': {
118
+ '0': '#000000',
119
+ '10': '#00231F',
120
+ '20': '#00453D',
121
+ '30': '#00685C',
122
+ '40': '#008C7C',
123
+ '50': '#00AF9B',
124
+ '60': '#00D7BE',
125
+ '70': '#17F3D9',
126
+ '80': '#54FFEB',
127
+ '90': '#A6FFF4',
128
+ '100': '#ffffff',
129
+ },
130
+ 'names-error': {
131
+ '0': '#000000',
132
+ '10': '#3D001F',
133
+ '20': '#620432',
134
+ '30': '#A30251',
135
+ '40': '#C90E6A',
136
+ '50': '#DC2B82',
137
+ '60': '#E35A9E',
138
+ '70': '#EF84B9',
139
+ '80': '#FCADD4',
140
+ '90': '#FFD7EB',
141
+ '100': '#ffffff',
142
+ },
143
+ 'names-neutral': {
144
+ '0': '#000000',
145
+ '4': '#0A0D23',
146
+ '6': '#0F1228',
147
+ '10': '#181B31',
148
+ '12': '#20233C',
149
+ '20': '#2B2E45',
150
+ '30': '#404359',
151
+ '40': '#585B71',
152
+ '50': '#71748B',
153
+ '60': '#8C8FA5',
154
+ '70': '#ACAFC5',
155
+ '80': '#CED1E7',
156
+ '90': '#DFE2F8',
157
+ '92': '#E5E8FE',
158
+ '96': '#F0F2FF',
159
+ '98': '#F8F9FF',
160
+ '100': '#ffffff',
161
+ },
162
+ 'names-gradient': {
163
+ 'stop-1': '#3131FF',
164
+ 'stop-2': '#A139FF',
165
+ 'stop-3': '#14F0D6',
166
+ 'stop-4': '#20233C',
167
+ },
168
+ 'names-warning': {
169
+ '0': '#000000',
170
+ '10': '#2D1E00',
171
+ '20': '#422C00',
172
+ '30': '#674500',
173
+ '40': '#8C5D00',
174
+ '50': '#A47518',
79
175
  '60': '#BE8F32',
176
+ '70': '#D9AA4D',
177
+ '80': '#F4C568',
80
178
  '90': '#FFE3AB',
179
+ '100': '#FFFFFF',
81
180
  },
82
181
  };
83
182
 
@@ -0,0 +1,97 @@
1
+ @layer base {
2
+ .text-display-lg,
3
+ .text-display-md,
4
+ .text-display-sm,
5
+ .text-headline-lg,
6
+ .text-headline-md,
7
+ .text-headline-sm {
8
+ font-family: var(--font-family-heading);
9
+ }
10
+
11
+ .text-title-lg,
12
+ .text-title-md,
13
+ .text-title-sm,
14
+ .text-body-lg,
15
+ .text-body-md,
16
+ .text-body-sm,
17
+ .text-body-ds-lg,
18
+ .text-body-ds-md,
19
+ .text-body-ds-sm,
20
+ .text-label-lg,
21
+ .text-label-md,
22
+ .text-label-sm {
23
+ font-family: var(--font-family-text);
24
+ }
25
+
26
+ .text-display-lg,
27
+ .text-display-md,
28
+ .text-display-sm,
29
+ .text-headline-lg,
30
+ .text-headline-md,
31
+ .text-headline-sm,
32
+ .text-body-ds-lg {
33
+ font-variant-alternates: 'ss02';
34
+ font-weight: var(--font-weight);
35
+ letter-spacing: var(--letter-spacing);
36
+ }
37
+
38
+ .text-label-md {
39
+ font-variant-alternates: 'ss01';
40
+ }
41
+
42
+ input:-webkit-autofill,
43
+ input:-webkit-autofill:enabled,
44
+ input:-webkit-autofill:hover,
45
+ input:-webkit-autofill:focus {
46
+ @apply appearance-none !bg-transparent !bg-none;
47
+ @apply !text-iota-neutral-92 names:!text-names-neutral-10 dark:!text-iota-neutral-10;
48
+ transition: background-color 5000s ease-in-out 0s;
49
+ -webkit-text-fill-color: theme('colors.iota-neutral.92') !important;
50
+ }
51
+
52
+ :root:not(.dark):not(.names) {
53
+ input:-webkit-autofill,
54
+ input:-webkit-autofill:enabled,
55
+ input:-webkit-autofill:hover,
56
+ input:-webkit-autofill:focus {
57
+ -webkit-text-fill-color: theme('colors.iota-neutral.10') !important;
58
+ }
59
+ }
60
+ }
61
+
62
+ @-moz-document url-prefix() {
63
+ * {
64
+ scrollbar-width: thin;
65
+ scrollbar-color: theme('colors.iota-neutral.30') transparent;
66
+ }
67
+
68
+ :root:not(.dark) {
69
+ * {
70
+ scrollbar-color: theme('colors.iota-neutral.80') transparent;
71
+ }
72
+ }
73
+ }
74
+ @supports selector(::-webkit-scrollbar) {
75
+ *::-webkit-scrollbar {
76
+ width: 0.875rem;
77
+ }
78
+
79
+ *::-webkit-scrollbar-track {
80
+ border-radius: 0.75rem;
81
+ background-color: transparent;
82
+ }
83
+
84
+ *::-webkit-scrollbar-thumb {
85
+ box-shadow: inset 0 0 10px 10px #cad4e2;
86
+ border-radius: 0.75rem;
87
+ border: 4px solid transparent;
88
+ }
89
+
90
+ .dark *::-webkit-scrollbar-thumb {
91
+ box-shadow: inset 0 0 10px 10px #3c4656;
92
+ }
93
+
94
+ .names *::-webkit-scrollbar-thumb {
95
+ box-shadow: inset 0 0 10px 10px #3c4656;
96
+ }
97
+ }