@getvitops/core 0.1.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/README.md +29 -0
- package/css/animation.css +526 -0
- package/css/global.css +17 -0
- package/css/index.css +58 -0
- package/css/layout.css +723 -0
- package/css/patterns/anchor-link.css +66 -0
- package/css/patterns/banner.css +64 -0
- package/css/patterns/carousel.css +269 -0
- package/css/patterns/cluster.css +64 -0
- package/css/patterns/code.css +17 -0
- package/css/patterns/combobox.css +97 -0
- package/css/patterns/comment.css +88 -0
- package/css/patterns/copy.css +82 -0
- package/css/patterns/details.css +87 -0
- package/css/patterns/dialog.css +99 -0
- package/css/patterns/drawer.css +108 -0
- package/css/patterns/dropdown.css +45 -0
- package/css/patterns/forms.css +335 -0
- package/css/patterns/grouped.css +86 -0
- package/css/patterns/horizontal-scroll.css +40 -0
- package/css/patterns/icon.css +72 -0
- package/css/patterns/lightbox.css +156 -0
- package/css/patterns/list.css +272 -0
- package/css/patterns/marquee.css +68 -0
- package/css/patterns/masonry.css +40 -0
- package/css/patterns/media.css +70 -0
- package/css/patterns/nav.css +241 -0
- package/css/patterns/notification.css +114 -0
- package/css/patterns/overlay.css +28 -0
- package/css/patterns/popover.css +68 -0
- package/css/patterns/pull-quote.css +71 -0
- package/css/patterns/scroll-based.css +227 -0
- package/css/patterns/scroll-target.css +124 -0
- package/css/patterns/separator.css +130 -0
- package/css/patterns/sitenav.css +582 -0
- package/css/patterns/split-link.css +113 -0
- package/css/patterns/splitter.css +212 -0
- package/css/patterns/stack.css +67 -0
- package/css/patterns/sticky.css +127 -0
- package/css/patterns/subgrid.css +178 -0
- package/css/patterns/svg.css +166 -0
- package/css/patterns/table.css +106 -0
- package/css/patterns/tag.css +75 -0
- package/css/patterns/text-effects.css +317 -0
- package/css/patterns/tooltip.css +68 -0
- package/css/patterns/tree.css +126 -0
- package/css/utilities.css +351 -0
- package/dist/deferred.js +1 -0
- package/dist/elements.js +887 -0
- package/dist/polyfills/adoptedStyleSheets.js +1 -0
- package/dist/polyfills/css-anchor-positioning-fn.js +17 -0
- package/dist/polyfills/global.esm.js +1 -0
- package/dist/polyfills/popover.js +63 -0
- package/dist/polyfills/template-shadowroot.js +24 -0
- package/dist/polyfills/webcomponents-bundle.js +27 -0
- package/dist/polyfills.js +1 -0
- package/package.json +33 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copy — copy-to-clipboard button CSS shell migrated from old-css-lib. The
|
|
3
|
+
* button, mask icons and success/"Copied!" affordance are pure CSS; the
|
|
4
|
+
* clipboard write + success-state toggle arrive with its Lit component (which
|
|
5
|
+
* adds `.copy--success`).
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.copy {
|
|
9
|
+
--_size: var(--copy-size, 2.5rem);
|
|
10
|
+
--_p: var(--p-copy, var(--p-control, var(--p-default)));
|
|
11
|
+
--_br: var(--br-copy, var(--br-control, var(--br-default)));
|
|
12
|
+
--_ds: var(--ds-copy, var(--ds-control, var(--ds-default)));
|
|
13
|
+
--_b: var(--b-copy, var(--b-control, var(--b-default)));
|
|
14
|
+
|
|
15
|
+
position: relative;
|
|
16
|
+
display: inline-flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: 0.5rem;
|
|
19
|
+
|
|
20
|
+
.copy__button {
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
min-inline-size: var(--_size);
|
|
25
|
+
min-block-size: var(--_size);
|
|
26
|
+
padding: var(--_p);
|
|
27
|
+
background: transparent;
|
|
28
|
+
border: var(--_b);
|
|
29
|
+
border-radius: var(--_br);
|
|
30
|
+
box-shadow: var(--_ds);
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
transition:
|
|
33
|
+
background-color 0.15s ease,
|
|
34
|
+
transform 0.1s ease;
|
|
35
|
+
|
|
36
|
+
&:active {
|
|
37
|
+
transform: scale(0.95);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:focus-visible {
|
|
41
|
+
outline: 2px solid var(--copy-focus-color, var(--color-brand-primary-l));
|
|
42
|
+
outline-offset: 2px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.copy__icon {
|
|
47
|
+
inline-size: 1.25em;
|
|
48
|
+
block-size: 1.25em;
|
|
49
|
+
background-color: currentColor;
|
|
50
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M208 0H332.1c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9V336c0 26.5-21.5 48-48 48H208c-26.5 0-48-21.5-48-48V48c0-26.5 21.5-48 48-48zM48 128h80v64H64V448H256V416h64v48c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48z'/%3E%3C/svg%3E");
|
|
51
|
+
mask-size: contain;
|
|
52
|
+
mask-repeat: no-repeat;
|
|
53
|
+
mask-position: center;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.copy__icon--success {
|
|
57
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z'/%3E%3C/svg%3E");
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.copy__tooltip {
|
|
61
|
+
position: absolute;
|
|
62
|
+
inset-block-end: 100%;
|
|
63
|
+
inset-inline-start: 50%;
|
|
64
|
+
translate: -50% 0;
|
|
65
|
+
padding: 0.25rem 0.5rem;
|
|
66
|
+
font-size: 0.75rem;
|
|
67
|
+
border-radius: 0.25rem;
|
|
68
|
+
white-space: nowrap;
|
|
69
|
+
background: var(--color-surface-xxd);
|
|
70
|
+
color: var(--color-surface-xxl);
|
|
71
|
+
opacity: 0;
|
|
72
|
+
visibility: hidden;
|
|
73
|
+
transition:
|
|
74
|
+
opacity 0.15s ease,
|
|
75
|
+
visibility 0.15s ease;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&.copy--success .copy__tooltip {
|
|
79
|
+
opacity: 1;
|
|
80
|
+
visibility: visible;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Details — pattern partial migrated from old-css-lib.
|
|
3
|
+
* Consumes the generated token cascade (src/css/generated/tokens.css).
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* ── Details — native <details> with animated ::details-content ───────────── */
|
|
7
|
+
details,
|
|
8
|
+
.details {
|
|
9
|
+
--_content-margin: var(--p-details-content, var(--p-details-group, var(--p-default)));
|
|
10
|
+
|
|
11
|
+
> summary {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
list-style: none;
|
|
16
|
+
user-select: none;
|
|
17
|
+
|
|
18
|
+
&::-webkit-details-marker {
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
21
|
+
&::marker {
|
|
22
|
+
content: none;
|
|
23
|
+
}
|
|
24
|
+
&:focus-visible {
|
|
25
|
+
outline: 2px solid currentColor;
|
|
26
|
+
outline-offset: 2px;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
> summary > .details-icon {
|
|
31
|
+
flex-shrink: 0;
|
|
32
|
+
margin-inline-start: auto;
|
|
33
|
+
transition: rotate 0.3s ease;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&[open] > summary > .details-icon {
|
|
37
|
+
rotate: var(--_details-icon-rotate, 90deg);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&::details-content {
|
|
41
|
+
display: block;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
block-size: 0;
|
|
44
|
+
opacity: 0;
|
|
45
|
+
transition:
|
|
46
|
+
block-size 0.3s ease,
|
|
47
|
+
opacity 0.3s ease,
|
|
48
|
+
content-visibility 0.3s allow-discrete;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
> summary + * {
|
|
52
|
+
margin-block-start: var(--_content-margin);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
> :not(summary) {
|
|
56
|
+
margin-inline: var(--_content-margin);
|
|
57
|
+
|
|
58
|
+
&:last-child {
|
|
59
|
+
margin-block-end: var(--_content-margin);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&[open]::details-content {
|
|
64
|
+
block-size: auto;
|
|
65
|
+
opacity: 1;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.details--marker-start > summary > .details-icon {
|
|
69
|
+
order: -1;
|
|
70
|
+
margin-inline-start: 0;
|
|
71
|
+
margin-inline-end: auto;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Plus/minus variant — toggle two sibling icon elements */
|
|
75
|
+
&.details--plus-minus > summary > .details-icon--minus {
|
|
76
|
+
display: none;
|
|
77
|
+
}
|
|
78
|
+
&.details--plus-minus[open] > summary > .details-icon--plus {
|
|
79
|
+
display: none;
|
|
80
|
+
}
|
|
81
|
+
&.details--plus-minus[open] > summary > .details-icon--minus {
|
|
82
|
+
display: inline-flex;
|
|
83
|
+
}
|
|
84
|
+
&.details--plus-minus[open] > summary > .details-icon {
|
|
85
|
+
rotate: none;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dialog — pattern partial migrated from old-css-lib.
|
|
3
|
+
* Consumes the generated token cascade (src/css/generated/tokens.css).
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* ── Dialog — native <dialog> ──────────────────────────────────────────────── */
|
|
7
|
+
/* Keep the `:not(:popover-open)` guard so a <dialog popover> opened via the
|
|
8
|
+
Popover API (which sets :popover-open, NOT the [open] attribute) still shows. */
|
|
9
|
+
dialog:not([open]):not(:popover-open) {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
dialog.dialog {
|
|
14
|
+
--_p: var(--p-dialog, var(--p-dialog-group, var(--p-default)));
|
|
15
|
+
--_b: var(--b-dialog, var(--b-dialog-group, var(--b-default)));
|
|
16
|
+
--_br: var(--br-dialog, var(--br-dialog-group, var(--br-default)));
|
|
17
|
+
--_ds: var(--ds-dialog, var(--ds-dialog-group, var(--ds-default)));
|
|
18
|
+
|
|
19
|
+
/* inset:0 + margin:auto centres the dialog in the top layer. Needed because the
|
|
20
|
+
generic [popover] rule resets inset to auto (for anchored popovers), which
|
|
21
|
+
would otherwise leave a popover-opened <dialog> pinned to the top-left. */
|
|
22
|
+
inset: 0;
|
|
23
|
+
margin: auto;
|
|
24
|
+
padding: var(--_p);
|
|
25
|
+
border: var(--_b);
|
|
26
|
+
border-radius: var(--_br);
|
|
27
|
+
box-shadow: var(--_ds);
|
|
28
|
+
background: var(--color-surface-xxl);
|
|
29
|
+
color: var(--color-surface-xxd);
|
|
30
|
+
max-block-size: calc(100vh - 2rem);
|
|
31
|
+
|
|
32
|
+
&::backdrop {
|
|
33
|
+
backdrop-filter: blur(4px);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&[open] {
|
|
37
|
+
animation: dialog-enter 0.3s ease;
|
|
38
|
+
}
|
|
39
|
+
&[open]::backdrop {
|
|
40
|
+
animation: dialog-backdrop-enter 0.3s ease;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.dialog__header {
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: space-between;
|
|
47
|
+
margin-block-end: 1rem;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.dialog__title {
|
|
51
|
+
margin: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.dialog__close {
|
|
55
|
+
padding: 0.5rem;
|
|
56
|
+
background: transparent;
|
|
57
|
+
border: none;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
opacity: 0.5;
|
|
60
|
+
transition: opacity 0.15s ease;
|
|
61
|
+
|
|
62
|
+
&:hover {
|
|
63
|
+
opacity: 1;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.dialog__body {
|
|
68
|
+
overflow-y: auto;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.dialog__footer {
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: flex-end;
|
|
74
|
+
gap: 0.75rem;
|
|
75
|
+
margin-block-start: 1.5rem;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@keyframes dialog-enter {
|
|
80
|
+
from {
|
|
81
|
+
opacity: 0;
|
|
82
|
+
scale: 0.95;
|
|
83
|
+
translate: 0 -1rem;
|
|
84
|
+
}
|
|
85
|
+
to {
|
|
86
|
+
opacity: 1;
|
|
87
|
+
scale: 1;
|
|
88
|
+
translate: 0 0;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@keyframes dialog-backdrop-enter {
|
|
93
|
+
from {
|
|
94
|
+
opacity: 0;
|
|
95
|
+
}
|
|
96
|
+
to {
|
|
97
|
+
opacity: 1;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drawer — pattern partial migrated from old-css-lib.
|
|
3
|
+
* Consumes the generated token cascade (src/css/generated/tokens.css).
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* ── Drawer — slide-in panel (works as <dialog> or [popover]) ──────────────── */
|
|
7
|
+
.drawer {
|
|
8
|
+
--_p: var(--p-drawer, var(--p-drawer-group, var(--p-default)));
|
|
9
|
+
--_b: var(--b-drawer, var(--b-drawer-group, var(--b-default)));
|
|
10
|
+
--_ds: var(--ds-drawer, var(--ds-drawer-group, var(--ds-default)));
|
|
11
|
+
|
|
12
|
+
position: var(--_drawer-position, fixed);
|
|
13
|
+
position-anchor: var(--_drawer-anchor);
|
|
14
|
+
margin: 0;
|
|
15
|
+
padding: var(--_p);
|
|
16
|
+
border: var(--_b);
|
|
17
|
+
box-shadow: var(--_ds);
|
|
18
|
+
background: var(--color-surface-xxl);
|
|
19
|
+
color: var(--color-surface-xxd);
|
|
20
|
+
max-inline-size: none;
|
|
21
|
+
max-block-size: none;
|
|
22
|
+
|
|
23
|
+
&::backdrop {
|
|
24
|
+
backdrop-filter: blur(4px);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&,
|
|
28
|
+
&.drawer--left {
|
|
29
|
+
inset-block: 0;
|
|
30
|
+
inset-inline-start: 0;
|
|
31
|
+
block-size: 100dvh;
|
|
32
|
+
inline-size: min(100dvi, var(--drawer-max-inline-size, 280px));
|
|
33
|
+
border-radius: 0;
|
|
34
|
+
|
|
35
|
+
&[open],
|
|
36
|
+
&:popover-open {
|
|
37
|
+
animation: drawer-slide-in-left 0.3s ease;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&.drawer--right {
|
|
42
|
+
inset-block: 0;
|
|
43
|
+
inset-inline-end: 0;
|
|
44
|
+
inset-inline-start: auto;
|
|
45
|
+
inline-size: min(100dvi, var(--drawer-max-inline-size, 280px));
|
|
46
|
+
|
|
47
|
+
&[open],
|
|
48
|
+
&:popover-open {
|
|
49
|
+
animation: drawer-slide-in-right 0.3s ease;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&.drawer--top {
|
|
54
|
+
inset-block-start: 0;
|
|
55
|
+
inset-inline: 0;
|
|
56
|
+
block-size: min(100dvb, var(--drawer-max-block-size, 100dvb));
|
|
57
|
+
|
|
58
|
+
&[open],
|
|
59
|
+
&:popover-open {
|
|
60
|
+
animation: drawer-slide-in-top 0.3s ease;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&.drawer--bottom {
|
|
65
|
+
inset-block-end: 0;
|
|
66
|
+
inset-block-start: auto;
|
|
67
|
+
inset-inline: 0;
|
|
68
|
+
block-size: min(100dvb, var(--drawer-max-block-size, 100dvb));
|
|
69
|
+
|
|
70
|
+
&[open],
|
|
71
|
+
&:popover-open {
|
|
72
|
+
animation: drawer-slide-in-bottom 0.3s ease;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@keyframes drawer-slide-in-left {
|
|
78
|
+
from {
|
|
79
|
+
translate: -100% 0;
|
|
80
|
+
}
|
|
81
|
+
to {
|
|
82
|
+
translate: 0 0;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
@keyframes drawer-slide-in-right {
|
|
86
|
+
from {
|
|
87
|
+
translate: 100% 0;
|
|
88
|
+
}
|
|
89
|
+
to {
|
|
90
|
+
translate: 0 0;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
@keyframes drawer-slide-in-top {
|
|
94
|
+
from {
|
|
95
|
+
translate: 0 -100%;
|
|
96
|
+
}
|
|
97
|
+
to {
|
|
98
|
+
translate: 0 0;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
@keyframes drawer-slide-in-bottom {
|
|
102
|
+
from {
|
|
103
|
+
translate: 0 100%;
|
|
104
|
+
}
|
|
105
|
+
to {
|
|
106
|
+
translate: 0 0;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dropdown — pattern partial migrated from old-css-lib.
|
|
3
|
+
* Consumes the generated token cascade (src/css/generated/tokens.css).
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* ── Dropdown — hover/click popover menu, no scrim ─────────────────────────── */
|
|
7
|
+
.dropdown--show-on-hover,
|
|
8
|
+
.split-link--show-on-hover {
|
|
9
|
+
position: relative;
|
|
10
|
+
|
|
11
|
+
/* Override the [popover] display:none (specificity 0,2,1 > 0,1,2) */
|
|
12
|
+
> [popover]:not(:popover-open) {
|
|
13
|
+
display: block;
|
|
14
|
+
opacity: 0;
|
|
15
|
+
visibility: hidden;
|
|
16
|
+
pointer-events: none;
|
|
17
|
+
padding-block-start: var(--dropdown-gap, 0.5rem);
|
|
18
|
+
transition:
|
|
19
|
+
opacity 0.2s ease,
|
|
20
|
+
translate 0.2s ease,
|
|
21
|
+
visibility 0.2s allow-discrete;
|
|
22
|
+
inset: auto;
|
|
23
|
+
margin: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:hover > [popover]:not(:popover-open) {
|
|
27
|
+
opacity: 1;
|
|
28
|
+
visibility: visible;
|
|
29
|
+
translate: 0;
|
|
30
|
+
pointer-events: auto;
|
|
31
|
+
z-index: var(--z-tier-overlay);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
> [popover]:popover-open {
|
|
35
|
+
opacity: 1;
|
|
36
|
+
visibility: visible;
|
|
37
|
+
translate: 0;
|
|
38
|
+
pointer-events: auto;
|
|
39
|
+
padding-block-start: var(--dropdown-gap, 0.5rem);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
> [popover]::backdrop {
|
|
43
|
+
background: transparent !important;
|
|
44
|
+
}
|
|
45
|
+
}
|