@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
package/README.md
CHANGED
|
@@ -11,9 +11,10 @@
|
|
|
11
11
|
margin: auto;
|
|
12
12
|
padding: 0;
|
|
13
13
|
border: none;
|
|
14
|
-
width: 100
|
|
14
|
+
width: calc(100% - 2rem);
|
|
15
15
|
max-width: 28rem;
|
|
16
|
-
max-height: calc(
|
|
16
|
+
max-height: calc(100dvh - 2rem);
|
|
17
|
+
box-sizing: border-box;
|
|
17
18
|
background-color: var(--color-surface);
|
|
18
19
|
color: var(--color-on-surface);
|
|
19
20
|
border-radius: var(--radius-2xl);
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
.dialog-box {
|
|
31
32
|
display: flex;
|
|
32
33
|
flex-direction: column;
|
|
33
|
-
max-height: calc(
|
|
34
|
+
max-height: calc(100dvh - 2rem);
|
|
34
35
|
overflow: hidden;
|
|
35
36
|
}
|
|
36
37
|
|
|
@@ -89,6 +90,7 @@
|
|
|
89
90
|
/* Dialog Footer */
|
|
90
91
|
.dialog-footer {
|
|
91
92
|
display: flex;
|
|
93
|
+
flex-wrap: wrap;
|
|
92
94
|
justify-content: flex-end;
|
|
93
95
|
gap: 0.5rem;
|
|
94
96
|
padding: 1rem 1.5rem 1.5rem;
|
|
@@ -128,6 +130,30 @@
|
|
|
128
130
|
margin: 0;
|
|
129
131
|
}
|
|
130
132
|
|
|
133
|
+
@media (max-width: 640px) {
|
|
134
|
+
dialog.dialog {
|
|
135
|
+
width: calc(100% - 1rem);
|
|
136
|
+
max-height: calc(100dvh - 1rem);
|
|
137
|
+
border-radius: var(--radius-lg);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.dialog-box {
|
|
141
|
+
max-height: calc(100dvh - 1rem);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.dialog-header {
|
|
145
|
+
padding: 1rem 1rem 0;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.dialog-body {
|
|
149
|
+
padding: 1rem;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.dialog-footer {
|
|
153
|
+
padding: 0.75rem 1rem 1rem;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
131
157
|
dialog.dialog.dialog-fullscreen .dialog-box {
|
|
132
158
|
max-height: 100%;
|
|
133
159
|
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dropdown Component Styles
|
|
3
|
+
* Native Popover disclosure with logical CSS anchor positioning.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@layer components {
|
|
7
|
+
.dropdown {
|
|
8
|
+
position: relative;
|
|
9
|
+
display: inline-block;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.dropdown > .dropdown-content[popover] {
|
|
13
|
+
display: none;
|
|
14
|
+
position: fixed;
|
|
15
|
+
inset-block-start: auto;
|
|
16
|
+
inset-block-end: max(0.5rem, env(safe-area-inset-bottom, 0px));
|
|
17
|
+
inset-inline-start: auto;
|
|
18
|
+
inset-inline-end: max(
|
|
19
|
+
0.5rem,
|
|
20
|
+
env(safe-area-inset-left, 0px),
|
|
21
|
+
env(safe-area-inset-right, 0px)
|
|
22
|
+
);
|
|
23
|
+
z-index: 50;
|
|
24
|
+
min-inline-size: 12rem;
|
|
25
|
+
max-inline-size: min(24rem, calc(100dvw - 1rem));
|
|
26
|
+
max-block-size: calc(100dvh - 1rem);
|
|
27
|
+
margin: 0;
|
|
28
|
+
padding: 0.5rem;
|
|
29
|
+
overflow: auto;
|
|
30
|
+
color: var(--color-on-surface);
|
|
31
|
+
background-color: var(--color-surface);
|
|
32
|
+
border: 1px solid var(--color-outline);
|
|
33
|
+
border-radius: var(--radius-sm);
|
|
34
|
+
box-shadow: var(--shadow-lg);
|
|
35
|
+
opacity: 0;
|
|
36
|
+
visibility: hidden;
|
|
37
|
+
pointer-events: none;
|
|
38
|
+
transform: translateY(-0.5rem);
|
|
39
|
+
transition:
|
|
40
|
+
opacity 150ms ease-out,
|
|
41
|
+
transform 150ms ease-out,
|
|
42
|
+
overlay 150ms ease-out allow-discrete,
|
|
43
|
+
display 150ms ease-out allow-discrete;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.dropdown > .dropdown-content[popover]:popover-open {
|
|
47
|
+
display: block;
|
|
48
|
+
opacity: 1;
|
|
49
|
+
visibility: visible;
|
|
50
|
+
pointer-events: auto;
|
|
51
|
+
transform: translateY(0);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@starting-style {
|
|
55
|
+
.dropdown > .dropdown-content[popover]:popover-open {
|
|
56
|
+
opacity: 0;
|
|
57
|
+
transform: translateY(-0.5rem);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@supports (position-area: block-end) {
|
|
62
|
+
.dropdown > .dropdown-content[popover] {
|
|
63
|
+
inset: auto;
|
|
64
|
+
margin: 0.25rem;
|
|
65
|
+
position-area: block-end span-inline-end;
|
|
66
|
+
position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.dropdown.dropdown-block-start > .dropdown-content[popover] {
|
|
70
|
+
position-area: block-start span-inline-end;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.dropdown.dropdown-block-end > .dropdown-content[popover] {
|
|
74
|
+
position-area: block-end span-inline-end;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.dropdown.dropdown-inline-start > .dropdown-content[popover] {
|
|
78
|
+
position-area: inline-start span-block-end;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.dropdown.dropdown-inline-end > .dropdown-content[popover] {
|
|
82
|
+
position-area: inline-end span-block-end;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@media (prefers-reduced-motion: reduce) {
|
|
87
|
+
.dropdown > .dropdown-content[popover] {
|
|
88
|
+
transition: none;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FAB / Speed Dial Component Styles
|
|
3
|
+
*
|
|
4
|
+
* FAB owns viewport placement and action layout. Pair its trigger and actions
|
|
5
|
+
* with Button classes for color, interaction, and disabled states.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@layer components {
|
|
9
|
+
.fab {
|
|
10
|
+
--fab-offset-block: 1rem;
|
|
11
|
+
--fab-offset-inline: 1rem;
|
|
12
|
+
--fab-gap: 0.75rem;
|
|
13
|
+
--fab-size: 3.5rem;
|
|
14
|
+
|
|
15
|
+
position: fixed;
|
|
16
|
+
inset-block-end: calc(var(--fab-offset-block) + env(safe-area-inset-bottom, 0px));
|
|
17
|
+
inset-inline-end: calc(var(--fab-offset-inline) + env(safe-area-inset-right, 0px));
|
|
18
|
+
z-index: 40;
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
flex-direction: column-reverse;
|
|
21
|
+
align-items: flex-end;
|
|
22
|
+
gap: var(--fab-gap);
|
|
23
|
+
max-inline-size: calc(100dvw - 2 * var(--fab-offset-inline));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.fab-start {
|
|
27
|
+
inset-inline-start: calc(var(--fab-offset-inline) + env(safe-area-inset-left, 0px));
|
|
28
|
+
inset-inline-end: auto;
|
|
29
|
+
align-items: flex-start;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.fab-contained {
|
|
33
|
+
position: absolute;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.fab-speed-dial {
|
|
37
|
+
flex-direction: column-reverse;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.fab-trigger {
|
|
41
|
+
min-inline-size: var(--fab-size);
|
|
42
|
+
min-block-size: var(--fab-size);
|
|
43
|
+
padding: 0.875rem;
|
|
44
|
+
border-radius: var(--radius-lg);
|
|
45
|
+
box-shadow: var(--shadow-lg);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.fab-trigger:not(.fab-extended) {
|
|
49
|
+
inline-size: var(--fab-size);
|
|
50
|
+
block-size: var(--fab-size);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.fab-extended {
|
|
54
|
+
inline-size: auto;
|
|
55
|
+
max-inline-size: 100%;
|
|
56
|
+
min-block-size: var(--fab-size);
|
|
57
|
+
padding-inline: 1.25rem;
|
|
58
|
+
border-radius: var(--radius-lg);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.fab-actions {
|
|
62
|
+
align-items: flex-end;
|
|
63
|
+
flex-direction: column-reverse;
|
|
64
|
+
gap: var(--fab-gap);
|
|
65
|
+
max-inline-size: min(22rem, calc(100dvw - 2rem));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.fab-start .fab-actions {
|
|
69
|
+
align-items: flex-start;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Controlled mode: application code owns .fab-open and all ARIA state. */
|
|
73
|
+
.fab-controlled > .fab-actions:not([popover]) {
|
|
74
|
+
display: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.fab-controlled.fab-open > .fab-actions:not([popover]) {
|
|
78
|
+
display: flex;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Native mode: the browser's popover state is the sole authority. */
|
|
82
|
+
.fab-actions[popover] {
|
|
83
|
+
display: none;
|
|
84
|
+
position: fixed;
|
|
85
|
+
inset-block-start: auto;
|
|
86
|
+
inset-block-end: calc(
|
|
87
|
+
var(--fab-offset-block, 1rem) + env(safe-area-inset-bottom, 0px) +
|
|
88
|
+
var(--fab-size, 3.5rem) + var(--fab-gap, 0.75rem)
|
|
89
|
+
);
|
|
90
|
+
inset-inline-start: auto;
|
|
91
|
+
inset-inline-end: calc(var(--fab-offset-inline, 1rem) + env(safe-area-inset-right, 0px));
|
|
92
|
+
margin: 0;
|
|
93
|
+
padding: 0;
|
|
94
|
+
border: 0;
|
|
95
|
+
overflow: visible;
|
|
96
|
+
color: inherit;
|
|
97
|
+
background: transparent;
|
|
98
|
+
opacity: 0;
|
|
99
|
+
visibility: hidden;
|
|
100
|
+
pointer-events: none;
|
|
101
|
+
transform: translateY(0.5rem);
|
|
102
|
+
transition:
|
|
103
|
+
opacity 150ms ease-out,
|
|
104
|
+
transform 150ms ease-out,
|
|
105
|
+
overlay 150ms ease-out allow-discrete,
|
|
106
|
+
display 150ms ease-out allow-discrete;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.fab-start > .fab-actions[popover] {
|
|
110
|
+
inset-inline-start: calc(var(--fab-offset-inline, 1rem) + env(safe-area-inset-left, 0px));
|
|
111
|
+
inset-inline-end: auto;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.fab-actions[popover]:popover-open {
|
|
115
|
+
display: flex;
|
|
116
|
+
opacity: 1;
|
|
117
|
+
visibility: visible;
|
|
118
|
+
pointer-events: auto;
|
|
119
|
+
transform: translateY(0);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@starting-style {
|
|
123
|
+
.fab-actions[popover]:popover-open {
|
|
124
|
+
opacity: 0;
|
|
125
|
+
transform: translateY(0.5rem);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@supports (position-area: top) {
|
|
130
|
+
.fab-actions[popover] {
|
|
131
|
+
inset: auto;
|
|
132
|
+
margin: var(--fab-gap, 0.75rem);
|
|
133
|
+
position-area: top span-left;
|
|
134
|
+
position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.fab-start > .fab-actions[popover] {
|
|
138
|
+
inset: auto;
|
|
139
|
+
position-area: top span-right;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.fab-action {
|
|
144
|
+
display: inline-flex;
|
|
145
|
+
align-items: center;
|
|
146
|
+
justify-content: flex-end;
|
|
147
|
+
gap: 0.5rem;
|
|
148
|
+
max-inline-size: 100%;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.fab-start .fab-action {
|
|
152
|
+
flex-direction: row-reverse;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.fab-label {
|
|
156
|
+
max-inline-size: min(16rem, calc(100dvw - 6rem));
|
|
157
|
+
padding: 0.375rem 0.625rem;
|
|
158
|
+
overflow-wrap: anywhere;
|
|
159
|
+
color: var(--color-on-surface);
|
|
160
|
+
background-color: var(--color-surface-container-high);
|
|
161
|
+
border: 1px solid var(--color-outline-variant);
|
|
162
|
+
border-radius: var(--radius-sm);
|
|
163
|
+
box-shadow: var(--shadow-sm);
|
|
164
|
+
font-size: 0.8125rem;
|
|
165
|
+
font-weight: 500;
|
|
166
|
+
line-height: 1.125rem;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@media (max-width: 30rem) {
|
|
170
|
+
.fab {
|
|
171
|
+
--fab-offset-block: 0.75rem;
|
|
172
|
+
--fab-offset-inline: 0.75rem;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@media (prefers-reduced-motion: reduce) {
|
|
177
|
+
.fab-actions[popover] {
|
|
178
|
+
transition: none;
|
|
179
|
+
transform: none;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|