@thalassic/themes 22.15.2 → 22.15.3
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/package.json
CHANGED
|
@@ -31,6 +31,36 @@
|
|
|
31
31
|
padding-bottom: var(--spacing-2);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
&__day-period {
|
|
35
|
+
position: relative;
|
|
36
|
+
|
|
37
|
+
min-width: var(--spacing-11);
|
|
38
|
+
|
|
39
|
+
margin-inline-start: var(--spacing-2);
|
|
40
|
+
padding: var(--spacing-1) var(--spacing-2);
|
|
41
|
+
|
|
42
|
+
border: none;
|
|
43
|
+
border-radius: var(--radius-2xl);
|
|
44
|
+
|
|
45
|
+
background-color: var(--color-surface-container-high);
|
|
46
|
+
|
|
47
|
+
font-size: var(--font-label-large-size);
|
|
48
|
+
font-weight: var(--font-weight-medium);
|
|
49
|
+
color: var(--color-on-surface);
|
|
50
|
+
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
|
|
53
|
+
@include mixins.touch-target(var(--spacing-7));
|
|
54
|
+
|
|
55
|
+
&:hover {
|
|
56
|
+
background-color: var(--color-surface-container-highest);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:focus-visible {
|
|
60
|
+
@include mixins.focus-ring;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
34
64
|
&__arrow {
|
|
35
65
|
display: flex;
|
|
36
66
|
align-items: center;
|
|
@@ -10,12 +10,18 @@
|
|
|
10
10
|
--tls-dialog-border-radius: var(--radius-xl);
|
|
11
11
|
--tls-dialog-shadow: var(--shadow-lg);
|
|
12
12
|
--tls-dialog-padding: var(--spacing-6);
|
|
13
|
+
// Glyph size, distinct from the button's hit area below.
|
|
13
14
|
--tls-dialog-close-size: 16px;
|
|
15
|
+
--tls-dialog-close-button-size: var(--control-height-sm);
|
|
14
16
|
--tls-dialog-close-padding: var(--spacing-4);
|
|
15
17
|
|
|
16
18
|
position: relative;
|
|
17
19
|
|
|
18
20
|
width: var(--tls-dialog-width);
|
|
21
|
+
// Never taller than the visible viewport, so a long dialog scrolls in its
|
|
22
|
+
// body rather than running off screen. `dvh` tracks mobile browser chrome as
|
|
23
|
+
// it collapses, which is what an overlay pinned to the visible area wants.
|
|
24
|
+
max-height: calc(100dvh - var(--spacing-12));
|
|
19
25
|
|
|
20
26
|
display: flex;
|
|
21
27
|
flex-direction: column;
|
|
@@ -27,41 +33,65 @@
|
|
|
27
33
|
color: var(--tls-dialog-color);
|
|
28
34
|
box-shadow: var(--tls-dialog-shadow);
|
|
29
35
|
|
|
36
|
+
// The portal inserts the consumer's content component as the dialog's only
|
|
37
|
+
// content child, so that host — not the header/body/footer inside it — is
|
|
38
|
+
// this flex column's item. Make it a flex column in turn, or the body cannot
|
|
39
|
+
// claim the leftover height and never scrolls. A type selector is unavoidable
|
|
40
|
+
// here: the element belongs to the consumer, so it carries no class of ours.
|
|
41
|
+
> *:not(.tls-dialog__close) {
|
|
42
|
+
min-height: 0;
|
|
43
|
+
|
|
44
|
+
display: flex;
|
|
45
|
+
flex: 1;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
}
|
|
48
|
+
|
|
30
49
|
&__close {
|
|
31
50
|
position: absolute;
|
|
32
51
|
top: var(--tls-dialog-close-padding);
|
|
33
52
|
inset-inline-end: var(--tls-dialog-close-padding);
|
|
34
53
|
z-index: 1;
|
|
35
54
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
transition: color var(--motion-fast) var(--motion-ease-in-out);
|
|
55
|
+
// Closing is a neutral affordance, not a themed action, so it must not
|
|
56
|
+
// inherit whatever default color an app configures for buttons. The text
|
|
57
|
+
// variant derives its rest, hover and active treatment from this one
|
|
58
|
+
// property, so overriding it recolors all three.
|
|
59
|
+
//
|
|
60
|
+
// It is set on the inner control rather than the host because that is
|
|
61
|
+
// where `.tls-button--<color>` lands; matching that selector's specificity
|
|
62
|
+
// is enough only because `dialog` is forwarded after `button` in
|
|
63
|
+
// `components/index.scss` — keep that order.
|
|
64
|
+
.tls-button {
|
|
65
|
+
--tls-button-color: var(--color-outline);
|
|
66
|
+
}
|
|
49
67
|
|
|
50
|
-
&:hover {
|
|
51
|
-
color: var(--color-on-surface);
|
|
68
|
+
&:hover .tls-button {
|
|
69
|
+
--tls-button-color: var(--color-on-surface);
|
|
52
70
|
}
|
|
53
71
|
|
|
54
72
|
.tls-icon {
|
|
55
|
-
width:
|
|
56
|
-
height:
|
|
73
|
+
width: var(--tls-dialog-close-size);
|
|
74
|
+
height: var(--tls-dialog-close-size);
|
|
57
75
|
}
|
|
58
76
|
}
|
|
59
77
|
|
|
60
78
|
&__header {
|
|
61
|
-
|
|
79
|
+
// The close button is absolutely positioned over this corner, so the
|
|
80
|
+
// header reserves its inset plus its width plus a gutter, keeping a long
|
|
81
|
+
// title clear of it.
|
|
82
|
+
padding: var(--tls-dialog-padding)
|
|
83
|
+
calc(
|
|
84
|
+
var(--tls-dialog-close-padding) + var(--tls-dialog-close-button-size) +
|
|
85
|
+
var(--spacing-2)
|
|
86
|
+
)
|
|
87
|
+
0 var(--tls-dialog-padding);
|
|
88
|
+
|
|
89
|
+
display: block;
|
|
62
90
|
}
|
|
63
91
|
|
|
64
92
|
&__title {
|
|
93
|
+
display: block;
|
|
94
|
+
|
|
65
95
|
font-size: var(--font-title-large-size);
|
|
66
96
|
font-weight: var(--font-weight-medium);
|
|
67
97
|
line-height: var(--font-title-large-line-height);
|
|
@@ -69,8 +99,16 @@
|
|
|
69
99
|
}
|
|
70
100
|
|
|
71
101
|
&__body {
|
|
72
|
-
|
|
102
|
+
// `min-height: 0` lets the body shrink below its content so `overflow-y`
|
|
103
|
+
// actually engages; without it a flex item floors at its content height
|
|
104
|
+
// and the dialog grows past the viewport instead of scrolling.
|
|
105
|
+
min-height: 0;
|
|
106
|
+
|
|
73
107
|
padding: var(--spacing-4) var(--tls-dialog-padding);
|
|
108
|
+
|
|
109
|
+
display: block;
|
|
110
|
+
flex: 1;
|
|
111
|
+
|
|
74
112
|
overflow-y: auto;
|
|
75
113
|
}
|
|
76
114
|
|
|
@@ -79,7 +117,22 @@
|
|
|
79
117
|
|
|
80
118
|
display: flex;
|
|
81
119
|
align-items: center;
|
|
82
|
-
justify-content: flex-end;
|
|
83
120
|
gap: var(--spacing-3);
|
|
121
|
+
|
|
122
|
+
&--start {
|
|
123
|
+
justify-content: flex-start;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&--center {
|
|
127
|
+
justify-content: center;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&--end {
|
|
131
|
+
justify-content: flex-end;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&--space-between {
|
|
135
|
+
justify-content: space-between;
|
|
136
|
+
}
|
|
84
137
|
}
|
|
85
138
|
}
|