@infonomic/uikit 2.14.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -6
- package/dist/components/badge/badge_module.css +49 -80
- package/dist/components/button/button_module.css +133 -227
- package/dist/components/button/control-buttons_module.css +2 -11
- package/dist/components/button/copy-button.d.ts.map +1 -1
- package/dist/components/button/copy-button.js +14 -7
- package/dist/components/button/copy-button.module.js +5 -5
- package/dist/components/button/copy-button_module.css +31 -12
- package/dist/components/calendar/calendar.js +6 -6
- package/dist/components/input/checkbox-group.js +1 -1
- package/dist/components/input/checkbox.js +1 -1
- package/dist/components/input/checkbox_module.css +42 -91
- package/dist/components/input/errors.js +2 -3
- package/dist/components/input/input.js +1 -1
- package/dist/components/input/input_module.css +42 -109
- package/dist/components/input/radio-group_module.css +14 -49
- package/dist/components/input/select.js +1 -1
- package/dist/components/input/text-area.js +1 -1
- package/dist/components/input/utils.js +3 -4
- package/dist/components/notifications/alert_module.css +0 -4
- package/dist/components/overlay/overlay.js +1 -1
- package/dist/icons/close-icon.js +1 -1
- package/dist/icons/copy-icon.d.ts.map +1 -1
- package/dist/icons/copy-icon.js +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +1 -1
- package/dist/styles/styles.css +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/findMatch.js +3 -3
- package/dist/utils/isTouchDevice.js +3 -3
- package/dist/utils/to-kebab-case.js +1 -4
- package/dist/widgets/datepicker/datepicker.js +1 -1
- package/dist/widgets/drawer/drawer.js +1 -1
- package/dist/widgets/modal/modal.js +1 -1
- package/dist/widgets/search/search.js +1 -1
- package/dist/widgets/timeline/timeline.d.ts.map +1 -0
- package/dist/widgets/timeline/timeline.module.js +17 -0
- package/dist/{components → widgets}/timeline/timeline_module.css +10 -10
- package/package.json +30 -30
- package/src/components/badge/badge.module.css +38 -68
- package/src/components/button/button-intents.stories.tsx +1 -1
- package/src/components/button/button-overrides.stories.tsx +43 -0
- package/src/components/button/button-variants.stories.tsx +1 -1
- package/src/components/button/button.module.css +135 -230
- package/src/components/button/control-buttons.module.css +5 -17
- package/src/components/button/control-buttons.stories.tsx +1 -1
- package/src/components/button/copy-button.module.css +32 -14
- package/src/components/button/copy-button.stories.tsx +6 -6
- package/src/components/button/copy-button.tsx +16 -12
- package/src/components/calendar/calendar.stories.tsx +1 -1
- package/src/components/input/checkbox.module.css +43 -99
- package/src/components/input/input.module.css +44 -119
- package/src/components/input/input.stories.tsx +1 -1
- package/src/components/input/radio-group.module.css +16 -72
- package/src/components/input/radio-group.stories.tsx +1 -1
- package/src/components/input/select.stories.tsx +1 -1
- package/src/components/notifications/alert.module.css +0 -4
- package/src/components/overlay/overlay.tsx +1 -1
- package/src/icons/close-icon.tsx +1 -1
- package/src/icons/copy-icon.tsx +1 -2
- package/src/icons/icons.module.css +1 -0
- package/src/react.ts +1 -1
- package/src/styles/theme/theme.css +6 -4
- package/src/styles/theme/tokens.css +600 -0
- package/src/widgets/drawer/drawer.stories.tsx +1 -34
- package/src/{components → widgets}/timeline/timeline.stories.tsx +2 -2
- package/dist/components/timeline/timeline.d.ts.map +0 -1
- package/dist/components/timeline/timeline.module.js +0 -17
- /package/dist/{components → widgets}/timeline/timeline.d.ts +0 -0
- /package/dist/{components → widgets}/timeline/timeline.js +0 -0
- /package/src/components/button/{button-icon.stories.tsx → icon-button.stories.tsx} +0 -0
- /package/src/{components → widgets}/timeline/timeline.module.css +0 -0
- /package/src/{components → widgets}/timeline/timeline.tsx +0 -0
|
@@ -4,9 +4,9 @@ import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
|
4
4
|
|
|
5
5
|
import { intent } from '../@types/shared.js'
|
|
6
6
|
import { variant } from './@types/button.js'
|
|
7
|
-
import { CopyButton } from './copy-button.js'
|
|
7
|
+
import { CopyButton as CopyButtonComponent } from './copy-button.js'
|
|
8
8
|
|
|
9
|
-
type Story = StoryObj<typeof
|
|
9
|
+
type Story = StoryObj<typeof CopyButtonComponent>
|
|
10
10
|
|
|
11
11
|
const CopyDemo = (): React.JSX.Element => {
|
|
12
12
|
return (
|
|
@@ -19,7 +19,7 @@ const CopyDemo = (): React.JSX.Element => {
|
|
|
19
19
|
>
|
|
20
20
|
{variant.map((v) => {
|
|
21
21
|
return (
|
|
22
|
-
<
|
|
22
|
+
<CopyButtonComponent
|
|
23
23
|
text="I should be in your clipboard."
|
|
24
24
|
key={`${i}-${v}`}
|
|
25
25
|
intent={i}
|
|
@@ -34,17 +34,17 @@ const CopyDemo = (): React.JSX.Element => {
|
|
|
34
34
|
)
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
export const
|
|
37
|
+
export const CopyButtons: Story = {
|
|
38
38
|
render: () => <CopyDemo />,
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
const meta: Meta<typeof
|
|
41
|
+
const meta: Meta<typeof CopyButtonComponent> = {
|
|
42
42
|
/* 👇 The title prop is optional.
|
|
43
43
|
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
|
|
44
44
|
* to learn how to generate automatic titles
|
|
45
45
|
*/
|
|
46
46
|
title: 'Components/Button',
|
|
47
|
-
component:
|
|
47
|
+
component: CopyButtonComponent,
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
export default meta
|
|
@@ -4,7 +4,6 @@ import cx from 'classnames'
|
|
|
4
4
|
import type React from 'react'
|
|
5
5
|
import { useEffect, useState } from 'react'
|
|
6
6
|
|
|
7
|
-
import { CopyIcon } from '../../icons'
|
|
8
7
|
import { Tooltip } from '../tooltip/tooltip.js'
|
|
9
8
|
import type { ButtonProps } from './button.js'
|
|
10
9
|
import { Button } from './button.js'
|
|
@@ -60,15 +59,6 @@ export function CopyButton({
|
|
|
60
59
|
}
|
|
61
60
|
})
|
|
62
61
|
|
|
63
|
-
const svgColor =
|
|
64
|
-
intent === 'noeffect' ||
|
|
65
|
-
intent === 'secondary' ||
|
|
66
|
-
intent === 'warning' ||
|
|
67
|
-
variant === 'outlined' ||
|
|
68
|
-
variant === 'text'
|
|
69
|
-
? styles['copy-button-foreground']
|
|
70
|
-
: styles['copy-button-foreground-reversed']
|
|
71
|
-
|
|
72
62
|
const tooltipText = copied != null && copied ? copiedText : hoverText
|
|
73
63
|
|
|
74
64
|
return (
|
|
@@ -80,11 +70,25 @@ export function CopyButton({
|
|
|
80
70
|
intent={intent}
|
|
81
71
|
fullWidth={fullWidth}
|
|
82
72
|
ripple={ripple}
|
|
83
|
-
className={cx('copy-button', variant, size, intent, styles[
|
|
73
|
+
className={cx('copy-button', variant, size, intent, styles[size], className)}
|
|
84
74
|
onClick={handleCopied}
|
|
85
75
|
{...rest}
|
|
86
76
|
>
|
|
87
|
-
<
|
|
77
|
+
<svg
|
|
78
|
+
className={svgClassName}
|
|
79
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
80
|
+
focusable="false"
|
|
81
|
+
aria-hidden="true"
|
|
82
|
+
viewBox="0 0 15 15"
|
|
83
|
+
strokeWidth="0"
|
|
84
|
+
>
|
|
85
|
+
<path
|
|
86
|
+
d="M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z"
|
|
87
|
+
fill="currentColor"
|
|
88
|
+
fillRule="evenodd"
|
|
89
|
+
clipRule="evenodd"
|
|
90
|
+
/>
|
|
91
|
+
</svg>
|
|
88
92
|
</Button>
|
|
89
93
|
</Tooltip>
|
|
90
94
|
</div>
|
|
@@ -10,7 +10,7 @@ const meta: Meta<typeof CalendarComponent> = {
|
|
|
10
10
|
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
|
|
11
11
|
* to learn how to generate automatic titles
|
|
12
12
|
*/
|
|
13
|
-
title: 'Components/Calendar',
|
|
13
|
+
title: 'Components/Input/Calendar',
|
|
14
14
|
component: CalendarComponent,
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -109,125 +109,69 @@
|
|
|
109
109
|
|
|
110
110
|
/* Intents */
|
|
111
111
|
.primary {
|
|
112
|
-
--checkbox-variant-outlined-border: var(--primary-
|
|
113
|
-
--checkbox-variant-outlined: var(--primary-
|
|
114
|
-
--checkbox-variant-outlined-hover-border: var(--primary-
|
|
115
|
-
--checkbox-variant-outline-ring-color: var(--primary
|
|
116
|
-
--checkbox-variant-filled: var(--primary-
|
|
112
|
+
--checkbox-variant-outlined-border: var(--fill-primary-strong);
|
|
113
|
+
--checkbox-variant-outlined: var(--fill-primary-strong);
|
|
114
|
+
--checkbox-variant-outlined-hover-border: var(--fill-primary-strong-hover);
|
|
115
|
+
--checkbox-variant-outline-ring-color: var(--ring-primary);
|
|
116
|
+
--checkbox-variant-filled: var(--fill-primary-strong);
|
|
117
|
+
--checkbox-icon-color: var(--text-on-primary);
|
|
117
118
|
}
|
|
118
119
|
|
|
119
120
|
.secondary {
|
|
120
|
-
--checkbox-variant-outlined-border: var(--secondary-
|
|
121
|
-
--checkbox-variant-outlined: var(--secondary-
|
|
122
|
-
--checkbox-variant-outlined-hover-border: var(--secondary-
|
|
123
|
-
--checkbox-variant-outline-ring-color: var(--secondary
|
|
124
|
-
--checkbox-variant-filled: var(--secondary-
|
|
121
|
+
--checkbox-variant-outlined-border: var(--fill-secondary-strong);
|
|
122
|
+
--checkbox-variant-outlined: var(--fill-secondary-strong);
|
|
123
|
+
--checkbox-variant-outlined-hover-border: var(--fill-secondary-strong-hover);
|
|
124
|
+
--checkbox-variant-outline-ring-color: var(--ring-secondary);
|
|
125
|
+
--checkbox-variant-filled: var(--fill-secondary-strong);
|
|
126
|
+
--checkbox-icon-color: var(--text-on-secondary);
|
|
125
127
|
}
|
|
126
128
|
|
|
127
129
|
.noeffect {
|
|
128
|
-
--checkbox-variant-outlined-border: var(--
|
|
129
|
-
--checkbox-variant-outlined: var(--
|
|
130
|
-
--checkbox-variant-outlined-hover-border: var(--
|
|
131
|
-
--checkbox-variant-outline-ring-color: var(--
|
|
132
|
-
--checkbox-variant-filled: var(--
|
|
130
|
+
--checkbox-variant-outlined-border: var(--fill-noeffect-strong);
|
|
131
|
+
--checkbox-variant-outlined: var(--fill-noeffect-strong);
|
|
132
|
+
--checkbox-variant-outlined-hover-border: var(--fill-noeffect-strong-hover);
|
|
133
|
+
--checkbox-variant-outline-ring-color: var(--ring-noeffect);
|
|
134
|
+
--checkbox-variant-filled: var(--fill-noeffect-strong);
|
|
135
|
+
--checkbox-icon-color: var(--text-on-noeffect);
|
|
133
136
|
}
|
|
134
137
|
|
|
135
138
|
.success {
|
|
136
|
-
--checkbox-variant-outlined-border: var(--
|
|
137
|
-
--checkbox-variant-outlined: var(--
|
|
138
|
-
--checkbox-variant-outlined-hover-border: var(--
|
|
139
|
-
--checkbox-variant-outline-ring-color: var(--
|
|
140
|
-
--checkbox-variant-filled: var(--
|
|
139
|
+
--checkbox-variant-outlined-border: var(--fill-success-strong);
|
|
140
|
+
--checkbox-variant-outlined: var(--fill-success-strong);
|
|
141
|
+
--checkbox-variant-outlined-hover-border: var(--fill-success-strong-hover);
|
|
142
|
+
--checkbox-variant-outline-ring-color: var(--ring-success);
|
|
143
|
+
--checkbox-variant-filled: var(--fill-success-strong);
|
|
144
|
+
--checkbox-icon-color: var(--text-on-success);
|
|
141
145
|
}
|
|
142
146
|
|
|
143
147
|
.info {
|
|
144
|
-
--checkbox-variant-outlined-border: var(--
|
|
145
|
-
--checkbox-variant-outlined: var(--
|
|
146
|
-
--checkbox-variant-outlined-hover-border: var(--
|
|
147
|
-
--checkbox-variant-outline-ring-color: var(--
|
|
148
|
-
--checkbox-variant-filled: var(--
|
|
148
|
+
--checkbox-variant-outlined-border: var(--fill-info-strong);
|
|
149
|
+
--checkbox-variant-outlined: var(--fill-info-strong);
|
|
150
|
+
--checkbox-variant-outlined-hover-border: var(--fill-info-strong-hover);
|
|
151
|
+
--checkbox-variant-outline-ring-color: var(--ring-info);
|
|
152
|
+
--checkbox-variant-filled: var(--fill-info-strong);
|
|
153
|
+
--checkbox-icon-color: var(--text-on-info);
|
|
149
154
|
}
|
|
150
155
|
|
|
151
156
|
.warning {
|
|
152
|
-
--checkbox-variant-outlined-border: var(--
|
|
153
|
-
--checkbox-variant-outlined: var(--
|
|
154
|
-
--checkbox-variant-outlined-hover-border: var(--
|
|
155
|
-
--checkbox-variant-outline-ring-color: var(--
|
|
156
|
-
--checkbox-variant-filled: var(--
|
|
157
|
+
--checkbox-variant-outlined-border: var(--fill-warning-strong);
|
|
158
|
+
--checkbox-variant-outlined: var(--fill-warning-strong);
|
|
159
|
+
--checkbox-variant-outlined-hover-border: var(--fill-warning-strong-hover);
|
|
160
|
+
--checkbox-variant-outline-ring-color: var(--ring-warning);
|
|
161
|
+
--checkbox-variant-filled: var(--fill-warning-strong);
|
|
162
|
+
--checkbox-icon-color: var(--text-on-warning);
|
|
157
163
|
}
|
|
158
164
|
|
|
159
165
|
.danger {
|
|
160
|
-
--checkbox-variant-outlined-border: var(--
|
|
161
|
-
--checkbox-variant-outlined: var(--
|
|
162
|
-
--checkbox-variant-outlined-hover-border: var(--
|
|
163
|
-
--checkbox-variant-outline-ring-color: var(--
|
|
164
|
-
--checkbox-variant-filled: var(--
|
|
166
|
+
--checkbox-variant-outlined-border: var(--fill-danger-strong);
|
|
167
|
+
--checkbox-variant-outlined: var(--fill-danger-strong);
|
|
168
|
+
--checkbox-variant-outlined-hover-border: var(--fill-danger-strong-hover);
|
|
169
|
+
--checkbox-variant-outline-ring-color: var(--ring-danger);
|
|
170
|
+
--checkbox-variant-filled: var(--fill-danger-strong);
|
|
171
|
+
--checkbox-icon-color: var(--text-on-danger);
|
|
165
172
|
}
|
|
166
173
|
|
|
167
|
-
/*
|
|
168
|
-
* consuming application to detect a user's preferred
|
|
169
|
-
* color scheme - either by header or cookie, and set
|
|
170
|
-
* a root html class accordingly
|
|
171
|
-
*/
|
|
172
|
-
:global(.dark) {
|
|
173
|
-
|
|
174
|
-
/* Intents */
|
|
175
|
-
.primary:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
176
|
-
--checkbox-variant-outlined-border: var(--primary-300);
|
|
177
|
-
--checkbox-variant-outlined: var(--primary-300);
|
|
178
|
-
--checkbox-variant-outlined-hover-border: var(--primary-500);
|
|
179
|
-
--checkbox-variant-outline-ring-color: var(--primary-300);
|
|
180
|
-
--checkbox-variant-filled: var(--primary-500);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.secondary:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
184
|
-
--checkbox-variant-outlined-border: var(--secondary-500);
|
|
185
|
-
--checkbox-variant-outlined: var(--secondary-500);
|
|
186
|
-
--checkbox-variant-outlined-hover-border: var(--secondary-500);
|
|
187
|
-
--checkbox-variant-outline-ring-color: var(--secondary-500);
|
|
188
|
-
--checkbox-variant-filled: var(--secondary-500);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.noeffect:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
192
|
-
--checkbox-variant-outlined-border: var(--gray-400);
|
|
193
|
-
--checkbox-variant-outlined: var(--gray-400);
|
|
194
|
-
--checkbox-variant-outlined-hover-border: var(--gray-400);
|
|
195
|
-
--checkbox-variant-outline-ring-color: var(--gray-400);
|
|
196
|
-
--checkbox-variant-filled: var(--gray-400);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.success:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
200
|
-
--checkbox-variant-outlined-border: var(--green-400);
|
|
201
|
-
--checkbox-variant-outlined: var(--green-400);
|
|
202
|
-
--checkbox-variant-outlined-hover-border: var(--green-400);
|
|
203
|
-
--checkbox-variant-outline-ring-color: var(--green-400);
|
|
204
|
-
--checkbox-variant-filled: var(--green-400);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.info:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
208
|
-
--checkbox-variant-outlined-border: var(--blue-400);
|
|
209
|
-
--checkbox-variant-outlined: var(--blue-400);
|
|
210
|
-
--checkbox-variant-outlined-hover-border: var(--blue-400);
|
|
211
|
-
--checkbox-variant-outline-ring-color: var(--blue-400);
|
|
212
|
-
--checkbox-variant-filled: var(--blue-400);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.warning:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
216
|
-
--checkbox-variant-outlined-border: var(--yellow-400);
|
|
217
|
-
--checkbox-variant-outlined: var(--yellow-400);
|
|
218
|
-
--checkbox-variant-outlined-hover-border: var(--yellow-400);
|
|
219
|
-
--checkbox-variant-outline-ring-color: var(--yellow-400);
|
|
220
|
-
--checkbox-variant-filled: var(--yellow-400);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.danger:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
224
|
-
--checkbox-variant-outlined-border: var(--red-400);
|
|
225
|
-
--checkbox-variant-outlined: var(--red-400);
|
|
226
|
-
--checkbox-variant-outlined-hover-border: var(--red-400);
|
|
227
|
-
--checkbox-variant-outline-ring-color: var(--red-400);
|
|
228
|
-
--checkbox-variant-filled: var(--red-400);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
174
|
+
/* Dark mode handled by semantic tokens in theme layer */
|
|
231
175
|
|
|
232
176
|
@keyframes checkBoxIn {
|
|
233
177
|
0% {
|
|
@@ -169,142 +169,67 @@
|
|
|
169
169
|
|
|
170
170
|
/* Intents */
|
|
171
171
|
.primary {
|
|
172
|
-
--input-variant-outlined-border: var(--primary
|
|
173
|
-
--input-variant-outlined-hover-border: var(--primary-
|
|
174
|
-
--input-variant-outline-ring-color: var(--primary
|
|
175
|
-
--input-variant-underlined-border: var(--primary
|
|
176
|
-
--input-variant-underlined-hover-border: var(--primary-
|
|
177
|
-
--input-variant-filled: var(--
|
|
172
|
+
--input-variant-outlined-border: var(--stroke-primary);
|
|
173
|
+
--input-variant-outlined-hover-border: var(--stroke-primary-hover);
|
|
174
|
+
--input-variant-outline-ring-color: var(--ring-primary);
|
|
175
|
+
--input-variant-underlined-border: var(--stroke-primary);
|
|
176
|
+
--input-variant-underlined-hover-border: var(--stroke-primary-hover);
|
|
177
|
+
--input-variant-filled: var(--fill-primary-weak);
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
.secondary {
|
|
181
|
-
--input-variant-outlined-border: var(--secondary
|
|
182
|
-
--input-variant-outlined-hover-border: var(--secondary-
|
|
183
|
-
--input-variant-outline-ring-color: var(--secondary
|
|
184
|
-
--input-variant-underlined-border: var(--secondary
|
|
185
|
-
--input-variant-underlined-hover-border: var(--secondary-
|
|
186
|
-
--input-variant-filled: var(--
|
|
181
|
+
--input-variant-outlined-border: var(--stroke-secondary);
|
|
182
|
+
--input-variant-outlined-hover-border: var(--stroke-secondary-hover);
|
|
183
|
+
--input-variant-outline-ring-color: var(--ring-secondary);
|
|
184
|
+
--input-variant-underlined-border: var(--stroke-secondary);
|
|
185
|
+
--input-variant-underlined-hover-border: var(--stroke-secondary-hover);
|
|
186
|
+
--input-variant-filled: var(--fill-secondary-weak);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
.noeffect {
|
|
190
|
-
--input-variant-outlined-border: var(--
|
|
191
|
-
--input-variant-outlined-hover-border: var(--
|
|
192
|
-
--input-variant-outline-ring-color: var(--
|
|
193
|
-
--input-variant-underlined-border: var(--
|
|
194
|
-
--input-variant-underlined-hover-border: var(--
|
|
195
|
-
--input-variant-filled: var(--
|
|
190
|
+
--input-variant-outlined-border: var(--stroke-noeffect);
|
|
191
|
+
--input-variant-outlined-hover-border: var(--stroke-noeffect-hover);
|
|
192
|
+
--input-variant-outline-ring-color: var(--ring-noeffect);
|
|
193
|
+
--input-variant-underlined-border: var(--stroke-noeffect);
|
|
194
|
+
--input-variant-underlined-hover-border: var(--stroke-noeffect-hover);
|
|
195
|
+
--input-variant-filled: var(--fill-noeffect-weak);
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
.success {
|
|
199
|
-
--input-variant-outlined-border: var(--
|
|
200
|
-
--input-variant-outlined-hover-border: var(--
|
|
201
|
-
--input-variant-outline-ring-color: var(--
|
|
202
|
-
--input-variant-underlined-border: var(--
|
|
203
|
-
--input-variant-underlined-hover-border: var(--
|
|
204
|
-
--input-variant-filled: var(--
|
|
199
|
+
--input-variant-outlined-border: var(--stroke-success);
|
|
200
|
+
--input-variant-outlined-hover-border: var(--stroke-success-hover);
|
|
201
|
+
--input-variant-outline-ring-color: var(--ring-success);
|
|
202
|
+
--input-variant-underlined-border: var(--stroke-success);
|
|
203
|
+
--input-variant-underlined-hover-border: var(--stroke-success-hover);
|
|
204
|
+
--input-variant-filled: var(--fill-success-weak);
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
.info {
|
|
208
|
-
--input-variant-outlined-border: var(--
|
|
209
|
-
--input-variant-outlined-hover-border: var(--
|
|
210
|
-
--input-variant-outline-ring-color: var(--
|
|
211
|
-
--input-variant-underlined-border: var(--
|
|
212
|
-
--input-variant-underlined-hover-border: var(--
|
|
213
|
-
--input-variant-filled: var(--
|
|
208
|
+
--input-variant-outlined-border: var(--stroke-info);
|
|
209
|
+
--input-variant-outlined-hover-border: var(--stroke-info-hover);
|
|
210
|
+
--input-variant-outline-ring-color: var(--ring-info);
|
|
211
|
+
--input-variant-underlined-border: var(--stroke-info);
|
|
212
|
+
--input-variant-underlined-hover-border: var(--stroke-info-hover);
|
|
213
|
+
--input-variant-filled: var(--fill-info-weak);
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
.warning {
|
|
217
|
-
--input-variant-outlined-border: var(--
|
|
218
|
-
--input-variant-outlined-hover-border: var(--
|
|
219
|
-
--input-variant-outline-ring-color: var(--
|
|
220
|
-
--input-variant-underlined-border: var(--
|
|
221
|
-
--input-variant-underlined-hover-border: var(--
|
|
222
|
-
--input-variant-filled: var(--
|
|
217
|
+
--input-variant-outlined-border: var(--stroke-warning);
|
|
218
|
+
--input-variant-outlined-hover-border: var(--stroke-warning-hover);
|
|
219
|
+
--input-variant-outline-ring-color: var(--ring-warning);
|
|
220
|
+
--input-variant-underlined-border: var(--stroke-warning);
|
|
221
|
+
--input-variant-underlined-hover-border: var(--stroke-warning-hover);
|
|
222
|
+
--input-variant-filled: var(--fill-warning-weak);
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
.danger {
|
|
226
|
-
--input-variant-outlined-border: var(--
|
|
227
|
-
--input-variant-outlined-hover-border: var(--
|
|
228
|
-
--input-variant-outline-ring-color: var(--
|
|
229
|
-
--input-variant-underlined-border: var(--
|
|
230
|
-
--input-variant-underlined-hover-border: var(--
|
|
231
|
-
--input-variant-filled: var(--
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/* 🌙 Dark via `.dark` class. We rely on the
|
|
235
|
-
* consuming application to detect a user's preferred
|
|
236
|
-
* color scheme - either by header or cookie, and set
|
|
237
|
-
* a root html class accordingly
|
|
238
|
-
*/
|
|
239
|
-
:global(.dark) {
|
|
240
|
-
|
|
241
|
-
.input:focus:not(:where([class~="not-dark"], [class~="not-dark"] *)),
|
|
242
|
-
.input:active:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
243
|
-
--ring-offset-color: var(--background);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
/* Intents */
|
|
247
|
-
.primary:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
248
|
-
--input-variant-outlined-border: var(--primary-200);
|
|
249
|
-
--input-variant-outlined-hover-border: var(--primary-100);
|
|
250
|
-
--input-variant-outline-ring-color: var(--primary-200);
|
|
251
|
-
--input-variant-underlined-border: var(--primary-200);
|
|
252
|
-
--input-variant-underlined-hover-border: var(--primary-100);
|
|
253
|
-
--input-variant-filled: var(--canvas-800);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.secondary:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
257
|
-
--input-variant-outlined-border: var(--secondary-600);
|
|
258
|
-
--input-variant-outlined-hover-border: var(--secondary-400);
|
|
259
|
-
--input-variant-outline-ring-color: var(--secondary-600);
|
|
260
|
-
--input-variant-underlined-border: var(--secondary-600);
|
|
261
|
-
--input-variant-underlined-hover-border: var(--secondary-400);
|
|
262
|
-
--input-variant-filled: var(--canvas-800);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.noeffect:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
266
|
-
--input-variant-outlined-border: var(--gray-500);
|
|
267
|
-
--input-variant-outlined-hover-border: var(--gray-300);
|
|
268
|
-
--input-variant-outline-ring-color: var(--gray-400);
|
|
269
|
-
--input-variant-underlined-border: var(--gray-500);
|
|
270
|
-
--input-variant-underlined-hover-border: var(--gray-300);
|
|
271
|
-
--input-variant-filled: var(--canvas-800);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
.success:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
275
|
-
--input-variant-outlined-border: var(--green-500);
|
|
276
|
-
--input-variant-outlined-hover-border: var(--green-300);
|
|
277
|
-
--input-variant-outline-ring-color: var(--green-400);
|
|
278
|
-
--input-variant-underlined-border: var(--green-500);
|
|
279
|
-
--input-variant-underlined-hover-border: var(--green-300);
|
|
280
|
-
--input-variant-filled: var(--canvas-800);
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
.info:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
284
|
-
--input-variant-outlined-border: var(--blue-500);
|
|
285
|
-
--input-variant-outlined-hover-border: var(--blue-300);
|
|
286
|
-
--input-variant-outline-ring-color: var(--blue-400);
|
|
287
|
-
--input-variant-underlined-border: var(--blue-500);
|
|
288
|
-
--input-variant-underlined-hover-border: var(--blue-300);
|
|
289
|
-
--input-variant-filled: var(--canvas-800);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
.warning:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
293
|
-
--input-variant-outlined-border: var(--yellow-500);
|
|
294
|
-
--input-variant-outlined-hover-border: var(--yellow-300);
|
|
295
|
-
--input-variant-outline-ring-color: var(--yellow-400);
|
|
296
|
-
--input-variant-underlined-border: var(--yellow-500);
|
|
297
|
-
--input-variant-underlined-hover-border: var(--yellow-300);
|
|
298
|
-
--input-variant-filled: var(--canvas-800);
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.danger:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
302
|
-
--input-variant-outlined-border: var(--red-500);
|
|
303
|
-
--input-variant-outlined-hover-border: var(--red-300);
|
|
304
|
-
--input-variant-outline-ring-color: var(--red-400);
|
|
305
|
-
--input-variant-underlined-border: var(--red-500);
|
|
306
|
-
--input-variant-underlined-hover-border: var(--red-500);
|
|
307
|
-
--input-variant-filled: var(--canvas-800);
|
|
308
|
-
}
|
|
226
|
+
--input-variant-outlined-border: var(--stroke-danger);
|
|
227
|
+
--input-variant-outlined-hover-border: var(--stroke-danger-hover);
|
|
228
|
+
--input-variant-outline-ring-color: var(--ring-danger);
|
|
229
|
+
--input-variant-underlined-border: var(--stroke-danger);
|
|
230
|
+
--input-variant-underlined-hover-border: var(--stroke-danger-hover);
|
|
231
|
+
--input-variant-filled: var(--fill-danger-weak);
|
|
309
232
|
}
|
|
233
|
+
|
|
234
|
+
/* Dark mode handled by semantic tokens in theme layer */
|
|
310
235
|
}
|
|
@@ -89,98 +89,42 @@
|
|
|
89
89
|
|
|
90
90
|
/* Intents */
|
|
91
91
|
.primary {
|
|
92
|
-
--radio-border: var(--primary-
|
|
93
|
-
|
|
94
|
-
--radio-indicator-color: var(--primary-400);
|
|
92
|
+
--radio-border: var(--fill-primary-strong);
|
|
93
|
+
--radio-indicator-color: var(--fill-primary-strong);
|
|
95
94
|
}
|
|
96
95
|
|
|
97
96
|
.secondary {
|
|
98
|
-
--radio-border: var(--secondary-
|
|
99
|
-
|
|
100
|
-
--radio-indicator-color: var(--secondary-400);
|
|
97
|
+
--radio-border: var(--fill-secondary-strong);
|
|
98
|
+
--radio-indicator-color: var(--fill-secondary-strong);
|
|
101
99
|
}
|
|
102
100
|
|
|
103
101
|
.noeffect {
|
|
104
|
-
--radio-border: var(--
|
|
105
|
-
|
|
106
|
-
--radio-indicator-color: var(--gray-400);
|
|
102
|
+
--radio-border: var(--fill-noeffect-strong);
|
|
103
|
+
--radio-indicator-color: var(--fill-noeffect-strong);
|
|
107
104
|
}
|
|
108
105
|
|
|
109
106
|
.success {
|
|
110
|
-
--radio-border: var(--
|
|
111
|
-
|
|
112
|
-
--radio-indicator-color: var(--green-400);
|
|
107
|
+
--radio-border: var(--fill-success-strong);
|
|
108
|
+
--radio-indicator-color: var(--fill-success-strong);
|
|
113
109
|
}
|
|
114
110
|
|
|
115
111
|
.info {
|
|
116
|
-
--radio-border: var(--
|
|
117
|
-
|
|
118
|
-
--radio-indicator-color: var(--blue-400);
|
|
112
|
+
--radio-border: var(--fill-info-strong);
|
|
113
|
+
--radio-indicator-color: var(--fill-info-strong);
|
|
119
114
|
}
|
|
120
115
|
|
|
121
116
|
.warning {
|
|
122
|
-
--radio-border: var(--
|
|
123
|
-
|
|
124
|
-
--radio-indicator-color: var(--yellow-400);
|
|
117
|
+
--radio-border: var(--fill-warning-strong);
|
|
118
|
+
--radio-indicator-color: var(--fill-warning-strong);
|
|
125
119
|
}
|
|
126
120
|
|
|
127
121
|
.danger {
|
|
128
|
-
--radio-border: var(--
|
|
129
|
-
|
|
130
|
-
--radio-indicator-color: var(--red-400);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/* 🌙 Dark via `.dark` class. We rely on the
|
|
134
|
-
* consuming application to detect a user's preferred
|
|
135
|
-
* color scheme - either by header or cookie, and set
|
|
136
|
-
* a root html class accordingly
|
|
137
|
-
*/
|
|
138
|
-
:global(.dark) {
|
|
139
|
-
|
|
140
|
-
/* Intents */
|
|
141
|
-
.primary:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
142
|
-
--radio-border: var(--primary-300);
|
|
143
|
-
/* --ring-color: var(--primary-400); */
|
|
144
|
-
--radio-indicator-color: var(--primary-300);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.secondary:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
148
|
-
--radio-border: var(--secondary-500);
|
|
149
|
-
/* --ring-color: var(--secondary-400); */
|
|
150
|
-
--radio-indicator-color: var(--secondary-500);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.noeffect:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
154
|
-
---radio-border: var(--gray-400);
|
|
155
|
-
/* --ring-color: var(--secondary-400); */
|
|
156
|
-
--radio-indicator-color: var(--gray-400);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.success:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
160
|
-
--radio-border: var(--green-400);
|
|
161
|
-
/* --ring-color: var(--secondary-400); */
|
|
162
|
-
--radio-indicator-color: var(--green-400);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.info:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
166
|
-
--radio-border: var(--blue-400);
|
|
167
|
-
/* --ring-color: var(--secondary-400); */
|
|
168
|
-
--radio-indicator-color: var(--blue-400);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.warning:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
172
|
-
--radio-border: var(--yellow-400);
|
|
173
|
-
/* --ring-color: var(--secondary-400); */
|
|
174
|
-
--radio-indicator-color: var(--yellow-400);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.danger:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
178
|
-
--radio-border: var(--red-400);
|
|
179
|
-
/* --ring-color: var(--secondary-400); */
|
|
180
|
-
--radio-indicator-color: var(--red-400);
|
|
181
|
-
}
|
|
122
|
+
--radio-border: var(--fill-danger-strong);
|
|
123
|
+
--radio-indicator-color: var(--fill-danger-strong);
|
|
182
124
|
}
|
|
183
125
|
|
|
126
|
+
/* Dark mode handled by semantic tokens in theme layer */
|
|
127
|
+
|
|
184
128
|
@keyframes radioIn {
|
|
185
129
|
0% {
|
|
186
130
|
opacity: 0;
|
|
@@ -8,7 +8,7 @@ const meta: Meta = {
|
|
|
8
8
|
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
|
|
9
9
|
* to learn how to generate automatic titles
|
|
10
10
|
*/
|
|
11
|
-
title: 'Components/
|
|
11
|
+
title: 'Components/Input',
|
|
12
12
|
component: RadioGroupComponent,
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -38,7 +38,7 @@ const BodyLock = (): null => {
|
|
|
38
38
|
if(appBar != null) appBar.classList.remove('app-bar-overlay-shown')
|
|
39
39
|
if (mediaMatch.matches) {
|
|
40
40
|
classList.remove('overlay-shown--desktop')
|
|
41
|
-
if (appBar != null) appBar.classList.remove('app-bar-overlay-shown app-bar-overlay-shown--desktop')
|
|
41
|
+
if (appBar != null) appBar.classList.remove('app-bar-overlay-shown', 'app-bar-overlay-shown--desktop')
|
|
42
42
|
} else {
|
|
43
43
|
classList.remove('overlay-shown--mobile')
|
|
44
44
|
if (appBar != null) appBar.classList.remove('app-bar-overlay-shown--mobile')
|
package/src/icons/close-icon.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import styles from './icons.module.css'
|
|
|
6
6
|
import type { IconProps } from './types/icon.js'
|
|
7
7
|
|
|
8
8
|
export const CloseIcon = ({ className, svgClassName, ...rest }: IconProps): React.JSX.Element => {
|
|
9
|
-
const applied = cx(styles['fill-
|
|
9
|
+
const applied = cx(styles['fill-current'], svgClassName)
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
12
|
<IconElement className={cx('close-icon', className)} {...rest}>
|
package/src/icons/copy-icon.tsx
CHANGED
|
@@ -9,7 +9,7 @@ import type { IconProps } from './types/icon.js'
|
|
|
9
9
|
import styles from './icons.module.css'
|
|
10
10
|
|
|
11
11
|
export const CopyIcon = ({ className, svgClassName, ...rest }: IconProps): React.JSX.Element => {
|
|
12
|
-
const applied = cx(styles['fill-
|
|
12
|
+
const applied = cx(styles['fill-current'], svgClassName)
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
15
|
<IconElement className={cx('copy-icon', className)} {...rest}>
|
|
@@ -23,7 +23,6 @@ export const CopyIcon = ({ className, svgClassName, ...rest }: IconProps): React
|
|
|
23
23
|
>
|
|
24
24
|
<path
|
|
25
25
|
d="M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z"
|
|
26
|
-
// fill="currentColor"
|
|
27
26
|
fillRule="evenodd"
|
|
28
27
|
clipRule="evenodd"
|
|
29
28
|
/>
|