@axenstudio/axen-form 0.1.8 → 0.1.10

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.
@@ -1,244 +0,0 @@
1
- /* ═══════════════════════════════════════════════
2
- axen-form Field Base Styles
3
- Shared styles for all field components
4
- A11y-aware + Responsive
5
- ═══════════════════════════════════════════════ */
6
-
7
- /* ── Field Wrapper ───────────────────────────── */
8
- ._wrapper_1w6h8_8 {
9
- display: flex;
10
- flex-direction: column;
11
- width: 100%;
12
- }
13
-
14
- /* ── Label ───────────────────────────────────── */
15
- ._label_1w6h8_15 {
16
- display: block;
17
- font-size: var(--axen-font-size-sm, 0.875rem);
18
- font-weight: var(--axen-font-weight-medium, 500);
19
- color: var(--axen-color-label, var(--axen-color-text, #1a1a1a));
20
- margin-bottom: var(--axen-label-margin-bottom, 0.375rem);
21
- line-height: var(--axen-line-height, 1.5);
22
- letter-spacing: 0.01em;
23
- }
24
-
25
- ._labelRequired_1w6h8_25::after {
26
- content: ' *';
27
- color: var(--axen-color-error, #d32f2f);
28
- font-weight: var(--axen-font-weight-bold, 600);
29
- }
30
-
31
- /* ── Input Base ──────────────────────────────── */
32
- ._input_1w6h8_32 {
33
- display: block;
34
- width: 100%;
35
- height: var(--axen-field-height, 2.75rem);
36
- min-height: var(--axen-field-min-height, 44px);
37
- padding: var(--axen-field-padding-y, 0.5rem) var(--axen-field-padding-x, 0.75rem);
38
- font-family: var(
39
- --axen-font-family,
40
- -apple-system,
41
- BlinkMacSystemFont,
42
- 'Segoe UI',
43
- Roboto,
44
- 'Helvetica Neue',
45
- Arial,
46
- sans-serif
47
- );
48
- font-size: var(--axen-font-size-md, 1rem);
49
- line-height: var(--axen-line-height, 1.5);
50
- color: var(--axen-color-text, #1a1a1a);
51
- background-color: var(--axen-color-input-bg, var(--axen-color-bg, #ffffff));
52
- border: var(--axen-border-width, 1px) solid var(--axen-color-border, #d0d5dd);
53
- border-radius: var(--axen-border-radius, 8px);
54
- transition:
55
- border-color var(--axen-transition-fast, 150ms ease),
56
- box-shadow var(--axen-transition-fast, 150ms ease);
57
- outline: none;
58
- }
59
-
60
- ._input_1w6h8_32::placeholder {
61
- color: var(--axen-color-text-disabled, #9e9e9e);
62
- }
63
-
64
- ._input_1w6h8_32:hover:not(:disabled):not(:read-only) {
65
- border-color: var(--axen-color-border-hover, #888888);
66
- }
67
-
68
- /* Focus ring (keyboard + mouse) */
69
- ._input_1w6h8_32:focus {
70
- border-color: var(--axen-color-border-focus, var(--axen-color-primary, #1976d2));
71
- box-shadow: var(--axen-shadow-focus, 0 0 0 2px rgba(25, 118, 210, 0.5));
72
- outline: none;
73
- }
74
-
75
- ._input_1w6h8_32:disabled {
76
- background-color: var(--axen-color-bg-disabled, #f5f5f5);
77
- color: var(--axen-color-text-disabled, #9e9e9e);
78
- cursor: not-allowed;
79
- }
80
-
81
- ._input_1w6h8_32:read-only {
82
- background-color: var(--axen-color-bg-disabled, #f5f5f5);
83
- }
84
-
85
- /* ── Error State ─────────────────────────────── */
86
- ._inputError_1w6h8_86 {
87
- border-color: var(--axen-color-error, #d32f2f);
88
- }
89
-
90
- ._inputError_1w6h8_86:focus {
91
- border-color: var(--axen-color-error, #d32f2f);
92
- box-shadow: 0 0 0 var(--axen-focus-ring-width, 2px) rgba(211, 47, 47, 0.3);
93
- }
94
-
95
- /* ── Helper Text ─────────────────────────────── */
96
- ._helperText_1w6h8_96 {
97
- display: block;
98
- font-size: var(--axen-font-size-xs, 0.75rem);
99
- color: var(--axen-color-text-secondary, #666666);
100
- margin-top: var(--axen-helper-margin-top, 0.25rem);
101
- line-height: var(--axen-line-height, 1.5);
102
- }
103
-
104
- ._helperTextError_1w6h8_104 {
105
- color: var(--axen-color-error, #d32f2f);
106
- }
107
-
108
- /* ── Textarea ────────────────────────────────── */
109
- ._textarea_1w6h8_109 {
110
- height: auto;
111
- min-height: calc(var(--axen-field-min-height, 44px) * 2);
112
- resize: vertical;
113
- padding-top: var(--axen-field-padding-x, 0.75rem);
114
- }
115
-
116
- /* ── Select ──────────────────────────────────── */
117
- ._select_1w6h8_117 {
118
- appearance: none;
119
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
120
- background-repeat: no-repeat;
121
- background-position: right 0.75rem center;
122
- padding-right: 2rem;
123
- cursor: pointer;
124
- }
125
-
126
- /* ── Input with prefix/suffix ────────────────── */
127
- ._inputGroup_1w6h8_127 {
128
- display: flex;
129
- align-items: stretch;
130
- }
131
-
132
- /* ── Icon inside input ───────────────────────── */
133
- ._inputIconWrapper_1w6h8_133 {
134
- position: relative;
135
- }
136
-
137
- ._fieldIcon_1w6h8_137 {
138
- position: absolute;
139
- left: 0.75rem;
140
- top: 50%;
141
- transform: translateY(-50%);
142
- width: 1.125rem;
143
- height: 1.125rem;
144
- color: var(--axen-color-text-secondary, #666666);
145
- pointer-events: none;
146
- display: flex;
147
- align-items: center;
148
- justify-content: center;
149
- z-index: 1;
150
- }
151
-
152
- ._inputWithIcon_1w6h8_152 {
153
- padding-left: 2.5rem;
154
- }
155
-
156
- ._inputPrefix_1w6h8_156,
157
- ._inputSuffix_1w6h8_157 {
158
- display: flex;
159
- align-items: center;
160
- padding: 0 var(--axen-space-sm, 0.5rem);
161
- font-size: var(--axen-font-size-sm, 0.875rem);
162
- color: var(--axen-color-text-secondary, #666666);
163
- background-color: var(--axen-color-bg-hover, #fafafa);
164
- border: var(--axen-border-width, 1px) solid var(--axen-color-border, #c4c4c4);
165
- white-space: nowrap;
166
- }
167
-
168
- ._inputPrefix_1w6h8_156 {
169
- border-right: none;
170
- border-radius: var(--axen-border-radius, 6px) 0 0 var(--axen-border-radius, 6px);
171
- }
172
-
173
- ._inputSuffix_1w6h8_157 {
174
- border-left: none;
175
- border-radius: 0 var(--axen-border-radius, 6px) var(--axen-border-radius, 6px) 0;
176
- }
177
-
178
- ._inputGroupInput_1w6h8_178 {
179
- border-radius: 0;
180
- }
181
-
182
- ._inputPrefix_1w6h8_156 + ._inputGroupInput_1w6h8_178 {
183
- border-top-left-radius: 0;
184
- border-bottom-left-radius: 0;
185
- }
186
-
187
- ._inputGroupInput_1w6h8_178:has(+ ._inputSuffix_1w6h8_157) {
188
- border-top-right-radius: 0;
189
- border-bottom-right-radius: 0;
190
- }
191
-
192
- /* ── Checkbox/Radio/Switch shared ────────────── */
193
- ._inlineWrapper_1w6h8_193 {
194
- display: flex;
195
- align-items: center;
196
- gap: var(--axen-space-sm, 0.5rem);
197
- min-height: var(--axen-field-min-height, 44px);
198
- cursor: pointer;
199
- }
200
-
201
- ._inlineWrapper_1w6h8_193:has(:disabled) {
202
- cursor: not-allowed;
203
- opacity: 0.6;
204
- }
205
-
206
- ._inlineLabel_1w6h8_206 {
207
- font-size: var(--axen-font-size-md, 1rem);
208
- color: var(--axen-color-text, #1a1a1a);
209
- user-select: none;
210
- }
211
-
212
- /* ── Responsive: mobile touch targets ────────── */
213
- @media (max-width: 599px) {
214
- ._input_1w6h8_32 {
215
- font-size: 16px; /* Prevent iOS zoom on focus */
216
- min-height: 48px;
217
- }
218
-
219
- ._inlineWrapper_1w6h8_193 {
220
- min-height: 48px;
221
- }
222
- }
223
-
224
- /* ── High Contrast Mode ──────────────────────── */
225
- @media (prefers-contrast: more) {
226
- ._input_1w6h8_32 {
227
- border-width: 2px;
228
- }
229
-
230
- ._inputError_1w6h8_86 {
231
- border-width: 3px;
232
- }
233
-
234
- ._helperTextError_1w6h8_104 {
235
- font-weight: var(--axen-font-weight-bold, 600);
236
- }
237
- }
238
-
239
- /* ── Reduced Motion (A11y: WCAG 2.3.3) ──────── */
240
- @media (prefers-reduced-motion: reduce) {
241
- ._input_1w6h8_32 {
242
- transition: none;
243
- }
244
- }
@@ -1,3 +0,0 @@
1
- ._box_17jtc_1 {
2
- min-width: 0;
3
- }
@@ -1,25 +0,0 @@
1
- ._divider_7khjl_1 {
2
- border: none;
3
- margin: 0;
4
- flex-shrink: 0;
5
- }
6
-
7
- ._horizontal_7khjl_7 {
8
- width: 100%;
9
- height: 1px;
10
- background-color: var(--axen-color-border);
11
- }
12
-
13
- ._vertical_7khjl_13 {
14
- width: 1px;
15
- height: auto;
16
- align-self: stretch;
17
- background-color: var(--axen-color-border);
18
- }
19
-
20
- @media (prefers-contrast: more) {
21
- ._horizontal_7khjl_7,
22
- ._vertical_7khjl_13 {
23
- background-color: var(--axen-color-text);
24
- }
25
- }
@@ -1,43 +0,0 @@
1
- /* ═══════════════════════════════════════════════
2
- Grid Layout — Responsive CSS Grid
3
- 12-column mobile-first system
4
- ═══════════════════════════════════════════════ */
5
-
6
- ._container_1asbx_6 {
7
- display: grid;
8
- width: 100%;
9
- }
10
-
11
- ._item_1asbx_11 {
12
- min-width: 0; /* Prevent overflow */
13
- }
14
-
15
- /* ── Responsive Breakpoints ──────────────────── */
16
-
17
- /* sm ≥ 600px */
18
- @media (min-width: 600px) {
19
- ._sm_1asbx_19 {
20
- grid-column: span var(--axen-grid-sm, 12);
21
- }
22
- }
23
-
24
- /* md ≥ 900px */
25
- @media (min-width: 900px) {
26
- ._md_1asbx_26 {
27
- grid-column: span var(--axen-grid-md, 12);
28
- }
29
- }
30
-
31
- /* lg ≥ 1200px */
32
- @media (min-width: 1200px) {
33
- ._lg_1asbx_33 {
34
- grid-column: span var(--axen-grid-lg, 12);
35
- }
36
- }
37
-
38
- /* xl ≥ 1536px */
39
- @media (min-width: 1536px) {
40
- ._xl_1asbx_40 {
41
- grid-column: span var(--axen-grid-xl, 12);
42
- }
43
- }
@@ -1,3 +0,0 @@
1
- ._stack_1m70l_1 {
2
- min-width: 0;
3
- }
@@ -1,22 +0,0 @@
1
- /* ═══════════════════════════════════════════════
2
- axen-form Field Group / Section Styles
3
- ═══════════════════════════════════════════════ */
4
-
5
- ._fieldGroup_1864u_5 {
6
- display: contents; /* Inherit parent grid flow */
7
- }
8
-
9
- ._groupLabel_1864u_9 {
10
- grid-column: 1 / -1;
11
- font-size: var(--axen-font-size-md, 1rem);
12
- font-weight: var(--axen-font-weight-bold, 600);
13
- color: var(--axen-color-primary, #1976d2);
14
- padding-bottom: var(--axen-space-xs, 0.25rem);
15
- border-bottom: 2px solid var(--axen-color-primary-light, #e3f2fd);
16
- margin-top: var(--axen-space-md, 1rem);
17
- margin-bottom: var(--axen-space-xs, 0.25rem);
18
- }
19
-
20
- ._fieldGroup_1864u_5:first-child > ._groupLabel_1864u_9 {
21
- margin-top: 0;
22
- }
@@ -1,38 +0,0 @@
1
- /* ═══════════════════════════════════════════════
2
- axen-form Grid Cell — Responsive colSpan
3
- Uses CSS custom properties + media queries
4
- ═══════════════════════════════════════════════ */
5
-
6
- ._cell_s3hwz_6 {
7
- --_col: var(--col-xs, 12);
8
- grid-column: span var(--_col);
9
- min-width: 0; /* Prevent grid blowout from long content */
10
- }
11
-
12
- /* sm ≥ 600px */
13
- @media (min-width: 600px) {
14
- ._cell_s3hwz_6 {
15
- --_col: var(--col-sm, var(--col-xs, 12));
16
- }
17
- }
18
-
19
- /* md ≥ 900px */
20
- @media (min-width: 900px) {
21
- ._cell_s3hwz_6 {
22
- --_col: var(--col-md, var(--col-sm, var(--col-xs, 12)));
23
- }
24
- }
25
-
26
- /* lg ≥ 1200px */
27
- @media (min-width: 1200px) {
28
- ._cell_s3hwz_6 {
29
- --_col: var(--col-lg, var(--col-md, var(--col-sm, var(--col-xs, 12))));
30
- }
31
- }
32
-
33
- /* xl ≥ 1536px */
34
- @media (min-width: 1536px) {
35
- ._cell_s3hwz_6 {
36
- --_col: var(--col-xl, var(--col-lg, var(--col-md, var(--col-sm, var(--col-xs, 12)))));
37
- }
38
- }
@@ -1,68 +0,0 @@
1
- /* ═══════════════════════════════════════════════
2
- axen-form CSS Reset
3
- Minimal reset for form elements
4
- ═══════════════════════════════════════════════ */
5
-
6
- *,
7
- *::before,
8
- *::after {
9
- box-sizing: border-box;
10
- }
11
-
12
- /* Reset form element defaults */
13
- input,
14
- textarea,
15
- select,
16
- button {
17
- font-family: inherit;
18
- font-size: inherit;
19
- line-height: inherit;
20
- color: inherit;
21
- margin: 0;
22
- }
23
-
24
- /* Remove default styling from number inputs */
25
- input[type='number']::-webkit-inner-spin-button,
26
- input[type='number']::-webkit-outer-spin-button {
27
- -webkit-appearance: none;
28
- margin: 0;
29
- }
30
-
31
- input[type='number'] {
32
- -moz-appearance: textfield;
33
- appearance: textfield;
34
- }
35
-
36
- /* Remove default date/time input icons if using custom components */
37
- input[type='date']::-webkit-calendar-picker-indicator,
38
- input[type='time']::-webkit-calendar-picker-indicator,
39
- input[type='datetime-local']::-webkit-calendar-picker-indicator {
40
- cursor: pointer;
41
- }
42
-
43
- /* Ensure fieldset/legend reset */
44
- fieldset {
45
- border: none;
46
- padding: 0;
47
- margin: 0;
48
- }
49
-
50
- legend {
51
- padding: 0;
52
- }
53
-
54
- /* Remove textarea resize handle (can be overridden) */
55
- textarea {
56
- resize: vertical;
57
- }
58
-
59
- /* Focus visible only — keyboard navigation (A11y) */
60
- :focus:not(:focus-visible) {
61
- outline: none;
62
- }
63
-
64
- :focus-visible {
65
- outline: var(--axen-focus-ring-width, 2px) solid
66
- var(--axen-focus-ring-color, rgba(25, 118, 210, 0.5));
67
- outline-offset: var(--axen-focus-ring-offset, 2px);
68
- }
@@ -1,31 +0,0 @@
1
- /* ═══════════════════════════════════════════════
2
- axen-form Built-in Theme Presets
3
- Applied via data-axen-theme attribute on form
4
- ═══════════════════════════════════════════════ */
5
-
6
- /* ── Default Theme (Blue) ────────────────────── */
7
- [data-axen-theme='default'] {
8
- --axen-color-primary: #1976d2;
9
- --axen-color-primary-hover: #1565c0;
10
- --axen-color-primary-light: #e3f2fd;
11
- --axen-color-input-bg: #f0f7ff;
12
- --axen-color-label: #1565c0;
13
- }
14
-
15
- /* ── Subtle Theme (Gray) ─────────────────────── */
16
- [data-axen-theme='subtle'] {
17
- --axen-color-primary: #546e7a;
18
- --axen-color-primary-hover: #37474f;
19
- --axen-color-primary-light: #eceff1;
20
- --axen-color-input-bg: #f5f5f5;
21
- --axen-color-label: #37474f;
22
- }
23
-
24
- /* ── Green Theme ─────────────────────────────── */
25
- [data-axen-theme='green'] {
26
- --axen-color-primary: #2e7d32;
27
- --axen-color-primary-hover: #1b5e20;
28
- --axen-color-primary-light: #e8f5e9;
29
- --axen-color-input-bg: #f1f8e9;
30
- --axen-color-label: #1b5e20;
31
- }
@@ -1,120 +0,0 @@
1
- /* ═══════════════════════════════════════════════
2
- axen-form Design Tokens
3
- CSS Custom Properties — A11y-aware & Responsive
4
- ═══════════════════════════════════════════════ */
5
-
6
- :root {
7
- /* ── Color Palette ─────────────────────────── */
8
- --axen-color-primary: #1976d2;
9
- --axen-color-primary-hover: #1565c0;
10
- --axen-color-primary-light: #e3f2fd;
11
- --axen-color-error: #d32f2f;
12
- --axen-color-error-light: #fdecea;
13
- --axen-color-success: #2e7d32;
14
- --axen-color-warning: #ed6c02;
15
- --axen-color-text: #1a1a1a;
16
- --axen-color-text-secondary: #666666;
17
- --axen-color-text-disabled: #9e9e9e;
18
- --axen-color-border: #d0d5dd;
19
- --axen-color-border-hover: #888888;
20
- --axen-color-border-focus: var(--axen-color-primary);
21
- --axen-color-bg: #ffffff;
22
- --axen-color-bg-disabled: #f5f5f5;
23
- --axen-color-bg-hover: #fafafa;
24
- --axen-color-input-bg: #f0f7ff;
25
- --axen-color-label: var(--axen-color-text);
26
-
27
- /* ── Typography ────────────────────────────── */
28
- --axen-font-family:
29
- -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
30
- --axen-font-size-xs: 0.75rem;
31
- --axen-font-size-sm: 0.875rem;
32
- --axen-font-size-md: 1rem;
33
- --axen-font-size-lg: 1.125rem;
34
- --axen-font-weight-normal: 400;
35
- --axen-font-weight-medium: 500;
36
- --axen-font-weight-bold: 600;
37
- --axen-line-height: 1.5;
38
-
39
- /* ── Spacing ───────────────────────────────── */
40
- --axen-space-xs: 0.25rem;
41
- --axen-space-sm: 0.5rem;
42
- --axen-space-md: 1rem;
43
- --axen-space-lg: 1.5rem;
44
- --axen-space-xl: 2rem;
45
-
46
- /* ── Border & Radius ───────────────────────── */
47
- --axen-border-width: 1px;
48
- --axen-border-radius: 8px;
49
- --axen-border-radius-sm: 4px;
50
- --axen-border-radius-lg: 10px;
51
- --axen-border-radius-pill: 9999px;
52
-
53
- /* ── Focus Ring (A11y: WCAG 2.4.7) ─────────── */
54
- --axen-focus-ring-width: 2px;
55
- --axen-focus-ring-offset: 2px;
56
- --axen-focus-ring-color: rgba(25, 118, 210, 0.5);
57
-
58
- /* ── Field Sizing ──────────────────────────── */
59
- --axen-field-height: 2.75rem;
60
- --axen-field-min-height: 44px; /* A11y: min 44px touch target */
61
- --axen-field-padding-x: 0.75rem;
62
- --axen-field-padding-y: 0.5rem;
63
- --axen-label-margin-bottom: 0.375rem;
64
- --axen-helper-margin-top: 0.25rem;
65
-
66
- /* ── Transitions ───────────────────────────── */
67
- --axen-transition-fast: 150ms ease;
68
- --axen-transition-normal: 200ms ease;
69
-
70
- /* ── Shadows ───────────────────────────────── */
71
- --axen-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
72
- --axen-shadow-focus: 0 0 0 var(--axen-focus-ring-width) var(--axen-focus-ring-color);
73
-
74
- /* ── Breakpoints (for reference in JS) ─────── */
75
- --axen-bp-sm: 600px;
76
- --axen-bp-md: 900px;
77
- --axen-bp-lg: 1200px;
78
- --axen-bp-xl: 1536px;
79
-
80
- /* ── Z-index layers ────────────────────────── */
81
- --axen-z-dropdown: 100;
82
- --axen-z-tooltip: 200;
83
- }
84
-
85
- /* ── Dark Mode (respects system) ────────────── */
86
- @media (prefers-color-scheme: dark) {
87
- :root {
88
- --axen-color-text: #e0e0e0;
89
- --axen-color-text-secondary: #a0a0a0;
90
- --axen-color-text-disabled: #666666;
91
- --axen-color-border: #555555;
92
- --axen-color-border-hover: #888888;
93
- --axen-color-bg: #1e1e1e;
94
- --axen-color-bg-disabled: #2a2a2a;
95
- --axen-color-bg-hover: #2e2e2e;
96
- --axen-color-primary-light: #1a3a5c;
97
- --axen-color-error-light: #3d1c1c;
98
- --axen-focus-ring-color: rgba(66, 165, 245, 0.6);
99
- }
100
- }
101
-
102
- /* ── High Contrast Mode (A11y) ──────────────── */
103
- @media (prefers-contrast: more) {
104
- :root {
105
- --axen-color-border: #000000;
106
- --axen-color-text: #000000;
107
- --axen-color-text-secondary: #333333;
108
- --axen-border-width: 2px;
109
- --axen-focus-ring-width: 3px;
110
- --axen-focus-ring-color: rgba(0, 0, 0, 0.8);
111
- }
112
- }
113
-
114
- /* ── Reduced Motion (A11y: WCAG 2.3.3) ──────── */
115
- @media (prefers-reduced-motion: reduce) {
116
- :root {
117
- --axen-transition-fast: 0ms;
118
- --axen-transition-normal: 0ms;
119
- }
120
- }