@auriel/peppertino 0.1.1 → 0.3.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 (45) hide show
  1. package/CHANGELOG.txt +136 -0
  2. package/README.md +343 -30
  3. package/build.js +27 -12
  4. package/dist/carousel.js +152 -0
  5. package/dist/carousel.js.map +7 -0
  6. package/dist/header.js +69 -0
  7. package/dist/header.js.map +7 -0
  8. package/dist/main.css +2780 -0
  9. package/dist/main.css.map +1 -0
  10. package/dist/modal.js +112 -0
  11. package/dist/modal.js.map +7 -0
  12. package/dist/peppertino.js +637 -0
  13. package/dist/peppertino.js.map +7 -0
  14. package/dist/select.js +99 -0
  15. package/dist/select.js.map +7 -0
  16. package/dist/tabs.js +79 -0
  17. package/dist/tabs.js.map +7 -0
  18. package/dist/validation.js +130 -0
  19. package/dist/validation.js.map +7 -0
  20. package/index.html +1137 -22
  21. package/package.json +1 -1
  22. package/src/js/carousel.js +148 -0
  23. package/src/js/header.js +43 -4
  24. package/src/js/modal.js +134 -0
  25. package/src/js/peppertino.js +9 -0
  26. package/src/js/select.js +103 -0
  27. package/src/js/tabs.js +94 -0
  28. package/src/js/validation.js +132 -0
  29. package/src/scss/base.scss +26 -6
  30. package/src/scss/button.scss +87 -20
  31. package/src/scss/card.scss +121 -0
  32. package/src/scss/carousel.scss +313 -0
  33. package/src/scss/footer.scss +224 -0
  34. package/src/scss/forms/fieldset.scss +127 -0
  35. package/src/scss/forms/form-instructions.scss +133 -0
  36. package/src/scss/forms/label.scss +115 -0
  37. package/src/scss/forms/text-field.scss +240 -0
  38. package/src/scss/forms/validation.scss +215 -0
  39. package/src/scss/forms.scss +8 -0
  40. package/src/scss/header.scss +27 -6
  41. package/src/scss/main.scss +7 -0
  42. package/src/scss/modal.scss +188 -0
  43. package/src/scss/section.scss +1 -1
  44. package/src/scss/select.scss +210 -0
  45. package/src/scss/tabs.scss +156 -0
@@ -0,0 +1,133 @@
1
+ // PeppertinoCSS — Forms / Form Instructions
2
+
3
+ @use 'sass:map';
4
+ @use '../base' as *;
5
+
6
+ // ─── Pre-form instructions block ─────────────────────────────────────────────
7
+ .pp-form-instructions {
8
+ display: flex;
9
+ flex-direction: column;
10
+ gap: spacing(2);
11
+ width: 100%;
12
+ padding: spacing(4) spacing(5);
13
+ border-left: 3px solid $color-primary;
14
+ border-radius: 0 map.get($radius, 'md') map.get($radius, 'md') 0;
15
+ background: rgba($color-primary, 0.04);
16
+ font-family: $font-sans;
17
+ }
18
+
19
+ .pp-form-instructions__title {
20
+ font-size: font-size('sm');
21
+ font-weight: map.get($font-weights, 'semibold');
22
+ color: $color-neutral-800;
23
+ line-height: 1.4;
24
+ }
25
+
26
+ .pp-form-instructions__list {
27
+ display: flex;
28
+ flex-direction: column;
29
+ gap: spacing(1);
30
+ list-style: none;
31
+ padding: 0;
32
+ margin: 0;
33
+ }
34
+
35
+ .pp-form-instructions__item {
36
+ display: flex;
37
+ align-items: flex-start;
38
+ gap: spacing(2);
39
+ font-size: font-size('sm');
40
+ font-weight: map.get($font-weights, 'regular');
41
+ color: $color-neutral-600;
42
+ line-height: 1.6;
43
+
44
+ &::before {
45
+ content: '';
46
+ flex-shrink: 0;
47
+ width: 5px;
48
+ height: 5px;
49
+ margin-top: 0.45em;
50
+ border-radius: 50%;
51
+ background: $color-primary;
52
+ }
53
+ }
54
+
55
+ // ─── Variants ────────────────────────────────────────────────────────────────
56
+ .pp-form-instructions--neutral {
57
+ border-left-color: $color-neutral-400;
58
+ background: $color-neutral-50;
59
+
60
+ .pp-form-instructions__item::before { background: $color-neutral-400; }
61
+ }
62
+
63
+ .pp-form-instructions--warning {
64
+ border-left-color: $color-warning;
65
+ background: rgba($color-warning, 0.06);
66
+
67
+ .pp-form-instructions__title { color: #92400e; }
68
+ .pp-form-instructions__item { color: #92400e; }
69
+ .pp-form-instructions__item::before { background: $color-warning; }
70
+ }
71
+
72
+ .pp-form-instructions--error {
73
+ border-left-color: $color-error;
74
+ background: rgba($color-error, 0.05);
75
+
76
+ .pp-form-instructions__title { color: $color-primary-dark; }
77
+ .pp-form-instructions__item { color: $color-primary-dark; }
78
+ .pp-form-instructions__item::before { background: $color-error; }
79
+ }
80
+
81
+ // ─── In-form hint ─────────────────────────────────────────────────────────────
82
+ .pp-form-hint {
83
+ display: flex;
84
+ align-items: flex-start;
85
+ gap: spacing(2);
86
+ font-family: $font-sans;
87
+ font-size: font-size('xs');
88
+ font-weight: map.get($font-weights, 'regular');
89
+ color: $color-neutral-600;
90
+ line-height: 1.6;
91
+ padding: spacing(2) 0;
92
+
93
+ [data-lucide], svg {
94
+ flex-shrink: 0;
95
+ width: 14px;
96
+ height: 14px;
97
+ margin-top: 1px;
98
+ stroke: $color-neutral-400;
99
+ fill: none;
100
+ stroke-width: 2;
101
+ stroke-linecap: round;
102
+ stroke-linejoin: round;
103
+ }
104
+ }
105
+
106
+ // ─── Required-field note ─────────────────────────────────────────────────────
107
+ .pp-form-required-note {
108
+ font-family: $font-sans;
109
+ font-size: font-size('xs');
110
+ color: $color-neutral-600;
111
+ line-height: 1.5;
112
+
113
+ abbr {
114
+ font-weight: map.get($font-weights, 'semibold');
115
+ color: $color-primary-dark;
116
+ text-decoration: none;
117
+ border: none;
118
+ }
119
+ }
120
+
121
+ // ─── Forced-colors ───────────────────────────────────────────────────────────
122
+ @media (forced-colors: active) {
123
+ .pp-form-instructions {
124
+ border-left-color: Highlight;
125
+ background: transparent;
126
+ forced-color-adjust: auto;
127
+ }
128
+
129
+ .pp-form-instructions__item::before {
130
+ background: Highlight;
131
+ forced-color-adjust: none;
132
+ }
133
+ }
@@ -0,0 +1,115 @@
1
+ // PeppertinoCSS — Forms / Label
2
+
3
+ @use 'sass:map';
4
+ @use '../base' as *;
5
+
6
+ :root {
7
+ --pp-label-primary: #{$color-neutral-900};
8
+ --pp-label-secondary: #{$color-neutral-500};
9
+ --pp-label-tertiary: #{$color-neutral-400};
10
+ --pp-label-quaternary: #{$color-neutral-300};
11
+ }
12
+
13
+ // ─── Base ─────────────────────────────────────────────────────────────────────
14
+ .pp-label {
15
+ display: inline-block;
16
+ font-family: $font-sans;
17
+ font-size: font-size('base');
18
+ font-weight: map.get($font-weights, 'regular');
19
+ line-height: 1.5;
20
+ letter-spacing: -0.011em;
21
+ color: var(--pp-label-primary);
22
+ user-select: none;
23
+ cursor: default;
24
+ max-width: 100%;
25
+ }
26
+
27
+ // ─── Importance tiers ────────────────────────────────────────────────────────
28
+ .pp-label--primary { color: var(--pp-label-primary); }
29
+ .pp-label--secondary { color: var(--pp-label-secondary); }
30
+ .pp-label--tertiary { color: var(--pp-label-tertiary); }
31
+ .pp-label--quaternary { color: var(--pp-label-quaternary); }
32
+
33
+ // ─── Size scale ──────────────────────────────────────────────────────────────
34
+ .pp-label--headline {
35
+ font-size: font-size('xl');
36
+ font-weight: map.get($font-weights, 'semibold');
37
+ letter-spacing: -0.02em;
38
+ line-height: 1.25;
39
+ }
40
+
41
+ .pp-label--subheadline {
42
+ font-size: font-size('base');
43
+ font-weight: map.get($font-weights, 'medium');
44
+ letter-spacing: -0.011em;
45
+ line-height: 1.4;
46
+ }
47
+
48
+ .pp-label--body {
49
+ font-size: font-size('base');
50
+ font-weight: map.get($font-weights, 'regular');
51
+ letter-spacing: -0.011em;
52
+ line-height: 1.5;
53
+ }
54
+
55
+ .pp-label--callout {
56
+ font-size: font-size('sm');
57
+ font-weight: map.get($font-weights, 'regular');
58
+ letter-spacing: -0.009em;
59
+ line-height: 1.5;
60
+ }
61
+
62
+ .pp-label--footnote {
63
+ font-size: font-size('xs');
64
+ font-weight: map.get($font-weights, 'regular');
65
+ letter-spacing: 0;
66
+ line-height: 1.4;
67
+ }
68
+
69
+ .pp-label--caption {
70
+ font-size: font-size('xs');
71
+ font-weight: map.get($font-weights, 'medium');
72
+ letter-spacing: 0.01em;
73
+ line-height: 1.4;
74
+ text-transform: uppercase;
75
+ }
76
+
77
+ // ─── Modifiers ───────────────────────────────────────────────────────────────
78
+ .pp-label--selectable {
79
+ user-select: text;
80
+ cursor: text;
81
+ }
82
+
83
+ .pp-label--truncate {
84
+ overflow: hidden;
85
+ text-overflow: ellipsis;
86
+ white-space: nowrap;
87
+ display: block;
88
+ }
89
+
90
+ // ─── Icon + label row ────────────────────────────────────────────────────────
91
+ .pp-label-row {
92
+ display: inline-flex;
93
+ align-items: center;
94
+ gap: spacing(2);
95
+ color: var(--pp-label-primary);
96
+
97
+ svg,
98
+ [data-lucide] {
99
+ flex-shrink: 0;
100
+ width: 1em;
101
+ height: 1em;
102
+ }
103
+ }
104
+
105
+ // ─── Forced-colors ───────────────────────────────────────────────────────────
106
+ @media (forced-colors: active) {
107
+ .pp-label,
108
+ .pp-label--primary,
109
+ .pp-label--secondary,
110
+ .pp-label--tertiary,
111
+ .pp-label--quaternary {
112
+ color: ButtonText;
113
+ forced-color-adjust: auto;
114
+ }
115
+ }
@@ -0,0 +1,240 @@
1
+ // PeppertinoCSS — Forms / Text Field
2
+
3
+ @use 'sass:map';
4
+ @use '../base' as *;
5
+
6
+ // ─── Field wrapper ────────────────────────────────────────────────────────────
7
+ .pp-field {
8
+ display: flex;
9
+ flex-direction: column;
10
+ gap: spacing(1);
11
+ width: 100%;
12
+ }
13
+
14
+ // ─── Label row ───────────────────────────────────────────────────────────────
15
+ .pp-field__label {
16
+ display: flex;
17
+ align-items: baseline;
18
+ gap: spacing(2);
19
+ font-family: $font-sans;
20
+ font-size: font-size('sm');
21
+ font-weight: map.get($font-weights, 'medium');
22
+ color: $color-neutral-700;
23
+ line-height: 1.4;
24
+ cursor: default;
25
+ }
26
+
27
+ .pp-field__required {
28
+ font-style: normal;
29
+ font-size: font-size('sm');
30
+ font-weight: map.get($font-weights, 'semibold');
31
+ color: $color-primary-dark;
32
+ text-decoration: none;
33
+ border: none;
34
+ cursor: default;
35
+
36
+ &::before { content: '*'; }
37
+ }
38
+
39
+ .pp-field__optional {
40
+ font-size: font-size('xs');
41
+ font-weight: map.get($font-weights, 'regular');
42
+ color: $color-neutral-400;
43
+ letter-spacing: 0.02em;
44
+ }
45
+
46
+ // ─── Input / Textarea ─────────────────────────────────────────────────────────
47
+ .pp-field__input,
48
+ .pp-field__textarea {
49
+ display: block;
50
+ width: 100%;
51
+ font-family: $font-sans;
52
+ font-size: font-size('base');
53
+ font-weight: map.get($font-weights, 'regular');
54
+ color: $color-on-surface;
55
+ background: #fff;
56
+ border: 1px solid $color-border;
57
+ border-radius: map.get($radius, 'md');
58
+ padding: 10px spacing(4);
59
+ transition: border-color $transition-fast, box-shadow $transition-fast;
60
+ outline: none;
61
+ appearance: none;
62
+ -webkit-appearance: none;
63
+
64
+ &::placeholder {
65
+ color: $color-neutral-500;
66
+ opacity: 1;
67
+ }
68
+
69
+ &:hover:not(:disabled):not([aria-disabled='true']) {
70
+ border-color: $color-neutral-400;
71
+ }
72
+
73
+ &:focus {
74
+ border-color: $color-primary;
75
+ box-shadow: 0 0 0 3px rgba($color-primary, 0.12);
76
+ }
77
+
78
+ &:disabled,
79
+ &[aria-disabled='true'] {
80
+ opacity: 0.5;
81
+ cursor: not-allowed;
82
+ background: $color-neutral-100;
83
+ }
84
+
85
+ &[readonly] {
86
+ background: $color-neutral-50;
87
+ color: $color-neutral-600;
88
+ cursor: default;
89
+ }
90
+ }
91
+
92
+ .pp-field__textarea {
93
+ padding: spacing(3) spacing(4);
94
+ resize: vertical;
95
+ min-height: 96px;
96
+ line-height: 1.6;
97
+ }
98
+
99
+ // ─── Hint text ───────────────────────────────────────────────────────────────
100
+ .pp-field__hint {
101
+ font-family: $font-sans;
102
+ font-size: font-size('xs');
103
+ font-weight: map.get($font-weights, 'regular');
104
+ color: $color-neutral-600;
105
+ line-height: 1.5;
106
+ }
107
+
108
+ // ─── Validation message ───────────────────────────────────────────────────────
109
+ .pp-field__message {
110
+ display: flex;
111
+ align-items: flex-start;
112
+ gap: spacing(1);
113
+ font-family: $font-sans;
114
+ font-size: font-size('xs');
115
+ font-weight: map.get($font-weights, 'medium');
116
+ line-height: 1.5;
117
+
118
+ [data-lucide],
119
+ svg {
120
+ flex-shrink: 0;
121
+ width: 14px;
122
+ height: 14px;
123
+ margin-top: 1px;
124
+ stroke: currentColor;
125
+ fill: none;
126
+ stroke-width: 2;
127
+ stroke-linecap: round;
128
+ stroke-linejoin: round;
129
+ }
130
+ }
131
+
132
+ // ─── Validation states ────────────────────────────────────────────────────────
133
+ .pp-field--error {
134
+ .pp-field__input,
135
+ .pp-field__textarea {
136
+ border-color: $color-error;
137
+ &:focus { border-color: $color-error; box-shadow: 0 0 0 3px rgba($color-error, 0.12); }
138
+ }
139
+ .pp-field__message {
140
+ color: $color-primary-dark;
141
+ [data-lucide], svg { stroke: $color-error; }
142
+ }
143
+ }
144
+
145
+ .pp-field--success {
146
+ .pp-field__input,
147
+ .pp-field__textarea {
148
+ border-color: $color-success;
149
+ &:focus { border-color: $color-success; box-shadow: 0 0 0 3px rgba($color-success, 0.12); }
150
+ }
151
+ .pp-field__message {
152
+ color: #15803d;
153
+ [data-lucide], svg { stroke: $color-success; }
154
+ }
155
+ }
156
+
157
+ .pp-field--warning {
158
+ .pp-field__input,
159
+ .pp-field__textarea {
160
+ border-color: $color-warning;
161
+ &:focus { border-color: $color-warning; box-shadow: 0 0 0 3px rgba($color-warning, 0.12); }
162
+ }
163
+ .pp-field__message {
164
+ color: #92400e;
165
+ [data-lucide], svg { stroke: $color-warning; }
166
+ }
167
+ }
168
+
169
+ // ─── Sizes ────────────────────────────────────────────────────────────────────
170
+ .pp-field--sm {
171
+ .pp-field__input,
172
+ .pp-field__textarea {
173
+ padding: spacing(1) spacing(3);
174
+ font-size: font-size('sm');
175
+ border-radius: map.get($radius, 'base');
176
+ }
177
+ }
178
+
179
+ .pp-field--lg {
180
+ .pp-field__input,
181
+ .pp-field__textarea {
182
+ padding: spacing(3) spacing(5);
183
+ font-size: font-size('lg');
184
+ border-radius: map.get($radius, 'lg');
185
+ }
186
+ }
187
+
188
+ // ─── Icon wrap ────────────────────────────────────────────────────────────────
189
+ .pp-field__input-wrap {
190
+ position: relative;
191
+ display: flex;
192
+ align-items: center;
193
+
194
+ .pp-field__input { padding-left: spacing(10); }
195
+ &--trail .pp-field__input { padding-right: spacing(10); }
196
+ }
197
+
198
+ .pp-field__icon {
199
+ position: absolute;
200
+ left: spacing(3);
201
+ display: flex;
202
+ align-items: center;
203
+ pointer-events: none;
204
+ color: $color-neutral-400;
205
+
206
+ [data-lucide], svg {
207
+ width: 16px;
208
+ height: 16px;
209
+ stroke: currentColor;
210
+ fill: none;
211
+ stroke-width: 2;
212
+ stroke-linecap: round;
213
+ stroke-linejoin: round;
214
+ }
215
+
216
+ &--trail { left: auto; right: spacing(3); }
217
+ }
218
+
219
+ // ─── Character count ──────────────────────────────────────────────────────────
220
+ .pp-field__count {
221
+ font-family: $font-sans;
222
+ font-size: font-size('xs');
223
+ color: $color-neutral-400;
224
+ text-align: right;
225
+ line-height: 1.4;
226
+
227
+ &--warn { color: #92400e; }
228
+ &--over { color: $color-primary-dark; font-weight: map.get($font-weights, 'medium'); }
229
+ }
230
+
231
+ // ─── Forced-colors ───────────────────────────────────────────────────────────
232
+ @media (forced-colors: active) {
233
+ .pp-field__input,
234
+ .pp-field__textarea {
235
+ border-color: ButtonText;
236
+ forced-color-adjust: auto;
237
+ }
238
+
239
+ .pp-field__required { color: LinkText; }
240
+ }
@@ -0,0 +1,215 @@
1
+ // PeppertinoCSS — Forms / Validation
2
+
3
+ @use 'sass:map';
4
+ @use '../base' as *;
5
+
6
+ // ─── Native pseudo-class states ───────────────────────────────────────────────
7
+ .pp-field--validate {
8
+ .pp-field__input:valid,
9
+ .pp-field__textarea:valid {
10
+ border-color: $color-success;
11
+ &:focus { box-shadow: 0 0 0 3px rgba($color-success, 0.12); }
12
+ }
13
+
14
+ .pp-field__input:invalid,
15
+ .pp-field__textarea:invalid {
16
+ border-color: $color-error;
17
+ &:focus { box-shadow: 0 0 0 3px rgba($color-error, 0.12); }
18
+ }
19
+
20
+ .pp-field__input:user-valid,
21
+ .pp-field__textarea:user-valid { border-color: $color-success; }
22
+
23
+ .pp-field__input:user-invalid,
24
+ .pp-field__textarea:user-invalid { border-color: $color-error; }
25
+ }
26
+
27
+ // ─── aria-invalid attribute states ───────────────────────────────────────────
28
+ .pp-field__input[aria-invalid='true'],
29
+ .pp-field__textarea[aria-invalid='true'] {
30
+ border-color: $color-error;
31
+ &:focus { border-color: $color-error; box-shadow: 0 0 0 3px rgba($color-error, 0.12); }
32
+ }
33
+
34
+ .pp-field__input[aria-invalid='false'],
35
+ .pp-field__textarea[aria-invalid='false'] {
36
+ border-color: $color-success;
37
+ &:focus { border-color: $color-success; box-shadow: 0 0 0 3px rgba($color-success, 0.12); }
38
+ }
39
+
40
+ // ─── Validating (async in progress) ──────────────────────────────────────────
41
+ .pp-field--validating {
42
+ .pp-field__input,
43
+ .pp-field__textarea {
44
+ border-color: $color-neutral-300;
45
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 1 1-6.219-8.56'/%3E%3C/svg%3E");
46
+ background-repeat: no-repeat;
47
+ background-position: right spacing(3) center;
48
+ background-size: 16px;
49
+ padding-right: spacing(10);
50
+ animation: pp-field-spin 0.8s linear infinite;
51
+ }
52
+ }
53
+
54
+ @keyframes pp-field-spin {
55
+ from { filter: none; }
56
+ to { filter: hue-rotate(360deg); }
57
+ }
58
+
59
+ // ─── Validation summary ───────────────────────────────────────────────────────
60
+ .pp-validation-summary {
61
+ display: flex;
62
+ flex-direction: column;
63
+ gap: spacing(3);
64
+ padding: spacing(4) spacing(5);
65
+ background: rgba($color-error, 0.05);
66
+ border: 1px solid rgba($color-error, 0.3);
67
+ border-left: 3px solid $color-error;
68
+ border-radius: 0 map.get($radius, 'md') map.get($radius, 'md') 0;
69
+ width: 100%;
70
+
71
+ &:not(.is-visible):not([aria-hidden='false']) { display: none; }
72
+ }
73
+
74
+ .pp-validation-summary__title {
75
+ display: flex;
76
+ align-items: center;
77
+ gap: spacing(2);
78
+ font-family: $font-sans;
79
+ font-size: font-size('sm');
80
+ font-weight: map.get($font-weights, 'semibold');
81
+ color: $color-primary-dark;
82
+ line-height: 1.4;
83
+
84
+ [data-lucide], svg {
85
+ flex-shrink: 0;
86
+ width: 16px;
87
+ height: 16px;
88
+ stroke: $color-error;
89
+ fill: none;
90
+ stroke-width: 2;
91
+ stroke-linecap: round;
92
+ stroke-linejoin: round;
93
+ }
94
+ }
95
+
96
+ .pp-validation-summary__list {
97
+ display: flex;
98
+ flex-direction: column;
99
+ gap: spacing(1);
100
+ list-style: none;
101
+ padding: 0;
102
+ margin: 0;
103
+ }
104
+
105
+ .pp-validation-summary__item {
106
+ display: flex;
107
+ align-items: baseline;
108
+ gap: spacing(2);
109
+ font-family: $font-sans;
110
+ font-size: font-size('sm');
111
+ color: $color-primary-dark;
112
+ line-height: 1.6;
113
+
114
+ &::before {
115
+ content: '';
116
+ flex-shrink: 0;
117
+ width: 5px;
118
+ height: 5px;
119
+ margin-bottom: 1px;
120
+ border-radius: 50%;
121
+ background: $color-error;
122
+ align-self: center;
123
+ }
124
+
125
+ a {
126
+ color: $color-primary-dark;
127
+ text-decoration: underline;
128
+ text-underline-offset: 2px;
129
+ font-weight: map.get($font-weights, 'medium');
130
+ transition: color $transition-fast;
131
+
132
+ &:hover { color: $color-primary; }
133
+ &:focus-visible {
134
+ outline: 2px solid $color-primary;
135
+ outline-offset: 2px;
136
+ border-radius: 2px;
137
+ }
138
+ }
139
+ }
140
+
141
+ // ─── Confirmation checkbox ────────────────────────────────────────────────────
142
+ .pp-confirm {
143
+ display: flex;
144
+ align-items: flex-start;
145
+ gap: spacing(3);
146
+ padding: spacing(4);
147
+ background: $color-neutral-50;
148
+ border: 1px solid $color-border;
149
+ border-radius: map.get($radius, 'md');
150
+ cursor: pointer;
151
+ transition: border-color $transition-fast, background $transition-fast;
152
+
153
+ &:has(input:checked) {
154
+ border-color: $color-primary;
155
+ background: rgba($color-primary, 0.04);
156
+ }
157
+
158
+ &:has(input:focus-visible) {
159
+ outline: 2px solid $color-primary;
160
+ outline-offset: 2px;
161
+ }
162
+ }
163
+
164
+ .pp-confirm__input {
165
+ flex-shrink: 0;
166
+ width: 18px;
167
+ height: 18px;
168
+ margin-top: 1px;
169
+ accent-color: $color-primary;
170
+ cursor: pointer;
171
+
172
+ &:focus-visible { outline: none; }
173
+ }
174
+
175
+ .pp-confirm__label {
176
+ font-family: $font-sans;
177
+ font-size: font-size('sm');
178
+ font-weight: map.get($font-weights, 'regular');
179
+ color: $color-neutral-700;
180
+ line-height: 1.6;
181
+ cursor: pointer;
182
+ user-select: none;
183
+ }
184
+
185
+ .pp-confirm--destructive {
186
+ border-color: rgba($color-error, 0.3);
187
+ background: rgba($color-error, 0.03);
188
+
189
+ &:has(input:checked) {
190
+ border-color: $color-error;
191
+ background: rgba($color-error, 0.06);
192
+ }
193
+
194
+ .pp-confirm__label { color: $color-primary-dark; }
195
+ }
196
+
197
+ // Gated submit — disabled until confirmation checkbox is checked
198
+ form:has(.pp-confirm__input:not(:checked)) [type='submit'].pp-submit--gated {
199
+ opacity: 0.4;
200
+ pointer-events: none;
201
+ cursor: not-allowed;
202
+ }
203
+
204
+ // ─── Forced-colors ───────────────────────────────────────────────────────────
205
+ @media (forced-colors: active) {
206
+ .pp-validation-summary {
207
+ border-color: Mark;
208
+ forced-color-adjust: auto;
209
+ }
210
+
211
+ .pp-confirm {
212
+ border-color: ButtonText;
213
+ forced-color-adjust: auto;
214
+ }
215
+ }
@@ -0,0 +1,8 @@
1
+ // PeppertinoCSS — Forms
2
+ // Aggregates all form component partials in alphabetical order.
3
+
4
+ @use 'forms/fieldset';
5
+ @use 'forms/form-instructions';
6
+ @use 'forms/label';
7
+ @use 'forms/text-field';
8
+ @use 'forms/validation';