@infonomic/uikit 3.11.0 → 5.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/dist/components/badge/badge_module.css +8 -8
- package/dist/components/button/button-group_module.css +2 -2
- package/dist/components/button/button_module.css +44 -127
- package/dist/components/button/copy-button_module.css +7 -7
- package/dist/components/card/card.js +6 -6
- package/dist/components/card/card.module.js +12 -6
- package/dist/components/card/card_module.css +10 -10
- package/dist/components/container/container_module.css +4 -4
- package/dist/components/forms/error-text_module.css +2 -6
- package/dist/components/forms/help-text_module.css +1 -1
- package/dist/components/forms/input-adornment_module.css +3 -3
- package/dist/components/forms/input.js +6 -6
- package/dist/components/forms/input.module.js +14 -7
- package/dist/components/forms/input_module.css +71 -32
- package/dist/components/forms/label_module.css +4 -12
- package/dist/components/forms/text-area.js +1 -1
- package/dist/components/forms/text-area_module.css +1 -1
- package/dist/components/section/section_module.css +2 -1
- package/dist/styles/components-vanilla.css +1 -0
- package/dist/styles/styles.css +1 -1
- package/package.json +25 -23
- package/src/components/badge/badge.module.css +16 -8
- package/src/components/button/button-group.module.css +4 -2
- package/src/components/button/button.module.css +136 -143
- package/src/components/button/copy-button.module.css +14 -7
- package/src/components/card/card-content.astro +1 -1
- package/src/components/card/card-description.astro +1 -1
- package/src/components/card/card-footer.astro +1 -1
- package/src/components/card/card-header.astro +1 -1
- package/src/components/card/card-title.astro +1 -1
- package/src/components/card/card.astro +2 -2
- package/src/components/card/card.module.css +20 -10
- package/src/components/card/card.tsx +6 -6
- package/src/components/container/container.module.css +8 -4
- package/src/components/forms/error-text.module.css +3 -13
- package/src/components/forms/help-text.module.css +2 -1
- package/src/components/forms/input-adornment.module.css +6 -3
- package/src/components/forms/input.astro +6 -6
- package/src/components/forms/input.module.css +82 -39
- package/src/components/forms/input.tsx +6 -6
- package/src/components/forms/label.module.css +6 -19
- package/src/components/forms/text-area.module.css +2 -1
- package/src/components/forms/text-area.tsx +1 -1
- package/src/components/section/section.module.css +3 -1
- package/src/styles/functional/colors.css +0 -23
- package/src/styles/functional/surfaces.css +4 -4
- package/src/styles/functional/typography.css +3 -0
- package/src/styles/typography/prose.css +1 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
@layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
|
|
2
2
|
|
|
3
3
|
@layer infonomic-components {
|
|
4
|
-
.card
|
|
4
|
+
.card,
|
|
5
|
+
:global(.card) {
|
|
5
6
|
display: flex;
|
|
6
7
|
flex-direction: column;
|
|
7
8
|
text-decoration: none;
|
|
@@ -16,30 +17,36 @@
|
|
|
16
17
|
box-shadow: var(--shadow-sm)
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
.card:is(:global(.dark) *)
|
|
20
|
+
.card:is(:global(.dark) *),
|
|
21
|
+
:global(.card):is(:global(.dark) *) {
|
|
20
22
|
background: var(--canvas-800);
|
|
21
23
|
}
|
|
22
24
|
|
|
23
|
-
.
|
|
25
|
+
.card-hover,
|
|
26
|
+
:global(.card-hover) {
|
|
24
27
|
transition: background 0.2s ease-in-out;
|
|
25
28
|
}
|
|
26
29
|
|
|
27
|
-
.
|
|
30
|
+
.card-hover:hover,
|
|
31
|
+
:global(.card-hover):hover {
|
|
28
32
|
background: oklch(from var(--theme-50) 1 0.03 h);
|
|
29
33
|
}
|
|
30
34
|
|
|
31
|
-
.
|
|
35
|
+
.card-hover:hover:is(:global(.dark) *),
|
|
36
|
+
:global(.card-hover):hover:is(:global(.dark) *) {
|
|
32
37
|
background: oklch(from var(--canvas-800) 0.2 c h);
|
|
33
38
|
}
|
|
34
39
|
|
|
35
|
-
.
|
|
40
|
+
.card-header,
|
|
41
|
+
:global(.card-header) {
|
|
36
42
|
display: flex;
|
|
37
43
|
flex-direction: column;
|
|
38
44
|
gap: 0.5rem;
|
|
39
45
|
padding: 1rem;
|
|
40
46
|
}
|
|
41
47
|
|
|
42
|
-
.
|
|
48
|
+
.card-title,
|
|
49
|
+
:global(.card-title) {
|
|
43
50
|
color: var(--headings);
|
|
44
51
|
font-size: 1.8rem;
|
|
45
52
|
font-weight: bold;
|
|
@@ -47,18 +54,21 @@
|
|
|
47
54
|
letter-spacing: -0.015em;
|
|
48
55
|
}
|
|
49
56
|
|
|
50
|
-
.
|
|
57
|
+
.card-description,
|
|
58
|
+
:global(.card-description) {
|
|
51
59
|
font-size: 0.875rem;
|
|
52
60
|
color: var(--muted);
|
|
53
61
|
}
|
|
54
62
|
|
|
55
|
-
.
|
|
63
|
+
.card-content,
|
|
64
|
+
:global(.card-content) {
|
|
56
65
|
flex: 1;
|
|
57
66
|
padding: 1rem;
|
|
58
67
|
padding-top: 0;
|
|
59
68
|
}
|
|
60
69
|
|
|
61
|
-
.
|
|
70
|
+
.card-footer,
|
|
71
|
+
:global(.card-footer) {
|
|
62
72
|
display: flex;
|
|
63
73
|
align-items: center;
|
|
64
74
|
padding: 1rem;
|
|
@@ -31,7 +31,7 @@ const Card = <C extends React.ElementType = 'div'>({
|
|
|
31
31
|
...rest
|
|
32
32
|
}: CardProps<C>) => {
|
|
33
33
|
const Comp: React.ElementType = asChild === true ? Slot : 'div'
|
|
34
|
-
const hoverClasses = hover != null && hover === true ? styles
|
|
34
|
+
const hoverClasses = hover != null && hover === true ? styles['card-hover'] : undefined
|
|
35
35
|
const classes = cx(styles.card, hoverClasses, className)
|
|
36
36
|
|
|
37
37
|
return (
|
|
@@ -48,7 +48,7 @@ interface OtherProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
const Header = ({ className, ref, ...props }: OtherProps) => (
|
|
51
|
-
<div ref={ref} className={cx(styles
|
|
51
|
+
<div ref={ref} className={cx(styles['card-header'], className)} {...props} />
|
|
52
52
|
)
|
|
53
53
|
|
|
54
54
|
Header.displayName = 'CardHeader'
|
|
@@ -56,24 +56,24 @@ Header.displayName = 'CardHeader'
|
|
|
56
56
|
const Title = ({ className, ref, ...props }: OtherProps) => (
|
|
57
57
|
<div
|
|
58
58
|
ref={ref as React.Ref<HTMLDivElement>}
|
|
59
|
-
className={cx(styles
|
|
59
|
+
className={cx(styles['card-title'], className)}
|
|
60
60
|
{...props}
|
|
61
61
|
/>
|
|
62
62
|
)
|
|
63
63
|
Title.displayName = 'CardTitle'
|
|
64
64
|
|
|
65
65
|
const Description = ({ className, ref, ...props }: OtherProps) => (
|
|
66
|
-
<div ref={ref} className={cx(styles
|
|
66
|
+
<div ref={ref} className={cx(styles['card-description'], className)} {...props} />
|
|
67
67
|
)
|
|
68
68
|
Description.displayName = 'CardDescription'
|
|
69
69
|
|
|
70
70
|
const Content = ({ className, ref, ...props }: OtherProps) => (
|
|
71
|
-
<div ref={ref} className={cx(styles
|
|
71
|
+
<div ref={ref} className={cx(styles['card-content'], className)} {...props} />
|
|
72
72
|
)
|
|
73
73
|
Content.displayName = 'CardContent'
|
|
74
74
|
|
|
75
75
|
const Footer = ({ className, ref, ...props }: OtherProps) => (
|
|
76
|
-
<div ref={ref} className={cx(styles
|
|
76
|
+
<div ref={ref} className={cx(styles['card-footer'], className)} {...props} />
|
|
77
77
|
)
|
|
78
78
|
Footer.displayName = 'CardFooter'
|
|
79
79
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
@layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
|
|
2
2
|
|
|
3
3
|
@layer infonomic-components {
|
|
4
|
-
.container
|
|
4
|
+
.container,
|
|
5
|
+
:global(.container) {
|
|
5
6
|
width: 100%;
|
|
6
7
|
padding: 0 1rem;
|
|
7
8
|
margin: 0 auto;
|
|
@@ -11,21 +12,24 @@
|
|
|
11
12
|
/* Shy edges */
|
|
12
13
|
/* Large */
|
|
13
14
|
@media (min-width: 66rem) {
|
|
14
|
-
.container
|
|
15
|
+
.container,
|
|
16
|
+
:global(.container) {
|
|
15
17
|
max-width: 64rem;
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
/* X-Large */
|
|
20
22
|
@media (min-width: 77rem) {
|
|
21
|
-
.container
|
|
23
|
+
.container,
|
|
24
|
+
:global(.container) {
|
|
22
25
|
max-width: 74.375rem;
|
|
23
26
|
}
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
/* 2X-Large */
|
|
27
30
|
@media (min-width: 94rem) {
|
|
28
|
-
.container
|
|
31
|
+
.container,
|
|
32
|
+
:global(.container) {
|
|
29
33
|
max-width: 87.5rem;
|
|
30
34
|
}
|
|
31
35
|
}
|
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
@layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
|
|
2
2
|
|
|
3
3
|
@layer infonomic-components {
|
|
4
|
-
.text
|
|
4
|
+
.text,
|
|
5
|
+
:global(.error-text) {
|
|
5
6
|
font-size: 0.875rem;
|
|
6
|
-
color: var(--
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/* 🌙 Dark via `.dark` class. We rely on the
|
|
10
|
-
* consuming application to detect a user's preferred
|
|
11
|
-
* color scheme - either by header or cookie, and set
|
|
12
|
-
* a root html class accordingly
|
|
13
|
-
*/
|
|
14
|
-
:global(.dark) {
|
|
15
|
-
.text:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
16
|
-
color: var(--red-400);
|
|
17
|
-
}
|
|
7
|
+
color: var(--error)
|
|
18
8
|
}
|
|
19
9
|
}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
@layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
|
|
2
2
|
|
|
3
3
|
@layer infonomic-components {
|
|
4
|
-
.adornment
|
|
4
|
+
.adornment,
|
|
5
|
+
:global(.input-adornment) {
|
|
5
6
|
display: flex;
|
|
6
7
|
align-items: center;
|
|
7
8
|
line-height: 0;
|
|
8
9
|
white-space: nowrap;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
.start
|
|
12
|
+
.start,
|
|
13
|
+
:global(.input-adornment-start) {
|
|
12
14
|
justify-content: flex-start;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
|
-
.end
|
|
17
|
+
.end,
|
|
18
|
+
:global(.input-adornment-end) {
|
|
16
19
|
justify-content: flex-end;
|
|
17
20
|
}
|
|
18
21
|
}
|
|
@@ -44,12 +44,12 @@ const {
|
|
|
44
44
|
} = Astro.props as Props
|
|
45
45
|
---
|
|
46
46
|
|
|
47
|
-
<div class:list={['input-wrapper', styles
|
|
47
|
+
<div class:list={['input-wrapper', styles['input-wrapper']]}>
|
|
48
48
|
{label != null && <Label id={id} for={id} required={required} label={label} />}
|
|
49
|
-
<div class:list={['input-container', styles
|
|
49
|
+
<div class:list={['input-container', styles['input-container']]}>
|
|
50
50
|
{
|
|
51
51
|
startAdornment != null && (
|
|
52
|
-
<div class:list={[styles
|
|
52
|
+
<div class:list={[styles['start-adornment'], styles[variant]]}>
|
|
53
53
|
<slot name="start-adornment" />
|
|
54
54
|
</div>
|
|
55
55
|
)
|
|
@@ -74,8 +74,8 @@ const {
|
|
|
74
74
|
styles[variant],
|
|
75
75
|
styles[inputSize],
|
|
76
76
|
styles[intent],
|
|
77
|
-
startAdornment != null && styles
|
|
78
|
-
endAdornment != null && styles
|
|
77
|
+
startAdornment != null && styles['start-adornment-padding'],
|
|
78
|
+
endAdornment != null && styles['end-adornment-padding'],
|
|
79
79
|
error && styles.error,
|
|
80
80
|
className
|
|
81
81
|
]}
|
|
@@ -83,7 +83,7 @@ const {
|
|
|
83
83
|
/>
|
|
84
84
|
{
|
|
85
85
|
endAdornment != null && (
|
|
86
|
-
<div class:list={[styles
|
|
86
|
+
<div class:list={[styles['end-adornment'], styles[variant]]}>
|
|
87
87
|
<slot name="end-adornment" />
|
|
88
88
|
</div>
|
|
89
89
|
)
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
@layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
|
|
2
2
|
|
|
3
3
|
@layer infonomic-components {
|
|
4
|
-
.
|
|
4
|
+
.input-wrapper,
|
|
5
|
+
:global(.input-wrapper) {
|
|
5
6
|
display: flex;
|
|
6
7
|
flex-direction: column;
|
|
7
8
|
gap: var(--gap-1);
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
.
|
|
11
|
+
.input-container,
|
|
12
|
+
:global(.input-container) {
|
|
11
13
|
position: relative;
|
|
12
14
|
display: flex;
|
|
13
15
|
align-items: center;
|
|
14
16
|
gap: var(--gap-2);
|
|
15
17
|
}
|
|
16
18
|
|
|
17
|
-
.input
|
|
19
|
+
.input,
|
|
20
|
+
:global(.input) {
|
|
18
21
|
border: none;
|
|
19
22
|
outline: none;
|
|
20
23
|
font-weight: normal;
|
|
@@ -27,7 +30,9 @@
|
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
.input:focus,
|
|
30
|
-
.input:active
|
|
33
|
+
.input:active,
|
|
34
|
+
:global(.input):focus,
|
|
35
|
+
:global(.input):active {
|
|
31
36
|
--ring-offset-color: var(--background);
|
|
32
37
|
--ring-offset-shadow: var(--ring-inset) 0 0 0 var(--ring-offset-width) var(--ring-offset-color);
|
|
33
38
|
--ring-shadow: var(--ring-inset) 0 0 0 calc(1px + var(--ring-offset-width)) var(--ring-color);
|
|
@@ -35,74 +40,90 @@
|
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
.input:disabled,
|
|
38
|
-
.input[disabled]
|
|
43
|
+
.input[disabled],
|
|
44
|
+
:global(.input):disabled,
|
|
45
|
+
:global(.input)[disabled] {
|
|
39
46
|
pointer-events: none;
|
|
40
47
|
}
|
|
41
48
|
|
|
42
|
-
.label
|
|
49
|
+
.label,
|
|
50
|
+
:global(.input-label) {
|
|
43
51
|
font-size: 0.875rem;
|
|
44
52
|
font-weight: 500;
|
|
45
53
|
color: var(--label-color);
|
|
46
54
|
}
|
|
47
55
|
|
|
48
56
|
/* Sizes */
|
|
49
|
-
.sm
|
|
57
|
+
.sm,
|
|
58
|
+
:global(.input-sm) {
|
|
50
59
|
min-height: 32px;
|
|
51
60
|
font-size: 0.875rem;
|
|
52
61
|
line-height: 0;
|
|
53
62
|
padding: 0.25rem 0.5rem;
|
|
54
63
|
}
|
|
55
64
|
|
|
56
|
-
.md
|
|
65
|
+
.md,
|
|
66
|
+
:global(.input-md) {
|
|
57
67
|
min-height: 38px;
|
|
58
68
|
font-size: 1.1rem;
|
|
59
69
|
line-height: 0;
|
|
60
70
|
padding: 0.4rem 0.5rem;
|
|
61
71
|
}
|
|
62
72
|
|
|
63
|
-
.lg
|
|
73
|
+
.lg,
|
|
74
|
+
:global(.input-lg) {
|
|
64
75
|
min-height: 46px;
|
|
65
76
|
font-size: 1.2rem;
|
|
66
77
|
line-height: 0;
|
|
67
78
|
padding: 0.5rem 0.5rem;
|
|
68
79
|
}
|
|
69
80
|
|
|
70
|
-
.
|
|
71
|
-
.
|
|
81
|
+
.start-adornment,
|
|
82
|
+
.end-adornment,
|
|
83
|
+
:global(.input-start-adornment),
|
|
84
|
+
:global(.input-end-adornment) {
|
|
72
85
|
position: absolute;
|
|
73
86
|
display: flex;
|
|
74
87
|
align-items: center;
|
|
75
88
|
}
|
|
76
89
|
|
|
77
|
-
.
|
|
90
|
+
.start-adornment,
|
|
91
|
+
:global(.input-start-adornment) {
|
|
78
92
|
left: 5px;
|
|
79
93
|
}
|
|
80
94
|
|
|
81
|
-
.
|
|
95
|
+
.end-adornment,
|
|
96
|
+
:global(.input-end-adornment) {
|
|
82
97
|
right: 5px;
|
|
83
98
|
}
|
|
84
99
|
|
|
85
|
-
.
|
|
100
|
+
.help-text,
|
|
101
|
+
:global(.input-help-text) {
|
|
86
102
|
font-size: 0.75rem;
|
|
87
103
|
color: var(--help-text-color);
|
|
88
104
|
}
|
|
89
105
|
|
|
90
106
|
/* Variants */
|
|
91
|
-
.outlined
|
|
107
|
+
.outlined,
|
|
108
|
+
:global(.input-outlined) {
|
|
92
109
|
border: 1px solid var(--input-variant-outlined-border);
|
|
93
110
|
background-color: transparent;
|
|
94
111
|
}
|
|
95
112
|
|
|
96
|
-
.outlined:hover
|
|
113
|
+
.outlined:hover,
|
|
114
|
+
:global(.input-outlined):hover {
|
|
97
115
|
border: 1px solid var(--input-variant-outlined-hover-border);
|
|
98
116
|
}
|
|
99
117
|
|
|
100
118
|
.outlined:focus,
|
|
101
|
-
.outlined:active
|
|
119
|
+
.outlined:active,
|
|
120
|
+
:global(.input-outlined):focus,
|
|
121
|
+
:global(.input-outlined):active {
|
|
102
122
|
--ring-color: var(--input-variant-outline-ring-color);
|
|
103
123
|
}
|
|
104
124
|
|
|
105
|
-
.underlined
|
|
125
|
+
.underlined,
|
|
126
|
+
:global(.input-underlined) {
|
|
106
127
|
border-bottom: 1px solid var(--input-variant-underlined-border);
|
|
107
128
|
border-radius: 0;
|
|
108
129
|
gap: var(--gap-1);
|
|
@@ -110,65 +131,81 @@
|
|
|
110
131
|
}
|
|
111
132
|
|
|
112
133
|
/* Sizes */
|
|
113
|
-
.underlined.sm
|
|
134
|
+
.underlined.sm,
|
|
135
|
+
:global(.input-underlined.input-sm) {
|
|
114
136
|
padding: 0.25rem 0.1rem;
|
|
115
137
|
min-height: 26px
|
|
116
138
|
}
|
|
117
139
|
|
|
118
|
-
.underlined.md
|
|
140
|
+
.underlined.md,
|
|
141
|
+
:global(.input-underlined.input-md) {
|
|
119
142
|
padding: 0.25rem 0.1rem;
|
|
120
143
|
min-height: 30px;
|
|
121
144
|
}
|
|
122
145
|
|
|
123
|
-
.underlined.lg
|
|
146
|
+
.underlined.lg,
|
|
147
|
+
:global(.input-underlined.input-lg) {
|
|
124
148
|
padding: 0 0.1rem;
|
|
125
149
|
min-height: 34px;
|
|
126
150
|
}
|
|
127
151
|
|
|
128
|
-
.underlined:hover
|
|
152
|
+
.underlined:hover,
|
|
153
|
+
:global(.input-underlined):hover {
|
|
129
154
|
border-bottom: 1px solid var(--input-variant-underlined-hover-border);
|
|
130
155
|
}
|
|
131
156
|
|
|
132
|
-
.filled
|
|
157
|
+
.filled,
|
|
158
|
+
:global(.input-filled) {
|
|
133
159
|
background-color: var(--input-variant-filled);
|
|
134
160
|
}
|
|
135
161
|
|
|
136
162
|
|
|
137
163
|
/* Error classes last, so that they override all
|
|
138
164
|
of the above */
|
|
139
|
-
.error
|
|
165
|
+
.error,
|
|
166
|
+
:global(.input-error) {
|
|
140
167
|
border: 1px solid var(--red-400);
|
|
141
168
|
}
|
|
142
169
|
|
|
143
|
-
.error:hover
|
|
170
|
+
.error:hover,
|
|
171
|
+
:global(.input-error):hover {
|
|
144
172
|
border: 1px solid var(--red-400);
|
|
145
173
|
}
|
|
146
174
|
|
|
147
175
|
.error:focus,
|
|
148
|
-
.error:active
|
|
176
|
+
.error:active,
|
|
177
|
+
:global(.input-error):focus,
|
|
178
|
+
:global(.input-error):active {
|
|
149
179
|
--ring-color: var(--red-300);
|
|
150
180
|
}
|
|
151
181
|
|
|
152
|
-
.underlined.
|
|
153
|
-
.
|
|
182
|
+
.underlined.start-adornment-padding,
|
|
183
|
+
.start-adornment-padding,
|
|
184
|
+
:global(.input-underlined.input-start-adornment-padding),
|
|
185
|
+
:global(.input-start-adornment-padding) {
|
|
154
186
|
padding-left: 2rem;
|
|
155
187
|
}
|
|
156
188
|
|
|
157
|
-
.underlined.
|
|
158
|
-
.
|
|
189
|
+
.underlined.end-adornment-padding,
|
|
190
|
+
.end-adornment-padding,
|
|
191
|
+
:global(.input-underlined.input-end-adornment-padding),
|
|
192
|
+
:global(.input-end-adornment-padding) {
|
|
159
193
|
padding-right: 2rem;
|
|
160
194
|
}
|
|
161
195
|
|
|
162
|
-
.underlined.
|
|
196
|
+
.underlined.start-adornment,
|
|
197
|
+
:global(.input-underlined.input-start-adornment) {
|
|
163
198
|
left: 0;
|
|
164
199
|
}
|
|
165
200
|
|
|
166
|
-
.underlined.
|
|
201
|
+
.underlined.end-adornment,
|
|
202
|
+
:global(.input-underlined.input-end-adornment) {
|
|
167
203
|
right: 0;
|
|
168
204
|
}
|
|
169
205
|
|
|
170
206
|
/* Intents */
|
|
171
|
-
.primary
|
|
207
|
+
.primary,
|
|
208
|
+
:global(.input-primary) {
|
|
172
209
|
--input-variant-outlined-border: var(--stroke-primary);
|
|
173
210
|
--input-variant-outlined-hover-border: var(--stroke-primary-hover);
|
|
174
211
|
--input-variant-outline-ring-color: var(--ring-primary);
|
|
@@ -177,7 +214,8 @@
|
|
|
177
214
|
--input-variant-filled: var(--fill-primary-weak);
|
|
178
215
|
}
|
|
179
216
|
|
|
180
|
-
.secondary
|
|
217
|
+
.secondary,
|
|
218
|
+
:global(.input-secondary) {
|
|
181
219
|
--input-variant-outlined-border: var(--stroke-secondary);
|
|
182
220
|
--input-variant-outlined-hover-border: var(--stroke-secondary-hover);
|
|
183
221
|
--input-variant-outline-ring-color: var(--ring-secondary);
|
|
@@ -186,7 +224,8 @@
|
|
|
186
224
|
--input-variant-filled: var(--fill-secondary-weak);
|
|
187
225
|
}
|
|
188
226
|
|
|
189
|
-
.noeffect
|
|
227
|
+
.noeffect,
|
|
228
|
+
:global(.input-noeffect) {
|
|
190
229
|
--input-variant-outlined-border: var(--stroke-noeffect);
|
|
191
230
|
--input-variant-outlined-hover-border: var(--stroke-noeffect-hover);
|
|
192
231
|
--input-variant-outline-ring-color: var(--ring-noeffect);
|
|
@@ -195,7 +234,8 @@
|
|
|
195
234
|
--input-variant-filled: var(--fill-noeffect-weak);
|
|
196
235
|
}
|
|
197
236
|
|
|
198
|
-
.success
|
|
237
|
+
.success,
|
|
238
|
+
:global(.input-success) {
|
|
199
239
|
--input-variant-outlined-border: var(--stroke-success);
|
|
200
240
|
--input-variant-outlined-hover-border: var(--stroke-success-hover);
|
|
201
241
|
--input-variant-outline-ring-color: var(--ring-success);
|
|
@@ -204,7 +244,8 @@
|
|
|
204
244
|
--input-variant-filled: var(--fill-success-weak);
|
|
205
245
|
}
|
|
206
246
|
|
|
207
|
-
.info
|
|
247
|
+
.info,
|
|
248
|
+
:global(.input-info) {
|
|
208
249
|
--input-variant-outlined-border: var(--stroke-info);
|
|
209
250
|
--input-variant-outlined-hover-border: var(--stroke-info-hover);
|
|
210
251
|
--input-variant-outline-ring-color: var(--ring-info);
|
|
@@ -213,7 +254,8 @@
|
|
|
213
254
|
--input-variant-filled: var(--fill-info-weak);
|
|
214
255
|
}
|
|
215
256
|
|
|
216
|
-
.warning
|
|
257
|
+
.warning,
|
|
258
|
+
:global(.input-warning) {
|
|
217
259
|
--input-variant-outlined-border: var(--stroke-warning);
|
|
218
260
|
--input-variant-outlined-hover-border: var(--stroke-warning-hover);
|
|
219
261
|
--input-variant-outline-ring-color: var(--ring-warning);
|
|
@@ -222,7 +264,8 @@
|
|
|
222
264
|
--input-variant-filled: var(--fill-warning-weak);
|
|
223
265
|
}
|
|
224
266
|
|
|
225
|
-
.danger
|
|
267
|
+
.danger,
|
|
268
|
+
:global(.input-danger) {
|
|
226
269
|
--input-variant-outlined-border: var(--stroke-danger);
|
|
227
270
|
--input-variant-outlined-hover-border: var(--stroke-danger-hover);
|
|
228
271
|
--input-variant-outline-ring-color: var(--ring-danger);
|
|
@@ -54,11 +54,11 @@ export const Input = <C extends React.ElementType = 'input'>({
|
|
|
54
54
|
...rest
|
|
55
55
|
}: InputProps) => {
|
|
56
56
|
return (
|
|
57
|
-
<div className={cx('input-wrapper', styles
|
|
57
|
+
<div className={cx('input-wrapper', styles['input-wrapper'], inputWrapperClassName)}>
|
|
58
58
|
{label != null && <Label id={id} htmlFor={id} required={required} label={label} />}
|
|
59
|
-
<div className={cx('input-container', styles
|
|
59
|
+
<div className={cx('input-container', styles['input-container'])}>
|
|
60
60
|
{startAdornment != null && (
|
|
61
|
-
<div className={cx(styles
|
|
61
|
+
<div className={cx(styles['start-adornment'], styles[variant])}>{startAdornment}</div>
|
|
62
62
|
)}
|
|
63
63
|
<input
|
|
64
64
|
ref={ref}
|
|
@@ -82,15 +82,15 @@ export const Input = <C extends React.ElementType = 'input'>({
|
|
|
82
82
|
styles[variant],
|
|
83
83
|
styles[inputSize],
|
|
84
84
|
styles[intent],
|
|
85
|
-
{ [styles
|
|
86
|
-
{ [styles
|
|
85
|
+
{ [styles['start-adornment-padding']]: startAdornment != null },
|
|
86
|
+
{ [styles['end-adornment-padding']]: endAdornment != null },
|
|
87
87
|
{ [styles.error]: error },
|
|
88
88
|
className
|
|
89
89
|
)}
|
|
90
90
|
{...rest}
|
|
91
91
|
/>
|
|
92
92
|
{endAdornment != null && (
|
|
93
|
-
<div className={cx(styles
|
|
93
|
+
<div className={cx(styles['end-adornment'], styles[variant])}>{endAdornment}</div>
|
|
94
94
|
)}
|
|
95
95
|
</div>
|
|
96
96
|
{error ? (
|
|
@@ -1,28 +1,15 @@
|
|
|
1
1
|
@layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
|
|
2
2
|
|
|
3
3
|
@layer infonomic-components {
|
|
4
|
-
.label
|
|
4
|
+
.label,
|
|
5
|
+
:global(.label) {
|
|
5
6
|
display: block;
|
|
6
7
|
font-weight: 500;
|
|
7
|
-
color: var(--
|
|
8
|
+
color: var(--text)
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
.required
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/* 🌙 Dark via `.dark` class. We rely on the
|
|
15
|
-
* consuming application to detect a user's preferred
|
|
16
|
-
* color scheme - either by header or cookie, and set
|
|
17
|
-
* a root html class accordingly
|
|
18
|
-
*/
|
|
19
|
-
:global(.dark) {
|
|
20
|
-
.label:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
21
|
-
color: var(--gray-50);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.required:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
25
|
-
color: var(--red-400);
|
|
26
|
-
}
|
|
11
|
+
.required,
|
|
12
|
+
:global(.label-required) {
|
|
13
|
+
color: var(--error);
|
|
27
14
|
}
|
|
28
15
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
@layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
|
|
2
2
|
|
|
3
3
|
@layer infonomic-components {
|
|
4
|
-
.text-area
|
|
4
|
+
.text-area,
|
|
5
|
+
:global(.text-area) {
|
|
5
6
|
font-size: 1.1rem;
|
|
6
7
|
width: 100%;
|
|
7
8
|
padding: 0.5rem;
|
|
@@ -43,7 +43,7 @@ export const TextArea = function TextArea({
|
|
|
43
43
|
...rest
|
|
44
44
|
}: TextAreaProps): React.JSX.Element {
|
|
45
45
|
return (
|
|
46
|
-
<fieldset className={cx('text-area-wrapper', inputStyles
|
|
46
|
+
<fieldset className={cx('text-area-wrapper', inputStyles['input-wrapper'])}>
|
|
47
47
|
<Label id={id} htmlFor={id} required={required} label={label} />
|
|
48
48
|
<textarea
|
|
49
49
|
ref={ref}
|
|
@@ -602,28 +602,5 @@
|
|
|
602
602
|
--gradient-danger-end: var(--red-700);
|
|
603
603
|
--gradient-danger-foreground: white;
|
|
604
604
|
--gradient-danger-disabled: oklch(from var(--red-700) calc(l * 1.2) calc(c * 0.85) h);
|
|
605
|
-
|
|
606
|
-
/* SURFACE TOKENS (Force Light Mode)
|
|
607
|
-
----------------------------------------------------------------- */
|
|
608
|
-
|
|
609
|
-
/* Panel/container backgrounds - identical to :root */
|
|
610
|
-
--surface-panel: var(--canvas-25);
|
|
611
|
-
--surface-panel-elevated: white;
|
|
612
|
-
--surface-panel-border: var(--border-color);
|
|
613
|
-
|
|
614
|
-
/* Item backgrounds */
|
|
615
|
-
--surface-item: transparent;
|
|
616
|
-
--surface-item-hover: var(--canvas-50);
|
|
617
|
-
--surface-item-active: var(--canvas-100);
|
|
618
|
-
|
|
619
|
-
/* Item text colors */
|
|
620
|
-
--surface-item-text: var(--text);
|
|
621
|
-
--surface-item-text-hover: var(--text);
|
|
622
|
-
--surface-item-text-active: var(--text);
|
|
623
|
-
--surface-item-text-disabled: var(--gray-400);
|
|
624
|
-
|
|
625
|
-
/* Panel scrollers */
|
|
626
|
-
--surface-panel-scrollbar: var(--gray-50);
|
|
627
|
-
--surface-panel-scrollbar-thumb: var(--primary-100);
|
|
628
605
|
}
|
|
629
606
|
}
|