svelte-fluentui 1.0.0-rc22 → 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 (42) hide show
  1. package/README.md +18 -2
  2. package/dist/assets/styles/components/_inputfile.scss +767 -0
  3. package/dist/assets/styles/components/_toast.scss +0 -2
  4. package/dist/components/Alert.svelte +2 -3
  5. package/dist/components/Calendar.svelte +156 -90
  6. package/dist/components/Calendar.svelte.d.ts +11 -2
  7. package/dist/components/Checkbox.svelte +59 -2
  8. package/dist/components/Checkbox.svelte.d.ts +4 -1
  9. package/dist/components/Divider.svelte +9 -5
  10. package/dist/components/Divider.svelte.d.ts +4 -1
  11. package/dist/components/InputFile.svelte +146 -1142
  12. package/dist/components/InputFile.svelte.d.ts +3 -96
  13. package/dist/components/InputFile.types.d.ts +95 -0
  14. package/dist/components/InputFile.types.js +1 -0
  15. package/dist/components/InputFile.utils.d.ts +8 -0
  16. package/dist/components/InputFile.utils.js +113 -0
  17. package/dist/components/InputFileSelectorButton.svelte +21 -0
  18. package/dist/components/InputFileSelectorButton.svelte.d.ts +8 -0
  19. package/dist/components/InputFileSelectorCard.svelte +73 -0
  20. package/dist/components/InputFileSelectorCard.svelte.d.ts +19 -0
  21. package/dist/components/InputFileSelectorMinimal.svelte +57 -0
  22. package/dist/components/InputFileSelectorMinimal.svelte.d.ts +13 -0
  23. package/dist/components/Switch.svelte +20 -2
  24. package/dist/components/Textarea.svelte +40 -0
  25. package/dist/components/Textarea.svelte.d.ts +4 -1
  26. package/dist/components/Toast.svelte +7 -1
  27. package/dist/components/ToastContainer.svelte +2 -1
  28. package/dist/components/icons/DismissIcon.svelte +22 -0
  29. package/dist/components/icons/DismissIcon.svelte.d.ts +6 -0
  30. package/dist/components/icons/index.d.ts +1 -0
  31. package/dist/components/icons/index.js +1 -0
  32. package/dist/components/layout/TopNav.svelte +2 -1
  33. package/dist/fluent-ui/calendar/fluent-calendar-extended.js +0 -5
  34. package/dist/fluent-ui/calendar/fluent-calendar.d.ts +8 -0
  35. package/dist/index.d.ts +4 -2
  36. package/dist/index.js +2 -1
  37. package/dist/main.css +728 -2
  38. package/dist/main.css.map +1 -1
  39. package/dist/main.scss +1 -0
  40. package/dist/version.d.ts +1 -1
  41. package/dist/version.js +1 -1
  42. package/package.json +2 -1
package/README.md CHANGED
@@ -2,7 +2,23 @@
2
2
 
3
3
  A comprehensive Svelte wrapper library for Microsoft FluentUI web components (v2.6.x), providing a seamless way to use FluentUI components in Svelte applications.
4
4
 
5
- ## What's New in v1.0.0-rc22
5
+ ## What's New in v1.0.0
6
+
7
+ The first stable release. Headline changes since the rc series:
8
+
9
+ - **`Calendar` — generic `highlightDates` + `selectDates` function-prop split (replaces `selectDatesHover`)** — two consumer-supplied pure functions of shape `(date: Date) => Date[]` drive the hover preview and the click selection separately, so you can preview a week on hover but commit only 3 days on click. Multiple mode UNIONS the returned group with the existing array (clicked day toggles the whole group); range mode replaces. Consumer functions are authoritative — the calendar no longer re-filters against `disabledDateFunc`, so consumers are free to skip disabled days, jump past them to reach a target count, or include them deliberately for special highlighting. Two new demos: "Range with SelectOneWeek" (hovering any day highlights Mon→Sun, click commits the whole week) and "Multiple with Select3Days" (hover/click selects the day ± 1 neighbor).
10
+ - **`Calendar` — `maxSelectableDays` + `onSelectionError` callback with structured payload** — multiple/range modes now gate every selection against an upper bound. Overflow does NOT modify `selectedDates`; instead fires `onSelectionError({code, message, attempted, current, max})` with a discriminated-union `code` (`"max_selectable_days_exceeded"` for now, future codes won't break consumer dispatch). New exported `CalendarSelectionError` type. Demo "Multiple (max 5 days)" shows the Alert-remount pattern for repeat-error feedback.
11
+ - **`Calendar` — `onDayHover?(date: Date | null) => void` pure-observation callback** — fires with the hovered `Date` regardless of `selectMode` / disabled state (so tooltips can react to inactive days too), and with `null` when the cursor leaves the grid. Distinct from `highlightDates` (which DRIVES rendering); `onDayHover` is for tooltips, analytics, "currently hovering" readouts.
12
+ - **`Calendar` — public type re-exports** — `CalendarView`, `CalendarSelectMode`, `CalendarSelectionError`, `CalendarSelectionErrorCode` now importable from the package entry point.
13
+ - **`Checkbox` — three state-driven message props (`checkedMessage` / `uncheckedMessage` / `intermediateMessage`)** — Switch already had `checkedMessage` / `uncheckedMessage`; Checkbox catches up plus the three-state variant for `withIntermediate`. All three accept `string | Snippet`, rendered as a sibling `.checkbox-message` after the box.
14
+ - **`Checkbox` — `labelPosition="end"` (now the default)** — was `"start"` (label on the LEFT, atypical for forms). New default puts the label after the box `[☐] Label text`. Implemented via flex `order` so a trailing status message stays after the [box, label] pair without flipping.
15
+ - **Docs — per-page SEO metadata via shared `<Meta>` component on all 63 routes** — every page now emits its own `<title>`, description, keywords, canonical, Open Graph, and Twitter Card tags. Browser tabs, bookmarks, and JS-capable crawlers (Google) get the per-page tags; non-JS crawlers (Slack, Discord, Facebook, LinkedIn, X) still see the static `app.html` fallback since the docs site runs as a pure SPA.
16
+ - **Docs — every `<h1>` / `<h2>` / `<h3>` in component pages is now a shareable anchor with a copy-link button on hover** — pure post-render DOM decoration at the layout level, so it works on every existing and future component page automatically. Stable slugified ids, `-2`/`-3` suffixes on collisions, copy-to-clipboard with flash feedback.
17
+ - **Docs — shared `<References>` component replaces hand-rolled references cards on 48 pages** — single source of truth for the references block; `na: true` / `custom: true` variants for "Not available in FluentUI Web Components" and "Custom component" disabled spans with tooltips. Format tweaks now live in one file instead of 48.
18
+ - **Docs — API tables relocated to the BOTTOM of every component page, AFTER the Examples** — the previous layout forced visitors to scroll past dense reference material to reach the examples. New order: `[title + description] → [References] → [Examples] → [API tables]`.
19
+ - **`InputFile` — 2547-line component split across six files for maintainability** — types extracted to `InputFile.types.ts`, utilities + default labels to `InputFile.utils.ts`, ~725 lines of inline CSS to an external SCSS partial, and the three `selectorAppearance` variants pulled into `InputFileSelectorCard.svelte` / `InputFileSelectorButton.svelte` / `InputFileSelectorMinimal.svelte`. Public API unchanged; type-check clean.
20
+
21
+ ### Previously (rc22)
6
22
 
7
23
  - **`InputFile` chips mode now has an overall progress footer** — the same `Pause all` / `Resume all` / `Retry all` controls plus the aggregate progress bar that list/popover modes already had. Works for both `chipsPosition` values; rendered as a sibling below the chips so layout stays sane regardless of position.
8
24
  - **`package.json` `homepage` points at the docs site** — npm's "Homepage" sidebar link now goes to `svelte-fluentui.keenmate.dev` instead of duplicating the GitHub repo link. Two distinct destinations on the package page.
@@ -460,7 +476,7 @@ npm install svelte-fluentui
460
476
  ```js
461
477
  // In any browser console, after the page has loaded svelte-fluentui:
462
478
  window.components["svelte-fluentui"].version()
463
- // => "1.0.0-rc08"
479
+ // => "1.0.0"
464
480
  ```
465
481
 
466
482
  Also available as a direct import: