fluentui-svelte 0.6.0 → 0.7.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 (243) hide show
  1. package/dist/components/app-surface/app-surface.svelte +96 -0
  2. package/dist/components/app-surface/app-surface.svelte.d.ts +22 -0
  3. package/dist/components/app-surface/docs/llms.md +73 -0
  4. package/dist/components/app-surface/types.d.ts +19 -0
  5. package/dist/components/app-surface/types.js +1 -0
  6. package/dist/components/app-window/app-window.d.ts +3 -0
  7. package/dist/components/app-window/app-window.js +3 -0
  8. package/dist/components/app-window/app-window.svelte +193 -0
  9. package/dist/components/app-window/app-window.svelte.d.ts +25 -0
  10. package/dist/components/app-window/docs/llms.md +119 -0
  11. package/dist/components/app-window/types.d.ts +66 -0
  12. package/dist/components/app-window/types.js +1 -0
  13. package/dist/components/auto-suggest-box/auto-suggest-box.svelte +47 -31
  14. package/dist/components/auto-suggest-box/auto-suggest-box.svelte.d.ts +2 -2
  15. package/dist/components/auto-suggest-box/docs/llms.md +34 -33
  16. package/dist/components/auto-suggest-box/option.svelte +6 -4
  17. package/dist/components/auto-suggest-box/types.d.ts +13 -16
  18. package/dist/components/avatar/avatar.svelte +4 -3
  19. package/dist/components/avatar/docs/llms.md +1 -1
  20. package/dist/components/avatar/type.d.ts +1 -1
  21. package/dist/components/badge/badge-icon.svelte +2 -2
  22. package/dist/components/badge/badge.svelte +2 -2
  23. package/dist/components/badge/docs/llms.md +2 -2
  24. package/dist/components/badge/types.d.ts +2 -2
  25. package/dist/components/breadcrumb/breadcrumb-button.svelte +2 -2
  26. package/dist/components/breadcrumb/breadcrumb-divider.svelte +2 -2
  27. package/dist/components/breadcrumb/breadcrumb-item.svelte +2 -2
  28. package/dist/components/breadcrumb/breadcrumb.svelte +10 -5
  29. package/dist/components/breadcrumb/docs/llms.md +11 -11
  30. package/dist/components/breadcrumb/types.d.ts +7 -7
  31. package/dist/components/button/button.svelte +2 -2
  32. package/dist/components/button/docs/llms.md +17 -17
  33. package/dist/components/button/split-button.svelte +7 -7
  34. package/dist/components/button/types.d.ts +5 -5
  35. package/dist/components/calendar-date-picker/calendar-date-picker.svelte +98 -10
  36. package/dist/components/calendar-date-picker/calendar-date-picker.svelte.d.ts +1 -1
  37. package/dist/components/calendar-date-picker/docs/llms.md +19 -14
  38. package/dist/components/calendar-date-picker/types.d.ts +22 -8
  39. package/dist/components/calendar-view/calendar-view-days.svelte +3 -2
  40. package/dist/components/calendar-view/calendar-view-grid.js +8 -3
  41. package/dist/components/calendar-view/calendar-view-item.svelte +10 -4
  42. package/dist/components/calendar-view/calendar-view-months.svelte +3 -2
  43. package/dist/components/calendar-view/calendar-view-years.svelte +3 -2
  44. package/dist/components/calendar-view/calendar-view.svelte +11 -4
  45. package/dist/components/calendar-view/calendar-view.svelte.js +5 -0
  46. package/dist/components/calendar-view/docs/llms.md +20 -19
  47. package/dist/components/calendar-view/types.d.ts +6 -1
  48. package/dist/components/card/card-footer.svelte +2 -2
  49. package/dist/components/card/card-header.svelte +5 -4
  50. package/dist/components/card/card-preview.svelte +13 -2
  51. package/dist/components/card/card.svelte +5 -5
  52. package/dist/components/card/docs/llms.md +22 -21
  53. package/dist/components/card/types.d.ts +8 -4
  54. package/dist/components/checkbox/checkbox.svelte +47 -26
  55. package/dist/components/checkbox/checkbox.svelte.d.ts +3 -24
  56. package/dist/components/checkbox/docs/llms.md +24 -23
  57. package/dist/components/checkbox/types.d.ts +10 -23
  58. package/dist/components/date-picker/date-picker.svelte +98 -27
  59. package/dist/components/date-picker/date-picker.svelte.d.ts +1 -1
  60. package/dist/components/date-picker/docs/llms.md +23 -20
  61. package/dist/components/date-picker/types.d.ts +24 -15
  62. package/dist/components/dialog/dialog-actions.svelte +2 -2
  63. package/dist/components/dialog/dialog-content.svelte +2 -2
  64. package/dist/components/dialog/dialog-surface.svelte +102 -9
  65. package/dist/components/dialog/dialog-title.svelte +2 -2
  66. package/dist/components/dialog/dialog-trigger.svelte +2 -2
  67. package/dist/components/dialog/dialog.svelte +22 -11
  68. package/dist/components/dialog/docs/llms.md +56 -19
  69. package/dist/components/dialog/types.d.ts +25 -7
  70. package/dist/components/divider/divider.svelte +6 -4
  71. package/dist/components/divider/types.d.ts +1 -1
  72. package/dist/components/dropdown/docs/llms.md +30 -28
  73. package/dist/components/dropdown/dropdown-option.svelte +17 -5
  74. package/dist/components/dropdown/dropdown.svelte +182 -84
  75. package/dist/components/dropdown/dropdown.svelte.d.ts +1 -1
  76. package/dist/components/dropdown/types.d.ts +26 -20
  77. package/dist/components/dropdown-select/docs/llms.md +24 -22
  78. package/dist/components/dropdown-select/dropdown-select-option.svelte +2 -2
  79. package/dist/components/dropdown-select/dropdown-select.svelte +42 -7
  80. package/dist/components/dropdown-select/types.d.ts +4 -4
  81. package/dist/components/expander/docs/llms.md +3 -3
  82. package/dist/components/expander/expander.svelte +13 -8
  83. package/dist/components/expander/types.d.ts +5 -5
  84. package/dist/components/flyout/docs/llms.md +1 -1
  85. package/dist/components/flyout/flyout.svelte +17 -6
  86. package/dist/components/flyout/types.d.ts +1 -1
  87. package/dist/components/hyperlink/docs/llms.md +6 -6
  88. package/dist/components/hyperlink/hyperlink.svelte +13 -4
  89. package/dist/components/hyperlink/types.d.ts +1 -1
  90. package/dist/components/info-bar/docs/llms.md +11 -10
  91. package/dist/components/info-bar/info-bar.svelte +3 -2
  92. package/dist/components/info-bar/types.d.ts +4 -0
  93. package/dist/components/label/docs/llms.md +75 -22
  94. package/dist/components/label/label-context.d.ts +14 -0
  95. package/dist/components/label/label-context.js +10 -0
  96. package/dist/components/label/label.svelte +153 -30
  97. package/dist/components/label/label.svelte.d.ts +1 -1
  98. package/dist/components/label/types.d.ts +48 -4
  99. package/dist/components/list-view/docs/llms.md +103 -33
  100. package/dist/components/list-view/list-view-item-branch.svelte +257 -0
  101. package/dist/components/list-view/list-view-item-branch.svelte.d.ts +4 -0
  102. package/dist/components/list-view/list-view-item.svelte +164 -46
  103. package/dist/components/list-view/list-view-item.svelte.d.ts +5 -5
  104. package/dist/components/list-view/list-view.svelte +73 -25
  105. package/dist/components/list-view/types.d.ts +71 -8
  106. package/dist/components/list-view/utils.d.ts +10 -0
  107. package/dist/components/list-view/utils.js +17 -1
  108. package/dist/components/menu/docs/llms.md +98 -15
  109. package/dist/components/menu/menu-command-bar-item.svelte +61 -0
  110. package/dist/components/menu/menu-command-bar-item.svelte.d.ts +14 -0
  111. package/dist/components/menu/menu-command-bar.svelte +218 -0
  112. package/dist/components/menu/menu-command-bar.svelte.d.ts +21 -0
  113. package/dist/components/menu/menu-group.svelte +6 -3
  114. package/dist/components/menu/menu-item-checkbox.svelte +5 -4
  115. package/dist/components/menu/menu-item-radio.svelte +5 -4
  116. package/dist/components/menu/menu-item-switch.svelte +5 -4
  117. package/dist/components/menu/menu-item.svelte +5 -5
  118. package/dist/components/menu/menu-item.svelte.d.ts +2 -3
  119. package/dist/components/menu/menu-list.svelte +10 -1
  120. package/dist/components/menu/menu-popover.svelte +9 -5
  121. package/dist/components/menu/menu-trigger.svelte +2 -1
  122. package/dist/components/menu/menu.svelte.js +1 -0
  123. package/dist/components/menu/types.d.ts +62 -7
  124. package/dist/components/number-box/docs/llms.md +6 -4
  125. package/dist/components/number-box/number-box.svelte +35 -29
  126. package/dist/components/number-box/number-box.svelte.d.ts +1 -1
  127. package/dist/components/number-box/types.d.ts +1 -1
  128. package/dist/components/persona/docs/llms.md +29 -25
  129. package/dist/components/persona/persona.svelte +8 -6
  130. package/dist/components/persona/types.d.ts +4 -3
  131. package/dist/components/progress-bar/docs/llms.md +13 -13
  132. package/dist/components/progress-bar/progress-bar.svelte +6 -6
  133. package/dist/components/progress-bar/types.d.ts +4 -4
  134. package/dist/components/progress-ring/docs/llms.md +14 -14
  135. package/dist/components/progress-ring/progress-ring.svelte +5 -5
  136. package/dist/components/progress-ring/types.d.ts +3 -3
  137. package/dist/components/radio-button/docs/llms.md +11 -8
  138. package/dist/components/radio-button/radio-button.svelte +38 -12
  139. package/dist/components/radio-button/radio-button.svelte.d.ts +1 -1
  140. package/dist/components/radio-button/types.d.ts +11 -8
  141. package/dist/components/rating/docs/llms.md +15 -14
  142. package/dist/components/rating/rating.svelte +66 -29
  143. package/dist/components/rating/rating.svelte.d.ts +1 -1
  144. package/dist/components/rating/types.d.ts +8 -8
  145. package/dist/components/side-nav/docs/llms.md +110 -0
  146. package/dist/components/side-nav/side-nav-branch.svelte +43 -0
  147. package/dist/components/side-nav/side-nav-branch.svelte.d.ts +4 -0
  148. package/dist/components/side-nav/side-nav-item.svelte +75 -0
  149. package/dist/components/side-nav/side-nav-item.svelte.d.ts +25 -0
  150. package/dist/components/side-nav/side-nav-list.svelte +32 -0
  151. package/dist/components/side-nav/side-nav-list.svelte.d.ts +7 -0
  152. package/dist/components/side-nav/side-nav.d.ts +2 -0
  153. package/dist/components/side-nav/side-nav.js +2 -0
  154. package/dist/components/side-nav/side-nav.svelte +355 -0
  155. package/dist/components/side-nav/side-nav.svelte.d.ts +24 -0
  156. package/dist/components/side-nav/types.d.ts +149 -0
  157. package/dist/components/side-nav/types.js +1 -0
  158. package/dist/components/skeleton/docs/llms.md +1 -1
  159. package/dist/components/skeleton/skeleton.svelte +2 -2
  160. package/dist/components/skeleton/types.d.ts +1 -1
  161. package/dist/components/slider/docs/llms.md +31 -28
  162. package/dist/components/slider/slider.svelte +126 -61
  163. package/dist/components/slider/slider.svelte.d.ts +1 -3
  164. package/dist/components/slider/types.d.ts +21 -14
  165. package/dist/components/tab-view/docs/llms.md +7 -7
  166. package/dist/components/tab-view/tab-view-tab.svelte +16 -14
  167. package/dist/components/tab-view/tab-view.svelte +16 -9
  168. package/dist/components/tab-view/types.d.ts +6 -6
  169. package/dist/components/table/docs/llms.md +38 -33
  170. package/dist/components/table/table-body.svelte +2 -2
  171. package/dist/components/table/table-cell-actions.svelte +8 -2
  172. package/dist/components/table/table-cell-layout.svelte +2 -2
  173. package/dist/components/table/table-cell.svelte +2 -2
  174. package/dist/components/table/table-header-cell.svelte +2 -2
  175. package/dist/components/table/table-header.svelte +2 -2
  176. package/dist/components/table/table-row.svelte +2 -2
  177. package/dist/components/table/table-selection-cell.svelte +6 -6
  178. package/dist/components/table/table.svelte +2 -2
  179. package/dist/components/table/types.d.ts +11 -11
  180. package/dist/components/tag/docs/llms.md +26 -26
  181. package/dist/components/tag/tag-group.svelte +2 -2
  182. package/dist/components/tag/tag.svelte +13 -12
  183. package/dist/components/tag/types.d.ts +6 -4
  184. package/dist/components/tag-picker/docs/llms.md +61 -55
  185. package/dist/components/tag-picker/option-group.svelte +17 -4
  186. package/dist/components/tag-picker/option-group.svelte.d.ts +1 -1
  187. package/dist/components/tag-picker/option.svelte +15 -4
  188. package/dist/components/tag-picker/tag-picker.svelte +137 -65
  189. package/dist/components/tag-picker/tag-picker.svelte.d.ts +2 -2
  190. package/dist/components/tag-picker/types.d.ts +36 -16
  191. package/dist/components/text-box/docs/llms.md +31 -4
  192. package/dist/components/text-box/text-box-button.svelte +3 -3
  193. package/dist/components/text-box/text-box-button.svelte.d.ts +1 -1
  194. package/dist/components/text-box/text-box.svelte +41 -14
  195. package/dist/components/text-box/types.d.ts +5 -5
  196. package/dist/components/textarea/docs/llms.md +4 -3
  197. package/dist/components/textarea/textarea.svelte +14 -6
  198. package/dist/components/textarea/types.d.ts +2 -4
  199. package/dist/components/time-picker/docs/llms.md +18 -15
  200. package/dist/components/time-picker/time-picker.svelte +133 -33
  201. package/dist/components/time-picker/time-picker.svelte.d.ts +1 -1
  202. package/dist/components/time-picker/types.d.ts +23 -13
  203. package/dist/components/title-bar/docs/llms.md +382 -0
  204. package/dist/components/title-bar/title-bar-left-controls.svelte +215 -0
  205. package/dist/components/title-bar/title-bar-left-controls.svelte.d.ts +22 -0
  206. package/dist/components/title-bar/title-bar-right-controls.svelte +190 -0
  207. package/dist/components/title-bar/title-bar-right-controls.svelte.d.ts +27 -0
  208. package/dist/components/title-bar/title-bar.d.ts +3 -0
  209. package/dist/components/title-bar/title-bar.js +4 -0
  210. package/dist/components/title-bar/title-bar.svelte +224 -0
  211. package/dist/components/title-bar/title-bar.svelte.d.ts +26 -0
  212. package/dist/components/title-bar/types.d.ts +165 -0
  213. package/dist/components/title-bar/types.js +1 -0
  214. package/dist/components/toggle-switch/docs/llms.md +11 -9
  215. package/dist/components/toggle-switch/toggle-switch.svelte +23 -14
  216. package/dist/components/toggle-switch/toggle-switch.svelte.d.ts +1 -1
  217. package/dist/components/toggle-switch/types.d.ts +12 -10
  218. package/dist/components/tooltip/docs/llms.md +1 -1
  219. package/dist/components/tooltip/tooltip.svelte +5 -4
  220. package/dist/components/tooltip/types.d.ts +1 -1
  221. package/dist/components/top-nav/docs/llms.md +1 -1
  222. package/dist/components/top-nav/top-nav-item.svelte +2 -2
  223. package/dist/components/top-nav/top-nav.svelte +2 -2
  224. package/dist/components/top-nav/types.d.ts +2 -2
  225. package/dist/components/tree-view/docs/llms.md +11 -11
  226. package/dist/components/tree-view/tree-view-item-content.svelte +3 -3
  227. package/dist/components/tree-view/tree-view-item.svelte +13 -5
  228. package/dist/components/tree-view/tree-view.svelte +20 -5
  229. package/dist/components/tree-view/tree-view.svelte.d.ts +1 -1
  230. package/dist/components/tree-view/tree-view.svelte.js +31 -3
  231. package/dist/components/tree-view/types.d.ts +7 -3
  232. package/dist/index.d.ts +18 -0
  233. package/dist/index.js +20 -0
  234. package/dist/internal/components/dynamic-carousel/dynamic-carousel.svelte +26 -5
  235. package/dist/internal/components/dynamic-carousel/dynamic-carousel.svelte.d.ts +2 -0
  236. package/dist/internal/index.d.ts +1 -0
  237. package/dist/internal/index.js +1 -0
  238. package/dist/internal/native-field.svelte.d.ts +44 -0
  239. package/dist/internal/native-field.svelte.js +85 -0
  240. package/dist/internal/utils.d.ts +16 -2
  241. package/dist/internal/utils.js +25 -3
  242. package/dist/types/index.d.ts +3 -3
  243. package/package.json +50 -36
@@ -33,30 +33,33 @@ Use `hideDays`, `hideMonths`, or `hideYears` to hide individual selector columns
33
33
  <DatePicker hideDays />
34
34
  ```
35
35
 
36
+ HTML attributes, including class, id and ARIA attributes, apply to the control element. Bind ref to access that control. Use wrapperAttributes and wrapperRef for the outer container.
37
+
36
38
  ## Component Props
37
39
 
38
40
  <!-- DO NOT EDIT THIS SECTION (propsmith generated) -->
39
41
  <!-- props:DatePickerProps -->
40
42
 
41
- | Name | Type | Default | Description |
42
- | ----------------------------- | ------------------------------------ | ----------------- | --------------------------------------------------------------------------------------------------- |
43
- | `value` _bindable_ | `string` | `''` | Selected date as `YYYY-MM-DD` (matches the underlying `<input type="date">`). |
44
- | `format` | `'MM/dd/yyyy'` &#124; `'dd/MM/yyyy'` | `'dd/MM/yyyy'` | The order the three columns are laid out in. |
45
- | `open` _bindable_ | `boolean` | `false` | Controls the open state of the picker. |
46
- | `hideYears` | `boolean` | `false` | Removes the year column. |
47
- | `hideMonths` | `boolean` | `false` | Removes the month column. |
48
- | `hideDays` | `boolean` | `false` | Removes the day column. |
49
- | `minYear` | `number` | `Current - 100` | The first year offered by the year column. |
50
- | `maxYear` | `number` | `Current + 100` | The last year offered by the year column. |
51
- | `disabledDates` | `Date[]` | `[]` | Specific days (year-month-day) that cannot be selected. |
52
- | `disabledMonths` | `Date[]` | `[]` | Specific months (by month + year) that cannot be selected. |
53
- | `disabledYears` | `Date[]` | `[]` | Specific years (by year) that cannot be selected. |
54
- | `ref` _bindable_ | `HTMLButtonElement` | | The DOM reference of the trigger button. |
55
- | `wrapperRef` _bindable_ | `HTMLDivElement` | | The DOM reference of the element wrapping the trigger and its input. |
56
- | `wrapperAttributes` | `HTMLAttributes` | | The attributes to spread on the wrapper element. |
57
- | `inputElement` _bindable_ | `HTMLInputElement` | | The DOM reference of the underlying input element. |
58
- | `inputProps` | `HTMLInputAttributes` | | HTML attributes for the underlying input element. Give it a `name` to submit the value with a form. |
59
- | `popupLabel` | `string` | `'Choose a date'` | The accessible name of the popup, which is announced as a dialog. |
60
- | Element Attributes (`button`) | | | |
43
+ | Name | Type | Default | Description |
44
+ | -------------------------------------------- | ------------------------------------------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
45
+ | `value` _bindable_ | `string` | `''` | Selected date as `YYYY-MM-DD` (matches the underlying `<input type="date">`). |
46
+ | `format` | `'MM/dd/yyyy'` &#124; `'dd/MM/yyyy'` | `'dd/MM/yyyy'` | The order the three columns are laid out in. |
47
+ | `open` _bindable_ | `boolean` | `false` | Controls the open state of the picker. |
48
+ | `hideYears` | `boolean` | `false` | Removes the year column. |
49
+ | `hideMonths` | `boolean` | `false` | Removes the month column. |
50
+ | `hideDays` | `boolean` | `false` | Removes the day column. |
51
+ | `minYear` | `number` | `Current - 100` | The first year offered by the year column. Unless `min` is given, the native input accepts no earlier date. |
52
+ | `maxYear` | `number` | `Current + 100` | The last year offered by the year column. Unless `max` is given, the native input accepts no later date. |
53
+ | `disabledDates` | `Date[]` | `[]` | Specific days (year-month-day) that cannot be selected. |
54
+ | `disabledMonths` | `Date[]` | `[]` | Specific months (by month + year) that cannot be selected. |
55
+ | `disabledYears` | `Date[]` | `[]` | Specific years (by year) that cannot be selected. |
56
+ | `ref` _bindable_ | `HTMLInputElement` &#124; `null` | | The DOM reference of the native date input that holds the value. The other attributes of the picker are applied to it. |
57
+ | `buttonRef` _bindable_ | `HTMLButtonElement` &#124; `null` | | The DOM reference of the button that opens the picker. |
58
+ | `buttonAttributes` | `HTMLButtonAttributes` | | The attributes to spread on the button that opens the picker. |
59
+ | `wrapperRef` _bindable_ | `HTMLDivElement` &#124; `null` | | The DOM reference of the element wrapping the button and the native input. |
60
+ | `wrapperAttributes` | `HTMLAttributes` | | The attributes to spread on the wrapper element. |
61
+ | `popupLabel` | `string` | `'Choose a date'` | The accessible name of the popup, which is announced as a dialog. |
62
+ | `columnLabels` | `{ month?: string; day?: string; year?: string }` | `{ month: 'Month', day: 'Day', year: 'Year' }` | The names of the month, day and year columns: shown on the trigger while there is no date, and given to the lists of the popup. |
63
+ | `NativeFieldAttributes<HTMLInputAttributes>` | | | |
61
64
 
62
65
  <!-- /props:DatePickerProps -->
@@ -1,4 +1,5 @@
1
1
  import type { HTMLAttributes, HTMLButtonAttributes, HTMLInputAttributes } from 'svelte/elements';
2
+ import type { NativeFieldAttributes } from '../../internal/index.js';
2
3
  /** @propsmith DatePickerProps */
3
4
  export type DatePickerProps = {
4
5
  /** Selected date as `YYYY-MM-DD` (matches the underlying `<input type="date">`).
@@ -27,11 +28,11 @@ export type DatePickerProps = {
27
28
  * @default false
28
29
  */
29
30
  hideDays?: boolean;
30
- /** The first year offered by the year column.
31
+ /** The first year offered by the year column. Unless `min` is given, the native input accepts no earlier date.
31
32
  * @default Current - 100
32
33
  */
33
34
  minYear?: number;
34
- /** The last year offered by the year column.
35
+ /** The last year offered by the year column. Unless `max` is given, the native input accepts no later date.
35
36
  * @default Current + 100
36
37
  */
37
38
  maxYear?: number;
@@ -47,28 +48,36 @@ export type DatePickerProps = {
47
48
  * @default []
48
49
  */
49
50
  disabledYears?: Date[];
50
- /** The DOM reference of the trigger button.
51
+ /** The DOM reference of the native date input that holds the value. The other attributes of the picker are applied to it.
51
52
  * @bindable
52
53
  */
53
- ref?: HTMLButtonElement;
54
- /** The DOM reference of the element wrapping the trigger and its input.
54
+ ref?: HTMLInputElement | null;
55
+ /** The DOM reference of the button that opens the picker.
55
56
  * @bindable
56
57
  */
57
- wrapperRef?: HTMLDivElement;
58
- /** The attributes to spread on the wrapper element.
59
- * @type HTMLAttributes
58
+ buttonRef?: HTMLButtonElement | null;
59
+ /** The attributes to spread on the button that opens the picker.
60
+ * @type HTMLButtonAttributes
60
61
  */
61
- wrapperAttributes?: HTMLAttributes<HTMLDivElement>;
62
- /** The DOM reference of the underlying input element.
62
+ buttonAttributes?: HTMLButtonAttributes;
63
+ /** The DOM reference of the element wrapping the button and the native input.
63
64
  * @bindable
64
65
  */
65
- inputElement?: HTMLInputElement;
66
- /** HTML attributes for the underlying input element. Give it a `name` to submit the
67
- * value with a form.
66
+ wrapperRef?: HTMLDivElement | null;
67
+ /** The attributes to spread on the wrapper element.
68
+ * @type HTMLAttributes
68
69
  */
69
- inputProps?: HTMLInputAttributes;
70
+ wrapperAttributes?: HTMLAttributes<HTMLDivElement>;
70
71
  /** The accessible name of the popup, which is announced as a dialog.
71
72
  * @default 'Choose a date'
72
73
  */
73
74
  popupLabel?: string;
74
- } & HTMLButtonAttributes;
75
+ /** The names of the month, day and year columns: shown on the trigger while there is no date, and given to the lists of the popup.
76
+ * @default { month: 'Month', day: 'Day', year: 'Year' }
77
+ */
78
+ columnLabels?: {
79
+ month?: string;
80
+ day?: string;
81
+ year?: string;
82
+ };
83
+ } & NativeFieldAttributes<HTMLInputAttributes>;
@@ -3,7 +3,7 @@
3
3
  import type { DialogActionsProps } from './types.js';
4
4
 
5
5
  let {
6
- ref = $bindable(),
6
+ ref = $bindable(null),
7
7
  position = 'end',
8
8
  fluid,
9
9
  class: classes,
@@ -20,10 +20,10 @@
20
20
  </script>
21
21
 
22
22
  <div
23
+ {...attributes}
23
24
  class={['dialog-actions', `justify-${position}`, { fluid }, classes]}
24
25
  bind:this={ref}
25
26
  {...tabspotAttributes}
26
- {...attributes}
27
27
  >
28
28
  {@render children?.()}
29
29
  </div>
@@ -1,10 +1,10 @@
1
1
  <script lang="ts">
2
2
  import type { DialogContentProps } from './types.js';
3
3
 
4
- let { ref = $bindable(), class: classes, children, ...attributes }: DialogContentProps = $props();
4
+ let { ref = $bindable(null), class: classes, children, ...attributes }: DialogContentProps = $props();
5
5
  </script>
6
6
 
7
- <div class={['dialog-content', classes]} bind:this={ref} {...attributes}>
7
+ <div {...attributes} class={['dialog-content', classes]} bind:this={ref}>
8
8
  {@render children?.()}
9
9
  </div>
10
10
 
@@ -6,7 +6,7 @@
6
6
  import { Button } from '../../index.js';
7
7
  import DismissFilled from 'fluentui-icons-svelte/DismissFilled.svelte';
8
8
 
9
- let { ref = $bindable(), class: classes, oncancel, children, ...attributes }: DialogSurfaceProps = $props();
9
+ let { ref = $bindable(null), class: classes, oncancel, children, ...attributes }: DialogSurfaceProps = $props();
10
10
 
11
11
  const CONTEXT = getDialogContext();
12
12
 
@@ -18,6 +18,12 @@
18
18
 
19
19
  const { closeDialog } = methods;
20
20
 
21
+ const duration = $derived(
22
+ typeof config.duration === 'number'
23
+ ? `${Number.isFinite(config.duration) ? Math.max(0, config.duration) : 0}ms`
24
+ : `var(${config.duration.startsWith('--') ? config.duration : `--fs-${config.duration}-duration`}, 333ms)`
25
+ );
26
+
21
27
  // runed reports an outside press 10ms after the pointer goes down. By then the press that opens the
22
28
  // dialog has already opened it, and a press while it is closed has nothing to dismiss, so remember
23
29
  // whether the dialog was open at the moment the pointer went down.
@@ -55,12 +61,13 @@
55
61
  </script>
56
62
 
57
63
  <dialog
64
+ {...attributes}
58
65
  open={_state.open}
59
- class={['fs-dialog', classes]}
60
- aria-labelledby={_state.titleId}
66
+ class={['fs-dialog', `position-${config.position}`, `animation-${config.animation}`, classes]}
67
+ style:--fs-dialog-duration={duration}
68
+ aria-labelledby={_state.titleId ?? attributes['aria-labelledby']}
61
69
  bind:this={ref}
62
70
  oncancel={handleCancel}
63
- {...attributes}
64
71
  >
65
72
  <div class="dialog-wrapper">
66
73
  {#if config.type === 'non-modal'}
@@ -74,21 +81,93 @@
74
81
 
75
82
  <style>
76
83
  .fs-dialog {
84
+ --fs-dialog-effective-duration: var(--fs-dialog-duration);
85
+ --fs-dialog-enter-easing: var(--fs-fast-dismiss, cubic-bezier(0, 0, 0, 1));
86
+ --fs-dialog-exit-easing: var(--fs-soft-dismiss, cubic-bezier(1, 0, 1, 1));
87
+ --fs-dialog-hidden-transform: none;
88
+ opacity: 0;
89
+ transform: var(--fs-dialog-hidden-transform);
90
+ transition:
91
+ opacity var(--fs-dialog-effective-duration) var(--fs-dialog-exit-easing),
92
+ transform var(--fs-dialog-effective-duration) var(--fs-dialog-exit-easing),
93
+ display var(--fs-dialog-effective-duration) allow-discrete,
94
+ overlay var(--fs-dialog-effective-duration) allow-discrete;
95
+ &[open] {
96
+ opacity: 1;
97
+ transform: none;
98
+ transition-timing-function: var(--fs-dialog-enter-easing);
99
+ }
100
+ &.animation-zoom {
101
+ --fs-dialog-hidden-transform: scale(0.9);
102
+ --fs-dialog-enter-transform: scale(0.88);
103
+ }
104
+ &.animation-slide {
105
+ --fs-dialog-hidden-transform: translateY(16px);
106
+ &.position-top-start,
107
+ &.position-top-center,
108
+ &.position-top-end {
109
+ --fs-dialog-hidden-transform: translateY(-16px);
110
+ }
111
+ }
112
+ &.animation-bounce {
113
+ --fs-dialog-hidden-transform: scale(0.96);
114
+ --fs-dialog-enter-easing: var(--fs-strong-invoke, cubic-bezier(0.13, 1.62, 0, 0.92));
115
+ /* Reverse of Fluent's strong-invoke curve: a small anticipation before dismissal. */
116
+ --fs-dialog-exit-easing: cubic-bezier(1, 0.08, 0.87, -0.62);
117
+ }
118
+ @starting-style {
119
+ &[open] {
120
+ opacity: 0;
121
+ transform: var(--fs-dialog-enter-transform, var(--fs-dialog-hidden-transform));
122
+ }
123
+ }
77
124
  position: fixed;
78
- top: 50%;
79
- left: 50%;
125
+ inset: 1rem;
126
+ margin: auto;
80
127
  padding: 0;
81
- transform: translate(-50%, -50%);
128
+ box-sizing: border-box;
82
129
  border: unset;
83
130
  z-index: 1100;
84
131
  width: 35vw;
85
- min-width: 20rem;
132
+ min-width: min(20rem, calc(100vw - 2rem));
133
+ max-width: calc(100vw - 2rem);
134
+ height: fit-content;
135
+ max-height: calc(100dvh - 2rem);
86
136
  overflow: visible;
87
137
  background: var(--fs-solid-background-base);
88
138
  border-radius: var(--fs-control-overlay-border-radius);
139
+ &.position-top-start,
140
+ &.position-top-center,
141
+ &.position-top-end {
142
+ margin-block-start: 0;
143
+ }
144
+ &.position-bottom-start,
145
+ &.position-bottom-center,
146
+ &.position-bottom-end {
147
+ margin-block-end: 0;
148
+ }
149
+ &.position-top-start,
150
+ &.position-middle-start,
151
+ &.position-bottom-start {
152
+ margin-inline-start: 0;
153
+ }
154
+ &.position-top-end,
155
+ &.position-middle-end,
156
+ &.position-bottom-end {
157
+ margin-inline-end: 0;
158
+ }
89
159
  &::backdrop {
160
+ opacity: 0;
90
161
  background-color: var(--fs-smoke-background-default);
91
162
  backdrop-filter: blur(0.25rem);
163
+ transition:
164
+ opacity var(--fs-dialog-effective-duration) var(--fs-soft-dismiss, cubic-bezier(1, 0, 1, 1)),
165
+ display var(--fs-dialog-effective-duration) allow-discrete,
166
+ overlay var(--fs-dialog-effective-duration) allow-discrete;
167
+ }
168
+ &[open]::backdrop {
169
+ opacity: 1;
170
+ transition-timing-function: var(--fs-fast-dismiss, cubic-bezier(0, 0, 0, 1));
92
171
  }
93
172
  & .dialog-wrapper {
94
173
  position: relative;
@@ -98,7 +177,7 @@
98
177
  display: grid;
99
178
  grid-template-rows: auto 1fr;
100
179
  width: 100%;
101
- max-height: 95vh;
180
+ max-height: calc(100dvh - 2rem);
102
181
  overflow: hidden;
103
182
  background: var(--fs-layer-alt);
104
183
  &::before {
@@ -121,4 +200,18 @@
121
200
  }
122
201
  }
123
202
  }
203
+ /* Pseudo-elements need a separate starting-style rule rather than nested &. */
204
+ @starting-style {
205
+ .fs-dialog[open]::backdrop {
206
+ opacity: 0;
207
+ }
208
+ }
209
+ :global(:root[data-fs-reduced-motion='true']) .fs-dialog {
210
+ --fs-dialog-effective-duration: 0ms;
211
+ }
212
+ @media (prefers-reduced-motion: reduce) {
213
+ :global(:root:not([data-fs-reduced-motion='false'])) .fs-dialog {
214
+ --fs-dialog-effective-duration: 0ms;
215
+ }
216
+ }
124
217
  </style>
@@ -9,7 +9,7 @@
9
9
 
10
10
  let {
11
11
  as = 'h3' as T,
12
- ref = $bindable(),
12
+ ref = $bindable(null),
13
13
  id = FALLBACK_ID,
14
14
  class: classes,
15
15
  children,
@@ -38,7 +38,7 @@
38
38
  });
39
39
  </script>
40
40
 
41
- <svelte:element this={_as} {id} class={['dialog-title', classes]} bind:this={ref} {...attributes}>
41
+ <svelte:element this={_as} {...attributes} {id} class={['dialog-title', classes]} bind:this={ref}>
42
42
  {@render children?.()}
43
43
  </svelte:element>
44
44
 
@@ -4,7 +4,7 @@
4
4
  import { getDialogContext } from './dialog.svelte.js';
5
5
  import type { DialogTriggerProps } from './types.js';
6
6
 
7
- let { ref = $bindable(), class: classes, onclick, children, ...attributes }: DialogTriggerProps = $props();
7
+ let { ref = $bindable(null), class: classes, onclick, children, ...attributes }: DialogTriggerProps = $props();
8
8
 
9
9
  const CONTEXT = getDialogContext();
10
10
 
@@ -16,10 +16,10 @@
16
16
  </script>
17
17
 
18
18
  <Button
19
+ {...attributes}
19
20
  bind:ref
20
21
  class={['dialog-trigger', classes]}
21
22
  onclick={(e: MouseEvent) => invokeHandlers(e, [], [onclick, methods.openDialog])}
22
- {...attributes}
23
23
  >
24
24
  {#if children}
25
25
  {@render children()}
@@ -2,7 +2,15 @@
2
2
  import { setDialogContext } from './dialog.svelte.js';
3
3
  import type { DialogContext, DialogProps } from './types.js';
4
4
 
5
- let { type = 'modal', open = $bindable(), onOpenChange, children }: DialogProps = $props();
5
+ let {
6
+ type = 'modal',
7
+ position = 'middle-center',
8
+ animation = 'zoom',
9
+ duration = 'normal',
10
+ open = $bindable(null),
11
+ onOpenChange,
12
+ children
13
+ }: DialogProps = $props();
6
14
 
7
15
  let dialogRef: HTMLDialogElement | undefined = $state();
8
16
 
@@ -12,6 +20,15 @@
12
20
  config: {
13
21
  get type() {
14
22
  return type;
23
+ },
24
+ get position() {
25
+ return position;
26
+ },
27
+ get animation() {
28
+ return animation;
29
+ },
30
+ get duration() {
31
+ return duration;
15
32
  }
16
33
  },
17
34
  state: {
@@ -34,19 +51,13 @@
34
51
  events: null,
35
52
  methods: {
36
53
  openDialog: () => {
37
- if (type !== 'non-modal') {
38
- dialogRef?.showModal();
39
- } else {
40
- open = true;
41
- }
54
+ if (type !== 'non-modal') dialogRef?.showModal();
55
+ open = true;
42
56
  onOpenChange?.(true);
43
57
  },
44
58
  closeDialog: () => {
45
- if (type !== 'non-modal') {
46
- dialogRef?.close();
47
- } else {
48
- open = false;
49
- }
59
+ if (type !== 'non-modal') dialogRef?.close();
60
+ open = false;
50
61
  onOpenChange?.(false);
51
62
  }
52
63
  }
@@ -45,6 +45,40 @@ The Dialog is composed of several components that work together through a shared
45
45
 
46
46
  ## Examples
47
47
 
48
+ ### Position
49
+
50
+ Set `position` on `Dialog` to combine `top`, `middle`, or `bottom` with `start`, `center`, or `end`, for example `top-end` or `bottom-start`. The default is `middle-center`.
51
+
52
+ Start and end follow the text direction, so `top-start` sits on the right in RTL. All positions keep a 1rem gap from viewport edges and work with modal, non-modal, and alert dialogs. Changing `position` moves an open dialog without closing it.
53
+
54
+ ```svelte
55
+ <Dialog position="top-end">
56
+ <DialogTrigger>Open Dialog</DialogTrigger>
57
+ <DialogSurface>
58
+ <DialogTitle>Dialog Title</DialogTitle>
59
+ <DialogContent>Dialog body content.</DialogContent>
60
+ </DialogSurface>
61
+ </Dialog>
62
+ ```
63
+
64
+ ### Entrance and Exit Motion
65
+
66
+ `animation` selects `fade`, `zoom`, `slide`, or `bounce` for both directions. The default is `zoom`. Zoom enters from 88% scale and exits to 90%; slide travels 16px, from above for top positions and below otherwise. Bounce uses a small scale overshoot with Fluent's strong-invoke curve.
67
+
68
+ `duration` defaults to `normal`. Theme names are `fast`, `normal`, `slow`, `slower`, `very-slow`, and `extra-slow`, matching `--fs-<name>-duration`. A CSS custom property name such as `--fs-fast-duration` is also accepted. Numbers are milliseconds; `0` disables motion.
69
+
70
+ ```svelte
71
+ <Dialog animation="slide" duration={200} position="bottom-end">
72
+ <DialogTrigger>Open Dialog</DialogTrigger>
73
+ <DialogSurface>
74
+ <DialogTitle>Dialog Title</DialogTitle>
75
+ <DialogContent>Dialog body content.</DialogContent>
76
+ </DialogSurface>
77
+ </Dialog>
78
+ ```
79
+
80
+ Motion is implemented with CSS `@starting-style` and discrete `display`/`overlay` transitions. Calling `closeDialog()` updates `open` and releases native modal focus immediately; CSS keeps the surface and backdrop painted until the exit ends. Browsers without these CSS features open and close immediately. The OS reduced-motion preference and FluentUISvelte's app preference disable motion, including numeric durations; an explicit app preference takes priority over the OS.
81
+
48
82
  ### With Actions
49
83
 
50
84
  Add a `DialogActions` region to render action buttons in the dialog footer. Use `bind:this` on the `Dialog` to call `closeDialog()` programmatically.
@@ -83,12 +117,15 @@ Add a `DialogActions` region to render action buttons in the dialog footer. Use
83
117
  <!-- DO NOT EDIT THIS SECTION (propsmith generated) -->
84
118
  <!-- props:DialogProps -->
85
119
 
86
- | Name | Type | Default | Description |
87
- | ----------------- | ----------------------------------------------- | --------- | ------------------------------------------------- |
88
- | `type` | `'modal'` &#124; `'non-modal'` &#124; `'alert'` | `'modal'` | How the dialog behaves once open. |
89
- | `open` _bindable_ | `boolean` | | Controls the open state of the dialog. |
90
- | `onOpenChange` | `(open: boolean) => void` | | Called whenever the dialog opens or closes. |
91
- | `children` | `Snippet` | | The parts of the dialog: a trigger and a surface. |
120
+ | Name | Type | Default | Description |
121
+ | ----------------- | -------------------------------------------------------------------------- | ----------------- | ---------------------------------------------------------------------------------------------------- |
122
+ | `type` | `'modal'` &#124; `'non-modal'` &#124; `'alert'` | `'modal'` | How the dialog behaves once open. |
123
+ | `position` | [`DialogPosition`](https://fluentui-svelte.dev/docs/types/#dialogposition) | `'middle-center'` | Where the dialog sits in the viewport. Start and end follow the text direction. |
124
+ | `animation` | `'fade'` &#124; `'zoom'` &#124; `'slide'` &#124; `'bounce'` | `'zoom'` | The entrance and exit animation. Bounce uses a subtle overshoot. |
125
+ | `duration` | [`DialogDuration`](https://fluentui-svelte.dev/docs/types/#dialogduration) | `'normal'` | Duration in milliseconds, a theme duration name, or a CSS custom property name. Use 0 for no motion. |
126
+ | `open` _bindable_ | `boolean` &#124; `null` | | Controls the open state of the dialog. |
127
+ | `onOpenChange` | `(open: boolean) => void` | | Called whenever the dialog opens or closes. |
128
+ | `children` | `Snippet` | | The parts of the dialog: a trigger and a surface. |
92
129
 
93
130
  <!-- /props:DialogProps -->
94
131
 
@@ -97,10 +134,10 @@ Add a `DialogActions` region to render action buttons in the dialog footer. Use
97
134
  <!-- DO NOT EDIT THIS SECTION (propsmith generated) -->
98
135
  <!-- props:DialogTriggerProps -->
99
136
 
100
- | Name | Type | Default | Description |
101
- | ----------------------- | ------------------- | ------- | ----------------------------------------- |
102
- | `ref` _bindable_ | `HTMLButtonElement` | | The DOM reference of the trigger element. |
103
- | `ButtonProps<'button'>` | | | |
137
+ | Name | Type | Default | Description |
138
+ | ----------------------- | --------------------------------- | ------- | ----------------------------------------- |
139
+ | `ref` _bindable_ | `HTMLButtonElement` &#124; `null` | | The DOM reference of the trigger element. |
140
+ | `ButtonProps<'button'>` | | | |
104
141
 
105
142
  <!-- /props:DialogTriggerProps -->
106
143
 
@@ -109,10 +146,10 @@ Add a `DialogActions` region to render action buttons in the dialog footer. Use
109
146
  <!-- DO NOT EDIT THIS SECTION (propsmith generated) -->
110
147
  <!-- props:DialogSurfaceProps -->
111
148
 
112
- | Name | Type | Default | Description |
113
- | ----------------------------- | ------------------- | ------- | ---------------------------------------- |
114
- | `ref` _bindable_ | `HTMLDialogElement` | | The DOM reference of the dialog element. |
115
- | Element Attributes (`dialog`) | | | |
149
+ | Name | Type | Default | Description |
150
+ | ----------------------------- | --------------------------------- | ------- | ---------------------------------------- |
151
+ | `ref` _bindable_ | `HTMLDialogElement` &#124; `null` | | The DOM reference of the dialog element. |
152
+ | Element Attributes (`dialog`) | | | |
116
153
 
117
154
  <!-- /props:DialogSurfaceProps -->
118
155
 
@@ -134,10 +171,10 @@ Add a `DialogActions` region to render action buttons in the dialog footer. Use
134
171
  <!-- DO NOT EDIT THIS SECTION (propsmith generated) -->
135
172
  <!-- props:DialogContentProps -->
136
173
 
137
- | Name | Type | Default | Description |
138
- | -------------------------- | ---------------- | ------- | ----------------------------------------- |
139
- | `ref` _bindable_ | `HTMLDivElement` | | The DOM reference of the content element. |
140
- | Element Attributes (`div`) | | | |
174
+ | Name | Type | Default | Description |
175
+ | -------------------------- | ------------------------------ | ------- | ----------------------------------------- |
176
+ | `ref` _bindable_ | `HTMLDivElement` &#124; `null` | | The DOM reference of the content element. |
177
+ | Element Attributes (`div`) | | | |
141
178
 
142
179
  <!-- /props:DialogContentProps -->
143
180
 
@@ -148,7 +185,7 @@ Add a `DialogActions` region to render action buttons in the dialog footer. Use
148
185
 
149
186
  | Name | Type | Default | Description |
150
187
  | -------------------------- | ------------------------------------------ | ------- | ----------------------------------------------------------- |
151
- | `ref` _bindable_ | `HTMLDivElement` | | The DOM reference of the actions element. |
188
+ | `ref` _bindable_ | `HTMLDivElement` &#124; `null` | | The DOM reference of the actions element. |
152
189
  | `fluid` | `boolean` | | Stretches every action to share the available width evenly. |
153
190
  | `position` | `'start'` &#124; `'center'` &#124; `'end'` | `'end'` | Where the actions sit along the main axis. |
154
191
  | Element Attributes (`div`) | | | |
@@ -4,6 +4,9 @@ import type { HTMLAttributes } from 'svelte/elements';
4
4
  import type { ButtonProps } from '../button/types.ts';
5
5
  import type { PolymorphicProps, XDirection } from '../../types/index.js';
6
6
  export type DialogType = 'modal' | 'non-modal' | 'alert';
7
+ export type DialogAnimation = 'fade' | 'zoom' | 'slide' | 'bounce';
8
+ export type DialogDuration = number | 'fast' | 'normal' | 'slow' | 'slower' | 'very-slow' | 'extra-slow' | `--${string}`;
9
+ export type DialogPosition = 'top-start' | 'top-center' | 'top-end' | 'middle-start' | 'middle-center' | 'middle-end' | 'bottom-start' | 'bottom-center' | 'bottom-end';
7
10
  export type DialogTitleTag = 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
8
11
  /** @propsmith DialogProps */
9
12
  export type DialogProps = {
@@ -17,10 +20,22 @@ export type DialogProps = {
17
20
  * @default 'modal'
18
21
  */
19
22
  type?: DialogType;
23
+ /** Where the dialog sits in the viewport. Start and end follow the text direction.
24
+ * @default 'middle-center'
25
+ */
26
+ position?: DialogPosition;
27
+ /** The entrance and exit animation. Bounce uses a subtle overshoot.
28
+ * @default 'zoom'
29
+ */
30
+ animation?: DialogAnimation;
31
+ /** Duration in milliseconds, a theme duration name, or a CSS custom property name. Use 0 for no motion.
32
+ * @default 'normal'
33
+ */
34
+ duration?: DialogDuration;
20
35
  /** Controls the open state of the dialog.
21
36
  * @bindable
22
37
  */
23
- open?: boolean;
38
+ open?: boolean | null;
24
39
  /** Called whenever the dialog opens or closes. */
25
40
  onOpenChange?: (open: boolean) => void;
26
41
  /** The parts of the dialog: a trigger and a surface. */
@@ -31,28 +46,28 @@ export type DialogSurfaceProps = {
31
46
  /** The DOM reference of the dialog element.
32
47
  * @bindable
33
48
  */
34
- ref?: HTMLDialogElement;
49
+ ref?: HTMLDialogElement | null;
35
50
  } & HTMLAttributes<HTMLDialogElement>;
36
51
  /** @propsmith DialogTriggerProps */
37
52
  export type DialogTriggerProps = {
38
53
  /** The DOM reference of the trigger element.
39
54
  * @bindable
40
55
  */
41
- ref?: HTMLButtonElement;
56
+ ref?: HTMLButtonElement | null;
42
57
  } & ButtonProps<'button'>;
43
58
  /** @propsmith DialogContentProps */
44
59
  export type DialogContentProps = {
45
60
  /** The DOM reference of the content element.
46
61
  * @bindable
47
62
  */
48
- ref?: HTMLDivElement;
63
+ ref?: HTMLDivElement | null;
49
64
  } & HTMLAttributes<HTMLDivElement>;
50
65
  /** @propsmith DialogActionsProps */
51
66
  export type DialogActionsProps = {
52
67
  /** The DOM reference of the actions element.
53
68
  * @bindable
54
69
  */
55
- ref?: HTMLDivElement;
70
+ ref?: HTMLDivElement | null;
56
71
  /** Stretches every action to share the available width evenly. */
57
72
  fluid?: boolean;
58
73
  /** Where the actions sit along the main axis.
@@ -75,7 +90,7 @@ export type DialogTitleProps<T extends DialogTitleTag> = {
75
90
  * @type HTMLDivElement | HTMLHeadingElement
76
91
  * @bindable
77
92
  */
78
- ref?: DialogTitleRefType[T];
93
+ ref?: DialogTitleRefType[T] | null;
79
94
  /** The HTML element to render the title as.
80
95
  * @type DialogTitleTag
81
96
  * @default 'h3'
@@ -84,9 +99,12 @@ export type DialogTitleProps<T extends DialogTitleTag> = {
84
99
  } & PolymorphicProps<T>;
85
100
  export type DialogContext = FSContext<{
86
101
  type: DialogType;
102
+ position: DialogPosition;
103
+ animation: DialogAnimation;
104
+ duration: DialogDuration;
87
105
  }, {
88
106
  dialogRef: HTMLDialogElement | undefined;
89
- readonly open: boolean | undefined;
107
+ readonly open: boolean | null | undefined;
90
108
  /** Set by `DialogTitle`, to allow the surface pointing `aria-labelledby` at it. */
91
109
  titleId: string | undefined;
92
110
  }, null, {