@functionalcms/svelte-components 3.0.6 → 3.0.7
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/components/Banner.svelte +5 -3
- package/dist/components/Link.svelte +54 -44
- package/dist/components/Logo.svelte +15 -3
- package/dist/components/Spacer.svelte +10 -7
- package/dist/components/Well.svelte +15 -12
- package/dist/components/agnostic/Alert/Alert.svelte +64 -57
- package/dist/components/agnostic/Avatar/Avatar.svelte +19 -15
- package/dist/components/agnostic/Breadcrumb/Breadcrumb.svelte +19 -10
- package/dist/components/agnostic/Button/Button.svelte +60 -35
- package/dist/components/agnostic/Button/ButtonGroup.svelte +4 -3
- package/dist/components/agnostic/Card/Card.svelte +22 -18
- package/dist/components/agnostic/ChoiceInput/ChoiceInput.svelte +87 -59
- package/dist/components/agnostic/Close/Close.svelte +11 -7
- package/dist/components/agnostic/Dialog/Dialog.svelte +64 -42
- package/dist/components/agnostic/Dialog/SvelteA11yDialog.svelte +76 -51
- package/dist/components/agnostic/Disclose/Disclose.svelte +15 -9
- package/dist/components/agnostic/Divider/Divider.svelte +21 -11
- package/dist/components/agnostic/Drawer/Drawer.svelte +20 -16
- package/dist/components/agnostic/EmptyState/EmptyState.svelte +10 -7
- package/dist/components/agnostic/Header/Header.svelte +22 -15
- package/dist/components/agnostic/Header/HeaderNav.svelte +4 -3
- package/dist/components/agnostic/Header/HeaderNavItem.svelte +3 -2
- package/dist/components/agnostic/Icon/Icon.svelte +28 -20
- package/dist/components/agnostic/Loader/Loader.svelte +6 -3
- package/dist/components/agnostic/Progress/Progress.svelte +5 -4
- package/dist/components/agnostic/Spinner/Spinner.svelte +6 -3
- package/dist/components/agnostic/Table/Table.svelte +191 -134
- package/dist/components/agnostic/Tabs/TabButtonCustom.svelte +24 -12
- package/dist/components/agnostic/Tabs/Tabs.svelte +173 -104
- package/dist/components/agnostic/Tag/Tag.svelte +14 -10
- package/dist/components/agnostic/Tag/TagSlots.svelte +2 -1
- package/dist/components/agnostic/Toasts/Toasts.svelte +29 -19
- package/dist/components/agnostic/Tooltip/Tooltip.svelte +85 -68
- package/dist/components/agnostic/Tooltip/TooltipSlots.svelte +2 -1
- package/dist/components/blog/BlogDescription.svelte +6 -4
- package/dist/components/blog/BlogTitle.svelte +8 -6
- package/dist/components/form/Input.svelte +81 -52
- package/dist/components/form/Input.svelte.d.ts +2 -2
- package/dist/components/form/Select.svelte +40 -24
- package/dist/components/layouts/DefaultLayout.svelte +8 -5
- package/dist/components/layouts/Meta.svelte +7 -6
- package/dist/components/layouts/SimpleFooter.svelte +13 -3
- package/dist/components/layouts/Tracker.svelte +2 -1
- package/dist/components/layouts/TwoColumnsLayout.svelte +3 -2
- package/dist/components/menu/CollapsibleMenu.svelte +18 -13
- package/dist/components/menu/DynamicMenu.svelte +16 -10
- package/dist/components/menu/HamburgerMenu.svelte +24 -18
- package/dist/components/menu/Menu.svelte +279 -219
- package/dist/components/menu/MenuItem.svelte +14 -10
- package/dist/components/menu/NavigationItems.svelte +18 -12
- package/dist/components/presentation/Carusel.svelte +77 -72
- package/dist/components/presentation/Gallery.svelte +14 -8
- package/package.json +9 -10
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
<script
|
|
2
|
-
export let
|
|
3
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export let background: string = '';
|
|
3
|
+
export let css: string = '';
|
|
4
|
+
|
|
5
|
+
$: bannerKlasses = ['banner', css].filter((c) => c).join(' ');
|
|
4
6
|
</script>
|
|
5
7
|
|
|
6
8
|
<div class={bannerKlasses} style="--functional-banner-background: {background};">
|
|
@@ -289,50 +289,60 @@ on the side padding. As such, these have a good bit less then regular buttons. *
|
|
|
289
289
|
display: inline-flex;
|
|
290
290
|
flex-direction: row;
|
|
291
291
|
}</style>
|
|
292
|
-
<script>
|
|
293
|
-
import {
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
export let
|
|
297
|
-
export let
|
|
298
|
-
|
|
299
|
-
export let
|
|
300
|
-
export let
|
|
301
|
-
export let
|
|
302
|
-
export let
|
|
303
|
-
export let
|
|
304
|
-
export let
|
|
305
|
-
export let
|
|
306
|
-
export let
|
|
307
|
-
export let
|
|
308
|
-
export let
|
|
309
|
-
export let
|
|
310
|
-
export let
|
|
311
|
-
export let
|
|
312
|
-
export let
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
292
|
+
<script lang='ts'>
|
|
293
|
+
import { AlignItmes, ComponentSize, Justify, Orientation } from './Styling.js'
|
|
294
|
+
import { mergedClasses } from './CssHelper.js';
|
|
295
|
+
|
|
296
|
+
export let css: string = ""
|
|
297
|
+
export let href: string = ""
|
|
298
|
+
|
|
299
|
+
export let isPrimary: boolean = false
|
|
300
|
+
export let isDisabled: boolean = false
|
|
301
|
+
export let isBordered: boolean = false
|
|
302
|
+
export let isSecondary: boolean = false
|
|
303
|
+
export let idRounded: boolean = false
|
|
304
|
+
export let idPill: boolean = false
|
|
305
|
+
export let idBlock: boolean = false
|
|
306
|
+
export let idCapsule: boolean = false
|
|
307
|
+
export let idCircle: boolean = false
|
|
308
|
+
export let idGrouped: boolean = false
|
|
309
|
+
export let isCircle: boolean = false
|
|
310
|
+
export let isFlex: boolean = true
|
|
311
|
+
export let size: ComponentSize = ComponentSize.Normal
|
|
312
|
+
export let justify: Justify = Justify.Center
|
|
313
|
+
export let alignItems: AlignItmes = AlignItmes.Center
|
|
314
|
+
export let orientation: Orientation = Orientation.Row
|
|
315
|
+
export let role: string = "link"
|
|
316
|
+
|
|
317
|
+
$: isSmall = size === ComponentSize.Small
|
|
318
|
+
$: isLarge = size === ComponentSize.Large
|
|
319
|
+
|
|
320
|
+
$: klasses = mergedClasses(
|
|
321
|
+
isPrimary ? 'btn-primary' : '',
|
|
322
|
+
isDisabled? 'disabled': '',
|
|
323
|
+
|
|
324
|
+
isBordered ? 'btn-bordered' : '',
|
|
325
|
+
isSecondary ? 'btn-secondary' : '',
|
|
326
|
+
|
|
327
|
+
idRounded ? 'btn-rounded' : '',
|
|
328
|
+
idPill ? 'btn-pill' : '',
|
|
329
|
+
idBlock ? 'btn-block' : '',
|
|
330
|
+
idCapsule ? 'btn-capsule' : '',
|
|
331
|
+
idCircle ? 'btn-circle' : '',
|
|
332
|
+
idGrouped ? 'btn-grouped' : '',
|
|
333
|
+
|
|
334
|
+
isLarge ? 'btn-large' : '',
|
|
335
|
+
isSmall ? 'btn-small' : '',
|
|
336
|
+
|
|
337
|
+
isLarge && isCircle ? 'btn-large btn-circle-large' : '',
|
|
338
|
+
isSmall && idCircle ? 'btn-small btn-circle-small' : '',
|
|
339
|
+
|
|
340
|
+
isFlex ? `flex` : '',
|
|
341
|
+
isFlex ? `${orientation}` : '',
|
|
342
|
+
isFlex ? `${justify}` : '',
|
|
343
|
+
isFlex ? `${alignItems}` : '',
|
|
344
|
+
|
|
345
|
+
css ? css : 'btn');
|
|
336
346
|
</script>
|
|
337
347
|
<a class={klasses} href={href}>
|
|
338
348
|
<slot />
|
|
@@ -16,9 +16,21 @@
|
|
|
16
16
|
}
|
|
17
17
|
</style>
|
|
18
18
|
|
|
19
|
-
<script>
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
<script lang='ts'>
|
|
20
|
+
/**
|
|
21
|
+
* @type {string}
|
|
22
|
+
*/
|
|
23
|
+
export let companyName: string
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @type {string}
|
|
27
|
+
*/
|
|
28
|
+
export let logoUrl: string
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @type {string}
|
|
32
|
+
*/
|
|
33
|
+
export let css: string = "logo"
|
|
22
34
|
</script>
|
|
23
35
|
|
|
24
36
|
<a href="/" class={css}>
|
|
@@ -5,13 +5,16 @@
|
|
|
5
5
|
}
|
|
6
6
|
</style>
|
|
7
7
|
|
|
8
|
-
<script>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
<script lang='ts'>
|
|
9
|
+
import { Sizes } from "./Styling";
|
|
10
|
+
|
|
11
|
+
export let width: Sizes = Sizes.V0
|
|
12
|
+
export let height: Sizes = Sizes.V0
|
|
13
|
+
|
|
14
|
+
const klasses = [
|
|
15
|
+
width ? `w${width}`: '',
|
|
16
|
+
height ? `h${height}`: ''
|
|
17
|
+
].filter(c => c).join(' ')
|
|
15
18
|
</script>
|
|
16
19
|
<div class={klasses}>
|
|
17
20
|
|
|
@@ -12,18 +12,21 @@
|
|
|
12
12
|
}
|
|
13
13
|
</style>
|
|
14
14
|
|
|
15
|
-
<script>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export let
|
|
19
|
-
export let
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
<script lang='ts'>
|
|
16
|
+
import { AlignItmes, Justify, Orientation } from "./Styling.js"
|
|
17
|
+
|
|
18
|
+
export let css: string = ""
|
|
19
|
+
export let orientation: Orientation = Orientation.Column
|
|
20
|
+
export let justify: Justify = Justify.Start
|
|
21
|
+
export let alignItems: AlignItmes = AlignItmes.Start
|
|
22
|
+
|
|
23
|
+
$: klasses = [
|
|
24
|
+
'flex',
|
|
25
|
+
`${orientation}`,
|
|
26
|
+
`${justify}`,
|
|
27
|
+
`${alignItems}`,
|
|
28
|
+
css ? css : ''
|
|
29
|
+
].filter(c => c).join(" ")
|
|
27
30
|
</script>
|
|
28
31
|
|
|
29
32
|
<div class={klasses}>
|
|
@@ -240,63 +240,70 @@
|
|
|
240
240
|
|
|
241
241
|
</style>
|
|
242
242
|
|
|
243
|
-
<script
|
|
244
|
-
export let
|
|
245
|
-
export let
|
|
246
|
-
export let
|
|
247
|
-
|
|
248
|
-
export let
|
|
249
|
-
export let
|
|
250
|
-
export let
|
|
251
|
-
export let
|
|
252
|
-
export let
|
|
253
|
-
export let
|
|
254
|
-
let
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
243
|
+
<script lang="ts">
|
|
244
|
+
export let isAnimationFadeIn = true;
|
|
245
|
+
export let isAnimationSlideUp = false;
|
|
246
|
+
export let isToast = false;
|
|
247
|
+
|
|
248
|
+
export let isRounded = false;
|
|
249
|
+
export let isBorderAll = false;
|
|
250
|
+
export let isBorderLeft = false;
|
|
251
|
+
export let isBorderRight = false;
|
|
252
|
+
export let isBorderTop = false;
|
|
253
|
+
export let isBorderBottom = false;
|
|
254
|
+
export let isBlockEnd = false;
|
|
255
|
+
export let type = '';
|
|
256
|
+
let typeClass;
|
|
257
|
+
switch (type) {
|
|
258
|
+
case 'warning':
|
|
259
|
+
typeClass = 'alert-warning';
|
|
260
|
+
break;
|
|
261
|
+
case 'dark':
|
|
262
|
+
typeClass = 'alert-dark';
|
|
263
|
+
break;
|
|
264
|
+
case 'error':
|
|
265
|
+
typeClass = 'alert-error';
|
|
266
|
+
break;
|
|
267
|
+
case 'info':
|
|
268
|
+
typeClass = 'alert-info';
|
|
269
|
+
break;
|
|
270
|
+
case 'success':
|
|
271
|
+
typeClass = 'alert-success';
|
|
272
|
+
break;
|
|
273
|
+
default:
|
|
274
|
+
typeClass = '';
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
const ariaAtomicValue = isToast ? true : undefined;
|
|
278
|
+
|
|
279
|
+
$: ariaLiveValue = () => {
|
|
280
|
+
let liveValue: 'assertive' | 'polite' | 'off';
|
|
281
|
+
if (isToast && type === 'error') {
|
|
282
|
+
liveValue = 'assertive';
|
|
283
|
+
} else if (isToast) {
|
|
284
|
+
liveValue = 'polite';
|
|
285
|
+
} else {
|
|
286
|
+
liveValue = 'off';
|
|
287
|
+
}
|
|
288
|
+
return liveValue;
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
const classes = [
|
|
292
|
+
'alert',
|
|
293
|
+
typeClass,
|
|
294
|
+
isRounded ? 'alert-rounded' : '',
|
|
295
|
+
isBorderAll ? 'alert-border-all' : '',
|
|
296
|
+
isBorderLeft ? 'alert-border-left' : '',
|
|
297
|
+
isBorderRight ? 'alert-border-right' : '',
|
|
298
|
+
isBorderTop ? 'alert-border-top' : '',
|
|
299
|
+
isBorderBottom ? 'alert-border-bottom' : '',
|
|
300
|
+
isBlockEnd ? 'alert-end' : '',
|
|
301
|
+
isAnimationFadeIn && !isAnimationSlideUp ? 'fade-in' : '',
|
|
302
|
+
!isAnimationFadeIn && isAnimationSlideUp ? 'slide-up' : '',
|
|
303
|
+
isAnimationFadeIn && isAnimationSlideUp ? 'slide-up-fade-in' : ''
|
|
304
|
+
]
|
|
305
|
+
.filter((klass) => klass.length)
|
|
306
|
+
.join(' ');
|
|
300
307
|
</script>
|
|
301
308
|
|
|
302
309
|
<div
|
|
@@ -100,21 +100,25 @@ respectively generate the <span> tag in their own templates (not the consumer) *
|
|
|
100
100
|
|
|
101
101
|
</style>
|
|
102
102
|
|
|
103
|
-
<script
|
|
104
|
-
export let
|
|
105
|
-
export let
|
|
106
|
-
export let
|
|
107
|
-
export let
|
|
108
|
-
export let
|
|
109
|
-
export let
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
103
|
+
<script lang="ts">
|
|
104
|
+
export let isRounded = false;
|
|
105
|
+
export let isTransparent = false;
|
|
106
|
+
export let isSquare = false;
|
|
107
|
+
export let type = "";
|
|
108
|
+
export let size = "";
|
|
109
|
+
export let text = "";
|
|
110
|
+
export let imgUrl = "";
|
|
111
|
+
|
|
112
|
+
const avatarClasses = [
|
|
113
|
+
"avatar",
|
|
114
|
+
isRounded ? "avatar-rounded" : "",
|
|
115
|
+
isTransparent ? "avatar-transparent" : "",
|
|
116
|
+
isSquare ? "avatar-square" : "",
|
|
117
|
+
type ? `avatar-${type}` : "",
|
|
118
|
+
size ? `avatar-${size}` : "",
|
|
119
|
+
]
|
|
120
|
+
.filter((cls) => cls)
|
|
121
|
+
.join(" ");
|
|
118
122
|
</script>
|
|
119
123
|
|
|
120
124
|
<span class={avatarClasses} data-text={text || null}>
|
|
@@ -31,16 +31,25 @@
|
|
|
31
31
|
|
|
32
32
|
</style>
|
|
33
33
|
|
|
34
|
-
<script
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
<script lang="ts">
|
|
35
|
+
import type { BreadcrumbRoute } from './api';
|
|
36
|
+
export let routes: BreadcrumbRoute[] = [];
|
|
37
|
+
export let type = "";
|
|
38
|
+
|
|
39
|
+
const breadcrumbClasses = ["breadcrumb", type ? `breadcrumb-${type}` : ""]
|
|
40
|
+
.filter((cls) => cls)
|
|
41
|
+
.join(" ");
|
|
42
|
+
|
|
43
|
+
const isLast = (idx): boolean => {
|
|
44
|
+
return idx === routes.length - 1;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const crumbClasses = (index): string => {
|
|
48
|
+
const isLastCrumb = isLast(index);
|
|
49
|
+
return ["breadcrumb-item", isLastCrumb ? "active" : ""]
|
|
50
|
+
.filter((cl) => cl)
|
|
51
|
+
.join(" ");
|
|
52
|
+
};
|
|
44
53
|
</script>
|
|
45
54
|
|
|
46
55
|
<nav aria-label="breadcrumbs">
|
|
@@ -283,41 +283,66 @@ on the side padding. As such, these have a good bit less then regular buttons. *
|
|
|
283
283
|
}
|
|
284
284
|
</style>
|
|
285
285
|
|
|
286
|
-
<script
|
|
287
|
-
export let
|
|
288
|
-
export let
|
|
289
|
-
export let
|
|
290
|
-
export let
|
|
291
|
-
export let
|
|
292
|
-
export let
|
|
293
|
-
export let
|
|
294
|
-
export let
|
|
295
|
-
export let
|
|
296
|
-
export let
|
|
297
|
-
export let
|
|
298
|
-
export let
|
|
299
|
-
export let
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
export let
|
|
305
|
-
|
|
306
|
-
$:
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
286
|
+
<script lang="ts">
|
|
287
|
+
export let mode = "";
|
|
288
|
+
export let size = "";
|
|
289
|
+
export let isBordered = false;
|
|
290
|
+
export let isCapsule = false;
|
|
291
|
+
export let isGrouped = false;
|
|
292
|
+
export let isBlock = false;
|
|
293
|
+
export let isLink = false;
|
|
294
|
+
export let isBlank = false;
|
|
295
|
+
export let isDisabled = false;
|
|
296
|
+
export let role = undefined;
|
|
297
|
+
export let isCircle = false;
|
|
298
|
+
export let isRounded = false;
|
|
299
|
+
export let isSkinned = true;
|
|
300
|
+
// The following properties can be used by consumers of Tabs which setup their own
|
|
301
|
+
// custom buttons as these aria and tabindex attributes are required for a11y
|
|
302
|
+
export let ariaSelected = undefined;
|
|
303
|
+
export let ariaControls = undefined;
|
|
304
|
+
export let tabIndex = undefined;
|
|
305
|
+
|
|
306
|
+
$: aSelected = ariaSelected || null;
|
|
307
|
+
$: tIndex = tabIndex || null;
|
|
308
|
+
/**
|
|
309
|
+
* This prop is an escape hatch for global CSS overrides. Likely, the most useful reason to
|
|
310
|
+
* leverage this is to add custom responsive media query code. Note that you'll likely need
|
|
311
|
+
* to add specificity to beat out the Svelte based CSS, and, in Svelte land you'll need to
|
|
312
|
+
* utilize globals functionality which might look like:
|
|
313
|
+
* @media all and (min-width: 769px) {
|
|
314
|
+
* :global(button.btn.button-overrides) {
|
|
315
|
+
* font-size: 18px;
|
|
316
|
+
* ...etc.
|
|
317
|
+
*/
|
|
318
|
+
export let css = "";
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Button type: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button
|
|
322
|
+
* submit: submits form data to the server
|
|
323
|
+
* reset: resets all the controls to their initial values, like <input type="reset">
|
|
324
|
+
* button: button has no default behavior, and does nothing when pressed by default.
|
|
325
|
+
*/
|
|
326
|
+
export let type = "button";
|
|
327
|
+
|
|
328
|
+
// ******************** HEY! ************************
|
|
329
|
+
// You will need to also add these to the buttonslot:
|
|
330
|
+
// agnostic-svelte/src/stories/ButtonSlot.svelte
|
|
331
|
+
$: klasses = [
|
|
332
|
+
isSkinned ? "btn" : "btn-base",
|
|
333
|
+
mode ? `btn-${mode}` : "",
|
|
334
|
+
size ? `btn-${size}` : "",
|
|
335
|
+
isBordered ? "btn-bordered" : "",
|
|
336
|
+
isCapsule ? "btn-capsule " : "",
|
|
337
|
+
isGrouped ? "btn-grouped" : "",
|
|
338
|
+
isBlock ? "btn-block" : "",
|
|
339
|
+
isCircle ? "btn-circle" : "",
|
|
340
|
+
isRounded ? "btn-rounded" : "",
|
|
341
|
+
isDisabled ? "disabled" : "",
|
|
342
|
+
isBlank ? "btn-blank" : "",
|
|
343
|
+
isLink ? "btn-link" : "",
|
|
344
|
+
css ? `${css}` : "",
|
|
345
|
+
].filter(c => c).join(" ");
|
|
321
346
|
</script>
|
|
322
347
|
|
|
323
348
|
<!-- https://github.com/sveltejs/svelte/issues/2324 -->
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
</style>
|
|
12
12
|
|
|
13
|
-
<script
|
|
14
|
-
export let
|
|
15
|
-
let
|
|
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(' ');
|
|
16
17
|
</script>
|
|
17
18
|
|
|
18
19
|
<div class={klasses} role="group" aria-label={ariaLabel} on:click>
|
|
@@ -108,24 +108,28 @@
|
|
|
108
108
|
|
|
109
109
|
</style>
|
|
110
110
|
|
|
111
|
-
<script
|
|
112
|
-
export let
|
|
113
|
-
export let
|
|
114
|
-
export let
|
|
115
|
-
export let
|
|
116
|
-
export let
|
|
117
|
-
export let
|
|
118
|
-
export let
|
|
119
|
-
let
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
111
|
+
<script lang="ts">
|
|
112
|
+
export let isAnimated = false;
|
|
113
|
+
export let isSkinned = true;
|
|
114
|
+
export let isStacked = false;
|
|
115
|
+
export let isShadow = false;
|
|
116
|
+
export let isBorder = false;
|
|
117
|
+
export let isRounded = false;
|
|
118
|
+
export let type = "";
|
|
119
|
+
export let css = "";
|
|
120
|
+
|
|
121
|
+
let klasses = [
|
|
122
|
+
isSkinned ? "card" : "card-base",
|
|
123
|
+
isAnimated ? "card-animated" : "",
|
|
124
|
+
isStacked ? "card-stacked" : "",
|
|
125
|
+
isShadow ? "card-shadow" : "",
|
|
126
|
+
isRounded ? "card-rounded" : "",
|
|
127
|
+
isBorder ? "card-border" : "",
|
|
128
|
+
type ? `card-${type}` : "",
|
|
129
|
+
css ? `${css}` : "",
|
|
130
|
+
]
|
|
131
|
+
.filter((klass) => klass.length)
|
|
132
|
+
.join(" ");
|
|
129
133
|
</script>
|
|
130
134
|
|
|
131
135
|
<div class={klasses} on:click on:focus on:blur>
|