@prismora/css 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +18 -2
- package/dist/components/accordion.css +57 -0
- package/dist/components/alert.css +31 -0
- package/dist/components/avatar.css +34 -0
- package/dist/components/badge.css +25 -0
- package/dist/components/banner.css +25 -0
- package/dist/components/breadcrumb.css +37 -0
- package/dist/components/button.css +162 -0
- package/dist/components/calendar.css +60 -0
- package/dist/components/card.css +34 -0
- package/dist/components/carousel.css +70 -0
- package/dist/components/chart.css +63 -0
- package/dist/components/chat.css +66 -0
- package/dist/components/checkbox.css +67 -0
- package/dist/components/color-picker.css +78 -0
- package/dist/components/combobox.css +42 -0
- package/dist/components/command.css +58 -0
- package/dist/components/data-table.css +295 -0
- package/dist/components/description-list.css +24 -0
- package/dist/components/dialog.css +58 -0
- package/dist/components/drawer.css +60 -0
- package/dist/components/editor.css +46 -0
- package/dist/components/empty-state.css +30 -0
- package/dist/components/extras.css +99 -0
- package/dist/components/field.css +38 -0
- package/dist/components/file-upload.css +48 -0
- package/dist/components/helpers.css +128 -0
- package/dist/components/icon.css +21 -0
- package/dist/components/image.css +28 -0
- package/dist/components/indicator.css +56 -0
- package/dist/components/input.css +109 -0
- package/dist/components/kbd.css +26 -0
- package/dist/components/list.css +77 -0
- package/dist/components/listbox.css +56 -0
- package/dist/components/meter.css +34 -0
- package/dist/components/nav.css +116 -0
- package/dist/components/number-input.css +33 -0
- package/dist/components/overlay.css +34 -0
- package/dist/components/pagination.css +47 -0
- package/dist/components/pickers.css +68 -0
- package/dist/components/pin-input.css +21 -0
- package/dist/components/popover.css +110 -0
- package/dist/components/progress.css +40 -0
- package/dist/components/pull-refresh.css +39 -0
- package/dist/components/range-slider.css +76 -0
- package/dist/components/rating.css +34 -0
- package/dist/components/scheduler.css +65 -0
- package/dist/components/segmented.css +41 -0
- package/dist/components/select.css +69 -0
- package/dist/components/separator.css +22 -0
- package/dist/components/sheet.css +47 -0
- package/dist/components/skeleton.css +25 -0
- package/dist/components/slider.css +57 -0
- package/dist/components/sortable.css +31 -0
- package/dist/components/spinner.css +21 -0
- package/dist/components/splitter.css +40 -0
- package/dist/components/stat.css +32 -0
- package/dist/components/steps.css +74 -0
- package/dist/components/surface.css +24 -0
- package/dist/components/switch.css +56 -0
- package/dist/components/table.css +95 -0
- package/dist/components/tabs.css +124 -0
- package/dist/components/tag.css +59 -0
- package/dist/components/time-picker.css +24 -0
- package/dist/components/timeline.css +43 -0
- package/dist/components/toast.css +84 -0
- package/dist/components/toggle.css +45 -0
- package/dist/components/toolbar.css +20 -0
- package/dist/components/tooltip.css +26 -0
- package/dist/components/tree.css +60 -0
- package/dist/core.css +4275 -0
- package/dist/foundation.css +898 -0
- package/dist/prismora.css +4682 -0
- package/dist/theme.css +409 -0
- package/dist/tone.css +11 -0
- package/dist/typography.css +157 -0
- package/package.json +42 -4
- package/src/base.css +66 -0
- package/src/components/accordion.css +54 -0
- package/src/components/alert.css +28 -0
- package/src/components/avatar.css +31 -0
- package/src/components/badge.css +22 -0
- package/src/components/banner.css +22 -0
- package/src/components/breadcrumb.css +34 -0
- package/src/components/button.css +159 -0
- package/src/components/calendar.css +57 -0
- package/src/components/card.css +31 -0
- package/src/components/carousel.css +67 -0
- package/src/components/chart.css +60 -0
- package/src/components/chat.css +63 -0
- package/src/components/checkbox.css +64 -0
- package/src/components/color-picker.css +75 -0
- package/src/components/combobox.css +39 -0
- package/src/components/command.css +55 -0
- package/src/components/data-table.css +292 -0
- package/src/components/description-list.css +21 -0
- package/src/components/dialog.css +55 -0
- package/src/components/drawer.css +57 -0
- package/src/components/editor.css +43 -0
- package/src/components/empty-state.css +27 -0
- package/src/components/extras.css +96 -0
- package/src/components/field.css +35 -0
- package/src/components/file-upload.css +45 -0
- package/src/components/helpers.css +125 -0
- package/src/components/icon.css +18 -0
- package/src/components/image.css +25 -0
- package/src/components/indicator.css +53 -0
- package/src/components/input.css +106 -0
- package/src/components/kbd.css +23 -0
- package/src/components/list.css +74 -0
- package/src/components/listbox.css +53 -0
- package/src/components/meter.css +31 -0
- package/src/components/nav.css +113 -0
- package/src/components/number-input.css +30 -0
- package/src/components/overlay.css +31 -0
- package/src/components/pagination.css +44 -0
- package/src/components/pickers.css +65 -0
- package/src/components/pin-input.css +18 -0
- package/src/components/popover.css +107 -0
- package/src/components/progress.css +37 -0
- package/src/components/pull-refresh.css +36 -0
- package/src/components/range-slider.css +73 -0
- package/src/components/rating.css +31 -0
- package/src/components/scheduler.css +62 -0
- package/src/components/segmented.css +38 -0
- package/src/components/select.css +66 -0
- package/src/components/separator.css +19 -0
- package/src/components/sheet.css +44 -0
- package/src/components/skeleton.css +22 -0
- package/src/components/slider.css +54 -0
- package/src/components/sortable.css +28 -0
- package/src/components/spinner.css +18 -0
- package/src/components/splitter.css +37 -0
- package/src/components/stat.css +29 -0
- package/src/components/steps.css +71 -0
- package/src/components/surface.css +21 -0
- package/src/components/switch.css +53 -0
- package/src/components/table.css +92 -0
- package/src/components/tabs.css +121 -0
- package/src/components/tag.css +56 -0
- package/src/components/time-picker.css +21 -0
- package/src/components/timeline.css +40 -0
- package/src/components/toast.css +81 -0
- package/src/components/toggle.css +42 -0
- package/src/components/toolbar.css +17 -0
- package/src/components/tooltip.css +23 -0
- package/src/components/tree.css +57 -0
- package/src/layers.css +2 -0
- package/src/layout.css +113 -0
- package/src/reset.css +18 -0
- package/src/typography.css +154 -0
- package/src/utilities.css +99 -0
package/src/base.css
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@layer pm.base {
|
|
2
|
+
:where(html) {
|
|
3
|
+
color: var(--pm-color-fg);
|
|
4
|
+
background: var(--pm-color-bg-canvas);
|
|
5
|
+
font-family: var(--pm-font-sans);
|
|
6
|
+
font-size: 100%;
|
|
7
|
+
line-height: var(--pm-line-height-normal);
|
|
8
|
+
accent-color: var(--pm-color-accent-solid);
|
|
9
|
+
scrollbar-color: var(--pm-color-border-strong) transparent;
|
|
10
|
+
-webkit-font-smoothing: antialiased;
|
|
11
|
+
text-rendering: optimizeLegibility;
|
|
12
|
+
}
|
|
13
|
+
/* User text size: every rem-based token (type, space, controls) scales with the root size. */
|
|
14
|
+
:where(html[data-text-size="sm"]) { font-size: 93.75%; }
|
|
15
|
+
:where(html[data-text-size="lg"]) { font-size: 112.5%; }
|
|
16
|
+
:where(html[data-text-size="xl"]) { font-size: 125%; }
|
|
17
|
+
:where(h1, h2, h3, h4) {
|
|
18
|
+
font-family: var(--pm-font-display);
|
|
19
|
+
line-height: var(--pm-line-height-tight);
|
|
20
|
+
letter-spacing: -0.015em;
|
|
21
|
+
text-wrap: balance;
|
|
22
|
+
}
|
|
23
|
+
:where(h1) { font-size: var(--pm-font-size-4xl); font-weight: var(--pm-font-weight-bold); }
|
|
24
|
+
:where(h2) { font-size: var(--pm-font-size-3xl); font-weight: var(--pm-font-weight-bold); }
|
|
25
|
+
:where(h3) { font-size: var(--pm-font-size-2xl); font-weight: var(--pm-font-weight-semibold); }
|
|
26
|
+
:where(h4) { font-size: var(--pm-font-size-xl); font-weight: var(--pm-font-weight-semibold); }
|
|
27
|
+
:where(p, li) { text-wrap: pretty; }
|
|
28
|
+
:where(a) { color: var(--pm-color-accent-text); text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; }
|
|
29
|
+
:where(a:hover) { text-decoration-thickness: 0.14em; }
|
|
30
|
+
:where(code, kbd, samp, pre) { font-family: var(--pm-font-mono); font-size: 0.92em; }
|
|
31
|
+
:where(hr) { border: 0; border-block-start: 1px solid var(--pm-color-border); margin-block: var(--pm-space-6); }
|
|
32
|
+
::selection { background: var(--pm-color-selection); }
|
|
33
|
+
|
|
34
|
+
/* One consistent, high-contrast focus ring (≥ 3:1) for every interactive element. */
|
|
35
|
+
:where(:focus-visible) {
|
|
36
|
+
outline: 2px solid var(--pm-color-ring);
|
|
37
|
+
outline-offset: 2px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* ---------- Touch & mobile ---------- */
|
|
41
|
+
/* Native-size hit targets on touch screens (44 px, Apple HIG / Material 48 dp ≈ 44 CSS px). */
|
|
42
|
+
@media (pointer: coarse) {
|
|
43
|
+
:where(:root) { --pm-touch-min: 2.75rem; --pm-touch-min-sm: 2.25rem; }
|
|
44
|
+
/* iOS zooms into fields with text under 16 px; keep form text at 16 px on touch screens. */
|
|
45
|
+
:where(input:not([type=checkbox], [type=radio], [type=range]), select, textarea) { font-size: max(1rem, 1em); }
|
|
46
|
+
}
|
|
47
|
+
/* No 300 ms double-tap delay and no grey tap flash on controls; content still pinch-zooms. */
|
|
48
|
+
:where(a, button, input, select, textarea, label, summary, [role="button"], [tabindex]) {
|
|
49
|
+
touch-action: manipulation;
|
|
50
|
+
-webkit-tap-highlight-color: transparent;
|
|
51
|
+
}
|
|
52
|
+
/* Notch / home-indicator safe areas (needs <meta name="viewport" content="…, viewport-fit=cover">). */
|
|
53
|
+
:where(:root) {
|
|
54
|
+
--pm-safe-top: env(safe-area-inset-top, 0px);
|
|
55
|
+
--pm-safe-bottom: env(safe-area-inset-bottom, 0px);
|
|
56
|
+
--pm-safe-left: env(safe-area-inset-left, 0px);
|
|
57
|
+
--pm-safe-right: env(safe-area-inset-right, 0px);
|
|
58
|
+
}
|
|
59
|
+
/* Scroll chaining stops at overlays, so the page behind a sheet does not move. */
|
|
60
|
+
:where(dialog, [popover]) { overscroll-behavior: contain; }
|
|
61
|
+
|
|
62
|
+
/* Hidden popovers before any polyfill loads. */
|
|
63
|
+
@supports not selector(:popover-open) {
|
|
64
|
+
[popover]:not(.\:popover-open) { display: none; }
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* Accordion */
|
|
2
|
+
@layer pm.components {
|
|
3
|
+
/* ---------- Accordion: <details name="group" class="pm-accordion-item"> ---------- */
|
|
4
|
+
:where(.pm-accordion) {
|
|
5
|
+
display: grid;
|
|
6
|
+
border: 1px solid var(--pm-sf-border, var(--pm-color-border));
|
|
7
|
+
border-radius: var(--pm-radius-lg);
|
|
8
|
+
background: var(--pm-sf-image, none), var(--pm-sf-bg, var(--pm-color-bg-surface));
|
|
9
|
+
backdrop-filter: var(--pm-sf-backdrop, none);
|
|
10
|
+
overflow: clip;
|
|
11
|
+
}
|
|
12
|
+
:where(.pm-accordion-item) {
|
|
13
|
+
&:not(:last-child) { border-block-end: 1px solid var(--pm-color-border); }
|
|
14
|
+
& > summary {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: space-between;
|
|
18
|
+
gap: var(--pm-space-3);
|
|
19
|
+
padding: calc(var(--pm-space-4) * var(--pm-density, 1));
|
|
20
|
+
font-weight: var(--pm-font-weight-medium);
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
list-style: none;
|
|
23
|
+
&::-webkit-details-marker { display: none; }
|
|
24
|
+
&::after {
|
|
25
|
+
content: "";
|
|
26
|
+
flex: none;
|
|
27
|
+
inline-size: 1em;
|
|
28
|
+
block-size: 1em;
|
|
29
|
+
background: currentColor;
|
|
30
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
31
|
+
color: var(--pm-color-fg-muted);
|
|
32
|
+
@media (prefers-reduced-motion: no-preference) { transition: rotate var(--pm-duration-moderate) var(--pm-ease-standard); }
|
|
33
|
+
}
|
|
34
|
+
&:hover { background: var(--pm-color-bg-hover); }
|
|
35
|
+
&:focus-visible { outline-offset: -2px; }
|
|
36
|
+
}
|
|
37
|
+
&[open] > summary::after { rotate: 180deg; }
|
|
38
|
+
& > summary[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
|
|
39
|
+
/* Smooth open/close with ::details-content + interpolate-size (progressive). */
|
|
40
|
+
&::details-content {
|
|
41
|
+
block-size: 0;
|
|
42
|
+
overflow: clip;
|
|
43
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
44
|
+
transition: block-size var(--pm-duration-moderate) var(--pm-ease-standard), content-visibility var(--pm-duration-moderate);
|
|
45
|
+
transition-behavior: allow-discrete;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
&[open]::details-content { block-size: auto; }
|
|
49
|
+
& > :where(:not(summary)) {
|
|
50
|
+
padding: 0 calc(var(--pm-space-4) * var(--pm-density, 1)) calc(var(--pm-space-4) * var(--pm-density, 1));
|
|
51
|
+
color: var(--pm-color-fg-muted);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* Alert */
|
|
2
|
+
@layer pm.components {
|
|
3
|
+
/* ---------- Alert / callout ---------- */
|
|
4
|
+
:where(.pm-alert) {
|
|
5
|
+
display: grid;
|
|
6
|
+
grid-template-columns: auto 1fr auto;
|
|
7
|
+
gap: var(--pm-space-1) var(--pm-space-3);
|
|
8
|
+
align-items: start;
|
|
9
|
+
padding: calc(var(--pm-space-4) * var(--pm-density, 1));
|
|
10
|
+
border: 1px solid var(--pm-tone-border);
|
|
11
|
+
border-radius: var(--pm-radius-lg);
|
|
12
|
+
background: color-mix(in oklab, var(--pm-tone-soft) var(--pm-sf-soft-mix, 100%), transparent);
|
|
13
|
+
backdrop-filter: var(--pm-sf-backdrop);
|
|
14
|
+
color: var(--pm-color-fg);
|
|
15
|
+
font-size: var(--pm-font-size-sm);
|
|
16
|
+
& > :where(.pm-alert-icon) { color: var(--pm-tone-text); grid-row: span 2; display: grid; place-items: center; block-size: 1.5em; }
|
|
17
|
+
& > :where(.pm-alert-title) { font-weight: var(--pm-font-weight-semibold); color: var(--pm-tone-text-strong); }
|
|
18
|
+
& > :where(.pm-alert-body) { grid-column: 2; color: var(--pm-color-fg); }
|
|
19
|
+
& > :where(.pm-alert-actions) { grid-column: 3; grid-row: 1 / span 2; }
|
|
20
|
+
}
|
|
21
|
+
:where(.pm-alert[data-variant="solid"]) {
|
|
22
|
+
background: var(--pm-tone-solid);
|
|
23
|
+
border-color: transparent;
|
|
24
|
+
color: var(--pm-tone-on-solid);
|
|
25
|
+
& > :where(.pm-alert-icon, .pm-alert-title, .pm-alert-body) { color: inherit; }
|
|
26
|
+
}
|
|
27
|
+
:where(.pm-alert[data-variant="outline"]) { background: transparent; border-color: var(--pm-tone-border-strong); }
|
|
28
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* Avatar */
|
|
2
|
+
@layer pm.components {
|
|
3
|
+
/* ---------- Avatar ---------- */
|
|
4
|
+
:where(.pm-avatar) {
|
|
5
|
+
--_size: 2.5rem;
|
|
6
|
+
position: relative;
|
|
7
|
+
display: inline-grid;
|
|
8
|
+
place-items: center;
|
|
9
|
+
flex: none;
|
|
10
|
+
inline-size: var(--_size);
|
|
11
|
+
block-size: var(--_size);
|
|
12
|
+
border-radius: 50%;
|
|
13
|
+
background: var(--pm-tone-soft);
|
|
14
|
+
color: var(--pm-tone-text);
|
|
15
|
+
font-size: calc(var(--_size) * 0.4);
|
|
16
|
+
font-weight: var(--pm-font-weight-semibold);
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
user-select: none;
|
|
19
|
+
& > :where(img) { inline-size: 100%; block-size: 100%; object-fit: cover; }
|
|
20
|
+
}
|
|
21
|
+
:where(.pm-avatar[data-size="xs"]) { --_size: 1.5rem; }
|
|
22
|
+
:where(.pm-avatar[data-size="sm"]) { --_size: 2rem; }
|
|
23
|
+
:where(.pm-avatar[data-size="lg"]) { --_size: 3rem; }
|
|
24
|
+
:where(.pm-avatar[data-size="xl"]) { --_size: 4rem; }
|
|
25
|
+
:where(.pm-avatar[data-shape="square"]) { border-radius: var(--pm-radius-md); }
|
|
26
|
+
:where(.pm-avatar-group) {
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
& > :where(.pm-avatar) { box-shadow: 0 0 0 2px var(--pm-color-bg-surface); }
|
|
29
|
+
& > :where(.pm-avatar:not(:first-child)) { margin-inline-start: calc(var(--_size, 2.5rem) * -0.2); }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* Badge */
|
|
2
|
+
@layer pm.components {
|
|
3
|
+
/* ---------- Badge ---------- */
|
|
4
|
+
:where(.pm-badge) {
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: 0.35em;
|
|
8
|
+
padding: 0.2em 0.6em;
|
|
9
|
+
border: 1px solid transparent;
|
|
10
|
+
border-radius: var(--pm-radius-full);
|
|
11
|
+
background: var(--pm-tone-soft);
|
|
12
|
+
color: var(--pm-tone-text);
|
|
13
|
+
font-size: var(--pm-font-size-xs);
|
|
14
|
+
font-weight: var(--pm-font-weight-semibold);
|
|
15
|
+
line-height: 1.3;
|
|
16
|
+
white-space: nowrap;
|
|
17
|
+
& > :where(.pm-badge-dot) { inline-size: 0.5em; block-size: 0.5em; border-radius: 50%; background: currentColor; }
|
|
18
|
+
}
|
|
19
|
+
:where(.pm-badge[data-variant="solid"]) { background: var(--pm-sf-solid-image, none), var(--pm-tone-solid); color: var(--pm-tone-on-solid); }
|
|
20
|
+
:where(.pm-badge[data-variant="outline"]) { background: transparent; border-color: var(--pm-tone-border-strong); }
|
|
21
|
+
:where(.pm-badge[data-size="lg"]) { font-size: var(--pm-font-size-sm); }
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* Banner: a page-wide announcement bar — <div class="pm-banner" data-tone="info">…</div> */
|
|
2
|
+
@layer pm.components {
|
|
3
|
+
:where(.pm-banner) {
|
|
4
|
+
display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: var(--pm-space-2) var(--pm-space-3);
|
|
5
|
+
min-block-size: 2.75rem; padding: var(--pm-space-2) var(--pm-space-4);
|
|
6
|
+
border-block-end: 1px solid var(--pm-tone-border);
|
|
7
|
+
background: var(--pm-tone-soft); color: var(--pm-color-fg);
|
|
8
|
+
font-size: var(--pm-font-size-sm); text-align: center;
|
|
9
|
+
& :where(.pm-banner-icon) { display: inline-grid; place-items: center; color: var(--pm-tone-text); }
|
|
10
|
+
& :where(.pm-banner-icon:empty) { display: none; }
|
|
11
|
+
& :where(.pm-banner-body) { min-inline-size: 0; text-wrap: balance; }
|
|
12
|
+
& :where(.pm-banner-body a) { color: var(--pm-tone-text-strong); font-weight: var(--pm-font-weight-semibold); text-underline-offset: 0.2em; }
|
|
13
|
+
& :where(.pm-banner-actions) { display: inline-flex; align-items: center; gap: var(--pm-space-2); }
|
|
14
|
+
& :where(.pm-banner-close) { margin-inline-start: auto; }
|
|
15
|
+
}
|
|
16
|
+
:where(.pm-banner[data-variant="solid"]) {
|
|
17
|
+
background: var(--pm-tone-solid); border-color: transparent; color: var(--pm-tone-on-solid);
|
|
18
|
+
& :where(.pm-banner-icon, .pm-banner-body a, .pm-banner-close) { color: inherit; }
|
|
19
|
+
}
|
|
20
|
+
/* Phones: text starts at the edge so two lines read naturally, close stays reachable. */
|
|
21
|
+
@media (width < 40rem) { :where(.pm-banner) { justify-content: flex-start; text-align: start; } }
|
|
22
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* Breadcrumb — <nav aria-label="Breadcrumb"><ol class="pm-breadcrumb"><li><a href>…</a></li><li><a aria-current="page">…</a></li></ol></nav> */
|
|
2
|
+
@layer pm.components {
|
|
3
|
+
:where(.pm-breadcrumb) {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-wrap: wrap;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: var(--pm-space-1-5);
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: 0;
|
|
10
|
+
list-style: none;
|
|
11
|
+
font-size: var(--pm-font-size-sm);
|
|
12
|
+
color: var(--pm-color-fg-muted);
|
|
13
|
+
& > :where(li) { display: inline-flex; align-items: center; gap: var(--pm-space-1-5); }
|
|
14
|
+
& > :where(li + li)::before { content: var(--pm-breadcrumb-separator, "/"); content: var(--pm-breadcrumb-separator, "/") / ""; color: var(--pm-color-border-strong); }
|
|
15
|
+
}
|
|
16
|
+
:where(.pm-breadcrumb-link) {
|
|
17
|
+
color: var(--pm-color-fg-muted);
|
|
18
|
+
text-decoration: none;
|
|
19
|
+
border-radius: var(--pm-radius-xs);
|
|
20
|
+
&:is(a):hover { color: var(--pm-color-fg); text-decoration: underline; }
|
|
21
|
+
&[aria-current="page"] { color: var(--pm-color-fg); font-weight: var(--pm-font-weight-medium); }
|
|
22
|
+
}
|
|
23
|
+
:where(.pm-breadcrumb-more) {
|
|
24
|
+
padding: 0.1em 0.4em;
|
|
25
|
+
min-block-size: 1.5rem;
|
|
26
|
+
border: 0;
|
|
27
|
+
border-radius: var(--pm-radius-sm);
|
|
28
|
+
background: transparent;
|
|
29
|
+
color: inherit;
|
|
30
|
+
font: inherit;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
&:hover { background: var(--pm-color-bg-hover); color: var(--pm-color-fg); }
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/* Button — <button class="pm-button" data-variant="solid|soft|outline|ghost|link" data-tone data-size> */
|
|
2
|
+
@layer pm.components {
|
|
3
|
+
:where(.pm-button) {
|
|
4
|
+
--_h: var(--pm-control-height-md);
|
|
5
|
+
--_px: calc(var(--pm-space-4) * var(--pm-density, 1));
|
|
6
|
+
--_fs: var(--pm-font-size-sm);
|
|
7
|
+
--_bg: var(--pm-tone-solid);
|
|
8
|
+
--_bg-hover: var(--pm-tone-solid-hover);
|
|
9
|
+
--_fg: var(--pm-tone-on-solid);
|
|
10
|
+
--_border: transparent;
|
|
11
|
+
--_image: var(--pm-sf-solid-image, none);
|
|
12
|
+
--_shadow: var(--pm-sf-raise, none);
|
|
13
|
+
--_shadow-active: var(--pm-sf-press, none);
|
|
14
|
+
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
gap: 0.5em;
|
|
19
|
+
min-block-size: var(--_h);
|
|
20
|
+
min-inline-size: var(--_h);
|
|
21
|
+
padding-inline: var(--_px);
|
|
22
|
+
border: 1px solid var(--_border);
|
|
23
|
+
border-radius: var(--pm-radius-control, var(--pm-radius-md));
|
|
24
|
+
background: var(--_image), var(--_bg);
|
|
25
|
+
color: var(--_fg);
|
|
26
|
+
box-shadow: var(--_shadow);
|
|
27
|
+
font: inherit;
|
|
28
|
+
font-size: var(--_fs);
|
|
29
|
+
font-weight: var(--pm-font-weight-semibold);
|
|
30
|
+
line-height: 1;
|
|
31
|
+
white-space: nowrap;
|
|
32
|
+
text-decoration: none;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
user-select: none;
|
|
35
|
+
-webkit-tap-highlight-color: transparent;
|
|
36
|
+
corner-shape: squircle;
|
|
37
|
+
transition:
|
|
38
|
+
background-color var(--pm-duration-fast) var(--pm-ease-standard),
|
|
39
|
+
border-color var(--pm-duration-fast) var(--pm-ease-standard),
|
|
40
|
+
color var(--pm-duration-fast) var(--pm-ease-standard),
|
|
41
|
+
box-shadow var(--pm-duration-normal) var(--pm-ease-standard);
|
|
42
|
+
|
|
43
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
44
|
+
transition:
|
|
45
|
+
background-color var(--pm-duration-fast) var(--pm-ease-standard),
|
|
46
|
+
border-color var(--pm-duration-fast) var(--pm-ease-standard),
|
|
47
|
+
color var(--pm-duration-fast) var(--pm-ease-standard),
|
|
48
|
+
box-shadow var(--pm-duration-normal) var(--pm-ease-standard),
|
|
49
|
+
scale var(--pm-duration-normal) var(--pm-ease-spring);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:hover:not(:disabled, [aria-disabled="true"]) { --_bg: var(--_bg-hover); }
|
|
53
|
+
&:active:not(:disabled, [aria-disabled="true"]) {
|
|
54
|
+
--_shadow: var(--_shadow-active);
|
|
55
|
+
@media (prefers-reduced-motion: no-preference) { scale: 0.97; }
|
|
56
|
+
}
|
|
57
|
+
&:is(:disabled, [aria-disabled="true"]) {
|
|
58
|
+
cursor: not-allowed;
|
|
59
|
+
opacity: 0.55;
|
|
60
|
+
box-shadow: none;
|
|
61
|
+
}
|
|
62
|
+
& > svg { inline-size: 1.15em; block-size: 1.15em; flex: none; }
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Variants */
|
|
66
|
+
:where(.pm-button[data-variant="soft"]) {
|
|
67
|
+
--_bg: color-mix(in oklab, var(--pm-tone-soft) var(--pm-sf-soft-mix, 100%), transparent);
|
|
68
|
+
--_bg-hover: color-mix(in oklab, var(--pm-tone-soft-hover) var(--pm-sf-soft-mix, 100%), transparent);
|
|
69
|
+
--_fg: var(--pm-tone-text);
|
|
70
|
+
--_image: none;
|
|
71
|
+
}
|
|
72
|
+
:where(.pm-button[data-variant="outline"]) {
|
|
73
|
+
--_bg: transparent;
|
|
74
|
+
--_bg-hover: var(--pm-tone-soft);
|
|
75
|
+
--_fg: var(--pm-tone-text);
|
|
76
|
+
--_border: var(--pm-tone-border-strong);
|
|
77
|
+
--_image: none;
|
|
78
|
+
--_shadow: none;
|
|
79
|
+
}
|
|
80
|
+
:where(.pm-button[data-variant="ghost"]) {
|
|
81
|
+
--_bg: transparent;
|
|
82
|
+
--_bg-hover: var(--pm-tone-soft);
|
|
83
|
+
--_fg: var(--pm-tone-text);
|
|
84
|
+
--_image: none;
|
|
85
|
+
--_shadow: none;
|
|
86
|
+
--_shadow-active: none;
|
|
87
|
+
}
|
|
88
|
+
:where(.pm-button[data-variant="link"]) {
|
|
89
|
+
--_bg: transparent;
|
|
90
|
+
--_bg-hover: transparent;
|
|
91
|
+
--_fg: var(--pm-tone-text);
|
|
92
|
+
--_image: none;
|
|
93
|
+
--_shadow: none;
|
|
94
|
+
--_shadow-active: none;
|
|
95
|
+
--_px: 0;
|
|
96
|
+
min-inline-size: 0;
|
|
97
|
+
text-decoration: underline;
|
|
98
|
+
text-underline-offset: 0.2em;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Sizes */
|
|
102
|
+
:where(.pm-button[data-size="xs"]) { --_h: var(--pm-control-height-xs); --_px: calc(var(--pm-space-2) * var(--pm-density, 1)); --_fs: var(--pm-font-size-xs); }
|
|
103
|
+
:where(.pm-button[data-size="sm"]) { --_h: var(--pm-control-height-sm); --_px: calc(var(--pm-space-3) * var(--pm-density, 1)); --_fs: var(--pm-font-size-sm); }
|
|
104
|
+
:where(.pm-button[data-size="lg"]) { --_h: var(--pm-control-height-lg); --_px: calc(var(--pm-space-5) * var(--pm-density, 1)); --_fs: var(--pm-font-size-md); }
|
|
105
|
+
:where(.pm-button[data-size="xl"]) { --_h: var(--pm-control-height-xl); --_px: calc(var(--pm-space-6) * var(--pm-density, 1)); --_fs: var(--pm-font-size-lg); }
|
|
106
|
+
|
|
107
|
+
/* Icon-only button: square, needs aria-label */
|
|
108
|
+
:where(.pm-button[data-icon]) {
|
|
109
|
+
--_px: 0;
|
|
110
|
+
inline-size: var(--_h);
|
|
111
|
+
/* The glyph is the whole label: a little larger than in a text button. */
|
|
112
|
+
--pm-icon-size: 1.3em;
|
|
113
|
+
& > svg { inline-size: 1.3em; block-size: 1.3em; }
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Loading: keep width, show spinner, block interaction */
|
|
117
|
+
:where(.pm-button[data-loading]) {
|
|
118
|
+
position: relative;
|
|
119
|
+
color: transparent;
|
|
120
|
+
pointer-events: none;
|
|
121
|
+
&::after {
|
|
122
|
+
content: "";
|
|
123
|
+
position: absolute;
|
|
124
|
+
inset: 0;
|
|
125
|
+
margin: auto;
|
|
126
|
+
inline-size: 1.1em;
|
|
127
|
+
block-size: 1.1em;
|
|
128
|
+
border: 2px solid var(--_fg);
|
|
129
|
+
border-inline-end-color: transparent;
|
|
130
|
+
border-radius: 50%;
|
|
131
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
132
|
+
animation: pm-spin 0.7s linear infinite;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Button group: joined edges */
|
|
138
|
+
:where(.pm-button-group) {
|
|
139
|
+
display: inline-flex;
|
|
140
|
+
isolation: isolate;
|
|
141
|
+
& > :where(.pm-button) { border-radius: 0; }
|
|
142
|
+
& > :where(.pm-button:first-child) {
|
|
143
|
+
border-start-start-radius: var(--pm-radius-control, var(--pm-radius-md));
|
|
144
|
+
border-end-start-radius: var(--pm-radius-control, var(--pm-radius-md));
|
|
145
|
+
}
|
|
146
|
+
& > :where(.pm-button:last-child) {
|
|
147
|
+
border-start-end-radius: var(--pm-radius-control, var(--pm-radius-md));
|
|
148
|
+
border-end-end-radius: var(--pm-radius-control, var(--pm-radius-md));
|
|
149
|
+
}
|
|
150
|
+
& > :where(.pm-button:not(:first-child)) { margin-inline-start: -1px; }
|
|
151
|
+
& > :where(.pm-button:focus-visible) { z-index: 1; }
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@keyframes pm-spin { to { rotate: 1turn; } }
|
|
155
|
+
|
|
156
|
+
@media (forced-colors: active) {
|
|
157
|
+
:where(.pm-button) { border-color: ButtonText; }
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* Calendar — month grid (ARIA grid) */
|
|
2
|
+
@layer pm.components {
|
|
3
|
+
:where(.pm-calendar) { display: inline-grid; gap: var(--pm-space-2); font-size: var(--pm-font-size-sm); user-select: none; }
|
|
4
|
+
:where(.pm-calendar-head) { display: flex; align-items: center; justify-content: space-between; gap: var(--pm-space-2); }
|
|
5
|
+
:where(.pm-calendar-title) { font-weight: var(--pm-font-weight-semibold); text-transform: capitalize; }
|
|
6
|
+
:where(.pm-calendar-grid) { border-collapse: collapse; font-variant-numeric: tabular-nums; }
|
|
7
|
+
:where(.pm-calendar-grid th) { block-size: 2rem; color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); font-weight: var(--pm-font-weight-medium); }
|
|
8
|
+
:where(.pm-calendar-grid td) { padding: 1px 0; }
|
|
9
|
+
:where(.pm-day) {
|
|
10
|
+
position: relative;
|
|
11
|
+
display: grid;
|
|
12
|
+
place-items: center;
|
|
13
|
+
inline-size: 2.25rem;
|
|
14
|
+
block-size: 2.25rem;
|
|
15
|
+
padding: 0;
|
|
16
|
+
border: 0;
|
|
17
|
+
border-radius: var(--pm-radius-md);
|
|
18
|
+
background: transparent;
|
|
19
|
+
color: var(--pm-color-fg);
|
|
20
|
+
font: inherit;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
&:hover:not([aria-disabled="true"], [aria-selected="true"]) { background: var(--pm-color-bg-hover); }
|
|
23
|
+
&[data-outside] { color: var(--pm-color-fg-muted); }
|
|
24
|
+
&[data-today]::after { content: ""; position: absolute; inset-block-end: 4px; inline-size: 4px; block-size: 4px; border-radius: 50%; background: currentColor; }
|
|
25
|
+
&[data-in-range] { border-radius: 0; background: var(--pm-tone-soft); color: var(--pm-tone-text); }
|
|
26
|
+
&[aria-selected="true"] { background: var(--pm-tone-solid); color: var(--pm-tone-on-solid); font-weight: var(--pm-font-weight-semibold); }
|
|
27
|
+
&[data-range-start] { border-start-end-radius: 0; border-end-end-radius: 0; }
|
|
28
|
+
&[data-range-end] { border-start-start-radius: 0; border-end-start-radius: 0; }
|
|
29
|
+
&[data-range-start][data-range-end] { border-radius: var(--pm-radius-md); }
|
|
30
|
+
&[aria-disabled="true"] { color: var(--pm-color-fg-muted); text-decoration: line-through; cursor: not-allowed; }
|
|
31
|
+
&:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: 1px; z-index: 1; }
|
|
32
|
+
}
|
|
33
|
+
@media (forced-colors: active) { :where(.pm-day[aria-selected="true"]) { outline: 2px solid Highlight; } }
|
|
34
|
+
}
|
|
35
|
+
/* Month / year picker views */
|
|
36
|
+
@layer pm.components {
|
|
37
|
+
:where(.pm-calendar-picker) { display: grid; gap: var(--pm-space-1); inline-size: calc(7 * 2.25rem); }
|
|
38
|
+
:where(.pm-calendar-picker > [role="row"]) { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--pm-space-1); }
|
|
39
|
+
:where(.pm-calendar-cell) {
|
|
40
|
+
position: relative;
|
|
41
|
+
display: grid;
|
|
42
|
+
place-items: center;
|
|
43
|
+
block-size: 3rem;
|
|
44
|
+
border-radius: var(--pm-radius-md);
|
|
45
|
+
color: var(--pm-color-fg);
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
text-transform: capitalize;
|
|
48
|
+
font-variant-numeric: tabular-nums;
|
|
49
|
+
&:hover:not([aria-disabled="true"], [aria-selected="true"]) { background: var(--pm-color-bg-hover); }
|
|
50
|
+
&[data-today] { box-shadow: inset 0 0 0 1px var(--pm-color-border-strong); }
|
|
51
|
+
&[aria-selected="true"] { background: var(--pm-tone-solid); color: var(--pm-tone-on-solid); font-weight: var(--pm-font-weight-semibold); }
|
|
52
|
+
&[aria-disabled="true"] { color: var(--pm-color-fg-muted); text-decoration: line-through; cursor: not-allowed; }
|
|
53
|
+
&:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: 1px; }
|
|
54
|
+
}
|
|
55
|
+
:where(.pm-day[data-blank]) { visibility: hidden; }
|
|
56
|
+
@media (forced-colors: active) { :where(.pm-calendar-cell[aria-selected="true"]) { outline: 2px solid Highlight; } }
|
|
57
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* Card */
|
|
2
|
+
@layer pm.components {
|
|
3
|
+
/* ---------- Card ---------- */
|
|
4
|
+
:where(.pm-card) {
|
|
5
|
+
--_pad: calc(var(--pm-space-6) * var(--pm-density, 1));
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: var(--pm-space-4);
|
|
9
|
+
padding: var(--_pad);
|
|
10
|
+
& > :where(header) { display: grid; gap: var(--pm-space-1); }
|
|
11
|
+
& :where(.pm-card-title) { font-size: var(--pm-font-size-lg); font-weight: var(--pm-font-weight-semibold); line-height: var(--pm-line-height-snug); }
|
|
12
|
+
& :where(.pm-card-description) { color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-sm); }
|
|
13
|
+
& > :where(footer) { display: flex; gap: var(--pm-space-2); justify-content: flex-end; flex-wrap: wrap; }
|
|
14
|
+
& > :where(.pm-card-media) {
|
|
15
|
+
margin: calc(var(--_pad) * -1) calc(var(--_pad) * -1) 0;
|
|
16
|
+
border-start-start-radius: inherit;
|
|
17
|
+
border-start-end-radius: inherit;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
& > :where(img, video) { inline-size: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
:where(.pm-card[data-size="sm"]) { --_pad: calc(var(--pm-space-4) * var(--pm-density, 1)); border-radius: var(--pm-radius-lg); }
|
|
23
|
+
:where(.pm-card[data-interactive]) {
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
26
|
+
transition: translate var(--pm-duration-moderate) var(--pm-ease-spring), box-shadow var(--pm-duration-moderate);
|
|
27
|
+
&:hover { translate: 0 -2px; }
|
|
28
|
+
}
|
|
29
|
+
&:hover { box-shadow: var(--pm-sf-shadow), var(--pm-elevation-3); }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/* Carousel — scroll-snap track with previous/next buttons and slide pickers */
|
|
2
|
+
@layer pm.components {
|
|
3
|
+
:where(.pm-carousel) { position: relative; display: grid; gap: var(--pm-space-3); }
|
|
4
|
+
/* Centre the arrows on the slides, not on slides + dots. */
|
|
5
|
+
:where(.pm-carousel:has(.pm-carousel-dots)) { --_dots: calc(24px + var(--pm-space-3)); }
|
|
6
|
+
:where(.pm-carousel-track) {
|
|
7
|
+
display: grid;
|
|
8
|
+
grid-auto-flow: column;
|
|
9
|
+
grid-auto-columns: calc((100% - (var(--pm-carousel-per-view, 1) - 1) * var(--pm-carousel-gap, var(--pm-space-4))) / var(--pm-carousel-per-view, 1));
|
|
10
|
+
gap: var(--pm-carousel-gap, var(--pm-space-4));
|
|
11
|
+
overflow-x: auto;
|
|
12
|
+
overscroll-behavior-x: contain;
|
|
13
|
+
scroll-snap-type: x mandatory;
|
|
14
|
+
scrollbar-width: none;
|
|
15
|
+
border-radius: var(--pm-radius-lg);
|
|
16
|
+
&::-webkit-scrollbar { display: none; }
|
|
17
|
+
@media (prefers-reduced-motion: no-preference) { scroll-behavior: smooth; }
|
|
18
|
+
& > :where(*) { scroll-snap-align: start; min-inline-size: 0; }
|
|
19
|
+
}
|
|
20
|
+
:where(.pm-carousel-nav) {
|
|
21
|
+
position: absolute;
|
|
22
|
+
inset-block-start: calc(50% - 1.25rem - var(--_dots, 0px) / 2);
|
|
23
|
+
z-index: 1;
|
|
24
|
+
display: grid;
|
|
25
|
+
place-items: center;
|
|
26
|
+
inline-size: 2.5rem;
|
|
27
|
+
block-size: 2.5rem;
|
|
28
|
+
border: 1px solid var(--pm-color-border);
|
|
29
|
+
border-radius: 50%;
|
|
30
|
+
background: color-mix(in oklab, var(--pm-color-bg-surface) 88%, transparent);
|
|
31
|
+
backdrop-filter: blur(8px);
|
|
32
|
+
color: var(--pm-color-fg);
|
|
33
|
+
box-shadow: var(--pm-elevation-2);
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
&:disabled { opacity: 0; pointer-events: none; }
|
|
36
|
+
&[data-dir="prev"] { inset-inline-start: var(--pm-space-2); }
|
|
37
|
+
&[data-dir="next"] { inset-inline-end: var(--pm-space-2); }
|
|
38
|
+
&:dir(rtl) { scale: -1 1; }
|
|
39
|
+
}
|
|
40
|
+
:where(.pm-carousel-dots) { display: flex; justify-content: center; }
|
|
41
|
+
/* 24×24 hit area (WCAG 2.5.8); the visible pill is drawn by ::before */
|
|
42
|
+
:where(.pm-carousel-dot) {
|
|
43
|
+
display: grid;
|
|
44
|
+
place-items: center;
|
|
45
|
+
min-inline-size: 24px;
|
|
46
|
+
block-size: 24px;
|
|
47
|
+
padding: 0 2px;
|
|
48
|
+
border: 0;
|
|
49
|
+
border-radius: var(--pm-radius-sm);
|
|
50
|
+
background: none;
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
&::before {
|
|
53
|
+
content: "";
|
|
54
|
+
inline-size: 0.5rem;
|
|
55
|
+
block-size: 0.5rem;
|
|
56
|
+
border-radius: 99px;
|
|
57
|
+
background: var(--pm-color-border-strong);
|
|
58
|
+
transition: inline-size var(--pm-duration-moderate) var(--pm-ease-standard), background-color var(--pm-duration-fast);
|
|
59
|
+
}
|
|
60
|
+
&[aria-current="true"]::before { inline-size: 1.5rem; background: var(--pm-tone-solid); }
|
|
61
|
+
&:focus-visible { outline: 2px solid var(--pm-color-ring); }
|
|
62
|
+
}
|
|
63
|
+
@media (forced-colors: active) {
|
|
64
|
+
:where(.pm-carousel-dot)::before { background: ButtonText; }
|
|
65
|
+
:where(.pm-carousel-dot[aria-current="true"])::before { background: Highlight; }
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* Chart and sparkline: dependency-free SVG. Colours come from the theme's roles, so every theme and mode works. */
|
|
2
|
+
@layer pm.components {
|
|
3
|
+
:where(.pm-chart) {
|
|
4
|
+
--pm-chart-grid: var(--pm-color-border);
|
|
5
|
+
--pm-chart-text: var(--pm-color-fg-muted);
|
|
6
|
+
position: relative;
|
|
7
|
+
display: grid;
|
|
8
|
+
gap: var(--pm-space-3);
|
|
9
|
+
min-inline-size: 0;
|
|
10
|
+
color: var(--pm-color-fg);
|
|
11
|
+
font-size: var(--pm-font-size-sm);
|
|
12
|
+
& :where(.pm-chart-plot) { position: relative; min-inline-size: 0; border-radius: var(--pm-radius-md); touch-action: pan-y; outline: none; }
|
|
13
|
+
& :where(.pm-chart-plot:focus-visible) { outline: 2px solid var(--pm-color-ring); outline-offset: 2px; }
|
|
14
|
+
& :where(svg) { display: block; inline-size: 100%; direction: ltr; overflow: visible; }
|
|
15
|
+
& :where(text) { fill: var(--pm-chart-text); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
|
|
16
|
+
& :where(.pm-chart-grid) { stroke: var(--pm-chart-grid); stroke-width: 1; shape-rendering: crispEdges; }
|
|
17
|
+
& :where(.pm-chart-zero) { stroke: var(--pm-color-border-strong); }
|
|
18
|
+
& :where(.pm-chart-guide) { stroke: var(--pm-color-border-strong); stroke-width: 1; stroke-dasharray: 3 3; }
|
|
19
|
+
& :where(.pm-chart-line) { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
|
|
20
|
+
& :where(.pm-chart-area) { opacity: 0.16; stroke: none; }
|
|
21
|
+
& :where(.pm-chart-dot) { stroke: var(--pm-color-bg-surface); stroke-width: 2; }
|
|
22
|
+
& :where(.pm-chart-mark) { transition: opacity var(--pm-duration-fast); cursor: pointer; }
|
|
23
|
+
& :where(.pm-chart-mark[data-dim]) { opacity: 0.45; }
|
|
24
|
+
& :where(.pm-chart-slice) { stroke: var(--pm-color-bg-surface); stroke-width: 2; }
|
|
25
|
+
& :where(.pm-chart-total) { fill: var(--pm-color-fg); font-family: var(--pm-font-display); font-size: 1.5rem; font-weight: var(--pm-font-weight-bold); }
|
|
26
|
+
& :where(.pm-chart-empty) { display: grid; place-items: center; color: var(--pm-color-fg-muted); border: 1px dashed var(--pm-color-border); border-radius: var(--pm-radius-md); }
|
|
27
|
+
& :where(.pm-chart-loading) { border-radius: var(--pm-radius-md); background: var(--pm-color-bg-muted); @media (prefers-reduced-motion: no-preference) { animation: pm-chart-pulse 1.4s ease-in-out infinite; } }
|
|
28
|
+
@media (forced-colors: active) {
|
|
29
|
+
& :where(.pm-chart-grid, .pm-chart-guide) { stroke: CanvasText; }
|
|
30
|
+
& :where(.pm-chart-slice, .pm-chart-dot) { stroke: Canvas; }
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
:where(.pm-chart-legend) {
|
|
34
|
+
display: flex; flex-wrap: wrap; gap: var(--pm-space-1) var(--pm-space-4); margin: 0; padding: 0; list-style: none;
|
|
35
|
+
color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs);
|
|
36
|
+
& :where(li) { display: inline-flex; align-items: center; gap: var(--pm-space-2); }
|
|
37
|
+
& :where(.pm-chart-swatch) { flex: none; inline-size: 0.65rem; block-size: 0.65rem; border-radius: 2px; background: var(--_c); forced-color-adjust: none; }
|
|
38
|
+
& :where(strong) { color: var(--pm-color-fg); font-weight: var(--pm-font-weight-semibold); font-variant-numeric: tabular-nums; }
|
|
39
|
+
}
|
|
40
|
+
:where(.pm-chart-tip) {
|
|
41
|
+
position: absolute; z-index: 1; inset-block-start: 0; inset-inline-start: 0; pointer-events: none;
|
|
42
|
+
display: grid; gap: 2px; min-inline-size: 7rem; max-inline-size: 16rem; padding: var(--pm-space-2) var(--pm-space-3);
|
|
43
|
+
border: 1px solid var(--pm-color-border); border-radius: var(--pm-radius-md);
|
|
44
|
+
background: var(--pm-color-bg-overlay, var(--pm-color-bg-surface)); color: var(--pm-color-fg);
|
|
45
|
+
box-shadow: var(--pm-elevation-3); font-size: var(--pm-font-size-xs); white-space: nowrap;
|
|
46
|
+
& :where(.pm-chart-tip-title) { font-weight: var(--pm-font-weight-semibold); }
|
|
47
|
+
& :where(.pm-chart-tip-row) { display: flex; align-items: center; gap: var(--pm-space-2); color: var(--pm-color-fg-muted); }
|
|
48
|
+
& :where(.pm-chart-tip-row strong) { margin-inline-start: auto; padding-inline-start: var(--pm-space-3); color: var(--pm-color-fg); font-variant-numeric: tabular-nums; }
|
|
49
|
+
}
|
|
50
|
+
@keyframes pm-chart-pulse { 50% { opacity: 0.5; } }
|
|
51
|
+
|
|
52
|
+
/* ---------- Sparkline: <pm-sparkline values="3,5,4,8"> ---------- */
|
|
53
|
+
:where(.pm-sparkline) {
|
|
54
|
+
display: block; inline-size: var(--pm-sparkline-width, 6rem); block-size: var(--pm-sparkline-height, 1.75rem); overflow: visible; color: var(--pm-tone-solid);
|
|
55
|
+
& :where(.pm-sparkline-line) { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
|
|
56
|
+
& :where(.pm-sparkline-area) { fill: currentColor; opacity: 0.16; }
|
|
57
|
+
& :where(.pm-sparkline-bar) { fill: currentColor; }
|
|
58
|
+
@media (forced-colors: active) { color: CanvasText; }
|
|
59
|
+
}
|
|
60
|
+
}
|