@infonomic/uikit 5.41.0 → 5.43.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.
- package/dist/components/@types/shared.d.ts +52 -0
- package/dist/components/@types/shared.d.ts.map +1 -1
- package/dist/components/accordion/accordion.d.ts.map +1 -1
- package/dist/components/accordion/accordion.module.css +1 -2
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/avatar.module.css +6 -7
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.module.css +6 -7
- package/dist/components/button/@types/button.d.ts +31 -1
- package/dist/components/button/@types/button.d.ts.map +1 -1
- package/dist/components/button/button-group.module.css +1 -3
- package/dist/components/button/button.module.css +48 -31
- package/dist/components/button/combo-button.d.ts.map +1 -1
- package/dist/components/button/combo-button.module.css +3 -3
- package/dist/components/button/control-buttons.module.css +1 -2
- package/dist/components/button/copy-button.d.ts.map +1 -1
- package/dist/components/button/copy-button.module.css +6 -7
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/card.module.css +6 -10
- package/dist/components/chips/@types/chip.d.ts +20 -0
- package/dist/components/chips/@types/chip.d.ts.map +1 -1
- package/dist/components/chips/chip.d.ts.map +1 -1
- package/dist/components/chips/chip.module.css +30 -19
- package/dist/components/container/container.d.ts.map +1 -1
- package/dist/components/container/container.module.css +6 -10
- package/dist/components/dropdown/dropdown.module.css +6 -7
- package/dist/components/forms/@types/checkbox.d.ts +28 -1
- package/dist/components/forms/@types/checkbox.d.ts.map +1 -1
- package/dist/components/forms/@types/input.d.ts +29 -1
- package/dist/components/forms/@types/input.d.ts.map +1 -1
- package/dist/components/forms/calendar.module.css +14 -14
- package/dist/components/forms/checkbox-group.d.ts.map +1 -1
- package/dist/components/forms/checkbox.d.ts.map +1 -1
- package/dist/components/forms/checkbox.module.css +12 -17
- package/dist/components/forms/checkbox.module.js +0 -1
- package/dist/components/forms/checkbox_module.css +3 -13
- package/dist/components/forms/error-text.module.css +6 -7
- package/dist/components/forms/help-text.d.ts.map +1 -1
- package/dist/components/forms/help-text.module.css +6 -7
- package/dist/components/forms/input-adornment.module.css +6 -7
- package/dist/components/forms/input-password.d.ts.map +1 -1
- package/dist/components/forms/input.d.ts.map +1 -1
- package/dist/components/forms/input.module.css +6 -7
- package/dist/components/forms/label.module.css +6 -7
- package/dist/components/forms/radio-group.module.css +6 -7
- package/dist/components/forms/select.d.ts.map +1 -1
- package/dist/components/forms/select.js +1 -1
- package/dist/components/forms/select.module.css +74 -3
- package/dist/components/forms/select.module.js +10 -0
- package/dist/components/forms/select_module.css +63 -3
- package/dist/components/forms/text-area.module.css +10 -9
- package/dist/components/notifications/@types/alert.d.ts +16 -1
- package/dist/components/notifications/@types/alert.d.ts.map +1 -1
- package/dist/components/notifications/@types/toast.d.ts +36 -1
- package/dist/components/notifications/@types/toast.d.ts.map +1 -1
- package/dist/components/notifications/alert.d.ts.map +1 -1
- package/dist/components/notifications/alert.module.css +6 -7
- package/dist/components/notifications/toast.module.css +6 -8
- package/dist/components/overlay/overlay.module.css +6 -4
- package/dist/components/pager/@types/index.d.ts +12 -0
- package/dist/components/pager/@types/index.d.ts.map +1 -1
- package/dist/components/pager/pagination.module.css +6 -8
- package/dist/components/scroll-area/scroll-area.d.ts.map +1 -1
- package/dist/components/scroll-area/scroll-area.module.css +6 -7
- package/dist/components/scroll-to-top/scroll-to-top.module.css +5 -7
- package/dist/components/section/section.d.ts.map +1 -1
- package/dist/components/section/section.module.css +6 -7
- package/dist/components/shimmer/shimmer.module.css +6 -8
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.module.css +6 -8
- package/dist/components/tabs/tabs.module.css +6 -7
- package/dist/components/tooltip/tooltip.module.css +6 -7
- package/dist/icons/eye-closed-icon.d.ts.map +1 -1
- package/dist/icons/eye-open-icon.d.ts.map +1 -1
- package/dist/icons/icons.module.css +1 -1
- package/dist/widgets/datepicker/datepicker.d.ts.map +1 -1
- package/dist/widgets/datepicker/datepicker.module.css +1 -2
- package/dist/widgets/drawer/drawer-container.d.ts.map +1 -1
- package/dist/widgets/drawer/drawer-content.d.ts.map +1 -1
- package/dist/widgets/drawer/drawer.module.css +1 -3
- package/dist/widgets/modal/modal-actions.d.ts.map +1 -1
- package/dist/widgets/modal/modal-container.d.ts.map +1 -1
- package/dist/widgets/modal/modal-content.d.ts.map +1 -1
- package/dist/widgets/modal/modal.module.css +1 -3
- package/dist/widgets/timeline/timeline.module.css +6 -8
- package/package.json +1 -1
- package/src/components/@types/shared.ts +55 -0
- package/src/components/accordion/accordion.module.css +1 -2
- package/src/components/accordion/accordion.stories.tsx +1 -2
- package/src/components/accordion/accordion.tsx +25 -5
- package/src/components/avatar/avatar.module.css +6 -7
- package/src/components/avatar/avatar.tsx +9 -2
- package/src/components/badge/badge.module.css +6 -7
- package/src/components/badge/badge.tsx +7 -1
- package/src/components/button/@types/button.ts +36 -1
- package/src/components/button/button-group.module.css +1 -3
- package/src/components/button/button.module.css +48 -31
- package/src/components/button/button.tsx +1 -1
- package/src/components/button/combo-button.module.css +3 -3
- package/src/components/button/combo-button.tsx +17 -5
- package/src/components/button/combo-buttons.stories.tsx +6 -3
- package/src/components/button/control-buttons.module.css +1 -2
- package/src/components/button/copy-button.module.css +6 -7
- package/src/components/button/copy-button.tsx +12 -3
- package/src/components/card/card.module.css +6 -10
- package/src/components/card/card.tsx +20 -4
- package/src/components/chips/@types/chip.ts +22 -0
- package/src/components/chips/chip.module.css +30 -19
- package/src/components/chips/chip.tsx +10 -5
- package/src/components/container/container.module.css +6 -10
- package/src/components/container/container.tsx +1 -1
- package/src/components/dropdown/dropdown.module.css +6 -7
- package/src/components/forms/@types/checkbox.ts +31 -1
- package/src/components/forms/@types/input.ts +32 -1
- package/src/components/forms/calendar.module.css +14 -14
- package/src/components/forms/checkbox-group.tsx +1 -1
- package/src/components/forms/checkbox.module.css +12 -17
- package/src/components/forms/checkbox.tsx +4 -1
- package/src/components/forms/error-text.module.css +6 -7
- package/src/components/forms/help-text.module.css +6 -7
- package/src/components/forms/help-text.tsx +5 -1
- package/src/components/forms/input-adornment.module.css +6 -7
- package/src/components/forms/input-password.tsx +7 -1
- package/src/components/forms/input.module.css +6 -7
- package/src/components/forms/input.tsx +18 -2
- package/src/components/forms/label.module.css +6 -7
- package/src/components/forms/radio-group.module.css +6 -7
- package/src/components/forms/select.module.css +74 -3
- package/src/components/forms/select.stories.tsx +47 -9
- package/src/components/forms/select.tsx +4 -2
- package/src/components/forms/text-area.module.css +10 -9
- package/src/components/notifications/@types/alert.ts +17 -1
- package/src/components/notifications/@types/toast.ts +40 -1
- package/src/components/notifications/alert.module.css +6 -7
- package/src/components/notifications/alert.tsx +10 -3
- package/src/components/notifications/toast.module.css +6 -8
- package/src/components/overlay/overlay.module.css +6 -4
- package/src/components/pager/@types/index.ts +13 -0
- package/src/components/pager/pagination.module.css +6 -8
- package/src/components/pager/pagination.tsx +6 -1
- package/src/components/scroll-area/scroll-area.module.css +6 -7
- package/src/components/scroll-area/scroll-area.tsx +13 -4
- package/src/components/scroll-to-top/scroll-to-top.module.css +5 -7
- package/src/components/section/section.module.css +6 -7
- package/src/components/section/section.tsx +1 -1
- package/src/components/shimmer/shimmer.module.css +6 -8
- package/src/components/table/table.module.css +6 -8
- package/src/components/table/table.tsx +6 -1
- package/src/components/tabs/tabs.module.css +6 -7
- package/src/components/tooltip/tooltip.module.css +6 -7
- package/src/icons/ai-icon.tsx +1 -1
- package/src/icons/eye-closed-icon.tsx +2 -1
- package/src/icons/eye-open-icon.tsx +1 -5
- package/src/icons/icons.module.css +1 -1
- package/src/styles/base/base.css +1 -1
- package/src/styles/base/colors.css +1 -2
- package/src/styles/components/loaders.css +1 -1
- package/src/styles/functional/colors.css +201 -56
- package/src/styles/functional/surfaces.css +1 -2
- package/src/styles/functional/typography.css +1 -1
- package/src/widgets/datepicker/datepicker.module.css +1 -2
- package/src/widgets/datepicker/datepicker.tsx +44 -16
- package/src/widgets/drawer/drawer-container.tsx +6 -1
- package/src/widgets/drawer/drawer-content.tsx +5 -1
- package/src/widgets/drawer/drawer.module.css +1 -3
- package/src/widgets/modal/modal-actions.tsx +5 -1
- package/src/widgets/modal/modal-container.tsx +5 -1
- package/src/widgets/modal/modal-content.tsx +5 -1
- package/src/widgets/modal/modal.module.css +1 -3
- package/src/widgets/timeline/timeline.module.css +6 -8
|
@@ -11,5 +11,9 @@ interface HelpTextProps {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export function HelpText({ className, size, text }: HelpTextProps): React.JSX.Element {
|
|
14
|
-
return
|
|
14
|
+
return (
|
|
15
|
+
<p className={cx('infonomic-help-text', styles.text, size && styles[size], className)}>
|
|
16
|
+
{text}
|
|
17
|
+
</p>
|
|
18
|
+
)
|
|
15
19
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
@layer infonomic-base,
|
|
2
|
-
infonomic-functional,
|
|
3
|
-
infonomic-utilities,
|
|
4
|
-
infonomic-theme,
|
|
5
|
-
infonomic-typography,
|
|
6
|
-
infonomic-components;
|
|
2
|
+
infonomic-functional,
|
|
3
|
+
infonomic-utilities,
|
|
4
|
+
infonomic-theme,
|
|
5
|
+
infonomic-typography,
|
|
6
|
+
infonomic-components;
|
|
7
7
|
|
|
8
8
|
@layer infonomic-components {
|
|
9
|
-
|
|
10
9
|
.adornment,
|
|
11
10
|
:global(.infonomic-input-adornment) {
|
|
12
11
|
display: flex;
|
|
@@ -24,4 +23,4 @@ infonomic-components;
|
|
|
24
23
|
:global(.infonomic-input-adornment-end) {
|
|
25
24
|
justify-content: flex-end;
|
|
26
25
|
}
|
|
27
|
-
}
|
|
26
|
+
}
|
|
@@ -11,7 +11,13 @@ export function InputPassword({ ...props }: InputProps) {
|
|
|
11
11
|
return (
|
|
12
12
|
<Input
|
|
13
13
|
type={visible ? 'text' : 'password'}
|
|
14
|
-
endAdornment={
|
|
14
|
+
endAdornment={
|
|
15
|
+
visible ? (
|
|
16
|
+
<EyeOpenIcon width="18px" height="18px" onClick={() => setVisible(!visible)} />
|
|
17
|
+
) : (
|
|
18
|
+
<EyeClosedIcon width="18px" height="18px" onClick={() => setVisible(!visible)} />
|
|
19
|
+
)
|
|
20
|
+
}
|
|
15
21
|
{...props}
|
|
16
22
|
/>
|
|
17
23
|
)
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
@layer infonomic-base,
|
|
2
|
-
infonomic-functional,
|
|
3
|
-
infonomic-utilities,
|
|
4
|
-
infonomic-theme,
|
|
5
|
-
infonomic-typography,
|
|
6
|
-
infonomic-components;
|
|
2
|
+
infonomic-functional,
|
|
3
|
+
infonomic-utilities,
|
|
4
|
+
infonomic-theme,
|
|
5
|
+
infonomic-typography,
|
|
6
|
+
infonomic-components;
|
|
7
7
|
|
|
8
8
|
@layer infonomic-components {
|
|
9
|
-
|
|
10
9
|
.input-wrapper,
|
|
11
10
|
:global(.infonomic-input-wrapper) {
|
|
12
11
|
display: flex;
|
|
@@ -282,4 +281,4 @@ infonomic-components;
|
|
|
282
281
|
}
|
|
283
282
|
|
|
284
283
|
/* Dark mode handled by semantic tokens in theme layer */
|
|
285
|
-
}
|
|
284
|
+
}
|
|
@@ -58,7 +58,15 @@ export const Input = <_C extends React.ElementType = 'input'>({
|
|
|
58
58
|
{label != null && <Label id={id} htmlFor={id} required={required} label={label} />}
|
|
59
59
|
<div className={cx('infonomic-input-container', styles['input-container'])}>
|
|
60
60
|
{startAdornment != null && (
|
|
61
|
-
<div
|
|
61
|
+
<div
|
|
62
|
+
className={cx(
|
|
63
|
+
'infonomic-input-start-adornment',
|
|
64
|
+
styles['start-adornment'],
|
|
65
|
+
styles[variant]
|
|
66
|
+
)}
|
|
67
|
+
>
|
|
68
|
+
{startAdornment}
|
|
69
|
+
</div>
|
|
62
70
|
)}
|
|
63
71
|
<input
|
|
64
72
|
ref={ref}
|
|
@@ -90,7 +98,15 @@ export const Input = <_C extends React.ElementType = 'input'>({
|
|
|
90
98
|
{...rest}
|
|
91
99
|
/>
|
|
92
100
|
{endAdornment != null && (
|
|
93
|
-
<div
|
|
101
|
+
<div
|
|
102
|
+
className={cx(
|
|
103
|
+
'infonomic-input-end-adornment',
|
|
104
|
+
styles['end-adornment'],
|
|
105
|
+
styles[variant]
|
|
106
|
+
)}
|
|
107
|
+
>
|
|
108
|
+
{endAdornment}
|
|
109
|
+
</div>
|
|
94
110
|
)}
|
|
95
111
|
</div>
|
|
96
112
|
{error ? (
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
@layer infonomic-base,
|
|
2
|
-
infonomic-functional,
|
|
3
|
-
infonomic-utilities,
|
|
4
|
-
infonomic-theme,
|
|
5
|
-
infonomic-typography,
|
|
6
|
-
infonomic-components;
|
|
2
|
+
infonomic-functional,
|
|
3
|
+
infonomic-utilities,
|
|
4
|
+
infonomic-theme,
|
|
5
|
+
infonomic-typography,
|
|
6
|
+
infonomic-components;
|
|
7
7
|
|
|
8
8
|
@layer infonomic-components {
|
|
9
|
-
|
|
10
9
|
.label,
|
|
11
10
|
:global(.infonomic-label) {
|
|
12
11
|
display: block;
|
|
@@ -18,4 +17,4 @@ infonomic-components;
|
|
|
18
17
|
:global(.infonomic-label-required) {
|
|
19
18
|
color: var(--error);
|
|
20
19
|
}
|
|
21
|
-
}
|
|
20
|
+
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
@layer infonomic-base,
|
|
2
|
-
infonomic-functional,
|
|
3
|
-
infonomic-utilities,
|
|
4
|
-
infonomic-theme,
|
|
5
|
-
infonomic-typography,
|
|
6
|
-
infonomic-components;
|
|
2
|
+
infonomic-functional,
|
|
3
|
+
infonomic-utilities,
|
|
4
|
+
infonomic-theme,
|
|
5
|
+
infonomic-typography,
|
|
6
|
+
infonomic-components;
|
|
7
7
|
|
|
8
8
|
/* 'border-collapse w-full text-sm text-left text-gray-700 dark:text-gray-400 m-0', */
|
|
9
9
|
@layer infonomic-components {
|
|
10
|
-
|
|
11
10
|
.column,
|
|
12
11
|
:global(.infonomic-radio-group-column) {
|
|
13
12
|
display: flex;
|
|
@@ -183,4 +182,4 @@ infonomic-components;
|
|
|
183
182
|
transform: scale(0.8);
|
|
184
183
|
}
|
|
185
184
|
}
|
|
186
|
-
}
|
|
185
|
+
}
|
|
@@ -23,6 +23,26 @@ infonomic-components;
|
|
|
23
23
|
padding: 6px;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
.viewport-xs {
|
|
27
|
+
padding: 4px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.viewport-sm {
|
|
31
|
+
padding: 4px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.viewport-md {
|
|
35
|
+
padding: 6px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.viewport-lg {
|
|
39
|
+
padding: 6px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.viewport-xl {
|
|
43
|
+
padding: 8px;
|
|
44
|
+
}
|
|
45
|
+
|
|
26
46
|
.group,
|
|
27
47
|
:global(.infonomic-select-group) {
|
|
28
48
|
z-index: 50;
|
|
@@ -49,8 +69,8 @@ infonomic-components;
|
|
|
49
69
|
background-color: var(--surface-item);
|
|
50
70
|
font-size: 1rem;
|
|
51
71
|
line-height: 1;
|
|
52
|
-
padding-right:
|
|
53
|
-
padding-left:
|
|
72
|
+
padding-right: 32px;
|
|
73
|
+
padding-left: 24px;
|
|
54
74
|
height: 32px;
|
|
55
75
|
display: flex;
|
|
56
76
|
align-items: center;
|
|
@@ -74,9 +94,60 @@ infonomic-components;
|
|
|
74
94
|
:global(.infonomic-select-item-indicator) {
|
|
75
95
|
position: absolute;
|
|
76
96
|
left: 0;
|
|
77
|
-
width:
|
|
97
|
+
width: 24px;
|
|
78
98
|
display: inline-flex;
|
|
79
99
|
align-items: center;
|
|
80
100
|
justify-content: center;
|
|
81
101
|
}
|
|
102
|
+
|
|
103
|
+
/* size variants — treat current values as 'md' */
|
|
104
|
+
.viewport-xs .select-item {
|
|
105
|
+
font-size: 0.75rem;
|
|
106
|
+
height: 24px;
|
|
107
|
+
padding-right: 28px;
|
|
108
|
+
padding-left: 20px;
|
|
109
|
+
border-radius: 4px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.viewport-xs .select-item-indicator {
|
|
113
|
+
width: 20px;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.viewport-sm .select-item {
|
|
117
|
+
font-size: 0.875rem;
|
|
118
|
+
height: 28px;
|
|
119
|
+
padding-right: 30px;
|
|
120
|
+
padding-left: 22px;
|
|
121
|
+
border-radius: 5px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.viewport-sm .select-item-indicator {
|
|
125
|
+
width: 22px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* .viewport-md — inherits base .select-item values */
|
|
129
|
+
|
|
130
|
+
.viewport-lg .select-item {
|
|
131
|
+
font-size: 1.125rem;
|
|
132
|
+
height: 34px;
|
|
133
|
+
padding-right: 32px;
|
|
134
|
+
padding-left: 24px;
|
|
135
|
+
border-radius: 6px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.viewport-lg .select-item-indicator {
|
|
139
|
+
width: 24px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.viewport-xl .select-item {
|
|
143
|
+
font-size: 1.25rem;
|
|
144
|
+
height: 40px;
|
|
145
|
+
padding-right: 36px;
|
|
146
|
+
padding-left: 28px;
|
|
147
|
+
border-radius: 8px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.viewport-xl .select-item-indicator {
|
|
151
|
+
width: 28px;
|
|
152
|
+
}
|
|
82
153
|
}
|
|
@@ -19,14 +19,52 @@ const values: SelectValue[] = [
|
|
|
19
19
|
|
|
20
20
|
export const Default = (): React.JSX.Element => {
|
|
21
21
|
return (
|
|
22
|
-
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
{value.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
<>
|
|
23
|
+
<div style={{ maxWidth: '600px', margin: '2rem auto' }}>
|
|
24
|
+
<Select size="xl" placeholder="Select one..." helpText="Extra Large select.">
|
|
25
|
+
{values.map((value) => (
|
|
26
|
+
<SelectItem key={value.value} value={value.value}>
|
|
27
|
+
{value.label}
|
|
28
|
+
</SelectItem>
|
|
29
|
+
))}
|
|
30
|
+
</Select>
|
|
31
|
+
</div>
|
|
32
|
+
<div style={{ maxWidth: '600px', margin: '2rem auto' }}>
|
|
33
|
+
<Select size="lg" placeholder="Select one..." helpText="Large select.">
|
|
34
|
+
{values.map((value) => (
|
|
35
|
+
<SelectItem key={value.value} value={value.value}>
|
|
36
|
+
{value.label}
|
|
37
|
+
</SelectItem>
|
|
38
|
+
))}
|
|
39
|
+
</Select>
|
|
40
|
+
</div>
|
|
41
|
+
<div style={{ maxWidth: '600px', margin: '2rem auto' }}>
|
|
42
|
+
<Select size="md" placeholder="Select one..." helpText="Medium select.">
|
|
43
|
+
{values.map((value) => (
|
|
44
|
+
<SelectItem key={value.value} value={value.value}>
|
|
45
|
+
{value.label}
|
|
46
|
+
</SelectItem>
|
|
47
|
+
))}
|
|
48
|
+
</Select>
|
|
49
|
+
</div>
|
|
50
|
+
<div style={{ maxWidth: '600px', margin: '2rem auto' }}>
|
|
51
|
+
<Select size="sm" placeholder="Select one..." helpText="Small select.">
|
|
52
|
+
{values.map((value) => (
|
|
53
|
+
<SelectItem key={value.value} value={value.value}>
|
|
54
|
+
{value.label}
|
|
55
|
+
</SelectItem>
|
|
56
|
+
))}
|
|
57
|
+
</Select>
|
|
58
|
+
</div>
|
|
59
|
+
<div style={{ maxWidth: '600px', margin: '2rem auto' }}>
|
|
60
|
+
<Select size="xs" placeholder="Select one..." helpText="Extra small select.">
|
|
61
|
+
{values.map((value) => (
|
|
62
|
+
<SelectItem key={value.value} value={value.value}>
|
|
63
|
+
{value.label}
|
|
64
|
+
</SelectItem>
|
|
65
|
+
))}
|
|
66
|
+
</Select>
|
|
67
|
+
</div>
|
|
68
|
+
</>
|
|
31
69
|
)
|
|
32
70
|
}
|
|
@@ -77,7 +77,7 @@ export function Select({
|
|
|
77
77
|
<SelectPrimitive.ScrollUpButton className={styles['scroll-button']}>
|
|
78
78
|
<ChevronUpIcon />
|
|
79
79
|
</SelectPrimitive.ScrollUpButton>
|
|
80
|
-
<SelectPrimitive.Viewport className={styles.viewport}>
|
|
80
|
+
<SelectPrimitive.Viewport className={cx(styles.viewport, size != null && styles[`viewport-${size}`])}>
|
|
81
81
|
<SelectPrimitive.Group className={styles.group}>{children}</SelectPrimitive.Group>
|
|
82
82
|
</SelectPrimitive.Viewport>
|
|
83
83
|
<SelectPrimitive.ScrollDownButton className={styles['scroll-button']}>
|
|
@@ -106,7 +106,9 @@ export const SelectItem = ({
|
|
|
106
106
|
ref={forwardedRef}
|
|
107
107
|
>
|
|
108
108
|
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
109
|
-
<SelectPrimitive.ItemIndicator
|
|
109
|
+
<SelectPrimitive.ItemIndicator
|
|
110
|
+
className={cx('infonomic-select-item-indicator', styles['select-item-indicator'])}
|
|
111
|
+
>
|
|
110
112
|
<CheckIcon />
|
|
111
113
|
</SelectPrimitive.ItemIndicator>
|
|
112
114
|
</SelectPrimitive.Item>
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
@layer infonomic-base,
|
|
2
|
-
infonomic-functional,
|
|
3
|
-
infonomic-utilities,
|
|
4
|
-
infonomic-theme,
|
|
5
|
-
infonomic-typography,
|
|
6
|
-
infonomic-components;
|
|
2
|
+
infonomic-functional,
|
|
3
|
+
infonomic-utilities,
|
|
4
|
+
infonomic-theme,
|
|
5
|
+
infonomic-typography,
|
|
6
|
+
infonomic-components;
|
|
7
7
|
|
|
8
8
|
@layer infonomic-components {
|
|
9
|
-
|
|
10
9
|
.text-area,
|
|
11
10
|
:global(.infonomic-text-area) {
|
|
12
11
|
font-size: 1rem;
|
|
@@ -20,7 +19,9 @@ infonomic-components;
|
|
|
20
19
|
padding-right: 0;
|
|
21
20
|
}
|
|
22
21
|
|
|
23
|
-
.outlined {
|
|
22
|
+
.outlined {
|
|
23
|
+
}
|
|
24
24
|
|
|
25
|
-
.filled {
|
|
26
|
-
}
|
|
25
|
+
.filled {
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -2,8 +2,24 @@
|
|
|
2
2
|
import type { Intent as t } from '../../@types/shared.js'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* This file contains the types and prop-types for
|
|
5
|
+
* This file contains the types and prop-types for the Alert component.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
// typescript types
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Semantic color intent of the alert.
|
|
12
|
+
*
|
|
13
|
+
* Controls the alert's background color, left border accent, icon, and text.
|
|
14
|
+
*
|
|
15
|
+
* - `primary` — informational blue-tinted alert (default)
|
|
16
|
+
* - `secondary` — alternate neutral style
|
|
17
|
+
* - `noeffect` — gray, no color emphasis
|
|
18
|
+
* - `success` — positive confirmation (green)
|
|
19
|
+
* - `info` — informational, non-critical (cyan/blue)
|
|
20
|
+
* - `warning` — caution, needs attention (yellow/amber)
|
|
21
|
+
* - `danger` — error or destructive state (red)
|
|
22
|
+
*
|
|
23
|
+
* @default 'primary'
|
|
24
|
+
*/
|
|
9
25
|
export type Intent = 'primary' | t
|
|
@@ -2,11 +2,50 @@
|
|
|
2
2
|
import type { Icons as i, Position as p, Intent as t } from '../../@types/shared.js'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* This file contains the types and prop-types for Toast component.
|
|
5
|
+
* This file contains the types and prop-types for the Toast component.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
// typescript types
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Semantic color intent of the toast notification.
|
|
12
|
+
*
|
|
13
|
+
* Controls the toast's background color, icon, and text style.
|
|
14
|
+
*
|
|
15
|
+
* - `primary` — standard informational toast (default)
|
|
16
|
+
* - `secondary` — alternate neutral style
|
|
17
|
+
* - `noeffect` — gray, no color emphasis
|
|
18
|
+
* - `success` — positive confirmation (green)
|
|
19
|
+
* - `info` — informational, non-critical (cyan/blue)
|
|
20
|
+
* - `warning` — caution, needs attention (yellow/amber)
|
|
21
|
+
* - `danger` — error or destructive state (red)
|
|
22
|
+
*
|
|
23
|
+
* @default 'primary'
|
|
24
|
+
*/
|
|
9
25
|
export type Intent = 'primary' | t
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Screen corner position for the toast container.
|
|
29
|
+
*
|
|
30
|
+
* - `top-left` — top-left corner of the viewport
|
|
31
|
+
* - `top-right` — top-right corner of the viewport (default)
|
|
32
|
+
* - `bottom-left` — bottom-left corner of the viewport
|
|
33
|
+
* - `bottom-right` — bottom-right corner of the viewport
|
|
34
|
+
*
|
|
35
|
+
* @default 'top-right'
|
|
36
|
+
*/
|
|
10
37
|
export type Position = 'top-right' | p
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Icon variant displayed inside the toast.
|
|
41
|
+
* Maps to the corresponding status icon component.
|
|
42
|
+
*/
|
|
11
43
|
export type IconType = 'success' | i
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Callback fired when the toast's open/visible state changes.
|
|
47
|
+
* Use this to sync dismissal with external state.
|
|
48
|
+
*
|
|
49
|
+
* @param open - `true` when the toast becomes visible, `false` when dismissed
|
|
50
|
+
*/
|
|
12
51
|
export type OnOpenChange = (open: boolean) => void
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
@layer infonomic-base,
|
|
2
|
-
infonomic-functional,
|
|
3
|
-
infonomic-utilities,
|
|
4
|
-
infonomic-theme,
|
|
5
|
-
infonomic-typography,
|
|
6
|
-
infonomic-components;
|
|
2
|
+
infonomic-functional,
|
|
3
|
+
infonomic-utilities,
|
|
4
|
+
infonomic-theme,
|
|
5
|
+
infonomic-typography,
|
|
6
|
+
infonomic-components;
|
|
7
7
|
|
|
8
8
|
@layer infonomic-components {
|
|
9
|
-
|
|
10
9
|
.alert,
|
|
11
10
|
:global(.infonomic-alert) {
|
|
12
11
|
display: flex;
|
|
@@ -134,4 +133,4 @@ infonomic-components;
|
|
|
134
133
|
--alert-border: var(--stroke-danger);
|
|
135
134
|
--alert-background: var(--fill-danger-weak);
|
|
136
135
|
}
|
|
137
|
-
}
|
|
136
|
+
}
|
|
@@ -65,9 +65,16 @@ export const Alert = function Alert({
|
|
|
65
65
|
return (
|
|
66
66
|
<div
|
|
67
67
|
ref={ref}
|
|
68
|
-
className={cx(
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
className={cx(
|
|
69
|
+
'infonomic-alert',
|
|
70
|
+
`infonomic-alert-${intent}`,
|
|
71
|
+
styles.alert,
|
|
72
|
+
styles[intent],
|
|
73
|
+
className,
|
|
74
|
+
{
|
|
75
|
+
[styles.fade]: fade,
|
|
76
|
+
}
|
|
77
|
+
)}
|
|
71
78
|
{...rest}
|
|
72
79
|
>
|
|
73
80
|
{title != null ? (
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@layer infonomic-base,
|
|
2
|
-
infonomic-functional,
|
|
3
|
-
infonomic-utilities,
|
|
4
|
-
infonomic-theme,
|
|
5
|
-
infonomic-typography,
|
|
6
|
-
infonomic-components;
|
|
2
|
+
infonomic-functional,
|
|
3
|
+
infonomic-utilities,
|
|
4
|
+
infonomic-theme,
|
|
5
|
+
infonomic-typography,
|
|
6
|
+
infonomic-components;
|
|
7
7
|
|
|
8
8
|
@layer infonomic-components {
|
|
9
9
|
/* Positions are relative to the toast viewport which is set
|
|
@@ -27,7 +27,6 @@ infonomic-components;
|
|
|
27
27
|
|
|
28
28
|
:global(.dark),
|
|
29
29
|
:global([data-theme="dark"]) {
|
|
30
|
-
|
|
31
30
|
.root,
|
|
32
31
|
:global(.infonomic-toast-root) {
|
|
33
32
|
background: var(--canvas-800);
|
|
@@ -156,7 +155,6 @@ infonomic-components;
|
|
|
156
155
|
}
|
|
157
156
|
|
|
158
157
|
@media (min-width: 48rem) {
|
|
159
|
-
|
|
160
158
|
.root.top-right[data-state="open"],
|
|
161
159
|
.root.bottom-right[data-state="open"],
|
|
162
160
|
:global(.infonomic-toast-root.top-right[data-state="open"]),
|
|
@@ -269,4 +267,4 @@ infonomic-components;
|
|
|
269
267
|
opacity: 0;
|
|
270
268
|
}
|
|
271
269
|
}
|
|
272
|
-
}
|
|
270
|
+
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
@layer infonomic-base,
|
|
1
|
+
@layer infonomic-base,
|
|
2
|
+
infonomic-utilities,
|
|
3
|
+
infonomic-theme,
|
|
4
|
+
infonomic-typography,
|
|
5
|
+
infonomic-components;
|
|
2
6
|
|
|
3
7
|
@layer infonomic-components {
|
|
4
|
-
|
|
5
8
|
.overlay,
|
|
6
9
|
:global(.infonomic-overlay) {
|
|
7
10
|
position: fixed;
|
|
@@ -15,7 +18,6 @@
|
|
|
15
18
|
|
|
16
19
|
:global(.dark),
|
|
17
20
|
:global([data-theme="dark"]) {
|
|
18
|
-
|
|
19
21
|
.overlay,
|
|
20
22
|
:global(.infonomic-overlay) {
|
|
21
23
|
background-color: rgba(0, 0, 0, 0.5);
|
|
@@ -51,4 +53,4 @@
|
|
|
51
53
|
opacity: 0;
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
|
-
}
|
|
56
|
+
}
|
|
@@ -1,2 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Available layout variants for the Pagination component.
|
|
3
|
+
*/
|
|
1
4
|
export const variant = ['default', 'classic', 'dashboard'] as const
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Layout variant of the pagination control.
|
|
8
|
+
*
|
|
9
|
+
* - `default` — numbered page buttons with previous/next arrows (default)
|
|
10
|
+
* - `classic` — previous/next arrows with a direct page number input
|
|
11
|
+
* - `dashboard` — compact variant optimised for data tables and dashboards
|
|
12
|
+
*
|
|
13
|
+
* @default 'default'
|
|
14
|
+
*/
|
|
2
15
|
export type Variant = (typeof variant)[number]
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
@layer infonomic-base,
|
|
2
|
-
infonomic-functional,
|
|
3
|
-
infonomic-utilities,
|
|
4
|
-
infonomic-theme,
|
|
5
|
-
infonomic-typography,
|
|
6
|
-
infonomic-components;
|
|
2
|
+
infonomic-functional,
|
|
3
|
+
infonomic-utilities,
|
|
4
|
+
infonomic-theme,
|
|
5
|
+
infonomic-typography,
|
|
6
|
+
infonomic-components;
|
|
7
7
|
|
|
8
8
|
@layer infonomic-components {
|
|
9
|
-
|
|
10
9
|
.pagination-root,
|
|
11
10
|
:global(.infonomic-pagination-root) {
|
|
12
11
|
display: flex;
|
|
@@ -141,7 +140,6 @@ infonomic-components;
|
|
|
141
140
|
*/
|
|
142
141
|
:global(.dark),
|
|
143
142
|
:global([data-theme="dark"]) {
|
|
144
|
-
|
|
145
143
|
.ellipses,
|
|
146
144
|
.number-button,
|
|
147
145
|
.next-button,
|
|
@@ -151,4 +149,4 @@ infonomic-components;
|
|
|
151
149
|
border-color: var(--canvas-700);
|
|
152
150
|
}
|
|
153
151
|
}
|
|
154
|
-
}
|
|
152
|
+
}
|
|
@@ -237,7 +237,12 @@ const Root = ({
|
|
|
237
237
|
<nav
|
|
238
238
|
data-testid={dataTestId}
|
|
239
239
|
ref={ref}
|
|
240
|
-
className={cx(
|
|
240
|
+
className={cx(
|
|
241
|
+
'infonomic-pagination-root',
|
|
242
|
+
styles['pagination-root'],
|
|
243
|
+
'pagination-root',
|
|
244
|
+
className
|
|
245
|
+
)}
|
|
241
246
|
{...rest}
|
|
242
247
|
aria-label={ariaLabel ?? 'Pager navigation'}
|
|
243
248
|
>
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
@layer infonomic-base,
|
|
2
|
-
infonomic-functional,
|
|
3
|
-
infonomic-utilities,
|
|
4
|
-
infonomic-theme,
|
|
5
|
-
infonomic-typography,
|
|
6
|
-
infonomic-components;
|
|
2
|
+
infonomic-functional,
|
|
3
|
+
infonomic-utilities,
|
|
4
|
+
infonomic-theme,
|
|
5
|
+
infonomic-typography,
|
|
6
|
+
infonomic-components;
|
|
7
7
|
|
|
8
8
|
@layer infonomic-components {
|
|
9
|
-
|
|
10
9
|
.root,
|
|
11
10
|
:global(.infonomic-scroll-area) {
|
|
12
11
|
border-radius: 4px;
|
|
@@ -72,4 +71,4 @@ infonomic-components;
|
|
|
72
71
|
:global(.infonomic-scroll-area-corner) {
|
|
73
72
|
background: var(--surface-panel-scrollbar);
|
|
74
73
|
}
|
|
75
|
-
}
|
|
74
|
+
}
|
|
@@ -5,17 +5,26 @@ import { ScrollArea as ScrollAreaPrimitive } from 'radix-ui'
|
|
|
5
5
|
|
|
6
6
|
import styles from './scroll-area.module.css'
|
|
7
7
|
|
|
8
|
-
interface ScrollAreaProps extends React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> {
|
|
8
|
+
interface ScrollAreaProps extends React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> {}
|
|
9
9
|
|
|
10
10
|
export const ScrollArea = ({ children, style, className }: ScrollAreaProps) => (
|
|
11
|
-
<ScrollAreaPrimitive.Root
|
|
11
|
+
<ScrollAreaPrimitive.Root
|
|
12
|
+
style={style}
|
|
13
|
+
className={cx('infonomic-scroll-area', styles.root, className)}
|
|
14
|
+
>
|
|
12
15
|
<ScrollAreaPrimitive.Viewport className={cx('infonomic-scroll-area-viewport', styles.viewport)}>
|
|
13
16
|
{children}
|
|
14
17
|
</ScrollAreaPrimitive.Viewport>
|
|
15
|
-
<ScrollAreaPrimitive.Scrollbar
|
|
18
|
+
<ScrollAreaPrimitive.Scrollbar
|
|
19
|
+
className={cx('infonomic-scroll-area-scrollbar', styles.scrollbar)}
|
|
20
|
+
orientation="vertical"
|
|
21
|
+
>
|
|
16
22
|
<ScrollAreaPrimitive.Thumb className={cx('infonomic-scroll-area-thumb', styles.thumb)} />
|
|
17
23
|
</ScrollAreaPrimitive.Scrollbar>
|
|
18
|
-
<ScrollAreaPrimitive.Scrollbar
|
|
24
|
+
<ScrollAreaPrimitive.Scrollbar
|
|
25
|
+
className={cx('infonomic-scroll-area-scrollbar', styles.scrollbar)}
|
|
26
|
+
orientation="horizontal"
|
|
27
|
+
>
|
|
19
28
|
<ScrollAreaPrimitive.Thumb className={cx('infonomic-scroll-area-thumb', styles.thumb)} />
|
|
20
29
|
</ScrollAreaPrimitive.Scrollbar>
|
|
21
30
|
<ScrollAreaPrimitive.Corner className={cx('infonomic-scroll-area-corner', styles.corner)} />
|