@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,755 @@
1
+ var __legacyDecorateClassTS = function(decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
4
+ r = Reflect.decorate(decorators, target, key, desc);
5
+ else
6
+ for (var i = decorators.length - 1;i >= 0; i--)
7
+ if (d = decorators[i])
8
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
10
+ };
11
+
12
+ // ../../node_modules/.bun/lit-html@3.3.3/node_modules/lit-html/development/is-server.js
13
+ var NODE_MODE = false;
14
+ var isServer = NODE_MODE;
15
+
16
+ // ../../node_modules/.bun/@lit-labs+observers@2.1.0/node_modules/@lit-labs/observers/development/intersection-controller.js
17
+ class IntersectionController {
18
+ constructor(host, { target, config, callback, skipInitial }) {
19
+ this._targets = new Set;
20
+ this._skipInitial = false;
21
+ this._unobservedUpdate = false;
22
+ this._host = host;
23
+ if (target !== null) {
24
+ this._targets.add(target ?? host);
25
+ }
26
+ this._skipInitial = skipInitial ?? this._skipInitial;
27
+ this.callback = callback;
28
+ if (isServer) {
29
+ return;
30
+ }
31
+ if (!window.IntersectionObserver) {
32
+ console.warn(`IntersectionController error: browser does not support IntersectionObserver.`);
33
+ return;
34
+ }
35
+ this._observer = new IntersectionObserver((entries) => {
36
+ const unobservedUpdate = this._unobservedUpdate;
37
+ this._unobservedUpdate = false;
38
+ if (this._skipInitial && unobservedUpdate) {
39
+ return;
40
+ }
41
+ this.handleChanges(entries);
42
+ this._host.requestUpdate();
43
+ }, config);
44
+ host.addController(this);
45
+ }
46
+ handleChanges(entries) {
47
+ this.value = this.callback?.(entries, this._observer);
48
+ }
49
+ hostConnected() {
50
+ for (const target of this._targets) {
51
+ this.observe(target);
52
+ }
53
+ }
54
+ hostDisconnected() {
55
+ this.disconnect();
56
+ }
57
+ async hostUpdated() {
58
+ const pendingRecords = this._observer.takeRecords();
59
+ if (pendingRecords.length) {
60
+ this.handleChanges(pendingRecords);
61
+ }
62
+ }
63
+ observe(target) {
64
+ this._targets.add(target);
65
+ this._observer.observe(target);
66
+ this._unobservedUpdate = true;
67
+ }
68
+ unobserve(target) {
69
+ this._targets.delete(target);
70
+ this._observer.unobserve(target);
71
+ }
72
+ disconnect() {
73
+ this._observer.disconnect();
74
+ }
75
+ }
76
+
77
+ // components/Heading/src/Heading.ts
78
+ import { html as html2 } from "lit";
79
+ import { property } from "lit/decorators.js";
80
+ import { choose } from "lit/directives/choose.js";
81
+
82
+ // common/Base/Base.ts
83
+ import { html, LitElement } from "lit";
84
+
85
+ // common/helpers/define-element.ts
86
+ var defineElement = (tag, ctor) => {
87
+ if (typeof customElements === "undefined")
88
+ return;
89
+ if (!customElements.get(tag))
90
+ customElements.define(tag, ctor);
91
+ };
92
+
93
+ // common/Base/Base.css
94
+ import { css } from "lit";
95
+ var styles = css`/* Base reset in @layer base ensures it comes before utilities in Tailwind v4 cascade
96
+ This prevents the reset from overriding component utility classes */
97
+ @layer base {
98
+ :host {
99
+ display: block;
100
+ box-sizing: border-box;
101
+ line-height: 1.5;
102
+ -webkit-text-size-adjust: 100%;
103
+ tab-size: 4;
104
+ font-family: var(
105
+ --default-font-family,
106
+ var(--font-sans, ui-sans-serif, system-ui, sans-serif)
107
+ );
108
+ }
109
+
110
+ *,
111
+ *::before,
112
+ *::after {
113
+ box-sizing: inherit;
114
+ margin: 0;
115
+ padding: 0;
116
+ border: 0 solid;
117
+ }
118
+
119
+ :host h1,
120
+ :host h2,
121
+ :host h3,
122
+ :host h4,
123
+ :host h5,
124
+ :host h6 {
125
+ font-size: inherit;
126
+ font-weight: inherit;
127
+ margin: 0;
128
+ padding: 0;
129
+ }
130
+ }
131
+ `;
132
+ var Base_default = styles;
133
+
134
+ // common/Base/Base.ts
135
+ class Base extends LitElement {
136
+ static styles = Base_default;
137
+ updateTheme(changedProperties, surface) {
138
+ if (changedProperties.has("surface")) {
139
+ if (surface) {
140
+ this.setAttribute("data-theme", surface);
141
+ } else {
142
+ this.removeAttribute("data-theme");
143
+ }
144
+ }
145
+ }
146
+ emit(name, detail, options = {}) {
147
+ return this.dispatchEvent(new CustomEvent(name, {
148
+ detail,
149
+ bubbles: true,
150
+ composed: true,
151
+ cancelable: options.cancelable ?? false
152
+ }));
153
+ }
154
+ render() {
155
+ return html`<slot></slot>`;
156
+ }
157
+ }
158
+ defineElement("dsgn-base", Base);
159
+
160
+ // common/helpers/motion.ts
161
+ var REDUCED_MOTION_QUERY = "(prefers-reduced-motion: reduce)";
162
+ var cachedMatchMedia;
163
+ var cachedQuery = null;
164
+ function prefersReducedMotion() {
165
+ const mm = typeof matchMedia === "function" ? matchMedia : undefined;
166
+ if (mm !== cachedMatchMedia) {
167
+ cachedMatchMedia = mm;
168
+ cachedQuery = mm ? mm(REDUCED_MOTION_QUERY) : null;
169
+ }
170
+ return cachedQuery?.matches ?? false;
171
+ }
172
+
173
+ // common/controllers/WordCycleController.ts
174
+ var DEFAULT_INTERVAL = 1000;
175
+
176
+ class WordCycleController {
177
+ constructor(host, words = [], interval = DEFAULT_INTERVAL, canRun = () => true) {
178
+ this._words = [];
179
+ this._interval = DEFAULT_INTERVAL;
180
+ this._currentIndex = 0;
181
+ this._timerId = null;
182
+ this._cycles = 1;
183
+ this._completedCycles = 0;
184
+ this._done = false;
185
+ this.host = host;
186
+ this._words = words;
187
+ this._interval = interval;
188
+ this._canRun = canRun;
189
+ host.addController(this);
190
+ }
191
+ hostDisconnected() {
192
+ this._stopCycling();
193
+ }
194
+ hostUpdated() {
195
+ this._reconcile();
196
+ }
197
+ get _allowed() {
198
+ return this._words.length > 1 && !this._done && !prefersReducedMotion() && this._canRun();
199
+ }
200
+ _reconcile() {
201
+ if (this._allowed && this._timerId === null) {
202
+ this._startCycling();
203
+ } else if (!this._allowed && this._timerId !== null) {
204
+ this._stopCycling();
205
+ }
206
+ }
207
+ _startCycling() {
208
+ this._timerId = setInterval(() => {
209
+ const nextIndex = (this._currentIndex + 1) % this._words.length;
210
+ if (nextIndex === 0) {
211
+ this._completedCycles++;
212
+ if (this._cycles > 0 && this._completedCycles >= this._cycles) {
213
+ this._done = true;
214
+ this._stopCycling();
215
+ this.host.requestUpdate();
216
+ return;
217
+ }
218
+ }
219
+ this._currentIndex = nextIndex;
220
+ this.host.requestUpdate();
221
+ }, this._interval);
222
+ }
223
+ _stopCycling() {
224
+ if (this._timerId !== null) {
225
+ clearInterval(this._timerId);
226
+ this._timerId = null;
227
+ }
228
+ }
229
+ _restart() {
230
+ this._stopCycling();
231
+ if (this._allowed) {
232
+ this._startCycling();
233
+ }
234
+ }
235
+ get currentWord() {
236
+ if (this._words.length === 0)
237
+ return;
238
+ return this._words[this._currentIndex];
239
+ }
240
+ get currentIndex() {
241
+ return this._currentIndex;
242
+ }
243
+ setWords(words) {
244
+ this._words = words;
245
+ this._currentIndex = 0;
246
+ this._completedCycles = 0;
247
+ this._done = false;
248
+ this._restart();
249
+ }
250
+ setInterval(ms) {
251
+ this._interval = ms;
252
+ this._completedCycles = 0;
253
+ this._done = false;
254
+ this._restart();
255
+ }
256
+ setCycles(cycles) {
257
+ this._cycles = cycles;
258
+ }
259
+ }
260
+
261
+ // common/helpers/enum-validator.ts
262
+ var enumValidator = (propName, enumSet, candidateValue) => {
263
+ if (!enumSet.has(candidateValue)) {
264
+ throw new Error(`Invalid prop ${propName} of value ${candidateValue}. Expected one of: ${Array.from(enumSet).join(", ")}`);
265
+ }
266
+ };
267
+
268
+ // common/helpers/enum-creator.ts
269
+ var enumCreator = (acceptableValues, propName, type, other = {}) => {
270
+ const acceptableValuesSet = new Set(acceptableValues);
271
+ return {
272
+ type,
273
+ hasChanged(newValue, oldValue) {
274
+ if (newValue !== oldValue) {
275
+ enumValidator(propName, acceptableValuesSet, newValue);
276
+ return true;
277
+ }
278
+ return false;
279
+ },
280
+ ...other
281
+ };
282
+ };
283
+
284
+ // common/props/surface/surface.props.ts
285
+ var surfaceValues = {
286
+ LIGHT: "light",
287
+ DARK: "dark"
288
+ };
289
+ var surfaceProps = enumCreator(Object.values(surfaceValues), "surface", String, { reflect: true });
290
+
291
+ // components/Heading/src/Heading.css
292
+ import { css as css2 } from "lit";
293
+ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
294
+ @layer properties;
295
+ @layer theme {
296
+ :root, :host {
297
+ --text-base: 1rem;
298
+ --text-base--line-height: calc(1.5 / 1);
299
+ --text-lg: 1.125rem;
300
+ --text-lg--line-height: calc(1.75 / 1.125);
301
+ --text-xl: 1.25rem;
302
+ --text-xl--line-height: calc(1.75 / 1.25);
303
+ --text-2xl: 1.5rem;
304
+ --text-2xl--line-height: calc(2 / 1.5);
305
+ --text-3xl: 1.875rem;
306
+ --text-3xl--line-height: calc(2.25 / 1.875);
307
+ --text-4xl: 2.25rem;
308
+ --text-4xl--line-height: calc(2.5 / 2.25);
309
+ --text-5xl: 3rem;
310
+ --text-5xl--line-height: 1;
311
+ --text-6xl: 3.75rem;
312
+ --text-6xl--line-height: 1;
313
+ --text-7xl: 4.5rem;
314
+ --text-7xl--line-height: 1;
315
+ --text-8xl: 6rem;
316
+ --text-8xl--line-height: 1;
317
+ --text-9xl: 8rem;
318
+ --text-9xl--line-height: 1;
319
+ --font-weight-normal: 400;
320
+ --font-weight-semibold: 600;
321
+ --font-weight-bold: 700;
322
+ --font-weight-extrabold: 800;
323
+ --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
324
+ --color-accent-text: inherit;
325
+ --color-text-primary: inherit;
326
+ --animate-fade-in-a: fade-in-a 0.3s ease-in;
327
+ --animate-fade-in-b: fade-in-b 0.3s ease-in;
328
+ }
329
+ }
330
+ @layer utilities {
331
+ .static {
332
+ position: static;
333
+ }
334
+ .animate-fade-in-a {
335
+ animation: var(--animate-fade-in-a);
336
+ }
337
+ .animate-fade-in-b {
338
+ animation: var(--animate-fade-in-b);
339
+ }
340
+ .font-display {
341
+ font-family: var(--font-display);
342
+ }
343
+ .text-2xl {
344
+ font-size: var(--text-2xl);
345
+ line-height: var(--tw-leading, var(--text-2xl--line-height));
346
+ }
347
+ .text-3xl {
348
+ font-size: var(--text-3xl);
349
+ line-height: var(--tw-leading, var(--text-3xl--line-height));
350
+ }
351
+ .text-4xl {
352
+ font-size: var(--text-4xl);
353
+ line-height: var(--tw-leading, var(--text-4xl--line-height));
354
+ }
355
+ .text-5xl {
356
+ font-size: var(--text-5xl);
357
+ line-height: var(--tw-leading, var(--text-5xl--line-height));
358
+ }
359
+ .text-base {
360
+ font-size: var(--text-base);
361
+ line-height: var(--tw-leading, var(--text-base--line-height));
362
+ }
363
+ .text-lg {
364
+ font-size: var(--text-lg);
365
+ line-height: var(--tw-leading, var(--text-lg--line-height));
366
+ }
367
+ .text-xl {
368
+ font-size: var(--text-xl);
369
+ line-height: var(--tw-leading, var(--text-xl--line-height));
370
+ }
371
+ .font-bold {
372
+ --tw-font-weight: var(--font-weight-bold);
373
+ font-weight: var(--font-weight-bold);
374
+ }
375
+ .font-extrabold {
376
+ --tw-font-weight: var(--font-weight-extrabold);
377
+ font-weight: var(--font-weight-extrabold);
378
+ }
379
+ .font-normal {
380
+ --tw-font-weight: var(--font-weight-normal);
381
+ font-weight: var(--font-weight-normal);
382
+ }
383
+ .font-semibold {
384
+ --tw-font-weight: var(--font-weight-semibold);
385
+ font-weight: var(--font-weight-semibold);
386
+ }
387
+ .text-accent-text {
388
+ color: var(--color-accent-text);
389
+ }
390
+ .text-text-primary {
391
+ color: var(--color-text-primary);
392
+ }
393
+ .sm\\:text-2xl {
394
+ @media (width >= 40rem) {
395
+ font-size: var(--text-2xl);
396
+ line-height: var(--tw-leading, var(--text-2xl--line-height));
397
+ }
398
+ }
399
+ .sm\\:text-3xl {
400
+ @media (width >= 40rem) {
401
+ font-size: var(--text-3xl);
402
+ line-height: var(--tw-leading, var(--text-3xl--line-height));
403
+ }
404
+ }
405
+ .sm\\:text-4xl {
406
+ @media (width >= 40rem) {
407
+ font-size: var(--text-4xl);
408
+ line-height: var(--tw-leading, var(--text-4xl--line-height));
409
+ }
410
+ }
411
+ .sm\\:text-5xl {
412
+ @media (width >= 40rem) {
413
+ font-size: var(--text-5xl);
414
+ line-height: var(--tw-leading, var(--text-5xl--line-height));
415
+ }
416
+ }
417
+ .sm\\:text-lg {
418
+ @media (width >= 40rem) {
419
+ font-size: var(--text-lg);
420
+ line-height: var(--tw-leading, var(--text-lg--line-height));
421
+ }
422
+ }
423
+ .sm\\:text-xl {
424
+ @media (width >= 40rem) {
425
+ font-size: var(--text-xl);
426
+ line-height: var(--tw-leading, var(--text-xl--line-height));
427
+ }
428
+ }
429
+ .md\\:text-2xl {
430
+ @media (width >= 48rem) {
431
+ font-size: var(--text-2xl);
432
+ line-height: var(--tw-leading, var(--text-2xl--line-height));
433
+ }
434
+ }
435
+ .md\\:text-3xl {
436
+ @media (width >= 48rem) {
437
+ font-size: var(--text-3xl);
438
+ line-height: var(--tw-leading, var(--text-3xl--line-height));
439
+ }
440
+ }
441
+ .md\\:text-4xl {
442
+ @media (width >= 48rem) {
443
+ font-size: var(--text-4xl);
444
+ line-height: var(--tw-leading, var(--text-4xl--line-height));
445
+ }
446
+ }
447
+ .md\\:text-5xl {
448
+ @media (width >= 48rem) {
449
+ font-size: var(--text-5xl);
450
+ line-height: var(--tw-leading, var(--text-5xl--line-height));
451
+ }
452
+ }
453
+ .md\\:text-6xl {
454
+ @media (width >= 48rem) {
455
+ font-size: var(--text-6xl);
456
+ line-height: var(--tw-leading, var(--text-6xl--line-height));
457
+ }
458
+ }
459
+ .md\\:text-xl {
460
+ @media (width >= 48rem) {
461
+ font-size: var(--text-xl);
462
+ line-height: var(--tw-leading, var(--text-xl--line-height));
463
+ }
464
+ }
465
+ .lg\\:text-2xl {
466
+ @media (width >= 64rem) {
467
+ font-size: var(--text-2xl);
468
+ line-height: var(--tw-leading, var(--text-2xl--line-height));
469
+ }
470
+ }
471
+ .lg\\:text-3xl {
472
+ @media (width >= 64rem) {
473
+ font-size: var(--text-3xl);
474
+ line-height: var(--tw-leading, var(--text-3xl--line-height));
475
+ }
476
+ }
477
+ .lg\\:text-4xl {
478
+ @media (width >= 64rem) {
479
+ font-size: var(--text-4xl);
480
+ line-height: var(--tw-leading, var(--text-4xl--line-height));
481
+ }
482
+ }
483
+ .lg\\:text-5xl {
484
+ @media (width >= 64rem) {
485
+ font-size: var(--text-5xl);
486
+ line-height: var(--tw-leading, var(--text-5xl--line-height));
487
+ }
488
+ }
489
+ .lg\\:text-6xl {
490
+ @media (width >= 64rem) {
491
+ font-size: var(--text-6xl);
492
+ line-height: var(--tw-leading, var(--text-6xl--line-height));
493
+ }
494
+ }
495
+ .lg\\:text-7xl {
496
+ @media (width >= 64rem) {
497
+ font-size: var(--text-7xl);
498
+ line-height: var(--tw-leading, var(--text-7xl--line-height));
499
+ }
500
+ }
501
+ .xl\\:text-3xl {
502
+ @media (width >= 80rem) {
503
+ font-size: var(--text-3xl);
504
+ line-height: var(--tw-leading, var(--text-3xl--line-height));
505
+ }
506
+ }
507
+ .xl\\:text-4xl {
508
+ @media (width >= 80rem) {
509
+ font-size: var(--text-4xl);
510
+ line-height: var(--tw-leading, var(--text-4xl--line-height));
511
+ }
512
+ }
513
+ .xl\\:text-5xl {
514
+ @media (width >= 80rem) {
515
+ font-size: var(--text-5xl);
516
+ line-height: var(--tw-leading, var(--text-5xl--line-height));
517
+ }
518
+ }
519
+ .xl\\:text-6xl {
520
+ @media (width >= 80rem) {
521
+ font-size: var(--text-6xl);
522
+ line-height: var(--tw-leading, var(--text-6xl--line-height));
523
+ }
524
+ }
525
+ .xl\\:text-7xl {
526
+ @media (width >= 80rem) {
527
+ font-size: var(--text-7xl);
528
+ line-height: var(--tw-leading, var(--text-7xl--line-height));
529
+ }
530
+ }
531
+ .xl\\:text-8xl {
532
+ @media (width >= 80rem) {
533
+ font-size: var(--text-8xl);
534
+ line-height: var(--tw-leading, var(--text-8xl--line-height));
535
+ }
536
+ }
537
+ .\\32 xl\\:text-4xl {
538
+ @media (width >= 96rem) {
539
+ font-size: var(--text-4xl);
540
+ line-height: var(--tw-leading, var(--text-4xl--line-height));
541
+ }
542
+ }
543
+ .\\32 xl\\:text-5xl {
544
+ @media (width >= 96rem) {
545
+ font-size: var(--text-5xl);
546
+ line-height: var(--tw-leading, var(--text-5xl--line-height));
547
+ }
548
+ }
549
+ .\\32 xl\\:text-6xl {
550
+ @media (width >= 96rem) {
551
+ font-size: var(--text-6xl);
552
+ line-height: var(--tw-leading, var(--text-6xl--line-height));
553
+ }
554
+ }
555
+ .\\32 xl\\:text-7xl {
556
+ @media (width >= 96rem) {
557
+ font-size: var(--text-7xl);
558
+ line-height: var(--tw-leading, var(--text-7xl--line-height));
559
+ }
560
+ }
561
+ .\\32 xl\\:text-8xl {
562
+ @media (width >= 96rem) {
563
+ font-size: var(--text-8xl);
564
+ line-height: var(--tw-leading, var(--text-8xl--line-height));
565
+ }
566
+ }
567
+ .\\32 xl\\:text-9xl {
568
+ @media (width >= 96rem) {
569
+ font-size: var(--text-9xl);
570
+ line-height: var(--tw-leading, var(--text-9xl--line-height));
571
+ }
572
+ }
573
+ }
574
+ @property --dsgn-border-sweep-angle {
575
+ syntax: '<angle>';
576
+ inherits: false;
577
+ initial-value: 0deg;
578
+ }
579
+ @property --tw-font-weight {
580
+ syntax: "*";
581
+ inherits: false;
582
+ }
583
+ @keyframes fade-in-a {
584
+ from {
585
+ opacity: 0;
586
+ }
587
+ to {
588
+ opacity: 1;
589
+ }
590
+ }
591
+ @keyframes fade-in-b {
592
+ from {
593
+ opacity: 0;
594
+ }
595
+ to {
596
+ opacity: 1;
597
+ }
598
+ }
599
+ @layer properties {
600
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
601
+ *, ::before, ::after, ::backdrop {
602
+ --tw-font-weight: initial;
603
+ --dsgn-border-sweep-angle: 0deg;
604
+ }
605
+ }
606
+ }
607
+ `;
608
+ var Heading_default = styles2;
609
+
610
+ // components/Heading/src/Heading.props.ts
611
+ var headingSizeValues = {
612
+ H1: "h1",
613
+ H2: "h2",
614
+ H3: "h3",
615
+ H4: "h4",
616
+ H5: "h5",
617
+ H6: "h6",
618
+ HERO: "hero"
619
+ };
620
+ var headingSizeProps = enumCreator(Object.values(headingSizeValues), "heading-size", String, { reflect: true, attribute: "heading-size" });
621
+ var headingWeightValues = {
622
+ NORMAL: "normal",
623
+ SEMIBOLD: "semibold",
624
+ BOLD: "bold",
625
+ EXTRABOLD: "extrabold"
626
+ };
627
+ var headingWeightProps = enumCreator(Object.values(headingWeightValues), "heading-weight", String, { reflect: true, attribute: "heading-weight" });
628
+
629
+ // ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
630
+ function r(e) {
631
+ var t, f, n = "";
632
+ if (typeof e == "string" || typeof e == "number")
633
+ n += e;
634
+ else if (typeof e == "object")
635
+ if (Array.isArray(e)) {
636
+ var o = e.length;
637
+ for (t = 0;t < o; t++)
638
+ e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
639
+ } else
640
+ for (f in e)
641
+ e[f] && (n && (n += " "), n += f);
642
+ return n;
643
+ }
644
+ function clsx() {
645
+ for (var e, t, f = 0, n = "", o = arguments.length;f < o; f++)
646
+ (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
647
+ return n;
648
+ }
649
+ var clsx_default = clsx;
650
+
651
+ // components/Heading/src/Heading.styles.ts
652
+ var classNames = (surface, size, weight) => {
653
+ return clsx_default({
654
+ "text-5xl md:text-6xl lg:text-7xl xl:text-8xl 2xl:text-9xl": size === "hero",
655
+ "text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl": size === "h1",
656
+ "text-3xl sm:text-4xl md:text-5xl lg:text-6xl xl:text-7xl 2xl:text-8xl": size === "h2",
657
+ "text-2xl sm:text-3xl md:text-4xl lg:text-5xl xl:text-6xl 2xl:text-7xl": size === "h3",
658
+ "text-xl sm:text-2xl md:text-3xl lg:text-4xl xl:text-5xl 2xl:text-6xl": size === "h4",
659
+ "text-lg sm:text-xl md:text-2xl lg:text-3xl xl:text-4xl 2xl:text-5xl": size === "h5",
660
+ "text-base sm:text-lg md:text-xl lg:text-2xl xl:text-3xl 2xl:text-4xl": size === "h6",
661
+ "font-normal": weight === "normal",
662
+ "font-semibold": weight === "semibold",
663
+ "font-bold": weight === "bold",
664
+ "font-extrabold": weight === "extrabold",
665
+ "font-display": true,
666
+ "text-text-primary": true
667
+ });
668
+ };
669
+ var animatedWordClassNames = (currentIndex) => {
670
+ return clsx_default("text-accent-text", currentIndex % 2 === 0 ? "animate-fade-in-a" : "animate-fade-in-b");
671
+ };
672
+
673
+ // components/Heading/src/Heading.ts
674
+ class Heading extends Base {
675
+ constructor() {
676
+ super(...arguments);
677
+ this._inView = new IntersectionController(this, {
678
+ config: { threshold: 0 },
679
+ callback: (entries) => entries[entries.length - 1]?.isIntersecting ?? false
680
+ });
681
+ this.wordCycleController = new WordCycleController(this, undefined, undefined, () => this._inView.value === true);
682
+ this.surface = surfaceValues.LIGHT;
683
+ this.headingSize = headingSizeValues.H1;
684
+ this.headingWeight = headingWeightValues.NORMAL;
685
+ this.wordCycles = 1;
686
+ }
687
+ static styles = [Base.styles, Heading_default];
688
+ willUpdate(changedProperties) {
689
+ super.willUpdate(changedProperties);
690
+ if (changedProperties.has("words")) {
691
+ this.wordCycleController.setWords(this.words ?? []);
692
+ }
693
+ if (changedProperties.has("wordInterval") && this.wordInterval !== undefined) {
694
+ this.wordCycleController.setInterval(this.wordInterval);
695
+ }
696
+ if (changedProperties.has("wordCycles")) {
697
+ this.wordCycleController.setCycles(this.wordCycles);
698
+ }
699
+ }
700
+ updated(changedProperties) {
701
+ super.updated(changedProperties);
702
+ this.updateTheme(changedProperties, this.surface);
703
+ }
704
+ renderContent() {
705
+ const word = this.wordCycleController.currentWord;
706
+ if (word) {
707
+ return html2`<slot></slot>
708
+ <span
709
+ class="${animatedWordClassNames(this.wordCycleController.currentIndex)}"
710
+ >${word}</span
711
+ >`;
712
+ }
713
+ return html2`<slot></slot>`;
714
+ }
715
+ render() {
716
+ const content = this.renderContent();
717
+ return html2`
718
+ <div
719
+ class="${classNames(this.surface, this.headingSize, this.headingWeight)}"
720
+ >
721
+ ${choose(this.headingSize, [
722
+ ["h1", () => html2`<h1>${content}</h1>`],
723
+ ["h2", () => html2`<h2>${content}</h2>`],
724
+ ["h3", () => html2`<h3>${content}</h3>`],
725
+ ["h4", () => html2`<h4>${content}</h4>`],
726
+ ["h5", () => html2`<h5>${content}</h5>`],
727
+ ["h6", () => html2`<h6>${content}</h6>`],
728
+ ["hero", () => html2`<h1>${content}</h1>`]
729
+ ], () => html2`<h1>${content}</h1>`)}
730
+ </div>
731
+ `;
732
+ }
733
+ }
734
+ __legacyDecorateClassTS([
735
+ property({ ...surfaceProps })
736
+ ], Heading.prototype, "surface", undefined);
737
+ __legacyDecorateClassTS([
738
+ property({ ...headingSizeProps })
739
+ ], Heading.prototype, "headingSize", undefined);
740
+ __legacyDecorateClassTS([
741
+ property({ ...headingWeightProps })
742
+ ], Heading.prototype, "headingWeight", undefined);
743
+ __legacyDecorateClassTS([
744
+ property({ type: Array })
745
+ ], Heading.prototype, "words", undefined);
746
+ __legacyDecorateClassTS([
747
+ property({ type: Number, attribute: "word-interval" })
748
+ ], Heading.prototype, "wordInterval", undefined);
749
+ __legacyDecorateClassTS([
750
+ property({ type: Number, attribute: "word-cycles" })
751
+ ], Heading.prototype, "wordCycles", undefined);
752
+ defineElement("dsgn-heading", Heading);
753
+ export {
754
+ Heading
755
+ };