@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,476 @@
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
+ // components/FormBlock/src/FormBlock.ts
13
+ import"../../Button/src/Button.js";
14
+ import"../../Input/src/Input.js";
15
+ import { css as css3, html as html2, nothing } from "lit";
16
+ import { property, state } from "lit/decorators.js";
17
+
18
+ // common/Base/Base.ts
19
+ import { html, LitElement } from "lit";
20
+
21
+ // common/helpers/define-element.ts
22
+ var defineElement = (tag, ctor) => {
23
+ if (typeof customElements === "undefined")
24
+ return;
25
+ if (!customElements.get(tag))
26
+ customElements.define(tag, ctor);
27
+ };
28
+
29
+ // common/Base/Base.css
30
+ import { css } from "lit";
31
+ var styles = css`/* Base reset in @layer base ensures it comes before utilities in Tailwind v4 cascade
32
+ This prevents the reset from overriding component utility classes */
33
+ @layer base {
34
+ :host {
35
+ display: block;
36
+ box-sizing: border-box;
37
+ line-height: 1.5;
38
+ -webkit-text-size-adjust: 100%;
39
+ tab-size: 4;
40
+ font-family: var(
41
+ --default-font-family,
42
+ var(--font-sans, ui-sans-serif, system-ui, sans-serif)
43
+ );
44
+ }
45
+
46
+ *,
47
+ *::before,
48
+ *::after {
49
+ box-sizing: inherit;
50
+ margin: 0;
51
+ padding: 0;
52
+ border: 0 solid;
53
+ }
54
+
55
+ :host h1,
56
+ :host h2,
57
+ :host h3,
58
+ :host h4,
59
+ :host h5,
60
+ :host h6 {
61
+ font-size: inherit;
62
+ font-weight: inherit;
63
+ margin: 0;
64
+ padding: 0;
65
+ }
66
+ }
67
+ `;
68
+ var Base_default = styles;
69
+
70
+ // common/Base/Base.ts
71
+ class Base extends LitElement {
72
+ static styles = Base_default;
73
+ updateTheme(changedProperties, surface) {
74
+ if (changedProperties.has("surface")) {
75
+ if (surface) {
76
+ this.setAttribute("data-theme", surface);
77
+ } else {
78
+ this.removeAttribute("data-theme");
79
+ }
80
+ }
81
+ }
82
+ emit(name, detail, options = {}) {
83
+ return this.dispatchEvent(new CustomEvent(name, {
84
+ detail,
85
+ bubbles: true,
86
+ composed: true,
87
+ cancelable: options.cancelable ?? false
88
+ }));
89
+ }
90
+ render() {
91
+ return html`<slot></slot>`;
92
+ }
93
+ }
94
+ defineElement("dsgn-base", Base);
95
+
96
+ // common/helpers/enum-validator.ts
97
+ var enumValidator = (propName, enumSet, candidateValue) => {
98
+ if (!enumSet.has(candidateValue)) {
99
+ throw new Error(`Invalid prop ${propName} of value ${candidateValue}. Expected one of: ${Array.from(enumSet).join(", ")}`);
100
+ }
101
+ };
102
+
103
+ // common/helpers/enum-creator.ts
104
+ var enumCreator = (acceptableValues, propName, type, other = {}) => {
105
+ const acceptableValuesSet = new Set(acceptableValues);
106
+ return {
107
+ type,
108
+ hasChanged(newValue, oldValue) {
109
+ if (newValue !== oldValue) {
110
+ enumValidator(propName, acceptableValuesSet, newValue);
111
+ return true;
112
+ }
113
+ return false;
114
+ },
115
+ ...other
116
+ };
117
+ };
118
+
119
+ // common/props/surface/surface.props.ts
120
+ var surfaceValues = {
121
+ LIGHT: "light",
122
+ DARK: "dark"
123
+ };
124
+ var surfaceProps = enumCreator(Object.values(surfaceValues), "surface", String, { reflect: true });
125
+
126
+ // components/FormBlock/src/FormBlock.css
127
+ import { css as css2 } from "lit";
128
+ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
129
+ @layer properties;
130
+ @layer theme {
131
+ :root, :host {
132
+ --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
133
+ monospace;
134
+ --spacing: 0.25rem;
135
+ --text-xs: 0.75rem;
136
+ --text-xs--line-height: calc(1 / 0.75);
137
+ --font-weight-normal: 400;
138
+ --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
139
+ --default-transition-duration: 150ms;
140
+ --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
141
+ --color-success: inherit;
142
+ --color-text-tertiary: inherit;
143
+ }
144
+ }
145
+ @layer utilities {
146
+ .pointer-events-none {
147
+ pointer-events: none;
148
+ }
149
+ .static {
150
+ position: static;
151
+ }
152
+ .flex {
153
+ display: flex;
154
+ }
155
+ .w-full {
156
+ width: 100%;
157
+ }
158
+ .translate-y-5 {
159
+ --tw-translate-y: calc(var(--spacing) * 5);
160
+ translate: var(--tw-translate-x) var(--tw-translate-y);
161
+ }
162
+ .transform {
163
+ transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
164
+ }
165
+ .flex-col {
166
+ flex-direction: column;
167
+ }
168
+ .items-center {
169
+ align-items: center;
170
+ }
171
+ .gap-2 {
172
+ gap: calc(var(--spacing) * 2);
173
+ }
174
+ .gap-4 {
175
+ gap: calc(var(--spacing) * 4);
176
+ }
177
+ .text-center {
178
+ text-align: center;
179
+ }
180
+ .font-mono {
181
+ font-family: var(--font-mono);
182
+ }
183
+ .text-xs {
184
+ font-size: var(--text-xs);
185
+ line-height: var(--tw-leading, var(--text-xs--line-height));
186
+ }
187
+ .leading-\\[1\\.65\\] {
188
+ --tw-leading: 1.65;
189
+ line-height: 1.65;
190
+ }
191
+ .font-normal {
192
+ --tw-font-weight: var(--font-weight-normal);
193
+ font-weight: var(--font-weight-normal);
194
+ }
195
+ .tracking-\\[0\\.12px\\] {
196
+ --tw-tracking: 0.12px;
197
+ letter-spacing: 0.12px;
198
+ }
199
+ .text-success {
200
+ color: var(--color-success);
201
+ }
202
+ .text-text-tertiary {
203
+ color: var(--color-text-tertiary);
204
+ }
205
+ .opacity-0 {
206
+ opacity: 0%;
207
+ }
208
+ .transition-\\[opacity\\,transform\\] {
209
+ transition-property: opacity,transform;
210
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
211
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
212
+ }
213
+ .duration-300 {
214
+ --tw-duration: 300ms;
215
+ transition-duration: 300ms;
216
+ }
217
+ .ease-in-out {
218
+ --tw-ease: var(--ease-in-out);
219
+ transition-timing-function: var(--ease-in-out);
220
+ }
221
+ .sm\\:flex-row {
222
+ @media (width >= 40rem) {
223
+ flex-direction: row;
224
+ }
225
+ }
226
+ .sm\\:items-start {
227
+ @media (width >= 40rem) {
228
+ align-items: flex-start;
229
+ }
230
+ }
231
+ .sm\\:justify-center {
232
+ @media (width >= 40rem) {
233
+ justify-content: center;
234
+ }
235
+ }
236
+ .md\\:max-w-56 {
237
+ @media (width >= 48rem) {
238
+ max-width: calc(var(--spacing) * 56);
239
+ }
240
+ }
241
+ .lg\\:max-w-64 {
242
+ @media (width >= 64rem) {
243
+ max-width: calc(var(--spacing) * 64);
244
+ }
245
+ }
246
+ .xl\\:max-w-72 {
247
+ @media (width >= 80rem) {
248
+ max-width: calc(var(--spacing) * 72);
249
+ }
250
+ }
251
+ .\\32 xl\\:max-w-80 {
252
+ @media (width >= 96rem) {
253
+ max-width: calc(var(--spacing) * 80);
254
+ }
255
+ }
256
+ }
257
+ @property --dsgn-border-sweep-angle {
258
+ syntax: '<angle>';
259
+ inherits: false;
260
+ initial-value: 0deg;
261
+ }
262
+ @property --tw-translate-x {
263
+ syntax: "*";
264
+ inherits: false;
265
+ initial-value: 0;
266
+ }
267
+ @property --tw-translate-y {
268
+ syntax: "*";
269
+ inherits: false;
270
+ initial-value: 0;
271
+ }
272
+ @property --tw-translate-z {
273
+ syntax: "*";
274
+ inherits: false;
275
+ initial-value: 0;
276
+ }
277
+ @property --tw-rotate-x {
278
+ syntax: "*";
279
+ inherits: false;
280
+ }
281
+ @property --tw-rotate-y {
282
+ syntax: "*";
283
+ inherits: false;
284
+ }
285
+ @property --tw-rotate-z {
286
+ syntax: "*";
287
+ inherits: false;
288
+ }
289
+ @property --tw-skew-x {
290
+ syntax: "*";
291
+ inherits: false;
292
+ }
293
+ @property --tw-skew-y {
294
+ syntax: "*";
295
+ inherits: false;
296
+ }
297
+ @property --tw-leading {
298
+ syntax: "*";
299
+ inherits: false;
300
+ }
301
+ @property --tw-font-weight {
302
+ syntax: "*";
303
+ inherits: false;
304
+ }
305
+ @property --tw-tracking {
306
+ syntax: "*";
307
+ inherits: false;
308
+ }
309
+ @property --tw-duration {
310
+ syntax: "*";
311
+ inherits: false;
312
+ }
313
+ @property --tw-ease {
314
+ syntax: "*";
315
+ inherits: false;
316
+ }
317
+ @layer properties {
318
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
319
+ *, ::before, ::after, ::backdrop {
320
+ --tw-translate-x: 0;
321
+ --tw-translate-y: 0;
322
+ --tw-translate-z: 0;
323
+ --tw-rotate-x: initial;
324
+ --tw-rotate-y: initial;
325
+ --tw-rotate-z: initial;
326
+ --tw-skew-x: initial;
327
+ --tw-skew-y: initial;
328
+ --tw-leading: initial;
329
+ --tw-font-weight: initial;
330
+ --tw-tracking: initial;
331
+ --tw-duration: initial;
332
+ --tw-ease: initial;
333
+ --dsgn-border-sweep-angle: 0deg;
334
+ }
335
+ }
336
+ }
337
+ `;
338
+ var FormBlock_default = styles2;
339
+
340
+ // components/FormBlock/src/FormBlock.props.ts
341
+ var formBlockAlignmentValues = {
342
+ START: "start",
343
+ CENTER: "center"
344
+ };
345
+
346
+ // ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
347
+ function r(e) {
348
+ var t, f, n = "";
349
+ if (typeof e == "string" || typeof e == "number")
350
+ n += e;
351
+ else if (typeof e == "object")
352
+ if (Array.isArray(e)) {
353
+ var o = e.length;
354
+ for (t = 0;t < o; t++)
355
+ e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
356
+ } else
357
+ for (f in e)
358
+ e[f] && (n && (n += " "), n += f);
359
+ return n;
360
+ }
361
+ function clsx() {
362
+ for (var e, t, f = 0, n = "", o = arguments.length;f < o; f++)
363
+ (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
364
+ return n;
365
+ }
366
+ var clsx_default = clsx;
367
+
368
+ // components/FormBlock/src/FormBlock.styles.ts
369
+ var formGroupClassNames = () => clsx_default("flex", "flex-col", "gap-2");
370
+ var formRowClassNames = (fading, alignment) => clsx_default("flex", "flex-col", "gap-4", "sm:flex-row", "sm:items-start", "transition-[opacity,transform]", "duration-300", "ease-in-out", alignment === "center" && ["items-center", "sm:justify-center"], fading && ["opacity-0", "translate-y-5", "pointer-events-none"]);
371
+ var inputWrapperClassNames = () => clsx_default("w-full", "md:max-w-56", "lg:max-w-64", "xl:max-w-72", "2xl:max-w-80");
372
+ var noteClassNames = (alignment) => clsx_default("font-mono", "text-xs", "font-normal", "text-text-tertiary", "leading-[1.65]", "tracking-[0.12px]", alignment === "center" && "text-center");
373
+ var successRowClassNames = (alignment) => clsx_default("success-row", "text-success", alignment === "center" && "text-center");
374
+
375
+ // components/FormBlock/src/FormBlock.ts
376
+ class FormBlock extends Base {
377
+ constructor() {
378
+ super(...arguments);
379
+ this.surface = surfaceValues.LIGHT;
380
+ this.alignment = formBlockAlignmentValues.START;
381
+ this.success = false;
382
+ this._fading = false;
383
+ this._showSuccess = false;
384
+ this._onFormSuccess = () => {
385
+ this.success = true;
386
+ };
387
+ }
388
+ static styles = [
389
+ Base.styles,
390
+ FormBlock_default,
391
+ css3`
392
+ .success-row {
393
+ animation: form-fade-in-up 0.35s ease both;
394
+ }
395
+ @keyframes form-fade-in-up {
396
+ from {
397
+ opacity: 0;
398
+ transform: translateY(20px);
399
+ }
400
+ to {
401
+ opacity: 1;
402
+ transform: translateY(0);
403
+ }
404
+ }
405
+ `
406
+ ];
407
+ get _note() {
408
+ return this.querySelector('[slot="note"]');
409
+ }
410
+ get _successSlot() {
411
+ return this.querySelector('[slot="success"]');
412
+ }
413
+ connectedCallback() {
414
+ super.connectedCallback();
415
+ this.addEventListener("dsgn-form-success", this._onFormSuccess);
416
+ }
417
+ disconnectedCallback() {
418
+ super.disconnectedCallback();
419
+ this.removeEventListener("dsgn-form-success", this._onFormSuccess);
420
+ }
421
+ updated(changedProperties) {
422
+ super.updated(changedProperties);
423
+ this.updateTheme(changedProperties, this.surface);
424
+ if (!changedProperties.has("success"))
425
+ return;
426
+ if (this.success && !this._showSuccess) {
427
+ this._fading = true;
428
+ setTimeout(() => {
429
+ this._fading = false;
430
+ this._showSuccess = true;
431
+ }, 300);
432
+ } else if (!this.success) {
433
+ this._fading = false;
434
+ this._showSuccess = false;
435
+ }
436
+ }
437
+ render() {
438
+ return html2`
439
+ <div class="${formGroupClassNames()}">
440
+ ${!this._showSuccess ? html2`
441
+ <div class="${formRowClassNames(this._fading, this.alignment)}">
442
+ <div class="${inputWrapperClassNames()}">
443
+ <slot name="input"></slot>
444
+ </div>
445
+ <slot name="button"></slot>
446
+ </div>
447
+ ${this._note ? html2`<div class="${noteClassNames(this.alignment)}">
448
+ <slot name="note"></slot>
449
+ </div>` : nothing}
450
+ ` : nothing}
451
+ ${this._showSuccess && this._successSlot ? html2`<div class="${successRowClassNames(this.alignment)}">
452
+ <slot name="success"></slot>
453
+ </div>` : nothing}
454
+ </div>
455
+ `;
456
+ }
457
+ }
458
+ __legacyDecorateClassTS([
459
+ property({ ...surfaceProps })
460
+ ], FormBlock.prototype, "surface", undefined);
461
+ __legacyDecorateClassTS([
462
+ property({ type: String, reflect: true })
463
+ ], FormBlock.prototype, "alignment", undefined);
464
+ __legacyDecorateClassTS([
465
+ property({ type: Boolean, reflect: true })
466
+ ], FormBlock.prototype, "success", undefined);
467
+ __legacyDecorateClassTS([
468
+ state()
469
+ ], FormBlock.prototype, "_fading", undefined);
470
+ __legacyDecorateClassTS([
471
+ state()
472
+ ], FormBlock.prototype, "_showSuccess", undefined);
473
+ defineElement("dsgn-form-block", FormBlock);
474
+ export {
475
+ FormBlock
476
+ };
@@ -0,0 +1,5 @@
1
+ export declare const formBlockAlignmentValues: {
2
+ readonly START: "start";
3
+ readonly CENTER: "center";
4
+ };
5
+ export type FormBlockAlignmentType = (typeof formBlockAlignmentValues)[keyof typeof formBlockAlignmentValues];
@@ -0,0 +1,8 @@
1
+ // components/FormBlock/src/FormBlock.props.ts
2
+ var formBlockAlignmentValues = {
3
+ START: "start",
4
+ CENTER: "center"
5
+ };
6
+ export {
7
+ formBlockAlignmentValues
8
+ };
@@ -0,0 +1,6 @@
1
+ import type { FormBlockAlignmentType } from './FormBlock.props.js';
2
+ export declare const formGroupClassNames: () => string;
3
+ export declare const formRowClassNames: (fading: boolean, alignment: FormBlockAlignmentType) => string;
4
+ export declare const inputWrapperClassNames: () => string;
5
+ export declare const noteClassNames: (alignment: FormBlockAlignmentType) => string;
6
+ export declare const successRowClassNames: (alignment: FormBlockAlignmentType) => string;
@@ -0,0 +1,35 @@
1
+ import '../../../types/global.d.ts';
2
+ import { type CSSResultGroup } from 'lit';
3
+ import { Base } from '../../../common/Base/Base.js';
4
+ import { type GridAlignType, type GridColsType, type GridGapType } from './Grid.props.js';
5
+ /**
6
+ * @slot col-1 - First grid column.
7
+ * @slot col-2 - Second grid column.
8
+ * @slot col-3 - Third grid column when the selected layout provides one.
9
+ * @slot col-4 - Fourth grid column when the selected layout provides one.
10
+ */
11
+ export declare class Grid extends Base {
12
+ static styles: CSSResultGroup;
13
+ /**
14
+ * Number of columns (all collapse to 1 on mobile, expand at lg)
15
+ */
16
+ cols: GridColsType;
17
+ /**
18
+ * Gap between grid cells
19
+ */
20
+ gap: GridGapType;
21
+ /**
22
+ * Cross-axis alignment of grid items
23
+ */
24
+ align: GridAlignType;
25
+ /**
26
+ * Reverses the visual column order at lg+ without changing DOM order
27
+ */
28
+ reverse: boolean;
29
+ render(): import("lit").TemplateResult<1>;
30
+ }
31
+ declare global {
32
+ interface HTMLElementTagNameMap {
33
+ 'dsgn-grid': Grid;
34
+ }
35
+ }