@carissa-io/theme-default 0.3.7 → 0.3.8

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 CHANGED
@@ -362,6 +362,31 @@ The panel slides in over `$transition-duration`; with reduced motion it just app
362
362
  From [components-menu](components/components-menu): `Menu`, `MenuItem`, `MenuSeparator` and `MenuLabel`. The panel is the Popover's (`--c-background`, a 1px `--c-muted` border, flat). Items are `--c-text` with 0.625rem of block and 0.75rem of side padding, and hover and keyboard focus share a `--c-surface-active`
363
363
  background (14.23:1 light, 13.88:1 dark) plus the theme's 1px `--c-focus` ring. Labels are small `--c-muted` text (4.74:1 / 7.85:1 on the panel), the separator a 1px `--c-muted` line, a disabled item is half opacity. Square. The trigger is the app's own button, so its look is not part of the theme.
364
364
 
365
+ ## Table
366
+ From [components-table](components/components-table): `Table` and its parts. The header is `--c-surface` with bold `--c-text` (16.4:1 light, 16.4:1 dark), the rows are divided by 1px `--c-muted` lines, cells have 1rem by 0.75rem of padding (0.75rem by 0.375rem when dense) at the small size. **Row hover** is `--c-surface-active` (14.2:1 / 13.9:1 for `--c-text`), not `--c-surface`, so it still shows on a striped row (stripes are `--c-surface`). The **selected row** is a 12% tint of `--c-primary` over `--c-background`
367
+ (`color-mix`, light `#e0e0e0`, dark `#272727`), so `--c-text` is 13.6:1 / 13.7:1 on it and the tint follows the mode with no extra role. The **sticky header** background is `--c-surface`, a custom property and therefore opaque in both modes (rows never show through, and dark gets its own value; the component's neutral default is a literal white and must not be used in dark). The caption is `--c-muted` (4.74:1 / 7.85:1 on the background). The sort arrows are CSS glyphs, so the direction is a shape and not only an opacity. Square, the theme's 1px `--c-focus` ring inside the cell and the scroll region.
368
+
369
+ ## List
370
+ From [components-list](components/components-list): `List` and `ListItem`. Rows sit on the page background, divided (or bordered) by 1px `--c-muted` lines, with 1rem by 0.75rem of padding. A link or button row highlights with `--c-surface-active` on hover (`--c-text` 14.2:1 / 13.9:1) and the current item (`aria-current`) takes the same 12% `--c-primary` tint as a selected table row (13.6:1 / 13.7:1). The secondary text is `--c-text` at the small size on purpose: `--c-muted` is 4.74:1 on the background but only 4.35:1 on `--c-surface` and 3.76:1 on `--c-surface-active`, both short of AA for text. Square, the theme's 1px `--c-focus` ring inside the row.
371
+
372
+ ## Description list
373
+ From [components-description-list](components/components-description-list): `DescriptionList`, `DescriptionTerm`, `DescriptionDetail` and `DescriptionItem`. The term is a small bold `--c-muted` label (4.74:1 light, 7.85:1 dark on the background; do not put a description list on `--c-surface` in light, where it is 4.35:1) and the detail is `--c-text`. No fills or borders: the layout (vertical, horizontal, grid) is the only thing it sets, with 2rem between columns and 1rem between pairs.
374
+
375
+ ## Stat
376
+ From [components-stat](components/components-stat): `Stat`. A card-like block on `--c-background` with a 1px `--c-muted` border (the Card's outlined look), square, 1.25rem by 1.5rem of padding. It is not on `--c-surface` because the delta colors are checked against the background: **delta up is `--c-success`** (5.02:1 light, 11.36:1 dark), **delta down is `--c-error`** (4.53:1 light, 7.16:1 dark) and **flat is `--c-muted`** (4.74:1 / 7.85:1). On `--c-surface` the light `--c-error` would be 4.15:1, short of AA. The value is `--c-text` at the h1 size; the label and description are `--c-muted`. Color is never the only signal: the arrow glyph (up, down, flat) and the `delta_label` text for screen readers say the same. Whether "down" is good news (churn, cost) is the app's call: the color only follows the direction.
377
+
378
+ ## Empty state
379
+ From [components-empty-state](components/components-empty-state): `EmptyState`. A centred block on the page background, with 3rem by 1.5rem of padding at the default size and 1rem between its parts. The icon is `--c-muted` (4.74:1 light, 7.85:1 dark, above the 3:1 non-text minimum), the title is `--c-text`, bold, at the h3 size (h4 small, h2 large) and the description is `--c-muted` at the body size (4.74:1 / 7.85:1 on the background; on `--c-surface` it would be 4.35:1 in light, short of AA, so do not put an empty state on a surface panel without moving the description to `--c-text`). The actions are the app's own buttons. No fills, borders or radius.
380
+
381
+ ## Timeline
382
+ From [components-timeline](components/components-timeline): `Timeline` and `TimelineItem`. The connector is a 1px `--c-muted` line. A **default** marker is a `--c-surface-active` dot with a 2px `--c-muted` ring; **success, warning, error and info** are solid dots in `--c-success`, `--c-warning`, `--c-error` and `--c-info` (light 5.02, 4.92, 4.53 and 6.70:1 on the background, dark 11.36, 11.86, 7.16 and 7.79:1: all above the 3:1 non-text minimum); the **current** step is a hollow `--c-primary` ring (21:1 / 19.8:1), a different shape from the dots, and the item carries `aria-current="step"`. An **icon marker** keeps a `--c-background` fill and takes the status as its 2px ring, so the `--c-text` icon is 17.93:1 / 18.16:1 in every status (a colored fill would not give one icon color AA in both modes). The status is also the visually hidden `status_label`, so colour is never the only signal. The title is bold `--c-text`, the time is `--c-muted` at the small size (4.74:1 / 7.85:1 on the background) and the description is `--c-text`. Keep a timeline on `--c-background`. Deviation from the first plan: the default dot is outlined with `--c-muted` instead of being a bare `--c-surface-active` dot, which is 1.2:1 on white.
383
+
384
+ ## Tree
385
+ From [components-tree](components/components-tree): `Tree` and `TreeItem`. Rows are 0.5rem by 0.75rem on the page background, 1.5rem of indent per level. **Hover** is `--c-surface-active` (`--c-text` 14.23:1 light, 13.88:1 dark); the **selected row** is the same 12% tint of `--c-primary` over `--c-background` as a selected table row (`color-mix`, light `#e0e0e0`, dark `#272727`) with `--c-text` (13.58:1 / 13.70:1), so a selected row still reads when hovered. The **chevron** is the component's CSS border chevron on `.c-tree__toggle` (parents only; right when closed, down when open), colored `--c-muted`: 3.76:1 on the hover and 3.59:1 on the selected tint in light, 6.00:1 and 5.92:1 in dark, above the 3:1 non-text minimum. A disabled item is half opacity (exempt from contrast). Square, the theme's 1px `--c-focus` ring inside the row.
386
+
387
+ ## Code
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
+
365
390
  ## Keyboard focus (all controls)
366
391
  One rule keeps the controls coherent: **an outlined control thickens its own border from 1px to 2px, black** (text fields,
367
392
  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` and `-menu`. `components-email`, `-password`, `-url` and `-textarea`
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 `-code`. `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
@@ -1,3 +1,4 @@
1
+ @charset "UTF-8";
1
2
  :root {
2
3
  --c-background: #fff;
3
4
  --c-text: #171717;
@@ -3652,3 +3653,798 @@ hr.c-divider {
3652
3653
  margin: 0.25rem 0;
3653
3654
  background: var(--c-muted);
3654
3655
  }
3656
+
3657
+ .c-table-wrapper {
3658
+ box-sizing: border-box;
3659
+ max-width: 100%;
3660
+ overflow: auto;
3661
+ }
3662
+ .c-table-wrapper:focus-visible {
3663
+ outline: 1px solid var(--c-focus);
3664
+ outline-offset: -2px;
3665
+ }
3666
+
3667
+ .c-table {
3668
+ box-sizing: border-box;
3669
+ width: 100%;
3670
+ font-size: 0.875rem;
3671
+ text-align: start;
3672
+ border-spacing: 0;
3673
+ border-collapse: separate;
3674
+ }
3675
+
3676
+ .c-table__caption {
3677
+ padding: 0.75rem 1rem;
3678
+ color: var(--c-muted);
3679
+ text-align: start;
3680
+ caption-side: top;
3681
+ }
3682
+
3683
+ .c-table__header-cell,
3684
+ .c-table__cell {
3685
+ padding: 0.75rem 1rem;
3686
+ text-align: start;
3687
+ vertical-align: middle;
3688
+ border-bottom: 1px solid var(--c-muted);
3689
+ }
3690
+
3691
+ .c-table--dense .c-table__header-cell,
3692
+ .c-table--dense .c-table__cell {
3693
+ padding: 0.375rem 0.75rem;
3694
+ }
3695
+
3696
+ .c-table__header-cell--center,
3697
+ .c-table__cell--center {
3698
+ text-align: center;
3699
+ }
3700
+
3701
+ .c-table__header-cell--end,
3702
+ .c-table__cell--end {
3703
+ text-align: end;
3704
+ }
3705
+
3706
+ .c-table__header-cell {
3707
+ font-weight: 700;
3708
+ color: var(--c-text);
3709
+ white-space: nowrap;
3710
+ background: var(--c-surface);
3711
+ }
3712
+
3713
+ .c-table--sticky-header .c-table__head .c-table__header-cell {
3714
+ position: sticky;
3715
+ top: 0;
3716
+ z-index: 1;
3717
+ background: var(--c-surface);
3718
+ }
3719
+
3720
+ .c-table__body .c-table__row:hover {
3721
+ background: var(--c-surface-active);
3722
+ }
3723
+
3724
+ .c-table--striped .c-table__body .c-table__row:nth-child(even) {
3725
+ background: var(--c-surface);
3726
+ }
3727
+
3728
+ .c-table__body .c-table__row--selected,
3729
+ .c-table--striped .c-table__body .c-table__row--selected,
3730
+ .c-table__body .c-table__row--selected:hover {
3731
+ background: color-mix(in srgb, var(--c-primary) 12%, var(--c-background));
3732
+ }
3733
+
3734
+ .c-table__foot .c-table__cell,
3735
+ .c-table__foot .c-table__header-cell {
3736
+ font-weight: 700;
3737
+ border-top: 1px solid var(--c-muted);
3738
+ }
3739
+
3740
+ .c-table__sort {
3741
+ display: inline-flex;
3742
+ gap: 0.375rem;
3743
+ align-items: center;
3744
+ padding: 0;
3745
+ font: inherit;
3746
+ font-weight: inherit;
3747
+ color: inherit;
3748
+ cursor: pointer;
3749
+ background: transparent;
3750
+ border: 0;
3751
+ }
3752
+ .c-table__sort:focus-visible {
3753
+ outline: 1px solid var(--c-focus);
3754
+ outline-offset: 2px;
3755
+ }
3756
+
3757
+ .c-table__sort-icon {
3758
+ display: inline-block;
3759
+ flex: none;
3760
+ font-size: 0.625rem;
3761
+ line-height: 1;
3762
+ opacity: 0.35;
3763
+ }
3764
+ .c-table__sort-icon::before {
3765
+ content: "↕";
3766
+ }
3767
+
3768
+ .c-table__sort-icon--ascending {
3769
+ opacity: 1;
3770
+ }
3771
+ .c-table__sort-icon--ascending::before {
3772
+ content: "▲";
3773
+ }
3774
+
3775
+ .c-table__sort-icon--descending {
3776
+ opacity: 1;
3777
+ }
3778
+ .c-table__sort-icon--descending::before {
3779
+ content: "▼";
3780
+ }
3781
+
3782
+ .c-list {
3783
+ box-sizing: border-box;
3784
+ padding: 0;
3785
+ margin: 0;
3786
+ font-size: 1rem;
3787
+ list-style: none;
3788
+ }
3789
+
3790
+ ol.c-list {
3791
+ padding-inline-start: 1.5rem;
3792
+ list-style: decimal;
3793
+ }
3794
+
3795
+ .c-list--sm {
3796
+ font-size: 0.875rem;
3797
+ }
3798
+
3799
+ .c-list--lg {
3800
+ font-size: 1.125rem;
3801
+ }
3802
+
3803
+ .c-list--bordered {
3804
+ overflow: hidden;
3805
+ border: 1px solid var(--c-muted);
3806
+ border-radius: 0;
3807
+ }
3808
+
3809
+ .c-list--bordered > .c-list__item + .c-list__item,
3810
+ .c-list--divided > .c-list__item + .c-list__item {
3811
+ border-top: 1px solid var(--c-muted);
3812
+ }
3813
+
3814
+ .c-list__item {
3815
+ display: list-item;
3816
+ padding: 0;
3817
+ margin: 0;
3818
+ }
3819
+ .c-list__item--selected {
3820
+ color: var(--c-text);
3821
+ background: color-mix(in srgb, var(--c-primary) 12%, var(--c-background));
3822
+ }
3823
+ .c-list__item--disabled {
3824
+ cursor: not-allowed;
3825
+ opacity: 0.5;
3826
+ }
3827
+
3828
+ .c-list__row {
3829
+ box-sizing: border-box;
3830
+ display: flex;
3831
+ gap: 1rem;
3832
+ align-items: center;
3833
+ width: 100%;
3834
+ padding: 0.75rem 1rem;
3835
+ font: inherit;
3836
+ color: inherit;
3837
+ text-align: start;
3838
+ text-decoration: none;
3839
+ background: transparent;
3840
+ border: 0;
3841
+ }
3842
+
3843
+ .c-list--sm .c-list__row {
3844
+ padding-block: 0.5rem;
3845
+ }
3846
+
3847
+ .c-list--lg .c-list__row {
3848
+ padding-block: 1rem;
3849
+ }
3850
+
3851
+ .c-list__item--interactive > .c-list__row {
3852
+ cursor: pointer;
3853
+ transition: background-color 0.2s ease-out;
3854
+ }
3855
+ .c-list__item--interactive > .c-list__row:hover {
3856
+ background: var(--c-surface-active);
3857
+ }
3858
+ .c-list__item--interactive > .c-list__row:focus-visible {
3859
+ outline: 1px solid var(--c-focus);
3860
+ outline-offset: -2px;
3861
+ }
3862
+
3863
+ .c-list__item--disabled > .c-list__row {
3864
+ pointer-events: none;
3865
+ }
3866
+
3867
+ .c-list__leading,
3868
+ .c-list__trailing {
3869
+ display: inline-flex;
3870
+ flex: none;
3871
+ align-items: center;
3872
+ }
3873
+
3874
+ .c-list__body {
3875
+ display: flex;
3876
+ flex: 1;
3877
+ flex-direction: column;
3878
+ min-width: 0;
3879
+ }
3880
+
3881
+ .c-list__description {
3882
+ font-size: 0.875rem;
3883
+ color: var(--c-text);
3884
+ }
3885
+
3886
+ @media (prefers-reduced-motion: reduce) {
3887
+ .c-list__item--interactive > .c-list__row {
3888
+ transition: none;
3889
+ }
3890
+ }
3891
+ .c-description-list {
3892
+ box-sizing: border-box;
3893
+ margin: 0;
3894
+ font-size: 1rem;
3895
+ }
3896
+
3897
+ .c-description-list__item {
3898
+ min-width: 0;
3899
+ }
3900
+
3901
+ .c-description-list__term {
3902
+ margin: 0;
3903
+ font-size: 0.875rem;
3904
+ font-weight: 700;
3905
+ color: var(--c-muted);
3906
+ }
3907
+
3908
+ .c-description-list__detail {
3909
+ margin: 0;
3910
+ overflow-wrap: anywhere;
3911
+ color: var(--c-text);
3912
+ }
3913
+
3914
+ .c-description-list--vertical {
3915
+ display: flex;
3916
+ flex-direction: column;
3917
+ gap: 1rem;
3918
+ }
3919
+ .c-description-list--vertical > .c-description-list__term + .c-description-list__detail,
3920
+ .c-description-list--vertical > .c-description-list__item > .c-description-list__term + .c-description-list__detail {
3921
+ margin-top: 0.25rem;
3922
+ }
3923
+
3924
+ .c-description-list--grid {
3925
+ display: grid;
3926
+ grid-template-columns: repeat(var(--c-description-list-columns, 2), minmax(0, 1fr));
3927
+ gap: 1rem 2rem;
3928
+ }
3929
+ .c-description-list--grid > .c-description-list__item > .c-description-list__term + .c-description-list__detail {
3930
+ margin-top: 0.25rem;
3931
+ }
3932
+
3933
+ .c-description-list--horizontal {
3934
+ display: grid;
3935
+ grid-template-columns: 12rem minmax(0, 1fr);
3936
+ gap: 1rem 2rem;
3937
+ }
3938
+ .c-description-list--horizontal > .c-description-list__item {
3939
+ display: grid;
3940
+ grid-column: 1/-1;
3941
+ grid-template-columns: subgrid;
3942
+ }
3943
+
3944
+ .c-stat {
3945
+ box-sizing: border-box;
3946
+ display: flex;
3947
+ gap: 1rem;
3948
+ align-items: flex-start;
3949
+ padding: 1.25rem 1.5rem;
3950
+ background: var(--c-background);
3951
+ border: 1px solid var(--c-muted);
3952
+ border-radius: 0;
3953
+ }
3954
+
3955
+ .c-stat__icon {
3956
+ display: inline-flex;
3957
+ flex: none;
3958
+ align-items: center;
3959
+ justify-content: center;
3960
+ width: 1.5rem;
3961
+ height: 1.5rem;
3962
+ color: var(--c-text);
3963
+ }
3964
+
3965
+ .c-stat__content {
3966
+ display: flex;
3967
+ flex: 1;
3968
+ flex-direction: column;
3969
+ gap: 0.25rem;
3970
+ min-width: 0;
3971
+ margin: 0;
3972
+ }
3973
+
3974
+ .c-stat__label {
3975
+ font-size: 0.875rem;
3976
+ font-weight: 700;
3977
+ color: var(--c-muted);
3978
+ }
3979
+
3980
+ .c-stat__value {
3981
+ margin: 0;
3982
+ font-size: 2.5rem;
3983
+ font-weight: 700;
3984
+ line-height: 1.2;
3985
+ color: var(--c-text);
3986
+ }
3987
+
3988
+ .c-stat__description {
3989
+ margin: 0;
3990
+ font-size: 0.875rem;
3991
+ color: var(--c-muted);
3992
+ }
3993
+
3994
+ .c-stat__delta {
3995
+ display: inline-flex;
3996
+ gap: 0.25rem;
3997
+ align-items: baseline;
3998
+ margin: 0;
3999
+ font-size: 0.875rem;
4000
+ font-weight: 700;
4001
+ }
4002
+ .c-stat__delta::before {
4003
+ font-size: 0.75em;
4004
+ content: "▲";
4005
+ content: "▲"/"";
4006
+ }
4007
+ .c-stat__delta--up {
4008
+ color: var(--c-success);
4009
+ }
4010
+ .c-stat__delta--down {
4011
+ color: var(--c-error);
4012
+ }
4013
+ .c-stat__delta--down::before {
4014
+ content: "▼";
4015
+ content: "▼"/"";
4016
+ }
4017
+ .c-stat__delta--flat {
4018
+ color: var(--c-muted);
4019
+ }
4020
+ .c-stat__delta--flat::before {
4021
+ content: "▬";
4022
+ content: "▬"/"";
4023
+ }
4024
+
4025
+ .c-stat__delta-label {
4026
+ position: absolute;
4027
+ width: 1px;
4028
+ height: 1px;
4029
+ padding: 0;
4030
+ margin: -1px;
4031
+ overflow: hidden;
4032
+ clip-path: inset(50%);
4033
+ white-space: nowrap;
4034
+ border: 0;
4035
+ }
4036
+
4037
+ .c-stat__trend {
4038
+ flex: none;
4039
+ align-self: center;
4040
+ }
4041
+
4042
+ .c-empty-state {
4043
+ box-sizing: border-box;
4044
+ display: flex;
4045
+ flex-direction: column;
4046
+ gap: 1rem;
4047
+ align-items: center;
4048
+ padding: 3rem 1.5rem;
4049
+ text-align: center;
4050
+ }
4051
+
4052
+ .c-empty-state--sm {
4053
+ padding: 1.5rem 1rem;
4054
+ }
4055
+
4056
+ .c-empty-state--lg {
4057
+ padding: 4.5rem 2rem;
4058
+ }
4059
+
4060
+ .c-empty-state__icon {
4061
+ display: inline-flex;
4062
+ align-items: center;
4063
+ justify-content: center;
4064
+ font-size: 3rem;
4065
+ line-height: 1;
4066
+ color: var(--c-muted);
4067
+ }
4068
+ .c-empty-state__icon > svg {
4069
+ width: 1em;
4070
+ height: 1em;
4071
+ }
4072
+
4073
+ .c-empty-state--sm .c-empty-state__icon {
4074
+ font-size: 2rem;
4075
+ }
4076
+
4077
+ .c-empty-state--lg .c-empty-state__icon {
4078
+ font-size: 4rem;
4079
+ }
4080
+
4081
+ .c-empty-state__title {
4082
+ max-width: 28rem;
4083
+ margin: 0;
4084
+ font-size: 1.25rem;
4085
+ font-weight: 700;
4086
+ color: var(--c-text);
4087
+ }
4088
+
4089
+ .c-empty-state--sm .c-empty-state__title {
4090
+ font-size: 1.125rem;
4091
+ }
4092
+
4093
+ .c-empty-state--lg .c-empty-state__title {
4094
+ font-size: 1.75rem;
4095
+ }
4096
+
4097
+ .c-empty-state__description {
4098
+ max-width: 28rem;
4099
+ margin: 0;
4100
+ font-size: 1rem;
4101
+ color: var(--c-muted);
4102
+ }
4103
+
4104
+ .c-empty-state--sm .c-empty-state__description {
4105
+ font-size: 0.875rem;
4106
+ }
4107
+
4108
+ .c-empty-state--lg .c-empty-state__description {
4109
+ font-size: 1rem;
4110
+ }
4111
+
4112
+ .c-empty-state__content {
4113
+ max-width: 28rem;
4114
+ }
4115
+
4116
+ .c-empty-state__actions {
4117
+ display: flex;
4118
+ flex-wrap: wrap;
4119
+ gap: 0.75rem;
4120
+ align-items: center;
4121
+ justify-content: center;
4122
+ }
4123
+
4124
+ .c-timeline {
4125
+ padding: 0;
4126
+ margin: 0;
4127
+ list-style: none;
4128
+ }
4129
+
4130
+ .c-timeline__item {
4131
+ position: relative;
4132
+ display: flex;
4133
+ gap: 1rem;
4134
+ min-width: 0;
4135
+ }
4136
+
4137
+ .c-timeline__marker {
4138
+ box-sizing: border-box;
4139
+ z-index: 1;
4140
+ display: inline-flex;
4141
+ flex: none;
4142
+ align-items: center;
4143
+ justify-content: center;
4144
+ width: 0.75rem;
4145
+ height: 0.75rem;
4146
+ margin-top: 0.375rem;
4147
+ color: var(--c-text);
4148
+ background: var(--c-surface-active);
4149
+ border: 2px solid var(--c-muted);
4150
+ border-radius: 50%;
4151
+ }
4152
+ .c-timeline__marker--icon {
4153
+ width: 1.5rem;
4154
+ height: 1.5rem;
4155
+ margin-top: 0;
4156
+ }
4157
+
4158
+ .c-timeline__content {
4159
+ display: flex;
4160
+ flex: 1;
4161
+ flex-direction: column;
4162
+ gap: 0.25rem;
4163
+ min-width: 0;
4164
+ }
4165
+
4166
+ .c-timeline__title {
4167
+ font-weight: 700;
4168
+ color: var(--c-text);
4169
+ }
4170
+
4171
+ .c-timeline__time {
4172
+ font-size: 0.875rem;
4173
+ color: var(--c-muted);
4174
+ }
4175
+
4176
+ .c-timeline__description {
4177
+ margin: 0;
4178
+ font-size: 0.875rem;
4179
+ color: var(--c-text);
4180
+ }
4181
+
4182
+ .c-timeline__extra {
4183
+ min-width: 0;
4184
+ }
4185
+
4186
+ .c-timeline__status-label {
4187
+ position: absolute;
4188
+ width: 1px;
4189
+ height: 1px;
4190
+ padding: 0;
4191
+ margin: -1px;
4192
+ overflow: hidden;
4193
+ clip-path: inset(50%);
4194
+ white-space: nowrap;
4195
+ border: 0;
4196
+ }
4197
+
4198
+ .c-timeline__item--success > .c-timeline__marker {
4199
+ background: var(--c-success);
4200
+ border-color: var(--c-success);
4201
+ }
4202
+
4203
+ .c-timeline__item--warning > .c-timeline__marker {
4204
+ background: var(--c-warning);
4205
+ border-color: var(--c-warning);
4206
+ }
4207
+
4208
+ .c-timeline__item--error > .c-timeline__marker {
4209
+ background: var(--c-error);
4210
+ border-color: var(--c-error);
4211
+ }
4212
+
4213
+ .c-timeline__item--info > .c-timeline__marker {
4214
+ background: var(--c-info);
4215
+ border-color: var(--c-info);
4216
+ }
4217
+
4218
+ .c-timeline__item > .c-timeline__marker--icon {
4219
+ background: var(--c-background);
4220
+ }
4221
+
4222
+ .c-timeline__item--current > .c-timeline__marker {
4223
+ background: transparent;
4224
+ border-color: var(--c-primary);
4225
+ }
4226
+
4227
+ .c-timeline--vertical > .c-timeline__item {
4228
+ padding-bottom: 1.5rem;
4229
+ }
4230
+ .c-timeline--vertical > .c-timeline__item:last-child {
4231
+ padding-bottom: 0;
4232
+ }
4233
+ .c-timeline--vertical > .c-timeline__item:not(:last-child)::before {
4234
+ position: absolute;
4235
+ top: 1.25rem;
4236
+ bottom: 0;
4237
+ left: calc((1.5rem - 1px) / 2);
4238
+ width: 1px;
4239
+ content: "";
4240
+ background: var(--c-muted);
4241
+ }
4242
+ .c-timeline--vertical > .c-timeline__item > .c-timeline__marker:not(.c-timeline__marker--icon) {
4243
+ margin-right: calc(1.5rem - 0.75rem);
4244
+ margin-left: calc((1.5rem - 0.75rem) / 2);
4245
+ }
4246
+
4247
+ .c-timeline--horizontal {
4248
+ display: flex;
4249
+ gap: 1.5rem;
4250
+ overflow-x: auto;
4251
+ }
4252
+ .c-timeline--horizontal > .c-timeline__item {
4253
+ flex: 0 0 14rem;
4254
+ flex-direction: column;
4255
+ gap: 1rem;
4256
+ }
4257
+ .c-timeline--horizontal > .c-timeline__item:not(:last-child)::before {
4258
+ position: absolute;
4259
+ top: calc(1.5rem / 2 - 1px / 2);
4260
+ left: 1.5rem;
4261
+ width: calc(100% + 1.5rem - 1.5rem);
4262
+ height: 1px;
4263
+ content: "";
4264
+ background: var(--c-muted);
4265
+ }
4266
+ .c-timeline--horizontal > .c-timeline__item > .c-timeline__marker:not(.c-timeline__marker--icon) {
4267
+ margin-top: calc((1.5rem - 0.75rem) / 2);
4268
+ }
4269
+
4270
+ .c-tree,
4271
+ .c-tree__group {
4272
+ padding: 0;
4273
+ margin: 0;
4274
+ list-style: none;
4275
+ }
4276
+
4277
+ .c-tree {
4278
+ font-size: 1rem;
4279
+ }
4280
+
4281
+ .c-tree__group {
4282
+ padding-inline-start: 1.5rem;
4283
+ }
4284
+
4285
+ .c-tree__item {
4286
+ margin: 0;
4287
+ outline: none;
4288
+ }
4289
+
4290
+ .c-tree__row {
4291
+ box-sizing: border-box;
4292
+ display: flex;
4293
+ gap: 0.5rem;
4294
+ align-items: center;
4295
+ padding: 0.5rem 0.75rem;
4296
+ cursor: pointer;
4297
+ border-radius: 0;
4298
+ transition: background-color 0.2s ease-out;
4299
+ }
4300
+ .c-tree__row:hover {
4301
+ background: var(--c-surface-active);
4302
+ }
4303
+
4304
+ .c-tree__item--selected > .c-tree__row {
4305
+ color: var(--c-text);
4306
+ background: color-mix(in srgb, var(--c-primary) 12%, var(--c-background));
4307
+ }
4308
+
4309
+ .c-tree__item:focus-visible > .c-tree__row {
4310
+ outline: 1px solid var(--c-focus);
4311
+ outline-offset: -2px;
4312
+ }
4313
+
4314
+ .c-tree__item--disabled > .c-tree__row {
4315
+ pointer-events: none;
4316
+ cursor: not-allowed;
4317
+ opacity: 0.5;
4318
+ }
4319
+
4320
+ .c-tree__toggle {
4321
+ display: inline-flex;
4322
+ flex: none;
4323
+ align-items: center;
4324
+ justify-content: center;
4325
+ width: 1rem;
4326
+ height: 1rem;
4327
+ }
4328
+
4329
+ .c-tree__item--parent > .c-tree__row > .c-tree__toggle::before {
4330
+ box-sizing: border-box;
4331
+ width: 0.4375rem;
4332
+ height: 0.4375rem;
4333
+ content: "";
4334
+ border-right: 2px solid var(--c-muted);
4335
+ border-bottom: 2px solid var(--c-muted);
4336
+ transition: transform 0.2s ease-out;
4337
+ transform: translateX(-12%) rotate(-45deg);
4338
+ }
4339
+
4340
+ .c-tree__item--open > .c-tree__row > .c-tree__toggle::before {
4341
+ transform: translateY(-12%) rotate(45deg);
4342
+ }
4343
+
4344
+ .c-tree__icon {
4345
+ display: inline-flex;
4346
+ flex: none;
4347
+ align-items: center;
4348
+ }
4349
+
4350
+ .c-tree__label {
4351
+ flex: 1;
4352
+ min-width: 0;
4353
+ }
4354
+
4355
+ @media (prefers-reduced-motion: reduce) {
4356
+ .c-tree__row,
4357
+ .c-tree__item--parent > .c-tree__row > .c-tree__toggle::before {
4358
+ transition: none;
4359
+ }
4360
+ }
4361
+ .c-code,
4362
+ .c-kbd,
4363
+ .c-code-block__code {
4364
+ font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
4365
+ }
4366
+
4367
+ .c-code {
4368
+ padding: 0.125em 0.375em;
4369
+ font-size: 0.875em;
4370
+ color: var(--c-text);
4371
+ background: var(--c-surface);
4372
+ border-radius: 0;
4373
+ }
4374
+
4375
+ .c-kbd {
4376
+ display: inline-block;
4377
+ padding: 0.125em 0.5em;
4378
+ font-size: 0.8125em;
4379
+ line-height: 1.2;
4380
+ color: var(--c-text);
4381
+ white-space: nowrap;
4382
+ background: var(--c-background);
4383
+ border: 1px solid var(--c-muted);
4384
+ border-radius: 0;
4385
+ box-shadow: 0 1px 0 var(--c-muted);
4386
+ }
4387
+
4388
+ .c-code-block {
4389
+ position: relative;
4390
+ }
4391
+
4392
+ .c-code-block__pre {
4393
+ box-sizing: border-box;
4394
+ margin: 0;
4395
+ overflow: auto;
4396
+ font-size: 0.875rem;
4397
+ line-height: 1.5;
4398
+ tab-size: 4;
4399
+ color: var(--c-text);
4400
+ background: var(--c-surface);
4401
+ border: 1px solid var(--c-muted);
4402
+ border-radius: 0;
4403
+ padding: 1rem;
4404
+ }
4405
+ .c-code-block__pre:focus-visible {
4406
+ outline: 1px solid var(--c-focus);
4407
+ outline-offset: -2px;
4408
+ }
4409
+
4410
+ .c-code-block__code {
4411
+ font-size: inherit;
4412
+ }
4413
+
4414
+ .c-code-block--wrap .c-code-block__pre {
4415
+ white-space: pre-wrap;
4416
+ overflow-wrap: anywhere;
4417
+ }
4418
+
4419
+ .c-code-block__copy {
4420
+ position: absolute;
4421
+ top: 0.5rem;
4422
+ right: 0.5rem;
4423
+ padding: 0.375rem 0.75rem;
4424
+ font: inherit;
4425
+ font-size: 0.875rem;
4426
+ color: var(--c-text);
4427
+ cursor: pointer;
4428
+ background: var(--c-background);
4429
+ border: 1px solid var(--c-muted);
4430
+ border-radius: 0;
4431
+ }
4432
+ .c-code-block__copy:hover {
4433
+ background: var(--c-surface-active);
4434
+ }
4435
+ .c-code-block__copy:focus-visible {
4436
+ outline: 1px solid var(--c-focus);
4437
+ outline-offset: -2px;
4438
+ }
4439
+
4440
+ .c-code-block__status {
4441
+ position: absolute;
4442
+ width: 1px;
4443
+ height: 1px;
4444
+ padding: 0;
4445
+ margin: -1px;
4446
+ overflow: hidden;
4447
+ clip-path: inset(50%);
4448
+ white-space: nowrap;
4449
+ border: 0;
4450
+ }
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.8",
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,15 @@
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"
79
87
  },
80
88
  "peerDependenciesMeta": {
81
89
  "@carissa-io/components-input": {
@@ -203,6 +211,30 @@
203
211
  },
204
212
  "@carissa-io/components-menu": {
205
213
  "optional": true
214
+ },
215
+ "@carissa-io/components-table": {
216
+ "optional": true
217
+ },
218
+ "@carissa-io/components-list": {
219
+ "optional": true
220
+ },
221
+ "@carissa-io/components-description-list": {
222
+ "optional": true
223
+ },
224
+ "@carissa-io/components-stat": {
225
+ "optional": true
226
+ },
227
+ "@carissa-io/components-empty-state": {
228
+ "optional": true
229
+ },
230
+ "@carissa-io/components-timeline": {
231
+ "optional": true
232
+ },
233
+ "@carissa-io/components-tree": {
234
+ "optional": true
235
+ },
236
+ "@carissa-io/components-code": {
237
+ "optional": true
206
238
  }
207
239
  },
208
240
  "devDependencies": {
@@ -215,12 +247,16 @@
215
247
  "@carissa-io/components-calendar": "^0.1.1",
216
248
  "@carissa-io/components-card": "^0.1.0",
217
249
  "@carissa-io/components-checkbox": "^0.1.1",
250
+ "@carissa-io/components-code": "^0.1.0",
218
251
  "@carissa-io/components-combobox": "^0.1.1",
219
252
  "@carissa-io/components-date-picker": "^0.1.1",
253
+ "@carissa-io/components-description-list": "^0.1.0",
220
254
  "@carissa-io/components-divider": "^0.1.0",
221
255
  "@carissa-io/components-drawer": "^0.1.0",
256
+ "@carissa-io/components-empty-state": "^0.1.0",
222
257
  "@carissa-io/components-input": "^0.2.1",
223
258
  "@carissa-io/components-link": "^0.1.0",
259
+ "@carissa-io/components-list": "^0.1.0",
224
260
  "@carissa-io/components-listbox": "^0.1.1",
225
261
  "@carissa-io/components-menu": "^0.1.0",
226
262
  "@carissa-io/components-modal": "^0.1.0",
@@ -236,12 +272,16 @@
236
272
  "@carissa-io/components-skeleton": "^0.1.0",
237
273
  "@carissa-io/components-slider": "^0.1.1",
238
274
  "@carissa-io/components-spinner": "^0.1.0",
275
+ "@carissa-io/components-stat": "^0.1.0",
239
276
  "@carissa-io/components-stepper": "^0.1.0",
240
277
  "@carissa-io/components-switch": "^0.1.1",
278
+ "@carissa-io/components-table": "^0.1.0",
241
279
  "@carissa-io/components-tabs": "^0.1.0",
242
280
  "@carissa-io/components-tag": "^0.1.0",
281
+ "@carissa-io/components-timeline": "^0.1.0",
243
282
  "@carissa-io/components-toast": "^0.1.0",
244
283
  "@carissa-io/components-tooltip": "^0.1.0",
284
+ "@carissa-io/components-tree": "^0.1.0",
245
285
  "@carissa-io/components-typography": "^0.1.0",
246
286
  "@carissa-io/components-upload": "^0.1.1",
247
287
  "sass-embedded": "^1.105.1",
package/scss/index.scss CHANGED
@@ -1177,3 +1177,215 @@
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
+ );