@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,8 @@
1
+ export declare const navStickyValues: {
2
+ readonly TRUE: true;
3
+ readonly FALSE: false;
4
+ };
5
+ export declare const navTransparentValues: {
6
+ readonly TRUE: true;
7
+ readonly FALSE: false;
8
+ };
@@ -0,0 +1,13 @@
1
+ // components/Nav/src/Nav.props.ts
2
+ var navStickyValues = {
3
+ TRUE: true,
4
+ FALSE: false
5
+ };
6
+ var navTransparentValues = {
7
+ TRUE: true,
8
+ FALSE: false
9
+ };
10
+ export {
11
+ navStickyValues,
12
+ navTransparentValues
13
+ };
@@ -0,0 +1,10 @@
1
+ export declare const classNames: (transparent: boolean) => string;
2
+ export declare const stickyHostClasses: string[];
3
+ export declare const innerClasses: () => string;
4
+ export declare const logoClasses: () => string;
5
+ export declare const rightClasses: (menuOpen: boolean) => string;
6
+ export declare const linksClasses: () => string;
7
+ export declare const actionsClasses: () => string;
8
+ export declare const menuButtonClasses: () => string;
9
+ export declare const linksSlotClasses: () => string;
10
+ export declare const actionsSlotClasses: () => string;
@@ -0,0 +1,17 @@
1
+ import '../../../types/global.d.ts';
2
+ import { type CSSResultGroup } from 'lit';
3
+ import { Base } from '../../../common/Base/Base.js';
4
+ /**
5
+ * An ordered vertical group of links within a NavLink dropdown.
6
+ *
7
+ * @slot - Column links.
8
+ */
9
+ export declare class NavDropdownColumn extends Base {
10
+ static styles: CSSResultGroup;
11
+ render(): import("lit").TemplateResult<1>;
12
+ }
13
+ declare global {
14
+ interface HTMLElementTagNameMap {
15
+ 'dsgn-nav-dropdown-column': NavDropdownColumn;
16
+ }
17
+ }
@@ -0,0 +1,170 @@
1
+ // components/NavDropdownColumn/src/NavDropdownColumn.ts
2
+ import { html as html2 } from "lit";
3
+
4
+ // common/Base/Base.ts
5
+ import { html, LitElement } from "lit";
6
+
7
+ // common/helpers/define-element.ts
8
+ var defineElement = (tag, ctor) => {
9
+ if (typeof customElements === "undefined")
10
+ return;
11
+ if (!customElements.get(tag))
12
+ customElements.define(tag, ctor);
13
+ };
14
+
15
+ // common/Base/Base.css
16
+ import { css } from "lit";
17
+ var styles = css`/* Base reset in @layer base ensures it comes before utilities in Tailwind v4 cascade
18
+ This prevents the reset from overriding component utility classes */
19
+ @layer base {
20
+ :host {
21
+ display: block;
22
+ box-sizing: border-box;
23
+ line-height: 1.5;
24
+ -webkit-text-size-adjust: 100%;
25
+ tab-size: 4;
26
+ font-family: var(
27
+ --default-font-family,
28
+ var(--font-sans, ui-sans-serif, system-ui, sans-serif)
29
+ );
30
+ }
31
+
32
+ *,
33
+ *::before,
34
+ *::after {
35
+ box-sizing: inherit;
36
+ margin: 0;
37
+ padding: 0;
38
+ border: 0 solid;
39
+ }
40
+
41
+ :host h1,
42
+ :host h2,
43
+ :host h3,
44
+ :host h4,
45
+ :host h5,
46
+ :host h6 {
47
+ font-size: inherit;
48
+ font-weight: inherit;
49
+ margin: 0;
50
+ padding: 0;
51
+ }
52
+ }
53
+ `;
54
+ var Base_default = styles;
55
+
56
+ // common/Base/Base.ts
57
+ class Base extends LitElement {
58
+ static styles = Base_default;
59
+ updateTheme(changedProperties, surface) {
60
+ if (changedProperties.has("surface")) {
61
+ if (surface) {
62
+ this.setAttribute("data-theme", surface);
63
+ } else {
64
+ this.removeAttribute("data-theme");
65
+ }
66
+ }
67
+ }
68
+ emit(name, detail, options = {}) {
69
+ return this.dispatchEvent(new CustomEvent(name, {
70
+ detail,
71
+ bubbles: true,
72
+ composed: true,
73
+ cancelable: options.cancelable ?? false
74
+ }));
75
+ }
76
+ render() {
77
+ return html`<slot></slot>`;
78
+ }
79
+ }
80
+ defineElement("dsgn-base", Base);
81
+
82
+ // components/NavDropdownColumn/src/NavDropdownColumn.css
83
+ import { css as css2 } from "lit";
84
+ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
85
+ @layer properties;
86
+ @layer theme {
87
+ :root, :host {
88
+ --spacing: 0.25rem;
89
+ }
90
+ }
91
+ @layer utilities {
92
+ .static {
93
+ position: static;
94
+ }
95
+ .flex {
96
+ display: flex;
97
+ }
98
+ .w-full {
99
+ width: 100%;
100
+ }
101
+ .min-w-0 {
102
+ min-width: calc(var(--spacing) * 0);
103
+ }
104
+ .flex-col {
105
+ flex-direction: column;
106
+ }
107
+ .items-stretch {
108
+ align-items: stretch;
109
+ }
110
+ .gap-1 {
111
+ gap: calc(var(--spacing) * 1);
112
+ }
113
+ .px-2\\.5 {
114
+ padding-inline: calc(var(--spacing) * 2.5);
115
+ }
116
+ .py-1 {
117
+ padding-block: calc(var(--spacing) * 1);
118
+ }
119
+ }
120
+ @property --dsgn-border-sweep-angle {
121
+ syntax: '<angle>';
122
+ inherits: false;
123
+ initial-value: 0deg;
124
+ }
125
+ @layer properties {
126
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
127
+ *, ::before, ::after, ::backdrop {
128
+ --dsgn-border-sweep-angle: 0deg;
129
+ }
130
+ }
131
+ }
132
+ `;
133
+ var NavDropdownColumn_default = styles2;
134
+
135
+ // ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
136
+ function r(e) {
137
+ var t, f, n = "";
138
+ if (typeof e == "string" || typeof e == "number")
139
+ n += e;
140
+ else if (typeof e == "object")
141
+ if (Array.isArray(e)) {
142
+ var o = e.length;
143
+ for (t = 0;t < o; t++)
144
+ e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
145
+ } else
146
+ for (f in e)
147
+ e[f] && (n && (n += " "), n += f);
148
+ return n;
149
+ }
150
+ function clsx() {
151
+ for (var e, t, f = 0, n = "", o = arguments.length;f < o; f++)
152
+ (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
153
+ return n;
154
+ }
155
+ var clsx_default = clsx;
156
+
157
+ // components/NavDropdownColumn/src/NavDropdownColumn.styles.ts
158
+ var classNames = () => clsx_default("flex", "min-w-0", "w-full", "flex-col", "items-stretch", "gap-1", "px-2.5", "py-1");
159
+
160
+ // components/NavDropdownColumn/src/NavDropdownColumn.ts
161
+ class NavDropdownColumn extends Base {
162
+ static styles = [Base.styles, NavDropdownColumn_default];
163
+ render() {
164
+ return html2`<div class="${classNames()}"><slot></slot></div>`;
165
+ }
166
+ }
167
+ defineElement("dsgn-nav-dropdown-column", NavDropdownColumn);
168
+ export {
169
+ NavDropdownColumn
170
+ };
@@ -0,0 +1 @@
1
+ export declare const classNames: () => string;
@@ -0,0 +1,191 @@
1
+ import '../../../types/global.d.ts';
2
+ import '../../Icon/src/Icon.js';
3
+ import '../../NavDropdownColumn/src/NavDropdownColumn.js';
4
+ import { Base } from '../../../common/Base/Base.js';
5
+ import { type SurfaceType } from '../../../common/props/surface/surface.props.js';
6
+ import { type CSSResultGroup } from 'lit';
7
+ import { type NavLinkDropdownColumnsType, type NavLinkSecondaryHoverType, type NavLinkTargetType, type NavLinkVariantType } from './NavLink.props.js';
8
+ /**
9
+ * @fires dsgn-nav-link-toggle - Fired when the dropdown is toggled; `detail` is
10
+ * `{ open }`. The parent `dsgn-nav` listens for this to close sibling dropdowns.
11
+ * @slot - Link label.
12
+ * @slot dropdown - Dropdown content.
13
+ */
14
+ export declare class NavLink extends Base {
15
+ static styles: CSSResultGroup;
16
+ /**
17
+ * Surface theme variant (light or dark). Defaults to `dark` — the nav this
18
+ * link lives in is dark by default.
19
+ */
20
+ surface: SurfaceType;
21
+ /**
22
+ * Visual variant: a quiet wayfinding `link` (default), the primary pill CTA
23
+ * (`action`, transparent fill), or the secondary pill CTA
24
+ * (`action-secondary`, filled surface). The two CTA variants are designed to
25
+ * sit side by side in the nav's `actions` slot.
26
+ */
27
+ variant: NavLinkVariantType;
28
+ /**
29
+ * Hover treatment for the `action-secondary` CTA. Ignored by every other
30
+ * variant. All four share one rest state and differ only on hover: a soft
31
+ * accent `ring`, a one-pass border `shimmer`, a directional `nudge` of the
32
+ * label and a trailing arrow, or a `deepen` of the fill.
33
+ */
34
+ secondaryHover: NavLinkSecondaryHoverType;
35
+ /**
36
+ * Destination URL for the link
37
+ */
38
+ href: string;
39
+ /**
40
+ * Target for the link
41
+ */
42
+ target: NavLinkTargetType;
43
+ /**
44
+ * Relationship between the current page and the linked page.
45
+ * Defaults to a safe value for links opened in a new tab.
46
+ */
47
+ rel: string;
48
+ /**
49
+ * Optional supporting copy shown beneath the link label.
50
+ */
51
+ subheading: string;
52
+ /**
53
+ * Accessible name for the disclosure trigger, used when no text is slotted
54
+ * into the link. Supplied by the CMS via the marketing template.
55
+ */
56
+ submenuLabel: string;
57
+ /**
58
+ * Label for the panel's link back to this link's own destination, shown when
59
+ * the dropdown does not already contain a link to it. Supplied by the CMS.
60
+ */
61
+ overviewLabel: string;
62
+ /**
63
+ * Number of explicitly slotted desktop dropdown column groups. Mobile always
64
+ * stacks those groups into one column.
65
+ */
66
+ dropdownColumns: NavLinkDropdownColumnsType;
67
+ /**
68
+ * Whether the dropdown is currently expanded. Reflected only while open.
69
+ */
70
+ expanded: boolean;
71
+ private hasDropdown;
72
+ /**
73
+ * Set when the panel was opened deliberately (a click on the disclosure)
74
+ * rather than by hovering. A pinned panel ignores pointer-leave, so it stays
75
+ * put until it is dismissed — by clicking again, Escape, a click outside, or
76
+ * another dropdown opening.
77
+ */
78
+ private pinned;
79
+ /**
80
+ * Set when the desktop dropdown is dismissed with Escape. Suppresses the
81
+ * focus-to-open behaviour while the trigger keeps focus, so the panel doesn't
82
+ * spring back open; cleared once focus leaves or the pointer re-enters.
83
+ */
84
+ private keyboardDismissed;
85
+ private readonly dropdownId;
86
+ /**
87
+ * Tracks the viewport so hover-to-open stays desktop-only. Below `sm` the
88
+ * layout swaps the desktop trigger for the mobile disclosure button, and touch
89
+ * taps synthesize `mouseenter` before `click` — ungated, the two fight each
90
+ * other and the tap opens then immediately re-closes the dropdown.
91
+ */
92
+ private breakpointController;
93
+ /**
94
+ * The shift is measured against the viewport, so a change in the room around
95
+ * the trigger invalidates it: an open panel would otherwise keep the offset
96
+ * the old width earned it and hang off whichever edge the new width put it
97
+ * over. Only subscribed while a panel is open. See the controller for the
98
+ * layout changes this does and does not see.
99
+ */
100
+ private layoutChangeController;
101
+ connectedCallback(): void;
102
+ /**
103
+ * Resolve the `rel` attribute. For `target="_blank"` links, always include
104
+ * `noopener`/`noreferrer` (merged with any author-provided tokens) so a
105
+ * new-tab nav link never exposes `window.opener`.
106
+ */
107
+ private get computedRel();
108
+ disconnectedCallback(): void;
109
+ updated(changedProperties: Map<string | number | symbol, unknown>): void;
110
+ private updateDropdownState;
111
+ private handleDropdownSlotChange;
112
+ private handleLabelSlotChange;
113
+ private get labelText();
114
+ private get hasDropdownDestination();
115
+ private get isDropdownItem();
116
+ private get shouldRenderOverview();
117
+ /**
118
+ * Toggles the *pin*, not the open state, so the first click always means
119
+ * "keep this open". A panel the pointer already opened would otherwise close
120
+ * on the click that was meant to hold it, then stay shut until the pointer
121
+ * left and came back.
122
+ */
123
+ /**
124
+ * The single place the panel opens or closes, so every path tells the nav
125
+ * about it. That matters for the hover and focus paths in particular: the nav
126
+ * closes siblings only on this event, and a sibling a click has pinned
127
+ * ignores pointer and focus leave, so without it two panels sit open at once.
128
+ */
129
+ private setExpanded;
130
+ private toggleDropdown;
131
+ private handleDocumentPointerDown;
132
+ private clearDropdownAlignment;
133
+ /**
134
+ * Width the dropdown panel renders at. A closed panel is `display: none`, so
135
+ * lay it out just long enough to read it — the browser cannot paint between
136
+ * the two writes below, so nothing flashes.
137
+ */
138
+ private measureDropdownWidth;
139
+ /**
140
+ * Horizontal shift for the panel, measured from the left-aligned position
141
+ * under its trigger. Hanging right of the trigger is the default; if that
142
+ * would spill past the viewport, the panel flips to hang left instead, with
143
+ * its right edge on the trigger's. Only when *that* would leave the viewport
144
+ * too — a panel wider than the room on either side of its trigger — does it
145
+ * give up the anchor and sit on the gutter, where its fluid width has already
146
+ * shrunk it to fit.
147
+ */
148
+ private dropdownShift;
149
+ /**
150
+ * Panels are positioned against their own trigger and the viewport, not
151
+ * against the nav, so every column count uses the same rule.
152
+ */
153
+ private updateDropdownAlignment;
154
+ /**
155
+ * Hover-to-open applies only where the desktop trigger is rendered (>= sm)
156
+ * and only on a device that really hovers.
157
+ */
158
+ private get hoverOpensDropdown();
159
+ private handlePointerEnter;
160
+ private handlePointerLeave;
161
+ private handleFocusIn;
162
+ private handleFocusOut;
163
+ private handleKeydown;
164
+ /**
165
+ * Collapse the mobile dropdown. Used by the containing nav when another
166
+ * disclosure opens or when the mobile menu closes.
167
+ */
168
+ closeDropdown(): void;
169
+ /**
170
+ * Whether this is the secondary CTA using the `nudge` hover treatment, which
171
+ * is the only one that needs extra markup: the label has to be a box that can
172
+ * be translated, and it gains a trailing arrow to move against.
173
+ */
174
+ private get isNudgingSecondary();
175
+ /** The label and any supporting copy, shared by both trigger shapes. */
176
+ private renderLabel;
177
+ /**
178
+ * A link that owns a dropdown is a disclosure button, not a link: activating
179
+ * it opens the panel rather than navigating, and announcing it as a link
180
+ * would promise a navigation that never happens. Its own destination stays
181
+ * reachable through the panel's overview link.
182
+ */
183
+ private renderDisclosureTrigger;
184
+ private renderLinkTrigger;
185
+ render(): import("lit").TemplateResult<1>;
186
+ }
187
+ declare global {
188
+ interface HTMLElementTagNameMap {
189
+ 'dsgn-nav-link': NavLink;
190
+ }
191
+ }