seblify 0.3.0 → 0.4.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/README.md +77 -54
- package/dist/components/AppShell.svelte +1 -1
- package/dist/components/Banner.svelte +3 -3
- package/dist/components/Button.svelte +4 -4
- package/dist/components/action/button/button/Button.svelte +1041 -0
- package/dist/components/action/button/button/Button.svelte.d.ts +28 -0
- package/dist/components/action/button/button-group/ButtonGroup.svelte +146 -0
- package/dist/components/action/button/button-group/ButtonGroup.svelte.d.ts +14 -0
- package/dist/components/action/button/floating-action-button/FloatingActionButton.svelte +1102 -0
- package/dist/components/action/button/floating-action-button/FloatingActionButton.svelte.d.ts +26 -0
- package/dist/components/action/button/icon-button/IconButton.svelte +954 -0
- package/dist/components/action/button/icon-button/IconButton.svelte.d.ts +22 -0
- package/dist/components/action/button/timed-button/TimedButton.svelte +1143 -0
- package/dist/components/action/button/timed-button/TimedButton.svelte.d.ts +32 -0
- package/dist/components/action/button/toggle-button/ToggleButton.svelte +1109 -0
- package/dist/components/action/button/toggle-button/ToggleButton.svelte.d.ts +28 -0
- package/dist/components/action/button/toggle-button-group/ToggleButtonGroup.svelte +242 -0
- package/dist/components/action/button/toggle-button-group/ToggleButtonGroup.svelte.d.ts +19 -0
- package/dist/components/action/button/toggle-button-group/ToggleButtonGroup.test.svelte +36 -0
- package/dist/components/action/button/toggle-button-group/ToggleButtonGroup.test.svelte.d.ts +11 -0
- package/dist/components/action/button/toggle-button-group/context.d.ts +8 -0
- package/dist/components/action/button/toggle-button-group/context.js +8 -0
- package/dist/components/action/input/field/pin-input/PinInput.svelte +4 -4
- package/dist/components/action/input/select/checkbox/Checkbox.svelte +4484 -167
- package/dist/components/action/input/select/checkbox/Checkbox.svelte.d.ts +22 -1
- package/dist/components/action/input/select/checkbox/checkbox-relations.svelte.d.ts +11 -12
- package/dist/components/action/input/select/checkbox/checkbox-relations.svelte.js +56 -8
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bounce.d.ts +1 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bounce.html +27 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bounce.js +13 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bump.d.ts +1 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bump.html +12 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bump.js +13 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/draw.d.ts +1 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/draw.html +12 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/draw.js +12 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/fade.d.ts +1 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/fade.html +12 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/fade.js +12 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/pop.d.ts +1 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/pop.html +12 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/pop.js +13 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/rise.d.ts +1 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/rise.html +27 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/rise.js +13 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/scale.d.ts +1 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/scale.html +27 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/scale.js +13 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/visual-state.d.ts +1 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/visual-state.html +12 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/visual-state.js +278 -0
- package/dist/components/action/input/select/{theme-switch/ThemeSwitch.svelte → color-mode-switch/ColorModeSwitch.svelte} +8 -8
- package/dist/components/action/input/select/color-mode-switch/ColorModeSwitch.svelte.d.ts +10 -0
- package/dist/components/action/input/select/segment-control/SegmentControl.svelte +2 -2
- package/dist/components/action/input/select/slider/Slider.svelte +1 -1
- package/dist/components/action/input/select/switch/Switch.svelte +678 -82
- package/dist/components/action/input/select/switch/Switch.svelte.d.ts +1 -1
- package/dist/components/display/annotation/badge/Badge.svelte +732 -63
- package/dist/components/display/annotation/badge/Badge.svelte.d.ts +1 -1
- package/dist/components/display/annotation/tag/Tag.svelte +663 -70
- package/dist/components/display/annotation/tag/Tag.svelte.d.ts +3 -1
- package/dist/components/display/data-display/metric/date-time/DateTimeValue.svelte +59 -0
- package/dist/components/display/data-display/metric/date-time/DateTimeValue.svelte.d.ts +13 -0
- package/dist/components/display/data-display/metric/date-time/DateValue.svelte +52 -0
- package/dist/components/display/data-display/metric/date-time/DateValue.svelte.d.ts +11 -0
- package/dist/components/display/data-display/metric/date-time/TimeValue.svelte +55 -0
- package/dist/components/display/data-display/metric/date-time/TimeValue.svelte.d.ts +12 -0
- package/dist/components/display/data-display/metric/relative-time/RelativeTime.svelte +17 -0
- package/dist/components/display/data-display/metric/relative-time/RelativeTime.svelte.d.ts +6 -1
- package/dist/components/display/data-display/metric/timestamp-card/TimestampCard.svelte +121 -0
- package/dist/components/display/data-display/metric/timestamp-card/TimestampCard.svelte.d.ts +25 -0
- package/dist/components/display/data-display/visual/timeline/TimelineItem.svelte +653 -63
- package/dist/components/display/data-display/visual/timeline/context.d.ts +1 -1
- package/dist/components/display/feedback/loading/loading-dots/LoadingDots.svelte +650 -60
- package/dist/components/display/feedback/loading/loading-dots/LoadingDots.svelte.d.ts +1 -1
- package/dist/components/display/feedback/loading/spinner/Spinner.svelte +650 -60
- package/dist/components/display/feedback/loading/spinner/Spinner.svelte.d.ts +1 -1
- package/dist/components/display/typography/code-snippet/CodeSnippet.svelte +3 -3
- package/dist/components/display/typography/eyebrow/Eyebrow.svelte +2 -2
- package/dist/components/display/typography/highlight/Highlight.svelte +719 -59
- package/dist/components/display/typography/highlight/Highlight.svelte.d.ts +1 -1
- package/dist/components/framework/layout/container/app-shell/AppShell.svelte +16 -2
- package/dist/components/framework/navigation/context/breadcrumb/Breadcrumb.svelte +1 -1
- package/dist/components/framework/navigation/sidebar/sidebar/Sidebar.svelte +35 -10
- package/dist/components/framework/navigation/sidebar/sidenav/Sidenav.svelte +5 -5
- package/dist/components/framework/overlay/tooltip/Tooltip.svelte +2 -3
- package/dist/components/framework/overlay/tooltip/Tooltip.svelte.d.ts +2 -2
- package/dist/components/framework/surface/paper/Paper.svelte +730 -87
- package/dist/components/framework/surface/paper/Paper.svelte.d.ts +1 -1
- package/dist/components/utility/format/date-time/formatDateTime.d.ts +23 -0
- package/dist/components/utility/format/date-time/formatDateTime.js +33 -0
- package/dist/components/utility/format/relative-time/formatRelativeTime.d.ts +7 -0
- package/dist/components/utility/format/relative-time/formatRelativeTime.js +194 -7
- package/dist/design-system/inheritance/tokens.js +6 -0
- package/dist/design-system/reserved-props/allowed-options.d.ts +5 -3
- package/dist/design-system/theme/tokens.d.ts +72 -2
- package/dist/design-system/theme/tokens.js +167 -176
- package/dist/index.d.ts +15 -4
- package/dist/index.js +14 -3
- package/dist/styles/tone-context.css +649 -58
- package/dist/theme.css +1 -183
- package/dist/themes/canopy.css +373 -0
- package/dist/themes/cobalt.css +373 -0
- package/dist/themes/iris.css +373 -0
- package/dist/themes/lumen.css +373 -0
- package/dist/themes/mono.css +373 -0
- package/dist/themes/moss.css +373 -0
- package/dist/themes/noir.css +373 -0
- package/dist/themes/plain.css +373 -0
- package/dist/themes/pulse.css +373 -0
- package/dist/themes/signal.css +373 -0
- package/dist/themes/slate.css +373 -0
- package/dist/themes/solar.css +373 -0
- package/dist/themes/sorbet.css +373 -0
- package/dist/themes/studio.css +369 -0
- package/dist/themes/vesper.css +373 -0
- package/package.json +18 -2
- package/dist/components/action/input/select/theme-switch/ThemeSwitch.svelte.d.ts +0 -10
|
@@ -1,15 +1,36 @@
|
|
|
1
|
-
type
|
|
1
|
+
import type { CustomCssSize } from 'seblify';
|
|
2
|
+
type CheckboxAnimation = 'none' | 'fade' | 'scale' | 'bump' | 'pop' | 'draw' | 'rise' | 'bounce';
|
|
3
|
+
type CheckboxVariant = 'solid' | 'outline' | 'soft' | 'tint' | 'plain' | 'blank' | 'inset' | 'overflow';
|
|
4
|
+
type CheckboxRadius = 'none' | 'sm' | 'md' | 'lg' | 'full' | CustomCssSize;
|
|
5
|
+
type CheckboxSize = 'sm' | 'md' | 'lg' | 'xl' | CustomCssSize;
|
|
6
|
+
type CheckboxIntermediateMark = 'dash' | 'tilde' | 'dot' | 'square';
|
|
7
|
+
type CheckboxTone = 'neutral' | 'strong' | 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
|
|
2
8
|
type CheckboxVisualState = 'default' | 'derived' | 'indirect' | 'direct-and-derived' | 'direct-and-indirect';
|
|
9
|
+
type CheckboxManagedState = {
|
|
10
|
+
checked: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
indeterminate?: boolean;
|
|
13
|
+
toggle?: () => void;
|
|
14
|
+
trigger?: () => void;
|
|
15
|
+
visualState?: CheckboxVisualState;
|
|
16
|
+
};
|
|
3
17
|
declare const Checkbox: import("svelte").Component<{
|
|
18
|
+
animation?: CheckboxAnimation | undefined;
|
|
4
19
|
ariaLabel?: string | undefined;
|
|
5
20
|
checked?: boolean | undefined;
|
|
6
21
|
disabled?: boolean | undefined;
|
|
22
|
+
duration?: number | undefined;
|
|
7
23
|
label?: string | undefined;
|
|
8
24
|
description?: string | undefined;
|
|
9
25
|
indeterminate?: boolean | undefined;
|
|
26
|
+
intermediateMark?: CheckboxIntermediateMark | undefined;
|
|
27
|
+
managed?: CheckboxManagedState | undefined;
|
|
10
28
|
name?: string | undefined;
|
|
11
29
|
onclick?: ((event: MouseEvent) => void) | undefined;
|
|
30
|
+
radius?: CheckboxRadius | undefined;
|
|
31
|
+
size?: CheckboxSize | undefined;
|
|
12
32
|
tone?: CheckboxTone | undefined;
|
|
33
|
+
variant?: CheckboxVariant | undefined;
|
|
13
34
|
visualState?: CheckboxVisualState | undefined;
|
|
14
35
|
value?: string | undefined;
|
|
15
36
|
}, {}, "checked">;
|
|
@@ -13,35 +13,34 @@ export interface CheckboxRelationsConfig {
|
|
|
13
13
|
items: Record<CheckboxRelationsId, CheckboxRelationsItemConfig>;
|
|
14
14
|
}
|
|
15
15
|
export type CheckboxRelationsVisualState = 'default' | 'indirect';
|
|
16
|
-
export interface
|
|
16
|
+
export interface CheckboxRelationsState {
|
|
17
17
|
blockedBy: CheckboxRelationsId[];
|
|
18
18
|
checked: boolean;
|
|
19
19
|
directChecked: boolean;
|
|
20
|
-
disabled: boolean;
|
|
21
|
-
indirectChecked: boolean;
|
|
22
|
-
requires: CheckboxRelationsId[];
|
|
23
|
-
selects: CheckboxRelationsId[];
|
|
24
|
-
setChecked: (checked: boolean) => void;
|
|
25
|
-
toggle: () => void;
|
|
26
|
-
visualState: CheckboxRelationsVisualState;
|
|
27
|
-
}
|
|
28
|
-
export interface CheckboxRelationsGroupState {
|
|
29
|
-
checked: boolean;
|
|
30
20
|
directSelectedCount: number;
|
|
21
|
+
disabled: boolean;
|
|
31
22
|
indeterminate: boolean;
|
|
23
|
+
indirectChecked: boolean;
|
|
32
24
|
indirectSelectedCount: number;
|
|
33
25
|
itemIds: CheckboxRelationsId[];
|
|
26
|
+
requires: CheckboxRelationsId[];
|
|
27
|
+
selects: CheckboxRelationsId[];
|
|
34
28
|
selectedCount: number;
|
|
35
29
|
selectableCount: number;
|
|
36
30
|
setChecked: (checked: boolean) => void;
|
|
37
31
|
toggle: () => void;
|
|
32
|
+
trigger: () => void;
|
|
38
33
|
visualState: CheckboxRelationsVisualState;
|
|
39
34
|
}
|
|
35
|
+
export type CheckboxRelationsItemState = CheckboxRelationsState;
|
|
36
|
+
export type CheckboxRelationsGroupState = CheckboxRelationsState;
|
|
40
37
|
export interface CheckboxRelations {
|
|
41
38
|
group: (id: CheckboxRelationsId) => CheckboxRelationsGroupState;
|
|
42
39
|
item: (id: CheckboxRelationsId) => CheckboxRelationsItemState;
|
|
40
|
+
setChecked: (id: CheckboxRelationsId, checked: boolean) => void;
|
|
43
41
|
setItemChecked: (id: CheckboxRelationsId, checked: boolean) => void;
|
|
44
42
|
toggleGroup: (id: CheckboxRelationsId) => void;
|
|
45
43
|
toggleItem: (id: CheckboxRelationsId) => void;
|
|
44
|
+
trigger: (id: CheckboxRelationsId) => void;
|
|
46
45
|
}
|
|
47
|
-
export declare function
|
|
46
|
+
export declare function createCheckboxManager(config: CheckboxRelationsConfig): CheckboxRelations;
|
|
@@ -1,31 +1,48 @@
|
|
|
1
|
-
export function
|
|
1
|
+
export function createCheckboxManager(config) {
|
|
2
2
|
const items = config.items;
|
|
3
3
|
const groups = normalizeGroups(config.groups ?? {});
|
|
4
4
|
let directChecked = $state(Object.fromEntries(Object.entries(items).map(([id, item]) => [id, item.checked === true])));
|
|
5
5
|
const effectiveChecked = $derived(resolveEffectiveChecked(items, groups, directChecked));
|
|
6
6
|
function item(id) {
|
|
7
|
+
if (items[id]) {
|
|
8
|
+
return leafItem(id);
|
|
9
|
+
}
|
|
10
|
+
if (groups[id]) {
|
|
11
|
+
return group(id);
|
|
12
|
+
}
|
|
13
|
+
throw new Error(`Unknown checkbox relations item or group "${id}".`);
|
|
14
|
+
}
|
|
15
|
+
function leafItem(id) {
|
|
7
16
|
const config = getItemConfig(items, id);
|
|
8
17
|
const blockedBy = getBlockedBy(items, id, effectiveChecked);
|
|
9
18
|
const checked = effectiveChecked.has(id);
|
|
10
19
|
const direct = directChecked[id] === true && checked;
|
|
11
20
|
const indirect = checked && !direct;
|
|
21
|
+
const selectableCount = config.disabled === true || blockedBy.length > 0 ? 0 : 1;
|
|
12
22
|
return {
|
|
13
23
|
blockedBy,
|
|
14
24
|
checked,
|
|
15
25
|
directChecked: direct,
|
|
26
|
+
directSelectedCount: direct ? 1 : 0,
|
|
16
27
|
disabled: config.disabled === true || blockedBy.length > 0,
|
|
28
|
+
indeterminate: false,
|
|
17
29
|
indirectChecked: indirect,
|
|
30
|
+
indirectSelectedCount: indirect ? 1 : 0,
|
|
31
|
+
itemIds: [id],
|
|
18
32
|
requires: config.requires ?? [],
|
|
19
33
|
selects: config.selects ?? [],
|
|
34
|
+
selectedCount: checked ? 1 : 0,
|
|
35
|
+
selectableCount,
|
|
20
36
|
setChecked: (checked) => setItemChecked(id, checked),
|
|
21
|
-
toggle: () =>
|
|
37
|
+
toggle: () => trigger(id),
|
|
38
|
+
trigger: () => trigger(id),
|
|
22
39
|
visualState: indirect ? 'indirect' : 'default',
|
|
23
40
|
};
|
|
24
41
|
}
|
|
25
42
|
function group(id) {
|
|
26
43
|
const itemIds = getGroupItemIds(groups, id);
|
|
27
44
|
const selectableItems = itemIds
|
|
28
|
-
.map((itemId) =>
|
|
45
|
+
.map((itemId) => leafItem(itemId))
|
|
29
46
|
.filter((itemState) => !itemState.disabled);
|
|
30
47
|
const selectedCount = selectableItems.filter((itemState) => itemState.checked).length;
|
|
31
48
|
const directSelectedCount = selectableItems.filter((itemState) => itemState.directChecked).length;
|
|
@@ -33,27 +50,56 @@ export function createCheckboxRelations(config) {
|
|
|
33
50
|
const checked = selectableItems.length > 0 && selectedCount === selectableItems.length;
|
|
34
51
|
const visualState = selectedCount > 0 && directSelectedCount === 0 ? 'indirect' : 'default';
|
|
35
52
|
return {
|
|
53
|
+
blockedBy: [],
|
|
36
54
|
checked,
|
|
55
|
+
directChecked: checked && directSelectedCount > 0,
|
|
37
56
|
directSelectedCount,
|
|
57
|
+
disabled: selectableItems.length === 0,
|
|
38
58
|
indeterminate: selectedCount > 0 && !checked,
|
|
59
|
+
indirectChecked: checked && directSelectedCount === 0,
|
|
39
60
|
indirectSelectedCount,
|
|
40
61
|
itemIds,
|
|
62
|
+
requires: [],
|
|
63
|
+
selects: [],
|
|
41
64
|
selectedCount,
|
|
42
65
|
selectableCount: selectableItems.length,
|
|
43
66
|
setChecked: (checked) => setGroupChecked(id, checked),
|
|
44
|
-
toggle: () =>
|
|
67
|
+
toggle: () => trigger(id),
|
|
68
|
+
trigger: () => trigger(id),
|
|
45
69
|
visualState,
|
|
46
70
|
};
|
|
47
71
|
}
|
|
72
|
+
function trigger(id) {
|
|
73
|
+
if (items[id]) {
|
|
74
|
+
toggleItem(id);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (groups[id]) {
|
|
78
|
+
toggleGroup(id);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
throw new Error(`Unknown checkbox relations item or group "${id}".`);
|
|
82
|
+
}
|
|
83
|
+
function setChecked(id, checked) {
|
|
84
|
+
if (items[id]) {
|
|
85
|
+
setItemChecked(id, checked);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (groups[id]) {
|
|
89
|
+
setGroupChecked(id, checked);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
throw new Error(`Unknown checkbox relations item or group "${id}".`);
|
|
93
|
+
}
|
|
48
94
|
function setItemChecked(id, checked) {
|
|
49
|
-
const currentItem =
|
|
95
|
+
const currentItem = leafItem(id);
|
|
50
96
|
if (currentItem.disabled && checked) {
|
|
51
97
|
return;
|
|
52
98
|
}
|
|
53
99
|
directChecked[id] = checked;
|
|
54
100
|
}
|
|
55
101
|
function toggleItem(id) {
|
|
56
|
-
const currentItem =
|
|
102
|
+
const currentItem = leafItem(id);
|
|
57
103
|
if (currentItem.disabled) {
|
|
58
104
|
return;
|
|
59
105
|
}
|
|
@@ -62,7 +108,7 @@ export function createCheckboxRelations(config) {
|
|
|
62
108
|
function setGroupChecked(id, checked) {
|
|
63
109
|
const groupItemIds = getGroupItemIds(groups, id);
|
|
64
110
|
if (!checked) {
|
|
65
|
-
const selectableItemIds = groupItemIds.filter((itemId) => !
|
|
111
|
+
const selectableItemIds = groupItemIds.filter((itemId) => !leafItem(itemId).disabled);
|
|
66
112
|
for (const itemId of selectableItemIds) {
|
|
67
113
|
directChecked[itemId] = false;
|
|
68
114
|
}
|
|
@@ -72,7 +118,7 @@ export function createCheckboxRelations(config) {
|
|
|
72
118
|
while (changed) {
|
|
73
119
|
changed = false;
|
|
74
120
|
for (const itemId of groupItemIds) {
|
|
75
|
-
const currentItem =
|
|
121
|
+
const currentItem = leafItem(itemId);
|
|
76
122
|
if (!currentItem.disabled && directChecked[itemId] !== true) {
|
|
77
123
|
directChecked[itemId] = true;
|
|
78
124
|
changed = true;
|
|
@@ -87,9 +133,11 @@ export function createCheckboxRelations(config) {
|
|
|
87
133
|
return {
|
|
88
134
|
group,
|
|
89
135
|
item,
|
|
136
|
+
setChecked,
|
|
90
137
|
setItemChecked,
|
|
91
138
|
toggleGroup,
|
|
92
139
|
toggleItem,
|
|
140
|
+
trigger,
|
|
93
141
|
};
|
|
94
142
|
}
|
|
95
143
|
function normalizeGroups(groups) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../../../../../theme.css';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Checkbox Bounce Visual Test</title>
|
|
7
|
+
<script type="module" src="./bounce.ts"></script>
|
|
8
|
+
<style>
|
|
9
|
+
body {
|
|
10
|
+
min-height: 100vh;
|
|
11
|
+
margin: 0;
|
|
12
|
+
background: #f5f7fb;
|
|
13
|
+
color: #172033;
|
|
14
|
+
display: grid;
|
|
15
|
+
place-items: center;
|
|
16
|
+
font-family:
|
|
17
|
+
Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
18
|
+
'Segoe UI', sans-serif;
|
|
19
|
+
}
|
|
20
|
+
</style>
|
|
21
|
+
</head>
|
|
22
|
+
<body>
|
|
23
|
+
<main>
|
|
24
|
+
<div id="checkbox-root"></div>
|
|
25
|
+
</main>
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { mount } from 'svelte';
|
|
2
|
+
import '../../../../../../../theme.css';
|
|
3
|
+
import Checkbox from '../../Checkbox.svelte';
|
|
4
|
+
mount(Checkbox, {
|
|
5
|
+
target: document.getElementById('checkbox-root'),
|
|
6
|
+
props: {
|
|
7
|
+
animation: 'bounce',
|
|
8
|
+
duration: 900,
|
|
9
|
+
label: 'Bounce checkbox',
|
|
10
|
+
size: 'xl',
|
|
11
|
+
tone: 'primary',
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../../../../../theme.css';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Checkbox bump animation fixture</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="checkbox-root"></div>
|
|
10
|
+
<script type="module" src="./bump.ts"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { mount } from 'svelte';
|
|
2
|
+
import '../../../../../../../theme.css';
|
|
3
|
+
import Checkbox from '../../Checkbox.svelte';
|
|
4
|
+
mount(Checkbox, {
|
|
5
|
+
target: document.getElementById('checkbox-root'),
|
|
6
|
+
props: {
|
|
7
|
+
animation: 'bump',
|
|
8
|
+
duration: 1000,
|
|
9
|
+
label: 'Bump checkbox',
|
|
10
|
+
size: 'xl',
|
|
11
|
+
tone: 'primary',
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../../../../../theme.css';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Checkbox draw animation fixture</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="checkbox-root"></div>
|
|
10
|
+
<script type="module" src="./draw.ts"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { mount } from 'svelte';
|
|
2
|
+
import '../../../../../../../theme.css';
|
|
3
|
+
import Checkbox from '../../Checkbox.svelte';
|
|
4
|
+
mount(Checkbox, {
|
|
5
|
+
target: document.getElementById('checkbox-root'),
|
|
6
|
+
props: {
|
|
7
|
+
animation: 'draw',
|
|
8
|
+
label: 'Draw checkbox',
|
|
9
|
+
size: 'xl',
|
|
10
|
+
tone: 'primary',
|
|
11
|
+
},
|
|
12
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../../../../../theme.css';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Checkbox fade animation fixture</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="checkbox-root"></div>
|
|
10
|
+
<script type="module" src="./fade.ts"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { mount } from 'svelte';
|
|
2
|
+
import '../../../../../../../theme.css';
|
|
3
|
+
import Checkbox from '../../Checkbox.svelte';
|
|
4
|
+
mount(Checkbox, {
|
|
5
|
+
target: document.getElementById('checkbox-root'),
|
|
6
|
+
props: {
|
|
7
|
+
animation: 'fade',
|
|
8
|
+
label: 'Fade checkbox',
|
|
9
|
+
size: 'xl',
|
|
10
|
+
tone: 'primary',
|
|
11
|
+
},
|
|
12
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../../../../../theme.css';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Checkbox pop animation fixture</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="checkbox-root"></div>
|
|
10
|
+
<script type="module" src="./pop.ts"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { mount } from 'svelte';
|
|
2
|
+
import '../../../../../../../theme.css';
|
|
3
|
+
import Checkbox from '../../Checkbox.svelte';
|
|
4
|
+
mount(Checkbox, {
|
|
5
|
+
target: document.getElementById('checkbox-root'),
|
|
6
|
+
props: {
|
|
7
|
+
animation: 'pop',
|
|
8
|
+
duration: 1000,
|
|
9
|
+
label: 'Pop checkbox',
|
|
10
|
+
size: 'xl',
|
|
11
|
+
tone: 'primary',
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../../../../../theme.css';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Checkbox Rise Visual Test</title>
|
|
7
|
+
<script type="module" src="./rise.ts"></script>
|
|
8
|
+
<style>
|
|
9
|
+
body {
|
|
10
|
+
min-height: 100vh;
|
|
11
|
+
margin: 0;
|
|
12
|
+
background: #f5f7fb;
|
|
13
|
+
color: #172033;
|
|
14
|
+
display: grid;
|
|
15
|
+
place-items: center;
|
|
16
|
+
font-family:
|
|
17
|
+
Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
18
|
+
'Segoe UI', sans-serif;
|
|
19
|
+
}
|
|
20
|
+
</style>
|
|
21
|
+
</head>
|
|
22
|
+
<body>
|
|
23
|
+
<main>
|
|
24
|
+
<div id="checkbox-root"></div>
|
|
25
|
+
</main>
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { mount } from 'svelte';
|
|
2
|
+
import '../../../../../../../theme.css';
|
|
3
|
+
import Checkbox from '../../Checkbox.svelte';
|
|
4
|
+
mount(Checkbox, {
|
|
5
|
+
target: document.getElementById('checkbox-root'),
|
|
6
|
+
props: {
|
|
7
|
+
animation: 'rise',
|
|
8
|
+
duration: 800,
|
|
9
|
+
label: 'Rise checkbox',
|
|
10
|
+
size: 'xl',
|
|
11
|
+
tone: 'primary',
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../../../../../theme.css';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Checkbox Scale Visual Test</title>
|
|
7
|
+
<script type="module" src="./scale.ts"></script>
|
|
8
|
+
<style>
|
|
9
|
+
body {
|
|
10
|
+
min-height: 100vh;
|
|
11
|
+
margin: 0;
|
|
12
|
+
background: #f5f7fb;
|
|
13
|
+
color: #172033;
|
|
14
|
+
display: grid;
|
|
15
|
+
place-items: center;
|
|
16
|
+
font-family:
|
|
17
|
+
Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
18
|
+
'Segoe UI', sans-serif;
|
|
19
|
+
}
|
|
20
|
+
</style>
|
|
21
|
+
</head>
|
|
22
|
+
<body>
|
|
23
|
+
<main>
|
|
24
|
+
<div id="checkbox-root"></div>
|
|
25
|
+
</main>
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { mount } from 'svelte';
|
|
2
|
+
import '../../../../../../../theme.css';
|
|
3
|
+
import Checkbox from '../../Checkbox.svelte';
|
|
4
|
+
mount(Checkbox, {
|
|
5
|
+
target: document.getElementById('checkbox-root'),
|
|
6
|
+
props: {
|
|
7
|
+
animation: 'scale',
|
|
8
|
+
duration: 1000,
|
|
9
|
+
label: 'Scale checkbox',
|
|
10
|
+
size: 'xl',
|
|
11
|
+
tone: 'primary',
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../../../../../theme.css';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Checkbox visual state fixture</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="checkbox-root"></div>
|
|
10
|
+
<script type="module" src="./visual-state.ts"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|