@carissa-io/theme-default 0.3.13 → 0.3.14
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 +11 -0
- package/dist/index.css +26 -6
- package/package.json +5 -5
- package/scss/index.scss +11 -2
package/DESIGN.md
CHANGED
|
@@ -270,6 +270,16 @@ The close button is a plain "x" in `--c-muted`, `--c-text` on hover, with the us
|
|
|
270
270
|
components, and it is the same in both modes (it dims whatever mode the page is in). The box fades in and rises 0.5rem in `$transition-duration`; with reduced motion it
|
|
271
271
|
just appears.
|
|
272
272
|
|
|
273
|
+
**Scroll edges (Modal and Drawer).** The body scrolls between the header and the footer, so a long body used to be cut flush against the title and the buttons with nothing
|
|
274
|
+
to show where the scroll area ends. The theme draws that edge: a **1px `--c-disabled-border` line** under the header and over the footer (the footer line exists only
|
|
275
|
+
when there is a footer), plus a fixed 0.5rem gap between each line and the header or footer content (the components' default, left as it is). The line is the quiet
|
|
276
|
+
neutral border, not `--c-muted` (the Divider's 5.74:1 line would compete with the content and with the box border): on `--c-background` it is **1.48:1 in light**
|
|
277
|
+
(`#d4d4d4` on `#fff`) and **1.91:1 in dark** (`#404040` on `#0a0a0a`). It is a decorative separator (the scroll position and the content are exposed by the scrollable region
|
|
278
|
+
itself), so the 3:1 non-text minimum does not apply; the test only requires it to be distinguishable from the background (above 1.1:1) and records the two ratios,
|
|
279
|
+
in the same spirit as the Progress track (a faint guide, 1.3:1). It is a custom property, so dark mode needs no extra rule. The unscrolled layout is the same as before:
|
|
280
|
+
the header keeps 1.25rem above and 0.5rem below its content, and the body keeps the remaining 0.75rem (1.25rem less the 0.5rem gap) on each side, so the distance
|
|
281
|
+
between the title and the content is still 1.25rem, now with the line inside it; a body without a header or without a footer keeps the whole 1.25rem on that side.
|
|
282
|
+
|
|
273
283
|
## Toast
|
|
274
284
|
From [components-toast](components/components-toast): the fixed region of toasts (24rem wide, 1rem from the edges, 0.75rem between toasts, above the page content) and its six
|
|
275
285
|
placements. The look of each toast is the Alert's (see above), so its colors, roles and contrast are the Alert's in both modes. The action is a bold, underlined
|
|
@@ -359,6 +369,7 @@ and `--c-text` for the current page (`aria-current="page"`). The content collaps
|
|
|
359
369
|
From [components-drawer](components/components-drawer): `Drawer`, the Modal's box as a panel on an edge of the screen (`start`, `end`, `top`, `bottom`; `sm` 20rem, `md` 28rem, `lg` 40rem). It is `--c-background` with `--c-text` (17.93:1 / 18.16:1), a 1px `--c-muted` border
|
|
360
370
|
(the edge that still reads in dark), square, with the Modal's layered shadow and the same padding (1.5rem by 1.25rem) and close button (`--c-muted`, `--c-text` on hover). The **backdrop** is `rgb(0 0 0 / 0.5)` in both modes, with the shadow the only literal color of the block.
|
|
361
371
|
The panel slides in over `$transition-duration`; with reduced motion it just appears.
|
|
372
|
+
The header and footer lines and the 0.5rem gaps are the Modal's (see [Modal](#modal), scroll edges): 1px `--c-disabled-border`, 1.48:1 light and 1.91:1 dark on `--c-background`.
|
|
362
373
|
|
|
363
374
|
## Menu
|
|
364
375
|
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`
|
package/dist/index.css
CHANGED
|
@@ -1651,7 +1651,8 @@
|
|
|
1651
1651
|
gap: 1rem;
|
|
1652
1652
|
align-items: flex-start;
|
|
1653
1653
|
justify-content: space-between;
|
|
1654
|
-
padding: 1.25rem 1.5rem 0;
|
|
1654
|
+
padding: 1.25rem 1.5rem 0.5rem;
|
|
1655
|
+
border-bottom: 1px solid var(--c-disabled-border);
|
|
1655
1656
|
}
|
|
1656
1657
|
|
|
1657
1658
|
.c-modal__heading {
|
|
@@ -1692,9 +1693,17 @@
|
|
|
1692
1693
|
.c-modal__body {
|
|
1693
1694
|
flex: 1 1 auto;
|
|
1694
1695
|
min-height: 0;
|
|
1695
|
-
padding: 1.
|
|
1696
|
+
padding-inline: 1.5rem;
|
|
1697
|
+
padding-top: max(0px, 1.25rem - 0.5rem);
|
|
1698
|
+
padding-bottom: max(0px, 1.25rem - 0.5rem);
|
|
1696
1699
|
overflow-y: auto;
|
|
1697
1700
|
}
|
|
1701
|
+
.c-modal__body:first-child {
|
|
1702
|
+
padding-top: 1.25rem;
|
|
1703
|
+
}
|
|
1704
|
+
.c-modal__body:last-child {
|
|
1705
|
+
padding-bottom: 1.25rem;
|
|
1706
|
+
}
|
|
1698
1707
|
|
|
1699
1708
|
.c-modal__footer {
|
|
1700
1709
|
display: flex;
|
|
@@ -1702,7 +1711,8 @@
|
|
|
1702
1711
|
flex-wrap: wrap;
|
|
1703
1712
|
gap: 1rem;
|
|
1704
1713
|
justify-content: flex-end;
|
|
1705
|
-
padding: 0 1.5rem 1.25rem;
|
|
1714
|
+
padding: 0.5rem 1.5rem 1.25rem;
|
|
1715
|
+
border-top: 1px solid var(--c-disabled-border);
|
|
1706
1716
|
}
|
|
1707
1717
|
|
|
1708
1718
|
@keyframes c-toast-enter {
|
|
@@ -3563,7 +3573,8 @@ hr.c-divider {
|
|
|
3563
3573
|
gap: 1rem;
|
|
3564
3574
|
align-items: flex-start;
|
|
3565
3575
|
justify-content: space-between;
|
|
3566
|
-
padding: 1.25rem 1.5rem 0;
|
|
3576
|
+
padding: 1.25rem 1.5rem 0.5rem;
|
|
3577
|
+
border-bottom: 1px solid var(--c-disabled-border);
|
|
3567
3578
|
}
|
|
3568
3579
|
|
|
3569
3580
|
.c-drawer__heading {
|
|
@@ -3604,9 +3615,17 @@ hr.c-divider {
|
|
|
3604
3615
|
.c-drawer__body {
|
|
3605
3616
|
flex: 1 1 auto;
|
|
3606
3617
|
min-height: 0;
|
|
3607
|
-
padding: 1.
|
|
3618
|
+
padding-inline: 1.5rem;
|
|
3619
|
+
padding-top: max(0px, 1.25rem - 0.5rem);
|
|
3620
|
+
padding-bottom: max(0px, 1.25rem - 0.5rem);
|
|
3608
3621
|
overflow-y: auto;
|
|
3609
3622
|
}
|
|
3623
|
+
.c-drawer__body:first-child {
|
|
3624
|
+
padding-top: 1.25rem;
|
|
3625
|
+
}
|
|
3626
|
+
.c-drawer__body:last-child {
|
|
3627
|
+
padding-bottom: 1.25rem;
|
|
3628
|
+
}
|
|
3610
3629
|
|
|
3611
3630
|
.c-drawer__footer {
|
|
3612
3631
|
display: flex;
|
|
@@ -3614,7 +3633,8 @@ hr.c-divider {
|
|
|
3614
3633
|
flex-wrap: wrap;
|
|
3615
3634
|
gap: 1rem;
|
|
3616
3635
|
justify-content: flex-end;
|
|
3617
|
-
padding: 0 1.5rem 1.25rem;
|
|
3636
|
+
padding: 0.5rem 1.5rem 1.25rem;
|
|
3637
|
+
border-top: 1px solid var(--c-disabled-border);
|
|
3618
3638
|
}
|
|
3619
3639
|
|
|
3620
3640
|
.c-menu {
|
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.14",
|
|
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",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@carissa-io/components-card": "^0.1.0",
|
|
57
57
|
"@carissa-io/components-alert": "^0.1.0",
|
|
58
58
|
"@carissa-io/components-spinner": "^0.1.0",
|
|
59
|
-
"@carissa-io/components-modal": "^0.1.
|
|
59
|
+
"@carissa-io/components-modal": "^0.1.2",
|
|
60
60
|
"@carissa-io/components-toast": "^0.1.0",
|
|
61
61
|
"@carissa-io/components-divider": "^0.1.0",
|
|
62
62
|
"@carissa-io/components-badge": "^0.1.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@carissa-io/components-stepper": "^0.1.0",
|
|
75
75
|
"@carissa-io/components-sidebar": "^0.1.0",
|
|
76
76
|
"@carissa-io/components-navbar": "^0.1.0",
|
|
77
|
-
"@carissa-io/components-drawer": "^0.1.
|
|
77
|
+
"@carissa-io/components-drawer": "^0.1.2",
|
|
78
78
|
"@carissa-io/components-menu": "^0.1.0",
|
|
79
79
|
"@carissa-io/components-table": "^0.1.0",
|
|
80
80
|
"@carissa-io/components-list": "^0.1.0",
|
|
@@ -324,7 +324,7 @@
|
|
|
324
324
|
"@carissa-io/components-date-range": "^0.1.0",
|
|
325
325
|
"@carissa-io/components-description-list": "^0.1.0",
|
|
326
326
|
"@carissa-io/components-divider": "^0.1.0",
|
|
327
|
-
"@carissa-io/components-drawer": "^0.1.
|
|
327
|
+
"@carissa-io/components-drawer": "^0.1.2",
|
|
328
328
|
"@carissa-io/components-empty-state": "^0.1.0",
|
|
329
329
|
"@carissa-io/components-faq": "^0.1.0",
|
|
330
330
|
"@carissa-io/components-field": "^0.1.0",
|
|
@@ -335,7 +335,7 @@
|
|
|
335
335
|
"@carissa-io/components-listbox": "^0.1.1",
|
|
336
336
|
"@carissa-io/components-live-region": "^0.1.0",
|
|
337
337
|
"@carissa-io/components-menu": "^0.1.0",
|
|
338
|
-
"@carissa-io/components-modal": "^0.1.
|
|
338
|
+
"@carissa-io/components-modal": "^0.1.2",
|
|
339
339
|
"@carissa-io/components-navbar": "^0.1.0",
|
|
340
340
|
"@carissa-io/components-number-input": "^0.1.0",
|
|
341
341
|
"@carissa-io/components-otp-input": "^0.1.0",
|
package/scss/index.scss
CHANGED
|
@@ -655,7 +655,8 @@
|
|
|
655
655
|
// Modal: a box on the page background with a 1px muted border (the edge that still reads in dark, where a shadow is almost
|
|
656
656
|
// invisible), the theme radius, and the same 1.5rem / 1.25rem padding as Card. The backdrop is the one literal color: black
|
|
657
657
|
// at 50%, the same in both modes. Its index forwards the typography styles, already loaded and configured above, so this
|
|
658
|
-
// block goes after the Typography one (and after Card, which forwards it too).
|
|
658
|
+
// block goes after the Typography one (and after Card, which forwards it too). The scroll edges: a 1px --c-disabled-border line
|
|
659
|
+
// under the header and over the footer (the clip edge of the scrolling body), with the component's default 0.5rem gaps.
|
|
659
660
|
@use '@carissa-io/components-modal/scss' as modal with (
|
|
660
661
|
$c-modal-background: $var-background,
|
|
661
662
|
$c-modal-color: $var-text,
|
|
@@ -666,6 +667,10 @@
|
|
|
666
667
|
$c-modal-padding-x: 1.5rem,
|
|
667
668
|
$c-modal-padding-y: 1.25rem,
|
|
668
669
|
$c-modal-gap: 1rem,
|
|
670
|
+
$c-modal-header-divider-width: 1px,
|
|
671
|
+
$c-modal-header-divider-color: $var-disabled-border,
|
|
672
|
+
$c-modal-footer-divider-width: 1px,
|
|
673
|
+
$c-modal-footer-divider-color: $var-disabled-border,
|
|
669
674
|
$c-modal-margin: 1rem,
|
|
670
675
|
$c-modal-width-sm: 24rem,
|
|
671
676
|
$c-modal-width-md: 32rem,
|
|
@@ -1141,7 +1146,7 @@
|
|
|
1141
1146
|
// Drawer: the Modal's box as a panel on the edge: --c-background with --c-text, a 1px --c-muted border (the edge that still
|
|
1142
1147
|
// reads in dark), the same padding and the same close button. The backdrop is the one literal color, black at 50% in both
|
|
1143
1148
|
// modes, and so is the shadow. Its index forwards the typography styles, already loaded and configured above: this block
|
|
1144
|
-
// goes after the Typography one.
|
|
1149
|
+
// goes after the Typography one. The scroll edges are the Modal's: 1px --c-disabled-border lines, default 0.5rem gaps.
|
|
1145
1150
|
@use '@carissa-io/components-drawer/scss' as drawer with (
|
|
1146
1151
|
$c-drawer-background: $var-background,
|
|
1147
1152
|
$c-drawer-color: $var-text,
|
|
@@ -1152,6 +1157,10 @@
|
|
|
1152
1157
|
$c-drawer-padding-x: 1.5rem,
|
|
1153
1158
|
$c-drawer-padding-y: 1.25rem,
|
|
1154
1159
|
$c-drawer-gap: 1rem,
|
|
1160
|
+
$c-drawer-header-divider-width: 1px,
|
|
1161
|
+
$c-drawer-header-divider-color: $var-disabled-border,
|
|
1162
|
+
$c-drawer-footer-divider-width: 1px,
|
|
1163
|
+
$c-drawer-footer-divider-color: $var-disabled-border,
|
|
1155
1164
|
$c-drawer-size-sm: 20rem,
|
|
1156
1165
|
$c-drawer-size-md: 28rem,
|
|
1157
1166
|
$c-drawer-size-lg: 40rem,
|