@ds-gn/ui 0.0.0-stage → 0.5.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 (271) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +155 -2
  3. package/THIRD_PARTY_NOTICES +167 -0
  4. package/assets/logo-full-dark.svg +4 -0
  5. package/assets/logo-full.svg +4 -0
  6. package/assets/logo-mark.svg +3 -0
  7. package/custom-elements.json +4696 -0
  8. package/dist/common/Base/Base.d.ts +22 -0
  9. package/dist/common/controllers/AuroraMeshController.d.ts +68 -0
  10. package/dist/common/controllers/AutoRotateController.d.ts +38 -0
  11. package/dist/common/controllers/BreakpointController.d.ts +30 -0
  12. package/dist/common/controllers/LayoutChangeController.d.ts +28 -0
  13. package/dist/common/controllers/WordCycleController.d.ts +36 -0
  14. package/dist/common/helpers/aurora-mesh.d.ts +11 -0
  15. package/dist/common/helpers/define-element.d.ts +14 -0
  16. package/dist/common/helpers/enum-creator.d.ts +2 -0
  17. package/dist/common/helpers/enum-validator.d.ts +1 -0
  18. package/dist/common/helpers/layout-change.d.ts +39 -0
  19. package/dist/common/helpers/layout-change.testing.d.ts +15 -0
  20. package/dist/common/helpers/logo.string.d.ts +23 -0
  21. package/dist/common/helpers/logo.string.js +43 -0
  22. package/dist/common/helpers/logo.utils.d.ts +8 -0
  23. package/dist/common/helpers/motion.d.ts +9 -0
  24. package/dist/common/helpers/story.utils.d.ts +32 -0
  25. package/dist/common/props/surface/surface.props.d.ts +6 -0
  26. package/dist/components/Background/src/Background.d.ts +44 -0
  27. package/dist/components/Background/src/Background.js +576 -0
  28. package/dist/components/Background/src/Background.props.d.ts +20 -0
  29. package/dist/components/Background/src/Background.props.js +47 -0
  30. package/dist/components/Background/src/Background.styles.d.ts +3 -0
  31. package/dist/components/Badge/src/Badge.d.ts +28 -0
  32. package/dist/components/Badge/src/Badge.js +429 -0
  33. package/dist/components/Badge/src/Badge.playground.d.ts +2 -0
  34. package/dist/components/Badge/src/Badge.props.d.ts +16 -0
  35. package/dist/components/Badge/src/Badge.props.js +44 -0
  36. package/dist/components/Badge/src/Badge.styles.d.ts +2 -0
  37. package/dist/components/Button/src/Button.d.ts +138 -0
  38. package/dist/components/Button/src/Button.js +1102 -0
  39. package/dist/components/Button/src/Button.playground.d.ts +2 -0
  40. package/dist/components/Button/src/Button.props.d.ts +47 -0
  41. package/dist/components/Button/src/Button.props.js +79 -0
  42. package/dist/components/Button/src/Button.styles.d.ts +11 -0
  43. package/dist/components/Card/src/Card.d.ts +39 -0
  44. package/dist/components/Card/src/Card.js +564 -0
  45. package/dist/components/Card/src/Card.playground.d.ts +2 -0
  46. package/dist/components/Card/src/Card.props.d.ts +22 -0
  47. package/dist/components/Card/src/Card.props.js +42 -0
  48. package/dist/components/Card/src/Card.styles.d.ts +11 -0
  49. package/dist/components/CodeBlock/src/CodeBlock.d.ts +18 -0
  50. package/dist/components/CodeBlock/src/CodeBlock.js +372 -0
  51. package/dist/components/CodeBlock/src/CodeBlock.props.d.ts +1 -0
  52. package/dist/components/CodeBlock/src/CodeBlock.props.js +5 -0
  53. package/dist/components/CodeBlock/src/CodeBlock.styles.d.ts +9 -0
  54. package/dist/components/Container/src/Container.d.ts +26 -0
  55. package/dist/components/Container/src/Container.js +354 -0
  56. package/dist/components/Container/src/Container.props.d.ts +20 -0
  57. package/dist/components/Container/src/Container.props.js +49 -0
  58. package/dist/components/Container/src/Container.styles.d.ts +2 -0
  59. package/dist/components/Divider/src/Divider.d.ts +23 -0
  60. package/dist/components/Divider/src/Divider.js +250 -0
  61. package/dist/components/Divider/src/Divider.props.d.ts +7 -0
  62. package/dist/components/Divider/src/Divider.props.js +34 -0
  63. package/dist/components/Divider/src/Divider.styles.d.ts +2 -0
  64. package/dist/components/FeatureItem/src/FeatureItem.d.ts +30 -0
  65. package/dist/components/FeatureItem/src/FeatureItem.js +368 -0
  66. package/dist/components/FeatureItem/src/FeatureItem.props.d.ts +10 -0
  67. package/dist/components/FeatureItem/src/FeatureItem.props.js +37 -0
  68. package/dist/components/FeatureItem/src/FeatureItem.styles.d.ts +3 -0
  69. package/dist/components/FeatureTabs/src/FeatureTabs.d.ts +48 -0
  70. package/dist/components/FeatureTabs/src/FeatureTabs.js +1333 -0
  71. package/dist/components/FeatureTabs/src/FeatureTabs.props.d.ts +27 -0
  72. package/dist/components/FeatureTabs/src/FeatureTabs.props.js +80 -0
  73. package/dist/components/FeatureTabs/src/FeatureTabs.styles.d.ts +35 -0
  74. package/dist/components/Footer/src/Footer.d.ts +39 -0
  75. package/dist/components/Footer/src/Footer.js +361 -0
  76. package/dist/components/Footer/src/Footer.styles.d.ts +6 -0
  77. package/dist/components/FormBlock/src/FormBlock.d.ts +40 -0
  78. package/dist/components/FormBlock/src/FormBlock.js +476 -0
  79. package/dist/components/FormBlock/src/FormBlock.props.d.ts +5 -0
  80. package/dist/components/FormBlock/src/FormBlock.props.js +8 -0
  81. package/dist/components/FormBlock/src/FormBlock.styles.d.ts +6 -0
  82. package/dist/components/Grid/src/Grid.d.ts +35 -0
  83. package/dist/components/Grid/src/Grid.js +381 -0
  84. package/dist/components/Grid/src/Grid.props.d.ts +28 -0
  85. package/dist/components/Grid/src/Grid.props.js +57 -0
  86. package/dist/components/Grid/src/Grid.styles.d.ts +3 -0
  87. package/dist/components/Heading/src/Heading.d.ts +26 -0
  88. package/dist/components/Heading/src/Heading.js +755 -0
  89. package/dist/components/Heading/src/Heading.playground.d.ts +2 -0
  90. package/dist/components/Heading/src/Heading.props.d.ts +19 -0
  91. package/dist/components/Heading/src/Heading.props.js +47 -0
  92. package/dist/components/Heading/src/Heading.styles.d.ts +4 -0
  93. package/dist/components/HeadingBlock/src/HeadingBlock.d.ts +28 -0
  94. package/dist/components/HeadingBlock/src/HeadingBlock.js +288 -0
  95. package/dist/components/HeadingBlock/src/HeadingBlock.playground.d.ts +2 -0
  96. package/dist/components/HeadingBlock/src/HeadingBlock.props.d.ts +6 -0
  97. package/dist/components/HeadingBlock/src/HeadingBlock.props.js +33 -0
  98. package/dist/components/HeadingBlock/src/HeadingBlock.styles.d.ts +2 -0
  99. package/dist/components/Hero/src/Hero.d.ts +42 -0
  100. package/dist/components/Hero/src/Hero.js +506 -0
  101. package/dist/components/Hero/src/Hero.props.d.ts +22 -0
  102. package/dist/components/Hero/src/Hero.props.js +51 -0
  103. package/dist/components/Hero/src/Hero.styles.d.ts +10 -0
  104. package/dist/components/Icon/src/Icon.d.ts +67 -0
  105. package/dist/components/Icon/src/Icon.js +303 -0
  106. package/dist/components/Icon/src/Icon.props.d.ts +8 -0
  107. package/dist/components/Icon/src/Icon.props.js +35 -0
  108. package/dist/components/Icon/src/Icon.styles.d.ts +3 -0
  109. package/dist/components/Icon/src/icons/arrow-left.d.ts +1 -0
  110. package/dist/components/Icon/src/icons/arrow-left.js +6 -0
  111. package/dist/components/Icon/src/icons/arrow-right.d.ts +1 -0
  112. package/dist/components/Icon/src/icons/arrow-right.js +6 -0
  113. package/dist/components/Icon/src/icons/calendar.d.ts +1 -0
  114. package/dist/components/Icon/src/icons/calendar.js +6 -0
  115. package/dist/components/Icon/src/icons/check.d.ts +1 -0
  116. package/dist/components/Icon/src/icons/check.js +6 -0
  117. package/dist/components/Icon/src/icons/chevron-down.d.ts +1 -0
  118. package/dist/components/Icon/src/icons/chevron-down.js +6 -0
  119. package/dist/components/Icon/src/icons/chevron-left.d.ts +1 -0
  120. package/dist/components/Icon/src/icons/chevron-left.js +6 -0
  121. package/dist/components/Icon/src/icons/chevron-right.d.ts +1 -0
  122. package/dist/components/Icon/src/icons/chevron-right.js +6 -0
  123. package/dist/components/Icon/src/icons/chevron-up.d.ts +1 -0
  124. package/dist/components/Icon/src/icons/chevron-up.js +6 -0
  125. package/dist/components/Icon/src/icons/circle-alert.d.ts +1 -0
  126. package/dist/components/Icon/src/icons/circle-alert.js +6 -0
  127. package/dist/components/Icon/src/icons/circle-check.d.ts +1 -0
  128. package/dist/components/Icon/src/icons/circle-check.js +6 -0
  129. package/dist/components/Icon/src/icons/circle-x.d.ts +1 -0
  130. package/dist/components/Icon/src/icons/circle-x.js +6 -0
  131. package/dist/components/Icon/src/icons/copy.d.ts +1 -0
  132. package/dist/components/Icon/src/icons/copy.js +6 -0
  133. package/dist/components/Icon/src/icons/download.d.ts +1 -0
  134. package/dist/components/Icon/src/icons/download.js +6 -0
  135. package/dist/components/Icon/src/icons/ellipsis-vertical.d.ts +1 -0
  136. package/dist/components/Icon/src/icons/ellipsis-vertical.js +6 -0
  137. package/dist/components/Icon/src/icons/ellipsis.d.ts +1 -0
  138. package/dist/components/Icon/src/icons/ellipsis.js +6 -0
  139. package/dist/components/Icon/src/icons/external-link.d.ts +1 -0
  140. package/dist/components/Icon/src/icons/external-link.js +6 -0
  141. package/dist/components/Icon/src/icons/eye-off.d.ts +1 -0
  142. package/dist/components/Icon/src/icons/eye-off.js +6 -0
  143. package/dist/components/Icon/src/icons/eye.d.ts +1 -0
  144. package/dist/components/Icon/src/icons/eye.js +6 -0
  145. package/dist/components/Icon/src/icons/icon-names.d.ts +2 -0
  146. package/dist/components/Icon/src/icons/icon-names.js +36 -0
  147. package/dist/components/Icon/src/icons/index.d.ts +34 -0
  148. package/dist/components/Icon/src/icons/index.js +35 -0
  149. package/dist/components/Icon/src/icons/info.d.ts +1 -0
  150. package/dist/components/Icon/src/icons/info.js +6 -0
  151. package/dist/components/Icon/src/icons/loader.d.ts +1 -0
  152. package/dist/components/Icon/src/icons/loader.js +6 -0
  153. package/dist/components/Icon/src/icons/mail.d.ts +1 -0
  154. package/dist/components/Icon/src/icons/mail.js +6 -0
  155. package/dist/components/Icon/src/icons/menu.d.ts +1 -0
  156. package/dist/components/Icon/src/icons/menu.js +6 -0
  157. package/dist/components/Icon/src/icons/minus.d.ts +1 -0
  158. package/dist/components/Icon/src/icons/minus.js +6 -0
  159. package/dist/components/Icon/src/icons/pencil.d.ts +1 -0
  160. package/dist/components/Icon/src/icons/pencil.js +6 -0
  161. package/dist/components/Icon/src/icons/plus.d.ts +1 -0
  162. package/dist/components/Icon/src/icons/plus.js +6 -0
  163. package/dist/components/Icon/src/icons/search.d.ts +1 -0
  164. package/dist/components/Icon/src/icons/search.js +6 -0
  165. package/dist/components/Icon/src/icons/settings.d.ts +1 -0
  166. package/dist/components/Icon/src/icons/settings.js +6 -0
  167. package/dist/components/Icon/src/icons/trash-2.d.ts +1 -0
  168. package/dist/components/Icon/src/icons/trash-2.js +6 -0
  169. package/dist/components/Icon/src/icons/triangle-alert.d.ts +1 -0
  170. package/dist/components/Icon/src/icons/triangle-alert.js +6 -0
  171. package/dist/components/Icon/src/icons/upload.d.ts +1 -0
  172. package/dist/components/Icon/src/icons/upload.js +6 -0
  173. package/dist/components/Icon/src/icons/user.d.ts +1 -0
  174. package/dist/components/Icon/src/icons/user.js +6 -0
  175. package/dist/components/Icon/src/icons/x.d.ts +1 -0
  176. package/dist/components/Icon/src/icons/x.js +6 -0
  177. package/dist/components/Image/src/Image.d.ts +76 -0
  178. package/dist/components/Image/src/Image.js +456 -0
  179. package/dist/components/Image/src/Image.props.d.ts +35 -0
  180. package/dist/components/Image/src/Image.props.js +65 -0
  181. package/dist/components/Image/src/Image.styles.d.ts +4 -0
  182. package/dist/components/Input/src/Input.d.ts +60 -0
  183. package/dist/components/Input/src/Input.js +648 -0
  184. package/dist/components/Input/src/Input.playground.d.ts +2 -0
  185. package/dist/components/Input/src/Input.props.d.ts +13 -0
  186. package/dist/components/Input/src/Input.props.js +41 -0
  187. package/dist/components/Input/src/Input.styles.d.ts +6 -0
  188. package/dist/components/Modal/src/Modal.d.ts +166 -0
  189. package/dist/components/Modal/src/Modal.js +1434 -0
  190. package/dist/components/Modal/src/Modal.playground.d.ts +2 -0
  191. package/dist/components/Modal/src/Modal.props.d.ts +66 -0
  192. package/dist/components/Modal/src/Modal.props.js +65 -0
  193. package/dist/components/Modal/src/Modal.styles.d.ts +29 -0
  194. package/dist/components/Nav/src/Nav.d.ts +66 -0
  195. package/dist/components/Nav/src/Nav.js +750 -0
  196. package/dist/components/Nav/src/Nav.props.d.ts +8 -0
  197. package/dist/components/Nav/src/Nav.props.js +13 -0
  198. package/dist/components/Nav/src/Nav.styles.d.ts +10 -0
  199. package/dist/components/NavDropdownColumn/src/NavDropdownColumn.d.ts +17 -0
  200. package/dist/components/NavDropdownColumn/src/NavDropdownColumn.js +170 -0
  201. package/dist/components/NavDropdownColumn/src/NavDropdownColumn.styles.d.ts +1 -0
  202. package/dist/components/NavLink/src/NavLink.d.ts +191 -0
  203. package/dist/components/NavLink/src/NavLink.js +1916 -0
  204. package/dist/components/NavLink/src/NavLink.props.d.ts +38 -0
  205. package/dist/components/NavLink/src/NavLink.props.js +58 -0
  206. package/dist/components/NavLink/src/NavLink.styles.d.ts +22 -0
  207. package/dist/components/Stack/src/Stack.d.ts +30 -0
  208. package/dist/components/Stack/src/Stack.js +300 -0
  209. package/dist/components/Stack/src/Stack.props.d.ts +24 -0
  210. package/dist/components/Stack/src/Stack.props.js +53 -0
  211. package/dist/components/Stack/src/Stack.styles.d.ts +2 -0
  212. package/dist/components/Text/src/Text.d.ts +32 -0
  213. package/dist/components/Text/src/Text.js +327 -0
  214. package/dist/components/Text/src/Text.props.d.ts +23 -0
  215. package/dist/components/Text/src/Text.props.js +52 -0
  216. package/dist/components/Text/src/Text.styles.d.ts +2 -0
  217. package/dist/playground/types.d.ts +29 -0
  218. package/dist/playground-manifest.d.ts +6 -0
  219. package/dist/playground-manifest.js +556 -0
  220. package/dist/react/Background.d.ts +6 -0
  221. package/dist/react/Background.js +13 -0
  222. package/dist/react/Badge.d.ts +6 -0
  223. package/dist/react/Badge.js +13 -0
  224. package/dist/react/Button.d.ts +6 -0
  225. package/dist/react/Button.js +13 -0
  226. package/dist/react/Card.d.ts +6 -0
  227. package/dist/react/Card.js +13 -0
  228. package/dist/react/CodeBlock.d.ts +6 -0
  229. package/dist/react/CodeBlock.js +13 -0
  230. package/dist/react/Container.d.ts +6 -0
  231. package/dist/react/Container.js +13 -0
  232. package/dist/react/Divider.d.ts +6 -0
  233. package/dist/react/Divider.js +13 -0
  234. package/dist/react/FeatureItem.d.ts +6 -0
  235. package/dist/react/FeatureItem.js +13 -0
  236. package/dist/react/FeatureTabs.d.ts +6 -0
  237. package/dist/react/FeatureTabs.js +13 -0
  238. package/dist/react/Footer.d.ts +6 -0
  239. package/dist/react/Footer.js +13 -0
  240. package/dist/react/FormBlock.d.ts +6 -0
  241. package/dist/react/FormBlock.js +13 -0
  242. package/dist/react/Grid.d.ts +6 -0
  243. package/dist/react/Grid.js +13 -0
  244. package/dist/react/Heading.d.ts +6 -0
  245. package/dist/react/Heading.js +13 -0
  246. package/dist/react/HeadingBlock.d.ts +6 -0
  247. package/dist/react/HeadingBlock.js +13 -0
  248. package/dist/react/Hero.d.ts +6 -0
  249. package/dist/react/Hero.js +13 -0
  250. package/dist/react/Icon.d.ts +6 -0
  251. package/dist/react/Icon.js +13 -0
  252. package/dist/react/Image.d.ts +8 -0
  253. package/dist/react/Image.js +13 -0
  254. package/dist/react/Input.d.ts +8 -0
  255. package/dist/react/Input.js +13 -0
  256. package/dist/react/Modal.d.ts +10 -0
  257. package/dist/react/Modal.js +17 -0
  258. package/dist/react/Nav.d.ts +6 -0
  259. package/dist/react/Nav.js +13 -0
  260. package/dist/react/NavDropdownColumn.d.ts +6 -0
  261. package/dist/react/NavDropdownColumn.js +13 -0
  262. package/dist/react/NavLink.d.ts +8 -0
  263. package/dist/react/NavLink.js +13 -0
  264. package/dist/react/Stack.d.ts +6 -0
  265. package/dist/react/Stack.js +13 -0
  266. package/dist/react/Text.d.ts +6 -0
  267. package/dist/react/Text.js +13 -0
  268. package/dist/react/index.d.ts +24 -0
  269. package/dist/react/index.js +25 -0
  270. package/dist/surface/surface.props.js +33 -0
  271. package/package.json +352 -4
@@ -0,0 +1,166 @@
1
+ import '../../../types/global.d.ts';
2
+ import '../../Button/src/Button.js';
3
+ import { type CSSResultGroup } from 'lit';
4
+ import { Base } from '../../../common/Base/Base.js';
5
+ import { type SurfaceType } from '../../../common/props/surface/surface.props.js';
6
+ import { type ModalCloseReasonType, type ModalMotionType, type ModalPlacementType, type ModalSizeType } from './Modal.props.js';
7
+ /**
8
+ * Accessible modal dialog built on the native `<dialog>` element and
9
+ * `showModal()`, so the top layer, background inertness, and focus containment
10
+ * come from the platform rather than a hand-rolled focus trap.
11
+ *
12
+ * All copy is supplied by the consumer through slots — `heading`, `description`,
13
+ * the default content slot, `footer`, and an optional `close` control whose
14
+ * activation is picked up automatically.
15
+ *
16
+ * @fires dsgn-modal-open - Fired after the dialog enters the top layer.
17
+ * @fires dsgn-modal-request-close - Fired before closing; cancelable, `detail` is `{ reason }`. Call `preventDefault()` to keep the modal open.
18
+ * @fires dsgn-modal-close - Fired once the exit animation has finished and the dialog has left the top layer; `detail` is `{ reason, returnValue }`.
19
+ *
20
+ * @slot - Modal body content.
21
+ * @slot heading - Title content; supplies the dialog's accessible name.
22
+ * @slot description - Supporting text referenced by `aria-describedby`.
23
+ * @slot footer - Actions, typically buttons.
24
+ * @slot close - A close control; clicking anything slotted here requests a close.
25
+ *
26
+ * @csspart dialog - Native dialog element.
27
+ * @csspart close-button - Built-in close button.
28
+ */
29
+ export declare class Modal extends Base {
30
+ static styles: CSSResultGroup;
31
+ private _dialog;
32
+ surface: SurfaceType;
33
+ /**
34
+ * Whether the modal is shown. This is the single source of truth: the
35
+ * component drives `showModal()`/`close()` from it, and sets it back to
36
+ * `false` itself whenever the dialog closes (Escape, backdrop, close control).
37
+ * A consumer holding `open` in its own state should therefore listen for
38
+ * `dsgn-modal-close` and mirror the change back, otherwise the two will drift
39
+ * on the next open.
40
+ */
41
+ open: boolean;
42
+ placement: ModalPlacementType;
43
+ /** Motion origin. `inherit` follows `placement`; `none` is fade-only. */
44
+ motion: ModalMotionType;
45
+ size: ModalSizeType;
46
+ /**
47
+ * Accessible name for the dialog, for the case where there is no visible
48
+ * heading. A filled `heading` slot takes precedence.
49
+ */
50
+ ariaLabel: string;
51
+ /**
52
+ * Accessible name for the built-in close control. Supplied by the CMS via the
53
+ * consuming template; the default is a Storybook/dev fallback only. Ignored
54
+ * when the consumer slots their own control into `close`.
55
+ */
56
+ closeLabel: string;
57
+ /**
58
+ * Drops the built-in close control. Every modal gets one by default so there
59
+ * is always a visible way out; opt out only when the flow supplies its own
60
+ * dismissal (a footer "Cancel", say) — and never together with
61
+ * `no-escape-dismiss`, which would leave keyboard users stuck.
62
+ *
63
+ * A control slotted into `close` replaces the built-in one whatever this is
64
+ * set to, since it is the slot's fallback content.
65
+ */
66
+ noCloseControl: boolean;
67
+ /** Blocks dismissal by clicking the backdrop. */
68
+ noBackdropDismiss: boolean;
69
+ /**
70
+ * Blocks dismissal by Escape. Reserve it for flows that would lose data —
71
+ * always leave a visible way out (a close control or a footer action), or
72
+ * keyboard users are stuck.
73
+ */
74
+ noEscapeDismiss: boolean;
75
+ /** Drives `data-state`, which the stylesheet keys the exit animation on. */
76
+ private _closing;
77
+ private _hasHeading;
78
+ private _hasDescription;
79
+ private _hasFooter;
80
+ private _hasCloseControl;
81
+ private _closeReason;
82
+ private _returnValue;
83
+ private _previouslyFocused;
84
+ private _pointerDownOnBackdrop;
85
+ private _holdsScrollLock;
86
+ /**
87
+ * Whether the header will show a close control — either one the consumer
88
+ * slotted, or the built-in default that has not been opted out of.
89
+ */
90
+ private get _hasCloseAffordance();
91
+ /** The resolved animation origin, with `inherit` folded into `placement`. */
92
+ private get _motionOrigin();
93
+ /** Show the modal. No-op if it is already open. */
94
+ show(): void;
95
+ /**
96
+ * Close the modal immediately, without firing the cancelable
97
+ * `dsgn-modal-request-close` — this is the imperative "I have decided" path.
98
+ * The optional `returnValue` lands on the native dialog and on the
99
+ * `dsgn-modal-close` detail.
100
+ */
101
+ close(returnValue?: string): void;
102
+ /**
103
+ * Ask to close. Fires the cancelable `dsgn-modal-request-close`; the modal
104
+ * stays open if a listener calls `preventDefault()`. This is the path Escape,
105
+ * the backdrop, and the slotted close control take, so a consumer can guard
106
+ * all of them (e.g. "discard unsaved changes?") in one listener.
107
+ */
108
+ requestClose(reason?: ModalCloseReasonType): boolean;
109
+ connectedCallback(): void;
110
+ disconnectedCallback(): void;
111
+ updated(changedProperties: Map<string | number | symbol, unknown>): void;
112
+ private _syncDialogState;
113
+ private _openDialog;
114
+ /**
115
+ * Play the exit animation, then leave the top layer. The dialog stays in the
116
+ * top layer for the whole animation because `dialog.close()` is what removes
117
+ * it, and that is deliberately the last step — no timers involved, the wait is
118
+ * on the animations' own `finished` promises.
119
+ */
120
+ private _runCloseSequence;
121
+ /**
122
+ * Deliberate initial focus: an author-marked `[autofocus]` (light DOM first,
123
+ * since that is where the modal's content lives), otherwise the dialog itself.
124
+ * The native autofocus algorithm is not relied on — it is inconsistent for
125
+ * content that reaches the dialog through a slot.
126
+ */
127
+ private _focusInitialElement;
128
+ private _restoreFocus;
129
+ private _acquireScrollLock;
130
+ private _releaseScrollLock;
131
+ /**
132
+ * The native `close` event is the single point where "the dialog is now
133
+ * shut" is handled, so a consumer calling `close()` on the inner dialog
134
+ * directly still gets the scroll unlock, focus restore, and public event.
135
+ */
136
+ private _handleNativeClose;
137
+ /**
138
+ * Escape (and any other platform close request) is always prevented, because
139
+ * the default behavior would yank the dialog out of the top layer before the
140
+ * exit animation could run. The dismissal is then re-issued through
141
+ * `requestClose()` so it is cancelable and animated like every other path.
142
+ */
143
+ private _handleCancel;
144
+ /**
145
+ * Clicks on the backdrop are reported with the dialog itself as the target
146
+ * (the panel is the dialog's only child and covers it). Requiring the press
147
+ * *and* the release to land there stops a text selection that started inside
148
+ * the modal and ended on the backdrop from dismissing it.
149
+ */
150
+ private _handlePointerDown;
151
+ private _handleDialogClick;
152
+ private _handleCloseControlClick;
153
+ /**
154
+ * Empty regions collapse rather than leaving stray padding, and an empty
155
+ * `heading`/`description` must not be referenced by `aria-labelledby` /
156
+ * `aria-describedby` — a dangling reference produces no accessible name at
157
+ * all, which is worse than falling back to `aria-label`.
158
+ */
159
+ private _handleSlotChange;
160
+ render(): import("lit").TemplateResult<1>;
161
+ }
162
+ declare global {
163
+ interface HTMLElementTagNameMap {
164
+ 'dsgn-modal': Modal;
165
+ }
166
+ }