@duskmoon-dev/core 1.19.5 → 1.19.6
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 +1 -1
- package/dist/components/dialog.css +29 -3
- package/dist/components/dropdown.css +91 -0
- package/dist/components/fab.css +182 -0
- package/dist/components/index.css +430 -61
- package/dist/components/modal.css +4 -3
- package/dist/components/navigation.css +94 -54
- package/dist/components/swap.css +116 -0
- package/dist/esm/components/dialog.js +29 -3
- package/dist/esm/components/dropdown.d.ts +5 -0
- package/dist/esm/components/dropdown.js +100 -0
- package/dist/esm/components/fab.d.ts +5 -0
- package/dist/esm/components/fab.js +191 -0
- package/dist/esm/components/modal.js +4 -3
- package/dist/esm/components/navigation.js +94 -54
- package/dist/esm/components/swap.d.ts +5 -0
- package/dist/esm/components/swap.js +125 -0
- package/dist/index.css +430 -61
- package/dist/index.min.css +1 -1
- package/dist/standalone/duskmoonui-themes.css +1 -1
- package/dist/standalone/duskmoonui.css +432 -63
- package/dist/standalone/duskmoonui.js +18 -5
- package/dist/standalone/duskmoonui.mjs +18 -5
- package/package.json +19 -1
|
@@ -3,6 +3,100 @@
|
|
|
3
3
|
* DuskMoonUI - Material Design 3 inspired navigation system
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
/* Preserve the Navigation entrypoint's published Dropdown coverage. */
|
|
7
|
+
/**
|
|
8
|
+
* Dropdown Component Styles
|
|
9
|
+
* Native Popover disclosure with logical CSS anchor positioning.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
@layer components {
|
|
13
|
+
.dropdown {
|
|
14
|
+
position: relative;
|
|
15
|
+
display: inline-block;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.dropdown > .dropdown-content[popover] {
|
|
19
|
+
display: none;
|
|
20
|
+
position: fixed;
|
|
21
|
+
inset-block-start: auto;
|
|
22
|
+
inset-block-end: max(0.5rem, env(safe-area-inset-bottom, 0px));
|
|
23
|
+
inset-inline-start: auto;
|
|
24
|
+
inset-inline-end: max(
|
|
25
|
+
0.5rem,
|
|
26
|
+
env(safe-area-inset-left, 0px),
|
|
27
|
+
env(safe-area-inset-right, 0px)
|
|
28
|
+
);
|
|
29
|
+
z-index: 50;
|
|
30
|
+
min-inline-size: 12rem;
|
|
31
|
+
max-inline-size: min(24rem, calc(100dvw - 1rem));
|
|
32
|
+
max-block-size: calc(100dvh - 1rem);
|
|
33
|
+
margin: 0;
|
|
34
|
+
padding: 0.5rem;
|
|
35
|
+
overflow: auto;
|
|
36
|
+
color: var(--color-on-surface);
|
|
37
|
+
background-color: var(--color-surface);
|
|
38
|
+
border: 1px solid var(--color-outline);
|
|
39
|
+
border-radius: var(--radius-sm);
|
|
40
|
+
box-shadow: var(--shadow-lg);
|
|
41
|
+
opacity: 0;
|
|
42
|
+
visibility: hidden;
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
transform: translateY(-0.5rem);
|
|
45
|
+
transition:
|
|
46
|
+
opacity 150ms ease-out,
|
|
47
|
+
transform 150ms ease-out,
|
|
48
|
+
overlay 150ms ease-out allow-discrete,
|
|
49
|
+
display 150ms ease-out allow-discrete;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.dropdown > .dropdown-content[popover]:popover-open {
|
|
53
|
+
display: block;
|
|
54
|
+
opacity: 1;
|
|
55
|
+
visibility: visible;
|
|
56
|
+
pointer-events: auto;
|
|
57
|
+
transform: translateY(0);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@starting-style {
|
|
61
|
+
.dropdown > .dropdown-content[popover]:popover-open {
|
|
62
|
+
opacity: 0;
|
|
63
|
+
transform: translateY(-0.5rem);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@supports (position-area: block-end) {
|
|
68
|
+
.dropdown > .dropdown-content[popover] {
|
|
69
|
+
inset: auto;
|
|
70
|
+
margin: 0.25rem;
|
|
71
|
+
position-area: block-end span-inline-end;
|
|
72
|
+
position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.dropdown.dropdown-block-start > .dropdown-content[popover] {
|
|
76
|
+
position-area: block-start span-inline-end;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.dropdown.dropdown-block-end > .dropdown-content[popover] {
|
|
80
|
+
position-area: block-end span-inline-end;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.dropdown.dropdown-inline-start > .dropdown-content[popover] {
|
|
84
|
+
position-area: inline-start span-block-end;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.dropdown.dropdown-inline-end > .dropdown-content[popover] {
|
|
88
|
+
position-area: inline-end span-block-end;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@media (prefers-reduced-motion: reduce) {
|
|
93
|
+
.dropdown > .dropdown-content[popover] {
|
|
94
|
+
transition: none;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
|
|
6
100
|
@layer components {
|
|
7
101
|
/* Navbar Base */
|
|
8
102
|
.navbar {
|
|
@@ -589,60 +683,6 @@
|
|
|
589
683
|
font-size: 1rem;
|
|
590
684
|
}
|
|
591
685
|
|
|
592
|
-
/* Dropdown */
|
|
593
|
-
.dropdown {
|
|
594
|
-
position: relative;
|
|
595
|
-
display: inline-block;
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
.dropdown-content {
|
|
599
|
-
position: absolute;
|
|
600
|
-
z-index: 50;
|
|
601
|
-
min-width: 12rem;
|
|
602
|
-
padding: 0.5rem;
|
|
603
|
-
background-color: var(--color-surface);
|
|
604
|
-
border: 1px solid var(--color-outline);
|
|
605
|
-
border-radius: var(--radius-sm);
|
|
606
|
-
box-shadow: var(--shadow-lg);
|
|
607
|
-
opacity: 0;
|
|
608
|
-
visibility: hidden;
|
|
609
|
-
transform: translateY(-0.5rem);
|
|
610
|
-
transition: all 150ms ease-in-out;
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
.dropdown:hover .dropdown-content,
|
|
614
|
-
.dropdown:focus-within .dropdown-content,
|
|
615
|
-
.dropdown.dropdown-open .dropdown-content {
|
|
616
|
-
opacity: 1;
|
|
617
|
-
visibility: visible;
|
|
618
|
-
transform: translateY(0);
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
/* Dropdown Positions */
|
|
622
|
-
.dropdown-end .dropdown-content {
|
|
623
|
-
right: 0;
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
.dropdown-top .dropdown-content {
|
|
627
|
-
bottom: 100%;
|
|
628
|
-
top: auto;
|
|
629
|
-
margin-bottom: 0.25rem;
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
.dropdown-left .dropdown-content {
|
|
633
|
-
right: 100%;
|
|
634
|
-
left: auto;
|
|
635
|
-
top: 0;
|
|
636
|
-
margin-right: 0.25rem;
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
.dropdown-right .dropdown-content {
|
|
640
|
-
left: 100%;
|
|
641
|
-
right: auto;
|
|
642
|
-
top: 0;
|
|
643
|
-
margin-left: 0.25rem;
|
|
644
|
-
}
|
|
645
|
-
|
|
646
686
|
/* Pagination */
|
|
647
687
|
.pagination {
|
|
648
688
|
display: flex;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Swap Component Styles
|
|
3
|
+
* Displays one of two non-interactive state indicators.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@layer components {
|
|
7
|
+
.swap {
|
|
8
|
+
position: relative;
|
|
9
|
+
display: inline-grid;
|
|
10
|
+
place-items: center;
|
|
11
|
+
vertical-align: middle;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
user-select: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.swap-input {
|
|
17
|
+
position: absolute;
|
|
18
|
+
inset: 0;
|
|
19
|
+
z-index: 1;
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
margin: 0;
|
|
23
|
+
opacity: 0;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.swap-on,
|
|
28
|
+
.swap-off {
|
|
29
|
+
grid-area: 1 / 1;
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
inline-size: max-content;
|
|
34
|
+
max-inline-size: 100%;
|
|
35
|
+
transition: opacity 150ms ease-out, transform 150ms ease-out;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.swap-on {
|
|
39
|
+
opacity: 0;
|
|
40
|
+
visibility: hidden;
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.swap-off {
|
|
45
|
+
opacity: 1;
|
|
46
|
+
visibility: visible;
|
|
47
|
+
pointer-events: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.swap-input:checked ~ .swap-on,
|
|
51
|
+
.swap[aria-pressed="true"] > .swap-on {
|
|
52
|
+
opacity: 1;
|
|
53
|
+
visibility: visible;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.swap-input:checked ~ .swap-off,
|
|
57
|
+
.swap[aria-pressed="true"] > .swap-off {
|
|
58
|
+
opacity: 0;
|
|
59
|
+
visibility: hidden;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.swap:focus-visible,
|
|
63
|
+
.swap:has(.swap-input:focus-visible) {
|
|
64
|
+
outline: none;
|
|
65
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 20%, transparent);
|
|
66
|
+
border-radius: var(--radius-sm);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.swap:disabled,
|
|
70
|
+
.swap:has(.swap-input:disabled) {
|
|
71
|
+
cursor: not-allowed;
|
|
72
|
+
opacity: 0.5;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.swap-input:disabled {
|
|
76
|
+
cursor: not-allowed;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.swap-rotate .swap-on {
|
|
80
|
+
transform: rotate(-90deg) scale(0.8);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.swap-rotate .swap-off {
|
|
84
|
+
transform: rotate(0deg) scale(1);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.swap-rotate .swap-input:checked ~ .swap-on,
|
|
88
|
+
.swap-rotate[aria-pressed="true"] > .swap-on {
|
|
89
|
+
transform: rotate(0deg) scale(1);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.swap-rotate .swap-input:checked ~ .swap-off,
|
|
93
|
+
.swap-rotate[aria-pressed="true"] > .swap-off {
|
|
94
|
+
transform: rotate(90deg) scale(0.8);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Presentation-only override. It intentionally wins over semantic state. */
|
|
98
|
+
.swap.swap-active > .swap-on {
|
|
99
|
+
opacity: 1;
|
|
100
|
+
visibility: visible;
|
|
101
|
+
transform: rotate(0deg) scale(1);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.swap.swap-active > .swap-off {
|
|
105
|
+
opacity: 0;
|
|
106
|
+
visibility: hidden;
|
|
107
|
+
transform: rotate(90deg) scale(0.8);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@media (prefers-reduced-motion: reduce) {
|
|
111
|
+
.swap-on,
|
|
112
|
+
.swap-off {
|
|
113
|
+
transition: none;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -12,9 +12,10 @@ export const css = `/**
|
|
|
12
12
|
margin: auto;
|
|
13
13
|
padding: 0;
|
|
14
14
|
border: none;
|
|
15
|
-
width: 100
|
|
15
|
+
width: calc(100% - 2rem);
|
|
16
16
|
max-width: 28rem;
|
|
17
|
-
max-height: calc(
|
|
17
|
+
max-height: calc(100dvh - 2rem);
|
|
18
|
+
box-sizing: border-box;
|
|
18
19
|
background-color: var(--color-surface);
|
|
19
20
|
color: var(--color-on-surface);
|
|
20
21
|
border-radius: var(--radius-2xl);
|
|
@@ -31,7 +32,7 @@ export const css = `/**
|
|
|
31
32
|
.dialog-box {
|
|
32
33
|
display: flex;
|
|
33
34
|
flex-direction: column;
|
|
34
|
-
max-height: calc(
|
|
35
|
+
max-height: calc(100dvh - 2rem);
|
|
35
36
|
overflow: hidden;
|
|
36
37
|
}
|
|
37
38
|
|
|
@@ -90,6 +91,7 @@ export const css = `/**
|
|
|
90
91
|
/* Dialog Footer */
|
|
91
92
|
.dialog-footer {
|
|
92
93
|
display: flex;
|
|
94
|
+
flex-wrap: wrap;
|
|
93
95
|
justify-content: flex-end;
|
|
94
96
|
gap: 0.5rem;
|
|
95
97
|
padding: 1rem 1.5rem 1.5rem;
|
|
@@ -129,6 +131,30 @@ export const css = `/**
|
|
|
129
131
|
margin: 0;
|
|
130
132
|
}
|
|
131
133
|
|
|
134
|
+
@media (max-width: 640px) {
|
|
135
|
+
dialog.dialog {
|
|
136
|
+
width: calc(100% - 1rem);
|
|
137
|
+
max-height: calc(100dvh - 1rem);
|
|
138
|
+
border-radius: var(--radius-lg);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.dialog-box {
|
|
142
|
+
max-height: calc(100dvh - 1rem);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.dialog-header {
|
|
146
|
+
padding: 1rem 1rem 0;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.dialog-body {
|
|
150
|
+
padding: 1rem;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.dialog-footer {
|
|
154
|
+
padding: 0.75rem 1rem 1rem;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
132
158
|
dialog.dialog.dialog-fullscreen .dialog-box {
|
|
133
159
|
max-height: 100%;
|
|
134
160
|
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// Auto-generated from dropdown.css
|
|
2
|
+
export const css = `/**
|
|
3
|
+
* Dropdown Component Styles
|
|
4
|
+
* Native Popover disclosure with logical CSS anchor positioning.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
@layer components {
|
|
8
|
+
.dropdown {
|
|
9
|
+
position: relative;
|
|
10
|
+
display: inline-block;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.dropdown > .dropdown-content[popover] {
|
|
14
|
+
display: none;
|
|
15
|
+
position: fixed;
|
|
16
|
+
inset-block-start: auto;
|
|
17
|
+
inset-block-end: max(0.5rem, env(safe-area-inset-bottom, 0px));
|
|
18
|
+
inset-inline-start: auto;
|
|
19
|
+
inset-inline-end: max(
|
|
20
|
+
0.5rem,
|
|
21
|
+
env(safe-area-inset-left, 0px),
|
|
22
|
+
env(safe-area-inset-right, 0px)
|
|
23
|
+
);
|
|
24
|
+
z-index: 50;
|
|
25
|
+
min-inline-size: 12rem;
|
|
26
|
+
max-inline-size: min(24rem, calc(100dvw - 1rem));
|
|
27
|
+
max-block-size: calc(100dvh - 1rem);
|
|
28
|
+
margin: 0;
|
|
29
|
+
padding: 0.5rem;
|
|
30
|
+
overflow: auto;
|
|
31
|
+
color: var(--color-on-surface);
|
|
32
|
+
background-color: var(--color-surface);
|
|
33
|
+
border: 1px solid var(--color-outline);
|
|
34
|
+
border-radius: var(--radius-sm);
|
|
35
|
+
box-shadow: var(--shadow-lg);
|
|
36
|
+
opacity: 0;
|
|
37
|
+
visibility: hidden;
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
transform: translateY(-0.5rem);
|
|
40
|
+
transition:
|
|
41
|
+
opacity 150ms ease-out,
|
|
42
|
+
transform 150ms ease-out,
|
|
43
|
+
overlay 150ms ease-out allow-discrete,
|
|
44
|
+
display 150ms ease-out allow-discrete;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.dropdown > .dropdown-content[popover]:popover-open {
|
|
48
|
+
display: block;
|
|
49
|
+
opacity: 1;
|
|
50
|
+
visibility: visible;
|
|
51
|
+
pointer-events: auto;
|
|
52
|
+
transform: translateY(0);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@starting-style {
|
|
56
|
+
.dropdown > .dropdown-content[popover]:popover-open {
|
|
57
|
+
opacity: 0;
|
|
58
|
+
transform: translateY(-0.5rem);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@supports (position-area: block-end) {
|
|
63
|
+
.dropdown > .dropdown-content[popover] {
|
|
64
|
+
inset: auto;
|
|
65
|
+
margin: 0.25rem;
|
|
66
|
+
position-area: block-end span-inline-end;
|
|
67
|
+
position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.dropdown.dropdown-block-start > .dropdown-content[popover] {
|
|
71
|
+
position-area: block-start span-inline-end;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.dropdown.dropdown-block-end > .dropdown-content[popover] {
|
|
75
|
+
position-area: block-end span-inline-end;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.dropdown.dropdown-inline-start > .dropdown-content[popover] {
|
|
79
|
+
position-area: inline-start span-block-end;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.dropdown.dropdown-inline-end > .dropdown-content[popover] {
|
|
83
|
+
position-area: inline-end span-block-end;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@media (prefers-reduced-motion: reduce) {
|
|
88
|
+
.dropdown > .dropdown-content[popover] {
|
|
89
|
+
transition: none;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
`;
|
|
94
|
+
|
|
95
|
+
const sheet = typeof CSSStyleSheet !== 'undefined' ? new CSSStyleSheet() : null;
|
|
96
|
+
if (sheet) {
|
|
97
|
+
sheet.replaceSync(css);
|
|
98
|
+
}
|
|
99
|
+
export const styles = sheet;
|
|
100
|
+
export default sheet;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
// Auto-generated from fab.css
|
|
2
|
+
export const css = `/**
|
|
3
|
+
* FAB / Speed Dial Component Styles
|
|
4
|
+
*
|
|
5
|
+
* FAB owns viewport placement and action layout. Pair its trigger and actions
|
|
6
|
+
* with Button classes for color, interaction, and disabled states.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
@layer components {
|
|
10
|
+
.fab {
|
|
11
|
+
--fab-offset-block: 1rem;
|
|
12
|
+
--fab-offset-inline: 1rem;
|
|
13
|
+
--fab-gap: 0.75rem;
|
|
14
|
+
--fab-size: 3.5rem;
|
|
15
|
+
|
|
16
|
+
position: fixed;
|
|
17
|
+
inset-block-end: calc(var(--fab-offset-block) + env(safe-area-inset-bottom, 0px));
|
|
18
|
+
inset-inline-end: calc(var(--fab-offset-inline) + env(safe-area-inset-right, 0px));
|
|
19
|
+
z-index: 40;
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
flex-direction: column-reverse;
|
|
22
|
+
align-items: flex-end;
|
|
23
|
+
gap: var(--fab-gap);
|
|
24
|
+
max-inline-size: calc(100dvw - 2 * var(--fab-offset-inline));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.fab-start {
|
|
28
|
+
inset-inline-start: calc(var(--fab-offset-inline) + env(safe-area-inset-left, 0px));
|
|
29
|
+
inset-inline-end: auto;
|
|
30
|
+
align-items: flex-start;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.fab-contained {
|
|
34
|
+
position: absolute;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.fab-speed-dial {
|
|
38
|
+
flex-direction: column-reverse;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.fab-trigger {
|
|
42
|
+
min-inline-size: var(--fab-size);
|
|
43
|
+
min-block-size: var(--fab-size);
|
|
44
|
+
padding: 0.875rem;
|
|
45
|
+
border-radius: var(--radius-lg);
|
|
46
|
+
box-shadow: var(--shadow-lg);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.fab-trigger:not(.fab-extended) {
|
|
50
|
+
inline-size: var(--fab-size);
|
|
51
|
+
block-size: var(--fab-size);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.fab-extended {
|
|
55
|
+
inline-size: auto;
|
|
56
|
+
max-inline-size: 100%;
|
|
57
|
+
min-block-size: var(--fab-size);
|
|
58
|
+
padding-inline: 1.25rem;
|
|
59
|
+
border-radius: var(--radius-lg);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.fab-actions {
|
|
63
|
+
align-items: flex-end;
|
|
64
|
+
flex-direction: column-reverse;
|
|
65
|
+
gap: var(--fab-gap);
|
|
66
|
+
max-inline-size: min(22rem, calc(100dvw - 2rem));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.fab-start .fab-actions {
|
|
70
|
+
align-items: flex-start;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Controlled mode: application code owns .fab-open and all ARIA state. */
|
|
74
|
+
.fab-controlled > .fab-actions:not([popover]) {
|
|
75
|
+
display: none;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.fab-controlled.fab-open > .fab-actions:not([popover]) {
|
|
79
|
+
display: flex;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* Native mode: the browser's popover state is the sole authority. */
|
|
83
|
+
.fab-actions[popover] {
|
|
84
|
+
display: none;
|
|
85
|
+
position: fixed;
|
|
86
|
+
inset-block-start: auto;
|
|
87
|
+
inset-block-end: calc(
|
|
88
|
+
var(--fab-offset-block, 1rem) + env(safe-area-inset-bottom, 0px) +
|
|
89
|
+
var(--fab-size, 3.5rem) + var(--fab-gap, 0.75rem)
|
|
90
|
+
);
|
|
91
|
+
inset-inline-start: auto;
|
|
92
|
+
inset-inline-end: calc(var(--fab-offset-inline, 1rem) + env(safe-area-inset-right, 0px));
|
|
93
|
+
margin: 0;
|
|
94
|
+
padding: 0;
|
|
95
|
+
border: 0;
|
|
96
|
+
overflow: visible;
|
|
97
|
+
color: inherit;
|
|
98
|
+
background: transparent;
|
|
99
|
+
opacity: 0;
|
|
100
|
+
visibility: hidden;
|
|
101
|
+
pointer-events: none;
|
|
102
|
+
transform: translateY(0.5rem);
|
|
103
|
+
transition:
|
|
104
|
+
opacity 150ms ease-out,
|
|
105
|
+
transform 150ms ease-out,
|
|
106
|
+
overlay 150ms ease-out allow-discrete,
|
|
107
|
+
display 150ms ease-out allow-discrete;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.fab-start > .fab-actions[popover] {
|
|
111
|
+
inset-inline-start: calc(var(--fab-offset-inline, 1rem) + env(safe-area-inset-left, 0px));
|
|
112
|
+
inset-inline-end: auto;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.fab-actions[popover]:popover-open {
|
|
116
|
+
display: flex;
|
|
117
|
+
opacity: 1;
|
|
118
|
+
visibility: visible;
|
|
119
|
+
pointer-events: auto;
|
|
120
|
+
transform: translateY(0);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@starting-style {
|
|
124
|
+
.fab-actions[popover]:popover-open {
|
|
125
|
+
opacity: 0;
|
|
126
|
+
transform: translateY(0.5rem);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@supports (position-area: top) {
|
|
131
|
+
.fab-actions[popover] {
|
|
132
|
+
inset: auto;
|
|
133
|
+
margin: var(--fab-gap, 0.75rem);
|
|
134
|
+
position-area: top span-left;
|
|
135
|
+
position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.fab-start > .fab-actions[popover] {
|
|
139
|
+
inset: auto;
|
|
140
|
+
position-area: top span-right;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.fab-action {
|
|
145
|
+
display: inline-flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
justify-content: flex-end;
|
|
148
|
+
gap: 0.5rem;
|
|
149
|
+
max-inline-size: 100%;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.fab-start .fab-action {
|
|
153
|
+
flex-direction: row-reverse;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.fab-label {
|
|
157
|
+
max-inline-size: min(16rem, calc(100dvw - 6rem));
|
|
158
|
+
padding: 0.375rem 0.625rem;
|
|
159
|
+
overflow-wrap: anywhere;
|
|
160
|
+
color: var(--color-on-surface);
|
|
161
|
+
background-color: var(--color-surface-container-high);
|
|
162
|
+
border: 1px solid var(--color-outline-variant);
|
|
163
|
+
border-radius: var(--radius-sm);
|
|
164
|
+
box-shadow: var(--shadow-sm);
|
|
165
|
+
font-size: 0.8125rem;
|
|
166
|
+
font-weight: 500;
|
|
167
|
+
line-height: 1.125rem;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@media (max-width: 30rem) {
|
|
171
|
+
.fab {
|
|
172
|
+
--fab-offset-block: 0.75rem;
|
|
173
|
+
--fab-offset-inline: 0.75rem;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@media (prefers-reduced-motion: reduce) {
|
|
178
|
+
.fab-actions[popover] {
|
|
179
|
+
transition: none;
|
|
180
|
+
transform: none;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
`;
|
|
185
|
+
|
|
186
|
+
const sheet = typeof CSSStyleSheet !== 'undefined' ? new CSSStyleSheet() : null;
|
|
187
|
+
if (sheet) {
|
|
188
|
+
sheet.replaceSync(css);
|
|
189
|
+
}
|
|
190
|
+
export const styles = sheet;
|
|
191
|
+
export default sheet;
|
|
@@ -31,7 +31,7 @@ export const css = `/**
|
|
|
31
31
|
position: relative;
|
|
32
32
|
z-index: 1;
|
|
33
33
|
max-width: 32rem;
|
|
34
|
-
max-height: calc(
|
|
34
|
+
max-height: calc(100dvh - 5rem);
|
|
35
35
|
padding: 1.5rem;
|
|
36
36
|
background-color: var(--color-surface);
|
|
37
37
|
color: var(--color-on-surface);
|
|
@@ -66,6 +66,7 @@ export const css = `/**
|
|
|
66
66
|
.modal-action,
|
|
67
67
|
.modal-footer {
|
|
68
68
|
display: flex;
|
|
69
|
+
flex-wrap: wrap;
|
|
69
70
|
justify-content: flex-end;
|
|
70
71
|
gap: 0.5rem;
|
|
71
72
|
margin-top: 1.5rem;
|
|
@@ -239,7 +240,7 @@ export const css = `/**
|
|
|
239
240
|
|
|
240
241
|
.modal-responsive .modal-box {
|
|
241
242
|
max-width: 100%;
|
|
242
|
-
max-height:
|
|
243
|
+
max-height: 90dvh;
|
|
243
244
|
margin: 0;
|
|
244
245
|
border-radius: var(--radius-lg) var(--radius-lg) 0 0;
|
|
245
246
|
}
|
|
@@ -254,7 +255,7 @@ export const css = `/**
|
|
|
254
255
|
|
|
255
256
|
.drawer-modal .modal-box {
|
|
256
257
|
max-width: 20rem;
|
|
257
|
-
max-height:
|
|
258
|
+
max-height: 100dvh;
|
|
258
259
|
height: 100%;
|
|
259
260
|
margin: 0;
|
|
260
261
|
border-radius: 0;
|