@lanfermann/ui 0.5.0 → 0.7.0
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/dist/components/accordion/accordion.d.ts +11 -3
- package/dist/components/accordion/accordion.js +15 -10
- package/dist/components/action-bar/action-bar.d.ts +60 -0
- package/dist/components/action-bar/action-bar.js +117 -0
- package/dist/components/alert/alert.d.ts +1 -1
- package/dist/components/alert/alert.js +3 -17
- package/dist/components/alert-dialog/alert-dialog.d.ts +1 -1
- package/dist/components/app-shell/app-shell.d.ts +33 -0
- package/dist/components/app-shell/app-shell.js +93 -0
- package/dist/components/attachment/attachment.d.ts +51 -0
- package/dist/components/attachment/attachment.js +255 -0
- package/dist/components/attachment/kinds.d.ts +7 -0
- package/dist/components/attachment/kinds.js +142 -0
- package/dist/components/avatar/avatar.d.ts +14 -4
- package/dist/components/avatar/avatar.js +57 -13
- package/dist/components/avatar-group/avatar-group.d.ts +33 -0
- package/dist/components/avatar-group/avatar-group.js +110 -0
- package/dist/components/avatar-group/people.d.ts +12 -0
- package/dist/components/avatar-group/people.js +24 -0
- package/dist/components/badge/badge.d.ts +9 -3
- package/dist/components/badge/badge.js +21 -6
- package/dist/components/banner/banner.d.ts +39 -0
- package/dist/components/banner/banner.js +149 -0
- package/dist/components/button-group/button-group-variants.d.ts +4 -3
- package/dist/components/button-group/button-group-variants.js +13 -12
- package/dist/components/button-group/button-group.d.ts +3 -3
- package/dist/components/button-group/button-group.js +3 -3
- package/dist/components/card/card.d.ts +20 -4
- package/dist/components/card/card.js +32 -6
- package/dist/components/checkbox-card/checkbox-card.d.ts +21 -0
- package/dist/components/checkbox-card/checkbox-card.js +50 -0
- package/dist/components/chip/chip-group.d.ts +15 -0
- package/dist/components/chip/chip-group.js +44 -0
- package/dist/components/chip/chip-variants.d.ts +6 -0
- package/dist/components/chip/chip-variants.js +28 -0
- package/dist/components/chip/chip.d.ts +39 -0
- package/dist/components/chip/chip.js +71 -0
- package/dist/components/code-block/code-copy.d.ts +3 -11
- package/dist/components/code-block/code-copy.js +15 -62
- package/dist/components/code-block/code-keys.js +10 -22
- package/dist/components/collapsible/collapsible.js +7 -3
- package/dist/components/combobox/combobox.d.ts +53 -3
- package/dist/components/combobox/combobox.js +204 -20
- package/dist/components/command/command.d.ts +131 -0
- package/dist/components/command/command.js +335 -0
- package/dist/components/consent/consent-card.js +365 -0
- package/dist/components/consent/consent-embed.d.ts +21 -0
- package/dist/components/consent/consent-embed.js +111 -0
- package/dist/components/consent/consent-labels.d.ts +70 -0
- package/dist/components/consent/consent-labels.js +61 -0
- package/dist/components/consent/consent-record.d.ts +95 -0
- package/dist/components/consent/consent-record.js +112 -0
- package/dist/components/consent/consent-store.d.ts +26 -0
- package/dist/components/consent/consent-store.js +240 -0
- package/dist/components/consent/consent.d.ts +86 -0
- package/dist/components/consent/consent.js +306 -0
- package/dist/components/container/container.d.ts +1 -1
- package/dist/components/context-menu/context-menu.d.ts +23 -0
- package/dist/components/context-menu/context-menu.js +50 -0
- package/dist/components/conversation/conversation.d.ts +45 -0
- package/dist/components/conversation/conversation.js +295 -0
- package/dist/components/conversation/stick.js +23 -0
- package/dist/components/copy-button/copy-button.d.ts +50 -0
- package/dist/components/copy-button/copy-button.js +65 -0
- package/dist/components/copy-page/copy-page.d.ts +4 -4
- package/dist/components/copy-page/copy-page.js +16 -36
- package/dist/components/copy-pill/copy-pill.js +1 -1
- package/dist/components/description-list/description-list.d.ts +32 -0
- package/dist/components/description-list/description-list.js +51 -0
- package/dist/components/empty/empty.d.ts +38 -0
- package/dist/components/empty/empty.js +57 -0
- package/dist/components/field/field.js +1 -1
- package/dist/components/file-upload/file-upload.d.ts +96 -0
- package/dist/components/file-upload/file-upload.js +347 -0
- package/dist/components/file-upload/files.d.ts +39 -0
- package/dist/components/file-upload/files.js +74 -0
- package/dist/components/grow/grow.d.ts +15 -3
- package/dist/components/grow/grow.js +24 -9
- package/dist/components/heading/heading.d.ts +1 -1
- package/dist/components/icon/icon.d.ts +1 -1
- package/dist/components/input/input.js +1 -1
- package/dist/components/menu/menu.d.ts +20 -8
- package/dist/components/menu/menu.js +51 -29
- package/dist/components/message/message.d.ts +81 -0
- package/dist/components/message/message.js +208 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +7 -1
- package/dist/components/navigation-menu/navigation-menu.js +11 -4
- package/dist/components/otp-field/otp-field.d.ts +37 -0
- package/dist/components/otp-field/otp-field.js +161 -0
- package/dist/components/pagination/pagination.d.ts +50 -0
- package/dist/components/pagination/pagination.js +188 -0
- package/dist/components/prompt-input/keys.js +15 -0
- package/dist/components/prompt-input/prompt-input.d.ts +89 -0
- package/dist/components/prompt-input/prompt-input.js +331 -0
- package/dist/components/radio-card/radio-card.d.ts +23 -0
- package/dist/components/radio-card/radio-card.js +49 -0
- package/dist/components/rolling-number/rolling-number.d.ts +30 -0
- package/dist/components/rolling-number/rolling-number.js +149 -0
- package/dist/components/seam/seam.d.ts +1 -1
- package/dist/components/secret-field/secret-field.d.ts +53 -0
- package/dist/components/secret-field/secret-field.js +121 -0
- package/dist/components/section/section.d.ts +1 -1
- package/dist/components/segmented-control/segmented-control.js +29 -16
- package/dist/components/select/select.d.ts +5 -4
- package/dist/components/select/select.js +16 -11
- package/dist/components/shortcut/shortcut.d.ts +46 -0
- package/dist/components/shortcut/shortcut.js +87 -0
- package/dist/components/sidebar/sidebar-context.js +16 -0
- package/dist/components/sidebar/sidebar.d.ts +161 -0
- package/dist/components/sidebar/sidebar.js +588 -0
- package/dist/components/site-header/site-header.js +1 -1
- package/dist/components/skeleton/loaded.d.ts +21 -0
- package/dist/components/skeleton/loaded.js +57 -0
- package/dist/components/skeleton/skeleton.d.ts +43 -0
- package/dist/components/skeleton/skeleton.js +48 -0
- package/dist/components/sources/source-list.d.ts +17 -0
- package/dist/components/sources/source-list.js +26 -0
- package/dist/components/sources/sources.d.ts +45 -0
- package/dist/components/sources/sources.js +167 -0
- package/dist/components/stat/stat.d.ts +59 -0
- package/dist/components/stat/stat.js +112 -0
- package/dist/components/steps/steps.d.ts +57 -0
- package/dist/components/steps/steps.js +134 -0
- package/dist/components/table/table.d.ts +18 -9
- package/dist/components/table/table.js +21 -13
- package/dist/components/text/text.d.ts +1 -1
- package/dist/components/theme-switch/theme-switch.js +1 -1
- package/dist/components/time-field/time-field.js +7 -6
- package/dist/components/timeline/timeline.d.ts +45 -0
- package/dist/components/timeline/timeline.js +86 -0
- package/dist/components/toast/toast.js +10 -26
- package/dist/components/toggle/toggle.d.ts +27 -0
- package/dist/components/toggle/toggle.js +61 -0
- package/dist/components/toggle-group/toggle-group.d.ts +27 -0
- package/dist/components/toggle-group/toggle-group.js +38 -0
- package/dist/components/toolbar/toolbar-context.js +12 -0
- package/dist/components/toolbar/toolbar.d.ts +52 -0
- package/dist/components/toolbar/toolbar.js +105 -0
- package/dist/components/trace/trace.d.ts +2 -1
- package/dist/components/trace/trace.js +15 -27
- package/dist/index.d.ts +46 -3
- package/dist/index.js +44 -3
- package/dist/internal/arriving-pieces.js +56 -0
- package/dist/internal/arriving.js +171 -0
- package/dist/internal/avatar-cut.d.ts +15 -0
- package/dist/internal/avatar-cut.js +83 -0
- package/dist/internal/choice-card.d.ts +15 -0
- package/dist/internal/choice-card.js +81 -0
- package/dist/internal/clipboard.js +37 -0
- package/dist/internal/copy.js +58 -0
- package/dist/internal/disclosure.js +15 -3
- package/dist/internal/field.js +24 -4
- package/dist/internal/glyphs.js +26 -1
- package/dist/internal/key-tip.js +18 -0
- package/dist/internal/list-mark.js +39 -0
- package/dist/internal/live-list.js +41 -0
- package/dist/internal/number-places.js +157 -0
- package/dist/internal/picker-sheet.js +1 -1
- package/dist/internal/presence-dot.js +24 -0
- package/dist/internal/presence.js +104 -0
- package/dist/internal/rail-mark.d.ts +3 -0
- package/dist/internal/rail-mark.js +33 -0
- package/dist/internal/rule.js +2 -1
- package/dist/internal/status-icon.js +22 -0
- package/dist/internal/tile.js +23 -0
- package/dist/internal/travelling-mark.js +204 -0
- package/dist/lib/cn.js +10 -0
- package/dist/lib/shortcut.d.ts +11 -0
- package/dist/lib/shortcut.js +165 -0
- package/package.json +1 -1
- package/src/styles/accordion.css +176 -0
- package/src/styles/action-bar.css +28 -0
- package/src/styles/assistant.css +83 -0
- package/src/styles/avatar.css +24 -0
- package/src/styles/consent.css +65 -0
- package/src/styles/copy.css +12 -11
- package/src/styles/depth.css +120 -4
- package/src/styles/marks.css +20 -2
- package/src/styles/motion.css +3 -0
- package/src/styles/rail.css +49 -0
- package/src/styles/rolling-number.css +94 -0
- package/src/styles/segmented.css +14 -7
- package/src/styles/steps.css +98 -0
- package/src/styles/timeline.css +48 -0
- package/src/styles/travel.css +36 -0
- package/src/styles.css +10 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Steps draw themselves in where they first show (Justin, 2026-11-19): nothing stands there at
|
|
3
|
+
* first, then step after step arrives. Its mark seats in and its name fades up, a finished
|
|
4
|
+
* step's tick draws itself, and the line draws on towards the next mark, which seats in as the
|
|
5
|
+
* line reaches it. It is the one place where a page load animates.
|
|
6
|
+
*
|
|
7
|
+
* Every step carries these animations, whatever its state, and they run once, when the step is
|
|
8
|
+
* first drawn. Because they never change, a step that is finished later does not run them
|
|
9
|
+
* again: its own transitions do that (`steps.tsx`). `backwards` holds the start through the
|
|
10
|
+
* delay and lets go at the end, so the transitions own the parts again.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
[data-slot="step"]:nth-child(2) {
|
|
14
|
+
--step-index: 1;
|
|
15
|
+
}
|
|
16
|
+
[data-slot="step"]:nth-child(3) {
|
|
17
|
+
--step-index: 2;
|
|
18
|
+
}
|
|
19
|
+
[data-slot="step"]:nth-child(4) {
|
|
20
|
+
--step-index: 3;
|
|
21
|
+
}
|
|
22
|
+
[data-slot="step"]:nth-child(5) {
|
|
23
|
+
--step-index: 4;
|
|
24
|
+
}
|
|
25
|
+
[data-slot="step"]:nth-child(6) {
|
|
26
|
+
--step-index: 5;
|
|
27
|
+
}
|
|
28
|
+
[data-slot="step"]:nth-child(7) {
|
|
29
|
+
--step-index: 6;
|
|
30
|
+
}
|
|
31
|
+
[data-slot="step"]:nth-child(n + 8) {
|
|
32
|
+
--step-index: 7;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* The line is drawn by uncovering it from its start: the trough and its fill together. */
|
|
36
|
+
[data-slot="step-line"] {
|
|
37
|
+
--line-from: inset(0 100% 0 0);
|
|
38
|
+
clip-path: inset(0);
|
|
39
|
+
}
|
|
40
|
+
[data-slot="step-line"]:dir(rtl) {
|
|
41
|
+
--line-from: inset(0 0 0 100%);
|
|
42
|
+
}
|
|
43
|
+
[data-slot="steps"][data-orientation="vertical"] [data-slot="step-line"] {
|
|
44
|
+
--line-from: inset(0 0 100% 0);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
48
|
+
[data-slot="step"] {
|
|
49
|
+
/* When this step arrives: one after the other, as the line before it comes in. */
|
|
50
|
+
--step-arrives: calc(var(--step-index, 0) * 200ms + 80ms);
|
|
51
|
+
}
|
|
52
|
+
[data-slot="step-mark"] {
|
|
53
|
+
animation: steps-mark var(--transition-duration-spring-seat) var(--ease-spring-seat) backwards;
|
|
54
|
+
animation-delay: var(--step-arrives);
|
|
55
|
+
}
|
|
56
|
+
[data-slot="step-text"] {
|
|
57
|
+
animation: steps-text var(--transition-duration-spring-settle) var(--ease-spring-settle)
|
|
58
|
+
backwards;
|
|
59
|
+
animation-delay: calc(var(--step-arrives) + 40ms);
|
|
60
|
+
}
|
|
61
|
+
[data-slot="step-tick"] {
|
|
62
|
+
animation: steps-tick 150ms ease-out backwards;
|
|
63
|
+
animation-delay: calc(var(--step-arrives) + 140ms);
|
|
64
|
+
}
|
|
65
|
+
[data-slot="step-line"] {
|
|
66
|
+
animation: steps-line var(--transition-duration-spring-settle) var(--ease-spring-settle)
|
|
67
|
+
backwards;
|
|
68
|
+
animation-delay: calc(var(--step-arrives) + 60ms);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@keyframes steps-mark {
|
|
73
|
+
from {
|
|
74
|
+
opacity: 0;
|
|
75
|
+
scale: 0.6;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* By `transform`, beside the `translate` that centres the one name of a narrow row. */
|
|
80
|
+
@keyframes steps-text {
|
|
81
|
+
from {
|
|
82
|
+
opacity: 0;
|
|
83
|
+
transform: translateY(var(--motion-enter-offset));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@keyframes steps-tick {
|
|
88
|
+
from {
|
|
89
|
+
opacity: 0;
|
|
90
|
+
stroke-dashoffset: 1;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@keyframes steps-line {
|
|
95
|
+
from {
|
|
96
|
+
clip-path: var(--line-from);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* What happened lately, on the rail (`rail.css`). The newest entries stand at the top, so one
|
|
3
|
+
* that joins a list already on screen opens its room and fades in from above, and what stands
|
|
4
|
+
* below moves down with it instead of jumping. Page load does not animate: only an entry that
|
|
5
|
+
* joins once the list is `data-live` (a frame after it first showed) has a starting style.
|
|
6
|
+
*
|
|
7
|
+
* (A gate in CSS alone, a registered property flipped by an animation, was tried: Chrome takes
|
|
8
|
+
* transition lengths from a property's value before animations, so nothing ever moved there.)
|
|
9
|
+
*/
|
|
10
|
+
@layer components {
|
|
11
|
+
/* An entry and a day are a grid of one row, which can open from nothing. */
|
|
12
|
+
[data-slot="timeline-item"],
|
|
13
|
+
[data-slot="timeline-group"] {
|
|
14
|
+
display: grid;
|
|
15
|
+
grid-template-rows: 1fr;
|
|
16
|
+
transition:
|
|
17
|
+
grid-template-rows var(--transition-duration-spring-settle) var(--ease-spring-settle),
|
|
18
|
+
opacity var(--transition-duration-spring-settle) var(--ease-spring-settle),
|
|
19
|
+
translate var(--transition-duration-spring-settle) var(--ease-spring-settle);
|
|
20
|
+
|
|
21
|
+
[data-live] & {
|
|
22
|
+
@starting-style {
|
|
23
|
+
grid-template-rows: 0fr;
|
|
24
|
+
opacity: 0;
|
|
25
|
+
translate: 0 calc(-1 * var(--motion-enter-offset));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@media (prefers-reduced-motion: reduce) {
|
|
30
|
+
transition: opacity var(--transition-duration-spring-settle) var(--ease-spring-settle);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* The room clips what it holds while it opens; to the sides nothing is cut. */
|
|
35
|
+
[data-slot="timeline-entry"],
|
|
36
|
+
[data-slot="timeline-day"] {
|
|
37
|
+
min-height: 0;
|
|
38
|
+
overflow-y: clip;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Each entry's piece of the rail ends clear of the mark of the entry below. */
|
|
42
|
+
[data-slot="timeline-item"]:has(+ [data-lead="avatar"]) {
|
|
43
|
+
--rail-next: 1.5rem;
|
|
44
|
+
}
|
|
45
|
+
[data-slot="timeline-item"]:has(+ [data-lead="mark"]) {
|
|
46
|
+
--rail-next: 0.5rem;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* A mark that travels: one piece that stands on the current entry of a list and moves to the
|
|
3
|
+
* next when another becomes current (the tint of a `Sidebar`, the tint under a page number).
|
|
4
|
+
* `useTravellingMark` (internal/travelling-mark.ts) measures the entry and writes the mark's
|
|
5
|
+
* place onto the piece as four lengths; this utility turns them into a box moved by `translate`.
|
|
6
|
+
*
|
|
7
|
+
* --mark-x, --mark-y where the mark stands inside the list
|
|
8
|
+
* --mark-w, --mark-h how large it is
|
|
9
|
+
*
|
|
10
|
+
* The lengths are not eased here. The hook steps a spring by hand and writes every frame of the
|
|
11
|
+
* way, because the place the mark travels to may be moving itself; a transition on top of that
|
|
12
|
+
* would lag behind each frame it is given.
|
|
13
|
+
*
|
|
14
|
+
* The piece only carries the place. What it looks like (a tint, a rule) and its corners are
|
|
15
|
+
* the part's own classes.
|
|
16
|
+
*/
|
|
17
|
+
@utility travels {
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: 0;
|
|
20
|
+
left: 0;
|
|
21
|
+
width: var(--mark-w, 0px);
|
|
22
|
+
height: var(--mark-h, 0px);
|
|
23
|
+
translate: var(--mark-x, 0px) var(--mark-y, 0px);
|
|
24
|
+
opacity: 0;
|
|
25
|
+
pointer-events: none;
|
|
26
|
+
|
|
27
|
+
/* An entry is current and laid out. Without one the piece is gone. */
|
|
28
|
+
&[data-shown] {
|
|
29
|
+
opacity: 1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Forced colours drop backgrounds: the current entry is outlined by its own part instead. */
|
|
33
|
+
@media (forced-colors: active) {
|
|
34
|
+
display: none;
|
|
35
|
+
}
|
|
36
|
+
}
|
package/src/styles.css
CHANGED
|
@@ -24,14 +24,24 @@
|
|
|
24
24
|
@import "./styles/motion.generated.css";
|
|
25
25
|
@import "./styles/motion.css";
|
|
26
26
|
@import "./styles/marks.css";
|
|
27
|
+
@import "./styles/rail.css";
|
|
28
|
+
@import "./styles/timeline.css";
|
|
29
|
+
@import "./styles/avatar.css";
|
|
30
|
+
@import "./styles/travel.css";
|
|
31
|
+
@import "./styles/accordion.css";
|
|
27
32
|
@import "./styles/toast.css";
|
|
33
|
+
@import "./styles/action-bar.css";
|
|
34
|
+
@import "./styles/rolling-number.css";
|
|
28
35
|
@import "./styles/slider.css";
|
|
36
|
+
@import "./styles/steps.css";
|
|
29
37
|
@import "./styles/segmented.css";
|
|
30
38
|
@import "./styles/button-group.css";
|
|
31
39
|
@import "./styles/scroll-fade.css";
|
|
40
|
+
@import "./styles/consent.css";
|
|
32
41
|
@import "./styles/shimmer.css";
|
|
33
42
|
@import "./styles/calendar.css";
|
|
34
43
|
@import "./styles/prose.css";
|
|
44
|
+
@import "./styles/assistant.css";
|
|
35
45
|
@import "./styles/base.css";
|
|
36
46
|
|
|
37
47
|
/* Let the consumer's Tailwind see the class names used in the compiled components. */
|