@skeletonlabs/skeleton 1.6.2-dev.a572946f → 1.6.2-dev.cec7571a

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 (43) hide show
  1. package/dist/components/AppRail/AppRailAnchor.svelte +5 -1
  2. package/dist/components/AppRail/AppRailAnchor.svelte.d.ts +4 -0
  3. package/dist/components/AppRail/AppRailTile.svelte +2 -1
  4. package/dist/components/AppRail/AppRailTile.svelte.d.ts +6 -0
  5. package/dist/components/Autocomplete/Autocomplete.svelte +1 -1
  6. package/dist/components/Autocomplete/Autocomplete.svelte.d.ts +1 -1
  7. package/dist/components/ConicGradient/ConicGradient.svelte +3 -2
  8. package/dist/components/ConicGradient/ConicGradient.svelte.d.ts +3 -1
  9. package/dist/components/ListBox/ListBoxItem.svelte +18 -1
  10. package/dist/components/Paginator/Paginator.svelte +139 -45
  11. package/dist/components/Paginator/Paginator.svelte.d.ts +22 -10
  12. package/dist/components/Paginator/icons.d.ts +4 -0
  13. package/dist/components/Paginator/icons.js +4 -0
  14. package/dist/components/SlideToggle/SlideToggle.svelte +2 -1
  15. package/dist/components/SlideToggle/SlideToggle.svelte.d.ts +3 -1
  16. package/dist/components/Stepper/Step.svelte +13 -3
  17. package/dist/components/Stepper/Step.svelte.d.ts +2 -1
  18. package/dist/components/Stepper/Stepper.svelte.d.ts +3 -3
  19. package/dist/components/Table/Table.svelte +1 -1
  20. package/dist/components/Table/Table.svelte.d.ts +1 -1
  21. package/dist/components/TableOfContents/TableOfContents.svelte +1 -1
  22. package/dist/index.d.ts +21 -21
  23. package/dist/index.js +13 -13
  24. package/dist/styles/all.css +1 -1
  25. package/dist/styles/skeleton.css +1 -1
  26. package/dist/tailwind/generated/intellisense-classes.cjs +1 -1
  27. package/dist/tailwind/generated/intellisense-classes.d.cts +64 -0
  28. package/dist/utilities/CodeBlock/CodeBlock.svelte +2 -2
  29. package/dist/utilities/DataTable/DataTable.d.ts +3 -3
  30. package/dist/utilities/DataTable/DataTable.js +2 -2
  31. package/dist/utilities/DataTable/types.d.ts +1 -1
  32. package/dist/utilities/Drawer/Drawer.svelte +11 -7
  33. package/dist/utilities/Drawer/Drawer.svelte.d.ts +4 -0
  34. package/dist/utilities/Drawer/stores.d.ts +1 -1
  35. package/dist/utilities/LightSwitch/LightSwitch.svelte +3 -2
  36. package/dist/utilities/LightSwitch/lightswitch.js +1 -1
  37. package/dist/utilities/Modal/Modal.svelte +17 -5
  38. package/dist/utilities/Modal/Modal.svelte.d.ts +3 -1
  39. package/dist/utilities/Modal/stores.d.ts +1 -1
  40. package/dist/utilities/Popup/popup.d.ts +1 -1
  41. package/dist/utilities/Toast/Toast.svelte +1 -1
  42. package/dist/utilities/Toast/stores.d.ts +1 -1
  43. package/package.json +16 -13
@@ -1,6 +1,6 @@
1
1
  <script>import { getContext } from "svelte";
2
2
  export let selected = false;
3
- export let regionLead = "";
3
+ export let regionLead = "flex justify-center items-center";
4
4
  export let regionLabel = "";
5
5
  export let hover = getContext("hover");
6
6
  export let active = getContext("active");
@@ -32,6 +32,10 @@ function prunedRestProps() {
32
32
  on:keydown
33
33
  on:keyup
34
34
  on:keypress
35
+ on:mouseover
36
+ on:mouseleave
37
+ on:focus
38
+ on:blur
35
39
  data-testid="app-rail-anchor"
36
40
  >
37
41
  <div class="app-rail-wrapper {classesWrapper}">
@@ -17,6 +17,10 @@ declare const __propDef: {
17
17
  keydown: KeyboardEvent;
18
18
  keyup: KeyboardEvent;
19
19
  keypress: KeyboardEvent;
20
+ mouseover: MouseEvent;
21
+ mouseleave: MouseEvent;
22
+ focus: FocusEvent;
23
+ blur: FocusEvent;
20
24
  } & {
21
25
  [evt: string]: CustomEvent<any>;
22
26
  };
@@ -2,6 +2,7 @@
2
2
  export let group;
3
3
  export let name;
4
4
  export let value;
5
+ export let title = "";
5
6
  export let regionLead = "";
6
7
  export let regionLabel = "";
7
8
  export let hover = getContext("hover");
@@ -30,7 +31,7 @@ function prunedRestProps() {
30
31
  }
31
32
  </script>
32
33
 
33
- <label class="app-rail-tile {classesBase}" data-testid="app-rail-tile">
34
+ <label class="app-rail-tile {classesBase}" data-testid="app-rail-tile" {title} on:mouseover on:mouseleave on:focus on:blur>
34
35
  <!-- A11y attributes are not allowed on <label> -->
35
36
  <div class="app-rail-wrapper {classesWrapper}" on:keydown on:keyup on:keypress>
36
37
  <!-- NOTE: Don't use `hidden` as it prevents `required` from operating -->
@@ -8,6 +8,8 @@ declare const __propDef: {
8
8
  name: string;
9
9
  /** Set the input's value.*/
10
10
  value: any;
11
+ /** Provide a hoverable title attribute for the tile.*/
12
+ title?: string | undefined;
11
13
  /** Provide arbitrary classes to style the lead region.*/
12
14
  regionLead?: string | undefined;
13
15
  /** Provide arbitrary classes to style the label region.*/
@@ -17,6 +19,10 @@ declare const __propDef: {
17
19
  spacing?: string | undefined;
18
20
  };
19
21
  events: {
22
+ mouseover: MouseEvent;
23
+ mouseleave: MouseEvent;
24
+ focus: FocusEvent;
25
+ blur: FocusEvent;
20
26
  keydown: KeyboardEvent;
21
27
  keyup: KeyboardEvent;
22
28
  keypress: KeyboardEvent;
@@ -74,7 +74,7 @@ $:
74
74
  {#if optionsFiltered.length > 0}
75
75
  <nav class="autocomplete-nav {classesNav}">
76
76
  <ul class="autocomplete-list {classesList}">
77
- {#each optionsFiltered.slice(0, sliceLimit) as option, i (option)}
77
+ {#each optionsFiltered.slice(0, sliceLimit) as option (option)}
78
78
  <li class="autocomplete-item {classesItem}">
79
79
  <button class="autocomplete-button {classesButton}" type="button" on:click={() => onSelection(option)} on:click on:keypress>
80
80
  {@html option.label}
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { AutocompleteOption } from './types';
2
+ import type { AutocompleteOption } from './types.js';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
@@ -1,10 +1,11 @@
1
1
  <script>import { afterUpdate } from "svelte";
2
- import { tailwindDefaultColors } from "./settings";
2
+ import { tailwindDefaultColors } from "./settings.js";
3
3
  export let stops = [{ color: ["neutral", 500], start: 0, end: 100 }];
4
4
  export let legend = false;
5
5
  export let spin = false;
6
6
  export let width = "w-24";
7
7
  export let hover = "bg-primary-hover-token";
8
+ export let digits = 0;
8
9
  export let regionCaption = "";
9
10
  export let regionCone = "";
10
11
  export let regionLegend = "";
@@ -32,7 +33,7 @@ function genLegend() {
32
33
  return {
33
34
  label: v.label,
34
35
  color: setColorValue(v.color),
35
- value: v.end - v.start
36
+ value: (v.end - v.start).toFixed(digits)
36
37
  };
37
38
  });
38
39
  }
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { ConicStop } from './types';
2
+ import type { ConicStop } from './types.js';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
@@ -13,6 +13,8 @@ declare const __propDef: {
13
13
  width?: string | undefined;
14
14
  /** Style the legend hover effect.*/
15
15
  hover?: string | undefined;
16
+ /** Set the number of digits on the legend values.*/
17
+ digits?: number | undefined;
16
18
  /** Style the caption region above the gradient.*/
17
19
  regionCaption?: string | undefined;
18
20
  /** Style the conic gradient region.*/
@@ -11,6 +11,23 @@ const cBase = "cursor-pointer -outline-offset-[3px]";
11
11
  const cLabel = "flex items-center space-x-4";
12
12
  let checked;
13
13
  let elemInput;
14
+ function areDeeplyEqual(param1, param2) {
15
+ if (param1 === param2)
16
+ return true;
17
+ if (!(param1 instanceof Object) || !(param2 instanceof Object))
18
+ return false;
19
+ const keys1 = Object.keys(param1);
20
+ const keys2 = Object.keys(param2);
21
+ if (keys1.length !== keys2.length)
22
+ return false;
23
+ for (const key of keys1) {
24
+ const value1 = param1[key];
25
+ const value2 = param2[key];
26
+ if (!areDeeplyEqual(value1, value2))
27
+ return false;
28
+ }
29
+ return true;
30
+ }
14
31
  $:
15
32
  if (multiple)
16
33
  updateCheckbox(group);
@@ -41,7 +58,7 @@ function onKeyDown(event) {
41
58
  }
42
59
  }
43
60
  $:
44
- selected = multiple ? group.includes(value) : group === value;
61
+ selected = multiple ? group.some((groupVal) => areDeeplyEqual(value, groupVal)) : areDeeplyEqual(group, value);
45
62
  $:
46
63
  classesActive = selected ? active : hover;
47
64
  $:
@@ -1,40 +1,79 @@
1
1
  <script>import { createEventDispatcher } from "svelte";
2
+ import { leftAngles, leftArrow, rightAngles, rightArrow } from "./icons.js";
2
3
  const dispatch = createEventDispatcher();
3
4
  export let settings = { offset: 0, limit: 5, size: 0, amounts: [1, 2, 5, 10] };
4
5
  export let disabled = false;
6
+ export let showPreviousNextButtons = true;
5
7
  export let showFirstLastButtons = false;
6
- export let select = "select min-w-[150px]";
8
+ export let showNumerals = false;
9
+ export let maxNumerals = 1;
7
10
  export let justify = "justify-between";
8
- export let text = "text-xs";
11
+ export let select = "select min-w-[150px]";
9
12
  export let amountText = "Items";
10
- export let buttonClasses = "btn-icon variant-filled";
11
- export let buttonTextPrevious = "&larr;";
12
- export let buttonTextNext = "&rarr;";
13
- export let buttonTextFirst = "&laquo;";
14
- export let buttonTextLast = "&raquo;";
13
+ export let regionControl = "btn-group";
14
+ export let controlVariant = "variant-filled";
15
+ export let controlSeparator = "";
16
+ export let active = "variant-filled-primary";
17
+ export let buttonClasses = "!px-3 !py-1.5 fill-current";
18
+ export let buttonTextPrevious = leftArrow;
19
+ export let buttonTextNext = rightArrow;
20
+ export let buttonTextFirst = leftAngles;
21
+ export let buttonTextLast = rightAngles;
15
22
  const cBase = "flex flex-col md:flex-row items-center space-y-4 md:space-y-0 md:space-x-4";
16
23
  const cLabel = "w-full md:w-auto";
17
- const cPageText = "whitespace-nowrap";
24
+ let lastPage = Math.ceil(settings.size / settings.limit - 1);
25
+ let controlPages = getNumerals();
18
26
  function onChangeLength() {
19
27
  settings.offset = 0;
20
28
  dispatch("amount", settings.limit);
29
+ lastPage = Math.ceil(settings.size / settings.limit - 1);
30
+ controlPages = getNumerals();
21
31
  }
22
- function onPrev() {
23
- settings.offset--;
24
- dispatch("page", settings.offset);
25
- }
26
- function onNext() {
27
- settings.offset++;
32
+ function gotoPage(page) {
33
+ if (page < 0)
34
+ return;
35
+ settings.offset = page;
28
36
  dispatch("page", settings.offset);
37
+ controlPages = getNumerals();
29
38
  }
30
- function onFirst() {
31
- settings.offset = 0;
32
- dispatch("page", settings.offset);
39
+ function getFullNumerals() {
40
+ const pages = [];
41
+ for (let index = 0; index <= lastPage; index++) {
42
+ pages.push(index);
43
+ }
44
+ return pages;
33
45
  }
34
- function onLast() {
35
- settings.offset = Math.ceil(settings.size / settings.limit - 1);
36
- dispatch("page", settings.offset);
46
+ function getNumerals() {
47
+ const pages = [];
48
+ const isWithinLeftSection = settings.offset < maxNumerals + 2;
49
+ const isWithinRightSection = settings.offset > lastPage - (maxNumerals + 2);
50
+ if (lastPage <= maxNumerals * 2 + 1)
51
+ return getFullNumerals();
52
+ pages.push(0);
53
+ if (!isWithinLeftSection)
54
+ pages.push(-1);
55
+ if (isWithinLeftSection || isWithinRightSection) {
56
+ const sectionStart = isWithinLeftSection ? 1 : lastPage - (maxNumerals + 2);
57
+ const sectionEnd = isWithinRightSection ? lastPage - 1 : maxNumerals + 2;
58
+ for (let i = sectionStart; i <= sectionEnd; i++) {
59
+ pages.push(i);
60
+ }
61
+ } else {
62
+ for (let i = settings.offset - maxNumerals; i <= settings.offset + maxNumerals; i++) {
63
+ pages.push(i);
64
+ }
65
+ }
66
+ if (!isWithinRightSection)
67
+ pages.push(-1);
68
+ pages.push(lastPage);
69
+ return pages;
37
70
  }
71
+ $:
72
+ classesButtonActive = (page) => {
73
+ return page === settings.offset ? `${active} pointer-events-none` : "";
74
+ };
75
+ $:
76
+ maxNumerals, onChangeLength();
38
77
  $:
39
78
  classesBase = `${cBase} ${justify} ${$$props.class ?? ""}`;
40
79
  $:
@@ -42,38 +81,93 @@ $:
42
81
  $:
43
82
  classesSelect = `${select}`;
44
83
  $:
45
- classesPageText = `${cPageText} ${text}`;
84
+ classesControls = `${regionControl} ${controlVariant} ${controlSeparator}`;
46
85
  </script>
47
86
 
48
- <!-- prettier-ignore -->
49
87
  <div class="paginator {classesBase}" data-testid="paginator">
50
88
  <!-- Select Amount -->
51
- <label class="paginator-label {classesLabel}">
52
- <select bind:value={settings.limit} on:change={() => { onChangeLength() }} class="paginator-select {classesSelect}" {disabled} aria-label="Select Amount">
53
- {#each settings.amounts as amount}<option value={amount}>{amount} {amountText}</option>{/each}
54
- </select>
55
- </label>
56
- <!-- Details -->
57
- <span class="paginator-details {classesPageText}">
58
- {settings.offset * settings.limit + 1} - {Math.min(settings.offset * settings.limit + settings.limit, settings.size)} <span class="opacity-50 px-2">/</span> <strong>{settings.size}</strong>
59
- </span>
60
- <!-- Arrows -->
61
- <div class="paginator-arrows space-x-2">
89
+ {#if settings.amounts.length}
90
+ <label class="paginator-label {classesLabel}">
91
+ <select
92
+ bind:value={settings.limit}
93
+ on:change={onChangeLength}
94
+ class="paginator-select {classesSelect}"
95
+ {disabled}
96
+ aria-label="Select Amount"
97
+ >
98
+ {#each settings.amounts as amount}<option value={amount}>{amount} {amountText}</option>{/each}
99
+ </select>
100
+ </label>
101
+ {/if}
102
+ <!-- Controls -->
103
+ <div class="paginator-controls {classesControls}">
104
+ <!-- Button: First -->
62
105
  {#if showFirstLastButtons}
63
- <button type="button" class="{buttonClasses}" on:click={() => { onFirst() }} disabled={disabled || settings.offset === 0}>
64
- {@html buttonTextFirst}
65
- </button>
106
+ <button
107
+ type="button"
108
+ class={buttonClasses}
109
+ on:click={() => {
110
+ gotoPage(0);
111
+ }}
112
+ disabled={disabled || settings.offset === 0}
113
+ >
114
+ {@html buttonTextFirst}
115
+ </button>
116
+ {/if}
117
+ <!-- Button: Back -->
118
+ {#if showPreviousNextButtons}
119
+ <button
120
+ type="button"
121
+ class={buttonClasses}
122
+ on:click={() => {
123
+ gotoPage(settings.offset - 1);
124
+ }}
125
+ disabled={disabled || settings.offset === 0}
126
+ >
127
+ {@html buttonTextPrevious}
128
+ </button>
129
+ {/if}
130
+ <!-- Center -->
131
+ {#if showNumerals === false}
132
+ <!-- Details -->
133
+ <button type="button" class="{buttonClasses} pointer-events-none !text-sm">
134
+ {settings.offset * settings.limit + 1}-{Math.min(settings.offset * settings.limit + settings.limit, settings.size)}&nbsp;<span
135
+ class="opacity-50">of {settings.size}</span
136
+ >
137
+ </button>
138
+ {:else}
139
+ <!-- Numeric Row -->
140
+ {#each controlPages as page}
141
+ <button type="button" class="{buttonClasses} {classesButtonActive(page)}" on:click={() => gotoPage(page)}>
142
+ {page >= 0 ? page + 1 : '...'}
143
+ </button>
144
+ {/each}
145
+ {/if}
146
+ <!-- Button: Next -->
147
+ {#if showPreviousNextButtons}
148
+ <button
149
+ type="button"
150
+ class={buttonClasses}
151
+ on:click={() => {
152
+ gotoPage(settings.offset + 1);
153
+ }}
154
+ disabled={disabled || (settings.offset + 1) * settings.limit >= settings.size}
155
+ >
156
+ {@html buttonTextNext}
157
+ </button>
66
158
  {/if}
67
- <button type="button" class="{buttonClasses}" on:click={() => { onPrev() }} disabled={disabled || settings.offset === 0}>
68
- {@html buttonTextPrevious}
69
- </button>
70
- <button type="button" class="{buttonClasses}" on:click={() => { onNext() }} disabled={disabled || (settings.offset + 1) * settings.limit >= settings.size}>
71
- {@html buttonTextNext}
72
- </button>
159
+ <!-- Button: last -->
73
160
  {#if showFirstLastButtons}
74
- <button type="button" class="{buttonClasses}" on:click={() => { onLast() }} disabled={disabled || (settings.offset + 1) * settings.limit >= settings.size}>
75
- {@html buttonTextLast}
76
- </button>
161
+ <button
162
+ type="button"
163
+ class={buttonClasses}
164
+ on:click={() => {
165
+ gotoPage(lastPage);
166
+ }}
167
+ disabled={disabled || (settings.offset + 1) * settings.limit >= settings.size}
168
+ >
169
+ {@html buttonTextLast}
170
+ </button>
77
171
  {/if}
78
172
  </div>
79
173
  </div>
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { PaginationSettings } from '../..';
2
+ import type { PaginationSettings } from '../../index.js';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
@@ -7,25 +7,37 @@ declare const __propDef: {
7
7
  settings?: PaginationSettings | undefined;
8
8
  /** Sets selection and buttons to disabled state on-demand.*/
9
9
  disabled?: boolean | undefined;
10
+ /** Show Previous and Next buttons.*/
11
+ showPreviousNextButtons?: boolean | undefined;
10
12
  /** Show First and Last buttons.*/
11
13
  showFirstLastButtons?: boolean | undefined;
12
- /** Provide classes to style the select input.*/
13
- select?: string | undefined;
14
+ /** Displays a numeric row of page buttons.*/
15
+ showNumerals?: boolean | undefined;
16
+ /** Maximum number of active page siblings in the numeric row.*/
17
+ maxNumerals?: number | undefined;
14
18
  /** Provide classes to set flexbox justification.*/
15
19
  justify?: string | undefined;
16
- /** Provide classes to style page info text.*/
17
- text?: string | undefined;
20
+ /** Provide classes to style the select input.*/
21
+ select?: string | undefined;
18
22
  /** Set the text for the amount selection input.*/
19
23
  amountText?: string | undefined;
20
- /** Provide arbitrary classes to the next/previous buttons.*/
24
+ /** Set the base classes for the control element.*/
25
+ regionControl?: string | undefined;
26
+ /** Provide variant style for the control button group.*/
27
+ controlVariant?: string | undefined;
28
+ /** Provide separator style for the control button group.*/
29
+ controlSeparator?: string | undefined;
30
+ /** Provide arbitrary classes to the active page buttons.*/
31
+ active?: string | undefined;
32
+ /** * Set the base button classes.*/
21
33
  buttonClasses?: string | undefined;
22
- /** Set the text label for the Previous button.*/
34
+ /** Set the label for the Previous button.*/
23
35
  buttonTextPrevious?: string | undefined;
24
- /** Set the text label for the Next button.*/
36
+ /** Set the label for the Next button.*/
25
37
  buttonTextNext?: string | undefined;
26
- /** Set the text label for the First button.*/
38
+ /** Set the label for the First button.*/
27
39
  buttonTextFirst?: string | undefined;
28
- /** Set the text label for the Last button.*/
40
+ /** Set the label for the Last button.*/
29
41
  buttonTextLast?: string | undefined;
30
42
  };
31
43
  events: {
@@ -0,0 +1,4 @@
1
+ export declare const leftArrow = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"1em\" viewBox=\"0 0 448 512\"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d=\"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z\"/></svg>";
2
+ export declare const rightArrow = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"1em\" viewBox=\"0 0 448 512\"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d=\"M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z\"/></svg>";
3
+ export declare const leftAngles = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"1em\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d=\"M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160zm352-160l-160 160c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L301.3 256 438.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0z\"/></svg>";
4
+ export declare const rightAngles = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"1em\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d=\"M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z\"/></svg>";
@@ -0,0 +1,4 @@
1
+ export const leftArrow = `<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 448 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"/></svg>`;
2
+ export const rightArrow = `<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 448 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"/></svg>`;
3
+ export const leftAngles = `<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160zm352-160l-160 160c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L301.3 256 438.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0z"/></svg>`;
4
+ export const rightAngles = `<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"/></svg>`;
@@ -3,6 +3,7 @@ const dispatch = createEventDispatcher();
3
3
  export let name;
4
4
  export let checked = false;
5
5
  export let size = "md";
6
+ export let background = "bg-surface-400 dark:bg-surface-700";
6
7
  export let active = "bg-surface-900 dark:bg-surface-300";
7
8
  export let border = "";
8
9
  export let rounded = "rounded-full";
@@ -30,7 +31,7 @@ function onKeyDown(event) {
30
31
  }
31
32
  }
32
33
  $:
33
- cTrackActive = checked ? active : "bg-surface-400 dark:bg-surface-700 cursor-pointer";
34
+ cTrackActive = checked ? active : `${background} cursor-pointer`;
34
35
  $:
35
36
  cThumbBackground = checked ? "bg-white/75" : "bg-white";
36
37
  $:
@@ -8,7 +8,9 @@ declare const __propDef: {
8
8
  checked?: boolean | undefined;
9
9
  /** Sets the size of the component.*/
10
10
  size?: string | undefined;
11
- /** Provide classes to set the checked state color.*/
11
+ /** Provide classe to set the inactive state background color.*/
12
+ background?: string | undefined;
13
+ /** Provide classes to set the active state background color.*/
12
14
  active?: string | undefined;
13
15
  /** Provide classes to set the border styles.*/
14
16
  border?: string | undefined;
@@ -67,10 +67,19 @@ onDestroy(() => {
67
67
  <!-- Navigation -->
68
68
  {#if $state.total > 1}
69
69
  <div class="step-navigation {classesNavigation}" transition:fade|local={{ duration: 100 }}>
70
- <button type={buttonBackType} class="btn {buttonBack}" on:click={onBack} disabled={$state.current === 0}
71
- >{@html buttonBackLabel}</button
72
- >
70
+ {#if stepIndex === 0 && $$slots.navigation}
71
+ <!-- Slot: Navigation -->
72
+ <div class="step-navigation-slot">
73
+ <slot name="navigation" />
74
+ </div>
75
+ {:else}
76
+ <!-- Button: Back -->
77
+ <button type={buttonBackType} class="btn {buttonBack}" on:click={onBack} disabled={$state.current === 0}>
78
+ {@html buttonBackLabel}
79
+ </button>
80
+ {/if}
73
81
  {#if stepIndex < $state.total - 1}
82
+ <!-- Button: Next -->
74
83
  <button type={buttonNextType} class="btn {buttonNext}" on:click={onNext} disabled={locked}>
75
84
  {#if locked}
76
85
  <svg class="w-3 aspect-square" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
@@ -82,6 +91,7 @@ onDestroy(() => {
82
91
  <span>{@html buttonNextLabel}</span>
83
92
  </button>
84
93
  {:else}
94
+ <!-- Button: Complete -->
85
95
  <button type={buttonCompleteType} class="btn {buttonComplete}" on:click={onComplete} disabled={locked}>
86
96
  {@html buttonCompleteLabel}
87
97
  </button>
@@ -1,6 +1,6 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
2
  import type { Writable } from 'svelte/store';
3
- import type { StepperDispatchParent, StepperState } from './types';
3
+ import type { StepperDispatchParent, StepperState } from './types.js';
4
4
  declare const __propDef: {
5
5
  props: {
6
6
  [x: string]: any;
@@ -32,6 +32,7 @@ declare const __propDef: {
32
32
  slots: {
33
33
  header: {};
34
34
  default: {};
35
+ navigation: {};
35
36
  };
36
37
  };
37
38
  export type StepProps = typeof __propDef.props;
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { StepperButton } from './types';
2
+ import type { StepperButton } from './types.js';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
@@ -43,9 +43,9 @@ declare const __propDef: {
43
43
  events: {
44
44
  [evt: string]: CustomEvent<any>;
45
45
  };
46
- /** Provide the HTML label content for the complete button. */ slots: {
46
+ slots: {
47
47
  default: {};
48
- };
48
+ }; /** Provide the HTML label content for the complete button. */
49
49
  };
50
50
  export type StepperProps = typeof __propDef.props;
51
51
  export type StepperEvents = typeof __propDef.events;
@@ -1,5 +1,5 @@
1
1
  <script>import { createEventDispatcher } from "svelte";
2
- import { tableA11y } from "../../utilities/DataTable/actions";
2
+ import { tableA11y } from "../../utilities/DataTable/actions.js";
3
3
  const dispatch = createEventDispatcher();
4
4
  export let source;
5
5
  export let interactive = false;
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { TableSource } from '../..';
2
+ import type { TableSource } from '../../index.js';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
@@ -92,7 +92,7 @@ $:
92
92
  <div class="toc {classesBase}" transition:fade|local={{ duration: 100 }}>
93
93
  <nav class="toc-list {classesList}">
94
94
  <div class="toc-label {classesLabel}">{label}</div>
95
- {#each filteredHeadingsList as headingElem, i}
95
+ {#each filteredHeadingsList as headingElem}
96
96
  <!-- prettier-ignore -->
97
97
  <li
98
98
  class="toc-list-item {classesListItem} {setHeadingClasses(headingElem)} {headingElem.id === activeHeaderId ? active : ''}"
package/dist/index.d.ts CHANGED
@@ -1,25 +1,25 @@
1
- export type { AutocompleteOption } from './components/Autocomplete/types';
2
- export type { ConicStop } from './components/ConicGradient/types';
3
- export type { DrawerSettings } from './utilities/Drawer/types';
4
- export type { ModalSettings, ModalComponent } from './utilities/Modal/types';
5
- export type { ToastSettings } from './utilities/Toast/types';
6
- export type { TableSource } from './components/Table/types';
7
- export type { PaginationSettings } from './components/Paginator/types';
8
- export type { PopupSettings } from './utilities/Popup/types';
1
+ export type { AutocompleteOption } from './components/Autocomplete/types.js';
2
+ export type { ConicStop } from './components/ConicGradient/types.js';
3
+ export type { DrawerSettings } from './utilities/Drawer/types.js';
4
+ export type { ModalSettings, ModalComponent } from './utilities/Modal/types.js';
5
+ export type { ToastSettings } from './utilities/Toast/types.js';
6
+ export type { TableSource } from './components/Table/types.js';
7
+ export type { PaginationSettings } from './components/Paginator/types.js';
8
+ export type { PopupSettings } from './utilities/Popup/types.js';
9
9
  export type CssClasses = string;
10
- export { storeHighlightJs } from './utilities/CodeBlock/stores';
11
- export { storePopup } from './utilities/Popup/popup';
12
- export { drawerStore } from './utilities/Drawer/stores';
13
- export { modalStore } from './utilities/Modal/stores';
14
- export { toastStore } from './utilities/Toast/stores';
15
- export { type DataTableModel, type DataTableOptions, createDataTableStore, dataTableHandler, tableInteraction, tableA11y } from './utilities/DataTable/DataTable';
16
- export { modeOsPrefers, modeUserPrefers, modeCurrent, getModeOsPrefers, getModeUserPrefers, getModeAutoPrefers, setModeUserPrefers, setModeCurrent, setInitialClassState, autoModeWatcher } from './utilities/LightSwitch/lightswitch';
17
- export { localStorageStore } from './utilities/LocalStorageStore/LocalStorageStore';
18
- export { tableSourceMapper, tableSourceValues, tableMapperValues } from './components/Table/utils';
19
- export { clipboard } from './actions/Clipboard/clipboard';
20
- export { filter } from './actions/Filters/filter';
21
- export { focusTrap } from './actions/FocusTrap/focusTrap';
22
- export { popup } from './utilities/Popup/popup';
10
+ export { storeHighlightJs } from './utilities/CodeBlock/stores.js';
11
+ export { storePopup } from './utilities/Popup/popup.js';
12
+ export { drawerStore } from './utilities/Drawer/stores.js';
13
+ export { modalStore } from './utilities/Modal/stores.js';
14
+ export { toastStore } from './utilities/Toast/stores.js';
15
+ export { type DataTableModel, type DataTableOptions, createDataTableStore, dataTableHandler, tableInteraction, tableA11y } from './utilities/DataTable/DataTable.js';
16
+ export { modeOsPrefers, modeUserPrefers, modeCurrent, getModeOsPrefers, getModeUserPrefers, getModeAutoPrefers, setModeUserPrefers, setModeCurrent, setInitialClassState, autoModeWatcher } from './utilities/LightSwitch/lightswitch.js';
17
+ export { localStorageStore } from './utilities/LocalStorageStore/LocalStorageStore.js';
18
+ export { tableSourceMapper, tableSourceValues, tableMapperValues } from './components/Table/utils.js';
19
+ export { clipboard } from './actions/Clipboard/clipboard.js';
20
+ export { filter } from './actions/Filters/filter.js';
21
+ export { focusTrap } from './actions/FocusTrap/focusTrap.js';
22
+ export { popup } from './utilities/Popup/popup.js';
23
23
  export { default as Accordion } from './components/Accordion/Accordion.svelte';
24
24
  export { default as AccordionItem } from './components/Accordion/AccordionItem.svelte';
25
25
  export { default as AppBar } from './components/AppBar/AppBar.svelte';