@functionalcms/svelte-components 3.5.19 → 4.0.0-pre
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/css/functional.css +1 -1
- package/css/functional.css.map +1 -1
- package/dist/auth/authenticationHandle.js +0 -4
- package/dist/auth/redisSessionProvider.js +1 -2
- package/dist/auth/sessionIdGenerator.d.ts +1 -1
- package/dist/components/form/Button.svelte +379 -0
- package/dist/components/form/Button.svelte.d.ts +27 -0
- package/dist/components/form/Input.d.ts +21 -0
- package/dist/components/form/Input.js +23 -0
- package/dist/components/form/Input.svelte +142 -177
- package/dist/components/form/Input.svelte.d.ts +24 -46
- package/dist/components/{Banner.svelte → layouts/Banner.svelte} +5 -5
- package/dist/components/layouts/DefaultLayout.svelte +5 -5
- package/dist/components/layouts/DefaultLayout.svelte.d.ts +4 -4
- package/dist/components/layouts/SimpleFooter.svelte +4 -4
- package/dist/components/layouts/SimpleFooter.svelte.d.ts +3 -3
- package/dist/components/layouts/Well.svelte +46 -0
- package/dist/components/layouts/Well.svelte.d.ts +12 -0
- package/dist/components/menu/CollapsibleMenu.svelte +2 -2
- package/dist/components/menu/CollapsibleMenu.svelte.d.ts +3 -16
- package/dist/components/menu/DynamicMenu.svelte +25 -13
- package/dist/components/menu/DynamicMenu.svelte.d.ts +10 -28
- package/dist/components/menu/HamburgerMenu.svelte +29 -21
- package/dist/components/menu/HamburgerMenu.svelte.d.ts +11 -24
- package/dist/components/menu/ListMenu.svelte +53 -0
- package/dist/components/menu/ListMenu.svelte.d.ts +17 -0
- package/dist/components/menu/{Menu.d.ts → types.d.ts} +2 -0
- package/dist/components/menu/{Menu.js → types.js} +5 -0
- package/dist/components/presentation/Card.svelte +77 -92
- package/dist/components/presentation/Card.svelte.d.ts +10 -13
- package/dist/components/presentation/{Carusele.d.ts → Carousel.d.ts} +1 -1
- package/dist/components/presentation/Carousel.svelte +98 -1
- package/dist/components/presentation/Carousel.svelte.d.ts +14 -15
- package/dist/components/presentation/Drawer.svelte +131 -0
- package/dist/components/presentation/Drawer.svelte.d.ts +13 -0
- package/dist/components/presentation/Gallery.svelte +7 -7
- package/dist/components/presentation/Gallery.svelte.d.ts +3 -3
- package/dist/components/presentation/ImageCompare.svelte +39 -46
- package/dist/components/presentation/ImageCompare.svelte.d.ts +8 -26
- package/dist/components/presentation/Link.svelte +362 -0
- package/dist/components/presentation/Link.svelte.d.ts +27 -0
- package/dist/components/presentation/Logo.svelte +36 -0
- package/dist/components/presentation/Logo.svelte.d.ts +8 -0
- package/dist/components/presentation/ShowItem.d.ts +7 -7
- package/dist/components/presentation/ShowItem.js +1 -8
- package/dist/index-server.d.ts +0 -1
- package/dist/index-server.js +0 -3
- package/dist/index.d.ts +16 -26
- package/dist/index.js +39 -57
- package/dist/server-side/getServices.d.ts +1 -1
- package/dist/server-side/types.d.ts +1 -2
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +54 -0
- package/package.json +27 -27
- package/dist/components/CssHelper.d.ts +0 -1
- package/dist/components/CssHelper.js +0 -3
- package/dist/components/Link.svelte +0 -349
- package/dist/components/Link.svelte.d.ts +0 -48
- package/dist/components/Logo.svelte +0 -38
- package/dist/components/Logo.svelte.d.ts +0 -28
- package/dist/components/Spacer.svelte +0 -22
- package/dist/components/Spacer.svelte.d.ts +0 -6
- package/dist/components/Well.svelte +0 -40
- package/dist/components/Well.svelte.d.ts +0 -12
- package/dist/components/agnostic/Button/Button.svelte +0 -371
- package/dist/components/agnostic/Button/Button.svelte.d.ts +0 -52
- package/dist/components/agnostic/Button/ButtonGroup.svelte +0 -21
- package/dist/components/agnostic/Button/ButtonGroup.svelte.d.ts +0 -32
- package/dist/components/agnostic/Button/button-base.css +0 -12
- package/dist/components/agnostic/Button/button-core.css +0 -237
- package/dist/components/agnostic/Button/button-empty.css +0 -31
- package/dist/components/agnostic/Button/button-group.css +0 -8
- package/dist/components/agnostic/Close/Close.svelte +0 -124
- package/dist/components/agnostic/Close/Close.svelte.d.ts +0 -25
- package/dist/components/agnostic/Close/api.d.ts +0 -1
- package/dist/components/agnostic/Disclose/Disclose.svelte +0 -116
- package/dist/components/agnostic/Disclose/Disclose.svelte.d.ts +0 -11
- package/dist/components/agnostic/Divider/Divider.svelte +0 -141
- package/dist/components/agnostic/Divider/Divider.svelte.d.ts +0 -24
- package/dist/components/agnostic/Divider/api.d.ts +0 -3
- package/dist/components/agnostic/Divider/api.js +0 -1
- package/dist/components/agnostic/Loader/Loader.svelte +0 -116
- package/dist/components/agnostic/Loader/Loader.svelte.d.ts +0 -22
- package/dist/components/agnostic/animation.css +0 -37
- package/dist/components/blog/BlogDescription.svelte +0 -9
- package/dist/components/blog/BlogDescription.svelte.d.ts +0 -23
- package/dist/components/blog/BlogPost.d.ts +0 -13
- package/dist/components/blog/BlogPost.js +0 -1
- package/dist/components/blog/BlogTitle.svelte +0 -19
- package/dist/components/blog/BlogTitle.svelte.d.ts +0 -23
- package/dist/components/blog/blog.d.ts +0 -8
- package/dist/components/blog/blog.js +0 -29
- package/dist/components/converters/ShowItemToNavigationItems.d.ts +0 -3
- package/dist/components/converters/ShowItemToNavigationItems.js +0 -10
- package/dist/components/form/DateTimePicker.svelte +0 -59
- package/dist/components/form/DateTimePicker.svelte.d.ts +0 -18
- package/dist/components/form/InputAddonItem.svelte +0 -42
- package/dist/components/form/InputAddonItem.svelte.d.ts +0 -31
- package/dist/components/form/InputTypes.d.ts +0 -9
- package/dist/components/form/InputTypes.js +0 -10
- package/dist/components/form/Select.svelte +0 -157
- package/dist/components/form/Select.svelte.d.ts +0 -34
- package/dist/components/form/Switch.svelte +0 -275
- package/dist/components/form/Switch.svelte.d.ts +0 -30
- package/dist/components/menu/Menu.svelte +0 -526
- package/dist/components/menu/Menu.svelte.d.ts +0 -33
- package/dist/components/menu/MenuItem.svelte +0 -121
- package/dist/components/menu/MenuItem.svelte.d.ts +0 -39
- package/dist/components/menu/NavigationItems.svelte +0 -44
- package/dist/components/menu/NavigationItems.svelte.d.ts +0 -32
- package/dist/components/menu/authentication.d.ts +0 -1
- package/dist/components/menu/authentication.js +0 -6
- package/dist/components/presentation/Carousel/carousel-content.svelte +0 -35
- package/dist/components/presentation/Carousel/carousel-content.svelte.d.ts +0 -28
- package/dist/components/presentation/Carousel/carousel-item.svelte +0 -25
- package/dist/components/presentation/Carousel/carousel-item.svelte.d.ts +0 -28
- package/dist/components/presentation/Carousel/carousel-next.svelte +0 -39
- package/dist/components/presentation/Carousel/carousel-next.svelte.d.ts +0 -18
- package/dist/components/presentation/Carousel/carousel-previous.svelte +0 -40
- package/dist/components/presentation/Carousel/carousel-previous.svelte.d.ts +0 -18
- package/dist/components/presentation/Carousel/carousel.svelte +0 -99
- package/dist/components/presentation/Carousel/carousel.svelte.d.ts +0 -31
- package/dist/components/presentation/Carousel/context.d.ts +0 -32
- package/dist/components/presentation/Carousel/context.js +0 -12
- package/dist/components/presentation/Carusele.js +0 -5
- /package/dist/components/{Markdown.svelte → content/Markdown.svelte} +0 -0
- /package/dist/components/{Markdown.svelte.d.ts → content/Markdown.svelte.d.ts} +0 -0
- /package/dist/components/{Banner.svelte.d.ts → layouts/Banner.svelte.d.ts} +0 -0
- /package/dist/components/{agnostic/Close/api.js → presentation/Carousel.js} +0 -0
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
.btn {
|
|
2
|
-
/* TODO test this fallback override syntax is correct */
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
white-space: nowrap;
|
|
7
|
-
user-select: none;
|
|
8
|
-
appearance: none;
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
transition-property: all;
|
|
12
|
-
transition-duration: var(--functional-timing-medium);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.btn-skin,
|
|
16
|
-
.btn {
|
|
17
|
-
color: var(--functional-btn-font-color, var(--functional-dark));
|
|
18
|
-
background-color: var(--functional-btn-bgcolor, var(--functional-gray-light));
|
|
19
|
-
border-color: var(--functional-btn-bgcolor, var(--functional-gray-light));
|
|
20
|
-
|
|
21
|
-
/* seems like a reasonable default as chrome picks `outset` which results in a weird 3d effect */
|
|
22
|
-
border-style: solid;
|
|
23
|
-
border-width: var(--functional-btn-border-size, 1px);
|
|
24
|
-
font-family: var(--functional-btn-font-family, var(--functional-font-family-body));
|
|
25
|
-
font-weight: var(--functional-btn-font-weight, 400);
|
|
26
|
-
font-size: var(--functional-btn-font-size, 1rem);
|
|
27
|
-
|
|
28
|
-
/* this can be overriden, but it might mess with the balance of the button heights across variants */
|
|
29
|
-
line-height: var(--functional-line-height, var(--fluid-20, 1.25rem));
|
|
30
|
-
padding-block-start: var(--functional-vertical-pad, 0.5rem);
|
|
31
|
-
padding-block-end: var(--functional-vertical-pad, 0.5rem);
|
|
32
|
-
padding-inline-start: var(--functional-side-padding, 0.75rem);
|
|
33
|
-
padding-inline-end: var(--functional-side-padding, 0.75rem);
|
|
34
|
-
text-decoration: none;
|
|
35
|
-
text-align: center;
|
|
36
|
-
outline: none;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.btn:visited {
|
|
40
|
-
color: var(--functional-btn-font-color, var(--functional-dark));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.btn:hover {
|
|
44
|
-
opacity: 85%;
|
|
45
|
-
text-decoration: none;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.btn:active {
|
|
49
|
-
text-shadow: 0 1px 0 rgb(255 255 255 / 30%);
|
|
50
|
-
text-decoration: none;
|
|
51
|
-
transition-duration: 0s;
|
|
52
|
-
box-shadow: inset 0 1px 3px rgb(0 0 0 / 20%);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.btn:focus {
|
|
56
|
-
box-shadow: 0 0 0 var(--functional-focus-ring-outline-width) var(--functional-focus-ring-color);
|
|
57
|
-
|
|
58
|
-
/* Needed for High Contrast mode */
|
|
59
|
-
outline:
|
|
60
|
-
var(--functional-focus-ring-outline-width) var(--functional-focus-ring-outline-style)
|
|
61
|
-
var(--functional-focus-ring-outline-color);
|
|
62
|
-
transition: box-shadow var(--functional-timing-fast) ease-out;
|
|
63
|
-
|
|
64
|
-
/* In order for the focused element's box-shadow to appear above its siblings we need to
|
|
65
|
-
establish a new stacking context: https://stackoverflow.com/a/28042700 */
|
|
66
|
-
isolation: isolate;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/*
|
|
70
|
-
* Disabled State
|
|
71
|
-
*
|
|
72
|
-
* The disabled state uses the class .disabled, is-disabled,
|
|
73
|
-
* and the form attribute disabled="disabled".
|
|
74
|
-
* The use of !important is only added because this is a state
|
|
75
|
-
* that must be applied to all buttons when in a disabled state.
|
|
76
|
-
*/
|
|
77
|
-
.btn.disabled,
|
|
78
|
-
.btn:disabled {
|
|
79
|
-
top: 0 !important;
|
|
80
|
-
background: var(--functional-btn-disabled-bg, var(--functional-gray-mid-dark)) !important;
|
|
81
|
-
text-shadow: 0 1px 1px rgb(255 255 255 / 100%) !important;
|
|
82
|
-
|
|
83
|
-
/* primary, secondary, natural, all look same when disabled; and we don't want to
|
|
84
|
-
have an inadvertant looking blue primary border when disabled so it's transparent */
|
|
85
|
-
border-color: transparent;
|
|
86
|
-
color: var(--functional-btn-disabled-color, var(--functional-gray-dark)) !important;
|
|
87
|
-
cursor: default !important;
|
|
88
|
-
appearance: none !important;
|
|
89
|
-
box-shadow: none !important;
|
|
90
|
-
opacity: 80% !important;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.btn-primary {
|
|
94
|
-
background-color: var(--functional-btn-primary, var(--functional-primary));
|
|
95
|
-
border-color: var(--functional-btn-primary, var(--functional-primary));
|
|
96
|
-
color: var(--functional-btn-primary-color, var(--functional-light));
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/* Border and font is primary. When hovered, we invert with primary background and white font */
|
|
100
|
-
.btn-primary.btn-bordered {
|
|
101
|
-
color: var(--functional-btn-primary, var(--functional-primary));
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.btn-primary.btn-bordered:hover,
|
|
105
|
-
.btn-primary.btn-bordered:focus {
|
|
106
|
-
background-color: var(--functional-btn-primary, var(--functional-primary));
|
|
107
|
-
color: var(--functional-btn-primary-color, var(--functional-light));
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.btn-primary:visited {
|
|
111
|
-
color: var(--functional-btn-primary-color, var(--functional-light));
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.btn-secondary {
|
|
115
|
-
background-color: var(--functional-btn-secondary, var(--functional-secondary));
|
|
116
|
-
border-color: var(--functional-btn-secondary, var(--functional-secondary));
|
|
117
|
-
color: var(--functional-btn-secondary-color, var(--functional-light));
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/* Border and font is secondary. When hovered, we invert with secondary background and white font */
|
|
121
|
-
.btn-secondary.btn-bordered {
|
|
122
|
-
color: var(--functional-btn-secondary, var(--functional-secondary));
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.btn-secondary.btn-bordered:hover,
|
|
126
|
-
.btn-secondary.btn-bordered:focus {
|
|
127
|
-
background-color: var(--functional-btn-secondary, var(--functional-secondary));
|
|
128
|
-
color: var(--functional-btn-secondary-color, var(--functional-light));
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.btn-secondary:visited {
|
|
132
|
-
color: var(--functional-btn-secondary-color, var(--functional-light));
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/*
|
|
136
|
-
/**
|
|
137
|
-
* Border Buttons
|
|
138
|
-
*/
|
|
139
|
-
.btn-bordered {
|
|
140
|
-
border-width: 1px;
|
|
141
|
-
background: transparent;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Sizes
|
|
146
|
-
*/
|
|
147
|
-
.btn-large {
|
|
148
|
-
font-size: calc(var(--functional-btn-font-size, 1rem) + 0.25rem);
|
|
149
|
-
height: 3rem;
|
|
150
|
-
line-height: 3rem;
|
|
151
|
-
padding: 0 3rem;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.btn-small {
|
|
155
|
-
font-size: calc(var(--functional-btn-font-size, 1rem) - 0.25rem);
|
|
156
|
-
height: 2rem;
|
|
157
|
-
line-height: 2rem;
|
|
158
|
-
padding: 0 2rem;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Rounded
|
|
163
|
-
*/
|
|
164
|
-
.btn-rounded {
|
|
165
|
-
border-radius: var(--functional-btn-radius, var(--functional-radius, 0.25rem));
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.btn-pill {
|
|
169
|
-
border-radius: 200px;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/*
|
|
173
|
-
* Size Adjustment for equal height & width buttons
|
|
174
|
-
*
|
|
175
|
-
* Remove padding
|
|
176
|
-
*/
|
|
177
|
-
.btn-circle {
|
|
178
|
-
border-radius: 100%;
|
|
179
|
-
width: 2.5rem;
|
|
180
|
-
height: 2.5rem;
|
|
181
|
-
padding: 0 !important;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.btn-circle-large {
|
|
185
|
-
font-size: calc(var(--functional-btn-font-size, 1rem) + 0.25rem);
|
|
186
|
-
width: 3rem;
|
|
187
|
-
height: 3rem;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.btn-circle-small {
|
|
191
|
-
font-size: calc(var(--functional-btn-font-size, 1rem) - 0.25rem);
|
|
192
|
-
width: 2rem;
|
|
193
|
-
height: 2rem;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Button Block (stacked)
|
|
198
|
-
*/
|
|
199
|
-
.btn-block {
|
|
200
|
-
width: 100%;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/* This is a utility class used if you literally want to stack block buttons one after another.
|
|
204
|
-
Apply this class to the nth-of-type(2) onwards to ensure the borders line up properly. */
|
|
205
|
-
.btn-block-following {
|
|
206
|
-
margin-block-start: -1px;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.btn-grouped {
|
|
210
|
-
border-radius: var(--functional-btn-radius, var(--functional-radius, 0.25rem));
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.btn-grouped:not(:last-child) {
|
|
214
|
-
border-top-right-radius: 0;
|
|
215
|
-
border-bottom-right-radius: 0;
|
|
216
|
-
margin-inline-end: -1px;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.btn-grouped:not(:first-child) {
|
|
220
|
-
border-top-left-radius: 0;
|
|
221
|
-
border-bottom-left-radius: 0;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.btn-capsule {
|
|
225
|
-
--padding-side: calc(var(--functional-side-padding, 0.75rem) * 1.5);
|
|
226
|
-
|
|
227
|
-
border-radius: var(--functional-radius-capsule);
|
|
228
|
-
padding-inline-start: var(--padding-side);
|
|
229
|
-
padding-inline-end: var(--padding-side);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
@media (prefers-reduced-motion), (update: slow) {
|
|
233
|
-
.btn,
|
|
234
|
-
.btn:focus {
|
|
235
|
-
transition-duration: 0.001ms !important;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Invisible buttons. Generally used for a Cancel or icon button that behaves like a button,
|
|
3
|
-
* semantically and for a11y, but, does so without all the typical "button chrome" behind it.
|
|
4
|
-
*/
|
|
5
|
-
:is(.btn-link, .btn-blank) {
|
|
6
|
-
font-family: var(--functional-btn-font-family, var(--functional-font-family-body));
|
|
7
|
-
font-size: var(--functional-btn-font-size, 1rem);
|
|
8
|
-
background-color: transparent;
|
|
9
|
-
border: 0;
|
|
10
|
-
border-radius: 0;
|
|
11
|
-
box-shadow: none;
|
|
12
|
-
transition: none;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/* Since blank buttons can be used for things like input addons we don't want to go crazy
|
|
16
|
-
on the side padding. As such, these have a good bit less then regular buttons. */
|
|
17
|
-
.btn-blank {
|
|
18
|
-
--functional-btn-blank-side-padding: var(--btn-blank-side-padding, 0.25rem);
|
|
19
|
-
|
|
20
|
-
padding-inline-start: var(--functional-btn-blank-side-padding);
|
|
21
|
-
padding-inline-end: var(--functional-btn-blank-side-padding);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/* A button blank with link color text */
|
|
25
|
-
.btn-link {
|
|
26
|
-
color: var(--functional-btn-primary, var(--functional-primary));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.btn-link:hover {
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
<style>
|
|
2
|
-
.close-button {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
background-color: transparent;
|
|
7
|
-
border: 0;
|
|
8
|
-
border-radius: 0;
|
|
9
|
-
box-shadow: none;
|
|
10
|
-
width: var(--fluid-24);
|
|
11
|
-
height: var(--fluid-24);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.close-button:hover,
|
|
15
|
-
.close-button:active,
|
|
16
|
-
.close-button:focus {
|
|
17
|
-
background: none;
|
|
18
|
-
|
|
19
|
-
/* Needed for High Contrast mode */
|
|
20
|
-
outline:
|
|
21
|
-
var(--functional-focus-ring-outline-width) var(--functional-focus-ring-outline-style)
|
|
22
|
-
var(--functional-focus-ring-outline-color);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.close-button:focus {
|
|
26
|
-
box-shadow: 0 0 0 3px var(--functional-focus-ring-color);
|
|
27
|
-
transition: box-shadow var(--functional-timing-fast) ease-out;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.close {
|
|
31
|
-
width: var(--fluid-12);
|
|
32
|
-
height: var(--fluid-12);
|
|
33
|
-
display: inline-block;
|
|
34
|
-
vertical-align: middle;
|
|
35
|
-
line-height: 1em;
|
|
36
|
-
flex-shrink: 0;
|
|
37
|
-
color: currentColor;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.close-button .close {
|
|
41
|
-
opacity: 80%;
|
|
42
|
-
transition: opacity var(--functional-timing-medium);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@media (prefers-reduced-motion), (update: slow) {
|
|
46
|
-
.close-button:focus,
|
|
47
|
-
.close-button .close {
|
|
48
|
-
transition-duration: 0.001ms !important;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.close-button-small {
|
|
53
|
-
width: var(--fluid-18);
|
|
54
|
-
height: var(--fluid-18);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.close-button-large {
|
|
58
|
-
width: var(--fluid-32);
|
|
59
|
-
height: var(--fluid-32);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.close-button-xlarge {
|
|
63
|
-
width: var(--fluid-40);
|
|
64
|
-
height: var(--fluid-40);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.close-button-small > .close {
|
|
68
|
-
width: 0.5625rem;
|
|
69
|
-
height: 0.5625rem;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.close-button-large > .close {
|
|
73
|
-
width: var(--fluid-16);
|
|
74
|
-
height: var(--fluid-16);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.close-button-xlarge > .close {
|
|
78
|
-
width: var(--fluid-20);
|
|
79
|
-
height: var(--fluid-20);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.close-button:hover .close {
|
|
83
|
-
opacity: 100%;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
</style>
|
|
87
|
-
|
|
88
|
-
<script lang="ts">
|
|
89
|
-
import type { CloseSizes } from './api';
|
|
90
|
-
export let size: CloseSizes = "";
|
|
91
|
-
export let isFaux = false;
|
|
92
|
-
export let color = "inherit";
|
|
93
|
-
const closeButtonClasses = [
|
|
94
|
-
"close-button",
|
|
95
|
-
size ? `close-button-${size}` : "",
|
|
96
|
-
]
|
|
97
|
-
.filter((c) => c)
|
|
98
|
-
.join(" ");
|
|
99
|
-
</script>
|
|
100
|
-
|
|
101
|
-
{#if isFaux}
|
|
102
|
-
<div class={closeButtonClasses}>
|
|
103
|
-
<svg class="close" viewBox="0 0 24 24" aria-hidden="true">
|
|
104
|
-
<path
|
|
105
|
-
fill="currentColor"
|
|
106
|
-
d="M.439 21.44a1.5 1.5 0 0 0 2.122 2.121l9.262-9.261a.25.25 0 0 1 .354 0l9.262 9.263a1.5 1.5 0 1 0 2.122-2.121L14.3 12.177a.25.25 0 0 1 0-.354l9.263-9.262A1.5 1.5 0 0 0 21.439.44L12.177 9.7a.25.25 0 0 1-.354 0L2.561.44A1.5 1.5 0 0 0 .439 2.561L9.7 11.823a.25.25 0 0 1 0 .354Z"
|
|
107
|
-
></path>
|
|
108
|
-
</svg>
|
|
109
|
-
</div>
|
|
110
|
-
{:else}
|
|
111
|
-
<button on:click class={closeButtonClasses} aria-label="Close">
|
|
112
|
-
<svg
|
|
113
|
-
class="close"
|
|
114
|
-
style:color={color}
|
|
115
|
-
viewBox="0 0 24 24"
|
|
116
|
-
aria-hidden="true"
|
|
117
|
-
>
|
|
118
|
-
<path
|
|
119
|
-
fill="currentColor"
|
|
120
|
-
d="M.439 21.44a1.5 1.5 0 0 0 2.122 2.121l9.262-9.261a.25.25 0 0 1 .354 0l9.262 9.263a1.5 1.5 0 1 0 2.122-2.121L14.3 12.177a.25.25 0 0 1 0-.354l9.263-9.262A1.5 1.5 0 0 0 21.439.44L12.177 9.7a.25.25 0 0 1-.354 0L2.561.44A1.5 1.5 0 0 0 .439 2.561L9.7 11.823a.25.25 0 0 1 0 .354Z"
|
|
121
|
-
></path>
|
|
122
|
-
</svg>
|
|
123
|
-
</button>
|
|
124
|
-
{/if}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { CloseSizes } from './api';
|
|
2
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
-
$$bindings?: Bindings;
|
|
5
|
-
} & Exports;
|
|
6
|
-
(internal: unknown, props: Props & {
|
|
7
|
-
$$events?: Events;
|
|
8
|
-
$$slots?: Slots;
|
|
9
|
-
}): Exports & {
|
|
10
|
-
$set?: any;
|
|
11
|
-
$on?: any;
|
|
12
|
-
};
|
|
13
|
-
z_$$bindings?: Bindings;
|
|
14
|
-
}
|
|
15
|
-
declare const Close: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
-
size?: CloseSizes;
|
|
17
|
-
isFaux?: boolean;
|
|
18
|
-
color?: string;
|
|
19
|
-
}, {
|
|
20
|
-
click: MouseEvent;
|
|
21
|
-
} & {
|
|
22
|
-
[evt: string]: CustomEvent<any>;
|
|
23
|
-
}, {}, {}, string>;
|
|
24
|
-
type Close = InstanceType<typeof Close>;
|
|
25
|
-
export default Close;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type CloseSizes = 'small' | 'large' | 'xlarge' | '';
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { mergedClasses } from '../../CssHelper.js';
|
|
3
|
-
import type { Snippet } from 'svelte';
|
|
4
|
-
|
|
5
|
-
interface Props {
|
|
6
|
-
children: Snippet;
|
|
7
|
-
title?: string;
|
|
8
|
-
isOpen?: boolean;
|
|
9
|
-
isBackground?: boolean;
|
|
10
|
-
isBordered?: boolean;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
let {
|
|
14
|
-
children,
|
|
15
|
-
title = '',
|
|
16
|
-
isOpen = false,
|
|
17
|
-
isBackground = false,
|
|
18
|
-
isBordered = false
|
|
19
|
-
}: Props = $props();
|
|
20
|
-
|
|
21
|
-
const discloseClasses = mergedClasses(
|
|
22
|
-
'disclose',
|
|
23
|
-
isBackground ? 'disclose-bg' : '',
|
|
24
|
-
isBordered ? 'disclose-bordered' : ''
|
|
25
|
-
);
|
|
26
|
-
</script>
|
|
27
|
-
|
|
28
|
-
<details class={discloseClasses} bind:open={isOpen}>
|
|
29
|
-
<summary class="disclose-title">{title}</summary>
|
|
30
|
-
<div class="disclose-panel">
|
|
31
|
-
{@render children()}
|
|
32
|
-
</div>
|
|
33
|
-
</details>
|
|
34
|
-
|
|
35
|
-
<style>
|
|
36
|
-
.disclose {
|
|
37
|
-
margin-block-end: var(--fluid-4);
|
|
38
|
-
|
|
39
|
-
/* When this element is a direct child of a flex container with
|
|
40
|
-
flex-direction: column it collapses similar to an inline element even though
|
|
41
|
-
it's block. This helps prevent that. */
|
|
42
|
-
width: 100%;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.disclose-title {
|
|
46
|
-
display: block;
|
|
47
|
-
cursor: pointer;
|
|
48
|
-
font-weight: 600;
|
|
49
|
-
padding: var(--fluid-8) var(--fluid-12);
|
|
50
|
-
|
|
51
|
-
/* Required to position the icon absolutely */
|
|
52
|
-
position: relative;
|
|
53
|
-
color: inherit;
|
|
54
|
-
transition: color var(--functional-timing-slow);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.disclose-panel {
|
|
58
|
-
font-weight: 400;
|
|
59
|
-
padding: var(--fluid-16);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.disclose-title,
|
|
63
|
-
.disclose-panel {
|
|
64
|
-
margin: 0;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/* stylelint-disable-next-line selector-pseudo-element-no-unknown */
|
|
68
|
-
.disclose-title::webkit-details-marker {
|
|
69
|
-
display: none;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.disclose-bordered .disclose-title {
|
|
73
|
-
border: 1px solid var(--functional-gray-light);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.disclose-bg .disclose-title {
|
|
77
|
-
background-color: var(--functional-gray-light);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.disclose-title:focus {
|
|
81
|
-
box-shadow: 0 0 0 var(--functional-focus-ring-outline-width) var(--functional-focus-ring-color);
|
|
82
|
-
|
|
83
|
-
/* Needed for High Contrast mode */
|
|
84
|
-
outline: var(--functional-focus-ring-outline-width) var(--functional-focus-ring-outline-style)
|
|
85
|
-
var(--functional-focus-ring-outline-color);
|
|
86
|
-
transition: box-shadow var(--functional-timing-fast) ease-out;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.disclose-title::after {
|
|
90
|
-
color: var(--functional-gray-dark);
|
|
91
|
-
content: '\203A';
|
|
92
|
-
position: absolute;
|
|
93
|
-
right: var(--fluid-12);
|
|
94
|
-
top: 0;
|
|
95
|
-
bottom: 0;
|
|
96
|
-
|
|
97
|
-
/* Chevron thinning :) */
|
|
98
|
-
font-size: var(--fluid-32);
|
|
99
|
-
line-height: 1;
|
|
100
|
-
font-weight: 100;
|
|
101
|
-
transition: transform var(--functional-timing-slow);
|
|
102
|
-
transform: rotate(0);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
@media (prefers-reduced-motion), (update: slow) {
|
|
106
|
-
.disclose-title,
|
|
107
|
-
.disclose-title:focus,
|
|
108
|
-
.disclose-title::after {
|
|
109
|
-
transition: none;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.disclose[open] > .disclose-title::after {
|
|
114
|
-
transform: rotate(90deg);
|
|
115
|
-
}
|
|
116
|
-
</style>
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Snippet } from 'svelte';
|
|
2
|
-
interface Props {
|
|
3
|
-
children: Snippet;
|
|
4
|
-
title?: string;
|
|
5
|
-
isOpen?: boolean;
|
|
6
|
-
isBackground?: boolean;
|
|
7
|
-
isBordered?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const Disclose: import("svelte").Component<Props, {}, "">;
|
|
10
|
-
type Disclose = ReturnType<typeof Disclose>;
|
|
11
|
-
export default Disclose;
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { DividerJustify, DividerTypes, DividerSizes } from './api';
|
|
3
|
-
|
|
4
|
-
export let isVertical = false;
|
|
5
|
-
|
|
6
|
-
// start, end (centered by default)
|
|
7
|
-
export let justify: DividerJustify = '';
|
|
8
|
-
// info, success, error, warning
|
|
9
|
-
export let type: DividerTypes = '';
|
|
10
|
-
// small (default is medium) large xlarge
|
|
11
|
-
export let size: DividerSizes = '';
|
|
12
|
-
|
|
13
|
-
const dividerClasses: string = [
|
|
14
|
-
'divider',
|
|
15
|
-
isVertical ? 'divider-vertical' : '',
|
|
16
|
-
justify ? `divider-justify-${justify}` : '',
|
|
17
|
-
size ? `divider-${size}` : '',
|
|
18
|
-
type ? `divider-${type}` : ''
|
|
19
|
-
]
|
|
20
|
-
.filter((cl) => cl.length)
|
|
21
|
-
.join(' ');
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<div class={dividerClasses}></div>
|
|
25
|
-
|
|
26
|
-
<style>
|
|
27
|
-
.divider {
|
|
28
|
-
display: flex;
|
|
29
|
-
justify-content: center;
|
|
30
|
-
align-items: center;
|
|
31
|
-
white-space: nowrap;
|
|
32
|
-
width: 100%;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.divider::before,
|
|
36
|
-
.divider::after {
|
|
37
|
-
content: '';
|
|
38
|
-
background-color: var(--functional-gray-mid);
|
|
39
|
-
height: var(--fluid-2);
|
|
40
|
-
flex-grow: 1;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.divider-small::before,
|
|
44
|
-
.divider-small::after {
|
|
45
|
-
height: 1px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.divider-large::before,
|
|
49
|
-
.divider-large::after {
|
|
50
|
-
height: var(--fluid-4);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.divider-xlarge::before,
|
|
54
|
-
.divider-xlarge::after {
|
|
55
|
-
height: var(--fluid-6);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.divider-justify-end::after,
|
|
59
|
-
.divider-justify-start::before {
|
|
60
|
-
flex-grow: 0;
|
|
61
|
-
flex-basis: 3%;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.divider-content {
|
|
65
|
-
padding-inline-start: var(--fluid-16);
|
|
66
|
-
padding-inline-end: var(--fluid-16);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.divider-vertical {
|
|
70
|
-
height: auto;
|
|
71
|
-
margin: 0 var(--fluid-16);
|
|
72
|
-
width: var(--fluid-16);
|
|
73
|
-
flex-direction: column;
|
|
74
|
-
align-self: stretch;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.divider-vertical::before,
|
|
78
|
-
.divider-vertical::after {
|
|
79
|
-
width: var(--fluid-2);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.divider-vertical.divider-small::before,
|
|
83
|
-
.divider-vertical.divider-small::after {
|
|
84
|
-
width: 1px;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.divider-vertical.divider-large::before,
|
|
88
|
-
.divider-vertical.divider-large::after {
|
|
89
|
-
width: var(--fluid-4);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.divider-vertical.divider-xlarge::before,
|
|
93
|
-
.divider-vertical.divider-xlarge::after {
|
|
94
|
-
width: var(--fluid-6);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.divider-vertical .divider-content {
|
|
98
|
-
padding-inline-start: var(--fluid-24);
|
|
99
|
-
padding-inline-end: var(--fluid-24);
|
|
100
|
-
|
|
101
|
-
/* Since we're vertical we need space from line above/below */
|
|
102
|
-
padding-block-start: var(--fluid-6);
|
|
103
|
-
padding-block-end: var(--fluid-6);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.divider-warning::before,
|
|
107
|
-
.divider-warning::after {
|
|
108
|
-
background-color: var(--functional-warning-border);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.divider-warning .divider-content {
|
|
112
|
-
color: var(--functional-warning-border);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.divider-error::before,
|
|
116
|
-
.divider-error::after {
|
|
117
|
-
background-color: var(--functional-error);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.divider-error .divider-content {
|
|
121
|
-
color: var(--functional-error);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.divider-success::before,
|
|
125
|
-
.divider-success::after {
|
|
126
|
-
background-color: var(--functional-action);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.divider-success .divider-content {
|
|
130
|
-
color: var(--functional-action);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.divider-info::before,
|
|
134
|
-
.divider-info::after {
|
|
135
|
-
background-color: var(--functional-primary);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.divider-info .divider-content {
|
|
139
|
-
color: var(--functional-primary);
|
|
140
|
-
}
|
|
141
|
-
</style>
|