@iota/apps-ui-kit 0.7.0 → 0.7.1
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.
- package/CHANGELOG.md +15 -0
- package/dist/index.d.ts +51 -25
- package/dist/index.es.js +2164 -2104
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +10 -10
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -2
- package/src/lib/components/atoms/button/Button.tsx +1 -0
- package/src/lib/components/atoms/button-segment/ButtonSegment.tsx +1 -1
- package/src/lib/components/atoms/checkbox/Checkbox.tsx +0 -1
- package/src/lib/components/atoms/index.ts +1 -0
- package/src/lib/components/atoms/list-item/ListItem.tsx +1 -1
- package/src/lib/components/atoms/radio-button/RadioButton.tsx +1 -1
- package/src/lib/components/atoms/skeleton/Skeleton.tsx +5 -20
- package/src/lib/components/index.ts +0 -2
- package/src/lib/components/molecules/chip/Chip.tsx +51 -17
- package/src/lib/components/molecules/chip/chip.classes.ts +36 -14
- package/src/lib/components/molecules/chip/chip.enums.ts +6 -3
- package/src/lib/components/molecules/input/Input.tsx +34 -17
- package/src/lib/components/molecules/input/TextArea.tsx +2 -3
- package/src/lib/components/molecules/navbar-item/NavbarItem.tsx +0 -1
- package/src/lib/components/molecules/navbar-item/NavbarItemHorizontal.tsx +1 -1
- package/src/lib/components/molecules/navbar-item/NavbarItemVertical.tsx +1 -1
- package/src/lib/components/molecules/select/Select.tsx +24 -4
- package/src/lib/components/organisms/dialog/Dialog.tsx +37 -22
- package/src/lib/constants/colors.constants.ts +12 -5
- package/src/lib/enums/index.ts +1 -0
- package/src/lib/enums/theme.enums.ts +8 -0
- package/src/lib/index.ts +2 -0
- package/src/lib/styles/base.css +40 -0
- package/src/lib/styles/components.css +52 -4
- package/src/lib/styles/index.css +4 -753
- package/src/lib/styles/utilities.css +11 -3
- package/src/lib/styles/variables/dark-variables.css +262 -0
- package/src/lib/styles/variables/general-variables.css +9 -0
- package/src/lib/styles/variables/light-variables.css +276 -0
- package/src/lib/styles/variables/names-variables.css +270 -0
- package/src/lib/tailwind/base.presets.ts +4 -0
- package/src/lib/tailwind/constants/gradients.constants.ts +6 -0
- package/src/storybook/blocks/TypeSet.tsx +3 -3
- package/src/storybook/constants/gradients.constants.ts +8 -0
- package/src/storybook/helpers/formatGradientNames.ts +15 -0
- package/src/storybook/stories/atoms/Skeleton.stories.tsx +5 -5
- package/src/storybook/stories/components/DocsSyncTheme.tsx +20 -0
- package/src/storybook/stories/components/index.ts +1 -0
- package/src/storybook/stories/design-tokens/colors.stories.mdx +12 -0
- package/src/storybook/stories/design-tokens/icons.stories.mdx +2 -0
- package/src/storybook/stories/design-tokens/typeset.stories.mdx +2 -0
- package/src/storybook/stories/design-tokens/variable-spacing.stories.mdx +2 -1
- package/src/storybook/stories/molecules/Chip.stories.tsx +5 -0
- package/src/storybook/stories/molecules/Input.stories.tsx +79 -2
- package/src/storybook/stories/organisms/Dialog.stories.tsx +54 -28
|
@@ -41,19 +41,30 @@ const DialogOverlay = React.forwardRef<
|
|
|
41
41
|
>(({ showCloseIcon, position, ...props }, ref) => (
|
|
42
42
|
<RadixDialog.Overlay
|
|
43
43
|
ref={ref}
|
|
44
|
-
className={cx(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
})}
|
|
44
|
+
className={cx(
|
|
45
|
+
' dialog-overlay-bg absolute h-full w-full backdrop-blur-md names:backdrop-blur-lg',
|
|
46
|
+
)}
|
|
48
47
|
{...props}
|
|
49
48
|
>
|
|
50
49
|
<DialogClose className={cx('fixed right-3 top-3', { hidden: !showCloseIcon })}>
|
|
51
|
-
<Close />
|
|
50
|
+
<Close className="button-text-color-neutral" />
|
|
52
51
|
</DialogClose>
|
|
53
52
|
</RadixDialog.Overlay>
|
|
54
53
|
));
|
|
55
54
|
DialogOverlay.displayName = RadixDialog.Overlay.displayName;
|
|
56
55
|
|
|
56
|
+
const DialogContainer = React.forwardRef<
|
|
57
|
+
HTMLDivElement,
|
|
58
|
+
React.PropsWithChildren<{ isFixedPosition: boolean }>
|
|
59
|
+
>((props, ref) => (
|
|
60
|
+
<div
|
|
61
|
+
className={cx('inset-0 z-[99999]', props.isFixedPosition ? 'fixed' : 'absolute')}
|
|
62
|
+
ref={ref}
|
|
63
|
+
>
|
|
64
|
+
<div className="relative h-full w-full">{props.children}</div>
|
|
65
|
+
</div>
|
|
66
|
+
));
|
|
67
|
+
|
|
57
68
|
const DialogContent = React.forwardRef<
|
|
58
69
|
React.ElementRef<typeof RadixDialog.Content>,
|
|
59
70
|
React.ComponentPropsWithoutRef<typeof RadixDialog.Content> & {
|
|
@@ -61,6 +72,7 @@ const DialogContent = React.forwardRef<
|
|
|
61
72
|
showCloseOnOverlay?: boolean;
|
|
62
73
|
position?: DialogPosition;
|
|
63
74
|
customWidth?: string;
|
|
75
|
+
isFixedPosition?: boolean;
|
|
64
76
|
}
|
|
65
77
|
>(
|
|
66
78
|
(
|
|
@@ -71,6 +83,7 @@ const DialogContent = React.forwardRef<
|
|
|
71
83
|
children,
|
|
72
84
|
position = DialogPosition.Center,
|
|
73
85
|
customWidth = 'w-80 max-w-[85vw] md:w-96',
|
|
86
|
+
isFixedPosition = position === DialogPosition.Right,
|
|
74
87
|
...props
|
|
75
88
|
},
|
|
76
89
|
ref,
|
|
@@ -85,7 +98,7 @@ const DialogContent = React.forwardRef<
|
|
|
85
98
|
const element = containerId ? document.getElementById(containerId) : undefined;
|
|
86
99
|
setContainerElement(element ?? undefined);
|
|
87
100
|
}, [containerId]);
|
|
88
|
-
const
|
|
101
|
+
const dialogPositioning =
|
|
89
102
|
position === DialogPosition.Right
|
|
90
103
|
? 'overflow-hidden right-0 h-screen top-0 w-full'
|
|
91
104
|
: 'overflow-y-auto overflow-x-hidden left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-xl';
|
|
@@ -94,22 +107,24 @@ const DialogContent = React.forwardRef<
|
|
|
94
107
|
const heightClass = position === DialogPosition.Right ? 'h-screen' : 'max-h-[80vh] h-full';
|
|
95
108
|
return (
|
|
96
109
|
<RadixDialog.Portal container={containerElement}>
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
<
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
<DialogContainer isFixedPosition={isFixedPosition}>
|
|
111
|
+
<DialogOverlay showCloseIcon={showCloseOnOverlay} position={position} />
|
|
112
|
+
<RadixDialog.Content
|
|
113
|
+
ref={ref}
|
|
114
|
+
className={cx(
|
|
115
|
+
'dialog-content-bg dialog-outline absolute flex flex-col justify-center',
|
|
116
|
+
dialogPositioning,
|
|
117
|
+
widthClass,
|
|
118
|
+
)}
|
|
119
|
+
{...props}
|
|
120
|
+
>
|
|
121
|
+
<VisuallyHidden.Root>
|
|
122
|
+
<RadixDialog.Title />
|
|
123
|
+
<RadixDialog.Description />
|
|
124
|
+
</VisuallyHidden.Root>
|
|
125
|
+
<div className={cx('flex flex-1 flex-col', heightClass)}>{children}</div>
|
|
126
|
+
</RadixDialog.Content>
|
|
127
|
+
</DialogContainer>
|
|
113
128
|
</RadixDialog.Portal>
|
|
114
129
|
);
|
|
115
130
|
},
|
|
@@ -87,6 +87,7 @@ export const IOTA_PRIMITIVES_COLOR_PALETTE = {
|
|
|
87
87
|
'100': '#FFFFFF',
|
|
88
88
|
},
|
|
89
89
|
};
|
|
90
|
+
|
|
90
91
|
export const IOTA_NAMES_COLOR_PALETTE = {
|
|
91
92
|
'names-primary': {
|
|
92
93
|
'0': '#000000',
|
|
@@ -159,11 +160,11 @@ export const IOTA_NAMES_COLOR_PALETTE = {
|
|
|
159
160
|
'98': '#F8F9FF',
|
|
160
161
|
'100': '#ffffff',
|
|
161
162
|
},
|
|
162
|
-
'names-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
163
|
+
'names-solid': {
|
|
164
|
+
blue: '#3131FF',
|
|
165
|
+
purple: '#A139FF',
|
|
166
|
+
green: '#14F0D6',
|
|
167
|
+
neutral: '#20233C',
|
|
167
168
|
},
|
|
168
169
|
'names-warning': {
|
|
169
170
|
'0': '#000000',
|
|
@@ -188,6 +189,7 @@ export const SHADER_COLOR_PALETTE = {
|
|
|
188
189
|
'16': '#bed8ff28',
|
|
189
190
|
'48': '#bed8ff7a',
|
|
190
191
|
'72': '#bed8ffb7',
|
|
192
|
+
'100': '#bed8ff',
|
|
191
193
|
},
|
|
192
194
|
'shader-inverted-dark': {
|
|
193
195
|
'0': '#002f6d00',
|
|
@@ -196,6 +198,7 @@ export const SHADER_COLOR_PALETTE = {
|
|
|
196
198
|
'16': '#002f6d28',
|
|
197
199
|
'48': '#002f6d7a',
|
|
198
200
|
'72': '#002f6db7',
|
|
201
|
+
'100': '#002f6d',
|
|
199
202
|
},
|
|
200
203
|
'shader-neutral-dark': {
|
|
201
204
|
'0': '#bed8ff00',
|
|
@@ -204,6 +207,7 @@ export const SHADER_COLOR_PALETTE = {
|
|
|
204
207
|
'16': '#bed8ff28',
|
|
205
208
|
'48': '#bed8ff7a',
|
|
206
209
|
'72': '#bed8ffb7',
|
|
210
|
+
'100': '#bed8ff',
|
|
207
211
|
},
|
|
208
212
|
'shader-primary-light': {
|
|
209
213
|
0: '#0067ee00',
|
|
@@ -212,6 +216,7 @@ export const SHADER_COLOR_PALETTE = {
|
|
|
212
216
|
16: '#0067ee28',
|
|
213
217
|
48: '#0067ee7a',
|
|
214
218
|
72: '#0067eeb7',
|
|
219
|
+
100: '#0067ee',
|
|
215
220
|
},
|
|
216
221
|
'shader-inverted-light': {
|
|
217
222
|
0: '#bed8ff00',
|
|
@@ -220,6 +225,7 @@ export const SHADER_COLOR_PALETTE = {
|
|
|
220
225
|
16: '#bed8ff28',
|
|
221
226
|
48: '#bed8ff7a',
|
|
222
227
|
72: '#bed8ffb7',
|
|
228
|
+
100: '#bed8ff',
|
|
223
229
|
},
|
|
224
230
|
'shader-neutral-light': {
|
|
225
231
|
0: '#002f6d00',
|
|
@@ -228,5 +234,6 @@ export const SHADER_COLOR_PALETTE = {
|
|
|
228
234
|
16: '#002f6d28',
|
|
229
235
|
48: '#002f6d7a',
|
|
230
236
|
72: '#002f6db7',
|
|
237
|
+
100: '#002f6d',
|
|
231
238
|
},
|
|
232
239
|
};
|
package/src/lib/enums/index.ts
CHANGED
package/src/lib/index.ts
CHANGED
package/src/lib/styles/base.css
CHANGED
|
@@ -39,6 +39,46 @@
|
|
|
39
39
|
font-variant-alternates: 'ss01';
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
:root.names {
|
|
43
|
+
--roboto-flex-variation-settings: 'GRAD' 0, 'XOPQ' 96, 'XTRA' 468, 'YOPQ' 79, 'YTAS' 750,
|
|
44
|
+
'YTDE' -203, 'YTFI' 738, 'YTLC' 514, 'YTUC' 640, 'slnt' 0, 'wdth' 130;
|
|
45
|
+
|
|
46
|
+
.text-display-lg,
|
|
47
|
+
.text-display-md,
|
|
48
|
+
.text-display-sm {
|
|
49
|
+
font-family: var(--font-family-heading);
|
|
50
|
+
font-variation-settings: var(--roboto-flex-variation-settings);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.text-headline-lg,
|
|
54
|
+
.text-headline-md,
|
|
55
|
+
.text-headline-sm,
|
|
56
|
+
.text-title-lg,
|
|
57
|
+
.text-title-md,
|
|
58
|
+
.text-title-sm,
|
|
59
|
+
.text-body-lg,
|
|
60
|
+
.text-body-md,
|
|
61
|
+
.text-body-sm,
|
|
62
|
+
.text-body-ds-lg,
|
|
63
|
+
.text-body-ds-md,
|
|
64
|
+
.text-body-ds-sm,
|
|
65
|
+
.text-label-lg,
|
|
66
|
+
.text-label-md,
|
|
67
|
+
.text-label-sm {
|
|
68
|
+
font-family: var(--font-family-text);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.text-headline-sm,
|
|
72
|
+
.text-headline-md,
|
|
73
|
+
.text-headline-lg {
|
|
74
|
+
font-feature-settings: 'ss01' on;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.font-roboto-flex {
|
|
78
|
+
font-variation-settings: var(--roboto-flex-variation-settings);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
42
82
|
input:-webkit-autofill,
|
|
43
83
|
input:-webkit-autofill:enabled,
|
|
44
84
|
input:-webkit-autofill:hover,
|
|
@@ -415,8 +415,12 @@
|
|
|
415
415
|
|
|
416
416
|
/* CHIP */
|
|
417
417
|
|
|
418
|
-
.chip-bg-selected {
|
|
419
|
-
background-color: var(--chip-bg-selected);
|
|
418
|
+
.chip-bg-selected-outline {
|
|
419
|
+
background-color: var(--chip-bg-selected-outline);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.chip-bg-elevated {
|
|
423
|
+
background-color: var(--chip-bg-elevated);
|
|
420
424
|
}
|
|
421
425
|
|
|
422
426
|
.chip-border-default {
|
|
@@ -427,14 +431,58 @@
|
|
|
427
431
|
color: var(--chip-text-default);
|
|
428
432
|
}
|
|
429
433
|
|
|
430
|
-
.chip-text-
|
|
431
|
-
color: var(--chip-text-
|
|
434
|
+
.chip-text-secondary {
|
|
435
|
+
color: var(--chip-text-secondary);
|
|
432
436
|
}
|
|
433
437
|
|
|
434
438
|
.chip-focus-ring {
|
|
435
439
|
box-shadow: 0 0 0 2px var(--chip-focus-ring);
|
|
436
440
|
}
|
|
437
441
|
|
|
442
|
+
.chip-bg-brand {
|
|
443
|
+
background-color: var(--chip-bg-brand);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.chip-text-brand {
|
|
447
|
+
color: var(--chip-text-brand);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.chip-border-color-brand {
|
|
451
|
+
border-color: var(--chip-border-color-brand);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.chip-bg-selected-overlay {
|
|
455
|
+
background-color: var(--chip-bg-selected-overlay);
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.chip-outline-color {
|
|
459
|
+
outline-color: var(--chip-outline-color);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.chip-outline-color-hover {
|
|
463
|
+
outline-color: var(--chip-outline-color-hover);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.chip-outline-color-active {
|
|
467
|
+
outline-color: var(--chip-outline-color-active);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.chip-bg-color-hover {
|
|
471
|
+
background-color: var(--chip-bg-color-hover);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.chip-bg-color-active {
|
|
475
|
+
background-color: var(--chip-bg-color-active);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.chip-bg-color-focus {
|
|
479
|
+
background-color: var(--chip-bg-color-focus);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.chip-close-icon-opacity {
|
|
483
|
+
opacity: var(--chip-close-icon-opacity);
|
|
484
|
+
}
|
|
485
|
+
|
|
438
486
|
/* DISPLAY STATS */
|
|
439
487
|
.display-stats-bg-default {
|
|
440
488
|
background-color: var(--display-stats-bg-default);
|