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.
Files changed (118) hide show
  1. package/README.md +77 -54
  2. package/dist/components/AppShell.svelte +1 -1
  3. package/dist/components/Banner.svelte +3 -3
  4. package/dist/components/Button.svelte +4 -4
  5. package/dist/components/action/button/button/Button.svelte +1041 -0
  6. package/dist/components/action/button/button/Button.svelte.d.ts +28 -0
  7. package/dist/components/action/button/button-group/ButtonGroup.svelte +146 -0
  8. package/dist/components/action/button/button-group/ButtonGroup.svelte.d.ts +14 -0
  9. package/dist/components/action/button/floating-action-button/FloatingActionButton.svelte +1102 -0
  10. package/dist/components/action/button/floating-action-button/FloatingActionButton.svelte.d.ts +26 -0
  11. package/dist/components/action/button/icon-button/IconButton.svelte +954 -0
  12. package/dist/components/action/button/icon-button/IconButton.svelte.d.ts +22 -0
  13. package/dist/components/action/button/timed-button/TimedButton.svelte +1143 -0
  14. package/dist/components/action/button/timed-button/TimedButton.svelte.d.ts +32 -0
  15. package/dist/components/action/button/toggle-button/ToggleButton.svelte +1109 -0
  16. package/dist/components/action/button/toggle-button/ToggleButton.svelte.d.ts +28 -0
  17. package/dist/components/action/button/toggle-button-group/ToggleButtonGroup.svelte +242 -0
  18. package/dist/components/action/button/toggle-button-group/ToggleButtonGroup.svelte.d.ts +19 -0
  19. package/dist/components/action/button/toggle-button-group/ToggleButtonGroup.test.svelte +36 -0
  20. package/dist/components/action/button/toggle-button-group/ToggleButtonGroup.test.svelte.d.ts +11 -0
  21. package/dist/components/action/button/toggle-button-group/context.d.ts +8 -0
  22. package/dist/components/action/button/toggle-button-group/context.js +8 -0
  23. package/dist/components/action/input/field/pin-input/PinInput.svelte +4 -4
  24. package/dist/components/action/input/select/checkbox/Checkbox.svelte +4484 -167
  25. package/dist/components/action/input/select/checkbox/Checkbox.svelte.d.ts +22 -1
  26. package/dist/components/action/input/select/checkbox/checkbox-relations.svelte.d.ts +11 -12
  27. package/dist/components/action/input/select/checkbox/checkbox-relations.svelte.js +56 -8
  28. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bounce.d.ts +1 -0
  29. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bounce.html +27 -0
  30. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bounce.js +13 -0
  31. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bump.d.ts +1 -0
  32. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bump.html +12 -0
  33. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bump.js +13 -0
  34. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/draw.d.ts +1 -0
  35. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/draw.html +12 -0
  36. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/draw.js +12 -0
  37. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/fade.d.ts +1 -0
  38. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/fade.html +12 -0
  39. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/fade.js +12 -0
  40. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/pop.d.ts +1 -0
  41. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/pop.html +12 -0
  42. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/pop.js +13 -0
  43. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/rise.d.ts +1 -0
  44. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/rise.html +27 -0
  45. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/rise.js +13 -0
  46. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/scale.d.ts +1 -0
  47. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/scale.html +27 -0
  48. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/scale.js +13 -0
  49. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/visual-state.d.ts +1 -0
  50. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/visual-state.html +12 -0
  51. package/dist/components/action/input/select/checkbox/tests/visual-fixtures/visual-state.js +278 -0
  52. package/dist/components/action/input/select/{theme-switch/ThemeSwitch.svelte → color-mode-switch/ColorModeSwitch.svelte} +8 -8
  53. package/dist/components/action/input/select/color-mode-switch/ColorModeSwitch.svelte.d.ts +10 -0
  54. package/dist/components/action/input/select/segment-control/SegmentControl.svelte +2 -2
  55. package/dist/components/action/input/select/slider/Slider.svelte +1 -1
  56. package/dist/components/action/input/select/switch/Switch.svelte +678 -82
  57. package/dist/components/action/input/select/switch/Switch.svelte.d.ts +1 -1
  58. package/dist/components/display/annotation/badge/Badge.svelte +732 -63
  59. package/dist/components/display/annotation/badge/Badge.svelte.d.ts +1 -1
  60. package/dist/components/display/annotation/tag/Tag.svelte +663 -70
  61. package/dist/components/display/annotation/tag/Tag.svelte.d.ts +3 -1
  62. package/dist/components/display/data-display/metric/date-time/DateTimeValue.svelte +59 -0
  63. package/dist/components/display/data-display/metric/date-time/DateTimeValue.svelte.d.ts +13 -0
  64. package/dist/components/display/data-display/metric/date-time/DateValue.svelte +52 -0
  65. package/dist/components/display/data-display/metric/date-time/DateValue.svelte.d.ts +11 -0
  66. package/dist/components/display/data-display/metric/date-time/TimeValue.svelte +55 -0
  67. package/dist/components/display/data-display/metric/date-time/TimeValue.svelte.d.ts +12 -0
  68. package/dist/components/display/data-display/metric/relative-time/RelativeTime.svelte +17 -0
  69. package/dist/components/display/data-display/metric/relative-time/RelativeTime.svelte.d.ts +6 -1
  70. package/dist/components/display/data-display/metric/timestamp-card/TimestampCard.svelte +121 -0
  71. package/dist/components/display/data-display/metric/timestamp-card/TimestampCard.svelte.d.ts +25 -0
  72. package/dist/components/display/data-display/visual/timeline/TimelineItem.svelte +653 -63
  73. package/dist/components/display/data-display/visual/timeline/context.d.ts +1 -1
  74. package/dist/components/display/feedback/loading/loading-dots/LoadingDots.svelte +650 -60
  75. package/dist/components/display/feedback/loading/loading-dots/LoadingDots.svelte.d.ts +1 -1
  76. package/dist/components/display/feedback/loading/spinner/Spinner.svelte +650 -60
  77. package/dist/components/display/feedback/loading/spinner/Spinner.svelte.d.ts +1 -1
  78. package/dist/components/display/typography/code-snippet/CodeSnippet.svelte +3 -3
  79. package/dist/components/display/typography/eyebrow/Eyebrow.svelte +2 -2
  80. package/dist/components/display/typography/highlight/Highlight.svelte +719 -59
  81. package/dist/components/display/typography/highlight/Highlight.svelte.d.ts +1 -1
  82. package/dist/components/framework/layout/container/app-shell/AppShell.svelte +16 -2
  83. package/dist/components/framework/navigation/context/breadcrumb/Breadcrumb.svelte +1 -1
  84. package/dist/components/framework/navigation/sidebar/sidebar/Sidebar.svelte +35 -10
  85. package/dist/components/framework/navigation/sidebar/sidenav/Sidenav.svelte +5 -5
  86. package/dist/components/framework/overlay/tooltip/Tooltip.svelte +2 -3
  87. package/dist/components/framework/overlay/tooltip/Tooltip.svelte.d.ts +2 -2
  88. package/dist/components/framework/surface/paper/Paper.svelte +730 -87
  89. package/dist/components/framework/surface/paper/Paper.svelte.d.ts +1 -1
  90. package/dist/components/utility/format/date-time/formatDateTime.d.ts +23 -0
  91. package/dist/components/utility/format/date-time/formatDateTime.js +33 -0
  92. package/dist/components/utility/format/relative-time/formatRelativeTime.d.ts +7 -0
  93. package/dist/components/utility/format/relative-time/formatRelativeTime.js +194 -7
  94. package/dist/design-system/inheritance/tokens.js +6 -0
  95. package/dist/design-system/reserved-props/allowed-options.d.ts +5 -3
  96. package/dist/design-system/theme/tokens.d.ts +72 -2
  97. package/dist/design-system/theme/tokens.js +167 -176
  98. package/dist/index.d.ts +15 -4
  99. package/dist/index.js +14 -3
  100. package/dist/styles/tone-context.css +649 -58
  101. package/dist/theme.css +1 -183
  102. package/dist/themes/canopy.css +373 -0
  103. package/dist/themes/cobalt.css +373 -0
  104. package/dist/themes/iris.css +373 -0
  105. package/dist/themes/lumen.css +373 -0
  106. package/dist/themes/mono.css +373 -0
  107. package/dist/themes/moss.css +373 -0
  108. package/dist/themes/noir.css +373 -0
  109. package/dist/themes/plain.css +373 -0
  110. package/dist/themes/pulse.css +373 -0
  111. package/dist/themes/signal.css +373 -0
  112. package/dist/themes/slate.css +373 -0
  113. package/dist/themes/solar.css +373 -0
  114. package/dist/themes/sorbet.css +373 -0
  115. package/dist/themes/studio.css +369 -0
  116. package/dist/themes/vesper.css +373 -0
  117. package/package.json +18 -2
  118. package/dist/components/action/input/select/theme-switch/ThemeSwitch.svelte.d.ts +0 -10
@@ -1,15 +1,36 @@
1
- type CheckboxTone = 'neutral' | 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'inverse';
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 CheckboxRelationsItemState {
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 createCheckboxRelations(config: CheckboxRelationsConfig): CheckboxRelations;
46
+ export declare function createCheckboxManager(config: CheckboxRelationsConfig): CheckboxRelations;
@@ -1,31 +1,48 @@
1
- export function createCheckboxRelations(config) {
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: () => toggleItem(id),
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) => item(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: () => toggleGroup(id),
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 = item(id);
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 = item(id);
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) => !item(itemId).disabled);
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 = item(itemId);
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>