@digiko-npm/designsystem 0.7.2 → 0.8.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/designsystem.css +6682 -4515
- package/dist/designsystem.min.css +2 -2
- package/package.json +18 -3
- package/src/components/accordion.css +129 -128
- package/src/components/alert.css +137 -134
- package/src/components/avatar.css +77 -77
- package/src/components/badge.css +52 -52
- package/src/components/bottom-nav.css +71 -71
- package/src/components/bottom-sheet.css +146 -0
- package/src/components/breadcrumb.css +61 -61
- package/src/components/button.css +162 -154
- package/src/components/card.css +94 -72
- package/src/components/chip.css +38 -38
- package/src/components/collapsible.css +96 -100
- package/src/components/color-picker.css +82 -0
- package/src/components/combobox.css +418 -0
- package/src/components/command.css +141 -140
- package/src/components/copy-button.css +106 -0
- package/src/components/datepicker.css +257 -251
- package/src/components/description-list.css +89 -87
- package/src/components/divider.css +45 -45
- package/src/components/drawer.css +185 -174
- package/src/components/drop-zone.css +85 -84
- package/src/components/dropdown.css +148 -140
- package/src/components/empty-state.css +50 -50
- package/src/components/field.css +35 -0
- package/src/components/gallery.css +257 -0
- package/src/components/icon-btn.css +2 -1
- package/src/components/index.css +14 -3
- package/src/components/input.css +205 -146
- package/src/components/kbd.css +10 -10
- package/src/components/modal.css +92 -90
- package/src/components/nav.css +140 -138
- package/src/components/number-input.css +163 -0
- package/src/components/pagination.css +152 -139
- package/src/components/pin-input.css +136 -0
- package/src/components/popover.css +72 -72
- package/src/components/progress.css +128 -129
- package/src/components/result.css +53 -57
- package/src/components/scroll-area.css +73 -0
- package/src/components/search.css +10 -4
- package/src/components/segmented-control.css +93 -0
- package/src/components/skeleton.css +58 -58
- package/src/components/slider.css +102 -100
- package/src/components/sortable.css +44 -45
- package/src/components/spinner.css +27 -27
- package/src/components/star-rating.css +121 -0
- package/src/components/stat-card.css +38 -25
- package/src/components/table.css +288 -3
- package/src/components/tabs.css +121 -121
- package/src/components/tag.css +124 -124
- package/src/components/timeline.css +99 -99
- package/src/components/toast.css +37 -38
- package/src/components/toggle.css +88 -88
- package/src/components/toolbar.css +137 -121
- package/src/components/tooltip.css +150 -150
- package/src/components/truncated-text.css +75 -0
- package/src/tokens/tokens.json +413 -0
|
@@ -31,145 +31,158 @@
|
|
|
31
31
|
align-items: center;
|
|
32
32
|
gap: var(--ds-space-1);
|
|
33
33
|
font-family: var(--ds-font-sans);
|
|
34
|
+
container-type: inline-size;
|
|
35
|
+
|
|
36
|
+
/* ---------------------------------------------------------------------------
|
|
37
|
+
Item (page number)
|
|
38
|
+
--------------------------------------------------------------------------- */
|
|
39
|
+
|
|
40
|
+
&__item {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
min-width: 2rem;
|
|
45
|
+
height: 2rem;
|
|
46
|
+
padding: 0 var(--ds-space-1);
|
|
47
|
+
border: none;
|
|
48
|
+
border-radius: var(--ds-radius-md);
|
|
49
|
+
background: transparent;
|
|
50
|
+
color: var(--ds-color-text-secondary);
|
|
51
|
+
font-size: var(--ds-text-sm);
|
|
52
|
+
font-family: var(--ds-font-sans);
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
transition:
|
|
55
|
+
background-color var(--ds-duration-fast) var(--ds-ease-out),
|
|
56
|
+
color var(--ds-duration-fast) var(--ds-ease-out);
|
|
57
|
+
-webkit-appearance: none;
|
|
58
|
+
appearance: none;
|
|
59
|
+
|
|
60
|
+
&:hover {
|
|
61
|
+
background-color: var(--ds-color-bg-elevated);
|
|
62
|
+
color: var(--ds-color-text);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&:focus-visible {
|
|
66
|
+
outline: none;
|
|
67
|
+
box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
|
|
68
|
+
scroll-margin-block: var(--ds-space-16, 4rem);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* ---------------------------------------------------------------------------
|
|
72
|
+
Active page
|
|
73
|
+
--------------------------------------------------------------------------- */
|
|
74
|
+
|
|
75
|
+
&--active,
|
|
76
|
+
&--active:hover {
|
|
77
|
+
background-color: var(--ds-color-inverted);
|
|
78
|
+
color: var(--ds-color-on-inverted);
|
|
79
|
+
cursor: default;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* ---------------------------------------------------------------------------
|
|
83
|
+
Disabled item
|
|
84
|
+
--------------------------------------------------------------------------- */
|
|
85
|
+
|
|
86
|
+
&--disabled,
|
|
87
|
+
&--disabled:hover {
|
|
88
|
+
opacity: var(--ds-opacity-disabled);
|
|
89
|
+
pointer-events: none;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* ---------------------------------------------------------------------------
|
|
94
|
+
Previous / Next navigation buttons
|
|
95
|
+
--------------------------------------------------------------------------- */
|
|
96
|
+
|
|
97
|
+
&__prev,
|
|
98
|
+
&__next {
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
min-width: 2rem;
|
|
103
|
+
height: 2rem;
|
|
104
|
+
padding: 0;
|
|
105
|
+
border: none;
|
|
106
|
+
border-radius: var(--ds-radius-md);
|
|
107
|
+
background: transparent;
|
|
108
|
+
color: var(--ds-color-text-secondary);
|
|
109
|
+
font-size: var(--ds-text-sm);
|
|
110
|
+
font-family: var(--ds-font-sans);
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
transition:
|
|
113
|
+
background-color var(--ds-duration-fast) var(--ds-ease-out),
|
|
114
|
+
color var(--ds-duration-fast) var(--ds-ease-out);
|
|
115
|
+
-webkit-appearance: none;
|
|
116
|
+
appearance: none;
|
|
117
|
+
|
|
118
|
+
&:hover {
|
|
119
|
+
background-color: var(--ds-color-bg-elevated);
|
|
120
|
+
color: var(--ds-color-text);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&:focus-visible {
|
|
124
|
+
outline: none;
|
|
125
|
+
box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
|
|
126
|
+
scroll-margin-block: var(--ds-space-16, 4rem);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&:disabled {
|
|
130
|
+
opacity: var(--ds-opacity-disabled);
|
|
131
|
+
pointer-events: none;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* ---------------------------------------------------------------------------
|
|
136
|
+
Ellipsis
|
|
137
|
+
--------------------------------------------------------------------------- */
|
|
138
|
+
|
|
139
|
+
&__ellipsis {
|
|
140
|
+
display: flex;
|
|
141
|
+
align-items: center;
|
|
142
|
+
justify-content: center;
|
|
143
|
+
min-width: 2rem;
|
|
144
|
+
height: 2rem;
|
|
145
|
+
color: var(--ds-color-text-tertiary);
|
|
146
|
+
font-size: var(--ds-text-sm);
|
|
147
|
+
user-select: none;
|
|
148
|
+
pointer-events: none;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* ---------------------------------------------------------------------------
|
|
152
|
+
Page info text (e.g. "Page 1 of 10")
|
|
153
|
+
--------------------------------------------------------------------------- */
|
|
154
|
+
|
|
155
|
+
&__info {
|
|
156
|
+
font-size: var(--ds-text-sm);
|
|
157
|
+
color: var(--ds-color-text-tertiary);
|
|
158
|
+
white-space: nowrap;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* ---------------------------------------------------------------------------
|
|
162
|
+
Modifier: Compact
|
|
163
|
+
--------------------------------------------------------------------------- */
|
|
164
|
+
|
|
165
|
+
&--compact {
|
|
166
|
+
& .ds-pagination__item,
|
|
167
|
+
& .ds-pagination__prev,
|
|
168
|
+
& .ds-pagination__next,
|
|
169
|
+
& .ds-pagination__ellipsis {
|
|
170
|
+
min-width: 1.75rem;
|
|
171
|
+
height: 1.75rem;
|
|
172
|
+
font-size: var(--ds-text-xs);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
34
175
|
}
|
|
35
176
|
|
|
36
|
-
/*
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
border: none;
|
|
48
|
-
border-radius: var(--ds-radius-md);
|
|
49
|
-
background: transparent;
|
|
50
|
-
color: var(--ds-color-text-secondary);
|
|
51
|
-
font-size: var(--ds-text-sm);
|
|
52
|
-
font-family: var(--ds-font-sans);
|
|
53
|
-
cursor: pointer;
|
|
54
|
-
transition:
|
|
55
|
-
background-color var(--ds-duration-fast) var(--ds-ease-out),
|
|
56
|
-
color var(--ds-duration-fast) var(--ds-ease-out);
|
|
57
|
-
-webkit-appearance: none;
|
|
58
|
-
appearance: none;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.ds-pagination__item:hover {
|
|
62
|
-
background-color: var(--ds-color-bg-elevated);
|
|
63
|
-
color: var(--ds-color-text);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.ds-pagination__item:focus-visible {
|
|
67
|
-
outline: none;
|
|
68
|
-
box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
|
|
69
|
-
scroll-margin-block: var(--ds-space-16, 4rem);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/* ---------------------------------------------------------------------------
|
|
73
|
-
Active page
|
|
74
|
-
--------------------------------------------------------------------------- */
|
|
75
|
-
|
|
76
|
-
.ds-pagination__item--active,
|
|
77
|
-
.ds-pagination__item--active:hover {
|
|
78
|
-
background-color: var(--ds-color-inverted);
|
|
79
|
-
color: var(--ds-color-on-inverted);
|
|
80
|
-
cursor: default;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/* ---------------------------------------------------------------------------
|
|
84
|
-
Disabled item
|
|
85
|
-
--------------------------------------------------------------------------- */
|
|
86
|
-
|
|
87
|
-
.ds-pagination__item--disabled,
|
|
88
|
-
.ds-pagination__item--disabled:hover {
|
|
89
|
-
opacity: var(--ds-opacity-disabled);
|
|
90
|
-
pointer-events: none;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/* ---------------------------------------------------------------------------
|
|
94
|
-
Previous / Next navigation buttons
|
|
95
|
-
--------------------------------------------------------------------------- */
|
|
96
|
-
|
|
97
|
-
.ds-pagination__prev,
|
|
98
|
-
.ds-pagination__next {
|
|
99
|
-
display: flex;
|
|
100
|
-
align-items: center;
|
|
101
|
-
justify-content: center;
|
|
102
|
-
min-width: 2rem;
|
|
103
|
-
height: 2rem;
|
|
104
|
-
padding: 0;
|
|
105
|
-
border: none;
|
|
106
|
-
border-radius: var(--ds-radius-md);
|
|
107
|
-
background: transparent;
|
|
108
|
-
color: var(--ds-color-text-secondary);
|
|
109
|
-
font-size: var(--ds-text-sm);
|
|
110
|
-
font-family: var(--ds-font-sans);
|
|
111
|
-
cursor: pointer;
|
|
112
|
-
transition:
|
|
113
|
-
background-color var(--ds-duration-fast) var(--ds-ease-out),
|
|
114
|
-
color var(--ds-duration-fast) var(--ds-ease-out);
|
|
115
|
-
-webkit-appearance: none;
|
|
116
|
-
appearance: none;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.ds-pagination__prev:hover,
|
|
120
|
-
.ds-pagination__next:hover {
|
|
121
|
-
background-color: var(--ds-color-bg-elevated);
|
|
122
|
-
color: var(--ds-color-text);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.ds-pagination__prev:focus-visible,
|
|
126
|
-
.ds-pagination__next:focus-visible {
|
|
127
|
-
outline: none;
|
|
128
|
-
box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
|
|
129
|
-
scroll-margin-block: var(--ds-space-16, 4rem);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.ds-pagination__prev:disabled,
|
|
133
|
-
.ds-pagination__next:disabled {
|
|
134
|
-
opacity: var(--ds-opacity-disabled);
|
|
135
|
-
pointer-events: none;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/* ---------------------------------------------------------------------------
|
|
139
|
-
Ellipsis
|
|
140
|
-
--------------------------------------------------------------------------- */
|
|
141
|
-
|
|
142
|
-
.ds-pagination__ellipsis {
|
|
143
|
-
display: flex;
|
|
144
|
-
align-items: center;
|
|
145
|
-
justify-content: center;
|
|
146
|
-
min-width: 2rem;
|
|
147
|
-
height: 2rem;
|
|
148
|
-
color: var(--ds-color-text-tertiary);
|
|
149
|
-
font-size: var(--ds-text-sm);
|
|
150
|
-
user-select: none;
|
|
151
|
-
pointer-events: none;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/* ---------------------------------------------------------------------------
|
|
155
|
-
Page info text (e.g. "Page 1 of 10")
|
|
156
|
-
--------------------------------------------------------------------------- */
|
|
157
|
-
|
|
158
|
-
.ds-pagination__info {
|
|
159
|
-
font-size: var(--ds-text-sm);
|
|
160
|
-
color: var(--ds-color-text-tertiary);
|
|
161
|
-
white-space: nowrap;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/* ---------------------------------------------------------------------------
|
|
165
|
-
Modifier: Compact
|
|
166
|
-
--------------------------------------------------------------------------- */
|
|
167
|
-
|
|
168
|
-
.ds-pagination--compact .ds-pagination__item,
|
|
169
|
-
.ds-pagination--compact .ds-pagination__prev,
|
|
170
|
-
.ds-pagination--compact .ds-pagination__next,
|
|
171
|
-
.ds-pagination--compact .ds-pagination__ellipsis {
|
|
172
|
-
min-width: 1.75rem;
|
|
173
|
-
height: 1.75rem;
|
|
174
|
-
font-size: var(--ds-text-xs);
|
|
177
|
+
/* Container query: hide page numbers when pagination is narrow, show only prev/next */
|
|
178
|
+
@container (max-width: 320px) {
|
|
179
|
+
.ds-pagination__item,
|
|
180
|
+
.ds-pagination__ellipsis {
|
|
181
|
+
display: none;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.ds-pagination__info {
|
|
185
|
+
flex: 1;
|
|
186
|
+
text-align: center;
|
|
187
|
+
}
|
|
175
188
|
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Component: Pin Input
|
|
3
|
+
One-character-per-field input for OTP codes, PINs, and verification.
|
|
4
|
+
|
|
5
|
+
ARIA requirements (consumer responsibility):
|
|
6
|
+
- Each input: inputmode="numeric", pattern="[0-9]", maxlength="1"
|
|
7
|
+
- Group: role="group", aria-label="Verification code"
|
|
8
|
+
- Auto-focus next field on input, previous on backspace
|
|
9
|
+
- Paste: distribute characters across fields
|
|
10
|
+
|
|
11
|
+
Usage:
|
|
12
|
+
<div class="ds-pin-input" role="group" aria-label="Verification code">
|
|
13
|
+
<input class="ds-pin-input__field" inputmode="numeric" maxlength="1" />
|
|
14
|
+
<input class="ds-pin-input__field" inputmode="numeric" maxlength="1" />
|
|
15
|
+
<input class="ds-pin-input__field" inputmode="numeric" maxlength="1" />
|
|
16
|
+
<span class="ds-pin-input__separator">–</span>
|
|
17
|
+
<input class="ds-pin-input__field" inputmode="numeric" maxlength="1" />
|
|
18
|
+
<input class="ds-pin-input__field" inputmode="numeric" maxlength="1" />
|
|
19
|
+
<input class="ds-pin-input__field" inputmode="numeric" maxlength="1" />
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
Modifiers:
|
|
23
|
+
.ds-pin-input--sm/--lg — Size variants
|
|
24
|
+
.ds-pin-input--error — Error state (red border)
|
|
25
|
+
.ds-pin-input--success — Success state (green border)
|
|
26
|
+
========================================================================== */
|
|
27
|
+
|
|
28
|
+
.ds-pin-input {
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
gap: var(--ds-space-2);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* --- Individual field --- */
|
|
35
|
+
.ds-pin-input__field {
|
|
36
|
+
width: var(--ds-size-3);
|
|
37
|
+
height: var(--ds-size-3);
|
|
38
|
+
padding: 0;
|
|
39
|
+
border: 1px solid var(--ds-color-border);
|
|
40
|
+
border-radius: var(--ds-radius-lg);
|
|
41
|
+
background-color: var(--ds-color-surface);
|
|
42
|
+
color: var(--ds-color-text);
|
|
43
|
+
font-family: var(--ds-font-mono);
|
|
44
|
+
font-size: var(--ds-text-xl);
|
|
45
|
+
font-weight: var(--ds-weight-semibold);
|
|
46
|
+
text-align: center;
|
|
47
|
+
line-height: 1;
|
|
48
|
+
caret-color: var(--ds-color-interactive);
|
|
49
|
+
transition:
|
|
50
|
+
border-color var(--ds-duration-fast) var(--ds-ease-default),
|
|
51
|
+
box-shadow var(--ds-duration-fast) var(--ds-ease-default);
|
|
52
|
+
-moz-appearance: textfield;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ds-pin-input__field::-webkit-inner-spin-button,
|
|
56
|
+
.ds-pin-input__field::-webkit-outer-spin-button {
|
|
57
|
+
-webkit-appearance: none;
|
|
58
|
+
margin: 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ds-pin-input__field::placeholder {
|
|
62
|
+
color: var(--ds-color-text-disabled);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ds-pin-input__field:hover {
|
|
66
|
+
border-color: var(--ds-color-border-hover);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.ds-pin-input__field:focus {
|
|
70
|
+
outline: none;
|
|
71
|
+
border-color: var(--ds-color-border-active);
|
|
72
|
+
box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* --- Separator (dash between groups) --- */
|
|
76
|
+
.ds-pin-input__separator {
|
|
77
|
+
color: var(--ds-color-text-tertiary);
|
|
78
|
+
font-size: var(--ds-text-lg);
|
|
79
|
+
user-select: none;
|
|
80
|
+
padding-inline: var(--ds-space-0-5);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* ==========================================================================
|
|
84
|
+
Size variants
|
|
85
|
+
========================================================================== */
|
|
86
|
+
|
|
87
|
+
/* SM */
|
|
88
|
+
.ds-pin-input--sm {
|
|
89
|
+
gap: var(--ds-space-1-5);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.ds-pin-input--sm .ds-pin-input__field {
|
|
93
|
+
width: var(--ds-size-2);
|
|
94
|
+
height: var(--ds-size-2);
|
|
95
|
+
font-size: var(--ds-text-base);
|
|
96
|
+
border-radius: var(--ds-radius-md);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* LG */
|
|
100
|
+
.ds-pin-input--lg {
|
|
101
|
+
gap: var(--ds-space-3);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.ds-pin-input--lg .ds-pin-input__field {
|
|
105
|
+
width: var(--ds-size-4);
|
|
106
|
+
height: var(--ds-size-4);
|
|
107
|
+
font-size: var(--ds-text-2xl);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* ==========================================================================
|
|
111
|
+
State variants
|
|
112
|
+
========================================================================== */
|
|
113
|
+
|
|
114
|
+
/* Error */
|
|
115
|
+
.ds-pin-input--error .ds-pin-input__field {
|
|
116
|
+
border-color: var(--ds-color-error);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.ds-pin-input--error .ds-pin-input__field:focus {
|
|
120
|
+
box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-color-error);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* Success */
|
|
124
|
+
.ds-pin-input--success .ds-pin-input__field {
|
|
125
|
+
border-color: var(--ds-color-success);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.ds-pin-input--success .ds-pin-input__field:focus {
|
|
129
|
+
box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-color-success);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* Disabled */
|
|
133
|
+
.ds-pin-input--disabled .ds-pin-input__field {
|
|
134
|
+
opacity: var(--ds-opacity-disabled);
|
|
135
|
+
pointer-events: none;
|
|
136
|
+
}
|
|
@@ -24,88 +24,88 @@
|
|
|
24
24
|
.ds-popover {
|
|
25
25
|
position: relative;
|
|
26
26
|
display: inline-flex;
|
|
27
|
-
}
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
28
|
+
&__content {
|
|
29
|
+
position: absolute;
|
|
30
|
+
z-index: var(--ds-z-dropdown);
|
|
31
|
+
background-color: var(--ds-color-surface);
|
|
32
|
+
border: 1px solid var(--ds-color-border);
|
|
33
|
+
border-radius: var(--ds-radius-xl);
|
|
34
|
+
box-shadow: var(--ds-shadow-lg);
|
|
35
|
+
padding: var(--ds-space-4);
|
|
36
|
+
min-width: 16rem;
|
|
37
|
+
opacity: 0;
|
|
38
|
+
visibility: hidden;
|
|
39
|
+
transform: scale(0.96);
|
|
40
|
+
transition:
|
|
41
|
+
opacity var(--ds-duration-fast) var(--ds-ease),
|
|
42
|
+
visibility var(--ds-duration-fast) var(--ds-ease),
|
|
43
|
+
transform var(--ds-duration-fast) var(--ds-ease-out-expo);
|
|
46
44
|
|
|
47
|
-
/*
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
45
|
+
/* Size: small */
|
|
46
|
+
&--sm {
|
|
47
|
+
min-width: 12rem;
|
|
48
|
+
padding: var(--ds-space-3);
|
|
49
|
+
}
|
|
53
50
|
|
|
54
|
-
/*
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
transform: translateX(-50%) scale(0.96);
|
|
60
|
-
}
|
|
51
|
+
/* Size: large */
|
|
52
|
+
&--lg {
|
|
53
|
+
min-width: 24rem;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
61
56
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
/* Open state */
|
|
58
|
+
&--open .ds-popover__content {
|
|
59
|
+
opacity: 1;
|
|
60
|
+
visibility: visible;
|
|
61
|
+
transform: scale(1);
|
|
62
|
+
}
|
|
66
63
|
|
|
67
|
-
/* Placement:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
64
|
+
/* Placement: bottom (default) */
|
|
65
|
+
& .ds-popover__content,
|
|
66
|
+
&--bottom .ds-popover__content {
|
|
67
|
+
inset-block-start: calc(100% + var(--ds-offset-md));
|
|
68
|
+
inset-inline-start: 50%;
|
|
69
|
+
transform: translateX(-50%) scale(0.96);
|
|
70
|
+
}
|
|
74
71
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
&--open .ds-popover__content,
|
|
73
|
+
&--bottom&--open .ds-popover__content {
|
|
74
|
+
transform: translateX(-50%) scale(1);
|
|
75
|
+
}
|
|
78
76
|
|
|
79
|
-
/* Placement:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
77
|
+
/* Placement: top */
|
|
78
|
+
&--top .ds-popover__content {
|
|
79
|
+
inset-block-end: calc(100% + var(--ds-offset-md));
|
|
80
|
+
inset-block-start: auto;
|
|
81
|
+
inset-inline-start: 50%;
|
|
82
|
+
transform: translateX(-50%) scale(0.96);
|
|
83
|
+
}
|
|
86
84
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
85
|
+
&--top&--open .ds-popover__content {
|
|
86
|
+
transform: translateX(-50%) scale(1);
|
|
87
|
+
}
|
|
90
88
|
|
|
91
|
-
/* Placement:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
89
|
+
/* Placement: left */
|
|
90
|
+
&--left .ds-popover__content {
|
|
91
|
+
inset-inline-end: calc(100% + var(--ds-offset-md));
|
|
92
|
+
inset-block-start: 50%;
|
|
93
|
+
inset-inline-start: auto;
|
|
94
|
+
transform: translateY(-50%) scale(0.96);
|
|
95
|
+
}
|
|
97
96
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
97
|
+
&--left&--open .ds-popover__content {
|
|
98
|
+
transform: translateY(-50%) scale(1);
|
|
99
|
+
}
|
|
101
100
|
|
|
102
|
-
/*
|
|
103
|
-
.ds-popover__content
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
101
|
+
/* Placement: right */
|
|
102
|
+
&--right .ds-popover__content {
|
|
103
|
+
inset-inline-start: calc(100% + var(--ds-offset-md));
|
|
104
|
+
inset-block-start: 50%;
|
|
105
|
+
transform: translateY(-50%) scale(0.96);
|
|
106
|
+
}
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
&--right&--open .ds-popover__content {
|
|
109
|
+
transform: translateY(-50%) scale(1);
|
|
110
|
+
}
|
|
111
111
|
}
|