@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,34 @@
1
+ // common/helpers/enum-validator.ts
2
+ var enumValidator = (propName, enumSet, candidateValue) => {
3
+ if (!enumSet.has(candidateValue)) {
4
+ throw new Error(`Invalid prop ${propName} of value ${candidateValue}. Expected one of: ${Array.from(enumSet).join(", ")}`);
5
+ }
6
+ };
7
+
8
+ // common/helpers/enum-creator.ts
9
+ var enumCreator = (acceptableValues, propName, type, other = {}) => {
10
+ const acceptableValuesSet = new Set(acceptableValues);
11
+ return {
12
+ type,
13
+ hasChanged(newValue, oldValue) {
14
+ if (newValue !== oldValue) {
15
+ enumValidator(propName, acceptableValuesSet, newValue);
16
+ return true;
17
+ }
18
+ return false;
19
+ },
20
+ ...other
21
+ };
22
+ };
23
+
24
+ // components/Divider/src/Divider.props.ts
25
+ var dividerSpacingValues = {
26
+ SM: "sm",
27
+ MD: "md",
28
+ LG: "lg"
29
+ };
30
+ var dividerSpacingProps = enumCreator(Object.values(dividerSpacingValues), "spacing", String, { reflect: true });
31
+ export {
32
+ dividerSpacingProps,
33
+ dividerSpacingValues
34
+ };
@@ -0,0 +1,2 @@
1
+ import { type DividerSpacingType } from './Divider.props.js';
2
+ export declare const classNames: (spacing: DividerSpacingType) => string;
@@ -0,0 +1,30 @@
1
+ import '../../../types/global.d.ts';
2
+ import '../../Icon/src/Icon.js';
3
+ import { type CSSResultGroup, type SVGTemplateResult } from 'lit';
4
+ import { Base } from '../../../common/Base/Base.js';
5
+ import { type SurfaceType } from '../../../common/props/surface/surface.props.js';
6
+ import { type FeatureItemVariantType } from './FeatureItem.props.js';
7
+ /** @slot - Feature label. */
8
+ export declare class FeatureItem extends Base {
9
+ static styles: CSSResultGroup;
10
+ /**
11
+ * Surface theme — controls background and text colour
12
+ */
13
+ surface: SurfaceType;
14
+ /**
15
+ * Visual variant — controls icon badge colour
16
+ */
17
+ variant: FeatureItemVariantType;
18
+ /**
19
+ * SVG template content for the icon.
20
+ * When omitted the icon badge is not rendered.
21
+ */
22
+ icon?: SVGTemplateResult;
23
+ render(): import("lit").TemplateResult<1>;
24
+ updated(changedProperties: Map<string | number | symbol, unknown>): void;
25
+ }
26
+ declare global {
27
+ interface HTMLElementTagNameMap {
28
+ 'dsgn-feature-item': FeatureItem;
29
+ }
30
+ }
@@ -0,0 +1,368 @@
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/FeatureItem/src/FeatureItem.ts
13
+ import"../../Icon/src/Icon.js";
14
+ import {
15
+ html as html2,
16
+ nothing
17
+ } from "lit";
18
+ import { property } from "lit/decorators.js";
19
+
20
+ // common/Base/Base.ts
21
+ import { html, LitElement } from "lit";
22
+
23
+ // common/helpers/define-element.ts
24
+ var defineElement = (tag, ctor) => {
25
+ if (typeof customElements === "undefined")
26
+ return;
27
+ if (!customElements.get(tag))
28
+ customElements.define(tag, ctor);
29
+ };
30
+
31
+ // common/Base/Base.css
32
+ import { css } from "lit";
33
+ var styles = css`/* Base reset in @layer base ensures it comes before utilities in Tailwind v4 cascade
34
+ This prevents the reset from overriding component utility classes */
35
+ @layer base {
36
+ :host {
37
+ display: block;
38
+ box-sizing: border-box;
39
+ line-height: 1.5;
40
+ -webkit-text-size-adjust: 100%;
41
+ tab-size: 4;
42
+ font-family: var(
43
+ --default-font-family,
44
+ var(--font-sans, ui-sans-serif, system-ui, sans-serif)
45
+ );
46
+ }
47
+
48
+ *,
49
+ *::before,
50
+ *::after {
51
+ box-sizing: inherit;
52
+ margin: 0;
53
+ padding: 0;
54
+ border: 0 solid;
55
+ }
56
+
57
+ :host h1,
58
+ :host h2,
59
+ :host h3,
60
+ :host h4,
61
+ :host h5,
62
+ :host h6 {
63
+ font-size: inherit;
64
+ font-weight: inherit;
65
+ margin: 0;
66
+ padding: 0;
67
+ }
68
+ }
69
+ `;
70
+ var Base_default = styles;
71
+
72
+ // common/Base/Base.ts
73
+ class Base extends LitElement {
74
+ static styles = Base_default;
75
+ updateTheme(changedProperties, surface) {
76
+ if (changedProperties.has("surface")) {
77
+ if (surface) {
78
+ this.setAttribute("data-theme", surface);
79
+ } else {
80
+ this.removeAttribute("data-theme");
81
+ }
82
+ }
83
+ }
84
+ emit(name, detail, options = {}) {
85
+ return this.dispatchEvent(new CustomEvent(name, {
86
+ detail,
87
+ bubbles: true,
88
+ composed: true,
89
+ cancelable: options.cancelable ?? false
90
+ }));
91
+ }
92
+ render() {
93
+ return html`<slot></slot>`;
94
+ }
95
+ }
96
+ defineElement("dsgn-base", Base);
97
+
98
+ // common/helpers/enum-validator.ts
99
+ var enumValidator = (propName, enumSet, candidateValue) => {
100
+ if (!enumSet.has(candidateValue)) {
101
+ throw new Error(`Invalid prop ${propName} of value ${candidateValue}. Expected one of: ${Array.from(enumSet).join(", ")}`);
102
+ }
103
+ };
104
+
105
+ // common/helpers/enum-creator.ts
106
+ var enumCreator = (acceptableValues, propName, type, other = {}) => {
107
+ const acceptableValuesSet = new Set(acceptableValues);
108
+ return {
109
+ type,
110
+ hasChanged(newValue, oldValue) {
111
+ if (newValue !== oldValue) {
112
+ enumValidator(propName, acceptableValuesSet, newValue);
113
+ return true;
114
+ }
115
+ return false;
116
+ },
117
+ ...other
118
+ };
119
+ };
120
+
121
+ // common/props/surface/surface.props.ts
122
+ var surfaceValues = {
123
+ LIGHT: "light",
124
+ DARK: "dark"
125
+ };
126
+ var surfaceProps = enumCreator(Object.values(surfaceValues), "surface", String, { reflect: true });
127
+
128
+ // components/FeatureItem/src/FeatureItem.css
129
+ import { css as css2 } from "lit";
130
+ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
131
+ @layer properties;
132
+ @layer theme {
133
+ :root, :host {
134
+ --font-sans: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
135
+ 'Noto Color Emoji';
136
+ --spacing: 0.25rem;
137
+ --text-sm: 0.875rem;
138
+ --text-sm--line-height: calc(1.25 / 0.875);
139
+ --font-weight-medium: 500;
140
+ --leading-snug: 1.375;
141
+ --color-accent: inherit;
142
+ --color-accent-text: inherit;
143
+ --color-badge-bg: inherit;
144
+ --color-badge-text: inherit;
145
+ --color-brand: inherit;
146
+ --color-brand-subtle: inherit;
147
+ --color-error: inherit;
148
+ --color-error-subtle: inherit;
149
+ --color-success: inherit;
150
+ --color-success-subtle: inherit;
151
+ --color-text-primary: inherit;
152
+ --color-warning: inherit;
153
+ --color-warning-subtle: inherit;
154
+ }
155
+ }
156
+ @layer utilities {
157
+ .static {
158
+ position: static;
159
+ }
160
+ .inline-flex {
161
+ display: inline-flex;
162
+ }
163
+ .size-6 {
164
+ width: calc(var(--spacing) * 6);
165
+ height: calc(var(--spacing) * 6);
166
+ }
167
+ .shrink-0 {
168
+ flex-shrink: 0;
169
+ }
170
+ .items-center {
171
+ align-items: center;
172
+ }
173
+ .justify-center {
174
+ justify-content: center;
175
+ }
176
+ .gap-3 {
177
+ gap: calc(var(--spacing) * 3);
178
+ }
179
+ .rounded-full {
180
+ border-radius: calc(infinity * 1px);
181
+ }
182
+ .bg-accent\\/15 {
183
+ background-color: color-mix(in srgb, inherit 15%, transparent);
184
+ @supports (color: color-mix(in lab, red, red)) {
185
+ background-color: color-mix(in oklab, var(--color-accent) 15%, transparent);
186
+ }
187
+ }
188
+ .bg-badge-bg {
189
+ background-color: var(--color-badge-bg);
190
+ }
191
+ .bg-brand-subtle {
192
+ background-color: var(--color-brand-subtle);
193
+ }
194
+ .bg-error-subtle {
195
+ background-color: var(--color-error-subtle);
196
+ }
197
+ .bg-success-subtle {
198
+ background-color: var(--color-success-subtle);
199
+ }
200
+ .bg-warning-subtle {
201
+ background-color: var(--color-warning-subtle);
202
+ }
203
+ .font-sans {
204
+ font-family: var(--font-sans);
205
+ }
206
+ .text-sm {
207
+ font-size: var(--text-sm);
208
+ line-height: var(--tw-leading, var(--text-sm--line-height));
209
+ }
210
+ .leading-snug {
211
+ --tw-leading: var(--leading-snug);
212
+ line-height: var(--leading-snug);
213
+ }
214
+ .font-medium {
215
+ --tw-font-weight: var(--font-weight-medium);
216
+ font-weight: var(--font-weight-medium);
217
+ }
218
+ .text-accent-text {
219
+ color: var(--color-accent-text);
220
+ }
221
+ .text-badge-text {
222
+ color: var(--color-badge-text);
223
+ }
224
+ .text-brand {
225
+ color: var(--color-brand);
226
+ }
227
+ .text-error {
228
+ color: var(--color-error);
229
+ }
230
+ .text-success {
231
+ color: var(--color-success);
232
+ }
233
+ .text-text-primary {
234
+ color: var(--color-text-primary);
235
+ }
236
+ .text-warning {
237
+ color: var(--color-warning);
238
+ }
239
+ }
240
+ @property --dsgn-border-sweep-angle {
241
+ syntax: '<angle>';
242
+ inherits: false;
243
+ initial-value: 0deg;
244
+ }
245
+ @property --tw-leading {
246
+ syntax: "*";
247
+ inherits: false;
248
+ }
249
+ @property --tw-font-weight {
250
+ syntax: "*";
251
+ inherits: false;
252
+ }
253
+ @layer properties {
254
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
255
+ *, ::before, ::after, ::backdrop {
256
+ --tw-leading: initial;
257
+ --tw-font-weight: initial;
258
+ --dsgn-border-sweep-angle: 0deg;
259
+ }
260
+ }
261
+ }
262
+ `;
263
+ var FeatureItem_default = styles2;
264
+
265
+ // components/FeatureItem/src/FeatureItem.props.ts
266
+ var featureItemVariantValues = {
267
+ DEFAULT: "default",
268
+ BRAND: "brand",
269
+ ACCENT: "accent",
270
+ SUCCESS: "success",
271
+ WARNING: "warning",
272
+ ERROR: "error"
273
+ };
274
+ var featureItemVariantProps = enumCreator(Object.values(featureItemVariantValues), "variant", String, { reflect: true });
275
+
276
+ // ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
277
+ function r(e) {
278
+ var t, f, n = "";
279
+ if (typeof e == "string" || typeof e == "number")
280
+ n += e;
281
+ else if (typeof e == "object")
282
+ if (Array.isArray(e)) {
283
+ var o = e.length;
284
+ for (t = 0;t < o; t++)
285
+ e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
286
+ } else
287
+ for (f in e)
288
+ e[f] && (n && (n += " "), n += f);
289
+ return n;
290
+ }
291
+ function clsx() {
292
+ for (var e, t, f = 0, n = "", o = arguments.length;f < o; f++)
293
+ (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
294
+ return n;
295
+ }
296
+ var clsx_default = clsx;
297
+
298
+ // components/FeatureItem/src/FeatureItem.styles.ts
299
+ var baseClasses = [
300
+ "inline-flex",
301
+ "items-center",
302
+ "gap-3",
303
+ "font-sans",
304
+ "text-sm",
305
+ "font-medium",
306
+ "leading-snug"
307
+ ];
308
+ var iconWrapperBaseClasses = [
309
+ "inline-flex",
310
+ "items-center",
311
+ "justify-center",
312
+ "shrink-0",
313
+ "rounded-full",
314
+ "size-6"
315
+ ];
316
+ var variantIconClasses = {
317
+ [featureItemVariantValues.DEFAULT]: ["bg-badge-bg", "text-badge-text"],
318
+ [featureItemVariantValues.BRAND]: ["bg-brand-subtle", "text-brand"],
319
+ [featureItemVariantValues.ACCENT]: ["bg-accent/15", "text-accent-text"],
320
+ [featureItemVariantValues.SUCCESS]: ["bg-success-subtle", "text-success"],
321
+ [featureItemVariantValues.WARNING]: ["bg-warning-subtle", "text-warning"],
322
+ [featureItemVariantValues.ERROR]: ["bg-error-subtle", "text-error"]
323
+ };
324
+ var variantLabelClasses = {
325
+ [featureItemVariantValues.DEFAULT]: ["text-text-primary"],
326
+ [featureItemVariantValues.BRAND]: ["text-text-primary"],
327
+ [featureItemVariantValues.ACCENT]: ["text-text-primary"],
328
+ [featureItemVariantValues.SUCCESS]: ["text-text-primary"],
329
+ [featureItemVariantValues.WARNING]: ["text-text-primary"],
330
+ [featureItemVariantValues.ERROR]: ["text-text-primary"]
331
+ };
332
+ var classNames = (variant) => clsx_default(baseClasses, variantLabelClasses[variant]);
333
+ var iconWrapperClassNames = (variant) => clsx_default(iconWrapperBaseClasses, variantIconClasses[variant]);
334
+
335
+ // components/FeatureItem/src/FeatureItem.ts
336
+ class FeatureItem extends Base {
337
+ constructor() {
338
+ super(...arguments);
339
+ this.surface = surfaceValues.LIGHT;
340
+ this.variant = featureItemVariantValues.DEFAULT;
341
+ }
342
+ static styles = [Base.styles, FeatureItem_default];
343
+ render() {
344
+ const iconBadge = this.icon ? html2`<span class="${iconWrapperClassNames(this.variant)}">
345
+ <dsgn-icon .icon=${this.icon} size="sm"></dsgn-icon>
346
+ </span>` : nothing;
347
+ return html2`<span class="${classNames(this.variant)}"
348
+ >${iconBadge}<slot></slot
349
+ ></span>`;
350
+ }
351
+ updated(changedProperties) {
352
+ super.updated(changedProperties);
353
+ this.updateTheme(changedProperties, this.surface);
354
+ }
355
+ }
356
+ __legacyDecorateClassTS([
357
+ property({ ...surfaceProps })
358
+ ], FeatureItem.prototype, "surface", undefined);
359
+ __legacyDecorateClassTS([
360
+ property({ ...featureItemVariantProps })
361
+ ], FeatureItem.prototype, "variant", undefined);
362
+ __legacyDecorateClassTS([
363
+ property({ attribute: false })
364
+ ], FeatureItem.prototype, "icon", undefined);
365
+ defineElement("dsgn-feature-item", FeatureItem);
366
+ export {
367
+ FeatureItem
368
+ };
@@ -0,0 +1,10 @@
1
+ export declare const featureItemVariantValues: {
2
+ readonly DEFAULT: "default";
3
+ readonly BRAND: "brand";
4
+ readonly ACCENT: "accent";
5
+ readonly SUCCESS: "success";
6
+ readonly WARNING: "warning";
7
+ readonly ERROR: "error";
8
+ };
9
+ export type FeatureItemVariantType = (typeof featureItemVariantValues)[keyof typeof featureItemVariantValues];
10
+ export declare const featureItemVariantProps: import("lit").PropertyDeclaration<unknown, unknown>;
@@ -0,0 +1,37 @@
1
+ // common/helpers/enum-validator.ts
2
+ var enumValidator = (propName, enumSet, candidateValue) => {
3
+ if (!enumSet.has(candidateValue)) {
4
+ throw new Error(`Invalid prop ${propName} of value ${candidateValue}. Expected one of: ${Array.from(enumSet).join(", ")}`);
5
+ }
6
+ };
7
+
8
+ // common/helpers/enum-creator.ts
9
+ var enumCreator = (acceptableValues, propName, type, other = {}) => {
10
+ const acceptableValuesSet = new Set(acceptableValues);
11
+ return {
12
+ type,
13
+ hasChanged(newValue, oldValue) {
14
+ if (newValue !== oldValue) {
15
+ enumValidator(propName, acceptableValuesSet, newValue);
16
+ return true;
17
+ }
18
+ return false;
19
+ },
20
+ ...other
21
+ };
22
+ };
23
+
24
+ // components/FeatureItem/src/FeatureItem.props.ts
25
+ var featureItemVariantValues = {
26
+ DEFAULT: "default",
27
+ BRAND: "brand",
28
+ ACCENT: "accent",
29
+ SUCCESS: "success",
30
+ WARNING: "warning",
31
+ ERROR: "error"
32
+ };
33
+ var featureItemVariantProps = enumCreator(Object.values(featureItemVariantValues), "variant", String, { reflect: true });
34
+ export {
35
+ featureItemVariantProps,
36
+ featureItemVariantValues
37
+ };
@@ -0,0 +1,3 @@
1
+ import { type FeatureItemVariantType } from './FeatureItem.props.js';
2
+ export declare const classNames: (variant: FeatureItemVariantType) => string;
3
+ export declare const iconWrapperClassNames: (variant: FeatureItemVariantType) => string;
@@ -0,0 +1,48 @@
1
+ import '../../../types/global.d.ts';
2
+ import '../../Button/src/Button.js';
3
+ import '../../CodeBlock/src/CodeBlock.js';
4
+ import '../../Container/src/Container.js';
5
+ import '../../Grid/src/Grid.js';
6
+ import '../../HeadingBlock/src/HeadingBlock.js';
7
+ import '../../Icon/src/Icon.js';
8
+ import { Base } from '../../../common/Base/Base.js';
9
+ import { type SurfaceType } from '../../../common/props/surface/surface.props.js';
10
+ import { type CSSResultGroup } from 'lit';
11
+ import { type FeatureTabData } from './FeatureTabs.props.js';
12
+ /** @slot header - Optional content above the tab interface. */
13
+ export declare class FeatureTabs extends Base {
14
+ static styles: CSSResultGroup;
15
+ private _inView;
16
+ private _rotate;
17
+ surface: SurfaceType;
18
+ features: FeatureTabData[];
19
+ duration: number;
20
+ /** Working-directory path shown in each tab's code block. */
21
+ codePath: string;
22
+ /** Leading text of the auto-rotate status (the `· Ns` is derived from duration). */
23
+ rotatingLabel: string;
24
+ /** Auto-rotate status text shown while paused. */
25
+ pausedLabel: string;
26
+ /** Accessible label for the pause control. */
27
+ pauseAriaLabel: string;
28
+ /** Accessible label for the resume control. */
29
+ resumeAriaLabel: string;
30
+ /** Accessible label for the tab list. */
31
+ tabsAriaLabel: string;
32
+ constructor();
33
+ firstUpdated(): void;
34
+ updated(changedProperties: Map<string | number | symbol, unknown>): void;
35
+ private _handleTabClick;
36
+ private _handleTabKeyDown;
37
+ private _handlePauseResume;
38
+ private _renderIcon;
39
+ private _renderCtas;
40
+ private _renderDetailPanel;
41
+ private _renderTabList;
42
+ render(): import("lit").TemplateResult<1>;
43
+ }
44
+ declare global {
45
+ interface HTMLElementTagNameMap {
46
+ 'dsgn-feature-tabs': FeatureTabs;
47
+ }
48
+ }