fluent-svelte-extra 1.0.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 (145) hide show
  1. package/.prettierignore +1 -0
  2. package/.prettierrc +7 -0
  3. package/CHANGELOG.md +7 -0
  4. package/LICENSE +21 -0
  5. package/README.md +33 -0
  6. package/package.json +83 -0
  7. package/src/app.html +12 -0
  8. package/src/global.d.ts +1 -0
  9. package/src/lib/AutoSuggestBox/AutoSuggestBox.scss +44 -0
  10. package/src/lib/AutoSuggestBox/AutoSuggestBox.svelte +173 -0
  11. package/src/lib/Button/Button.scss +94 -0
  12. package/src/lib/Button/Button.svelte +48 -0
  13. package/src/lib/CalendarDatePicker/CalendarDatePicker.scss +15 -0
  14. package/src/lib/CalendarDatePicker/CalendarDatePicker.svelte +86 -0
  15. package/src/lib/CalendarView/CalendarView.scss +156 -0
  16. package/src/lib/CalendarView/CalendarView.svelte +753 -0
  17. package/src/lib/CalendarView/CalendarViewItem.scss +130 -0
  18. package/src/lib/CalendarView/CalendarViewItem.svelte +33 -0
  19. package/src/lib/Checkbox/Checkbox.scss +117 -0
  20. package/src/lib/Checkbox/Checkbox.svelte +81 -0
  21. package/src/lib/ComboBox/ComboBox.scss +152 -0
  22. package/src/lib/ComboBox/ComboBox.svelte +360 -0
  23. package/src/lib/ComboBox/ComboBoxItem.scss +80 -0
  24. package/src/lib/ComboBox/ComboBoxItem.svelte +30 -0
  25. package/src/lib/ContentDialog/ContentDialog.scss +68 -0
  26. package/src/lib/ContentDialog/ContentDialog.svelte +123 -0
  27. package/src/lib/ContextMenu/ContextMenu.scss +11 -0
  28. package/src/lib/ContextMenu/ContextMenu.svelte +104 -0
  29. package/src/lib/Expander/Expander.scss +134 -0
  30. package/src/lib/Expander/Expander.svelte +123 -0
  31. package/src/lib/Flipper/Flipper.svelte +49 -0
  32. package/src/lib/Flyout/FlyoutSurface.scss +14 -0
  33. package/src/lib/Flyout/FlyoutSurface.svelte +21 -0
  34. package/src/lib/Flyout/FlyoutWrapper.scss +81 -0
  35. package/src/lib/Flyout/FlyoutWrapper.svelte +126 -0
  36. package/src/lib/IconButton/IconButton.scss +31 -0
  37. package/src/lib/IconButton/IconButton.svelte +49 -0
  38. package/src/lib/InfoBadge/InfoBadge.scss +39 -0
  39. package/src/lib/InfoBadge/InfoBadge.svelte +81 -0
  40. package/src/lib/InfoBar/InfoBar.scss +122 -0
  41. package/src/lib/InfoBar/InfoBar.svelte +133 -0
  42. package/src/lib/ListItem/ListItem.scss +74 -0
  43. package/src/lib/ListItem/ListItem.svelte +88 -0
  44. package/src/lib/MenuBar/MenuBar.scss +10 -0
  45. package/src/lib/MenuBar/MenuBar.svelte +49 -0
  46. package/src/lib/MenuBar/MenuBarItem.scss +38 -0
  47. package/src/lib/MenuBar/MenuBarItem.svelte +135 -0
  48. package/src/lib/MenuBar/flyoutState.ts +5 -0
  49. package/src/lib/MenuFlyout/MenuFlyoutDivider.scss +7 -0
  50. package/src/lib/MenuFlyout/MenuFlyoutDivider.svelte +14 -0
  51. package/src/lib/MenuFlyout/MenuFlyoutItem.scss +147 -0
  52. package/src/lib/MenuFlyout/MenuFlyoutItem.svelte +239 -0
  53. package/src/lib/MenuFlyout/MenuFlyoutSurface.scss +42 -0
  54. package/src/lib/MenuFlyout/MenuFlyoutSurface.svelte +28 -0
  55. package/src/lib/MenuFlyout/MenuFlyoutWrapper.scss +64 -0
  56. package/src/lib/MenuFlyout/MenuFlyoutWrapper.svelte +114 -0
  57. package/src/lib/NavigationView/NavigationView.scss +0 -0
  58. package/src/lib/NavigationView/NavigationView.svelte +82 -0
  59. package/src/lib/NumberBox/NumberBox.scss +31 -0
  60. package/src/lib/NumberBox/NumberBox.svelte +267 -0
  61. package/src/lib/PersonPicture/PersonPicture.scss +35 -0
  62. package/src/lib/PersonPicture/PersonPicture.svelte +62 -0
  63. package/src/lib/ProgressBar/ProgressBar.scss +83 -0
  64. package/src/lib/ProgressBar/ProgressBar.svelte +60 -0
  65. package/src/lib/ProgressRing/ProgressRing.scss +37 -0
  66. package/src/lib/ProgressRing/ProgressRing.svelte +73 -0
  67. package/src/lib/RadioButton/RadioButton.scss +114 -0
  68. package/src/lib/RadioButton/RadioButton.svelte +67 -0
  69. package/src/lib/RangeSlider/RangeSlider.svelte +91 -0
  70. package/src/lib/ScrollView/ScrollView.svelte +9 -0
  71. package/src/lib/Slider/Slider.scss +263 -0
  72. package/src/lib/Slider/Slider.svelte +261 -0
  73. package/src/lib/TextBlock/TextBlock.scss +62 -0
  74. package/src/lib/TextBlock/TextBlock.svelte +70 -0
  75. package/src/lib/TextBox/TextBox.scss +108 -0
  76. package/src/lib/TextBox/TextBox.svelte +225 -0
  77. package/src/lib/TextBox/TextBoxButton.scss +34 -0
  78. package/src/lib/TextBox/TextBoxButton.svelte +27 -0
  79. package/src/lib/ToggleSwitch/ToggleSwitch.scss +118 -0
  80. package/src/lib/ToggleSwitch/ToggleSwitch.svelte +55 -0
  81. package/src/lib/Tooltip/TooltipSurface.scss +16 -0
  82. package/src/lib/Tooltip/TooltipSurface.svelte +27 -0
  83. package/src/lib/Tooltip/TooltipWrapper.scss +66 -0
  84. package/src/lib/Tooltip/TooltipWrapper.svelte +117 -0
  85. package/src/lib/_mixins.scss +130 -0
  86. package/src/lib/index.ts +33 -0
  87. package/src/lib/internal.ts +213 -0
  88. package/src/lib/svelte-jsx.d.ts +14 -0
  89. package/src/lib/theme.css +414 -0
  90. package/src/routes/__layout.svelte +48 -0
  91. package/src/routes/docs/__layout.svelte +122 -0
  92. package/src/routes/docs/components/button.md +43 -0
  93. package/src/routes/docs/components/calendarview.md +188 -0
  94. package/src/routes/docs/components/checkbox.md +87 -0
  95. package/src/routes/docs/components/contentdialog.md +155 -0
  96. package/src/routes/docs/components/expander.md +115 -0
  97. package/src/routes/docs/components/flyout.md +107 -0
  98. package/src/routes/docs/components/iconbutton.md +39 -0
  99. package/src/routes/docs/components/infobadge.md +54 -0
  100. package/src/routes/docs/components/infobar.md +102 -0
  101. package/src/routes/docs/components/listitem.md +87 -0
  102. package/src/routes/docs/components/personpicture.md +125 -0
  103. package/src/routes/docs/components/progressring.md +83 -0
  104. package/src/routes/docs/components/radiobutton.md +88 -0
  105. package/src/routes/docs/components/slider.md +165 -0
  106. package/src/routes/docs/components/textblock.md +46 -0
  107. package/src/routes/docs/components/textbox.md +124 -0
  108. package/src/routes/docs/components/toggleswitch.md +73 -0
  109. package/src/routes/docs/getting-started.md +116 -0
  110. package/src/routes/docs/index.md +37 -0
  111. package/src/routes/docs/internals/index.md +0 -0
  112. package/src/routes/index.svelte +121 -0
  113. package/src/routes/test/__layout-test.svelte +1 -0
  114. package/src/routes/test/index.svelte +757 -0
  115. package/src/routes/test/nav.svelte +7 -0
  116. package/src/site/data/docs.ts +176 -0
  117. package/src/site/data/home.ts +12 -0
  118. package/src/site/lib/APIDocs/APIDocs.svelte +178 -0
  119. package/src/site/lib/APIDocs/ParsedComponent.d.ts +85 -0
  120. package/src/site/lib/CopyBox/CopyBox.svelte +23 -0
  121. package/src/site/lib/Example/Example.scss +33 -0
  122. package/src/site/lib/Example/Example.svelte +18 -0
  123. package/src/site/lib/HeroCard/HeroCard.scss +24 -0
  124. package/src/site/lib/HeroCard/HeroCard.svelte +36 -0
  125. package/src/site/lib/Metadata/Metadata.svelte +14 -0
  126. package/src/site/lib/Navbar/Navbar.scss +92 -0
  127. package/src/site/lib/Navbar/Navbar.svelte +47 -0
  128. package/src/site/lib/PageSection/PageSection.scss +57 -0
  129. package/src/site/lib/PageSection/PageSection.svelte +10 -0
  130. package/src/site/lib/Showcase/Showcase.scss +53 -0
  131. package/src/site/lib/Showcase/Showcase.svelte +67 -0
  132. package/src/site/lib/Toc/Toc.scss +18 -0
  133. package/src/site/lib/Toc/Toc.svelte +59 -0
  134. package/src/site/lib/TreeView/TreeView.svelte +89 -0
  135. package/src/site/lib/index.ts +9 -0
  136. package/src/site/styles/_markdown.scss +260 -0
  137. package/src/site/styles/_mixins.scss +319 -0
  138. package/src/site/styles/global.scss +40 -0
  139. package/src/site/styles/pages/docs.scss +74 -0
  140. package/src/site/styles/pages/home.scss +134 -0
  141. package/static/bloom-mica-dark.png +0 -0
  142. package/static/bloom-mica-light.png +0 -0
  143. package/static/logo.svg +11 -0
  144. package/svelte.config.js +57 -0
  145. package/tsconfig.json +38 -0
@@ -0,0 +1,757 @@
1
+ <script>
2
+ import {
3
+ AutoSuggestBox,
4
+ Button,
5
+ Checkbox,
6
+ ComboBox,
7
+ ContentDialog,
8
+ ContextMenu,
9
+ Expander,
10
+ Flyout,
11
+ IconButton,
12
+ InfoBadge,
13
+ InfoBar,
14
+ ListItem,
15
+ MenuBar,
16
+ MenuBarItem,
17
+ MenuFlyout,
18
+ MenuFlyoutDivider,
19
+ MenuFlyoutItem,
20
+ NumberBox,
21
+ PersonPicture,
22
+ ProgressBar,
23
+ ProgressRing,
24
+ RadioButton,
25
+ Slider,
26
+ TextBlock,
27
+ TextBox,
28
+ ToggleSwitch,
29
+ Tooltip,
30
+ RangeSlider,
31
+ Flipper
32
+ } from "$lib";
33
+
34
+ import { PageSection } from "$site/lib";
35
+
36
+ import "$lib/theme.css";
37
+
38
+ import ArrowLeft from "@fluentui/svg-icons/icons/arrow_left_16_regular.svg?raw";
39
+ import ArrowRight from "@fluentui/svg-icons/icons/arrow_right_16_regular.svg?raw";
40
+ import ArrowClockwise from "@fluentui/svg-icons/icons/arrow_clockwise_16_regular.svg?raw";
41
+ import SaveEdit from "@fluentui/svg-icons/icons/save_edit_20_regular.svg?raw";
42
+ import Print from "@fluentui/svg-icons/icons/print_16_regular.svg?raw";
43
+ import Cast from "@fluentui/svg-icons/icons/cast_20_regular.svg?raw";
44
+ import Send from "@fluentui/svg-icons/icons/send_16_regular.svg?raw";
45
+ import ScanTable from "@fluentui/svg-icons/icons/scan_table_24_regular.svg?raw";
46
+ import ReadAloud from "@fluentui/svg-icons/icons/read_aloud_16_regular.svg?raw";
47
+ import Collections from "@fluentui/svg-icons/icons/collections_20_regular.svg?raw";
48
+ import Share from "@fluentui/svg-icons/icons/share_16_regular.svg?raw";
49
+ import CopySelect from "@fluentui/svg-icons/icons/copy_select_20_regular.svg?raw";
50
+ import CameraEdit from "@fluentui/svg-icons/icons/camera_edit_20_regular.svg?raw";
51
+
52
+ let progressRingValue = Math.floor(Math.random() * 101);
53
+
54
+ let normalRadioGroup = 0;
55
+ let disabledRadioGroup = 0;
56
+
57
+ let nonClosableFlyoutOpen = false;
58
+ let flyoutTopOpen = false;
59
+ let flyoutBottomOpen = false;
60
+ let flyoutLeftOpen = false;
61
+ let flyoutRightOpen = false;
62
+
63
+ let dialogOpen = false;
64
+ let dialogResult = "";
65
+
66
+ let value;
67
+
68
+ let menuGroup = 0;
69
+
70
+ let test1 = false;
71
+ </script>
72
+
73
+ <div style="height: 56px;" />
74
+
75
+ <PageSection>
76
+ <h2>fluent-svelte test page</h2>
77
+ <p>Made with <a href="https://kit.svelte.dev">SvelteKit</a></p>
78
+
79
+ <h3>Buttons</h3>
80
+ <div class="showcase-group">
81
+ <Button>Button</Button>
82
+ <Button variant="accent">Button</Button>
83
+ <Button variant="hyperlink">Button</Button>
84
+ </div>
85
+ <div class="showcase-group">
86
+ <Button disabled>Button</Button>
87
+ <Button disabled variant="accent">Button</Button>
88
+ <Button disabled variant="hyperlink">Button</Button>
89
+ </div>
90
+
91
+ <h3>Checkboxes</h3>
92
+ <div class="showcase-group">
93
+ <Checkbox>Checkbox</Checkbox>
94
+ <Checkbox checked>Checkbox</Checkbox>
95
+ <Checkbox checked indeterminate>Checkbox</Checkbox>
96
+ </div>
97
+ <div class="showcase-group">
98
+ <Checkbox disabled>Checkbox</Checkbox>
99
+ <Checkbox checked disabled>Checkbox</Checkbox>
100
+ <Checkbox checked disabled indeterminate>Checkbox</Checkbox>
101
+ </div>
102
+
103
+ <h3>Switches</h3>
104
+ <div class="showcase-group">
105
+ <ToggleSwitch>Switch</ToggleSwitch>
106
+ <ToggleSwitch checked>Switch</ToggleSwitch>
107
+ </div>
108
+ <div class="showcase-group">
109
+ <ToggleSwitch disabled>Switch</ToggleSwitch>
110
+ <ToggleSwitch checked disabled>Switch</ToggleSwitch>
111
+ </div>
112
+ <h3>Radio Button</h3>
113
+ <div class="showcase-group">
114
+ <RadioButton bind:group={normalRadioGroup} value={0}>Option</RadioButton>
115
+ <RadioButton bind:group={normalRadioGroup} value={1}>Option</RadioButton>
116
+ </div>
117
+ <div class="showcase-group">
118
+ <RadioButton disabled bind:group={disabledRadioGroup} value={0}>Option</RadioButton>
119
+ <RadioButton disabled bind:group={disabledRadioGroup} value={1}>Option</RadioButton>
120
+ </div>
121
+
122
+ <h3>ComboBox</h3>
123
+ <ComboBox
124
+ placeholder="ComboBox"
125
+ items={[
126
+ { name: "Item 0", value: 0 },
127
+ { name: "Item 1", value: 1 },
128
+ {
129
+ name: "Item 2",
130
+ value: 2,
131
+ disabled: true
132
+ },
133
+ { name: "Item 3", value: 3 }
134
+ ]}
135
+ />
136
+
137
+ <ComboBox
138
+ value={1}
139
+ editable
140
+ searchValue="asdasd"
141
+ placeholder="ComboBox"
142
+ items={[
143
+ { name: "Item 0", value: 0 },
144
+ { name: "Item 1", value: 1 },
145
+ {
146
+ name: "Item 2",
147
+ value: 2,
148
+ disabled: true
149
+ },
150
+ { name: "Item 3", value: 3 }
151
+ ]}
152
+ />
153
+
154
+ <ComboBox
155
+ placeholder="ComboBox"
156
+ disabled
157
+ items={[
158
+ {
159
+ name: "Item 1"
160
+ },
161
+ {
162
+ name: "Item 2"
163
+ },
164
+ {
165
+ name: "Item 3"
166
+ },
167
+ {
168
+ name: "Item 4"
169
+ }
170
+ ]}
171
+ />
172
+
173
+ <h3>Progress Ring</h3>
174
+ <div class="showcase-group">
175
+ <ProgressRing />
176
+ <ProgressRing bind:value={progressRingValue} />
177
+ <Button on:click={() => (progressRingValue = Math.floor(Math.random() * 101))}
178
+ >Randomize Value
179
+ </Button>
180
+ </div>
181
+ <div class="showcase-group">
182
+ <ProgressRing size={60} />
183
+ </div>
184
+
185
+ <h3>InfoBadge</h3>
186
+ <div class="showcase-group">
187
+ <InfoBadge severity="attention" />
188
+ <InfoBadge severity="success" />
189
+ <InfoBadge severity="caution" />
190
+ <InfoBadge severity="critical" />
191
+ <InfoBadge severity="information" />
192
+ </div>
193
+ <div class="showcase-group">
194
+ <InfoBadge severity="attention">{Math.floor(Math.random() * 10)}</InfoBadge>
195
+ <InfoBadge severity="success">{Math.floor(Math.random() * 10)}</InfoBadge>
196
+ <InfoBadge severity="caution">{Math.floor(Math.random() * 10)}</InfoBadge>
197
+ <InfoBadge severity="critical">{Math.floor(Math.random() * 10)}</InfoBadge>
198
+ <InfoBadge severity="information">{Math.floor(Math.random() * 10)}</InfoBadge>
199
+ </div>
200
+
201
+ <h3>Progress Bar</h3>
202
+ <div class="showcase-group">
203
+ <ProgressBar value={50} />
204
+ <ProgressBar />
205
+ </div>
206
+
207
+ <h3>Flyout</h3>
208
+ <div class="showcase-group" style="display: flex; justify-content: center;">
209
+ <Flyout closable={false} bind:open={nonClosableFlyoutOpen}>
210
+ <Button variant="accent">Non-closasble Flyout</Button>
211
+ <svelte:fragment slot="flyout">You can't close me >:)</svelte:fragment>
212
+ </Flyout>
213
+ </div>
214
+ <div
215
+ class="showcase-group"
216
+ style="display: flex; justify-content: center; align-items: center;"
217
+ >
218
+ <Flyout placement="top" bind:open={flyoutTopOpen}>
219
+ <Button variant="accent">Top Flyout</Button>
220
+ <svelte:fragment slot="flyout">Flyout Content</svelte:fragment>
221
+ </Flyout>
222
+ <Flyout placement="bottom" bind:open={flyoutBottomOpen}>
223
+ <Button variant="accent">Bottom Flyout</Button>
224
+ <svelte:fragment slot="flyout">Flyout Content</svelte:fragment>
225
+ </Flyout>
226
+ <Flyout placement="left" bind:open={flyoutLeftOpen}>
227
+ <Button variant="accent">Left Flyout</Button>
228
+ <svelte:fragment slot="flyout">Flyout Content</svelte:fragment>
229
+ </Flyout>
230
+ <Flyout placement="right" bind:open={flyoutRightOpen}>
231
+ <Button variant="accent">Right Flyout</Button>
232
+ <svelte:fragment slot="flyout">Flyout Content</svelte:fragment>
233
+ </Flyout>
234
+ </div>
235
+
236
+ <h3>Info Bar</h3>
237
+ <div class="showcase-group" style="flex-direction: column">
238
+ <InfoBar
239
+ closable={false}
240
+ severity="information"
241
+ title="Info"
242
+ message="Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna."
243
+ >
244
+ <svelte:fragment slot="action">
245
+ <Button variant="accent">Action</Button>
246
+ </svelte:fragment>
247
+ </InfoBar>
248
+ <InfoBar severity="attention" title="Attention" message="Something is happening.">
249
+ <svelte:fragment slot="action">
250
+ <Button>Action</Button>
251
+ </svelte:fragment>
252
+ </InfoBar>
253
+ <InfoBar severity="success" title="Success" message="Nothing bad happened!" />
254
+ <InfoBar
255
+ severity="caution"
256
+ title="Caution"
257
+ message="Don't do this or something bad will happen."
258
+ />
259
+ <InfoBar severity="critical" title="Error" message="Something bad happened :(" />
260
+ </div>
261
+
262
+ <h3>Text Box</h3>
263
+ <div class="showcase-group">
264
+ <TextBox bind:value placeholder="TextBox" />
265
+ <TextBox disabled placeholder="TextBox" />
266
+ <TextBox type="password" placeholder="TextBox" />
267
+ <TextBox type="search" placeholder="TextBox" />
268
+ <TextBox disabled value="hi" type="password" placeholder="TextBox" />
269
+ <TextBox disabled value="hi" type="search" placeholder="TextBox" />
270
+ </div>
271
+
272
+ <h3>Number Box</h3>
273
+ <div class="showcase-group">
274
+ <NumberBox value={1} min={0} max={10} placeholder="NumberBox" />
275
+ <NumberBox size={50} placeholder="NumberBox" inline />
276
+ <NumberBox disabled value={1} min={0} max={10} placeholder="NumberBox" />
277
+ <NumberBox disabled size={50} placeholder="NumberBox" inline />
278
+ </div>
279
+
280
+ <h3>Tooltip</h3>
281
+ <div class="showcase-group">
282
+ <Tooltip text="test">
283
+ <div
284
+ tabindex={-1}
285
+ style="width:80px;height:80px;border:2px dotted var(--fds-divider-stroke-default);margin:0;"
286
+ />
287
+ </Tooltip>
288
+ </div>
289
+
290
+ <h3>Person Picture</h3>
291
+ <div class="showcase-group">
292
+ <PersonPicture size={24}>
293
+ {Math.random()
294
+ .toString(36)
295
+ .replace(/[^a-z]+/g, "")
296
+ .toUpperCase()
297
+ .substr(0, 2)}
298
+ </PersonPicture>
299
+ <PersonPicture src="https://thispersondoesnotexist.com/image" size={32}>
300
+ {Math.random()
301
+ .toString(36)
302
+ .replace(/[^a-z]+/g, "")
303
+ .toUpperCase()
304
+ .substr(0, 2)}
305
+ </PersonPicture>
306
+ <PersonPicture size={48}>
307
+ {Math.random()
308
+ .toString(36)
309
+ .replace(/[^a-z]+/g, "")
310
+ .toUpperCase()
311
+ .substr(0, 2)}
312
+
313
+ <svelte:fragment slot="badge">
314
+ <InfoBadge>1</InfoBadge>
315
+ </svelte:fragment>
316
+ </PersonPicture>
317
+ <PersonPicture alt="a a a a" size={96} />
318
+ </div>
319
+
320
+ <h3>Dialog</h3>
321
+ <div class="showcase-group">
322
+ <Button on:click={() => (dialogOpen = true)}>Open</Button>
323
+ <ContentDialog bind:open={dialogOpen} title="Add new alarm">
324
+ <div style="display: flex; flex-direction: column; gap: 12px; margin: 0;">
325
+ <TextBox placeholder="Alarm name" />
326
+ <ComboBox
327
+ value={1}
328
+ items={[
329
+ {
330
+ name: "Disabled"
331
+ },
332
+ {
333
+ name: "10 minutes"
334
+ },
335
+ {
336
+ name: "20 minutes"
337
+ },
338
+ {
339
+ name: "30 minutes"
340
+ },
341
+ {
342
+ name: "1 hour"
343
+ }
344
+ ]}
345
+ />
346
+ <Checkbox>Repeat alarm</Checkbox>
347
+ </div>
348
+ <svelte:fragment slot="footer">
349
+ <Button
350
+ variant="accent"
351
+ on:click={() => {
352
+ dialogOpen = false;
353
+ dialogResult = "Save";
354
+ }}
355
+ >Save
356
+ </Button>
357
+ <Button
358
+ on:click={() => {
359
+ dialogOpen = false;
360
+ dialogResult = "Cancel";
361
+ }}
362
+ >Cancel
363
+ </Button>
364
+ </svelte:fragment>
365
+ </ContentDialog>
366
+ </div>
367
+
368
+ <p>Result: {dialogResult}</p>
369
+
370
+ <h3>Slider</h3>
371
+
372
+ <div class="showcase-group">
373
+ <Slider on:change={() => console.log("x")} />
374
+ <Slider value={50} max={9000000} step={20} />
375
+ <Slider value={2500} min={1000} max={5000} />
376
+ </div>
377
+
378
+ <h4>Ticks</h4>
379
+ <div class="showcase-group">
380
+ <Slider value={50} ticks={[20, 40, 60, 80]} />
381
+ <Slider value={50} ticks={[20, 40, 60, 80]} tickPlacement="before" />
382
+ <Slider value={50} ticks={[20, 40, 60, 80]} tickPlacement="after" />
383
+ </div>
384
+
385
+ <h4>Tooltips</h4>
386
+ <div class="showcase-group">
387
+ <Slider value={50} tooltip={false} />
388
+ <Slider value={50} prefix="$" />
389
+ <Slider value={50} suffix="%" />
390
+ </div>
391
+
392
+ <h4>Variants</h4>
393
+ <div class="showcase-group">
394
+ <Slider value={50} reverse />
395
+ <Slider value={50} disabled />
396
+ <Slider value={50} track={false} />
397
+ </div>
398
+
399
+ <div class="showcase-group" style="block-size: 250px">
400
+ <Slider orientation="vertical" />
401
+ <Slider orientation="vertical" value={50} step={20} />
402
+ <Slider orientation="vertical" value={2500} min={1000} max={5000} />
403
+ <Slider orientation="vertical" value={50} ticks={[20, 40, 60, 80]} />
404
+ <Slider orientation="vertical" value={50} ticks={[20, 40, 60, 80]} tickPlacement="before" />
405
+ <Slider orientation="vertical" value={50} ticks={[20, 40, 60, 80]} tickPlacement="after" />
406
+ <Slider orientation="vertical" value={50} reverse />
407
+ <Slider orientation="vertical" value={50} disabled />
408
+ <Slider orientation="vertical" value={50} track={false} />
409
+ </div>
410
+
411
+ <h3>Expander</h3>
412
+ <div class="showcase-group">
413
+ <Expander>
414
+ Expander Down (Icon)
415
+ <svelte:fragment slot="icon">
416
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
417
+ <path
418
+ d="M11.8105 2.44911C11.2248 1.86332 10.275 1.86332 9.68922 2.44911L7.96197 4.17636C7.81383 3.50372 7.21422 3.00044 6.49707 3.00044H3.49707C2.66864 3.00044 1.99707 3.67202 1.99707 4.50044V12.4985C1.99707 13.0088 2.25188 13.4595 2.64121 13.7305C2.88446 13.9006 3.18051 14.0004 3.49988 14.0004H11.4999C12.3283 14.0004 12.9999 13.3289 12.9999 12.5004V9.50044C12.9999 8.80142 12.5217 8.21408 11.8746 8.04764L13.5812 6.34109C14.167 5.7553 14.167 4.80555 13.5812 4.21977L11.8105 2.44911ZM9.57791 8.00044H7.99707V6.4196L9.57791 8.00044ZM10.3963 3.15621C10.5916 2.96095 10.9082 2.96095 11.1034 3.15621L12.8741 4.92687C13.0694 5.12214 13.0694 5.43872 12.8741 5.63398L11.1034 7.40464C10.9082 7.59991 10.5916 7.59991 10.3963 7.40464L8.62566 5.63398C8.4304 5.43872 8.4304 5.12214 8.62566 4.92687L10.3963 3.15621ZM6.99707 4.50044V8.00044L2.99707 8.00044V4.50044C2.99707 4.2243 3.22093 4.00044 3.49707 4.00044H6.49707C6.77321 4.00044 6.99707 4.2243 6.99707 4.50044ZM2.99988 12.5004L2.99988 9.00044H6.99707V12.9985H3.49707C3.3909 12.9985 3.29245 12.9654 3.21149 12.9089C3.08346 12.8184 2.99988 12.6692 2.99988 12.5004ZM7.99707 9.00044H11.4999C11.776 9.00044 11.9999 9.2243 11.9999 9.50044V12.5004C11.9999 12.7766 11.776 13.0004 11.4999 13.0004H7.99707V9.00044Z"
419
+ fill="currentColor"
420
+ />
421
+ </svg>
422
+ </svelte:fragment>
423
+ <svelte:fragment slot="content">hihihihi</svelte:fragment>
424
+ </Expander>
425
+ <Expander direction="up">
426
+ Expander Up
427
+ <svelte:fragment slot="content">hihihihi</svelte:fragment>
428
+ </Expander>
429
+ </div>
430
+
431
+ <h3>Text Block</h3>
432
+ <div class="showcase-group">
433
+ <TextBlock variant="caption">Caption</TextBlock>
434
+ <TextBlock variant="body">Body</TextBlock>
435
+ <TextBlock variant="bodyStrong">Body Strong</TextBlock>
436
+ <TextBlock variant="bodyLarge">Body Large</TextBlock>
437
+ <TextBlock variant="subtitle">Subtitle</TextBlock>
438
+ <TextBlock variant="title">Title</TextBlock>
439
+ <TextBlock variant="titleLarge">Title Large</TextBlock>
440
+ <TextBlock variant="display">Display</TextBlock>
441
+ </div>
442
+
443
+ <h3>Icon Button</h3>
444
+ <div class="showcase-group">
445
+ <IconButton>
446
+ <svg xmlns="http://www.w3.org/2000/svg" height="16" viewBox="0 0 1024 1024" width="16">
447
+ <path
448
+ fill="currentColor"
449
+ d="M0,512C0,465 6.08333,419.667 18.25,376C30.4167,332.333 47.6667,291.583 70,253.75C92.3333,215.917 119.083,181.417 150.25,150.25C181.417,119.083 215.917,92.3334 253.75,70C291.583,47.6667 332.333,30.4167 376,18.25C419.667,6.08337 465,0 512,0C559,0 604.333,6.08337 648,18.25C691.667,30.4167 732.417,47.6667 770.25,70C808.083,92.3334 842.583,119.083 873.75,150.25C904.917,181.417 931.667,215.917 954,253.75C976.333,291.583 993.583,332.333 1005.75,376C1017.92,419.667 1024,465 1024,512C1024,559 1017.92,604.333 1005.75,648C993.583,691.667 976.333,732.417 954,770.25C931.667,808.083 904.917,842.583 873.75,873.75C842.583,904.917 808.083,931.667 770.25,954C732.417,976.333 691.667,993.583 648,1005.75C604.333,1017.92 559,1024 512,1024C465,1024 419.667,1017.92 376,1005.75C332.333,993.583 291.583,976.333 253.75,954C215.917,931.667 181.417,904.917 150.25,873.75C119.083,842.583 92.3333,808.083 70,770.25C47.6667,732.417 30.4167,691.667 18.25,648C6.08333,604.333 0,559 0,512ZM960,512C960,471 954.667,431.417 944,393.25C933.333,355.083 918.25,319.417 898.75,286.25C879.25,253.083 855.833,222.833 828.5,195.5C801.167,168.167 770.917,144.75 737.75,125.25C704.583,105.75 668.917,90.6667 630.75,80C592.583,69.3334 553,64.0001 512,64C470.667,64.0001 430.917,69.3334 392.75,80C354.583,90.6667 318.917,105.75 285.75,125.25C252.583,144.75 222.417,168.083 195.25,195.25C168.083,222.417 144.75,252.583 125.25,285.75C105.75,318.917 90.6667,354.583 80,392.75C69.3333,430.917 64,470.667 64,512C64,553.333 69.3333,593.083 80,631.25C90.6667,669.417 105.75,705.083 125.25,738.25C144.75,771.417 168.083,801.583 195.25,828.75C222.417,855.917 252.583,879.25 285.75,898.75C318.917,918.25 354.583,933.333 392.75,944C430.917,954.667 470.667,960 512,960C553.333,960 593.083,954.667 631.25,944C669.417,933.333 705.083,918.25 738.25,898.75C771.417,879.25 801.583,855.917 828.75,828.75C855.917,801.583 879.25,771.417 898.75,738.25C918.25,705.083 933.333,669.417 944,631.25C954.667,593.083 960,553.333 960,512Z"
450
+ />
451
+ </svg>
452
+ </IconButton>
453
+ <IconButton disabled>
454
+ <svg xmlns="http://www.w3.org/2000/svg" height="16" viewBox="0 0 1024 1024" width="16">
455
+ <path
456
+ fill="currentColor"
457
+ d="M0,512C0,465 6.08333,419.667 18.25,376C30.4167,332.333 47.6667,291.583 70,253.75C92.3333,215.917 119.083,181.417 150.25,150.25C181.417,119.083 215.917,92.3334 253.75,70C291.583,47.6667 332.333,30.4167 376,18.25C419.667,6.08337 465,0 512,0C559,0 604.333,6.08337 648,18.25C691.667,30.4167 732.417,47.6667 770.25,70C808.083,92.3334 842.583,119.083 873.75,150.25C904.917,181.417 931.667,215.917 954,253.75C976.333,291.583 993.583,332.333 1005.75,376C1017.92,419.667 1024,465 1024,512C1024,559 1017.92,604.333 1005.75,648C993.583,691.667 976.333,732.417 954,770.25C931.667,808.083 904.917,842.583 873.75,873.75C842.583,904.917 808.083,931.667 770.25,954C732.417,976.333 691.667,993.583 648,1005.75C604.333,1017.92 559,1024 512,1024C465,1024 419.667,1017.92 376,1005.75C332.333,993.583 291.583,976.333 253.75,954C215.917,931.667 181.417,904.917 150.25,873.75C119.083,842.583 92.3333,808.083 70,770.25C47.6667,732.417 30.4167,691.667 18.25,648C6.08333,604.333 0,559 0,512ZM960,512C960,471 954.667,431.417 944,393.25C933.333,355.083 918.25,319.417 898.75,286.25C879.25,253.083 855.833,222.833 828.5,195.5C801.167,168.167 770.917,144.75 737.75,125.25C704.583,105.75 668.917,90.6667 630.75,80C592.583,69.3334 553,64.0001 512,64C470.667,64.0001 430.917,69.3334 392.75,80C354.583,90.6667 318.917,105.75 285.75,125.25C252.583,144.75 222.417,168.083 195.25,195.25C168.083,222.417 144.75,252.583 125.25,285.75C105.75,318.917 90.6667,354.583 80,392.75C69.3333,430.917 64,470.667 64,512C64,553.333 69.3333,593.083 80,631.25C90.6667,669.417 105.75,705.083 125.25,738.25C144.75,771.417 168.083,801.583 195.25,828.75C222.417,855.917 252.583,879.25 285.75,898.75C318.917,918.25 354.583,933.333 392.75,944C430.917,954.667 470.667,960 512,960C553.333,960 593.083,954.667 631.25,944C669.417,933.333 705.083,918.25 738.25,898.75C771.417,879.25 801.583,855.917 828.75,828.75C855.917,801.583 879.25,771.417 898.75,738.25C918.25,705.083 933.333,669.417 944,631.25C954.667,593.083 960,553.333 960,512Z"
458
+ />
459
+ </svg>
460
+ </IconButton>
461
+ </div>
462
+ <h3>List Item</h3>
463
+ <div style="display: flex; flex-direction: column;">
464
+ <ListItem>
465
+ <svg
466
+ slot="icon"
467
+ xmlns="http://www.w3.org/2000/svg"
468
+ height="16"
469
+ viewBox="0 0 1024 1024"
470
+ width="16"
471
+ >
472
+ <path
473
+ fill="currentColor"
474
+ d="M0,512C0,465 6.08333,419.667 18.25,376C30.4167,332.333 47.6667,291.583 70,253.75C92.3333,215.917 119.083,181.417 150.25,150.25C181.417,119.083 215.917,92.3334 253.75,70C291.583,47.6667 332.333,30.4167 376,18.25C419.667,6.08337 465,0 512,0C559,0 604.333,6.08337 648,18.25C691.667,30.4167 732.417,47.6667 770.25,70C808.083,92.3334 842.583,119.083 873.75,150.25C904.917,181.417 931.667,215.917 954,253.75C976.333,291.583 993.583,332.333 1005.75,376C1017.92,419.667 1024,465 1024,512C1024,559 1017.92,604.333 1005.75,648C993.583,691.667 976.333,732.417 954,770.25C931.667,808.083 904.917,842.583 873.75,873.75C842.583,904.917 808.083,931.667 770.25,954C732.417,976.333 691.667,993.583 648,1005.75C604.333,1017.92 559,1024 512,1024C465,1024 419.667,1017.92 376,1005.75C332.333,993.583 291.583,976.333 253.75,954C215.917,931.667 181.417,904.917 150.25,873.75C119.083,842.583 92.3333,808.083 70,770.25C47.6667,732.417 30.4167,691.667 18.25,648C6.08333,604.333 0,559 0,512ZM960,512C960,471 954.667,431.417 944,393.25C933.333,355.083 918.25,319.417 898.75,286.25C879.25,253.083 855.833,222.833 828.5,195.5C801.167,168.167 770.917,144.75 737.75,125.25C704.583,105.75 668.917,90.6667 630.75,80C592.583,69.3334 553,64.0001 512,64C470.667,64.0001 430.917,69.3334 392.75,80C354.583,90.6667 318.917,105.75 285.75,125.25C252.583,144.75 222.417,168.083 195.25,195.25C168.083,222.417 144.75,252.583 125.25,285.75C105.75,318.917 90.6667,354.583 80,392.75C69.3333,430.917 64,470.667 64,512C64,553.333 69.3333,593.083 80,631.25C90.6667,669.417 105.75,705.083 125.25,738.25C144.75,771.417 168.083,801.583 195.25,828.75C222.417,855.917 252.583,879.25 285.75,898.75C318.917,918.25 354.583,933.333 392.75,944C430.917,954.667 470.667,960 512,960C553.333,960 593.083,954.667 631.25,944C669.417,933.333 705.083,918.25 738.25,898.75C771.417,879.25 801.583,855.917 828.75,828.75C855.917,801.583 879.25,771.417 898.75,738.25C918.25,705.083 933.333,669.417 944,631.25C954.667,593.083 960,553.333 960,512Z"
475
+ />
476
+ </svg>
477
+ Hello World
478
+ </ListItem>
479
+ <ListItem disabled>Hello World</ListItem>
480
+ <ListItem selected>Hello World</ListItem>
481
+ </div>
482
+
483
+ <h3>Menu Bar</h3>
484
+ <MenuBar>
485
+ <MenuBarItem>
486
+ File
487
+ <svelte:fragment slot="flyout">
488
+ <MenuFlyoutItem hint="Ctrl+N">New</MenuFlyoutItem>
489
+ <MenuFlyoutItem hint="Ctrl+Shift+N">New window</MenuFlyoutItem>
490
+ <MenuFlyoutItem hint="Ctrl+O">Open</MenuFlyoutItem>
491
+ <MenuFlyoutItem hint="Ctrl+S">Save</MenuFlyoutItem>
492
+ <MenuFlyoutItem hint="Ctrl+Shift+S">Save as</MenuFlyoutItem>
493
+ <MenuFlyoutDivider />
494
+ <MenuFlyoutItem>Page setup</MenuFlyoutItem>
495
+ <MenuFlyoutItem hint="Ctrl+P">Print</MenuFlyoutItem>
496
+ <MenuFlyoutDivider />
497
+ <MenuFlyoutItem>Exit</MenuFlyoutItem>
498
+ </svelte:fragment>
499
+ </MenuBarItem>
500
+ <MenuBarItem>
501
+ Edit
502
+ <svelte:fragment slot="flyout">
503
+ <MenuFlyoutItem hint="Ctrl+Z">Undo</MenuFlyoutItem>
504
+ <MenuFlyoutDivider />
505
+ <MenuFlyoutItem hint="Ctrl+X">Cut</MenuFlyoutItem>
506
+ <MenuFlyoutItem hint="Ctrl+C">Copy</MenuFlyoutItem>
507
+ <MenuFlyoutItem hint="Ctrl+V">Paste</MenuFlyoutItem>
508
+ <MenuFlyoutItem hint="Del">Delete</MenuFlyoutItem>
509
+ <MenuFlyoutDivider />
510
+ <MenuFlyoutItem hint="Ctrl+F">Find</MenuFlyoutItem>
511
+ <MenuFlyoutItem hint="F3">Find next</MenuFlyoutItem>
512
+ <MenuFlyoutItem hint="Shift+F3">Find previous</MenuFlyoutItem>
513
+ <MenuFlyoutItem hint="Ctrl+H">Replace</MenuFlyoutItem>
514
+ <MenuFlyoutItem hint="Ctrl+G">Go to</MenuFlyoutItem>
515
+ <MenuFlyoutDivider />
516
+ <MenuFlyoutItem hint="Ctrl+A">Select all</MenuFlyoutItem>
517
+ <MenuFlyoutItem hint="F5">Time/Date</MenuFlyoutItem>
518
+ <MenuFlyoutDivider />
519
+ <MenuFlyoutItem>Font</MenuFlyoutItem>
520
+ </svelte:fragment>
521
+ </MenuBarItem>
522
+ <MenuBarItem disabled>Format</MenuBarItem>
523
+ <MenuBarItem>
524
+ View
525
+ <svelte:fragment slot="flyout">
526
+ <MenuFlyoutItem indented cascading>
527
+ Zoom
528
+ <svelte:fragment slot="flyout">
529
+ <MenuFlyoutItem hint="Ctrl+Plus">Zoom in</MenuFlyoutItem>
530
+ <MenuFlyoutItem hint="Ctrl+Minus">Zoom out</MenuFlyoutItem>
531
+ <MenuFlyoutItem hint="Ctrl+0">Restore default zoom</MenuFlyoutItem>
532
+ </svelte:fragment>
533
+ </MenuFlyoutItem>
534
+ <MenuFlyoutItem variant="toggle" checked>Status bar</MenuFlyoutItem>
535
+ <MenuFlyoutItem variant="toggle" checked>Word wrap</MenuFlyoutItem>
536
+ </svelte:fragment>
537
+ </MenuBarItem>
538
+ <MenuBarItem>Help</MenuBarItem>
539
+ </MenuBar>
540
+
541
+ <h3>MenuFlyout</h3>
542
+ <MenuFlyout alignment="start">
543
+ <Button>Open</Button>
544
+ <svelte:fragment slot="flyout">
545
+ <MenuFlyoutItem>
546
+ <svg
547
+ slot="icon"
548
+ xmlns="http://www.w3.org/2000/svg"
549
+ height="16"
550
+ viewBox="0 0 1024 1024"
551
+ width="16"
552
+ >
553
+ <path
554
+ fill="currentColor"
555
+ d="M0,512C0,465 6.08333,419.667 18.25,376C30.4167,332.333 47.6667,291.583 70,253.75C92.3333,215.917 119.083,181.417 150.25,150.25C181.417,119.083 215.917,92.3334 253.75,70C291.583,47.6667 332.333,30.4167 376,18.25C419.667,6.08337 465,0 512,0C559,0 604.333,6.08337 648,18.25C691.667,30.4167 732.417,47.6667 770.25,70C808.083,92.3334 842.583,119.083 873.75,150.25C904.917,181.417 931.667,215.917 954,253.75C976.333,291.583 993.583,332.333 1005.75,376C1017.92,419.667 1024,465 1024,512C1024,559 1017.92,604.333 1005.75,648C993.583,691.667 976.333,732.417 954,770.25C931.667,808.083 904.917,842.583 873.75,873.75C842.583,904.917 808.083,931.667 770.25,954C732.417,976.333 691.667,993.583 648,1005.75C604.333,1017.92 559,1024 512,1024C465,1024 419.667,1017.92 376,1005.75C332.333,993.583 291.583,976.333 253.75,954C215.917,931.667 181.417,904.917 150.25,873.75C119.083,842.583 92.3333,808.083 70,770.25C47.6667,732.417 30.4167,691.667 18.25,648C6.08333,604.333 0,559 0,512ZM960,512C960,471 954.667,431.417 944,393.25C933.333,355.083 918.25,319.417 898.75,286.25C879.25,253.083 855.833,222.833 828.5,195.5C801.167,168.167 770.917,144.75 737.75,125.25C704.583,105.75 668.917,90.6667 630.75,80C592.583,69.3334 553,64.0001 512,64C470.667,64.0001 430.917,69.3334 392.75,80C354.583,90.6667 318.917,105.75 285.75,125.25C252.583,144.75 222.417,168.083 195.25,195.25C168.083,222.417 144.75,252.583 125.25,285.75C105.75,318.917 90.6667,354.583 80,392.75C69.3333,430.917 64,470.667 64,512C64,553.333 69.3333,593.083 80,631.25C90.6667,669.417 105.75,705.083 125.25,738.25C144.75,771.417 168.083,801.583 195.25,828.75C222.417,855.917 252.583,879.25 285.75,898.75C318.917,918.25 354.583,933.333 392.75,944C430.917,954.667 470.667,960 512,960C553.333,960 593.083,954.667 631.25,944C669.417,933.333 705.083,918.25 738.25,898.75C771.417,879.25 801.583,855.917 828.75,828.75C855.917,801.583 879.25,771.417 898.75,738.25C918.25,705.083 933.333,669.417 944,631.25C954.667,593.083 960,553.333 960,512Z"
556
+ />
557
+ </svg>
558
+ Standard Option
559
+ </MenuFlyoutItem>
560
+ <MenuFlyoutDivider />
561
+ <MenuFlyoutItem indented hint="Ctrl + Z">
562
+ <svg
563
+ slot="icon"
564
+ xmlns="http://www.w3.org/2000/svg"
565
+ height="16"
566
+ viewBox="0 0 1024 1024"
567
+ width="16"
568
+ >
569
+ <path
570
+ fill="currentColor"
571
+ d="M0,512C0,465 6.08333,419.667 18.25,376C30.4167,332.333 47.6667,291.583 70,253.75C92.3333,215.917 119.083,181.417 150.25,150.25C181.417,119.083 215.917,92.3334 253.75,70C291.583,47.6667 332.333,30.4167 376,18.25C419.667,6.08337 465,0 512,0C559,0 604.333,6.08337 648,18.25C691.667,30.4167 732.417,47.6667 770.25,70C808.083,92.3334 842.583,119.083 873.75,150.25C904.917,181.417 931.667,215.917 954,253.75C976.333,291.583 993.583,332.333 1005.75,376C1017.92,419.667 1024,465 1024,512C1024,559 1017.92,604.333 1005.75,648C993.583,691.667 976.333,732.417 954,770.25C931.667,808.083 904.917,842.583 873.75,873.75C842.583,904.917 808.083,931.667 770.25,954C732.417,976.333 691.667,993.583 648,1005.75C604.333,1017.92 559,1024 512,1024C465,1024 419.667,1017.92 376,1005.75C332.333,993.583 291.583,976.333 253.75,954C215.917,931.667 181.417,904.917 150.25,873.75C119.083,842.583 92.3333,808.083 70,770.25C47.6667,732.417 30.4167,691.667 18.25,648C6.08333,604.333 0,559 0,512ZM960,512C960,471 954.667,431.417 944,393.25C933.333,355.083 918.25,319.417 898.75,286.25C879.25,253.083 855.833,222.833 828.5,195.5C801.167,168.167 770.917,144.75 737.75,125.25C704.583,105.75 668.917,90.6667 630.75,80C592.583,69.3334 553,64.0001 512,64C470.667,64.0001 430.917,69.3334 392.75,80C354.583,90.6667 318.917,105.75 285.75,125.25C252.583,144.75 222.417,168.083 195.25,195.25C168.083,222.417 144.75,252.583 125.25,285.75C105.75,318.917 90.6667,354.583 80,392.75C69.3333,430.917 64,470.667 64,512C64,553.333 69.3333,593.083 80,631.25C90.6667,669.417 105.75,705.083 125.25,738.25C144.75,771.417 168.083,801.583 195.25,828.75C222.417,855.917 252.583,879.25 285.75,898.75C318.917,918.25 354.583,933.333 392.75,944C430.917,954.667 470.667,960 512,960C553.333,960 593.083,954.667 631.25,944C669.417,933.333 705.083,918.25 738.25,898.75C771.417,879.25 801.583,855.917 828.75,828.75C855.917,801.583 879.25,771.417 898.75,738.25C918.25,705.083 933.333,669.417 944,631.25C954.667,593.083 960,553.333 960,512Z"
572
+ />
573
+ </svg>
574
+ Standard Option (Indented)
575
+ </MenuFlyoutItem>
576
+ <MenuFlyoutItem indented selected>Standard Option (Selected)</MenuFlyoutItem>
577
+ <MenuFlyoutItem indented disabled selected
578
+ >Standard Option (Disabled Selected)
579
+ </MenuFlyoutItem>
580
+ <MenuFlyoutItem indented disabled>Standard Option Disabled</MenuFlyoutItem>
581
+ <MenuFlyoutDivider />
582
+ <MenuFlyoutItem variant="radio" bind:group={menuGroup} value={0}>
583
+ Radio Option 0
584
+ </MenuFlyoutItem>
585
+ <MenuFlyoutItem variant="radio" bind:group={menuGroup} value={1}>
586
+ Radio Option 1
587
+ </MenuFlyoutItem>
588
+ <MenuFlyoutDivider />
589
+ <MenuFlyoutItem checked variant="toggle">Toggle Option 0</MenuFlyoutItem>
590
+ <MenuFlyoutItem variant="toggle">Toggle Option 1</MenuFlyoutItem>
591
+ <MenuFlyoutDivider />
592
+ <MenuFlyoutItem indented cascading hint="hint">
593
+ cascading
594
+ <svelte:fragment slot="flyout">
595
+ <MenuFlyoutItem>subitem 1</MenuFlyoutItem>
596
+ <MenuFlyoutItem>subitem 2</MenuFlyoutItem>
597
+ <MenuFlyoutItem>subitem 3</MenuFlyoutItem>
598
+ </svelte:fragment>
599
+ </MenuFlyoutItem>
600
+ </svelte:fragment>
601
+ </MenuFlyout>
602
+
603
+ <h3>Context Menu</h3>
604
+ <ContextMenu>
605
+ <div
606
+ style="background-color: var(--fds-solid-background-secondary); width: 200px; height: 200px;"
607
+ />
608
+ <svelte:fragment slot="flyout">
609
+ <MenuFlyoutItem hint="Alt+Left arrow">
610
+ {@html ArrowLeft}
611
+ Back
612
+ </MenuFlyoutItem>
613
+ <MenuFlyoutItem hint="Alt+Left arrow">
614
+ {@html ArrowRight}
615
+ Forward
616
+ </MenuFlyoutItem>
617
+ <MenuFlyoutItem hint="Ctrl+R">
618
+ {@html ArrowClockwise}
619
+ Reload
620
+ </MenuFlyoutItem>
621
+ <MenuFlyoutDivider />
622
+ <MenuFlyoutItem hint="Ctrl+S">
623
+ {@html SaveEdit}
624
+ Save image as
625
+ </MenuFlyoutItem>
626
+ <MenuFlyoutItem hint="Ctrl+P">
627
+ {@html Print}
628
+ Print
629
+ </MenuFlyoutItem>
630
+ <MenuFlyoutItem>
631
+ {@html Cast}
632
+ Cast as media to device
633
+ </MenuFlyoutItem>
634
+ <MenuFlyoutDivider />
635
+ <MenuFlyoutItem cascading>
636
+ {@html Send}
637
+ Send page to your devices
638
+ </MenuFlyoutItem>
639
+ <MenuFlyoutItem>
640
+ {@html ScanTable}
641
+ Create QR Code for this page
642
+ </MenuFlyoutItem>
643
+ <MenuFlyoutDivider />
644
+ <MenuFlyoutItem hint="Ctrl+Shift+U">
645
+ {@html ReadAloud}
646
+ Read aloud
647
+ </MenuFlyoutItem>
648
+ <MenuFlyoutDivider />
649
+ <MenuFlyoutItem>
650
+ {@html Collections}
651
+ Add page to Collections
652
+ </MenuFlyoutItem>
653
+ <MenuFlyoutDivider />
654
+ <MenuFlyoutItem>
655
+ {@html Share}
656
+ Share
657
+ </MenuFlyoutItem>
658
+ <MenuFlyoutDivider />
659
+ <MenuFlyoutItem hint="Ctrl+Shift+X">
660
+ {@html CopySelect}
661
+ Web select
662
+ </MenuFlyoutItem>
663
+ <MenuFlyoutItem hint="Ctrl+S">
664
+ {@html CameraEdit}
665
+ Web capture
666
+ </MenuFlyoutItem>
667
+ <MenuFlyoutDivider />
668
+ <MenuFlyoutItem indented hint="Ctrl+U">View page source</MenuFlyoutItem>
669
+ <MenuFlyoutItem>
670
+ <svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
671
+ <path
672
+ d="M1 5c0-1.1.9-2 2-2h10a2 2 0 012 2v5a2 2 0 01-1.16 1.82 1.5 1.5 0 00-.28-.38l-.45-.45A1 1 0 0014 10V5a1 1 0 00-1-1H3a1 1 0 00-1 1v5a1 1 0 001 1h4v1H3a2 2 0 01-2-2V5z"
673
+ />
674
+ <path
675
+ d="M8.85 8.15A.5.5 0 008 8.5v6a.5.5 0 00.9.3l1.35-1.8h2.25a.5.5 0 00.35-.85l-4-4zM9 13V9.7l2.3 2.3H10a.5.5 0 00-.4.2L9 13z"
676
+ />
677
+ </svg>
678
+ Inspect
679
+ </MenuFlyoutItem>
680
+ </svelte:fragment>
681
+ </ContextMenu>
682
+
683
+ <h3>Auto Suggest Box</h3>
684
+ <div class="showcase-group">
685
+ <AutoSuggestBox
686
+ on:select={() => console.log("hi")}
687
+ placeholder="Search fruits"
688
+ items={[
689
+ "Apple",
690
+ "Orange",
691
+ "Grape",
692
+ "Mango",
693
+ "Pear",
694
+ "Banana",
695
+ "Strawberry",
696
+ "Watermelon",
697
+ "Cherry"
698
+ ]}
699
+ />
700
+
701
+ <AutoSuggestBox
702
+ placeholder="Custom item template"
703
+ items={[
704
+ "Apple",
705
+ "Orange",
706
+ "Grape",
707
+ "Mango",
708
+ "Pear",
709
+ "Banana",
710
+ "Strawberry",
711
+ "Watermelon",
712
+ "Cherry"
713
+ ]}
714
+ >
715
+ <li
716
+ slot="item-template"
717
+ let:id
718
+ let:item
719
+ let:selection
720
+ let:index
721
+ {id}
722
+ style={selection === index ? "background-color: red" : ""}
723
+ >
724
+ {item}
725
+ </li>
726
+ </AutoSuggestBox>
727
+ </div>
728
+
729
+ <h3>RangeSlider</h3>
730
+ <div class="showcase-group">
731
+ <RangeSlider min={1} max={100} width={"20rem"}></RangeSlider>
732
+ </div>
733
+
734
+ <h3>Flipper</h3>
735
+ <div class="showcase-group">
736
+ <Flipper direction="left"></Flipper>
737
+ <Flipper direction="right"></Flipper>
738
+ </div>
739
+ </PageSection>
740
+
741
+ <style lang="scss">
742
+ @use "src/lib/mixins" as *;
743
+
744
+ a {
745
+ color: var(--accent-default);
746
+ }
747
+
748
+ h3 {
749
+ margin-block-end: 12px !important;
750
+ margin-block-start: 24px !important;
751
+ }
752
+
753
+ .showcase-group {
754
+ @include flex($gap: 12px);
755
+ margin-block-end: 12px;
756
+ }
757
+ </style>