@carissa-io/theme-default 0.3.8 → 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/DESIGN.md +30 -0
- package/README.md +1 -1
- package/dist/index.css +594 -0
- package/package.json +52 -2
- package/scss/index.scss +208 -0
package/DESIGN.md
CHANGED
|
@@ -387,6 +387,36 @@ From [components-tree](components/components-tree): `Tree` and `TreeItem`. Rows
|
|
|
387
387
|
## Code
|
|
388
388
|
From [components-code](components/components-code): `Code`, `Kbd` and `CodeBlock`. The font is the tokens' monospace stack. **Inline code** is `--c-text` on `--c-surface` (16.44:1 in both modes), square, 0.875em. A **kbd** is a `--c-background` key with a 1px `--c-muted` border and a 1px `--c-muted` bottom edge, text `--c-text` (17.93:1 / 18.16:1). The **block** is `--c-surface` with a 1px `--c-muted` border (4.35:1 light, 7.11:1 dark against the surface, above 3:1) and `--c-text` at the small size; highlighted `children` are the app's to keep AA on `--c-surface`. The **copy button** reads like the secondary button: `--c-background` with a 1px `--c-muted` border, `--c-text` (17.93:1 / 18.16:1) and a `--c-surface-active` hover (`--c-text` 14.23:1 / 13.88:1), square, with the theme's 1px `--c-focus` ring inside it and on the focusable `pre`. The component has no uppercase label variables, so the button keeps the small body text instead of the secondary button's label style.
|
|
389
389
|
|
|
390
|
+
## Field
|
|
391
|
+
From [components-field](components/components-field): `Field`. The label is `--c-text`, bold, at the small size (17.93:1 light, 18.16:1 dark on the background) and not `--c-muted`, which is only 4.35:1 on `--c-surface` in light. The hint is `--c-muted` at the small size (4.74:1 / 7.85:1 on the background) and stays visible, linked with `aria-describedby`. The error is `--c-error` (4.53:1 / 7.16:1), the same color as the Input's error line, and the required asterisk is `--c-error` too; color is never the only signal because the error is text with `role="alert"`. 0.5rem between label, control, hint and error; the horizontal layout uses a 10rem label column and 1.5rem of gap. Keep a field on `--c-background`.
|
|
392
|
+
|
|
393
|
+
## Number input
|
|
394
|
+
From [components-number-input](components/components-number-input): `NumberInput`. The field is the Input's, so it keeps its notched label, `--c-muted` border (4.74:1 / 7.85:1) and thickened `--c-focus` border. The stepper buttons read like the secondary button inside the box: square, `--c-muted` glyphs (4.74:1 / 7.85:1, above the 3:1 non-text minimum) turning `--c-text` on a `--c-surface-active` hover (14.23:1 / 13.88:1), half opacity at a bound (exempt from contrast). They are out of the tab order (the arrow keys do the same), so the focus ring stays on the field.
|
|
395
|
+
|
|
396
|
+
## OTP input
|
|
397
|
+
From [components-otp-input](components/components-otp-input): `OtpInput`. Each box is built like the Input: `--c-background` with a 1px `--c-muted` border (4.74:1 / 7.85:1), `--c-primary` on hover, and the keyboard focus thickens the border to `--c-focus` plus a 1px `--c-focus` shadow (2px in total, 21:1 / 19.8:1), the same rule as every outlined control. An invalid box is `--c-error` (4.53:1 / 7.16:1) with the message under the boxes in `--c-error`; a disabled one is `--c-surface` with `--c-disabled-text` (exempt). The digit is `--c-text` at the h3 size (17.93:1 / 18.16:1). Square, 3rem by 3.5rem (above the 44px touch target), 0.5rem between boxes; the group label is the field label style in `--c-muted`.
|
|
398
|
+
|
|
399
|
+
## Phone
|
|
400
|
+
From [components-phone](components/components-phone): `Phone`. The field is the Input's. The country select is a native `<select>` in the input's start slot, `--c-text` on a transparent background so the box color shows in both modes (17.93:1 / 18.16:1 on the background), with a 1px `--c-muted` divider before the number (4.74:1 / 7.85:1) and the theme's 1px `--c-focus` outline when it is focused by keyboard; disabled is `--c-disabled-text` (exempt). The open list is drawn by the platform, so it follows `color-scheme` in dark.
|
|
401
|
+
|
|
402
|
+
## Tag input
|
|
403
|
+
From [components-tag-input](components/components-tag-input): `TagInput`. The box is the Input's (square, `--c-muted` border, thickened `--c-focus` border on focus) and the chips are the Tag's, so the tag tints, borders and `--c-text` labels (14.8:1 or more on every tint) are the ones documented in the Tag section; the block only sets 0.375rem between chips and the text field and a 6rem minimum for the text field before it wraps to its own row. The placeholder is `--c-muted` as in the Input. Errors (`duplicate`, `max`, `invalid`) use the Input's `--c-error` line.
|
|
404
|
+
|
|
405
|
+
## Time picker
|
|
406
|
+
From [components-time-picker](components/components-time-picker): `TimePicker`. The field is the Input's and the times are the Listbox's inside the Popover, so the `--c-muted` border (4.74:1 / 7.85:1), the thickened `--c-focus` border, the `--c-text` options (17.93:1 / 18.16:1), the `--c-surface` active option and the selected marker are the ones documented for the Select and the Combobox (reused, no new figure). The clock icon is the Select arrow's: 16px, `--c-muted` turning `--c-primary` on hover and when open, and `--c-disabled-text` when disabled (exempt). Open takes the `--c-focus` border; the placeholder is `--c-muted`. Errors (`invalid_time`, `out_of_range`) use the Input's `--c-error` line (4.53:1 / 7.16:1).
|
|
407
|
+
|
|
408
|
+
## Date range
|
|
409
|
+
From [components-date-range](components/components-date-range): `DateRange`. The trigger is the Date picker's and the days are the Calendar's (44px squares, `--c-text`, `--c-surface` hover), so those figures are reused. The two ends use the Calendar's selected look, `--c-on-primary` on `--c-primary` (21:1 / 19.8:1). The days between them are a `--c-surface-active` band with `--c-text` (14.23:1 / 13.88:1, the same pair as the Menu and Pagination hovers), square so the band is unbroken; it is painted on the cell and on the day, and it relies on the calendar grid keeping `border-spacing: 0` (a test asserts it). The band against the background is only 1.26:1 / 1.31:1, so it is not the only cue: the ends are solid black (or white in dark), and the days carry `aria-selected`. Two months sit side by side with 1rem between them, with 0.5rem of panel padding. Errors (`end_before_start`, `out_of_range`) use the Input's `--c-error` line.
|
|
410
|
+
|
|
411
|
+
## Rating
|
|
412
|
+
From [components-rating](components/components-rating): `Rating`. The filled part is `--c-primary` (21:1 / 19.8:1 on the background) and the empty part is `--c-muted` (4.74:1 / 7.85:1), both above the 3:1 minimum for graphics. A filled star is a solid shape and an empty one an outline, so the two never rely on colour alone; their lightness differs by 4.43:1 in light and 2.52:1 in dark (below 3:1 there, which the solid-versus-outline shape makes up for). The preview while hovering is `--c-primary-hover` (15.13:1 in light, 15.72:1 in dark on the background). Stars are 1.75rem apart by 0.25rem, and the keyboard ring is the theme's 1px `--c-focus` outline (21:1 / 19.8:1). The group label is the field label style in `--c-muted`; a disabled rating is at half opacity (exempt).
|
|
413
|
+
|
|
414
|
+
## Color picker
|
|
415
|
+
From [components-color-picker](components/components-color-picker): `ColorPicker`. The field is the Input's with a 1.25rem chip bordered in `--c-muted` (4.74:1 / 7.85:1) next to the hex text in `--c-text`; the panel is the Popover's. The thumbs of the area and of the hue and alpha tracks are a 2px `--c-background` ring over a 1px `--c-text` ring, so one of the two contrasts with any colour under it in both modes (the ring pair is 17.93:1 / 18.16:1 between itself); the keyboard focus draws the theme's 1px `--c-focus` outline offset by 2px around the area or the track (21:1 / 19.8:1). The hue and brightness gradients are the colour data and keep their literal colours; the transparent checkerboard is `--c-surface-active` over `--c-background`. The hex input is built like the Input box: `--c-background`, a 1px `--c-muted` border, `--c-error` when invalid (4.53:1 / 7.16:1), the monospace stack at the small size. Swatches are 1.75rem squares with a `--c-muted` border and a `--c-primary` ring when selected; areas, tracks and chips are square.
|
|
416
|
+
|
|
417
|
+
## Async autocomplete
|
|
418
|
+
From [components-async-autocomplete](components/components-async-autocomplete): `AsyncAutocomplete`. The field, the panel and the options are the Combobox's (reused figures, no new contrast). While a request is pending the field shows a 16px spinner at the arrow's place: a 2px `--c-primary` arc (21:1 / 19.8:1) over a `--c-surface-active` track, slowed down under `prefers-reduced-motion`. The states are written in the panel: `loading` and `empty` in `--c-muted` (4.74:1 / 7.85:1, the Listbox's empty message color) and `error` in `--c-error` (4.53:1 / 7.16:1 on the background, which is the panel's); the state is also exposed as `aria-busy` and `data-state`, so colour is never the only signal. Open takes the `--c-focus` border.
|
|
419
|
+
|
|
390
420
|
## Keyboard focus (all controls)
|
|
391
421
|
One rule keeps the controls coherent: **an outlined control thickens its own border from 1px to 2px, black** (text fields,
|
|
392
422
|
select, combobox, date picker, textarea, upload, empty checkbox, off switch, radio, secondary and ghost buttons); **a filled
|
package/README.md
CHANGED
|
@@ -142,7 +142,7 @@ it: check the names against the theme's `scss/_tokens.scss` before you switch.
|
|
|
142
142
|
|
|
143
143
|
## What it configures
|
|
144
144
|
`components-input`, `-button`, `-checkbox`, `-switch`, `-radio-group`, `-slider`, `-popover`, `-listbox`, `-select`,
|
|
145
|
-
`-combobox`, `-upload`, `-calendar`, `-date-picker`, `-search`, `-typography`, `-card`, `-alert`, `-spinner`, `-modal`, `-toast`, `-divider`, `-badge`, `-tag`, `-link`, `-avatar`, `-skeleton`, `-progress`, `-tooltip`, `-prose`, `-tabs`, `-accordion`, `-breadcrumb`, `-pagination`, `-stepper`, `-sidebar`, `-navbar`, `-drawer`, `-menu`, `-table`, `-list`, `-description-list`, `-stat`, `-empty-state`, `-timeline`, `-tree` and `-
|
|
145
|
+
`-combobox`, `-upload`, `-calendar`, `-date-picker`, `-search`, `-typography`, `-card`, `-alert`, `-spinner`, `-modal`, `-toast`, `-divider`, `-badge`, `-tag`, `-link`, `-avatar`, `-skeleton`, `-progress`, `-tooltip`, `-prose`, `-tabs`, `-accordion`, `-breadcrumb`, `-pagination`, `-stepper`, `-sidebar`, `-navbar`, `-drawer`, `-menu`, `-table`, `-list`, `-description-list`, `-stat`, `-empty-state`, `-timeline`, `-tree`, `-code`, `-field`, `-number-input`, `-otp-input`, `-phone`, `-tag-input`, `-time-picker`, `-date-range`, `-rating`, `-color-picker` and `-async-autocomplete`. `components-email`, `-password`, `-url` and `-textarea`
|
|
146
146
|
are styled through the input.
|
|
147
147
|
|
|
148
148
|
## Change a value
|
package/dist/index.css
CHANGED
|
@@ -4448,3 +4448,597 @@ ol.c-list {
|
|
|
4448
4448
|
white-space: nowrap;
|
|
4449
4449
|
border: 0;
|
|
4450
4450
|
}
|
|
4451
|
+
|
|
4452
|
+
.c-field {
|
|
4453
|
+
display: flex;
|
|
4454
|
+
flex-direction: column;
|
|
4455
|
+
gap: 0.5rem;
|
|
4456
|
+
font-family: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
|
|
4457
|
+
font-size: 1rem;
|
|
4458
|
+
color: var(--c-text);
|
|
4459
|
+
}
|
|
4460
|
+
.c-field__label {
|
|
4461
|
+
font-size: 0.875rem;
|
|
4462
|
+
font-weight: 700;
|
|
4463
|
+
color: var(--c-text);
|
|
4464
|
+
}
|
|
4465
|
+
.c-field--required .c-field__label::after {
|
|
4466
|
+
content: " *";
|
|
4467
|
+
color: var(--c-error);
|
|
4468
|
+
}
|
|
4469
|
+
.c-field__help {
|
|
4470
|
+
margin: 0;
|
|
4471
|
+
font-size: 0.875rem;
|
|
4472
|
+
color: var(--c-muted);
|
|
4473
|
+
}
|
|
4474
|
+
.c-field__error {
|
|
4475
|
+
margin: 0;
|
|
4476
|
+
font-size: 0.875rem;
|
|
4477
|
+
color: var(--c-error);
|
|
4478
|
+
}
|
|
4479
|
+
.c-field--horizontal {
|
|
4480
|
+
display: grid;
|
|
4481
|
+
grid-template-columns: 10rem minmax(0, 1fr);
|
|
4482
|
+
column-gap: 1.5rem;
|
|
4483
|
+
align-items: start;
|
|
4484
|
+
}
|
|
4485
|
+
.c-field--horizontal > .c-field__label {
|
|
4486
|
+
grid-column: 1;
|
|
4487
|
+
grid-row: 1;
|
|
4488
|
+
}
|
|
4489
|
+
.c-field--horizontal > .c-field__control, .c-field--horizontal > .c-field__help, .c-field--horizontal > .c-field__error {
|
|
4490
|
+
grid-column: 2;
|
|
4491
|
+
}
|
|
4492
|
+
|
|
4493
|
+
.c-number-input .c-input__control {
|
|
4494
|
+
text-align: start;
|
|
4495
|
+
font-variant-numeric: tabular-nums;
|
|
4496
|
+
}
|
|
4497
|
+
.c-number-input__steppers {
|
|
4498
|
+
display: inline-flex;
|
|
4499
|
+
gap: 0.125rem;
|
|
4500
|
+
}
|
|
4501
|
+
.c-number-input__stepper {
|
|
4502
|
+
display: inline-flex;
|
|
4503
|
+
align-items: center;
|
|
4504
|
+
justify-content: center;
|
|
4505
|
+
width: 1.5rem;
|
|
4506
|
+
height: 1.5rem;
|
|
4507
|
+
padding: 0;
|
|
4508
|
+
font: inherit;
|
|
4509
|
+
font-size: 1rem;
|
|
4510
|
+
line-height: 1;
|
|
4511
|
+
color: var(--c-muted);
|
|
4512
|
+
background: transparent;
|
|
4513
|
+
border: 0;
|
|
4514
|
+
border-radius: 0;
|
|
4515
|
+
cursor: pointer;
|
|
4516
|
+
}
|
|
4517
|
+
.c-number-input__stepper:hover:not(:disabled) {
|
|
4518
|
+
color: var(--c-text);
|
|
4519
|
+
background: var(--c-surface-active);
|
|
4520
|
+
}
|
|
4521
|
+
.c-number-input__stepper:disabled {
|
|
4522
|
+
cursor: not-allowed;
|
|
4523
|
+
opacity: 0.5;
|
|
4524
|
+
}
|
|
4525
|
+
|
|
4526
|
+
.c-otp-input {
|
|
4527
|
+
display: block;
|
|
4528
|
+
font-family: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
|
|
4529
|
+
color: var(--c-text);
|
|
4530
|
+
}
|
|
4531
|
+
.c-otp-input__label {
|
|
4532
|
+
display: block;
|
|
4533
|
+
margin-bottom: 0.5rem;
|
|
4534
|
+
font-size: 0.6875rem;
|
|
4535
|
+
font-weight: 700;
|
|
4536
|
+
color: var(--c-muted);
|
|
4537
|
+
}
|
|
4538
|
+
.c-otp-input__cells {
|
|
4539
|
+
display: flex;
|
|
4540
|
+
gap: 0.5rem;
|
|
4541
|
+
}
|
|
4542
|
+
.c-otp-input__cell {
|
|
4543
|
+
box-sizing: border-box;
|
|
4544
|
+
width: 3rem;
|
|
4545
|
+
height: 3.5rem;
|
|
4546
|
+
padding: 0;
|
|
4547
|
+
font: inherit;
|
|
4548
|
+
font-size: 1.25rem;
|
|
4549
|
+
color: inherit;
|
|
4550
|
+
text-align: center;
|
|
4551
|
+
background: var(--c-background);
|
|
4552
|
+
border: 1px solid var(--c-muted);
|
|
4553
|
+
border-radius: 0;
|
|
4554
|
+
outline: 0;
|
|
4555
|
+
transition: border-color 0.2s ease;
|
|
4556
|
+
}
|
|
4557
|
+
.c-otp-input__cell:hover:not(:disabled) {
|
|
4558
|
+
border-color: var(--c-primary);
|
|
4559
|
+
}
|
|
4560
|
+
.c-otp-input__cell:focus {
|
|
4561
|
+
border-color: var(--c-focus);
|
|
4562
|
+
box-shadow: 0 0 0 1px var(--c-focus);
|
|
4563
|
+
}
|
|
4564
|
+
.c-otp-input__cell:disabled {
|
|
4565
|
+
color: var(--c-disabled-text);
|
|
4566
|
+
cursor: not-allowed;
|
|
4567
|
+
background: var(--c-surface);
|
|
4568
|
+
}
|
|
4569
|
+
.c-otp-input__error {
|
|
4570
|
+
margin: 0.5rem 0 0;
|
|
4571
|
+
font-size: 0.875rem;
|
|
4572
|
+
color: var(--c-error);
|
|
4573
|
+
}
|
|
4574
|
+
.c-otp-input--invalid .c-otp-input__cell {
|
|
4575
|
+
border-color: var(--c-error);
|
|
4576
|
+
}
|
|
4577
|
+
.c-otp-input--invalid .c-otp-input__cell:focus {
|
|
4578
|
+
box-shadow: 0 0 0 1px var(--c-error);
|
|
4579
|
+
}
|
|
4580
|
+
|
|
4581
|
+
.c-phone .c-input__start {
|
|
4582
|
+
padding-inline-end: 0.5rem;
|
|
4583
|
+
border-inline-end: 1px solid var(--c-muted);
|
|
4584
|
+
}
|
|
4585
|
+
.c-phone__country {
|
|
4586
|
+
max-width: 7rem;
|
|
4587
|
+
padding: 0 0.25rem;
|
|
4588
|
+
font: inherit;
|
|
4589
|
+
color: var(--c-text);
|
|
4590
|
+
text-overflow: ellipsis;
|
|
4591
|
+
cursor: pointer;
|
|
4592
|
+
background: transparent;
|
|
4593
|
+
border: 0;
|
|
4594
|
+
outline: 0;
|
|
4595
|
+
}
|
|
4596
|
+
.c-phone__country:focus-visible {
|
|
4597
|
+
outline: 1px solid var(--c-focus);
|
|
4598
|
+
}
|
|
4599
|
+
.c-phone__country:disabled {
|
|
4600
|
+
color: var(--c-disabled-text);
|
|
4601
|
+
cursor: not-allowed;
|
|
4602
|
+
}
|
|
4603
|
+
|
|
4604
|
+
.c-tag-input__field {
|
|
4605
|
+
flex-wrap: wrap;
|
|
4606
|
+
gap: 0.375rem;
|
|
4607
|
+
cursor: text;
|
|
4608
|
+
}
|
|
4609
|
+
.c-tag-input__control {
|
|
4610
|
+
flex: 1 1 6rem;
|
|
4611
|
+
min-width: 6rem;
|
|
4612
|
+
}
|
|
4613
|
+
|
|
4614
|
+
.c-time-picker .c-input__box {
|
|
4615
|
+
position: relative;
|
|
4616
|
+
cursor: text;
|
|
4617
|
+
}
|
|
4618
|
+
.c-time-picker .c-time-picker__popover {
|
|
4619
|
+
position: static;
|
|
4620
|
+
display: flex;
|
|
4621
|
+
flex: 1 1 auto;
|
|
4622
|
+
align-items: center;
|
|
4623
|
+
min-width: 0;
|
|
4624
|
+
}
|
|
4625
|
+
.c-time-picker__input {
|
|
4626
|
+
box-sizing: border-box;
|
|
4627
|
+
width: 100%;
|
|
4628
|
+
min-height: 1.5em;
|
|
4629
|
+
padding: 0 calc(1rem + 0.5rem) 0 0;
|
|
4630
|
+
font-variant-numeric: tabular-nums;
|
|
4631
|
+
color: var(--c-text);
|
|
4632
|
+
text-overflow: ellipsis;
|
|
4633
|
+
}
|
|
4634
|
+
.c-time-picker__input::placeholder {
|
|
4635
|
+
color: var(--c-muted);
|
|
4636
|
+
}
|
|
4637
|
+
.c-time-picker__input:disabled {
|
|
4638
|
+
color: inherit;
|
|
4639
|
+
cursor: not-allowed;
|
|
4640
|
+
}
|
|
4641
|
+
.c-time-picker__icon {
|
|
4642
|
+
position: absolute;
|
|
4643
|
+
top: 50%;
|
|
4644
|
+
right: 0.75rem;
|
|
4645
|
+
display: inline-flex;
|
|
4646
|
+
width: 1rem;
|
|
4647
|
+
height: 1rem;
|
|
4648
|
+
color: var(--c-muted);
|
|
4649
|
+
pointer-events: none;
|
|
4650
|
+
translate: 0 -50%;
|
|
4651
|
+
transition: color 0.2s ease;
|
|
4652
|
+
}
|
|
4653
|
+
.c-time-picker__icon > svg {
|
|
4654
|
+
width: 100%;
|
|
4655
|
+
height: 100%;
|
|
4656
|
+
}
|
|
4657
|
+
.c-input__box:hover .c-time-picker__icon {
|
|
4658
|
+
color: var(--c-primary);
|
|
4659
|
+
}
|
|
4660
|
+
.c-time-picker--open .c-time-picker__icon {
|
|
4661
|
+
color: var(--c-primary);
|
|
4662
|
+
}
|
|
4663
|
+
.c-time-picker--open:not(.c-input--invalid) .c-input__box {
|
|
4664
|
+
border-color: var(--c-focus);
|
|
4665
|
+
}
|
|
4666
|
+
.c-time-picker.c-input--disabled .c-input__box {
|
|
4667
|
+
cursor: not-allowed;
|
|
4668
|
+
}
|
|
4669
|
+
.c-time-picker.c-input--disabled .c-time-picker__icon {
|
|
4670
|
+
color: var(--c-disabled-text);
|
|
4671
|
+
}
|
|
4672
|
+
|
|
4673
|
+
.c-date-range .c-input__box {
|
|
4674
|
+
position: relative;
|
|
4675
|
+
}
|
|
4676
|
+
.c-date-range .c-date-range__popover {
|
|
4677
|
+
position: static;
|
|
4678
|
+
display: flex;
|
|
4679
|
+
flex: 1 1 auto;
|
|
4680
|
+
align-items: center;
|
|
4681
|
+
min-width: 0;
|
|
4682
|
+
}
|
|
4683
|
+
.c-date-range__trigger {
|
|
4684
|
+
display: block;
|
|
4685
|
+
flex: 1 1 auto;
|
|
4686
|
+
box-sizing: border-box;
|
|
4687
|
+
width: 100%;
|
|
4688
|
+
min-height: 1.5em;
|
|
4689
|
+
margin: 0;
|
|
4690
|
+
padding: 0 calc(1rem + 0.5rem) 0 0;
|
|
4691
|
+
overflow: hidden;
|
|
4692
|
+
font: inherit;
|
|
4693
|
+
color: var(--c-text);
|
|
4694
|
+
text-align: left;
|
|
4695
|
+
text-overflow: ellipsis;
|
|
4696
|
+
white-space: nowrap;
|
|
4697
|
+
cursor: pointer;
|
|
4698
|
+
appearance: none;
|
|
4699
|
+
background: transparent;
|
|
4700
|
+
border: 0;
|
|
4701
|
+
border-radius: 0;
|
|
4702
|
+
outline: 0;
|
|
4703
|
+
}
|
|
4704
|
+
.c-date-range__trigger::after {
|
|
4705
|
+
position: absolute;
|
|
4706
|
+
inset: 0;
|
|
4707
|
+
content: "";
|
|
4708
|
+
}
|
|
4709
|
+
.c-date-range__trigger:disabled {
|
|
4710
|
+
color: inherit;
|
|
4711
|
+
cursor: not-allowed;
|
|
4712
|
+
}
|
|
4713
|
+
.c-date-range__placeholder {
|
|
4714
|
+
color: var(--c-muted);
|
|
4715
|
+
}
|
|
4716
|
+
.c-date-range__panel {
|
|
4717
|
+
padding: 0.5rem;
|
|
4718
|
+
}
|
|
4719
|
+
.c-date-range__months {
|
|
4720
|
+
display: flex;
|
|
4721
|
+
flex-wrap: wrap;
|
|
4722
|
+
gap: 1rem;
|
|
4723
|
+
}
|
|
4724
|
+
.c-date-range__cell--in-range {
|
|
4725
|
+
background: var(--c-surface-active);
|
|
4726
|
+
}
|
|
4727
|
+
.c-date-range__day--in-range {
|
|
4728
|
+
color: var(--c-text);
|
|
4729
|
+
background: var(--c-surface-active);
|
|
4730
|
+
border-radius: 0;
|
|
4731
|
+
}
|
|
4732
|
+
.c-date-range__day--in-range:hover:not(:disabled) {
|
|
4733
|
+
color: var(--c-text);
|
|
4734
|
+
background: var(--c-surface-active);
|
|
4735
|
+
}
|
|
4736
|
+
.c-date-range__icon {
|
|
4737
|
+
position: absolute;
|
|
4738
|
+
top: 50%;
|
|
4739
|
+
right: 0.75rem;
|
|
4740
|
+
display: inline-flex;
|
|
4741
|
+
width: 1rem;
|
|
4742
|
+
height: 1rem;
|
|
4743
|
+
color: var(--c-muted);
|
|
4744
|
+
pointer-events: none;
|
|
4745
|
+
translate: 0 -50%;
|
|
4746
|
+
transition: color 0.2s ease;
|
|
4747
|
+
}
|
|
4748
|
+
.c-date-range__icon > svg {
|
|
4749
|
+
width: 100%;
|
|
4750
|
+
height: 100%;
|
|
4751
|
+
}
|
|
4752
|
+
.c-input__box:hover .c-date-range__icon {
|
|
4753
|
+
color: var(--c-primary);
|
|
4754
|
+
}
|
|
4755
|
+
.c-date-range--open .c-date-range__icon {
|
|
4756
|
+
color: var(--c-primary);
|
|
4757
|
+
}
|
|
4758
|
+
.c-date-range--open:not(.c-input--invalid) .c-input__box {
|
|
4759
|
+
border-color: var(--c-focus);
|
|
4760
|
+
}
|
|
4761
|
+
.c-date-range.c-input--disabled .c-date-range__icon {
|
|
4762
|
+
color: var(--c-disabled-text);
|
|
4763
|
+
}
|
|
4764
|
+
|
|
4765
|
+
.c-rating {
|
|
4766
|
+
display: inline-flex;
|
|
4767
|
+
gap: 0.25rem;
|
|
4768
|
+
align-items: center;
|
|
4769
|
+
vertical-align: middle;
|
|
4770
|
+
}
|
|
4771
|
+
.c-rating__label {
|
|
4772
|
+
display: block;
|
|
4773
|
+
margin-bottom: 0.5rem;
|
|
4774
|
+
font-size: 0.6875rem;
|
|
4775
|
+
font-weight: 700;
|
|
4776
|
+
color: var(--c-muted);
|
|
4777
|
+
}
|
|
4778
|
+
.c-rating__star {
|
|
4779
|
+
position: relative;
|
|
4780
|
+
display: inline-flex;
|
|
4781
|
+
width: 1.75rem;
|
|
4782
|
+
height: 1.75rem;
|
|
4783
|
+
}
|
|
4784
|
+
.c-rating__icon {
|
|
4785
|
+
position: absolute;
|
|
4786
|
+
inset: 0;
|
|
4787
|
+
display: inline-flex;
|
|
4788
|
+
transition: color 0.2s ease;
|
|
4789
|
+
}
|
|
4790
|
+
.c-rating__icon > svg {
|
|
4791
|
+
width: 100%;
|
|
4792
|
+
height: 100%;
|
|
4793
|
+
}
|
|
4794
|
+
.c-rating__icon--empty {
|
|
4795
|
+
color: var(--c-muted);
|
|
4796
|
+
}
|
|
4797
|
+
.c-rating__icon--full {
|
|
4798
|
+
color: var(--c-primary);
|
|
4799
|
+
}
|
|
4800
|
+
.c-rating--hovering .c-rating__icon--full {
|
|
4801
|
+
color: var(--c-primary-hover);
|
|
4802
|
+
}
|
|
4803
|
+
.c-rating__radio {
|
|
4804
|
+
position: absolute;
|
|
4805
|
+
inset: 0;
|
|
4806
|
+
cursor: pointer;
|
|
4807
|
+
outline: 0;
|
|
4808
|
+
}
|
|
4809
|
+
.c-rating__radio--start {
|
|
4810
|
+
right: 50%;
|
|
4811
|
+
}
|
|
4812
|
+
.c-rating__radio--end {
|
|
4813
|
+
left: 50%;
|
|
4814
|
+
}
|
|
4815
|
+
.c-rating__radio:focus-visible {
|
|
4816
|
+
outline: 1px solid var(--c-focus);
|
|
4817
|
+
outline-offset: 1px;
|
|
4818
|
+
border-radius: 0;
|
|
4819
|
+
}
|
|
4820
|
+
.c-rating--disabled {
|
|
4821
|
+
opacity: 0.5;
|
|
4822
|
+
}
|
|
4823
|
+
.c-rating--disabled .c-rating__radio {
|
|
4824
|
+
cursor: not-allowed;
|
|
4825
|
+
}
|
|
4826
|
+
|
|
4827
|
+
.c-color-picker .c-input__box {
|
|
4828
|
+
position: relative;
|
|
4829
|
+
cursor: pointer;
|
|
4830
|
+
}
|
|
4831
|
+
.c-color-picker .c-color-picker__popover {
|
|
4832
|
+
position: static;
|
|
4833
|
+
display: flex;
|
|
4834
|
+
flex: 1 1 auto;
|
|
4835
|
+
align-items: center;
|
|
4836
|
+
min-width: 0;
|
|
4837
|
+
}
|
|
4838
|
+
.c-color-picker__button {
|
|
4839
|
+
display: flex;
|
|
4840
|
+
box-sizing: border-box;
|
|
4841
|
+
gap: 0.75rem;
|
|
4842
|
+
align-items: center;
|
|
4843
|
+
width: 100%;
|
|
4844
|
+
min-height: 1.5em;
|
|
4845
|
+
padding: 0;
|
|
4846
|
+
font: inherit;
|
|
4847
|
+
font-variant-numeric: tabular-nums;
|
|
4848
|
+
color: var(--c-text);
|
|
4849
|
+
text-align: start;
|
|
4850
|
+
cursor: inherit;
|
|
4851
|
+
background: transparent;
|
|
4852
|
+
border: 0;
|
|
4853
|
+
}
|
|
4854
|
+
.c-color-picker__button:disabled {
|
|
4855
|
+
color: inherit;
|
|
4856
|
+
cursor: not-allowed;
|
|
4857
|
+
}
|
|
4858
|
+
.c-color-picker__swatch-preview, .c-color-picker__preview {
|
|
4859
|
+
flex: none;
|
|
4860
|
+
box-sizing: border-box;
|
|
4861
|
+
width: 1.25rem;
|
|
4862
|
+
height: 1.25rem;
|
|
4863
|
+
border: 1px solid var(--c-muted);
|
|
4864
|
+
border-radius: 0;
|
|
4865
|
+
}
|
|
4866
|
+
.c-color-picker__chip--empty {
|
|
4867
|
+
background: repeating-conic-gradient(var(--c-surface-active) 0% 25%, var(--c-background) 0% 50%) 50%/0.5rem 0.5rem;
|
|
4868
|
+
}
|
|
4869
|
+
.c-color-picker--open:not(.c-input--invalid) .c-input__box {
|
|
4870
|
+
border-color: var(--c-focus);
|
|
4871
|
+
}
|
|
4872
|
+
.c-color-picker.c-input--disabled .c-input__box {
|
|
4873
|
+
cursor: not-allowed;
|
|
4874
|
+
}
|
|
4875
|
+
.c-color-picker__panel {
|
|
4876
|
+
display: flex;
|
|
4877
|
+
flex-direction: column;
|
|
4878
|
+
gap: 0.75rem;
|
|
4879
|
+
box-sizing: border-box;
|
|
4880
|
+
width: 15rem;
|
|
4881
|
+
max-width: 100%;
|
|
4882
|
+
padding: 0.75rem;
|
|
4883
|
+
outline: 0;
|
|
4884
|
+
}
|
|
4885
|
+
.c-color-picker__area, .c-color-picker__track {
|
|
4886
|
+
position: relative;
|
|
4887
|
+
flex: none;
|
|
4888
|
+
touch-action: none;
|
|
4889
|
+
cursor: crosshair;
|
|
4890
|
+
user-select: none;
|
|
4891
|
+
}
|
|
4892
|
+
.c-color-picker__area:focus-visible, .c-color-picker__track:focus-visible {
|
|
4893
|
+
outline: 1px solid var(--c-focus);
|
|
4894
|
+
outline-offset: 2px;
|
|
4895
|
+
}
|
|
4896
|
+
.c-color-picker__area {
|
|
4897
|
+
height: 9rem;
|
|
4898
|
+
background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0)), linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
|
|
4899
|
+
border-radius: 0;
|
|
4900
|
+
}
|
|
4901
|
+
.c-color-picker__track {
|
|
4902
|
+
height: 0.75rem;
|
|
4903
|
+
border-radius: 0;
|
|
4904
|
+
}
|
|
4905
|
+
.c-color-picker__hue {
|
|
4906
|
+
background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
4907
|
+
}
|
|
4908
|
+
.c-color-picker__alpha {
|
|
4909
|
+
background: repeating-conic-gradient(var(--c-surface-active) 0% 25%, var(--c-background) 0% 50%) 50%/0.5rem 0.5rem;
|
|
4910
|
+
}
|
|
4911
|
+
.c-color-picker__alpha-fill {
|
|
4912
|
+
position: absolute;
|
|
4913
|
+
inset: 0;
|
|
4914
|
+
border-radius: inherit;
|
|
4915
|
+
}
|
|
4916
|
+
.c-color-picker__thumb {
|
|
4917
|
+
position: absolute;
|
|
4918
|
+
box-sizing: border-box;
|
|
4919
|
+
width: 1.25rem;
|
|
4920
|
+
height: 1.25rem;
|
|
4921
|
+
pointer-events: none;
|
|
4922
|
+
border: 2px solid var(--c-background);
|
|
4923
|
+
border-radius: 50%;
|
|
4924
|
+
box-shadow: 0 0 0 1px var(--c-text);
|
|
4925
|
+
translate: -50% -50%;
|
|
4926
|
+
}
|
|
4927
|
+
.c-color-picker__track > .c-color-picker__thumb {
|
|
4928
|
+
top: 50%;
|
|
4929
|
+
}
|
|
4930
|
+
.c-color-picker__hex {
|
|
4931
|
+
display: flex;
|
|
4932
|
+
gap: 0.5rem;
|
|
4933
|
+
align-items: center;
|
|
4934
|
+
}
|
|
4935
|
+
.c-color-picker__hex-input {
|
|
4936
|
+
flex: 1 1 auto;
|
|
4937
|
+
box-sizing: border-box;
|
|
4938
|
+
min-width: 0;
|
|
4939
|
+
padding: 0.625rem 0.75rem;
|
|
4940
|
+
font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
|
|
4941
|
+
font-size: 0.875rem;
|
|
4942
|
+
color: var(--c-text);
|
|
4943
|
+
background: var(--c-background);
|
|
4944
|
+
border: 1px solid var(--c-muted);
|
|
4945
|
+
border-radius: 0;
|
|
4946
|
+
}
|
|
4947
|
+
.c-color-picker__hex-input[aria-invalid=true] {
|
|
4948
|
+
border-color: var(--c-error);
|
|
4949
|
+
}
|
|
4950
|
+
.c-color-picker__hex-input:focus-visible {
|
|
4951
|
+
outline: 1px solid var(--c-focus);
|
|
4952
|
+
outline-offset: 2px;
|
|
4953
|
+
}
|
|
4954
|
+
.c-color-picker__swatches {
|
|
4955
|
+
display: flex;
|
|
4956
|
+
flex-wrap: wrap;
|
|
4957
|
+
gap: 0.5rem;
|
|
4958
|
+
}
|
|
4959
|
+
.c-color-picker__swatch {
|
|
4960
|
+
box-sizing: border-box;
|
|
4961
|
+
width: 1.75rem;
|
|
4962
|
+
height: 1.75rem;
|
|
4963
|
+
padding: 0;
|
|
4964
|
+
cursor: pointer;
|
|
4965
|
+
border: 1px solid var(--c-muted);
|
|
4966
|
+
border-radius: 0;
|
|
4967
|
+
}
|
|
4968
|
+
.c-color-picker__swatch[aria-pressed=true] {
|
|
4969
|
+
box-shadow: 0 0 0 2px var(--c-primary);
|
|
4970
|
+
}
|
|
4971
|
+
.c-color-picker__swatch:focus-visible {
|
|
4972
|
+
outline: 1px solid var(--c-focus);
|
|
4973
|
+
outline-offset: 2px;
|
|
4974
|
+
}
|
|
4975
|
+
|
|
4976
|
+
.c-async-autocomplete .c-input__box {
|
|
4977
|
+
position: relative;
|
|
4978
|
+
cursor: text;
|
|
4979
|
+
}
|
|
4980
|
+
.c-async-autocomplete .c-async-autocomplete__popover {
|
|
4981
|
+
position: static;
|
|
4982
|
+
display: flex;
|
|
4983
|
+
flex: 1 1 auto;
|
|
4984
|
+
align-items: center;
|
|
4985
|
+
min-width: 0;
|
|
4986
|
+
}
|
|
4987
|
+
.c-async-autocomplete__input {
|
|
4988
|
+
box-sizing: border-box;
|
|
4989
|
+
width: 100%;
|
|
4990
|
+
min-height: 1.5em;
|
|
4991
|
+
color: var(--c-text);
|
|
4992
|
+
text-overflow: ellipsis;
|
|
4993
|
+
}
|
|
4994
|
+
.c-async-autocomplete__input::placeholder {
|
|
4995
|
+
color: var(--c-muted);
|
|
4996
|
+
}
|
|
4997
|
+
.c-async-autocomplete__input:disabled {
|
|
4998
|
+
color: inherit;
|
|
4999
|
+
cursor: not-allowed;
|
|
5000
|
+
}
|
|
5001
|
+
.c-async-autocomplete--open:not(.c-input--invalid) .c-input__box {
|
|
5002
|
+
border-color: var(--c-focus);
|
|
5003
|
+
}
|
|
5004
|
+
.c-async-autocomplete.c-input--disabled .c-input__box {
|
|
5005
|
+
cursor: not-allowed;
|
|
5006
|
+
}
|
|
5007
|
+
.c-async-autocomplete--loading .c-async-autocomplete__input {
|
|
5008
|
+
padding-inline-end: calc(1rem + 0.5rem);
|
|
5009
|
+
}
|
|
5010
|
+
.c-async-autocomplete--loading .c-input__box::after {
|
|
5011
|
+
position: absolute;
|
|
5012
|
+
top: 50%;
|
|
5013
|
+
right: 0.75rem;
|
|
5014
|
+
box-sizing: border-box;
|
|
5015
|
+
width: 1rem;
|
|
5016
|
+
height: 1rem;
|
|
5017
|
+
margin-top: calc(1rem / -2);
|
|
5018
|
+
pointer-events: none;
|
|
5019
|
+
content: "";
|
|
5020
|
+
border: 2px solid var(--c-surface-active);
|
|
5021
|
+
border-top-color: var(--c-primary);
|
|
5022
|
+
border-radius: 50%;
|
|
5023
|
+
animation: c-async-autocomplete-spin 0.7s linear infinite;
|
|
5024
|
+
}
|
|
5025
|
+
.c-async-autocomplete--loading .c-listbox__empty {
|
|
5026
|
+
color: var(--c-muted);
|
|
5027
|
+
}
|
|
5028
|
+
.c-async-autocomplete--empty .c-listbox__empty {
|
|
5029
|
+
color: var(--c-muted);
|
|
5030
|
+
}
|
|
5031
|
+
.c-async-autocomplete--error .c-listbox__empty {
|
|
5032
|
+
color: var(--c-error);
|
|
5033
|
+
}
|
|
5034
|
+
|
|
5035
|
+
@keyframes c-async-autocomplete-spin {
|
|
5036
|
+
to {
|
|
5037
|
+
transform: rotate(360deg);
|
|
5038
|
+
}
|
|
5039
|
+
}
|
|
5040
|
+
@media (prefers-reduced-motion: reduce) {
|
|
5041
|
+
.c-async-autocomplete--loading .c-input__box::after {
|
|
5042
|
+
animation-duration: 2s;
|
|
5043
|
+
}
|
|
5044
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carissa-io/theme-default",
|
|
3
|
-
"version": "0.3.
|
|
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",
|
|
@@ -83,7 +83,17 @@
|
|
|
83
83
|
"@carissa-io/components-empty-state": "^0.1.0",
|
|
84
84
|
"@carissa-io/components-timeline": "^0.1.0",
|
|
85
85
|
"@carissa-io/components-tree": "^0.1.0",
|
|
86
|
-
"@carissa-io/components-code": "^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"
|
|
87
97
|
},
|
|
88
98
|
"peerDependenciesMeta": {
|
|
89
99
|
"@carissa-io/components-input": {
|
|
@@ -235,11 +245,42 @@
|
|
|
235
245
|
},
|
|
236
246
|
"@carissa-io/components-code": {
|
|
237
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
|
|
238
278
|
}
|
|
239
279
|
},
|
|
240
280
|
"devDependencies": {
|
|
241
281
|
"@carissa-io/components-accordion": "^0.1.0",
|
|
242
282
|
"@carissa-io/components-alert": "^0.1.0",
|
|
283
|
+
"@carissa-io/components-async-autocomplete": "^0.1.0",
|
|
243
284
|
"@carissa-io/components-avatar": "^0.1.0",
|
|
244
285
|
"@carissa-io/components-badge": "^0.1.0",
|
|
245
286
|
"@carissa-io/components-breadcrumb": "^0.1.0",
|
|
@@ -248,12 +289,15 @@
|
|
|
248
289
|
"@carissa-io/components-card": "^0.1.0",
|
|
249
290
|
"@carissa-io/components-checkbox": "^0.1.1",
|
|
250
291
|
"@carissa-io/components-code": "^0.1.0",
|
|
292
|
+
"@carissa-io/components-color-picker": "^0.1.0",
|
|
251
293
|
"@carissa-io/components-combobox": "^0.1.1",
|
|
252
294
|
"@carissa-io/components-date-picker": "^0.1.1",
|
|
295
|
+
"@carissa-io/components-date-range": "^0.1.0",
|
|
253
296
|
"@carissa-io/components-description-list": "^0.1.0",
|
|
254
297
|
"@carissa-io/components-divider": "^0.1.0",
|
|
255
298
|
"@carissa-io/components-drawer": "^0.1.0",
|
|
256
299
|
"@carissa-io/components-empty-state": "^0.1.0",
|
|
300
|
+
"@carissa-io/components-field": "^0.1.0",
|
|
257
301
|
"@carissa-io/components-input": "^0.2.1",
|
|
258
302
|
"@carissa-io/components-link": "^0.1.0",
|
|
259
303
|
"@carissa-io/components-list": "^0.1.0",
|
|
@@ -261,11 +305,15 @@
|
|
|
261
305
|
"@carissa-io/components-menu": "^0.1.0",
|
|
262
306
|
"@carissa-io/components-modal": "^0.1.0",
|
|
263
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",
|
|
264
310
|
"@carissa-io/components-pagination": "^0.1.0",
|
|
311
|
+
"@carissa-io/components-phone": "^0.1.0",
|
|
265
312
|
"@carissa-io/components-popover": "^0.1.1",
|
|
266
313
|
"@carissa-io/components-progress": "^0.1.0",
|
|
267
314
|
"@carissa-io/components-prose": "^0.1.0",
|
|
268
315
|
"@carissa-io/components-radio-group": "^0.1.1",
|
|
316
|
+
"@carissa-io/components-rating": "^0.1.0",
|
|
269
317
|
"@carissa-io/components-search": "^0.1.1",
|
|
270
318
|
"@carissa-io/components-select": "^0.1.1",
|
|
271
319
|
"@carissa-io/components-sidebar": "^0.1.0",
|
|
@@ -278,6 +326,8 @@
|
|
|
278
326
|
"@carissa-io/components-table": "^0.1.0",
|
|
279
327
|
"@carissa-io/components-tabs": "^0.1.0",
|
|
280
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",
|
|
281
331
|
"@carissa-io/components-timeline": "^0.1.0",
|
|
282
332
|
"@carissa-io/components-toast": "^0.1.0",
|
|
283
333
|
"@carissa-io/components-tooltip": "^0.1.0",
|
package/scss/index.scss
CHANGED
|
@@ -1389,3 +1389,211 @@
|
|
|
1389
1389
|
$c-code-focus-outline: $focus-width solid $var-focus,
|
|
1390
1390
|
$c-code-focus-outline-offset: -2px
|
|
1391
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
|
+
);
|