@functionalcms/svelte-components 3.5.20 → 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 -22
- 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 -24
- 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,371 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
export let mode = '';
|
|
3
|
-
export let size = '';
|
|
4
|
-
export let isBordered = false;
|
|
5
|
-
export let isCapsule = false;
|
|
6
|
-
export let isGrouped = false;
|
|
7
|
-
export let isBlock = false;
|
|
8
|
-
export let isLink = false;
|
|
9
|
-
export let isBlank = false;
|
|
10
|
-
export let isDisabled = false;
|
|
11
|
-
export let role = undefined;
|
|
12
|
-
export let isCircle = false;
|
|
13
|
-
export let isRounded = false;
|
|
14
|
-
export let isSkinned = true;
|
|
15
|
-
// The following properties can be used by consumers of Tabs which setup their own
|
|
16
|
-
// custom buttons as these aria and tabindex attributes are required for a11y
|
|
17
|
-
export let ariaSelected = undefined;
|
|
18
|
-
export let ariaControls = undefined;
|
|
19
|
-
export let tabIndex = undefined;
|
|
20
|
-
|
|
21
|
-
$: aSelected = ariaSelected || null;
|
|
22
|
-
$: tIndex = tabIndex || null;
|
|
23
|
-
/**
|
|
24
|
-
* This prop is an escape hatch for global CSS overrides. Likely, the most useful reason to
|
|
25
|
-
* leverage this is to add custom responsive media query code. Note that you'll likely need
|
|
26
|
-
* to add specificity to beat out the Svelte based CSS, and, in Svelte land you'll need to
|
|
27
|
-
* utilize globals functionality which might look like:
|
|
28
|
-
* @media all and (min-width: 769px) {
|
|
29
|
-
* :global(button.btn.button-overrides) {
|
|
30
|
-
* font-size: 18px;
|
|
31
|
-
* ...etc.
|
|
32
|
-
*/
|
|
33
|
-
export let css = '';
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Button type: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button
|
|
37
|
-
* submit: submits form data to the server
|
|
38
|
-
* reset: resets all the controls to their initial values, like <input type="reset">
|
|
39
|
-
* button: button has no default behavior, and does nothing when pressed by default.
|
|
40
|
-
*/
|
|
41
|
-
export let type = 'button';
|
|
42
|
-
|
|
43
|
-
// ******************** HEY! ************************
|
|
44
|
-
// You will need to also add these to the buttonslot:
|
|
45
|
-
// agnostic-svelte/src/stories/ButtonSlot.svelte
|
|
46
|
-
$: klasses = [
|
|
47
|
-
isSkinned ? 'btn' : 'btn-base',
|
|
48
|
-
mode ? `btn-${mode}` : '',
|
|
49
|
-
size ? `btn-${size}` : '',
|
|
50
|
-
isBordered ? 'btn-bordered' : '',
|
|
51
|
-
isCapsule ? 'btn-capsule ' : '',
|
|
52
|
-
isGrouped ? 'btn-grouped' : '',
|
|
53
|
-
isBlock ? 'btn-block' : '',
|
|
54
|
-
isCircle ? 'btn-circle' : '',
|
|
55
|
-
isRounded ? 'btn-rounded' : '',
|
|
56
|
-
isDisabled ? 'disabled' : '',
|
|
57
|
-
isBlank ? 'btn-blank' : '',
|
|
58
|
-
isLink ? 'btn-link' : '',
|
|
59
|
-
css ? `${css}` : ''
|
|
60
|
-
]
|
|
61
|
-
.filter((c) => c)
|
|
62
|
-
.join(' ');
|
|
63
|
-
</script>
|
|
64
|
-
|
|
65
|
-
<!-- https://github.com/sveltejs/svelte/issues/2324 -->
|
|
66
|
-
{#if type === 'faux'}
|
|
67
|
-
<div class={klasses}>
|
|
68
|
-
<slot />
|
|
69
|
-
</div>
|
|
70
|
-
{:else}
|
|
71
|
-
<button
|
|
72
|
-
{type}
|
|
73
|
-
class={klasses}
|
|
74
|
-
on:keydown
|
|
75
|
-
on:click
|
|
76
|
-
on:focus
|
|
77
|
-
on:blur
|
|
78
|
-
{role}
|
|
79
|
-
aria-selected={aSelected}
|
|
80
|
-
aria-controls={ariaControls}
|
|
81
|
-
tab-index={tIndex}
|
|
82
|
-
disabled={isDisabled}
|
|
83
|
-
{...$$restProps}
|
|
84
|
-
>
|
|
85
|
-
<slot />
|
|
86
|
-
</button>
|
|
87
|
-
{/if}
|
|
88
|
-
|
|
89
|
-
<style>
|
|
90
|
-
.btn-base {
|
|
91
|
-
display: inline-flex;
|
|
92
|
-
align-items: center;
|
|
93
|
-
justify-content: center;
|
|
94
|
-
white-space: nowrap;
|
|
95
|
-
user-select: none;
|
|
96
|
-
appearance: none;
|
|
97
|
-
cursor: pointer;
|
|
98
|
-
box-sizing: border-box;
|
|
99
|
-
transition-property: all;
|
|
100
|
-
transition-duration: var(--functional-timing-medium);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.btn {
|
|
104
|
-
/* TODO test this fallback override syntax is correct */
|
|
105
|
-
display: inline-flex;
|
|
106
|
-
align-items: center;
|
|
107
|
-
justify-content: center;
|
|
108
|
-
white-space: nowrap;
|
|
109
|
-
user-select: none;
|
|
110
|
-
appearance: none;
|
|
111
|
-
cursor: pointer;
|
|
112
|
-
box-sizing: border-box;
|
|
113
|
-
transition-property: all;
|
|
114
|
-
transition-duration: var(--functional-timing-medium);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.btn-skin,
|
|
118
|
-
.btn {
|
|
119
|
-
color: var(--functional-btn-font-color, var(--functional-dark));
|
|
120
|
-
background-color: var(--functional-btn-bgcolor, var(--functional-gray-light));
|
|
121
|
-
border-color: var(--functional-btn-bgcolor, var(--functional-gray-light));
|
|
122
|
-
|
|
123
|
-
/* seems like a reasonable default as chrome picks `outset` which results in a weird 3d effect */
|
|
124
|
-
border-style: solid;
|
|
125
|
-
border-width: var(--functional-btn-border-size, 1px);
|
|
126
|
-
font-family: var(--functional-btn-font-family, var(--functional-font-family-body));
|
|
127
|
-
font-weight: var(--functional-btn-font-weight, 400);
|
|
128
|
-
font-size: var(--functional-btn-font-size, 1rem);
|
|
129
|
-
|
|
130
|
-
/* this can be overriden, but it might mess with the balance of the button heights across variants */
|
|
131
|
-
line-height: var(--functional-line-height, var(--fluid-20, 1.25rem));
|
|
132
|
-
padding-block-start: var(--functional-vertical-pad, 0.5rem);
|
|
133
|
-
padding-block-end: var(--functional-vertical-pad, 0.5rem);
|
|
134
|
-
padding-inline-start: var(--functional-side-padding, 0.75rem);
|
|
135
|
-
padding-inline-end: var(--functional-side-padding, 0.75rem);
|
|
136
|
-
text-decoration: none;
|
|
137
|
-
text-align: center;
|
|
138
|
-
outline: none;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.btn:visited {
|
|
142
|
-
color: var(--functional-btn-font-color, var(--functional-dark));
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.btn:hover {
|
|
146
|
-
opacity: 85%;
|
|
147
|
-
text-decoration: none;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.btn:active {
|
|
151
|
-
text-shadow: 0 1px 0 rgb(255 255 255 / 30%);
|
|
152
|
-
text-decoration: none;
|
|
153
|
-
transition-duration: 0s;
|
|
154
|
-
box-shadow: inset 0 1px 3px rgb(0 0 0 / 20%);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.btn:focus {
|
|
158
|
-
box-shadow: 0 0 0 var(--functional-focus-ring-outline-width) var(--functional-focus-ring-color);
|
|
159
|
-
|
|
160
|
-
/* Needed for High Contrast mode */
|
|
161
|
-
outline: var(--functional-focus-ring-outline-width) var(--functional-focus-ring-outline-style)
|
|
162
|
-
var(--functional-focus-ring-outline-color);
|
|
163
|
-
transition: box-shadow var(--functional-timing-fast) ease-out;
|
|
164
|
-
|
|
165
|
-
/* In order for the focused element's box-shadow to appear above its siblings we need to
|
|
166
|
-
establish a new stacking context: https://stackoverflow.com/a/28042700 */
|
|
167
|
-
isolation: isolate;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/*
|
|
171
|
-
* Disabled State
|
|
172
|
-
*
|
|
173
|
-
* The disabled state uses the class .disabled, is-disabled,
|
|
174
|
-
* and the form attribute disabled="disabled".
|
|
175
|
-
* The use of !important is only added because this is a state
|
|
176
|
-
* that must be applied to all buttons when in a disabled state.
|
|
177
|
-
*/
|
|
178
|
-
.btn.disabled,
|
|
179
|
-
.btn:disabled {
|
|
180
|
-
top: 0 !important;
|
|
181
|
-
background: var(--functional-btn-disabled-bg, var(--functional-gray-mid-dark)) !important;
|
|
182
|
-
text-shadow: 0 1px 1px rgb(255 255 255 / 100%) !important;
|
|
183
|
-
|
|
184
|
-
/* primary, secondary, natural, all look same when disabled; and we don't want to
|
|
185
|
-
have an inadvertant looking blue primary border when disabled so it's transparent */
|
|
186
|
-
border-color: transparent;
|
|
187
|
-
color: var(--functional-btn-disabled-color, var(--functional-gray-dark)) !important;
|
|
188
|
-
cursor: default !important;
|
|
189
|
-
appearance: none !important;
|
|
190
|
-
box-shadow: none !important;
|
|
191
|
-
opacity: 80% !important;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.btn-primary {
|
|
195
|
-
background-color: var(--functional-btn-primary, var(--functional-primary));
|
|
196
|
-
border-color: var(--functional-btn-primary, var(--functional-primary));
|
|
197
|
-
color: var(--functional-btn-primary-color, var(--functional-light));
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/* Border and font is primary. When hovered, we invert with primary background and white font */
|
|
201
|
-
.btn-primary.btn-bordered {
|
|
202
|
-
color: var(--functional-btn-primary, var(--functional-primary));
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.btn-primary.btn-bordered:hover,
|
|
206
|
-
.btn-primary.btn-bordered:focus {
|
|
207
|
-
background-color: var(--functional-btn-primary, var(--functional-primary));
|
|
208
|
-
color: var(--functional-btn-primary-color, var(--functional-light));
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.btn-primary:visited {
|
|
212
|
-
color: var(--functional-btn-primary-color, var(--functional-light));
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.btn-secondary {
|
|
216
|
-
background-color: var(--functional-btn-secondary, var(--functional-secondary));
|
|
217
|
-
border-color: var(--functional-btn-secondary, var(--functional-secondary));
|
|
218
|
-
color: var(--functional-btn-secondary-color, var(--functional-light));
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/* Border and font is secondary. When hovered, we invert with secondary background and white font */
|
|
222
|
-
.btn-secondary.btn-bordered {
|
|
223
|
-
color: var(--functional-btn-secondary, var(--functional-secondary));
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.btn-secondary.btn-bordered:hover,
|
|
227
|
-
.btn-secondary.btn-bordered:focus {
|
|
228
|
-
background-color: var(--functional-btn-secondary, var(--functional-secondary));
|
|
229
|
-
color: var(--functional-btn-secondary-color, var(--functional-light));
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.btn-secondary:visited {
|
|
233
|
-
color: var(--functional-btn-secondary-color, var(--functional-light));
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/*
|
|
237
|
-
/**
|
|
238
|
-
* Border Buttons
|
|
239
|
-
*/
|
|
240
|
-
.btn-bordered {
|
|
241
|
-
border-width: 1px;
|
|
242
|
-
background: transparent;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* Sizes
|
|
247
|
-
*/
|
|
248
|
-
.btn-large {
|
|
249
|
-
font-size: calc(var(--functional-btn-font-size, 1rem) + 0.25rem);
|
|
250
|
-
height: 3rem;
|
|
251
|
-
line-height: 3rem;
|
|
252
|
-
padding: 0 3rem;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.btn-small {
|
|
256
|
-
font-size: calc(var(--functional-btn-font-size, 1rem) - 0.25rem);
|
|
257
|
-
height: 2rem;
|
|
258
|
-
line-height: 2rem;
|
|
259
|
-
padding: 0 2rem;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* Rounded
|
|
264
|
-
*/
|
|
265
|
-
.btn-rounded {
|
|
266
|
-
border-radius: var(--functional-btn-radius, var(--functional-radius, 0.25rem));
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.btn-pill {
|
|
270
|
-
border-radius: 200px;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
/*
|
|
274
|
-
* Size Adjustment for equal height & width buttons
|
|
275
|
-
*
|
|
276
|
-
* Remove padding
|
|
277
|
-
*/
|
|
278
|
-
.btn-circle {
|
|
279
|
-
border-radius: 100%;
|
|
280
|
-
width: 2.5rem;
|
|
281
|
-
height: 2.5rem;
|
|
282
|
-
padding: 0 !important;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
.btn-circle-large {
|
|
286
|
-
font-size: calc(var(--functional-btn-font-size, 1rem) + 0.25rem);
|
|
287
|
-
width: 3rem;
|
|
288
|
-
height: 3rem;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.btn-circle-small {
|
|
292
|
-
font-size: calc(var(--functional-btn-font-size, 1rem) - 0.25rem);
|
|
293
|
-
width: 2rem;
|
|
294
|
-
height: 2rem;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* Button Block (stacked)
|
|
299
|
-
*/
|
|
300
|
-
.btn-block {
|
|
301
|
-
width: 100%;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
/* This is a utility class used if you literally want to stack block buttons one after another.
|
|
305
|
-
Apply this class to the nth-of-type(2) onwards to ensure the borders line up properly. */
|
|
306
|
-
.btn-block-following {
|
|
307
|
-
margin-block-start: -1px;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.btn-grouped {
|
|
311
|
-
border-radius: var(--functional-btn-radius, var(--functional-radius, 0.25rem));
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.btn-grouped:not(:last-child) {
|
|
315
|
-
border-top-right-radius: 0;
|
|
316
|
-
border-bottom-right-radius: 0;
|
|
317
|
-
margin-inline-end: -1px;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
.btn-grouped:not(:first-child) {
|
|
321
|
-
border-top-left-radius: 0;
|
|
322
|
-
border-bottom-left-radius: 0;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
.btn-capsule {
|
|
326
|
-
--padding-side: calc(var(--functional-side-padding, 0.75rem) * 1.5);
|
|
327
|
-
|
|
328
|
-
border-radius: var(--functional-radius-capsule);
|
|
329
|
-
padding-inline-start: var(--padding-side);
|
|
330
|
-
padding-inline-end: var(--padding-side);
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
@media (prefers-reduced-motion), (update: slow) {
|
|
334
|
-
.btn,
|
|
335
|
-
.btn:focus {
|
|
336
|
-
transition-duration: 0.001ms !important;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* Invisible buttons. Generally used for a Cancel or icon button that behaves like a button,
|
|
342
|
-
* semantically and for a11y, but, does so without all the typical "button chrome" behind it.
|
|
343
|
-
*/
|
|
344
|
-
:is(.btn-link, .btn-blank) {
|
|
345
|
-
font-family: var(--functional-btn-font-family, var(--functional-font-family-body));
|
|
346
|
-
font-size: var(--functional-btn-font-size, 1rem);
|
|
347
|
-
background-color: transparent;
|
|
348
|
-
border: 0;
|
|
349
|
-
border-radius: 0;
|
|
350
|
-
box-shadow: none;
|
|
351
|
-
transition: none;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
/* Since blank buttons can be used for things like input addons we don't want to go crazy
|
|
355
|
-
on the side padding. As such, these have a good bit less then regular buttons. */
|
|
356
|
-
.btn-blank {
|
|
357
|
-
--functional-btn-blank-side-padding: var(--btn-blank-side-padding, 0.25rem);
|
|
358
|
-
|
|
359
|
-
padding-inline-start: var(--functional-btn-blank-side-padding);
|
|
360
|
-
padding-inline-end: var(--functional-btn-blank-side-padding);
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
/* A button blank with link color text */
|
|
364
|
-
.btn-link {
|
|
365
|
-
color: var(--functional-btn-primary, var(--functional-primary));
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
.btn-link:hover {
|
|
369
|
-
cursor: pointer;
|
|
370
|
-
}
|
|
371
|
-
</style>
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
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> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: Props & {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
15
|
-
default: any;
|
|
16
|
-
} ? Props extends Record<string, never> ? any : {
|
|
17
|
-
children?: any;
|
|
18
|
-
} : {});
|
|
19
|
-
declare const Button: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
20
|
-
[x: string]: any;
|
|
21
|
-
mode?: string | undefined;
|
|
22
|
-
size?: string | undefined;
|
|
23
|
-
isBordered?: boolean | undefined;
|
|
24
|
-
isCapsule?: boolean | undefined;
|
|
25
|
-
isGrouped?: boolean | undefined;
|
|
26
|
-
isBlock?: boolean | undefined;
|
|
27
|
-
isLink?: boolean | undefined;
|
|
28
|
-
isBlank?: boolean | undefined;
|
|
29
|
-
isDisabled?: boolean | undefined;
|
|
30
|
-
role?: undefined;
|
|
31
|
-
isCircle?: boolean | undefined;
|
|
32
|
-
isRounded?: boolean | undefined;
|
|
33
|
-
isSkinned?: boolean | undefined;
|
|
34
|
-
ariaSelected?: undefined;
|
|
35
|
-
ariaControls?: undefined;
|
|
36
|
-
tabIndex?: undefined;
|
|
37
|
-
css?: string | undefined;
|
|
38
|
-
type?: string | undefined;
|
|
39
|
-
}, {
|
|
40
|
-
default: {};
|
|
41
|
-
}>, {
|
|
42
|
-
keydown: KeyboardEvent;
|
|
43
|
-
click: MouseEvent;
|
|
44
|
-
focus: FocusEvent;
|
|
45
|
-
blur: FocusEvent;
|
|
46
|
-
} & {
|
|
47
|
-
[evt: string]: CustomEvent<any>;
|
|
48
|
-
}, {
|
|
49
|
-
default: {};
|
|
50
|
-
}, {}, string>;
|
|
51
|
-
type Button = InstanceType<typeof Button>;
|
|
52
|
-
export default Button;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<style>
|
|
2
|
-
/**
|
|
3
|
-
* Button Groups. See also button-core.css which has btn-grouped which needs to be
|
|
4
|
-
* applied to the buttons that are projected within a button group.
|
|
5
|
-
*/
|
|
6
|
-
.btn-group {
|
|
7
|
-
display: inline-flex;
|
|
8
|
-
flex-direction: row;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
</style>
|
|
12
|
-
|
|
13
|
-
<script lang="ts">
|
|
14
|
-
export let ariaLabel = "";
|
|
15
|
-
export let css = "";
|
|
16
|
-
let klasses: string = ["btn-group", css ? `${css}` : ""].filter((cl) => cl.length).join(' ');
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<div class={klasses} role="group" aria-label={ariaLabel} on:click>
|
|
20
|
-
<slot />
|
|
21
|
-
</div>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
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> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: Props & {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
15
|
-
default: any;
|
|
16
|
-
} ? Props extends Record<string, never> ? any : {
|
|
17
|
-
children?: any;
|
|
18
|
-
} : {});
|
|
19
|
-
declare const ButtonGroup: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
20
|
-
ariaLabel?: string;
|
|
21
|
-
css?: string;
|
|
22
|
-
}, {
|
|
23
|
-
default: {};
|
|
24
|
-
}>, {
|
|
25
|
-
click: MouseEvent;
|
|
26
|
-
} & {
|
|
27
|
-
[evt: string]: CustomEvent<any>;
|
|
28
|
-
}, {
|
|
29
|
-
default: {};
|
|
30
|
-
}, {}, string>;
|
|
31
|
-
type ButtonGroup = InstanceType<typeof ButtonGroup>;
|
|
32
|
-
export default ButtonGroup;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
.btn-base {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
white-space: nowrap;
|
|
6
|
-
user-select: none;
|
|
7
|
-
appearance: none;
|
|
8
|
-
cursor: pointer;
|
|
9
|
-
box-sizing: border-box;
|
|
10
|
-
transition-property: all;
|
|
11
|
-
transition-duration: var(--functional-timing-medium);
|
|
12
|
-
}
|