@carissa-io/theme-default 0.3.7 → 0.3.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carissa-io/theme-default",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "description": "Carissa UI: the default theme (Swiss minimalism) as SCSS variable overrides of the Carissa components, with a compiled CSS build",
5
5
  "type": "module",
6
6
  "style": "dist/index.css",
@@ -75,7 +75,25 @@
75
75
  "@carissa-io/components-sidebar": "^0.1.0",
76
76
  "@carissa-io/components-navbar": "^0.1.0",
77
77
  "@carissa-io/components-drawer": "^0.1.0",
78
- "@carissa-io/components-menu": "^0.1.0"
78
+ "@carissa-io/components-menu": "^0.1.0",
79
+ "@carissa-io/components-table": "^0.1.0",
80
+ "@carissa-io/components-list": "^0.1.0",
81
+ "@carissa-io/components-description-list": "^0.1.0",
82
+ "@carissa-io/components-stat": "^0.1.0",
83
+ "@carissa-io/components-empty-state": "^0.1.0",
84
+ "@carissa-io/components-timeline": "^0.1.0",
85
+ "@carissa-io/components-tree": "^0.1.0",
86
+ "@carissa-io/components-code": "^0.1.0",
87
+ "@carissa-io/components-field": "^0.1.0",
88
+ "@carissa-io/components-number-input": "^0.1.0",
89
+ "@carissa-io/components-otp-input": "^0.1.0",
90
+ "@carissa-io/components-phone": "^0.1.0",
91
+ "@carissa-io/components-tag-input": "^0.1.0",
92
+ "@carissa-io/components-time-picker": "^0.1.0",
93
+ "@carissa-io/components-date-range": "^0.1.0",
94
+ "@carissa-io/components-rating": "^0.1.0",
95
+ "@carissa-io/components-color-picker": "^0.1.0",
96
+ "@carissa-io/components-async-autocomplete": "^0.1.0"
79
97
  },
80
98
  "peerDependenciesMeta": {
81
99
  "@carissa-io/components-input": {
@@ -203,11 +221,66 @@
203
221
  },
204
222
  "@carissa-io/components-menu": {
205
223
  "optional": true
224
+ },
225
+ "@carissa-io/components-table": {
226
+ "optional": true
227
+ },
228
+ "@carissa-io/components-list": {
229
+ "optional": true
230
+ },
231
+ "@carissa-io/components-description-list": {
232
+ "optional": true
233
+ },
234
+ "@carissa-io/components-stat": {
235
+ "optional": true
236
+ },
237
+ "@carissa-io/components-empty-state": {
238
+ "optional": true
239
+ },
240
+ "@carissa-io/components-timeline": {
241
+ "optional": true
242
+ },
243
+ "@carissa-io/components-tree": {
244
+ "optional": true
245
+ },
246
+ "@carissa-io/components-code": {
247
+ "optional": true
248
+ },
249
+ "@carissa-io/components-field": {
250
+ "optional": true
251
+ },
252
+ "@carissa-io/components-number-input": {
253
+ "optional": true
254
+ },
255
+ "@carissa-io/components-otp-input": {
256
+ "optional": true
257
+ },
258
+ "@carissa-io/components-phone": {
259
+ "optional": true
260
+ },
261
+ "@carissa-io/components-tag-input": {
262
+ "optional": true
263
+ },
264
+ "@carissa-io/components-time-picker": {
265
+ "optional": true
266
+ },
267
+ "@carissa-io/components-date-range": {
268
+ "optional": true
269
+ },
270
+ "@carissa-io/components-rating": {
271
+ "optional": true
272
+ },
273
+ "@carissa-io/components-color-picker": {
274
+ "optional": true
275
+ },
276
+ "@carissa-io/components-async-autocomplete": {
277
+ "optional": true
206
278
  }
207
279
  },
208
280
  "devDependencies": {
209
281
  "@carissa-io/components-accordion": "^0.1.0",
210
282
  "@carissa-io/components-alert": "^0.1.0",
283
+ "@carissa-io/components-async-autocomplete": "^0.1.0",
211
284
  "@carissa-io/components-avatar": "^0.1.0",
212
285
  "@carissa-io/components-badge": "^0.1.0",
213
286
  "@carissa-io/components-breadcrumb": "^0.1.0",
@@ -215,33 +288,50 @@
215
288
  "@carissa-io/components-calendar": "^0.1.1",
216
289
  "@carissa-io/components-card": "^0.1.0",
217
290
  "@carissa-io/components-checkbox": "^0.1.1",
291
+ "@carissa-io/components-code": "^0.1.0",
292
+ "@carissa-io/components-color-picker": "^0.1.0",
218
293
  "@carissa-io/components-combobox": "^0.1.1",
219
294
  "@carissa-io/components-date-picker": "^0.1.1",
295
+ "@carissa-io/components-date-range": "^0.1.0",
296
+ "@carissa-io/components-description-list": "^0.1.0",
220
297
  "@carissa-io/components-divider": "^0.1.0",
221
298
  "@carissa-io/components-drawer": "^0.1.0",
299
+ "@carissa-io/components-empty-state": "^0.1.0",
300
+ "@carissa-io/components-field": "^0.1.0",
222
301
  "@carissa-io/components-input": "^0.2.1",
223
302
  "@carissa-io/components-link": "^0.1.0",
303
+ "@carissa-io/components-list": "^0.1.0",
224
304
  "@carissa-io/components-listbox": "^0.1.1",
225
305
  "@carissa-io/components-menu": "^0.1.0",
226
306
  "@carissa-io/components-modal": "^0.1.0",
227
307
  "@carissa-io/components-navbar": "^0.1.0",
308
+ "@carissa-io/components-number-input": "^0.1.0",
309
+ "@carissa-io/components-otp-input": "^0.1.0",
228
310
  "@carissa-io/components-pagination": "^0.1.0",
311
+ "@carissa-io/components-phone": "^0.1.0",
229
312
  "@carissa-io/components-popover": "^0.1.1",
230
313
  "@carissa-io/components-progress": "^0.1.0",
231
314
  "@carissa-io/components-prose": "^0.1.0",
232
315
  "@carissa-io/components-radio-group": "^0.1.1",
316
+ "@carissa-io/components-rating": "^0.1.0",
233
317
  "@carissa-io/components-search": "^0.1.1",
234
318
  "@carissa-io/components-select": "^0.1.1",
235
319
  "@carissa-io/components-sidebar": "^0.1.0",
236
320
  "@carissa-io/components-skeleton": "^0.1.0",
237
321
  "@carissa-io/components-slider": "^0.1.1",
238
322
  "@carissa-io/components-spinner": "^0.1.0",
323
+ "@carissa-io/components-stat": "^0.1.0",
239
324
  "@carissa-io/components-stepper": "^0.1.0",
240
325
  "@carissa-io/components-switch": "^0.1.1",
326
+ "@carissa-io/components-table": "^0.1.0",
241
327
  "@carissa-io/components-tabs": "^0.1.0",
242
328
  "@carissa-io/components-tag": "^0.1.0",
329
+ "@carissa-io/components-tag-input": "^0.1.0",
330
+ "@carissa-io/components-time-picker": "^0.1.0",
331
+ "@carissa-io/components-timeline": "^0.1.0",
243
332
  "@carissa-io/components-toast": "^0.1.0",
244
333
  "@carissa-io/components-tooltip": "^0.1.0",
334
+ "@carissa-io/components-tree": "^0.1.0",
245
335
  "@carissa-io/components-typography": "^0.1.0",
246
336
  "@carissa-io/components-upload": "^0.1.1",
247
337
  "sass-embedded": "^1.105.1",
package/scss/index.scss CHANGED
@@ -1177,3 +1177,423 @@
1177
1177
  $c-menu-separator-color: $var-muted,
1178
1178
  $c-menu-separator-margin: 0.25rem
1179
1179
  );
1180
+
1181
+ // Table: a --c-surface header (--c-text, bold) over rows divided by 1px --c-muted lines. Row hover is --c-surface-active, so it
1182
+ // still shows on a striped (--c-surface) row; the selected row is a 12% tint of --c-primary over the background, a mix of two
1183
+ // custom properties that follows the mode (text is 13:1 on it in both). The sticky header must be opaque so rows do not show
1184
+ // through: it is --c-surface, a custom property, so dark works. Square, the theme's 1px focus ring inside the cell.
1185
+ @use '@carissa-io/components-table/scss' as table with (
1186
+ $c-table-font-size: $font-size-small,
1187
+ $c-table-cell-padding-x: 1rem,
1188
+ $c-table-cell-padding-y: 0.75rem,
1189
+ $c-table-dense-cell-padding-x: 0.75rem,
1190
+ $c-table-dense-cell-padding-y: 0.375rem,
1191
+ $c-table-border-width: 1px,
1192
+ $c-table-border-color: $var-muted,
1193
+ $c-table-header-color: $var-text,
1194
+ $c-table-header-background: $var-surface,
1195
+ $c-table-header-font-weight: $font-weight-bold,
1196
+ $c-table-sticky-header-background: $var-surface,
1197
+ $c-table-row-background-hover: $var-surface-active,
1198
+ $c-table-row-background-striped: $var-surface,
1199
+ $c-table-row-background-selected: color-mix(in srgb, var(--c-primary) 12%, var(--c-background)),
1200
+ $c-table-foot-font-weight: $font-weight-bold,
1201
+ $c-table-caption-color: $var-muted,
1202
+ $c-table-focus-outline: $focus-width solid $var-focus,
1203
+ $c-table-focus-outline-offset: -2px
1204
+ );
1205
+
1206
+ // List: rows on the page background, divided by 1px --c-muted lines. The secondary text is --c-text at the small size, not
1207
+ // --c-muted, because the row sits on --c-surface-active when hovered and --c-muted is only 3.8:1 there (4.35:1 on --c-surface).
1208
+ // Hover is --c-surface-active; the current item is the same 12% --c-primary tint as a selected table row. Square, the theme's
1209
+ // 1px focus ring inside the row.
1210
+ @use '@carissa-io/components-list/scss' as list with (
1211
+ $c-list-item-padding-x: 1rem,
1212
+ $c-list-item-padding-y: 0.75rem,
1213
+ $c-list-item-padding-y-sm: 0.5rem,
1214
+ $c-list-item-padding-y-lg: 1rem,
1215
+ $c-list-item-gap: 1rem,
1216
+ $c-list-font-size: $font-size-body,
1217
+ $c-list-font-size-sm: $font-size-small,
1218
+ $c-list-font-size-lg: $font-size-h4,
1219
+ $c-list-description-color: $var-text,
1220
+ $c-list-description-font-size: $font-size-small,
1221
+ $c-list-border-width: 1px,
1222
+ $c-list-border-color: $var-muted,
1223
+ $c-list-radius: $radius,
1224
+ $c-list-item-background-hover: $var-surface-active,
1225
+ $c-list-item-background-selected: color-mix(in srgb, var(--c-primary) 12%, var(--c-background)),
1226
+ $c-list-item-color-selected: $var-text,
1227
+ $c-list-focus-outline: $focus-width solid $var-focus,
1228
+ $c-list-focus-outline-offset: -2px,
1229
+ $c-list-transition-duration: $transition-duration
1230
+ );
1231
+
1232
+ // Description list: the term is a small bold --c-muted label (4.7:1 on the background, so use it on --c-background, where
1233
+ // --c-muted is not enough on --c-surface) and the detail is --c-text. No fills or borders.
1234
+ @use '@carissa-io/components-description-list/scss' as description-list with (
1235
+ $c-description-list-gap-x: 2rem,
1236
+ $c-description-list-gap-y: 1rem,
1237
+ $c-description-list-term-gap: 0.25rem,
1238
+ $c-description-list-term-width: 12rem,
1239
+ $c-description-list-font-size: $font-size-body,
1240
+ $c-description-list-term-color: $var-muted,
1241
+ $c-description-list-term-font-size: $font-size-small,
1242
+ $c-description-list-term-font-weight: $font-weight-bold,
1243
+ $c-description-list-detail-color: $var-text
1244
+ );
1245
+
1246
+ // Stat: a card-like block on the page background with a 1px --c-muted border (the Card's outlined look), not on --c-surface:
1247
+ // the delta colors are checked against --c-background, where --c-success is 5:1 and --c-error 4.5:1 in light (4.15:1 for
1248
+ // --c-error on --c-surface). The label and the description are --c-muted (4.7:1), the value is --c-text. The delta is
1249
+ // success when up, error when down and muted when flat; the arrow and the screen-reader text say the same, so color is never
1250
+ // the only signal. In dark the status colors are lighter (7.1:1 and above on the background).
1251
+ @use '@carissa-io/components-stat/scss' as stat with (
1252
+ $c-stat-padding: 1.25rem 1.5rem,
1253
+ $c-stat-gap: 1rem,
1254
+ $c-stat-content-gap: 0.25rem,
1255
+ $c-stat-radius: $radius,
1256
+ $c-stat-background: $var-background,
1257
+ $c-stat-border: 1px solid $var-muted,
1258
+ $c-stat-label-color: $var-muted,
1259
+ $c-stat-label-font-size: $font-size-small,
1260
+ $c-stat-label-font-weight: $font-weight-bold,
1261
+ $c-stat-value-color: $var-text,
1262
+ $c-stat-value-font-size: $font-size-h1,
1263
+ $c-stat-value-font-weight: $font-weight-bold,
1264
+ $c-stat-description-color: $var-muted,
1265
+ $c-stat-description-font-size: $font-size-small,
1266
+ $c-stat-icon-color: $var-text,
1267
+ $c-stat-delta-font-size: $font-size-small,
1268
+ $c-stat-delta-font-weight: $font-weight-bold,
1269
+ $c-stat-delta-up-color: $var-success,
1270
+ $c-stat-delta-down-color: $var-error,
1271
+ $c-stat-delta-flat-color: $var-muted
1272
+ );
1273
+
1274
+ // Empty state: a centred block on the page background. The icon is --c-muted (4.7:1 light, 7.9:1 dark, above the 3:1 non-text
1275
+ // minimum), the title --c-text at the h3 size and bold, the description --c-muted (4.7:1 on the background, so keep it off
1276
+ // --c-surface, where light is 4.35:1). The actions are the app's buttons. Square, nothing else to set.
1277
+ @use '@carissa-io/components-empty-state/scss' as empty-state with (
1278
+ $c-empty-state-padding: 3rem 1.5rem,
1279
+ $c-empty-state-padding-sm: 1.5rem 1rem,
1280
+ $c-empty-state-padding-lg: 4.5rem 2rem,
1281
+ $c-empty-state-gap: 1rem,
1282
+ $c-empty-state-icon-size: 3rem,
1283
+ $c-empty-state-icon-size-sm: 2rem,
1284
+ $c-empty-state-icon-size-lg: 4rem,
1285
+ $c-empty-state-icon-color: $var-muted,
1286
+ $c-empty-state-title-color: $var-text,
1287
+ $c-empty-state-title-font-size: $font-size-h3,
1288
+ $c-empty-state-title-font-size-sm: $font-size-h4,
1289
+ $c-empty-state-title-font-size-lg: $font-size-h2,
1290
+ $c-empty-state-title-font-weight: $font-weight-bold,
1291
+ $c-empty-state-description-color: $var-muted,
1292
+ $c-empty-state-description-font-size: $font-size-body,
1293
+ $c-empty-state-description-font-size-sm: $font-size-small,
1294
+ $c-empty-state-description-font-size-lg: $font-size-body,
1295
+ $c-empty-state-actions-gap: 0.75rem
1296
+ );
1297
+
1298
+ // Timeline: a --c-muted connector and a small dot per event. A default dot is a --c-surface-active fill with a --c-muted ring;
1299
+ // success, warning, error and info are solid dots in their status color (4.5:1 or more against the background in light, 7:1 in
1300
+ // dark, above the 3:1 non-text minimum); the current step is a hollow --c-primary ring. An icon marker keeps a --c-background
1301
+ // fill and takes the status as its ring, so the --c-text icon is 17.9:1 / 18.2:1 in every status. The status text is the
1302
+ // hidden status_label, the time is --c-muted (4.7:1 / 7.9:1 on the background) and the title --c-text, bold. Color is never the
1303
+ // only signal.
1304
+ @use '@carissa-io/components-timeline/scss' as timeline with (
1305
+ $c-timeline-gap: 1.5rem,
1306
+ $c-timeline-content-gap: 1rem,
1307
+ $c-timeline-content-spacing: 0.25rem,
1308
+ $c-timeline-horizontal-item-width: 14rem,
1309
+ $c-timeline-marker-size: 0.75rem,
1310
+ $c-timeline-marker-icon-size: 1.5rem,
1311
+ $c-timeline-marker-border-width: 2px,
1312
+ $c-timeline-marker-color: $var-text,
1313
+ $c-timeline-marker-icon-background: $var-background,
1314
+ $c-timeline-marker-default: $var-surface-active,
1315
+ $c-timeline-marker-default-border: $var-muted,
1316
+ $c-timeline-marker-success: $var-success,
1317
+ $c-timeline-marker-warning: $var-warning,
1318
+ $c-timeline-marker-error: $var-error,
1319
+ $c-timeline-marker-info: $var-info,
1320
+ $c-timeline-marker-current: $var-primary,
1321
+ $c-timeline-connector-width: 1px,
1322
+ $c-timeline-connector-color: $var-muted,
1323
+ $c-timeline-title-font-weight: $font-weight-bold,
1324
+ $c-timeline-title-color: $var-text,
1325
+ $c-timeline-time-color: $var-muted,
1326
+ $c-timeline-time-font-size: $font-size-small,
1327
+ $c-timeline-description-color: $var-text,
1328
+ $c-timeline-description-font-size: $font-size-small
1329
+ );
1330
+
1331
+ // Tree: rows on the page background. Hover is --c-surface-active (--c-text 14.2:1 / 13.9:1); the selected row is the same 12%
1332
+ // --c-primary tint over the background as a selected table row, with --c-text (13.6:1 / 13.7:1). The chevron is the component's
1333
+ // CSS border chevron in --c-muted (3.8:1 on the hover and 3.6:1 on the selected tint in light, 5.9:1 and above in dark: above
1334
+ // the 3:1 non-text minimum). Square, the theme's 1px focus ring inside the row.
1335
+ @use '@carissa-io/components-tree/scss' as tree with (
1336
+ $c-tree-font-size: $font-size-body,
1337
+ $c-tree-row-padding-x: 0.75rem,
1338
+ $c-tree-row-padding-y: 0.5rem,
1339
+ $c-tree-row-gap: 0.5rem,
1340
+ $c-tree-row-radius: $radius,
1341
+ $c-tree-indent: 1.5rem,
1342
+ $c-tree-toggle-size: 1rem,
1343
+ $c-tree-toggle-chevron-size: 0.4375rem,
1344
+ $c-tree-toggle-chevron-width: 2px,
1345
+ $c-tree-toggle-color: $var-muted,
1346
+ $c-tree-row-background-hover: $var-surface-active,
1347
+ $c-tree-row-background-selected: color-mix(in srgb, var(--c-primary) 12%, var(--c-background)),
1348
+ $c-tree-row-color-selected: $var-text,
1349
+ $c-tree-item-disabled-opacity: 0.5,
1350
+ $c-tree-focus-outline: $focus-width solid $var-focus,
1351
+ $c-tree-focus-outline-offset: -2px,
1352
+ $c-tree-transition-duration: $transition-duration
1353
+ );
1354
+
1355
+ // Code: the monospace stack of the tokens. Inline code is --c-text on --c-surface (16.4:1 in both modes), square. A kbd is a
1356
+ // --c-background key with a 1px --c-muted border and a --c-muted bottom edge, text --c-text (17.9:1 / 18.2:1). The block is
1357
+ // --c-surface with a 1px --c-muted border and --c-text (16.4:1); highlighted children are the app's to keep AA on that
1358
+ // background. The copy button reads like the secondary button (--c-background with a --c-muted border, --c-surface-active on
1359
+ // hover) and the theme's 1px focus ring.
1360
+ @use '@carissa-io/components-code/scss' as code with (
1361
+ $c-code-font-family: $font-family-mono,
1362
+ $c-code-font-size: 0.875em,
1363
+ $c-code-padding: 0.125em 0.375em,
1364
+ $c-code-radius: $radius,
1365
+ $c-code-background: $var-surface,
1366
+ $c-code-color: $var-text,
1367
+ $c-kbd-font-size: 0.8125em,
1368
+ $c-kbd-padding: 0.125em 0.5em,
1369
+ $c-kbd-radius: $radius,
1370
+ $c-kbd-background: $var-background,
1371
+ $c-kbd-color: $var-text,
1372
+ $c-kbd-border: 1px solid $var-muted,
1373
+ $c-kbd-shadow: 0 1px 0 $var-muted,
1374
+ $c-code-block-font-size: $font-size-small,
1375
+ $c-code-block-line-height: $line-height-normal,
1376
+ $c-code-block-padding: 1rem,
1377
+ $c-code-block-radius: $radius,
1378
+ $c-code-block-background: $var-surface,
1379
+ $c-code-block-color: $var-text,
1380
+ $c-code-block-border: 1px solid $var-muted,
1381
+ $c-code-copy-offset: 0.5rem,
1382
+ $c-code-copy-padding: 0.375rem 0.75rem,
1383
+ $c-code-copy-font-size: $font-size-small,
1384
+ $c-code-copy-radius: $radius,
1385
+ $c-code-copy-background: $var-background,
1386
+ $c-code-copy-color: $var-text,
1387
+ $c-code-copy-border: 1px solid $var-muted,
1388
+ $c-code-copy-background-hover: $var-surface-active,
1389
+ $c-code-focus-outline: $focus-width solid $var-focus,
1390
+ $c-code-focus-outline-offset: -2px
1391
+ );
1392
+
1393
+ // Field: the label, hint and error around a control with no label of its own (radio group, slider, custom control). The label is
1394
+ // --c-text (17.93:1 / 18.16:1 on the background) in the label size and weight, not --c-muted, which is 4.35:1 on --c-surface in
1395
+ // light. The hint is --c-muted (4.74:1 / 7.85:1 on the background) and the error is --c-error (4.53:1 / 7.16:1), the same
1396
+ // color as the Input's error line, with the component's required asterisk. Keep a field on --c-background.
1397
+ @use '@carissa-io/components-field/scss' as field with (
1398
+ $c-field-font-family: $font-family,
1399
+ $c-field-font-size: $font-size-body,
1400
+ $c-field-color: $var-text,
1401
+ $c-field-label-font-size: $font-size-small,
1402
+ $c-field-label-font-weight: $font-weight-bold,
1403
+ $c-field-label-color: $var-text,
1404
+ $c-field-help-font-size: $font-size-small,
1405
+ $c-field-help-color: $var-muted,
1406
+ $c-field-error-font-size: $font-size-small,
1407
+ $c-field-error-color: $var-error,
1408
+ $c-field-required-color: $var-error,
1409
+ $c-field-gap: 0.5rem,
1410
+ $c-field-horizontal-label-width: 10rem,
1411
+ $c-field-horizontal-gap: 1.5rem
1412
+ );
1413
+
1414
+ // Number input: the field is the Input's (configured at the top; this module forwards it). The steppers read like the
1415
+ // secondary button inside the box: --c-muted glyphs (4.74:1 / 7.85:1, above the 3:1 non-text minimum) turning --c-text on a
1416
+ // --c-surface-active hover (--c-text 14.23:1 / 13.88:1), square, half opacity at a bound.
1417
+ @use '@carissa-io/components-number-input/scss' as number-input with (
1418
+ $c-number-input-stepper-size: 1.5rem,
1419
+ $c-number-input-stepper-gap: 0.125rem,
1420
+ $c-number-input-stepper-font-size: $font-size-body,
1421
+ $c-number-input-stepper-radius: $radius,
1422
+ $c-number-input-stepper-color: $var-muted,
1423
+ $c-number-input-stepper-color-hover: $var-text,
1424
+ $c-number-input-stepper-background: transparent,
1425
+ $c-number-input-stepper-background-hover: $var-surface-active,
1426
+ $c-number-input-stepper-disabled-opacity: 0.5,
1427
+ $c-number-input-text-align: start
1428
+ );
1429
+
1430
+ // OTP input: one box per character, built like the Input box: --c-background with a 1px --c-muted border (4.74:1 / 7.85:1),
1431
+ // --c-primary on hover, and the keyboard focus thickens the border to the theme's black ring (--c-focus, 21:1 / 19.8:1). An
1432
+ // invalid box is --c-error (4.53:1 / 7.16:1) and the message under the boxes is --c-error too; a disabled one is --c-surface
1433
+ // with --c-disabled-text (exempt from contrast). The digit is --c-text (17.93:1 / 18.16:1). Square, 3rem by 3.5rem.
1434
+ @use '@carissa-io/components-otp-input/scss' as otp-input with (
1435
+ $c-otp-input-font-family: $font-family,
1436
+ $c-otp-input-font-size: $font-size-h3,
1437
+ $c-otp-input-label-font-size: $label-font-size,
1438
+ $c-otp-input-label-font-weight: $label-font-weight,
1439
+ $c-otp-input-error-font-size: $font-size-small,
1440
+ $c-otp-input-color: $var-text,
1441
+ $c-otp-input-label-color: $var-muted,
1442
+ $c-otp-input-background: $var-background,
1443
+ $c-otp-input-border-color: $var-muted,
1444
+ $c-otp-input-border-color-hover: $var-primary,
1445
+ $c-otp-input-focus-color: $var-focus,
1446
+ $c-otp-input-focus-ring: $var-focus,
1447
+ $c-otp-input-focus-ring-width: $focus-width,
1448
+ $c-otp-input-error-color: $var-error,
1449
+ $c-otp-input-error-ring: $var-error,
1450
+ $c-otp-input-disabled-background: $var-surface,
1451
+ $c-otp-input-disabled-color: $var-disabled-text,
1452
+ $c-otp-input-cell-width: 3rem,
1453
+ $c-otp-input-cell-height: 3.5rem,
1454
+ $c-otp-input-border-width: 1px,
1455
+ $c-otp-input-radius: $radius,
1456
+ $c-otp-input-gap: 0.5rem,
1457
+ $c-otp-input-label-gap: 0.5rem,
1458
+ $c-otp-input-transition: border-color $transition-duration ease
1459
+ );
1460
+
1461
+ // Phone: the field is the Input's (configured at the top; this module forwards it); the country select sits in its start slot
1462
+ // as --c-text on a transparent background (so the box color shows in both modes) with a 1px --c-muted divider before the
1463
+ // number, and the theme's 1px --c-focus outline when focused.
1464
+ @use '@carissa-io/components-phone/scss' as phone with (
1465
+ $c-phone-country-max-width: 7rem,
1466
+ $c-phone-country-padding-x: 0.25rem,
1467
+ $c-phone-country-color: $var-text,
1468
+ $c-phone-country-background: transparent,
1469
+ $c-phone-country-border-color: $var-muted,
1470
+ $c-phone-country-border-width: 1px,
1471
+ $c-phone-country-gap: 0.5rem,
1472
+ $c-phone-country-focus-outline: $focus-width solid $var-focus,
1473
+ $c-phone-country-disabled-color: $var-disabled-text
1474
+ );
1475
+
1476
+ // Tag input: the box is the Input's and the chips are the Tag's, both configured above (this module forwards them), so it only
1477
+ // sets the spacing between the chips and the text field. Placed after the Tag block on purpose.
1478
+ @use '@carissa-io/components-tag-input/scss' as tag-input with (
1479
+ $c-tag-input-gap: 0.375rem,
1480
+ $c-tag-input-control-min-width: 6rem
1481
+ );
1482
+
1483
+ // Time picker: the date picker's field (a text input) with a Listbox of times in the Popover, so the box, the notched label,
1484
+ // the panel border and the options are the ones configured above (this module forwards them). Body text, tabular figures, a
1485
+ // 16px clock icon that is muted and turns black on hover and when open, like the Select arrow without the rotation.
1486
+ @use '@carissa-io/components-time-picker/scss' as time-picker with (
1487
+ $c-time-picker-color: $var-text,
1488
+ $c-time-picker-min-height: 1.5em,
1489
+ $c-time-picker-placeholder-color: $var-muted,
1490
+ $c-time-picker-icon-size: $arrow-size,
1491
+ $c-time-picker-icon-offset: $arrow-offset,
1492
+ $c-time-picker-icon-color: $var-arrow-color,
1493
+ $c-time-picker-icon-color-hover: $var-arrow-color-active,
1494
+ $c-time-picker-icon-color-open: $var-arrow-color-active,
1495
+ $c-time-picker-icon-color-disabled: $var-arrow-color-disabled,
1496
+ $c-time-picker-icon-transition: color $transition-duration ease,
1497
+ $c-time-picker-open-border-color: $var-focus
1498
+ );
1499
+
1500
+ // Date range: the date picker's trigger with one or two month grids in the Popover (the calendar block above styles the days;
1501
+ // the two ends use its selected look, black with white text). The days between them are a --c-surface-active band with --c-text
1502
+ // (14.23:1 / 13.88:1). The calendar keeps its default `border-spacing: 0` and the band is painted on the cell as well as on the
1503
+ // day, so the rows read as one unbroken range. Keep this block after the calendar and the date picker.
1504
+ @use '@carissa-io/components-date-range/scss' as date-range with (
1505
+ $c-date-range-trigger-color: $var-text,
1506
+ $c-date-range-trigger-min-height: 1.5em,
1507
+ $c-date-range-placeholder-color: $var-muted,
1508
+ $c-date-range-panel-padding: 0.5rem,
1509
+ $c-date-range-months-gap: 1rem,
1510
+ $c-date-range-in-range-background: $var-surface-active,
1511
+ $c-date-range-in-range-color: $var-text,
1512
+ $c-date-range-in-range-radius: 0,
1513
+ $c-date-range-icon-size: $arrow-size,
1514
+ $c-date-range-icon-offset: $arrow-offset,
1515
+ $c-date-range-icon-color: $var-arrow-color,
1516
+ $c-date-range-icon-color-hover: $var-arrow-color-active,
1517
+ $c-date-range-icon-color-open: $var-arrow-color-active,
1518
+ $c-date-range-icon-color-disabled: $var-arrow-color-disabled,
1519
+ $c-date-range-icon-transition: color $transition-duration ease,
1520
+ $c-date-range-open-border-color: $var-focus
1521
+ );
1522
+
1523
+ // Rating: the stars are --c-primary (21:1 / 19.8:1 on the background) over --c-muted ones (4.74:1 / 7.85:1), so the filled
1524
+ // and the empty part differ by shape (a solid star against an outline one) and by lightness (4.43:1 / 2.52:1 between them),
1525
+ // never by hue alone; the preview while hovering is --c-primary-hover (15.13:1 in light). The keyboard ring is the theme's --c-focus. The label is the field label style in --c-muted.
1526
+ @use '@carissa-io/components-rating/scss' as rating with (
1527
+ $c-rating-label-font-size: $label-font-size,
1528
+ $c-rating-label-font-weight: $label-font-weight,
1529
+ $c-rating-label-color: $var-muted,
1530
+ $c-rating-label-gap: 0.5rem,
1531
+ $c-rating-size: 1.75rem,
1532
+ $c-rating-gap: 0.25rem,
1533
+ $c-rating-color: $var-primary,
1534
+ $c-rating-color-hover: $var-primary-hover,
1535
+ $c-rating-empty-color: $var-muted,
1536
+ $c-rating-transition: color $transition-duration ease,
1537
+ $c-rating-focus-color: $var-focus,
1538
+ $c-rating-focus-ring-width: $focus-width,
1539
+ $c-rating-focus-radius: $radius,
1540
+ $c-rating-disabled-opacity: 0.5
1541
+ );
1542
+
1543
+ // Colour picker: the field is the Input's with a swatch chip and the hex text; the panel is the Popover's. The hue and
1544
+ // brightness areas are the colour data itself, so their gradients keep the component's literal colours. Everything else is
1545
+ // custom properties: the thumbs are a --c-background ring over a --c-text one (visible over any colour in both modes), the
1546
+ // keyboard ring is --c-focus, the hex input is built like the Input box and the chips are bordered with --c-muted.
1547
+ @use '@carissa-io/components-color-picker/scss' as color-picker with (
1548
+ $c-color-picker-color: $var-text,
1549
+ $c-color-picker-min-height: 1.5em,
1550
+ $c-color-picker-gap: 0.75rem,
1551
+ $c-color-picker-open-border-color: $var-focus,
1552
+ $c-color-picker-chip-size: 1.25rem,
1553
+ $c-color-picker-chip-radius: $radius,
1554
+ $c-color-picker-chip-border-color: $var-muted,
1555
+ $c-color-picker-chip-empty-background: repeating-conic-gradient($var-surface-active 0% 25%, $var-background 0% 50%) 50% / 0.5rem 0.5rem,
1556
+ $c-color-picker-panel-width: 15rem,
1557
+ $c-color-picker-panel-padding: 0.75rem,
1558
+ $c-color-picker-panel-gap: 0.75rem,
1559
+ $c-color-picker-area-radius: $radius,
1560
+ $c-color-picker-track-radius: $radius,
1561
+ $c-color-picker-alpha-checker: repeating-conic-gradient($var-surface-active 0% 25%, $var-background 0% 50%) 50% / 0.5rem 0.5rem,
1562
+ $c-color-picker-thumb-size: 1.25rem,
1563
+ $c-color-picker-thumb-border-width: 2px,
1564
+ $c-color-picker-thumb-border-color: $var-background,
1565
+ $c-color-picker-thumb-shadow: (0 0 0 1px $var-text),
1566
+ $c-color-picker-focus-ring-width: $focus-width,
1567
+ $c-color-picker-focus-ring-color: $var-focus,
1568
+ $c-color-picker-focus-ring-offset: 2px,
1569
+ $c-color-picker-hex-font-family: $font-family-mono,
1570
+ $c-color-picker-hex-font-size: $font-size-small,
1571
+ $c-color-picker-hex-color: $var-text,
1572
+ $c-color-picker-hex-background: $var-background,
1573
+ $c-color-picker-hex-padding: 0.625rem 0.75rem,
1574
+ $c-color-picker-hex-border-color: $var-muted,
1575
+ $c-color-picker-hex-border-color-invalid: $var-error,
1576
+ $c-color-picker-hex-radius: $radius,
1577
+ $c-color-picker-swatch-size: 1.75rem,
1578
+ $c-color-picker-swatch-radius: $radius,
1579
+ $c-color-picker-swatch-border-color: $var-muted,
1580
+ $c-color-picker-swatch-selected-ring-color: $var-primary
1581
+ );
1582
+
1583
+ // Async autocomplete: the Combobox's field (a text input over the Listbox in the Popover, configured above) with a spinner
1584
+ // while a request is pending (--c-primary arc over a --c-surface-active track) and one message in the panel per state:
1585
+ // loading and empty in --c-muted (4.74:1 / 7.85:1, the Listbox's empty message color) and an error in --c-error (4.53:1 / 7.16:1).
1586
+ @use '@carissa-io/components-async-autocomplete/scss' as async-autocomplete with (
1587
+ $c-async-autocomplete-color: $var-text,
1588
+ $c-async-autocomplete-min-height: 1.5em,
1589
+ $c-async-autocomplete-placeholder-color: $var-muted,
1590
+ $c-async-autocomplete-open-border-color: $var-focus,
1591
+ $c-async-autocomplete-spinner-size: $arrow-size,
1592
+ $c-async-autocomplete-spinner-offset: $arrow-offset,
1593
+ $c-async-autocomplete-spinner-width: 2px,
1594
+ $c-async-autocomplete-spinner-color: $var-primary,
1595
+ $c-async-autocomplete-spinner-track-color: $var-surface-active,
1596
+ $c-async-autocomplete-loading-color: $var-muted,
1597
+ $c-async-autocomplete-empty-color: $var-muted,
1598
+ $c-async-autocomplete-error-color: $var-error
1599
+ );