svelte-comp 1.3.3 → 1.3.5

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 (120) hide show
  1. package/README.md +12 -11
  2. package/dist/App.svelte +540 -540
  3. package/dist/app.css +2 -3
  4. package/dist/app.d.ts +10 -0
  5. package/dist/lib/Accordion.svelte +14 -14
  6. package/dist/lib/Button.svelte +23 -8
  7. package/dist/lib/Card.svelte +6 -6
  8. package/dist/lib/Carousel.svelte +16 -16
  9. package/dist/lib/Carousel.svelte.d.ts +1 -1
  10. package/dist/lib/CheckBox.svelte +2 -2
  11. package/dist/lib/CodeView.svelte +6 -5
  12. package/dist/lib/ContextMenu.svelte +19 -13
  13. package/dist/lib/Dialog.svelte +3 -3
  14. package/dist/lib/Field.svelte +1 -1
  15. package/dist/lib/FilePicker.svelte +66 -11
  16. package/dist/lib/FilePicker.svelte.d.ts +6 -1
  17. package/dist/lib/Hamburger.svelte +12 -12
  18. package/dist/lib/Menu.svelte +18 -18
  19. package/dist/lib/NoticeBase.svelte +5 -5
  20. package/dist/lib/Select.svelte +2 -2
  21. package/dist/lib/Slider.svelte +1 -1
  22. package/dist/lib/Splitter.svelte +15 -6
  23. package/dist/lib/Switch.svelte +5 -4
  24. package/dist/lib/Tabs.svelte +6 -6
  25. package/dist/lib/ThemeToggle.svelte +1 -0
  26. package/dist/lib/TimePickerNew.svelte +634 -0
  27. package/dist/lib/TimePickerNew.svelte.d.ts +49 -0
  28. package/dist/lib/Tooltip.svelte +7 -7
  29. package/dist/lib/Topbar.svelte +6 -6
  30. package/dist/lib/__tests__/Accordion.test.d.ts +1 -0
  31. package/dist/lib/__tests__/Accordion.test.js +171 -0
  32. package/dist/lib/__tests__/Badge.test.d.ts +1 -0
  33. package/dist/lib/__tests__/Badge.test.js +41 -0
  34. package/dist/lib/__tests__/Button.test.d.ts +1 -0
  35. package/dist/lib/__tests__/Button.test.js +269 -0
  36. package/dist/lib/__tests__/Calendar.test.d.ts +1 -0
  37. package/dist/lib/__tests__/Calendar.test.js +171 -0
  38. package/dist/lib/__tests__/Card.test.d.ts +1 -0
  39. package/dist/lib/__tests__/Card.test.js +148 -0
  40. package/dist/lib/__tests__/Carousel.test.d.ts +1 -0
  41. package/dist/lib/__tests__/Carousel.test.js +439 -0
  42. package/dist/lib/__tests__/CheckBox.test.d.ts +1 -0
  43. package/dist/lib/__tests__/CheckBox.test.js +152 -0
  44. package/dist/lib/__tests__/CodeView.test.d.ts +1 -0
  45. package/dist/lib/__tests__/CodeView.test.js +157 -0
  46. package/dist/lib/__tests__/ColorPicker.test.d.ts +1 -0
  47. package/dist/lib/__tests__/ColorPicker.test.js +93 -0
  48. package/dist/lib/__tests__/ContextMenu.test.d.ts +1 -0
  49. package/dist/lib/__tests__/ContextMenu.test.js +67 -0
  50. package/dist/lib/__tests__/DatePicker.test.d.ts +1 -0
  51. package/dist/lib/__tests__/DatePicker.test.js +108 -0
  52. package/dist/lib/__tests__/Dialog.test.d.ts +1 -0
  53. package/dist/lib/__tests__/Dialog.test.js +183 -0
  54. package/dist/lib/__tests__/Field.test.d.ts +1 -0
  55. package/dist/lib/__tests__/Field.test.js +190 -0
  56. package/dist/lib/__tests__/FilePicker.test.d.ts +1 -0
  57. package/dist/lib/__tests__/FilePicker.test.js +179 -0
  58. package/dist/lib/__tests__/Form.integration.test.d.ts +1 -0
  59. package/dist/lib/__tests__/Form.integration.test.js +158 -0
  60. package/dist/lib/__tests__/Form.test.d.ts +1 -0
  61. package/dist/lib/__tests__/Form.test.js +463 -0
  62. package/dist/lib/__tests__/Hamburger.test.d.ts +1 -0
  63. package/dist/lib/__tests__/Hamburger.test.js +161 -0
  64. package/dist/lib/__tests__/InstallPWA.test.d.ts +1 -0
  65. package/dist/lib/__tests__/InstallPWA.test.js +15 -0
  66. package/dist/lib/__tests__/Menu.test.d.ts +1 -0
  67. package/dist/lib/__tests__/Menu.test.js +285 -0
  68. package/dist/lib/__tests__/NoticeBase.test.d.ts +1 -0
  69. package/dist/lib/__tests__/NoticeBase.test.js +60 -0
  70. package/dist/lib/__tests__/PaginatedCard.test.d.ts +1 -0
  71. package/dist/lib/__tests__/PaginatedCard.test.js +89 -0
  72. package/dist/lib/__tests__/Pagination.test.d.ts +1 -0
  73. package/dist/lib/__tests__/Pagination.test.js +168 -0
  74. package/dist/lib/__tests__/PrimaryColorSelect.test.d.ts +1 -0
  75. package/dist/lib/__tests__/PrimaryColorSelect.test.js +92 -0
  76. package/dist/lib/__tests__/ProgressBar.test.d.ts +1 -0
  77. package/dist/lib/__tests__/ProgressBar.test.js +69 -0
  78. package/dist/lib/__tests__/ProgressCircle.test.d.ts +1 -0
  79. package/dist/lib/__tests__/ProgressCircle.test.js +71 -0
  80. package/dist/lib/__tests__/Radio.test.d.ts +1 -0
  81. package/dist/lib/__tests__/Radio.test.js +127 -0
  82. package/dist/lib/__tests__/SearchInput.test.d.ts +1 -0
  83. package/dist/lib/__tests__/SearchInput.test.js +80 -0
  84. package/dist/lib/__tests__/Select.test.d.ts +1 -0
  85. package/dist/lib/__tests__/Select.test.js +408 -0
  86. package/dist/lib/__tests__/Slider.test.d.ts +1 -0
  87. package/dist/lib/__tests__/Slider.test.js +213 -0
  88. package/dist/lib/__tests__/Splitter.test.d.ts +1 -0
  89. package/dist/lib/__tests__/Splitter.test.js +87 -0
  90. package/dist/lib/__tests__/Switch.test.d.ts +1 -0
  91. package/dist/lib/__tests__/Switch.test.js +97 -0
  92. package/dist/lib/__tests__/Table.test.d.ts +1 -0
  93. package/dist/lib/__tests__/Table.test.js +349 -0
  94. package/dist/lib/__tests__/Tabs.test.d.ts +1 -0
  95. package/dist/lib/__tests__/Tabs.test.js +262 -0
  96. package/dist/lib/__tests__/ThemeToggle.test.d.ts +1 -0
  97. package/dist/lib/__tests__/ThemeToggle.test.js +84 -0
  98. package/dist/lib/__tests__/TimePicker.test.d.ts +1 -0
  99. package/dist/lib/__tests__/TimePicker.test.js +146 -0
  100. package/dist/lib/__tests__/TimePickerNew.test.d.ts +1 -0
  101. package/dist/lib/__tests__/TimePickerNew.test.js +322 -0
  102. package/dist/lib/__tests__/Toast.test.d.ts +1 -0
  103. package/dist/lib/__tests__/Toast.test.js +135 -0
  104. package/dist/lib/__tests__/Tooltip.test.d.ts +1 -0
  105. package/dist/lib/__tests__/Tooltip.test.js +171 -0
  106. package/dist/lib/__tests__/Topbar.test.d.ts +1 -0
  107. package/dist/lib/__tests__/Topbar.test.js +25 -0
  108. package/dist/lib/__tests__/setupLangContext.d.ts +1 -0
  109. package/dist/lib/__tests__/setupLangContext.js +65 -0
  110. package/dist/lib/__tests__/storage.test.d.ts +1 -0
  111. package/dist/lib/__tests__/storage.test.js +124 -0
  112. package/dist/lib/__tests__/utils.test.d.ts +1 -0
  113. package/dist/lib/__tests__/utils.test.js +11 -0
  114. package/dist/lib/index.d.ts +1 -0
  115. package/dist/lib/index.js +1 -0
  116. package/dist/lib/lang.d.ts +4 -0
  117. package/dist/lib/lang.js +4 -0
  118. package/dist/styles.css +2 -0
  119. package/dist/utils/index.js +15 -4
  120. package/package.json +12 -12
package/dist/App.svelte CHANGED
@@ -1,42 +1,42 @@
1
- <script lang="ts">
2
- import Accordion from "./lib/Accordion.svelte";
3
- import Badge from "./lib/Badge.svelte";
4
- import Button from "./lib/Button.svelte";
5
- import Calendar from "./lib/Calendar.svelte";
6
- import Card from "./lib/Card.svelte";
7
- import Carousel from "./lib/Carousel.svelte";
8
- import CheckBox from "./lib/CheckBox.svelte";
9
- import CodeView from "./lib/CodeView.svelte";
10
- import ColorPicker from "./lib/ColorPicker.svelte";
11
- import ContextMenu from "./lib/ContextMenu.svelte";
12
- import DatePicker from "./lib/DatePicker.svelte";
13
- import Dialog from "./lib/Dialog.svelte";
14
- import Field from "./lib/Field.svelte";
15
- import FilePicker from "./lib/FilePicker.svelte";
16
- import Form from "./lib/Form.svelte";
17
- import InstallPWA from "./lib/InstallPWA.svelte";
18
- import Menu from "./lib/Menu.svelte";
19
- import NoticeBase from "./lib/NoticeBase.svelte";
20
- import PaginatedCard from "./lib/PaginatedCard.svelte";
21
- import Pagination from "./lib/Pagination.svelte";
22
- import PrimaryColorSelect from "./lib/PrimaryColorSelect.svelte";
23
- import ProgressBar from "./lib/ProgressBar.svelte";
24
- import ProgressCircle from "./lib/ProgressCircle.svelte";
25
- import Radio from "./lib/Radio.svelte";
26
- import SearchInput from "./lib/SearchInput.svelte";
27
- import Select from "./lib/Select.svelte";
28
- import Slider from "./lib/Slider.svelte";
29
- import Splitter from "./lib/Splitter.svelte";
30
- import Switch from "./lib/Switch.svelte";
31
- import Table from "./lib/Table.svelte";
32
- import Tabs from "./lib/Tabs.svelte";
33
- import ThemeToggle from "./lib/ThemeToggle.svelte";
34
- import TimePicker from "./lib/TimePicker.svelte";
35
- import Toast from "./lib/Toast.svelte";
36
- import Tooltip from "./lib/Tooltip.svelte";
37
- import Topbar from "./lib/Topbar.svelte";
38
- import type { FieldSchema, MenuAction, MenuItem, SizeKey, ToastVariant } from "./lib/types";
39
- import Container from "./Container.svelte";
1
+ <script lang="ts">
2
+ import Accordion from "./lib/Accordion.svelte";
3
+ import Badge from "./lib/Badge.svelte";
4
+ import Button from "./lib/Button.svelte";
5
+ import Calendar from "./lib/Calendar.svelte";
6
+ import Card from "./lib/Card.svelte";
7
+ import Carousel from "./lib/Carousel.svelte";
8
+ import CheckBox from "./lib/CheckBox.svelte";
9
+ import CodeView from "./lib/CodeView.svelte";
10
+ import ColorPicker from "./lib/ColorPicker.svelte";
11
+ import ContextMenu from "./lib/ContextMenu.svelte";
12
+ import DatePicker from "./lib/DatePicker.svelte";
13
+ import Dialog from "./lib/Dialog.svelte";
14
+ import Field from "./lib/Field.svelte";
15
+ import FilePicker from "./lib/FilePicker.svelte";
16
+ import Form from "./lib/Form.svelte";
17
+ import InstallPWA from "./lib/InstallPWA.svelte";
18
+ import Menu from "./lib/Menu.svelte";
19
+ import NoticeBase from "./lib/NoticeBase.svelte";
20
+ import PaginatedCard from "./lib/PaginatedCard.svelte";
21
+ import Pagination from "./lib/Pagination.svelte";
22
+ import PrimaryColorSelect from "./lib/PrimaryColorSelect.svelte";
23
+ import ProgressBar from "./lib/ProgressBar.svelte";
24
+ import ProgressCircle from "./lib/ProgressCircle.svelte";
25
+ import Radio from "./lib/Radio.svelte";
26
+ import SearchInput from "./lib/SearchInput.svelte";
27
+ import Select from "./lib/Select.svelte";
28
+ import Slider from "./lib/Slider.svelte";
29
+ import Splitter from "./lib/Splitter.svelte";
30
+ import Switch from "./lib/Switch.svelte";
31
+ import Table from "./lib/Table.svelte";
32
+ import Tabs from "./lib/Tabs.svelte";
33
+ import ThemeToggle from "./lib/ThemeToggle.svelte";
34
+ import TimePicker from "./lib/TimePicker.svelte";
35
+ import Toast from "./lib/Toast.svelte";
36
+ import Tooltip from "./lib/Tooltip.svelte";
37
+ import Topbar from "./lib/Topbar.svelte";
38
+ import type { FieldSchema, MenuAction, MenuItem, SizeKey, ToastVariant } from "./lib/types";
39
+ import Container from "./Container.svelte";
40
40
 
41
41
  const tabs = [
42
42
  { id: "overview", label: "Overview" },
@@ -133,84 +133,84 @@
133
133
  { label: "Performance", value: 64 },
134
134
  ];
135
135
 
136
- const team = [
137
- { name: "Anna", role: "Product", focus: "UX flows" },
138
- { name: "Mark", role: "Frontend", focus: "Components" },
139
- { name: "Oleg", role: "QA", focus: "Automation" },
140
- ];
141
-
142
- const navItems = [
143
- { id: "overview", label: "Overview" },
144
- { id: "inputs", label: "Inputs" },
145
- { id: "layout", label: "Layout" },
146
- { id: "data", label: "Data" },
147
- ];
148
- let activeNav = $state(navItems[0].id);
149
-
150
- let searchQuery = $state("");
151
- let calendarValue = $state<string | null>(null);
152
- let fileList = $state<FileList | null>(null);
153
- let dialogOpen = $state(false);
154
- let radioGroup = $state("daily");
155
- let newsletterChecked = $state(false);
156
- let mixedChecked = $state(false);
157
- let mixedState = $state(true);
158
- let menuSelection = $state("Pick an action from the menu bar");
159
- let menuSize = $state<SizeKey>("sm");
160
- let standalonePage = $state(1);
161
- const standaloneTotal = 5;
162
- let codeEditable = $state(false);
163
- let codeSample = $state(
164
- "const tokens = ['spacing', 'radius', 'colors'];\n\nexport function tokensReady() {\n return tokens.length > 0;\n}\n"
165
- );
166
- let contextMenuStatus = $state("Right-click the panel to open the menu");
167
- let contextMenuRef = $state<{
168
- openAt: (event: MouseEvent) => void;
169
- close: () => void;
170
- } | null>(null);
171
-
172
- const menuData: MenuItem[] = [
173
- {
174
- name: "File",
175
- actions: [
176
- { id: "new", label: "New", shortcut: "Ctrl+N" },
177
- { id: "open", label: "Open", shortcut: "Ctrl+O" },
178
- { type: "separator" },
179
- { id: "export", label: "Export", shortcut: "Ctrl+E" },
180
- ],
181
- },
182
- {
183
- name: "View",
184
- actions: [
185
- { id: "xs", label: "XS" },
186
- { id: "sm", label: "SM" },
187
- { id: "md", label: "MD" },
188
- { id: "lg", label: "LG" },
189
- { id: "xl", label: "XL" },
190
- ],
191
- },
192
- ];
193
-
194
- const miniFormSchema: FieldSchema[] = [
195
- { name: "project", type: "text", label: "Project", required: true },
196
- { name: "owner", type: "email", label: "Owner email", required: true },
197
- {
198
- name: "priority",
199
- type: "select",
200
- label: "Priority",
201
- options: [
202
- { label: "Low", value: "low" },
203
- { label: "Medium", value: "medium" },
204
- { label: "High", value: "high" },
205
- ],
206
- },
207
- { name: "subscribe", type: "checkbox", label: "Send updates" },
208
- ];
209
- let formResult = $state("Not submitted yet");
210
-
211
- type ToastItem = { id: number; title?: string; message: string; variant: ToastVariant };
212
- let toasts = $state<ToastItem[]>([]);
213
- let toastId = 0;
136
+ const team = [
137
+ { name: "Anna", role: "Product", focus: "UX flows" },
138
+ { name: "Mark", role: "Frontend", focus: "Components" },
139
+ { name: "Oleg", role: "QA", focus: "Automation" },
140
+ ];
141
+
142
+ const navItems = [
143
+ { id: "overview", label: "Overview" },
144
+ { id: "inputs", label: "Inputs" },
145
+ { id: "layout", label: "Layout" },
146
+ { id: "data", label: "Data" },
147
+ ];
148
+ let activeNav = $state(navItems[0].id);
149
+
150
+ let searchQuery = $state("");
151
+ let calendarValue = $state<string | null>(null);
152
+ let fileList = $state<FileList | null>(null);
153
+ let dialogOpen = $state(false);
154
+ let radioGroup = $state("daily");
155
+ let newsletterChecked = $state(false);
156
+ let mixedChecked = $state(false);
157
+ let mixedState = $state(true);
158
+ let menuSelection = $state("Pick an action from the menu bar");
159
+ let menuSize = $state<SizeKey>("sm");
160
+ let standalonePage = $state(1);
161
+ const standaloneTotal = 5;
162
+ let codeEditable = $state(false);
163
+ let codeSample = $state(
164
+ "const tokens = ['spacing', 'radius', 'colors'];\n\nexport function tokensReady() {\n return tokens.length > 0;\n}\n"
165
+ );
166
+ let contextMenuStatus = $state("Right-click the panel to open the menu");
167
+ let contextMenuRef = $state<{
168
+ openAt: (event: MouseEvent) => void;
169
+ close: () => void;
170
+ } | null>(null);
171
+
172
+ const menuData: MenuItem[] = [
173
+ {
174
+ name: "File",
175
+ actions: [
176
+ { id: "new", label: "New", shortcut: "Ctrl+N" },
177
+ { id: "open", label: "Open", shortcut: "Ctrl+O" },
178
+ { type: "separator" },
179
+ { id: "export", label: "Export", shortcut: "Ctrl+E" },
180
+ ],
181
+ },
182
+ {
183
+ name: "View",
184
+ actions: [
185
+ { id: "xs", label: "XS" },
186
+ { id: "sm", label: "SM" },
187
+ { id: "md", label: "MD" },
188
+ { id: "lg", label: "LG" },
189
+ { id: "xl", label: "XL" },
190
+ ],
191
+ },
192
+ ];
193
+
194
+ const miniFormSchema: FieldSchema[] = [
195
+ { name: "project", type: "text", label: "Project", required: true },
196
+ { name: "owner", type: "email", label: "Owner email", required: true },
197
+ {
198
+ name: "priority",
199
+ type: "select",
200
+ label: "Priority",
201
+ options: [
202
+ { label: "Low", value: "low" },
203
+ { label: "Medium", value: "medium" },
204
+ { label: "High", value: "high" },
205
+ ],
206
+ },
207
+ { name: "subscribe", type: "checkbox", label: "Send updates" },
208
+ ];
209
+ let formResult = $state("Not submitted yet");
210
+
211
+ type ToastItem = { id: number; title?: string; message: string; variant: ToastVariant };
212
+ let toasts = $state<ToastItem[]>([]);
213
+ let toastId = 0;
214
214
 
215
215
  function pushToast(variant: ToastVariant) {
216
216
  const messageMap: Record<ToastVariant, string> = {
@@ -233,41 +233,41 @@
233
233
  ];
234
234
  }
235
235
 
236
- function removeToast(id: number) {
237
- toasts = toasts.filter((t) => t.id !== id);
238
- }
239
-
240
- function handleMenuSelect(menu: string, action: MenuAction) {
241
- const label =
242
- typeof action === "string"
243
- ? action
244
- : action.label || action.id || "Action";
245
- const id = typeof action === "string" ? action : action.id;
246
- if (id && ["xs", "sm", "md", "lg", "xl"].includes(id)) {
247
- menuSize = id as SizeKey;
248
- }
249
- menuSelection = `${menu}: ${label}`;
250
- }
251
-
252
- function handleMiniSubmit(values: Record<string, unknown>) {
253
- formResult = JSON.stringify(values, null, 2);
254
- }
255
-
256
- function handleContextAction(label: string, variant: ToastVariant) {
257
- contextMenuStatus = `Last action: ${label}`;
258
- pushToast(variant);
259
- }
260
- </script>
261
-
262
- <Topbar
263
- title="svelte-comp"
264
- showHamburger={true}
265
- menuItems={navItems}
266
- onMenuSelect={(id) => (activeNav = id)}
267
- />
268
-
269
- <Container>
270
- <div class="relative mx-auto max-w-6xl space-y-8 px-6 pb-10 pt-24">
236
+ function removeToast(id: number) {
237
+ toasts = toasts.filter((t) => t.id !== id);
238
+ }
239
+
240
+ function handleMenuSelect(menu: string, action: MenuAction) {
241
+ const label =
242
+ typeof action === "string"
243
+ ? action
244
+ : action.label || action.id || "Action";
245
+ const id = typeof action === "string" ? action : action.id;
246
+ if (id && ["xs", "sm", "md", "lg", "xl"].includes(id)) {
247
+ menuSize = id as SizeKey;
248
+ }
249
+ menuSelection = `${menu}: ${label}`;
250
+ }
251
+
252
+ function handleMiniSubmit(values: Record<string, unknown>) {
253
+ formResult = JSON.stringify(values, null, 2);
254
+ }
255
+
256
+ function handleContextAction(label: string, variant: ToastVariant) {
257
+ contextMenuStatus = `Last action: ${label}`;
258
+ pushToast(variant);
259
+ }
260
+ </script>
261
+
262
+ <Topbar
263
+ title="svelte-comp"
264
+ showHamburger={true}
265
+ menuItems={navItems}
266
+ onMenuSelect={(id) => (activeNav = id)}
267
+ />
268
+
269
+ <Container>
270
+ <div class="relative mx-auto max-w-6xl space-y-8 px-6 pb-10 pt-24">
271
271
  <section
272
272
  class="relative rounded-[28px] border border-[var(--border-color-default)] bg-gradient-to-br from-[var(--color-bg-surface)] via-white/70 to-[var(--color-bg-muted)] shadow-[0_20px_60px_-25px_var(--shadow-color)] dark:from-[var(--color-bg-surface)] dark:via-slate-900/70 dark:to-slate-900/50"
273
273
  >
@@ -550,8 +550,8 @@
550
550
  </div>
551
551
  {/snippet}
552
552
 
553
- <div class="grid gap-6 lg:grid-cols-[1.2fr_0.8fr]">
554
- <Card header={dataHeader} class="h-full">
553
+ <div class="grid gap-6 lg:grid-cols-[1.2fr_0.8fr]">
554
+ <Card header={dataHeader} class="h-full">
555
555
  <Tabs
556
556
  tabs={tabs}
557
557
  activeTab={activeTab}
@@ -649,392 +649,392 @@
649
649
  sz="sm"
650
650
  />
651
651
  </Card>
652
- </div>
653
- </div>
654
-
655
- {#snippet statusHeader()}
656
- <div class="flex items-center justify-between gap-2">
657
- <div>
658
- <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
659
- Status
660
- </p>
661
- <h2 class="text-lg font-semibold leading-tight">Search and signals</h2>
662
- </div>
663
- </div>
664
- {/snippet}
665
-
666
- {#snippet optionsHeader()}
667
- <div class="flex items-center justify-between gap-2">
668
- <div>
669
- <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
670
- Options
671
- </p>
672
- <h2 class="text-lg font-semibold leading-tight">Toggles and calendar</h2>
673
- </div>
674
- </div>
675
- {/snippet}
676
-
677
- <div class="grid gap-6 lg:grid-cols-2">
678
- <Card header={statusHeader}>
679
- <div class="space-y-4">
680
- <SearchInput
681
- label="Search components"
682
- placeholder="Filter by name"
683
- bind:value={searchQuery}
684
- />
685
-
686
- <div class="flex flex-wrap gap-2">
687
- <Badge message="Live" variant="success" showIcon />
688
- <Badge message="Needs review" variant="warning" showIcon />
689
- <Badge message="Queued" variant="info" />
690
- </div>
691
-
692
- {#snippet noticeEnd()}
693
- <Button variant="ghost" sz="xs">Undo</Button>
694
- {/snippet}
695
-
696
- <NoticeBase
697
- title="Release note"
698
- message="New components landed in the demo."
699
- variant="info"
700
- size="md"
701
- end={noticeEnd}
702
- />
703
- </div>
704
- </Card>
705
-
706
- <Card header={optionsHeader}>
707
- <div class="space-y-4">
708
- <div class="space-y-2">
709
- <Radio
710
- label="Daily updates"
711
- value="daily"
712
- bind:group={radioGroup}
713
- />
714
- <Radio
715
- label="Weekly updates"
716
- value="weekly"
717
- bind:group={radioGroup}
718
- />
719
- <Radio
720
- label="Monthly updates"
721
- value="monthly"
722
- bind:group={radioGroup}
723
- />
724
- </div>
725
-
726
- <div class="flex flex-wrap gap-3">
727
- <CheckBox
728
- label="Send digest emails"
729
- bind:checked={newsletterChecked}
730
- />
731
- <CheckBox
732
- label="Mixed state"
733
- indeterminate={mixedState}
734
- checked={mixedChecked}
735
- onChange={(v) => {
736
- mixedChecked = v;
737
- mixedState = false;
738
- }}
739
- />
740
- </div>
741
-
742
- <div class="grid gap-3 md:grid-cols-[minmax(0,1.1fr)_minmax(0,0.9fr)]">
743
- <div class="min-w-0">
744
- <Calendar
745
- value={calendarValue}
746
- onChange={(v) => (calendarValue = v)}
747
- showOutsideDays={true}
748
- class="w-full"
749
- />
750
- </div>
751
- <div class="rounded-xl border border-[var(--border-color-default)] bg-[var(--color-bg-surface)] p-4">
752
- <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
753
- Selected date
754
- </p>
755
- <p class="text-lg font-semibold">
756
- {calendarValue ?? "No date yet"}
757
- </p>
758
- <p class="text-sm text-[var(--color-text-muted)] mt-2">
759
- Plan: {radioGroup}
760
- </p>
761
- </div>
762
- </div>
763
- </div>
764
- </Card>
765
- </div>
766
-
767
- {#snippet filesHeader()}
768
- <div class="flex items-center justify-between gap-2">
769
- <div>
770
- <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
771
- Files
772
- </p>
773
- <h2 class="text-lg font-semibold leading-tight">Uploads and dialogs</h2>
774
- </div>
775
- <InstallPWA inline={true} alwaysShow={true} />
776
- </div>
777
- {/snippet}
778
-
779
- {#snippet formGeneratorHeader()}
780
- <div class="flex items-center justify-between gap-2">
781
- <div>
782
- <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
783
- Form
784
- </p>
785
- <h2 class="text-lg font-semibold leading-tight">Schema-driven form</h2>
786
- </div>
787
- </div>
788
- {/snippet}
789
-
790
- <div class="grid gap-6 lg:grid-cols-2">
791
- <Card header={filesHeader}>
792
- <div class="space-y-4">
793
- <FilePicker
794
- value={fileList}
795
- onFilesSelected={(files) => (fileList = files)}
796
- accept="image/*,.pdf"
797
- />
798
-
799
- <div class="flex items-center justify-between rounded-xl border border-[var(--border-color-default)] px-4 py-3">
800
- <div>
801
- <p class="text-sm font-medium">Confirm release</p>
802
- <p class="text-xs text-[var(--color-text-muted)]">
803
- Last file: {fileList?.[0]?.name ?? "none"}
804
- </p>
805
- </div>
806
- <Button variant="primary" onClick={() => (dialogOpen = true)} sz="sm">
807
- Open dialog
808
- </Button>
809
- </div>
810
- </div>
811
- </Card>
812
-
813
- <Card header={formGeneratorHeader}>
814
- <div class="space-y-4">
815
- <Form
816
- schema={miniFormSchema}
817
- onSubmit={handleMiniSubmit}
818
- validateOn="submit"
819
- />
820
- <div class="rounded-xl border border-[var(--border-color-default)] bg-[var(--color-bg-surface)] p-3">
821
- <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
822
- Last submit
823
- </p>
824
- <pre class="text-xs whitespace-pre-wrap text-[var(--color-text-default)]">
825
- {formResult}
826
- </pre>
827
- </div>
828
- </div>
829
- </Card>
830
- </div>
831
-
832
- {#snippet menuHeader()}
833
- <div class="flex items-center justify-between gap-2">
834
- <div>
835
- <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
836
- Menu
837
- </p>
838
- <h2 class="text-lg font-semibold leading-tight">Navigation controls</h2>
839
- </div>
840
- </div>
841
- {/snippet}
842
-
843
- {#snippet layoutHeader()}
844
- <div class="flex items-center justify-between gap-2">
845
- <div>
846
- <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
847
- Layout
848
- </p>
849
- <h2 class="text-lg font-semibold leading-tight">Splitter + context menu</h2>
850
- </div>
851
- </div>
852
- {/snippet}
853
-
854
- {#snippet firstPane()}
855
- <div class="h-full grid place-items-center text-sm font-medium">
856
- First panel
857
- </div>
858
- {/snippet}
859
-
860
- {#snippet secondPane()}
861
- <div class="h-full grid place-items-center text-sm font-medium">
862
- Second panel
863
- </div>
864
- {/snippet}
865
-
866
- <div class="grid gap-6 lg:grid-cols-2">
867
- <Card header={menuHeader}>
868
- <div class="space-y-4">
869
- <Menu menus={menuData} sz={menuSize} onSelect={handleMenuSelect} />
870
-
871
- <div class="text-sm text-[var(--color-text-muted)]">
872
- {menuSelection}
873
- </div>
874
-
875
- <div class="rounded-xl border border-[var(--border-color-default)] p-4">
876
- <Pagination
877
- currentPage={standalonePage}
878
- totalPages={standaloneTotal}
879
- onPageChange={(p) => (standalonePage = p)}
880
- />
881
- </div>
882
-
883
- {#snippet pageOne()}
884
- <div class="p-4 rounded-xl border border-[var(--border-color-default)] bg-[var(--color-bg-surface)]">
885
- <p class="text-sm font-medium">Release notes</p>
886
- <p class="text-xs text-[var(--color-text-muted)]">
887
- Snapshot of changes across components.
888
- </p>
889
- </div>
890
- {/snippet}
891
- {#snippet pageTwo()}
892
- <div class="p-4 rounded-xl border border-[var(--border-color-default)] bg-[var(--color-bg-surface)]">
893
- <p class="text-sm font-medium">Design tasks</p>
894
- <p class="text-xs text-[var(--color-text-muted)]">
895
- Review tokens and spacing.
896
- </p>
897
- </div>
898
- {/snippet}
899
- {#snippet pageThree()}
900
- <div class="p-4 rounded-xl border border-[var(--border-color-default)] bg-[var(--color-bg-surface)]">
901
- <p class="text-sm font-medium">QA checklist</p>
902
- <p class="text-xs text-[var(--color-text-muted)]">
903
- Validate keyboard and focus behavior.
904
- </p>
905
- </div>
906
- {/snippet}
907
-
908
- <PaginatedCard
909
- items={[pageOne, pageTwo, pageThree]}
910
- itemsPerPage={1}
911
- />
912
- </div>
913
- </Card>
914
-
915
- <Card header={layoutHeader}>
916
- <div class="space-y-4">
917
- <div class="h-56 rounded-xl border border-[var(--border-color-default)] overflow-hidden">
918
- <Splitter
919
- direction="horizontal"
920
- initialSize={45}
921
- dividerSize={6}
922
- minSize={20}
923
- maxSize={80}
924
- first={firstPane}
925
- second={secondPane}
926
- />
927
- </div>
928
-
929
- <div
930
- class="rounded-xl border border-[var(--border-color-default)] bg-[var(--color-bg-surface)] p-4 text-sm text-[var(--color-text-muted)]"
931
- oncontextmenu={(e) => contextMenuRef?.openAt(e)}
932
- role="button"
933
- tabindex="0"
934
- >
935
- {contextMenuStatus}
936
- </div>
937
-
938
- <ContextMenu
939
- bind:this={contextMenuRef}
940
- onUndo={() => handleContextAction("Undo", "info")}
941
- onRedo={() => handleContextAction("Redo", "info")}
942
- onCopy={() => handleContextAction("Copy", "success")}
943
- onCut={() => handleContextAction("Cut", "warning")}
944
- onPaste={() => handleContextAction("Paste", "success")}
945
- onDelete={() => handleContextAction("Delete", "danger")}
946
- />
947
- </div>
948
- </Card>
949
- </div>
950
-
951
- {#snippet codeHeader()}
952
- <div class="flex items-center justify-between gap-2">
953
- <div>
954
- <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
955
- Code
956
- </p>
957
- <h2 class="text-lg font-semibold leading-tight">CodeView editor</h2>
958
- </div>
959
- <Switch
960
- checked={codeEditable}
961
- onChange={(v) => (codeEditable = v)}
962
- rightLabel={codeEditable ? "Editable" : "Read only"}
963
- sz="sm"
964
- />
965
- </div>
966
- {/snippet}
967
-
968
- {#snippet quickHeader()}
969
- <div class="flex items-center justify-between gap-2">
970
- <div>
971
- <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
972
- Actions
973
- </p>
974
- <h2 class="text-lg font-semibold leading-tight">Quick actions</h2>
975
- </div>
976
- </div>
977
- {/snippet}
978
-
979
- <div class="grid gap-6 lg:grid-cols-2">
980
- <Card header={codeHeader} class="min-h-[360px]">
981
- <CodeView
982
- bind:code={codeSample}
983
- language="js"
984
- title="tokens.js"
985
- showCopyButton={true}
986
- showLineNumbers={true}
987
- editable={codeEditable}
988
- activeLine={true}
989
- class="h-[320px]"
990
- />
991
- </Card>
992
-
993
- <Card header={quickHeader}>
994
- <div class="space-y-4">
995
- <div class="flex flex-wrap gap-2">
996
- <Button variant="secondary" onClick={() => pushToast("info")}>
997
- Notify
998
- </Button>
999
- <Button variant="success" onClick={() => pushToast("success")}>
1000
- Success
1001
- </Button>
1002
- <Button variant="danger" onClick={() => pushToast("danger")}>
1003
- Error
1004
- </Button>
1005
- </div>
1006
-
1007
- <div class="rounded-xl border border-[var(--border-color-default)] bg-[var(--color-bg-surface)] p-4">
1008
- <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
1009
- Active nav
1010
- </p>
1011
- <p class="text-lg font-semibold">{activeNav}</p>
1012
- <p class="text-sm text-[var(--color-text-muted)]">
1013
- Search: {searchQuery || "empty"}
1014
- </p>
1015
- </div>
1016
- </div>
1017
- </Card>
1018
- </div>
1019
-
1020
- <Dialog
1021
- open={dialogOpen}
1022
- title="Confirm release"
1023
- message="Ready to ship the selected files?"
1024
- onConfirm={() => {
1025
- dialogOpen = false;
1026
- pushToast("success");
1027
- }}
1028
- onCancel={() => {
1029
- dialogOpen = false;
1030
- }}
1031
- onClose={() => {
1032
- dialogOpen = false;
1033
- }}
1034
- />
1035
- </div>
1036
-
1037
- {#each toasts as toast (toast.id)}
652
+ </div>
653
+ </div>
654
+
655
+ {#snippet statusHeader()}
656
+ <div class="flex items-center justify-between gap-2">
657
+ <div>
658
+ <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
659
+ Status
660
+ </p>
661
+ <h2 class="text-lg font-semibold leading-tight">Search and signals</h2>
662
+ </div>
663
+ </div>
664
+ {/snippet}
665
+
666
+ {#snippet optionsHeader()}
667
+ <div class="flex items-center justify-between gap-2">
668
+ <div>
669
+ <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
670
+ Options
671
+ </p>
672
+ <h2 class="text-lg font-semibold leading-tight">Toggles and calendar</h2>
673
+ </div>
674
+ </div>
675
+ {/snippet}
676
+
677
+ <div class="grid gap-6 lg:grid-cols-2">
678
+ <Card header={statusHeader}>
679
+ <div class="space-y-4">
680
+ <SearchInput
681
+ label="Search components"
682
+ placeholder="Filter by name"
683
+ bind:value={searchQuery}
684
+ />
685
+
686
+ <div class="flex flex-wrap gap-2">
687
+ <Badge message="Live" variant="success" showIcon />
688
+ <Badge message="Needs review" variant="warning" showIcon />
689
+ <Badge message="Queued" variant="info" />
690
+ </div>
691
+
692
+ {#snippet noticeEnd()}
693
+ <Button variant="ghost" sz="xs">Undo</Button>
694
+ {/snippet}
695
+
696
+ <NoticeBase
697
+ title="Release note"
698
+ message="New components landed in the demo."
699
+ variant="info"
700
+ size="md"
701
+ end={noticeEnd}
702
+ />
703
+ </div>
704
+ </Card>
705
+
706
+ <Card header={optionsHeader}>
707
+ <div class="space-y-4">
708
+ <div class="space-y-2">
709
+ <Radio
710
+ label="Daily updates"
711
+ value="daily"
712
+ bind:group={radioGroup}
713
+ />
714
+ <Radio
715
+ label="Weekly updates"
716
+ value="weekly"
717
+ bind:group={radioGroup}
718
+ />
719
+ <Radio
720
+ label="Monthly updates"
721
+ value="monthly"
722
+ bind:group={radioGroup}
723
+ />
724
+ </div>
725
+
726
+ <div class="flex flex-wrap gap-3">
727
+ <CheckBox
728
+ label="Send digest emails"
729
+ bind:checked={newsletterChecked}
730
+ />
731
+ <CheckBox
732
+ label="Mixed state"
733
+ indeterminate={mixedState}
734
+ checked={mixedChecked}
735
+ onChange={(v) => {
736
+ mixedChecked = v;
737
+ mixedState = false;
738
+ }}
739
+ />
740
+ </div>
741
+
742
+ <div class="grid gap-3 md:grid-cols-[minmax(0,1.1fr)_minmax(0,0.9fr)]">
743
+ <div class="min-w-0">
744
+ <Calendar
745
+ value={calendarValue}
746
+ onChange={(v) => (calendarValue = v)}
747
+ showOutsideDays={true}
748
+ class="w-full"
749
+ />
750
+ </div>
751
+ <div class="rounded-xl border border-[var(--border-color-default)] bg-[var(--color-bg-surface)] p-4">
752
+ <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
753
+ Selected date
754
+ </p>
755
+ <p class="text-lg font-semibold">
756
+ {calendarValue ?? "No date yet"}
757
+ </p>
758
+ <p class="text-sm text-[var(--color-text-muted)] mt-2">
759
+ Plan: {radioGroup}
760
+ </p>
761
+ </div>
762
+ </div>
763
+ </div>
764
+ </Card>
765
+ </div>
766
+
767
+ {#snippet filesHeader()}
768
+ <div class="flex items-center justify-between gap-2">
769
+ <div>
770
+ <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
771
+ Files
772
+ </p>
773
+ <h2 class="text-lg font-semibold leading-tight">Uploads and dialogs</h2>
774
+ </div>
775
+ <InstallPWA inline={true} alwaysShow={true} />
776
+ </div>
777
+ {/snippet}
778
+
779
+ {#snippet formGeneratorHeader()}
780
+ <div class="flex items-center justify-between gap-2">
781
+ <div>
782
+ <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
783
+ Form
784
+ </p>
785
+ <h2 class="text-lg font-semibold leading-tight">Schema-driven form</h2>
786
+ </div>
787
+ </div>
788
+ {/snippet}
789
+
790
+ <div class="grid gap-6 lg:grid-cols-2">
791
+ <Card header={filesHeader}>
792
+ <div class="space-y-4">
793
+ <FilePicker
794
+ value={fileList}
795
+ onFilesSelected={(files) => (fileList = files)}
796
+ accept="image/*,.pdf"
797
+ />
798
+
799
+ <div class="flex items-center justify-between rounded-xl border border-[var(--border-color-default)] px-4 py-3">
800
+ <div>
801
+ <p class="text-sm font-medium">Confirm release</p>
802
+ <p class="text-xs text-[var(--color-text-muted)]">
803
+ Last file: {fileList?.[0]?.name ?? "none"}
804
+ </p>
805
+ </div>
806
+ <Button variant="primary" onClick={() => (dialogOpen = true)} sz="sm">
807
+ Open dialog
808
+ </Button>
809
+ </div>
810
+ </div>
811
+ </Card>
812
+
813
+ <Card header={formGeneratorHeader}>
814
+ <div class="space-y-4">
815
+ <Form
816
+ schema={miniFormSchema}
817
+ onSubmit={handleMiniSubmit}
818
+ validateOn="submit"
819
+ />
820
+ <div class="rounded-xl border border-[var(--border-color-default)] bg-[var(--color-bg-surface)] p-3">
821
+ <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
822
+ Last submit
823
+ </p>
824
+ <pre class="text-xs whitespace-pre-wrap text-[var(--color-text-default)]">
825
+ {formResult}
826
+ </pre>
827
+ </div>
828
+ </div>
829
+ </Card>
830
+ </div>
831
+
832
+ {#snippet menuHeader()}
833
+ <div class="flex items-center justify-between gap-2">
834
+ <div>
835
+ <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
836
+ Menu
837
+ </p>
838
+ <h2 class="text-lg font-semibold leading-tight">Navigation controls</h2>
839
+ </div>
840
+ </div>
841
+ {/snippet}
842
+
843
+ {#snippet layoutHeader()}
844
+ <div class="flex items-center justify-between gap-2">
845
+ <div>
846
+ <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
847
+ Layout
848
+ </p>
849
+ <h2 class="text-lg font-semibold leading-tight">Splitter + context menu</h2>
850
+ </div>
851
+ </div>
852
+ {/snippet}
853
+
854
+ {#snippet firstPane()}
855
+ <div class="h-full grid place-items-center text-sm font-medium">
856
+ First panel
857
+ </div>
858
+ {/snippet}
859
+
860
+ {#snippet secondPane()}
861
+ <div class="h-full grid place-items-center text-sm font-medium">
862
+ Second panel
863
+ </div>
864
+ {/snippet}
865
+
866
+ <div class="grid gap-6 lg:grid-cols-2">
867
+ <Card header={menuHeader}>
868
+ <div class="space-y-4">
869
+ <Menu menus={menuData} sz={menuSize} onSelect={handleMenuSelect} />
870
+
871
+ <div class="text-sm text-[var(--color-text-muted)]">
872
+ {menuSelection}
873
+ </div>
874
+
875
+ <div class="rounded-xl border border-[var(--border-color-default)] p-4">
876
+ <Pagination
877
+ currentPage={standalonePage}
878
+ totalPages={standaloneTotal}
879
+ onPageChange={(p) => (standalonePage = p)}
880
+ />
881
+ </div>
882
+
883
+ {#snippet pageOne()}
884
+ <div class="p-4 rounded-xl border border-[var(--border-color-default)] bg-[var(--color-bg-surface)]">
885
+ <p class="text-sm font-medium">Release notes</p>
886
+ <p class="text-xs text-[var(--color-text-muted)]">
887
+ Snapshot of changes across components.
888
+ </p>
889
+ </div>
890
+ {/snippet}
891
+ {#snippet pageTwo()}
892
+ <div class="p-4 rounded-xl border border-[var(--border-color-default)] bg-[var(--color-bg-surface)]">
893
+ <p class="text-sm font-medium">Design tasks</p>
894
+ <p class="text-xs text-[var(--color-text-muted)]">
895
+ Review tokens and spacing.
896
+ </p>
897
+ </div>
898
+ {/snippet}
899
+ {#snippet pageThree()}
900
+ <div class="p-4 rounded-xl border border-[var(--border-color-default)] bg-[var(--color-bg-surface)]">
901
+ <p class="text-sm font-medium">QA checklist</p>
902
+ <p class="text-xs text-[var(--color-text-muted)]">
903
+ Validate keyboard and focus behavior.
904
+ </p>
905
+ </div>
906
+ {/snippet}
907
+
908
+ <PaginatedCard
909
+ items={[pageOne, pageTwo, pageThree]}
910
+ itemsPerPage={1}
911
+ />
912
+ </div>
913
+ </Card>
914
+
915
+ <Card header={layoutHeader}>
916
+ <div class="space-y-4">
917
+ <div class="h-56 rounded-xl border border-[var(--border-color-default)] overflow-hidden">
918
+ <Splitter
919
+ direction="horizontal"
920
+ initialSize={45}
921
+ dividerSize={6}
922
+ minSize={20}
923
+ maxSize={80}
924
+ first={firstPane}
925
+ second={secondPane}
926
+ />
927
+ </div>
928
+
929
+ <div
930
+ class="rounded-xl border border-[var(--border-color-default)] bg-[var(--color-bg-surface)] p-4 text-sm text-[var(--color-text-muted)]"
931
+ oncontextmenu={(e) => contextMenuRef?.openAt(e)}
932
+ role="button"
933
+ tabindex="0"
934
+ >
935
+ {contextMenuStatus}
936
+ </div>
937
+
938
+ <ContextMenu
939
+ bind:this={contextMenuRef}
940
+ onUndo={() => handleContextAction("Undo", "info")}
941
+ onRedo={() => handleContextAction("Redo", "info")}
942
+ onCopy={() => handleContextAction("Copy", "success")}
943
+ onCut={() => handleContextAction("Cut", "warning")}
944
+ onPaste={() => handleContextAction("Paste", "success")}
945
+ onDelete={() => handleContextAction("Delete", "danger")}
946
+ />
947
+ </div>
948
+ </Card>
949
+ </div>
950
+
951
+ {#snippet codeHeader()}
952
+ <div class="flex items-center justify-between gap-2">
953
+ <div>
954
+ <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
955
+ Code
956
+ </p>
957
+ <h2 class="text-lg font-semibold leading-tight">CodeView editor</h2>
958
+ </div>
959
+ <Switch
960
+ checked={codeEditable}
961
+ onChange={(v) => (codeEditable = v)}
962
+ rightLabel={codeEditable ? "Editable" : "Read only"}
963
+ sz="sm"
964
+ />
965
+ </div>
966
+ {/snippet}
967
+
968
+ {#snippet quickHeader()}
969
+ <div class="flex items-center justify-between gap-2">
970
+ <div>
971
+ <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
972
+ Actions
973
+ </p>
974
+ <h2 class="text-lg font-semibold leading-tight">Quick actions</h2>
975
+ </div>
976
+ </div>
977
+ {/snippet}
978
+
979
+ <div class="grid gap-6 lg:grid-cols-2">
980
+ <Card header={codeHeader} class="min-h-[360px]">
981
+ <CodeView
982
+ bind:code={codeSample}
983
+ language="js"
984
+ title="tokens.js"
985
+ showCopyButton={true}
986
+ showLineNumbers={true}
987
+ editable={codeEditable}
988
+ activeLine={true}
989
+ class="h-[320px]"
990
+ />
991
+ </Card>
992
+
993
+ <Card header={quickHeader}>
994
+ <div class="space-y-4">
995
+ <div class="flex flex-wrap gap-2">
996
+ <Button variant="secondary" onClick={() => pushToast("info")}>
997
+ Notify
998
+ </Button>
999
+ <Button variant="success" onClick={() => pushToast("success")}>
1000
+ Success
1001
+ </Button>
1002
+ <Button variant="danger" onClick={() => pushToast("danger")}>
1003
+ Error
1004
+ </Button>
1005
+ </div>
1006
+
1007
+ <div class="rounded-xl border border-[var(--border-color-default)] bg-[var(--color-bg-surface)] p-4">
1008
+ <p class="text-xs uppercase tracking-[0.15em] text-[var(--color-text-muted)]">
1009
+ Active nav
1010
+ </p>
1011
+ <p class="text-lg font-semibold">{activeNav}</p>
1012
+ <p class="text-sm text-[var(--color-text-muted)]">
1013
+ Search: {searchQuery || "empty"}
1014
+ </p>
1015
+ </div>
1016
+ </div>
1017
+ </Card>
1018
+ </div>
1019
+
1020
+ <Dialog
1021
+ open={dialogOpen}
1022
+ title="Confirm release"
1023
+ message="Ready to ship the selected files?"
1024
+ onConfirm={() => {
1025
+ dialogOpen = false;
1026
+ pushToast("success");
1027
+ }}
1028
+ onCancel={() => {
1029
+ dialogOpen = false;
1030
+ }}
1031
+ onClose={() => {
1032
+ dialogOpen = false;
1033
+ }}
1034
+ />
1035
+ </div>
1036
+
1037
+ {#each toasts as toast (toast.id)}
1038
1038
  <Toast
1039
1039
  title={toast.title}
1040
1040
  message={toast.message}