@infonomic/uikit 5.3.0 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/astro.d.ts +45 -0
  2. package/dist/astro.js +45 -0
  3. package/dist/components/accordion/accordion.module.css +60 -0
  4. package/dist/components/avatar/avatar.module.css +54 -0
  5. package/dist/components/badge/badge.module.css +61 -0
  6. package/dist/components/button/button-group.module.css +19 -0
  7. package/dist/components/button/button.astro +86 -0
  8. package/dist/components/button/button.module.css +431 -0
  9. package/dist/components/button/control-buttons.module.css +132 -0
  10. package/dist/components/button/copy-button.module.css +56 -0
  11. package/dist/components/button/icon-button.astro +47 -0
  12. package/dist/components/card/card-content.astro +14 -0
  13. package/dist/components/card/card-description.astro +14 -0
  14. package/dist/components/card/card-footer.astro +14 -0
  15. package/dist/components/card/card-header.astro +14 -0
  16. package/dist/components/card/card-title.astro +14 -0
  17. package/dist/components/card/card.astro +41 -0
  18. package/dist/components/card/card.module.css +77 -0
  19. package/dist/components/container/container.astro +13 -0
  20. package/dist/components/container/container.module.css +36 -0
  21. package/dist/components/dropdown/dropdown.module.css +120 -0
  22. package/dist/components/forms/calendar.module.css +269 -0
  23. package/dist/components/forms/checkbox.module.css +211 -0
  24. package/dist/components/forms/error-text.astro +14 -0
  25. package/dist/components/forms/error-text.module.css +9 -0
  26. package/dist/components/forms/help-text.astro +13 -0
  27. package/dist/components/forms/help-text.module.css +9 -0
  28. package/dist/components/forms/input-adornment.astro +26 -0
  29. package/dist/components/forms/input-adornment.module.css +21 -0
  30. package/dist/components/forms/input.astro +99 -0
  31. package/dist/components/forms/input.module.css +278 -0
  32. package/dist/components/forms/label.astro +24 -0
  33. package/dist/components/forms/label.module.css +15 -0
  34. package/dist/components/forms/radio-group.module.css +163 -0
  35. package/dist/components/forms/select.module.css +68 -0
  36. package/dist/components/forms/text-area.module.css +10 -0
  37. package/dist/components/hamburger/hamburger.astro +30 -0
  38. package/dist/components/notifications/alert.module.css +110 -0
  39. package/dist/components/notifications/toast.module.css +237 -0
  40. package/dist/components/overlay/overlay.module.css +41 -0
  41. package/dist/components/pager/pagination.module.css +149 -0
  42. package/dist/components/scroll-area/scroll-area.module.css +64 -0
  43. package/dist/components/scroll-to-top/scroll-to-top.astro +75 -0
  44. package/dist/components/scroll-to-top/scroll-to-top.module.css +86 -0
  45. package/dist/components/section/section.astro +13 -0
  46. package/dist/components/section/section.module.css +9 -0
  47. package/dist/components/shimmer/shimmer.module.css +53 -0
  48. package/dist/components/table/table.module.css +100 -0
  49. package/dist/components/tabs/tabs.module.css +66 -0
  50. package/dist/components/tooltip/tooltip.module.css +45 -0
  51. package/dist/icons/close-icon.astro +38 -0
  52. package/dist/icons/icon-element.astro +27 -0
  53. package/dist/icons/icons.module.css +155 -0
  54. package/dist/icons/light-icon.astro +36 -0
  55. package/dist/icons/moon-icon.astro +38 -0
  56. package/dist/icons/search-icon.astro +40 -0
  57. package/dist/widgets/datepicker/datepicker.module.css +189 -0
  58. package/dist/widgets/drawer/drawer.module.css +112 -0
  59. package/dist/widgets/modal/modal.module.css +81 -0
  60. package/dist/widgets/timeline/timeline.module.css +87 -0
  61. package/package.json +5 -4
@@ -0,0 +1,211 @@
1
+ @layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
2
+
3
+ @layer infonomic-components {
4
+ .container {
5
+ display: flex;
6
+ align-items: center;
7
+ gap: var(--gap-2);
8
+ }
9
+
10
+ .reverse {
11
+ flex-direction: row-reverse;
12
+ }
13
+
14
+ .checkbox {
15
+ display: inline-flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ border-radius: var(--border-radius-sm);
19
+ transition: all var(--transition-normal);
20
+ }
21
+
22
+ .checkbox[data-state="checked"] {
23
+ --ring-offset-color: var(--background);
24
+ --ring-offset-shadow: var(--ring-inset) 0 0 0 var(--ring-offset-width) var(--ring-offset-color);
25
+ --ring-shadow: var(--ring-inset) 0 0 0 calc(1px + var(--ring-offset-width)) var(--ring-color);
26
+ box-shadow: var(--ring-offset-shadow), var(--ring-shadow), var(--shadow, 0 0 #0000);
27
+ }
28
+
29
+ .checkbox:disabled,
30
+ .checkbox[disabled] {
31
+ pointer-events: none;
32
+ }
33
+
34
+ .indicator {
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+ }
39
+
40
+ .icon {
41
+ width: 20px;
42
+ height: 20px;
43
+ color: var(--checkbox-icon-color);
44
+ }
45
+
46
+ /* Style for the "checked" state */
47
+ .indicator[data-state="checked"] .icon {
48
+ animation: checkBoxIn 0.3s cubic-bezier(0.25, 1.5, 0.5, 1) forwards;
49
+ opacity: 1;
50
+ transform: scale(1);
51
+ }
52
+
53
+ /* Style for the "unchecked" state */
54
+ .indicator[data-state="unchecked"] .icon {
55
+ animation: checkBoxOut 0.2s ease-in;
56
+ opacity: 0;
57
+ transform: scale(0.8);
58
+ }
59
+
60
+ .label {
61
+ margin-left: 0.25rem;
62
+ cursor: pointer;
63
+ font-weight: 500;
64
+ color: var(--label-color);
65
+ }
66
+
67
+ .checkbox:disabled~.label,
68
+ .checkbox[disabled]~.label {
69
+ pointer-events: none;
70
+ }
71
+
72
+ .errorText {
73
+ margin-top: 0.25rem;
74
+ font-size: 0.875rem;
75
+ color: red;
76
+ }
77
+
78
+ /* Sizes */
79
+ .sm {
80
+ width: 18px;
81
+ height: 18px;
82
+ }
83
+
84
+ .md {
85
+ width: 20px;
86
+ height: 20px;
87
+ }
88
+
89
+ .lg {
90
+ width: 22px;
91
+ height: 22px;
92
+ }
93
+
94
+ /* Variants */
95
+ .outlined {
96
+ border: 2px solid var(--checkbox-variant-outlined-border);
97
+ --checkbox-icon-color: white;
98
+ }
99
+
100
+ .outlined[data-state="checked"] {
101
+ --ring-color: var(--checkbox-variant-outline-ring-color);
102
+ background-color: var(--checkbox-variant-outlined);
103
+ }
104
+
105
+ .filled {
106
+ background-color: var(--checkbox-variant-filled);
107
+ --checkbox-icon-color: white;
108
+ }
109
+
110
+ /* Intents */
111
+ .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);
118
+ }
119
+
120
+ .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);
127
+ }
128
+
129
+ .noeffect {
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);
136
+ }
137
+
138
+ .success {
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);
145
+ }
146
+
147
+ .info {
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);
154
+ }
155
+
156
+ .warning {
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);
163
+ }
164
+
165
+ .danger {
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);
172
+ }
173
+
174
+ /* Dark mode handled by semantic tokens in theme layer */
175
+
176
+ @keyframes checkBoxIn {
177
+ 0% {
178
+ opacity: 0;
179
+ transform: scale(0.8);
180
+ }
181
+
182
+ 50% {
183
+ opacity: 1;
184
+ transform: scale(1.2);
185
+ /* Overshoot */
186
+ }
187
+
188
+ 80% {
189
+ transform: scale(0.9);
190
+ /* Slight bounce back */
191
+ }
192
+
193
+ 100% {
194
+ transform: scale(1);
195
+ /* Settle */
196
+ }
197
+ }
198
+
199
+ /* Define keyframes for the "unchecked" state */
200
+ @keyframes checkBoxOut {
201
+ from {
202
+ opacity: 1;
203
+ transform: scale(1);
204
+ }
205
+
206
+ to {
207
+ opacity: 0;
208
+ transform: scale(0.8);
209
+ }
210
+ }
211
+ }
@@ -0,0 +1,14 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+ import styles from './error-text.module.css'
4
+
5
+ interface Props extends HTMLAttributes<'p'> {
6
+ id: string
7
+ text: string
8
+ class?: string
9
+ }
10
+
11
+ const { id, class: className, text, ...rest } = Astro.props as Props
12
+ ---
13
+
14
+ <p id={id} class:list={['error-text', styles.text, className]} {...rest}>{text}</p>
@@ -0,0 +1,9 @@
1
+ @layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
2
+
3
+ @layer infonomic-components {
4
+ .text,
5
+ :global(.error-text) {
6
+ font-size: 0.875rem;
7
+ color: var(--error)
8
+ }
9
+ }
@@ -0,0 +1,13 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+ import styles from './help-text.module.css'
4
+
5
+ interface Props extends HTMLAttributes<'p'> {
6
+ text: string
7
+ class?: string
8
+ }
9
+
10
+ const { class: className, text, ...rest } = Astro.props as Props
11
+ ---
12
+
13
+ <p class:list={['help-text', styles.text, className]} {...rest}>{text}</p>
@@ -0,0 +1,9 @@
1
+ @layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
2
+
3
+ @layer infonomic-components {
4
+ .text,
5
+ :global(.help-text) {
6
+ font-size: 0.875rem;
7
+ color: var(--muted)
8
+ }
9
+ }
@@ -0,0 +1,26 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+ import styles from './input-adornment.module.css'
4
+
5
+ interface Props extends HTMLAttributes<'div'> {
6
+ position?: 'start' | 'end'
7
+ margins?: boolean
8
+ class?: string
9
+ }
10
+
11
+ const { position = 'start', margins = true, class: className, ...rest } = Astro.props as Props
12
+ ---
13
+
14
+ <div
15
+ class:list={[
16
+ 'input-adornment',
17
+ position,
18
+ styles.adornment,
19
+ position === 'start' && styles.start,
20
+ position === 'end' && styles.end,
21
+ className
22
+ ]}
23
+ {...rest}
24
+ >
25
+ <slot />
26
+ </div>
@@ -0,0 +1,21 @@
1
+ @layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
2
+
3
+ @layer infonomic-components {
4
+ .adornment,
5
+ :global(.input-adornment) {
6
+ display: flex;
7
+ align-items: center;
8
+ line-height: 0;
9
+ white-space: nowrap;
10
+ }
11
+
12
+ .start,
13
+ :global(.input-adornment-start) {
14
+ justify-content: flex-start;
15
+ }
16
+
17
+ .end,
18
+ :global(.input-adornment-end) {
19
+ justify-content: flex-end;
20
+ }
21
+ }
@@ -0,0 +1,99 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+ import type { Intent, Size, Variant } from './@types/input.js'
4
+ import ErrorText from './error-text.astro'
5
+ import HelpText from './help-text.astro'
6
+ import styles from './input.module.css'
7
+ import Label from './label.astro'
8
+
9
+ interface Props extends HTMLAttributes<'input'> {
10
+ id: string
11
+ name: string
12
+ label?: string
13
+ variant?: Variant
14
+ inputSize?: Size
15
+ intent?: Intent
16
+ required?: boolean
17
+ placeHolder?: string
18
+ autoComplete?: string
19
+ startAdornment?: any
20
+ endAdornment?: any
21
+ error?: boolean
22
+ helpText?: string
23
+ errorText?: string
24
+ class?: string
25
+ }
26
+
27
+ const {
28
+ id,
29
+ name,
30
+ variant = 'outlined',
31
+ inputSize = 'md',
32
+ intent = 'primary',
33
+ required,
34
+ label,
35
+ startAdornment,
36
+ endAdornment,
37
+ placeHolder = '',
38
+ autoComplete = 'off',
39
+ error = false,
40
+ helpText = '',
41
+ errorText = '',
42
+ class: className,
43
+ ...rest
44
+ } = Astro.props as Props
45
+ ---
46
+
47
+ <div class:list={['input-wrapper', styles['input-wrapper']]}>
48
+ {label != null && <Label id={id} for={id} required={required} label={label} />}
49
+ <div class:list={['input-container', styles['input-container']]}>
50
+ {
51
+ startAdornment != null && (
52
+ <div class:list={[styles['start-adornment'], styles[variant]]}>
53
+ <slot name="start-adornment" />
54
+ </div>
55
+ )
56
+ }
57
+ <input
58
+ id={id}
59
+ name={name}
60
+ required={required}
61
+ auto-complete={autoComplete}
62
+ placeholder={placeHolder}
63
+ aria-labelledby={`label-for-${id}`}
64
+ aria-invalid={error}
65
+ aria-required={required}
66
+ aria-errormessage={errorText}
67
+ aria-describedby={error ? `error-for-${id}` : undefined}
68
+ class:list={[
69
+ 'input',
70
+ variant,
71
+ inputSize,
72
+ intent,
73
+ styles.input,
74
+ styles[variant],
75
+ styles[inputSize],
76
+ styles[intent],
77
+ startAdornment != null && styles['start-adornment-padding'],
78
+ endAdornment != null && styles['end-adornment-padding'],
79
+ error && styles.error,
80
+ className
81
+ ]}
82
+ {...rest}
83
+ />
84
+ {
85
+ endAdornment != null && (
86
+ <div class:list={[styles['end-adornment'], styles[variant]]}>
87
+ <slot name="end-adornment" />
88
+ </div>
89
+ )
90
+ }
91
+ </div>
92
+ {
93
+ error ? (
94
+ <ErrorText id={`error-for-${id}`} text={errorText ?? helpText} />
95
+ ) : (
96
+ helpText?.length > 0 && <HelpText text={helpText} />
97
+ )
98
+ }
99
+ </div>
@@ -0,0 +1,278 @@
1
+ @layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
2
+
3
+ @layer infonomic-components {
4
+ .input-wrapper,
5
+ :global(.input-wrapper) {
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: var(--gap-1);
9
+ }
10
+
11
+ .input-container,
12
+ :global(.input-container) {
13
+ position: relative;
14
+ display: flex;
15
+ align-items: center;
16
+ gap: var(--gap-2);
17
+ }
18
+
19
+ .input,
20
+ :global(.input) {
21
+ border: none;
22
+ outline: none;
23
+ font-weight: normal;
24
+ display: inline-flex;
25
+ gap: var(--gap-2);
26
+ align-items: center;
27
+ width: 100%;
28
+ transition: all var(--transition-normal);
29
+ border-radius: var(--border-radius-sm);
30
+ }
31
+
32
+ .input:focus,
33
+ .input:active,
34
+ :global(.input):focus,
35
+ :global(.input):active {
36
+ --ring-offset-color: var(--background);
37
+ --ring-offset-shadow: var(--ring-inset) 0 0 0 var(--ring-offset-width) var(--ring-offset-color);
38
+ --ring-shadow: var(--ring-inset) 0 0 0 calc(1px + var(--ring-offset-width)) var(--ring-color);
39
+ box-shadow: var(--ring-offset-shadow), var(--ring-shadow), var(--shadow, 0 0 #0000);
40
+ }
41
+
42
+ .input:disabled,
43
+ .input[disabled],
44
+ :global(.input):disabled,
45
+ :global(.input)[disabled] {
46
+ pointer-events: none;
47
+ }
48
+
49
+ .label,
50
+ :global(.input-label) {
51
+ font-size: 0.875rem;
52
+ font-weight: 500;
53
+ color: var(--label-color);
54
+ }
55
+
56
+ /* Sizes */
57
+ .sm,
58
+ :global(.input-sm) {
59
+ min-height: 32px;
60
+ font-size: 0.875rem;
61
+ line-height: 0;
62
+ padding: 0.25rem 0.5rem;
63
+ }
64
+
65
+ .md,
66
+ :global(.input-md) {
67
+ min-height: 38px;
68
+ font-size: 1.1rem;
69
+ line-height: 0;
70
+ padding: 0.4rem 0.5rem;
71
+ }
72
+
73
+ .lg,
74
+ :global(.input-lg) {
75
+ min-height: 46px;
76
+ font-size: 1.2rem;
77
+ line-height: 0;
78
+ padding: 0.5rem 0.5rem;
79
+ }
80
+
81
+ .start-adornment,
82
+ .end-adornment,
83
+ :global(.input-start-adornment),
84
+ :global(.input-end-adornment) {
85
+ position: absolute;
86
+ display: flex;
87
+ align-items: center;
88
+ }
89
+
90
+ .start-adornment,
91
+ :global(.input-start-adornment) {
92
+ left: 5px;
93
+ }
94
+
95
+ .end-adornment,
96
+ :global(.input-end-adornment) {
97
+ right: 5px;
98
+ }
99
+
100
+ .help-text,
101
+ :global(.input-help-text) {
102
+ font-size: 0.75rem;
103
+ color: var(--help-text-color);
104
+ }
105
+
106
+ /* Variants */
107
+ .outlined,
108
+ :global(.input-outlined) {
109
+ border: 1px solid var(--input-variant-outlined-border);
110
+ background-color: transparent;
111
+ }
112
+
113
+ .outlined:hover,
114
+ :global(.input-outlined):hover {
115
+ border: 1px solid var(--input-variant-outlined-hover-border);
116
+ }
117
+
118
+ .outlined:focus,
119
+ .outlined:active,
120
+ :global(.input-outlined):focus,
121
+ :global(.input-outlined):active {
122
+ --ring-color: var(--input-variant-outline-ring-color);
123
+ }
124
+
125
+ .underlined,
126
+ :global(.input-underlined) {
127
+ border-bottom: 1px solid var(--input-variant-underlined-border);
128
+ border-radius: 0;
129
+ gap: var(--gap-1);
130
+ background-color: var(--input-variant-underlined);
131
+ }
132
+
133
+ /* Sizes */
134
+ .underlined.sm,
135
+ :global(.input-underlined.input-sm) {
136
+ padding: 0.25rem 0.1rem;
137
+ min-height: 26px
138
+ }
139
+
140
+ .underlined.md,
141
+ :global(.input-underlined.input-md) {
142
+ padding: 0.25rem 0.1rem;
143
+ min-height: 30px;
144
+ }
145
+
146
+ .underlined.lg,
147
+ :global(.input-underlined.input-lg) {
148
+ padding: 0 0.1rem;
149
+ min-height: 34px;
150
+ }
151
+
152
+ .underlined:hover,
153
+ :global(.input-underlined):hover {
154
+ border-bottom: 1px solid var(--input-variant-underlined-hover-border);
155
+ }
156
+
157
+ .filled,
158
+ :global(.input-filled) {
159
+ background-color: var(--input-variant-filled);
160
+ }
161
+
162
+
163
+ /* Error classes last, so that they override all
164
+ of the above */
165
+ .error,
166
+ :global(.input-error) {
167
+ border: 1px solid var(--red-400);
168
+ }
169
+
170
+ .error:hover,
171
+ :global(.input-error):hover {
172
+ border: 1px solid var(--red-400);
173
+ }
174
+
175
+ .error:focus,
176
+ .error:active,
177
+ :global(.input-error):focus,
178
+ :global(.input-error):active {
179
+ --ring-color: var(--red-300);
180
+ }
181
+
182
+ .underlined.start-adornment-padding,
183
+ .start-adornment-padding,
184
+ :global(.input-underlined.input-start-adornment-padding),
185
+ :global(.input-start-adornment-padding) {
186
+ padding-left: 2rem;
187
+ }
188
+
189
+ .underlined.end-adornment-padding,
190
+ .end-adornment-padding,
191
+ :global(.input-underlined.input-end-adornment-padding),
192
+ :global(.input-end-adornment-padding) {
193
+ padding-right: 2rem;
194
+ }
195
+
196
+ .underlined.start-adornment,
197
+ :global(.input-underlined.input-start-adornment) {
198
+ left: 0;
199
+ }
200
+
201
+ .underlined.end-adornment,
202
+ :global(.input-underlined.input-end-adornment) {
203
+ right: 0;
204
+ }
205
+
206
+ /* Intents */
207
+ .primary,
208
+ :global(.input-primary) {
209
+ --input-variant-outlined-border: var(--stroke-primary);
210
+ --input-variant-outlined-hover-border: var(--stroke-primary-hover);
211
+ --input-variant-outline-ring-color: var(--ring-primary);
212
+ --input-variant-underlined-border: var(--stroke-primary);
213
+ --input-variant-underlined-hover-border: var(--stroke-primary-hover);
214
+ --input-variant-filled: var(--fill-primary-weak);
215
+ }
216
+
217
+ .secondary,
218
+ :global(.input-secondary) {
219
+ --input-variant-outlined-border: var(--stroke-secondary);
220
+ --input-variant-outlined-hover-border: var(--stroke-secondary-hover);
221
+ --input-variant-outline-ring-color: var(--ring-secondary);
222
+ --input-variant-underlined-border: var(--stroke-secondary);
223
+ --input-variant-underlined-hover-border: var(--stroke-secondary-hover);
224
+ --input-variant-filled: var(--fill-secondary-weak);
225
+ }
226
+
227
+ .noeffect,
228
+ :global(.input-noeffect) {
229
+ --input-variant-outlined-border: var(--stroke-noeffect);
230
+ --input-variant-outlined-hover-border: var(--stroke-noeffect-hover);
231
+ --input-variant-outline-ring-color: var(--ring-noeffect);
232
+ --input-variant-underlined-border: var(--stroke-noeffect);
233
+ --input-variant-underlined-hover-border: var(--stroke-noeffect-hover);
234
+ --input-variant-filled: var(--fill-noeffect-weak);
235
+ }
236
+
237
+ .success,
238
+ :global(.input-success) {
239
+ --input-variant-outlined-border: var(--stroke-success);
240
+ --input-variant-outlined-hover-border: var(--stroke-success-hover);
241
+ --input-variant-outline-ring-color: var(--ring-success);
242
+ --input-variant-underlined-border: var(--stroke-success);
243
+ --input-variant-underlined-hover-border: var(--stroke-success-hover);
244
+ --input-variant-filled: var(--fill-success-weak);
245
+ }
246
+
247
+ .info,
248
+ :global(.input-info) {
249
+ --input-variant-outlined-border: var(--stroke-info);
250
+ --input-variant-outlined-hover-border: var(--stroke-info-hover);
251
+ --input-variant-outline-ring-color: var(--ring-info);
252
+ --input-variant-underlined-border: var(--stroke-info);
253
+ --input-variant-underlined-hover-border: var(--stroke-info-hover);
254
+ --input-variant-filled: var(--fill-info-weak);
255
+ }
256
+
257
+ .warning,
258
+ :global(.input-warning) {
259
+ --input-variant-outlined-border: var(--stroke-warning);
260
+ --input-variant-outlined-hover-border: var(--stroke-warning-hover);
261
+ --input-variant-outline-ring-color: var(--ring-warning);
262
+ --input-variant-underlined-border: var(--stroke-warning);
263
+ --input-variant-underlined-hover-border: var(--stroke-warning-hover);
264
+ --input-variant-filled: var(--fill-warning-weak);
265
+ }
266
+
267
+ .danger,
268
+ :global(.input-danger) {
269
+ --input-variant-outlined-border: var(--stroke-danger);
270
+ --input-variant-outlined-hover-border: var(--stroke-danger-hover);
271
+ --input-variant-outline-ring-color: var(--ring-danger);
272
+ --input-variant-underlined-border: var(--stroke-danger);
273
+ --input-variant-underlined-hover-border: var(--stroke-danger-hover);
274
+ --input-variant-filled: var(--fill-danger-weak);
275
+ }
276
+
277
+ /* Dark mode handled by semantic tokens in theme layer */
278
+ }
@@ -0,0 +1,24 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+ import styles from './label.module.css'
4
+
5
+ interface Props extends HTMLAttributes<'label'> {
6
+ id: string
7
+ for: string
8
+ label: string
9
+ required?: boolean
10
+ class?: string
11
+ }
12
+
13
+ const { id, for: htmlFor, label, required, class: className, ...rest } = Astro.props as Props
14
+ ---
15
+
16
+ <label
17
+ id={`label-for-${id}`}
18
+ for={htmlFor}
19
+ class:list={['label', styles.label, className]}
20
+ {...rest}
21
+ >
22
+ {label}
23
+ {required != null && <span class={styles.required}>&nbsp;*</span>}
24
+ </label>