@functionalcms/svelte-components 3.0.5 → 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.
Files changed (55) hide show
  1. package/dist/components/Banner.svelte +5 -3
  2. package/dist/components/Link.svelte +54 -44
  3. package/dist/components/Logo.svelte +15 -3
  4. package/dist/components/Spacer.svelte +10 -7
  5. package/dist/components/Well.svelte +15 -12
  6. package/dist/components/agnostic/Alert/Alert.svelte +64 -57
  7. package/dist/components/agnostic/Avatar/Avatar.svelte +19 -15
  8. package/dist/components/agnostic/Breadcrumb/Breadcrumb.svelte +19 -10
  9. package/dist/components/agnostic/Button/Button.svelte +60 -35
  10. package/dist/components/agnostic/Button/ButtonGroup.svelte +4 -3
  11. package/dist/components/agnostic/Card/Card.svelte +22 -18
  12. package/dist/components/agnostic/ChoiceInput/ChoiceInput.svelte +87 -59
  13. package/dist/components/agnostic/Close/Close.svelte +11 -7
  14. package/dist/components/agnostic/Dialog/Dialog.svelte +64 -42
  15. package/dist/components/agnostic/Dialog/SvelteA11yDialog.svelte +76 -51
  16. package/dist/components/agnostic/Disclose/Disclose.svelte +15 -9
  17. package/dist/components/agnostic/Divider/Divider.svelte +137 -135
  18. package/dist/components/agnostic/Divider/Divider.svelte.d.ts +5 -8
  19. package/dist/components/agnostic/Drawer/Drawer.svelte +20 -16
  20. package/dist/components/agnostic/EmptyState/EmptyState.svelte +10 -7
  21. package/dist/components/agnostic/Header/Header.svelte +22 -15
  22. package/dist/components/agnostic/Header/HeaderNav.svelte +4 -3
  23. package/dist/components/agnostic/Header/HeaderNavItem.svelte +3 -2
  24. package/dist/components/agnostic/Icon/Icon.svelte +28 -20
  25. package/dist/components/agnostic/Loader/Loader.svelte +6 -3
  26. package/dist/components/agnostic/Progress/Progress.svelte +5 -4
  27. package/dist/components/agnostic/Spinner/Spinner.svelte +6 -3
  28. package/dist/components/agnostic/Table/Table.svelte +191 -134
  29. package/dist/components/agnostic/Tabs/TabButtonCustom.svelte +24 -12
  30. package/dist/components/agnostic/Tabs/Tabs.svelte +173 -104
  31. package/dist/components/agnostic/Tag/Tag.svelte +14 -10
  32. package/dist/components/agnostic/Tag/TagSlots.svelte +2 -1
  33. package/dist/components/agnostic/Toasts/Toasts.svelte +29 -19
  34. package/dist/components/agnostic/Tooltip/Tooltip.svelte +85 -68
  35. package/dist/components/agnostic/Tooltip/TooltipSlots.svelte +2 -1
  36. package/dist/components/blog/BlogDescription.svelte +6 -4
  37. package/dist/components/blog/BlogTitle.svelte +8 -6
  38. package/dist/components/form/Input.svelte +81 -52
  39. package/dist/components/form/Input.svelte.d.ts +2 -2
  40. package/dist/components/form/Select.svelte +40 -24
  41. package/dist/components/layouts/DefaultLayout.svelte +8 -5
  42. package/dist/components/layouts/Meta.svelte +7 -6
  43. package/dist/components/layouts/SimpleFooter.svelte +13 -3
  44. package/dist/components/layouts/Tracker.svelte +2 -1
  45. package/dist/components/layouts/TwoColumnsLayout.svelte +3 -2
  46. package/dist/components/menu/CollapsibleMenu.svelte +18 -13
  47. package/dist/components/menu/DynamicMenu.svelte +16 -10
  48. package/dist/components/menu/DynamicMenu.svelte.d.ts +1 -1
  49. package/dist/components/menu/HamburgerMenu.svelte +24 -18
  50. package/dist/components/menu/Menu.svelte +279 -219
  51. package/dist/components/menu/MenuItem.svelte +14 -10
  52. package/dist/components/menu/NavigationItems.svelte +18 -12
  53. package/dist/components/presentation/Carusel.svelte +77 -72
  54. package/dist/components/presentation/Gallery.svelte +14 -8
  55. package/package.json +9 -10
@@ -1,6 +1,8 @@
1
- <script>export let background = "";
2
- export let css = "";
3
- $: bannerKlasses = ["banner", css].filter((c) => c).join(" ");
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>import { AlignItmes, ComponentSize, Justify, Orientation } from "./Styling.js";
293
- import { mergedClasses } from "./CssHelper.js";
294
- export let css = "";
295
- export let href = "";
296
- export let isPrimary = false;
297
- export let isDisabled = false;
298
- export let isBordered = false;
299
- export let isSecondary = false;
300
- export let idRounded = false;
301
- export let idPill = false;
302
- export let idBlock = false;
303
- export let idCapsule = false;
304
- export let idCircle = false;
305
- export let idGrouped = false;
306
- export let isCircle = false;
307
- export let isFlex = true;
308
- export let size = ComponentSize.Normal;
309
- export let justify = Justify.Center;
310
- export let alignItems = AlignItmes.Center;
311
- export let orientation = Orientation.Row;
312
- export let role = "link";
313
- $: isSmall = size === ComponentSize.Small;
314
- $: isLarge = size === ComponentSize.Large;
315
- $: klasses = mergedClasses(
316
- isPrimary ? "btn-primary" : "",
317
- isDisabled ? "disabled" : "",
318
- isBordered ? "btn-bordered" : "",
319
- isSecondary ? "btn-secondary" : "",
320
- idRounded ? "btn-rounded" : "",
321
- idPill ? "btn-pill" : "",
322
- idBlock ? "btn-block" : "",
323
- idCapsule ? "btn-capsule" : "",
324
- idCircle ? "btn-circle" : "",
325
- idGrouped ? "btn-grouped" : "",
326
- isLarge ? "btn-large" : "",
327
- isSmall ? "btn-small" : "",
328
- isLarge && isCircle ? "btn-large btn-circle-large" : "",
329
- isSmall && idCircle ? "btn-small btn-circle-small" : "",
330
- isFlex ? `flex` : "",
331
- isFlex ? `${orientation}` : "",
332
- isFlex ? `${justify}` : "",
333
- isFlex ? `${alignItems}` : "",
334
- css ? css : "btn"
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>export let companyName;
20
- export let logoUrl;
21
- export let css = "logo";
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>import { Sizes } from "./Styling";
9
- export let width = Sizes.V0;
10
- export let height = Sizes.V0;
11
- const klasses = [
12
- width ? `w${width}` : "",
13
- height ? `h${height}` : ""
14
- ].filter((c) => c).join(" ");
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>import { AlignItmes, Justify, Orientation } from "./Styling.js";
16
- export let css = "";
17
- export let orientation = Orientation.Column;
18
- export let justify = Justify.Start;
19
- export let alignItems = AlignItmes.Start;
20
- $: klasses = [
21
- "flex",
22
- `${orientation}`,
23
- `${justify}`,
24
- `${alignItems}`,
25
- css ? css : ""
26
- ].filter((c) => c).join(" ");
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>export let isAnimationFadeIn = true;
244
- export let isAnimationSlideUp = false;
245
- export let isToast = false;
246
- export let isRounded = false;
247
- export let isBorderAll = false;
248
- export let isBorderLeft = false;
249
- export let isBorderRight = false;
250
- export let isBorderTop = false;
251
- export let isBorderBottom = false;
252
- export let isBlockEnd = false;
253
- export let type = "";
254
- let typeClass;
255
- switch (type) {
256
- case "warning":
257
- typeClass = "alert-warning";
258
- break;
259
- case "dark":
260
- typeClass = "alert-dark";
261
- break;
262
- case "error":
263
- typeClass = "alert-error";
264
- break;
265
- case "info":
266
- typeClass = "alert-info";
267
- break;
268
- case "success":
269
- typeClass = "alert-success";
270
- break;
271
- default:
272
- typeClass = "";
273
- }
274
- const ariaAtomicValue = isToast ? true : void 0;
275
- $: ariaLiveValue = () => {
276
- let liveValue;
277
- if (isToast && type === "error") {
278
- liveValue = "assertive";
279
- } else if (isToast) {
280
- liveValue = "polite";
281
- } else {
282
- liveValue = "off";
283
- }
284
- return liveValue;
285
- };
286
- const classes = [
287
- "alert",
288
- typeClass,
289
- isRounded ? "alert-rounded" : "",
290
- isBorderAll ? "alert-border-all" : "",
291
- isBorderLeft ? "alert-border-left" : "",
292
- isBorderRight ? "alert-border-right" : "",
293
- isBorderTop ? "alert-border-top" : "",
294
- isBorderBottom ? "alert-border-bottom" : "",
295
- isBlockEnd ? "alert-end" : "",
296
- isAnimationFadeIn && !isAnimationSlideUp ? "fade-in" : "",
297
- !isAnimationFadeIn && isAnimationSlideUp ? "slide-up" : "",
298
- isAnimationFadeIn && isAnimationSlideUp ? "slide-up-fade-in" : ""
299
- ].filter((klass) => klass.length).join(" ");
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>export let isRounded = false;
104
- export let isTransparent = false;
105
- export let isSquare = false;
106
- export let type = "";
107
- export let size = "";
108
- export let text = "";
109
- export let imgUrl = "";
110
- const avatarClasses = [
111
- "avatar",
112
- isRounded ? "avatar-rounded" : "",
113
- isTransparent ? "avatar-transparent" : "",
114
- isSquare ? "avatar-square" : "",
115
- type ? `avatar-${type}` : "",
116
- size ? `avatar-${size}` : ""
117
- ].filter((cls) => cls).join(" ");
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>export let routes = [];
35
- export let type = "";
36
- const breadcrumbClasses = ["breadcrumb", type ? `breadcrumb-${type}` : ""].filter((cls) => cls).join(" ");
37
- const isLast = (idx) => {
38
- return idx === routes.length - 1;
39
- };
40
- const crumbClasses = (index) => {
41
- const isLastCrumb = isLast(index);
42
- return ["breadcrumb-item", isLastCrumb ? "active" : ""].filter((cl) => cl).join(" ");
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>export let mode = "";
287
- export let size = "";
288
- export let isBordered = false;
289
- export let isCapsule = false;
290
- export let isGrouped = false;
291
- export let isBlock = false;
292
- export let isLink = false;
293
- export let isBlank = false;
294
- export let isDisabled = false;
295
- export let role = void 0;
296
- export let isCircle = false;
297
- export let isRounded = false;
298
- export let isSkinned = true;
299
- export let ariaSelected = void 0;
300
- export let ariaControls = void 0;
301
- export let tabIndex = void 0;
302
- $: aSelected = ariaSelected || null;
303
- $: tIndex = tabIndex || null;
304
- export let css = "";
305
- export let type = "button";
306
- $: klasses = [
307
- isSkinned ? "btn" : "btn-base",
308
- mode ? `btn-${mode}` : "",
309
- size ? `btn-${size}` : "",
310
- isBordered ? "btn-bordered" : "",
311
- isCapsule ? "btn-capsule " : "",
312
- isGrouped ? "btn-grouped" : "",
313
- isBlock ? "btn-block" : "",
314
- isCircle ? "btn-circle" : "",
315
- isRounded ? "btn-rounded" : "",
316
- isDisabled ? "disabled" : "",
317
- isBlank ? "btn-blank" : "",
318
- isLink ? "btn-link" : "",
319
- css ? `${css}` : ""
320
- ].filter((c) => c).join(" ");
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>export let ariaLabel = "";
14
- export let css = "";
15
- let klasses = ["btn-group", css ? `${css}` : ""].filter((cl) => cl.length).join(" ");
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>export let isAnimated = false;
112
- export let isSkinned = true;
113
- export let isStacked = false;
114
- export let isShadow = false;
115
- export let isBorder = false;
116
- export let isRounded = false;
117
- export let type = "";
118
- export let css = "";
119
- let klasses = [
120
- isSkinned ? "card" : "card-base",
121
- isAnimated ? "card-animated" : "",
122
- isStacked ? "card-stacked" : "",
123
- isShadow ? "card-shadow" : "",
124
- isRounded ? "card-rounded" : "",
125
- isBorder ? "card-border" : "",
126
- type ? `card-${type}` : "",
127
- css ? `${css}` : ""
128
- ].filter((klass) => klass.length).join(" ");
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>