@skeletonlabs/skeleton 2.9.2 → 3.0.0-next.0
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/core/index.d.ts +2 -0
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -0
- package/dist/plugin/index.cjs +419 -0
- package/dist/plugin/index.cjs.map +1 -0
- package/dist/plugin/index.d.ts +270 -0
- package/dist/themes/index.d.ts +1117 -0
- package/dist/themes/index.js +935 -0
- package/dist/themes/index.js.map +1 -0
- package/package.json +31 -50
- package/README.md +0 -38
- package/dist/actions/Clipboard/clipboard.d.ts +0 -11
- package/dist/actions/Clipboard/clipboard.js +0 -64
- package/dist/actions/Filters/filter.d.ts +0 -6
- package/dist/actions/Filters/filter.js +0 -16
- package/dist/actions/Filters/svg-filters/Apollo.svelte +0 -13
- package/dist/actions/Filters/svg-filters/Apollo.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/BlueNight.svelte +0 -12
- package/dist/actions/Filters/svg-filters/BlueNight.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/Emerald.svelte +0 -23
- package/dist/actions/Filters/svg-filters/Emerald.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/GreenFall.svelte +0 -27
- package/dist/actions/Filters/svg-filters/GreenFall.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/Noir.svelte +0 -17
- package/dist/actions/Filters/svg-filters/Noir.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/NoirLight.svelte +0 -19
- package/dist/actions/Filters/svg-filters/NoirLight.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/Rustic.svelte +0 -14
- package/dist/actions/Filters/svg-filters/Rustic.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/Summer84.svelte +0 -12
- package/dist/actions/Filters/svg-filters/Summer84.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/XPro.svelte +0 -12
- package/dist/actions/Filters/svg-filters/XPro.svelte.d.ts +0 -23
- package/dist/actions/FocusTrap/focusTrap.d.ts +0 -4
- package/dist/actions/FocusTrap/focusTrap.js +0 -89
- package/dist/components/Accordion/Accordion.svelte +0 -49
- package/dist/components/Accordion/Accordion.svelte.d.ts +0 -56
- package/dist/components/Accordion/AccordionItem.svelte +0 -126
- package/dist/components/Accordion/AccordionItem.svelte.d.ts +0 -73
- package/dist/components/AppBar/AppBar.svelte +0 -53
- package/dist/components/AppBar/AppBar.svelte.d.ts +0 -49
- package/dist/components/AppRail/AppRail.svelte +0 -41
- package/dist/components/AppRail/AppRail.svelte.d.ts +0 -45
- package/dist/components/AppRail/AppRailAnchor.svelte +0 -46
- package/dist/components/AppRail/AppRailAnchor.svelte.d.ts +0 -38
- package/dist/components/AppRail/AppRailTile.svelte +0 -60
- package/dist/components/AppRail/AppRailTile.svelte.d.ts +0 -45
- package/dist/components/AppShell/AppShell.svelte +0 -72
- package/dist/components/AppShell/AppShell.svelte.d.ts +0 -50
- package/dist/components/Autocomplete/Autocomplete.svelte +0 -98
- package/dist/components/Autocomplete/Autocomplete.svelte.d.ts +0 -58
- package/dist/components/Autocomplete/types.d.ts +0 -10
- package/dist/components/Autocomplete/types.js +0 -2
- package/dist/components/Avatar/Avatar.svelte +0 -54
- package/dist/components/Avatar/Avatar.svelte.d.ts +0 -50
- package/dist/components/ConicGradient/ConicGradient.svelte +0 -77
- package/dist/components/ConicGradient/ConicGradient.svelte.d.ts +0 -42
- package/dist/components/ConicGradient/settings.d.ts +0 -9
- package/dist/components/ConicGradient/settings.js +0 -334
- package/dist/components/ConicGradient/types.d.ts +0 -10
- package/dist/components/ConicGradient/types.js +0 -2
- package/dist/components/FileButton/FileButton.svelte +0 -37
- package/dist/components/FileButton/FileButton.svelte.d.ts +0 -33
- package/dist/components/FileDropzone/FileDropzone.svelte +0 -63
- package/dist/components/FileDropzone/FileDropzone.svelte.d.ts +0 -55
- package/dist/components/InputChip/InputChip.svelte +0 -203
- package/dist/components/InputChip/InputChip.svelte.d.ts +0 -114
- package/dist/components/ListBox/ListBox.svelte +0 -29
- package/dist/components/ListBox/ListBox.svelte.d.ts +0 -40
- package/dist/components/ListBox/ListBoxItem.svelte +0 -117
- package/dist/components/ListBox/ListBoxItem.svelte.d.ts +0 -41
- package/dist/components/Paginator/Paginator.svelte +0 -190
- package/dist/components/Paginator/Paginator.svelte.d.ts +0 -68
- package/dist/components/Paginator/icons.d.ts +0 -4
- package/dist/components/Paginator/icons.js +0 -4
- package/dist/components/Paginator/types.d.ts +0 -10
- package/dist/components/Paginator/types.js +0 -2
- package/dist/components/ProgressBar/ProgressBar.svelte +0 -50
- package/dist/components/ProgressBar/ProgressBar.svelte.d.ts +0 -36
- package/dist/components/ProgressRadial/ProgressRadial.svelte +0 -73
- package/dist/components/ProgressRadial/ProgressRadial.svelte.d.ts +0 -38
- package/dist/components/Radio/RadioGroup.svelte +0 -29
- package/dist/components/Radio/RadioGroup.svelte.d.ts +0 -44
- package/dist/components/Radio/RadioItem.svelte +0 -61
- package/dist/components/Radio/RadioItem.svelte.d.ts +0 -41
- package/dist/components/RangeSlider/RangeSlider.svelte +0 -72
- package/dist/components/RangeSlider/RangeSlider.svelte.d.ts +0 -41
- package/dist/components/Ratings/Ratings.svelte +0 -52
- package/dist/components/Ratings/Ratings.svelte.d.ts +0 -41
- package/dist/components/SlideToggle/SlideToggle.svelte +0 -91
- package/dist/components/SlideToggle/SlideToggle.svelte.d.ts +0 -44
- package/dist/components/Stepper/Step.svelte +0 -97
- package/dist/components/Stepper/Step.svelte.d.ts +0 -56
- package/dist/components/Stepper/Stepper.svelte +0 -107
- package/dist/components/Stepper/Stepper.svelte.d.ts +0 -85
- package/dist/components/Stepper/types.d.ts +0 -25
- package/dist/components/Stepper/types.js +0 -1
- package/dist/components/Tab/Tab.svelte +0 -95
- package/dist/components/Tab/Tab.svelte.d.ts +0 -49
- package/dist/components/Tab/TabAnchor.svelte +0 -44
- package/dist/components/Tab/TabAnchor.svelte.d.ts +0 -44
- package/dist/components/Tab/TabGroup.svelte +0 -44
- package/dist/components/Tab/TabGroup.svelte.d.ts +0 -48
- package/dist/components/Table/Table.svelte +0 -86
- package/dist/components/Table/Table.svelte.d.ts +0 -42
- package/dist/components/Table/actions.d.ts +0 -8
- package/dist/components/Table/actions.js +0 -114
- package/dist/components/Table/types.d.ts +0 -10
- package/dist/components/Table/types.js +0 -1
- package/dist/components/Table/utils.d.ts +0 -7
- package/dist/components/Table/utils.js +0 -33
- package/dist/components/TreeView/RecursiveTreeView.svelte +0 -64
- package/dist/components/TreeView/RecursiveTreeView.svelte.d.ts +0 -63
- package/dist/components/TreeView/RecursiveTreeViewItem.svelte +0 -141
- package/dist/components/TreeView/RecursiveTreeViewItem.svelte.d.ts +0 -38
- package/dist/components/TreeView/TreeView.svelte +0 -68
- package/dist/components/TreeView/TreeView.svelte.d.ts +0 -55
- package/dist/components/TreeView/TreeViewItem.svelte +0 -319
- package/dist/components/TreeView/TreeViewItem.svelte.d.ts +0 -145
- package/dist/components/TreeView/types.d.ts +0 -17
- package/dist/components/TreeView/types.js +0 -1
- package/dist/index.d.ts +0 -75
- package/dist/index.js +0 -79
- package/dist/internal/transitions.d.ts +0 -10
- package/dist/internal/transitions.js +0 -11
- package/dist/transitions/crossfade.d.ts +0 -1
- package/dist/transitions/crossfade.js +0 -21
- package/dist/types.d.ts +0 -8
- package/dist/types.js +0 -1
- package/dist/utilities/CodeBlock/CodeBlock.svelte +0 -70
- package/dist/utilities/CodeBlock/CodeBlock.svelte.d.ts +0 -43
- package/dist/utilities/CodeBlock/stores.d.ts +0 -2
- package/dist/utilities/CodeBlock/stores.js +0 -3
- package/dist/utilities/Drawer/Drawer.svelte +0 -182
- package/dist/utilities/Drawer/Drawer.svelte.d.ts +0 -62
- package/dist/utilities/Drawer/stores.d.ts +0 -34
- package/dist/utilities/Drawer/stores.js +0 -50
- package/dist/utilities/Drawer/types.d.ts +0 -42
- package/dist/utilities/Drawer/types.js +0 -2
- package/dist/utilities/LightSwitch/LightSwitch.svelte +0 -78
- package/dist/utilities/LightSwitch/LightSwitch.svelte.d.ts +0 -39
- package/dist/utilities/LightSwitch/lightswitch.d.ts +0 -21
- package/dist/utilities/LightSwitch/lightswitch.js +0 -72
- package/dist/utilities/LocalStorageStore/LocalStorageStore.d.ts +0 -12
- package/dist/utilities/LocalStorageStore/LocalStorageStore.js +0 -49
- package/dist/utilities/Modal/Modal.svelte +0 -247
- package/dist/utilities/Modal/Modal.svelte.d.ts +0 -72
- package/dist/utilities/Modal/ModalTest.svelte +0 -8
- package/dist/utilities/Modal/ModalTest.svelte.d.ts +0 -17
- package/dist/utilities/Modal/stores.d.ts +0 -36
- package/dist/utilities/Modal/stores.js +0 -54
- package/dist/utilities/Modal/types.d.ts +0 -41
- package/dist/utilities/Modal/types.js +0 -2
- package/dist/utilities/Popup/popup.d.ts +0 -7
- package/dist/utilities/Popup/popup.js +0 -240
- package/dist/utilities/Popup/types.d.ts +0 -40
- package/dist/utilities/Popup/types.js +0 -2
- package/dist/utilities/PrefersReducedMotion/PrefersReducedMotion.d.ts +0 -7
- package/dist/utilities/PrefersReducedMotion/PrefersReducedMotion.js +0 -26
- package/dist/utilities/TableOfContents/TableOfContents.svelte +0 -56
- package/dist/utilities/TableOfContents/TableOfContents.svelte.d.ts +0 -34
- package/dist/utilities/TableOfContents/crawler.d.ts +0 -16
- package/dist/utilities/TableOfContents/crawler.js +0 -78
- package/dist/utilities/TableOfContents/stores.d.ts +0 -6
- package/dist/utilities/TableOfContents/stores.js +0 -5
- package/dist/utilities/TableOfContents/types.d.ts +0 -5
- package/dist/utilities/TableOfContents/types.js +0 -2
- package/dist/utilities/Toast/Toast.svelte +0 -150
- package/dist/utilities/Toast/Toast.svelte.d.ts +0 -55
- package/dist/utilities/Toast/ToastTest.svelte +0 -16
- package/dist/utilities/Toast/ToastTest.svelte.d.ts +0 -20
- package/dist/utilities/Toast/stores.d.ts +0 -37
- package/dist/utilities/Toast/stores.js +0 -107
- package/dist/utilities/Toast/types.d.ts +0 -35
- package/dist/utilities/Toast/types.js +0 -2
- package/dist/utilities/index.d.ts +0 -18
- package/dist/utilities/index.js +0 -25
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import { fade } from 'svelte/transition';
|
|
3
|
-
import { type Transition, type TransitionParams } from '../../index.js';
|
|
4
|
-
type FadeTransition = typeof fade;
|
|
5
|
-
import type { StepperButton, StepperState } from './types.js';
|
|
6
|
-
declare class __sveltets_Render<TransitionIn extends Transition = FadeTransition, TransitionOut extends Transition = FadeTransition> {
|
|
7
|
-
props(): {
|
|
8
|
-
[x: string]: any;
|
|
9
|
-
/** Provide classes to style the stepper header gap.*/
|
|
10
|
-
gap?: string | undefined;
|
|
11
|
-
/** Provide the verbiage that represents "Step".*/
|
|
12
|
-
stepTerm?: string | undefined;
|
|
13
|
-
/** Provide classes to style the stepper header badges.*/
|
|
14
|
-
badge?: string | undefined;
|
|
15
|
-
/** Provide classes to style the stepper header active step badge.*/
|
|
16
|
-
active?: string | undefined;
|
|
17
|
-
/** Provide classes to style the stepper header border.*/
|
|
18
|
-
border?: string | undefined;
|
|
19
|
-
/** Provide the initially selected step*/
|
|
20
|
-
start?: number | undefined;
|
|
21
|
-
/** Set the justification for the step navigation buttons.*/
|
|
22
|
-
justify?: string | undefined;
|
|
23
|
-
/** Provide arbitrary classes to style the back button.*/
|
|
24
|
-
buttonBack?: string | undefined;
|
|
25
|
-
/** Set the type of the back button.*/
|
|
26
|
-
buttonBackType?: StepperButton | undefined;
|
|
27
|
-
/** Provide the HTML label content for the back button.*/
|
|
28
|
-
buttonBackLabel?: string | undefined;
|
|
29
|
-
/** Provide arbitrary classes to style the next button.*/
|
|
30
|
-
buttonNext?: string | undefined;
|
|
31
|
-
/** Set the type of the next button.*/
|
|
32
|
-
buttonNextType?: StepperButton | undefined;
|
|
33
|
-
/** Provide the HTML label content for the next button.*/
|
|
34
|
-
buttonNextLabel?: string | undefined;
|
|
35
|
-
/** Provide arbitrary classes to style the complete button.*/
|
|
36
|
-
buttonComplete?: string | undefined;
|
|
37
|
-
/** Set the type of the complete button.*/
|
|
38
|
-
buttonCompleteType?: StepperButton | undefined;
|
|
39
|
-
/** Provide the HTML label content for the complete button.*/
|
|
40
|
-
buttonCompleteLabel?: string | undefined;
|
|
41
|
-
/** Provide arbitrary classes to the stepper header region.*/
|
|
42
|
-
regionHeader?: string | undefined;
|
|
43
|
-
/** Provide arbitrary classes to the stepper content region.*/
|
|
44
|
-
regionContent?: string | undefined;
|
|
45
|
-
/** Enable/Disable transitions*/
|
|
46
|
-
transitions?: boolean | undefined;
|
|
47
|
-
/** Provide the transition to used on entry.*/
|
|
48
|
-
transitionIn?: TransitionIn | undefined;
|
|
49
|
-
/** Transition params provided to `transitionIn`.*/
|
|
50
|
-
transitionInParams?: TransitionParams<TransitionIn> | undefined;
|
|
51
|
-
/** Provide the transition to used on exit.*/
|
|
52
|
-
transitionOut?: TransitionOut | undefined;
|
|
53
|
-
/** Transition params provided to `transitionOut`.*/
|
|
54
|
-
transitionOutParams?: TransitionParams<TransitionOut> | undefined;
|
|
55
|
-
};
|
|
56
|
-
events(): {
|
|
57
|
-
next: CustomEvent<{
|
|
58
|
-
step: number;
|
|
59
|
-
state: StepperState;
|
|
60
|
-
}>;
|
|
61
|
-
step: CustomEvent<{
|
|
62
|
-
step: number;
|
|
63
|
-
state: StepperState;
|
|
64
|
-
}>;
|
|
65
|
-
back: CustomEvent<{
|
|
66
|
-
step: number;
|
|
67
|
-
state: StepperState;
|
|
68
|
-
}>;
|
|
69
|
-
complete: CustomEvent<{
|
|
70
|
-
step: number;
|
|
71
|
-
state: StepperState;
|
|
72
|
-
}>;
|
|
73
|
-
} & {
|
|
74
|
-
[evt: string]: CustomEvent<any>;
|
|
75
|
-
};
|
|
76
|
-
slots(): {
|
|
77
|
-
default: {};
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
export type StepperProps<TransitionIn extends Transition = FadeTransition, TransitionOut extends Transition = FadeTransition> = ReturnType<__sveltets_Render<TransitionIn, TransitionOut>['props']>;
|
|
81
|
-
export type StepperEvents<TransitionIn extends Transition = FadeTransition, TransitionOut extends Transition = FadeTransition> = ReturnType<__sveltets_Render<TransitionIn, TransitionOut>['events']>;
|
|
82
|
-
export type StepperSlots<TransitionIn extends Transition = FadeTransition, TransitionOut extends Transition = FadeTransition> = ReturnType<__sveltets_Render<TransitionIn, TransitionOut>['slots']>;
|
|
83
|
-
export default class Stepper<TransitionIn extends Transition = FadeTransition, TransitionOut extends Transition = FadeTransition> extends SvelteComponentTyped<StepperProps<TransitionIn, TransitionOut>, StepperEvents<TransitionIn, TransitionOut>, StepperSlots<TransitionIn, TransitionOut>> {
|
|
84
|
-
}
|
|
85
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { EventDispatcher } from 'svelte';
|
|
2
|
-
export interface StepperState {
|
|
3
|
-
current: number;
|
|
4
|
-
total: number;
|
|
5
|
-
}
|
|
6
|
-
export type StepperButton = 'submit' | 'reset' | 'button';
|
|
7
|
-
export type StepperEvent = {
|
|
8
|
-
next: {
|
|
9
|
-
step: number;
|
|
10
|
-
state: StepperState;
|
|
11
|
-
};
|
|
12
|
-
step: {
|
|
13
|
-
step: number;
|
|
14
|
-
state: StepperState;
|
|
15
|
-
};
|
|
16
|
-
back: {
|
|
17
|
-
step: number;
|
|
18
|
-
state: StepperState;
|
|
19
|
-
};
|
|
20
|
-
complete: {
|
|
21
|
-
step: number;
|
|
22
|
-
state: StepperState;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
export type StepperEventDispatcher = EventDispatcher<StepperEvent>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
<script>import { getContext } from "svelte";
|
|
2
|
-
export let group;
|
|
3
|
-
export let name;
|
|
4
|
-
export let value;
|
|
5
|
-
export let title = "";
|
|
6
|
-
export let controls = "";
|
|
7
|
-
export let regionTab = "";
|
|
8
|
-
export let active = getContext("active");
|
|
9
|
-
export let hover = getContext("hover");
|
|
10
|
-
export let flex = getContext("flex");
|
|
11
|
-
export let padding = getContext("padding");
|
|
12
|
-
export let rounded = getContext("rounded");
|
|
13
|
-
export let spacing = getContext("spacing");
|
|
14
|
-
const cBase = "text-center cursor-pointer transition-colors duration-100";
|
|
15
|
-
const cInterface = "";
|
|
16
|
-
let elemInput;
|
|
17
|
-
function onKeyDown(event) {
|
|
18
|
-
if (["Enter", "Space"].includes(event.code)) {
|
|
19
|
-
event.preventDefault();
|
|
20
|
-
elemInput.click();
|
|
21
|
-
} else if (event.code === "ArrowRight") {
|
|
22
|
-
const tabList = elemInput.closest(".tab-list");
|
|
23
|
-
if (!tabList)
|
|
24
|
-
return;
|
|
25
|
-
const tabs = Array.from(tabList.querySelectorAll(".tab"));
|
|
26
|
-
const currTab = elemInput.closest(".tab");
|
|
27
|
-
if (!currTab)
|
|
28
|
-
return;
|
|
29
|
-
const currIndex = tabs.indexOf(currTab);
|
|
30
|
-
const nextIndex = currIndex + 1 >= tabs.length ? 0 : currIndex + 1;
|
|
31
|
-
const nextTab = tabs[nextIndex];
|
|
32
|
-
const nextTabInput = nextTab?.querySelector("input");
|
|
33
|
-
if (nextTab && nextTabInput) {
|
|
34
|
-
nextTabInput.click();
|
|
35
|
-
nextTab.focus();
|
|
36
|
-
}
|
|
37
|
-
} else if (event.code === "ArrowLeft") {
|
|
38
|
-
const tabList = elemInput.closest(".tab-list");
|
|
39
|
-
if (!tabList)
|
|
40
|
-
return;
|
|
41
|
-
const tabs = Array.from(tabList.querySelectorAll(".tab"));
|
|
42
|
-
const currTab = elemInput.closest(".tab");
|
|
43
|
-
if (!currTab)
|
|
44
|
-
return;
|
|
45
|
-
const currIndex = tabs.indexOf(currTab);
|
|
46
|
-
const nextIndex = currIndex - 1 < 0 ? tabs.length - 1 : currIndex - 1;
|
|
47
|
-
const nextTab = tabs[nextIndex];
|
|
48
|
-
const nextTabInput = nextTab?.querySelector("input");
|
|
49
|
-
if (nextTab && nextTabInput) {
|
|
50
|
-
nextTabInput.click();
|
|
51
|
-
nextTab.focus();
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
$:
|
|
56
|
-
selected = value === group;
|
|
57
|
-
$:
|
|
58
|
-
classesActive = selected ? active : hover;
|
|
59
|
-
$:
|
|
60
|
-
classesBase = `${cBase} ${flex} ${padding} ${rounded} ${classesActive} ${$$props.class ?? ""}`;
|
|
61
|
-
$:
|
|
62
|
-
classesInterface = `${cInterface} ${spacing}`;
|
|
63
|
-
$:
|
|
64
|
-
classesTab = `${regionTab}`;
|
|
65
|
-
function prunedRestProps() {
|
|
66
|
-
delete $$restProps.class;
|
|
67
|
-
return $$restProps;
|
|
68
|
-
}
|
|
69
|
-
</script>
|
|
70
|
-
|
|
71
|
-
<label class={classesBase} {title}>
|
|
72
|
-
<!-- A11y attributes are not allowed on <label> -->
|
|
73
|
-
<div
|
|
74
|
-
class="tab {classesTab}"
|
|
75
|
-
data-testid="tab"
|
|
76
|
-
role="tab"
|
|
77
|
-
aria-controls={controls}
|
|
78
|
-
aria-selected={selected}
|
|
79
|
-
tabindex={selected ? 0 : -1}
|
|
80
|
-
on:keydown={onKeyDown}
|
|
81
|
-
on:keydown
|
|
82
|
-
on:keyup
|
|
83
|
-
on:keypress
|
|
84
|
-
>
|
|
85
|
-
<!-- NOTE: Don't use `hidden` as it prevents `required` from operating -->
|
|
86
|
-
<div class="h-0 w-0 overflow-hidden">
|
|
87
|
-
<input bind:this={elemInput} type="radio" bind:group {name} {value} {...prunedRestProps()} tabindex="-1" on:click on:change />
|
|
88
|
-
</div>
|
|
89
|
-
<!-- Interface -->
|
|
90
|
-
<div class="tab-interface {classesInterface}">
|
|
91
|
-
{#if $$slots.lead}<div class="tab-lead"><slot name="lead" /></div>{/if}
|
|
92
|
-
<div class="tab-label"><slot /></div>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
</label>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
/** Set the radio group binding value.*/
|
|
6
|
-
group: any;
|
|
7
|
-
/** Set a unique name value for the input.*/
|
|
8
|
-
name: string;
|
|
9
|
-
/** Set the input's value.*/
|
|
10
|
-
value: any;
|
|
11
|
-
/** Provide a hoverable title attribute for the tab.*/
|
|
12
|
-
title?: string | undefined;
|
|
13
|
-
/** Set the ARIA controls value to define which panel this tab controls.*/
|
|
14
|
-
controls?: string | undefined;
|
|
15
|
-
/** Provide arbitrary classes to style the tab region.*/
|
|
16
|
-
regionTab?: string | undefined;
|
|
17
|
-
/** Provide classes to style each tab's active styles.*/
|
|
18
|
-
active?: string | undefined;
|
|
19
|
-
/** Provide classes to style each tab's hover styles.*/
|
|
20
|
-
hover?: string | undefined;
|
|
21
|
-
/** Provide classes to style each tab's flex styles.*/
|
|
22
|
-
flex?: string | undefined;
|
|
23
|
-
/** Provide classes to style each tab's padding styles.*/
|
|
24
|
-
padding?: string | undefined;
|
|
25
|
-
/** Provide classes to style each tab's box radius styles.*/
|
|
26
|
-
rounded?: string | undefined;
|
|
27
|
-
/** Provide classes to set the vertical spacing between items.*/
|
|
28
|
-
spacing?: string | undefined;
|
|
29
|
-
};
|
|
30
|
-
events: {
|
|
31
|
-
keydown: KeyboardEvent;
|
|
32
|
-
keyup: KeyboardEvent;
|
|
33
|
-
keypress: KeyboardEvent;
|
|
34
|
-
click: MouseEvent;
|
|
35
|
-
change: Event;
|
|
36
|
-
} & {
|
|
37
|
-
[evt: string]: CustomEvent<any>;
|
|
38
|
-
};
|
|
39
|
-
slots: {
|
|
40
|
-
lead: {};
|
|
41
|
-
default: {};
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
export type TabProps = typeof __propDef.props;
|
|
45
|
-
export type TabEvents = typeof __propDef.events;
|
|
46
|
-
export type TabSlots = typeof __propDef.slots;
|
|
47
|
-
export default class Tab extends SvelteComponentTyped<TabProps, TabEvents, TabSlots> {
|
|
48
|
-
}
|
|
49
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<script>import { getContext } from "svelte";
|
|
2
|
-
export let selected = false;
|
|
3
|
-
export let controls = "";
|
|
4
|
-
export let active = getContext("active");
|
|
5
|
-
export let hover = getContext("hover");
|
|
6
|
-
export let flex = getContext("flex");
|
|
7
|
-
export let padding = getContext("padding");
|
|
8
|
-
export let rounded = getContext("rounded");
|
|
9
|
-
export let spacing = getContext("spacing");
|
|
10
|
-
const cBase = "text-center cursor-pointer transition-colors duration-100";
|
|
11
|
-
const cInterface = "";
|
|
12
|
-
$:
|
|
13
|
-
classesActive = selected ? active : hover;
|
|
14
|
-
$:
|
|
15
|
-
classesBase = `${cBase} ${flex} ${padding} ${rounded} ${classesActive} ${$$props.class ?? ""}`;
|
|
16
|
-
$:
|
|
17
|
-
classesInterface = `${cInterface} ${spacing}`;
|
|
18
|
-
function prunedRestProps() {
|
|
19
|
-
delete $$restProps.class;
|
|
20
|
-
return $$restProps;
|
|
21
|
-
}
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<a
|
|
25
|
-
class="tab-anchor {classesBase}"
|
|
26
|
-
href={$$props.href}
|
|
27
|
-
{...prunedRestProps()}
|
|
28
|
-
aria-controls={controls}
|
|
29
|
-
on:click
|
|
30
|
-
on:keydown
|
|
31
|
-
on:keyup
|
|
32
|
-
on:keypress
|
|
33
|
-
on:mouseover
|
|
34
|
-
on:mouseleave
|
|
35
|
-
on:focus
|
|
36
|
-
on:blur
|
|
37
|
-
data-testid="tab-anchor"
|
|
38
|
-
>
|
|
39
|
-
<!-- Interface -->
|
|
40
|
-
<div class="tab-interface {classesInterface}">
|
|
41
|
-
{#if $$slots.lead}<div class="tab-lead"><slot name="lead" /></div>{/if}
|
|
42
|
-
<div class="tab-label"><slot /></div>
|
|
43
|
-
</div>
|
|
44
|
-
</a>
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
/** Enables the active state styles when set true.*/
|
|
6
|
-
selected?: boolean | undefined;
|
|
7
|
-
/** Set the ARIA controls value to define which panel this tab controls.*/
|
|
8
|
-
controls?: string | undefined;
|
|
9
|
-
/** Provide classes to style each tab's active styles.*/
|
|
10
|
-
active?: string | undefined;
|
|
11
|
-
/** Provide classes to style each tab's hover styles.*/
|
|
12
|
-
hover?: string | undefined;
|
|
13
|
-
/** Provide classes to style each tab's flex styles.*/
|
|
14
|
-
flex?: string | undefined;
|
|
15
|
-
/** Provide classes to style each tab's padding styles.*/
|
|
16
|
-
padding?: string | undefined;
|
|
17
|
-
/** Provide classes to style each tab's box radius styles.*/
|
|
18
|
-
rounded?: string | undefined;
|
|
19
|
-
/** Provide classes to set the vertical spacing between items.*/
|
|
20
|
-
spacing?: string | undefined;
|
|
21
|
-
};
|
|
22
|
-
events: {
|
|
23
|
-
click: MouseEvent;
|
|
24
|
-
keydown: KeyboardEvent;
|
|
25
|
-
keyup: KeyboardEvent;
|
|
26
|
-
keypress: KeyboardEvent;
|
|
27
|
-
mouseover: MouseEvent;
|
|
28
|
-
mouseleave: MouseEvent;
|
|
29
|
-
focus: FocusEvent;
|
|
30
|
-
blur: FocusEvent;
|
|
31
|
-
} & {
|
|
32
|
-
[evt: string]: CustomEvent<any>;
|
|
33
|
-
};
|
|
34
|
-
slots: {
|
|
35
|
-
lead: {};
|
|
36
|
-
default: {};
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
export type TabAnchorProps = typeof __propDef.props;
|
|
40
|
-
export type TabAnchorEvents = typeof __propDef.events;
|
|
41
|
-
export type TabAnchorSlots = typeof __propDef.slots;
|
|
42
|
-
export default class TabAnchor extends SvelteComponentTyped<TabAnchorProps, TabAnchorEvents, TabAnchorSlots> {
|
|
43
|
-
}
|
|
44
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<script>import { setContext } from "svelte";
|
|
2
|
-
export let justify = "justify-start";
|
|
3
|
-
export let border = "border-b border-surface-400-500-token";
|
|
4
|
-
export let active = "border-b-2 border-surface-900-50-token";
|
|
5
|
-
export let hover = "hover:variant-soft";
|
|
6
|
-
export let flex = "flex-none";
|
|
7
|
-
export let padding = "px-4 py-2";
|
|
8
|
-
export let rounded = "rounded-tl-container-token rounded-tr-container-token";
|
|
9
|
-
export let spacing = "space-y-1";
|
|
10
|
-
export let regionList = "";
|
|
11
|
-
export let regionPanel = "";
|
|
12
|
-
export let labelledby = "";
|
|
13
|
-
export let panel = "";
|
|
14
|
-
setContext("active", active);
|
|
15
|
-
setContext("hover", hover);
|
|
16
|
-
setContext("flex", flex);
|
|
17
|
-
setContext("padding", padding);
|
|
18
|
-
setContext("rounded", rounded);
|
|
19
|
-
setContext("spacing", spacing);
|
|
20
|
-
const cBase = "space-y-4";
|
|
21
|
-
const cList = "flex overflow-x-auto hide-scrollbar";
|
|
22
|
-
const cPanel = "";
|
|
23
|
-
$:
|
|
24
|
-
classesBase = `${cBase} ${$$props.class ?? ""}`;
|
|
25
|
-
$:
|
|
26
|
-
classesList = `${cList} ${justify} ${border} ${regionList}`;
|
|
27
|
-
$:
|
|
28
|
-
classesPanel = `${cPanel} ${regionPanel}`;
|
|
29
|
-
</script>
|
|
30
|
-
|
|
31
|
-
<!-- FIXME: resolve a11y warnings -->
|
|
32
|
-
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
|
33
|
-
<div class="tab-group {classesBase}" data-testid="tab-group" on:click on:keypress on:keydown on:keyup>
|
|
34
|
-
<!-- Tab List -->
|
|
35
|
-
<div class="tab-list {classesList}" role="tablist" aria-labelledby={labelledby}>
|
|
36
|
-
<slot />
|
|
37
|
-
</div>
|
|
38
|
-
<!-- Tab Panel -->
|
|
39
|
-
{#if $$slots.panel}
|
|
40
|
-
<div class="tab-panel {classesPanel}" role="tabpanel" aria-labelledby={panel} tabindex="0">
|
|
41
|
-
<slot name="panel" />
|
|
42
|
-
</div>
|
|
43
|
-
{/if}
|
|
44
|
-
</div>
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
/** Provide classes to set the tab list flex justification.*/
|
|
6
|
-
justify?: string | undefined;
|
|
7
|
-
/** Provide classes to set the tab group border styles.*/
|
|
8
|
-
border?: string | undefined;
|
|
9
|
-
/** Provide classes to style each tab's active styles.*/
|
|
10
|
-
active?: string | undefined;
|
|
11
|
-
/** Provide classes to style each tab's hover styles.*/
|
|
12
|
-
hover?: string | undefined;
|
|
13
|
-
/** Provide classes to style each tab's flex styles.*/
|
|
14
|
-
flex?: string | undefined;
|
|
15
|
-
/** Provide classes to style each tab's padding styles.*/
|
|
16
|
-
padding?: string | undefined;
|
|
17
|
-
/** Provide classes to style each tab's box radius styles.*/
|
|
18
|
-
rounded?: string | undefined;
|
|
19
|
-
/** Provide classes to set the vertical spacing between items.*/
|
|
20
|
-
spacing?: string | undefined;
|
|
21
|
-
/** Provide arbitrary classes to style the tab list region.*/
|
|
22
|
-
regionList?: string | undefined;
|
|
23
|
-
/** Provide arbitrary classes to style the tab panel region.*/
|
|
24
|
-
regionPanel?: string | undefined;
|
|
25
|
-
/** Provide the ID of the element that labels the tab list.*/
|
|
26
|
-
labelledby?: string | undefined;
|
|
27
|
-
/** Matches the tab aria-control value, pairs with the panel.*/
|
|
28
|
-
panel?: string | undefined;
|
|
29
|
-
};
|
|
30
|
-
events: {
|
|
31
|
-
click: MouseEvent;
|
|
32
|
-
keypress: KeyboardEvent;
|
|
33
|
-
keydown: KeyboardEvent;
|
|
34
|
-
keyup: KeyboardEvent;
|
|
35
|
-
} & {
|
|
36
|
-
[evt: string]: CustomEvent<any>;
|
|
37
|
-
};
|
|
38
|
-
slots: {
|
|
39
|
-
default: {};
|
|
40
|
-
panel: {};
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
export type TabGroupProps = typeof __propDef.props;
|
|
44
|
-
export type TabGroupEvents = typeof __propDef.events;
|
|
45
|
-
export type TabGroupSlots = typeof __propDef.slots;
|
|
46
|
-
export default class TabGroup extends SvelteComponentTyped<TabGroupProps, TabGroupEvents, TabGroupSlots> {
|
|
47
|
-
}
|
|
48
|
-
export {};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
<script>import { createEventDispatcher } from "svelte";
|
|
2
|
-
import { tableA11y } from "./actions.js";
|
|
3
|
-
const dispatch = createEventDispatcher();
|
|
4
|
-
export let source;
|
|
5
|
-
export let interactive = false;
|
|
6
|
-
export let element = "table";
|
|
7
|
-
export let text = "";
|
|
8
|
-
export let color = "";
|
|
9
|
-
export let regionHead = "";
|
|
10
|
-
export let regionHeadCell = "";
|
|
11
|
-
export let regionBody = "";
|
|
12
|
-
export let regionCell = "";
|
|
13
|
-
export let regionFoot = "";
|
|
14
|
-
export let regionFootCell = "";
|
|
15
|
-
function onRowClick(event, rowIndex) {
|
|
16
|
-
if (!interactive)
|
|
17
|
-
return;
|
|
18
|
-
event.preventDefault();
|
|
19
|
-
event.stopPropagation();
|
|
20
|
-
const rowMetaData = source.meta ? source.meta[rowIndex] : source.body[rowIndex];
|
|
21
|
-
dispatch("selected", rowMetaData);
|
|
22
|
-
}
|
|
23
|
-
function onRowKeydown(event, rowIndex) {
|
|
24
|
-
if (["Enter", "Space"].includes(event.code))
|
|
25
|
-
onRowClick(event, rowIndex);
|
|
26
|
-
}
|
|
27
|
-
$:
|
|
28
|
-
classesBase = `${$$props.class || ""}`;
|
|
29
|
-
$:
|
|
30
|
-
classesTable = `${element} ${text} ${color}`;
|
|
31
|
-
</script>
|
|
32
|
-
|
|
33
|
-
<div class="table-container {classesBase}">
|
|
34
|
-
<!-- Table -->
|
|
35
|
-
<!-- prettier-ignore -->
|
|
36
|
-
<table
|
|
37
|
-
class="{classesTable}"
|
|
38
|
-
class:table-interactive={interactive}
|
|
39
|
-
role={interactive ? "grid" : "table"}
|
|
40
|
-
use:tableA11y
|
|
41
|
-
>
|
|
42
|
-
<!-- on:keydown={(e) => onTableKeydown(elemTable, e)} -->
|
|
43
|
-
<!-- Head -->
|
|
44
|
-
<thead class="table-head {regionHead}">
|
|
45
|
-
<tr>
|
|
46
|
-
{#each source.head as heading }
|
|
47
|
-
<th class="{regionHeadCell}" role="columnheader">{@html heading}</th>
|
|
48
|
-
{/each}
|
|
49
|
-
</tr>
|
|
50
|
-
</thead>
|
|
51
|
-
<!-- Body -->
|
|
52
|
-
<tbody class="table-body {regionBody}">
|
|
53
|
-
{#each source.body as row, rowIndex}
|
|
54
|
-
<!-- Row -->
|
|
55
|
-
<!-- prettier-ignore -->
|
|
56
|
-
<tr
|
|
57
|
-
on:click={(e) => { onRowClick(e, rowIndex); }}
|
|
58
|
-
on:keydown={(e) => { onRowKeydown(e, rowIndex); }}
|
|
59
|
-
aria-rowindex={rowIndex + 1}
|
|
60
|
-
>
|
|
61
|
-
{#each row as cell, cellIndex}
|
|
62
|
-
<!-- Cell -->
|
|
63
|
-
<td
|
|
64
|
-
class="{regionCell}"
|
|
65
|
-
role="gridcell"
|
|
66
|
-
aria-colindex={cellIndex + 1}
|
|
67
|
-
tabindex={cellIndex === 0 && interactive ? 0 : -1}
|
|
68
|
-
>
|
|
69
|
-
{@html Number(cell) === 0 ? cell : (cell ? cell : '-')}
|
|
70
|
-
</td>
|
|
71
|
-
{/each}
|
|
72
|
-
</tr>
|
|
73
|
-
{/each}
|
|
74
|
-
</tbody>
|
|
75
|
-
<!-- Foot -->
|
|
76
|
-
{#if source.foot}
|
|
77
|
-
<tfoot class="table-foot {regionFoot}">
|
|
78
|
-
<tr>
|
|
79
|
-
{#each source.foot as cell }
|
|
80
|
-
<td class="{regionFootCell}">{@html cell}</td>
|
|
81
|
-
{/each}
|
|
82
|
-
</tr>
|
|
83
|
-
</tfoot>
|
|
84
|
-
{/if}
|
|
85
|
-
</table>
|
|
86
|
-
</div>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { TableSource } from '../../index.js';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
/** Provide the full set of table source data.*/
|
|
7
|
-
source: TableSource;
|
|
8
|
-
/** Enables row hover style and `on:selected` event when rows are clicked.*/
|
|
9
|
-
interactive?: boolean | undefined;
|
|
10
|
-
/** Override the Tailwind Element class. Replace this for a headless UI.*/
|
|
11
|
-
element?: string | undefined;
|
|
12
|
-
/** Provide classes to set the table text size.*/
|
|
13
|
-
text?: string | undefined;
|
|
14
|
-
/** Provide classes to set the table text color.*/
|
|
15
|
-
color?: string | undefined;
|
|
16
|
-
/** Provide arbitrary classes for the table head.*/
|
|
17
|
-
regionHead?: string | undefined;
|
|
18
|
-
/** Provide arbitrary classes for the table head cells.*/
|
|
19
|
-
regionHeadCell?: string | undefined;
|
|
20
|
-
/** Provide arbitrary classes for the table body.*/
|
|
21
|
-
regionBody?: string | undefined;
|
|
22
|
-
/** Provide arbitrary classes for the table cells.*/
|
|
23
|
-
regionCell?: string | undefined;
|
|
24
|
-
/** Provide arbitrary classes for the table foot.*/
|
|
25
|
-
regionFoot?: string | undefined;
|
|
26
|
-
/** Provide arbitrary classes for the table foot cells.*/
|
|
27
|
-
regionFootCell?: string | undefined;
|
|
28
|
-
};
|
|
29
|
-
events: {
|
|
30
|
-
/** {rowMetaData} selected - Fires when a table row is clicked.*/
|
|
31
|
-
selected: CustomEvent<string[]>;
|
|
32
|
-
} & {
|
|
33
|
-
[evt: string]: CustomEvent<any>;
|
|
34
|
-
};
|
|
35
|
-
slots: {};
|
|
36
|
-
};
|
|
37
|
-
export type TableProps = typeof __propDef.props;
|
|
38
|
-
export type TableEvents = typeof __propDef.events;
|
|
39
|
-
export type TableSlots = typeof __propDef.slots;
|
|
40
|
-
export default class Table extends SvelteComponentTyped<TableProps, TableEvents, TableSlots> {
|
|
41
|
-
}
|
|
42
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** Svelte Action for applying sort asc/dsc classes. */
|
|
2
|
-
export declare function tableInteraction(node: HTMLElement): {
|
|
3
|
-
destroy(): void;
|
|
4
|
-
};
|
|
5
|
-
/** Svelte Action for handling table a11y keyboard interactions. */
|
|
6
|
-
export declare function tableA11y(node: HTMLElement): {
|
|
7
|
-
destroy(): void;
|
|
8
|
-
};
|