@luster-ui/ui 1.0.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 (176) hide show
  1. package/PUBLISHING.md +469 -0
  2. package/README.md +423 -0
  3. package/dist/cjs/index-Couc0LVo.js +1571 -0
  4. package/dist/cjs/index.cjs.js +2 -0
  5. package/dist/cjs/loader.cjs.js +12 -0
  6. package/dist/cjs/luster-accordion_19.cjs.entry.js +555 -0
  7. package/dist/cjs/luster-card.cjs.entry.js +25 -0
  8. package/dist/cjs/luster.cjs.js +24 -0
  9. package/dist/collection/collection-manifest.json +32 -0
  10. package/dist/collection/components/luster-accordion/luster-accordion.css +76 -0
  11. package/dist/collection/components/luster-accordion/luster-accordion.js +160 -0
  12. package/dist/collection/components/luster-accordion/luster-accordion.stories.js +88 -0
  13. package/dist/collection/components/luster-activity-item/luster-activity-item.css +102 -0
  14. package/dist/collection/components/luster-activity-item/luster-activity-item.js +188 -0
  15. package/dist/collection/components/luster-activity-item/luster-activity-item.stories.js +94 -0
  16. package/dist/collection/components/luster-alert/luster-alert.css +71 -0
  17. package/dist/collection/components/luster-alert/luster-alert.js +171 -0
  18. package/dist/collection/components/luster-alert/luster-alert.stories.js +82 -0
  19. package/dist/collection/components/luster-article-card/luster-article-card.css +120 -0
  20. package/dist/collection/components/luster-article-card/luster-article-card.js +192 -0
  21. package/dist/collection/components/luster-article-card/luster-article-card.stories.js +82 -0
  22. package/dist/collection/components/luster-badge/luster-badge.css +38 -0
  23. package/dist/collection/components/luster-badge/luster-badge.js +87 -0
  24. package/dist/collection/components/luster-badge/luster-badge.stories.js +86 -0
  25. package/dist/collection/components/luster-button/luster-button.css +121 -0
  26. package/dist/collection/components/luster-button/luster-button.js +179 -0
  27. package/dist/collection/components/luster-button/luster-button.stories.js +103 -0
  28. package/dist/collection/components/luster-card/luster-card.css +29 -0
  29. package/dist/collection/components/luster-card/luster-card.js +92 -0
  30. package/dist/collection/components/luster-card/luster-card.stories.js +67 -0
  31. package/dist/collection/components/luster-checkbox/luster-checkbox.css +42 -0
  32. package/dist/collection/components/luster-checkbox/luster-checkbox.js +162 -0
  33. package/dist/collection/components/luster-checkbox/luster-checkbox.stories.js +78 -0
  34. package/dist/collection/components/luster-color-swatch/luster-color-swatch.css +33 -0
  35. package/dist/collection/components/luster-color-swatch/luster-color-swatch.js +108 -0
  36. package/dist/collection/components/luster-color-swatch/luster-color-swatch.stories.js +58 -0
  37. package/dist/collection/components/luster-feature-quote/luster-feature-quote.css +84 -0
  38. package/dist/collection/components/luster-feature-quote/luster-feature-quote.js +108 -0
  39. package/dist/collection/components/luster-feature-quote/luster-feature-quote.stories.js +52 -0
  40. package/dist/collection/components/luster-hero/luster-hero.css +119 -0
  41. package/dist/collection/components/luster-hero/luster-hero.js +129 -0
  42. package/dist/collection/components/luster-hero/luster-hero.stories.js +72 -0
  43. package/dist/collection/components/luster-input/luster-input.css +72 -0
  44. package/dist/collection/components/luster-input/luster-input.js +332 -0
  45. package/dist/collection/components/luster-input/luster-input.stories.js +106 -0
  46. package/dist/collection/components/luster-modal/luster-modal.css +103 -0
  47. package/dist/collection/components/luster-modal/luster-modal.js +215 -0
  48. package/dist/collection/components/luster-modal/luster-modal.stories.js +78 -0
  49. package/dist/collection/components/luster-navbar/luster-navbar.css +151 -0
  50. package/dist/collection/components/luster-navbar/luster-navbar.js +87 -0
  51. package/dist/collection/components/luster-navbar/luster-navbar.stories.js +41 -0
  52. package/dist/collection/components/luster-profile-card/luster-profile-card.css +89 -0
  53. package/dist/collection/components/luster-profile-card/luster-profile-card.js +194 -0
  54. package/dist/collection/components/luster-profile-card/luster-profile-card.stories.js +56 -0
  55. package/dist/collection/components/luster-resource-table/luster-resource-table.css +141 -0
  56. package/dist/collection/components/luster-resource-table/luster-resource-table.js +78 -0
  57. package/dist/collection/components/luster-resource-table/luster-resource-table.stories.js +44 -0
  58. package/dist/collection/components/luster-sidebar/luster-sidebar.css +152 -0
  59. package/dist/collection/components/luster-sidebar/luster-sidebar.js +78 -0
  60. package/dist/collection/components/luster-sidebar/luster-sidebar.stories.js +34 -0
  61. package/dist/collection/components/luster-stat-card/luster-stat-card.css +82 -0
  62. package/dist/collection/components/luster-stat-card/luster-stat-card.js +194 -0
  63. package/dist/collection/components/luster-stat-card/luster-stat-card.stories.js +75 -0
  64. package/dist/collection/components/luster-tabs/luster-tabs.css +35 -0
  65. package/dist/collection/components/luster-tabs/luster-tabs.js +116 -0
  66. package/dist/collection/components/luster-tabs/luster-tabs.stories.js +56 -0
  67. package/dist/collection/components/luster-toggle/luster-toggle.css +48 -0
  68. package/dist/collection/components/luster-toggle/luster-toggle.js +120 -0
  69. package/dist/collection/components/luster-toggle/luster-toggle.stories.js +66 -0
  70. package/dist/components/index.d.ts +33 -0
  71. package/dist/components/index.js +1 -0
  72. package/dist/components/luster-accordion.d.ts +11 -0
  73. package/dist/components/luster-accordion.js +1 -0
  74. package/dist/components/luster-activity-item.d.ts +11 -0
  75. package/dist/components/luster-activity-item.js +1 -0
  76. package/dist/components/luster-alert.d.ts +11 -0
  77. package/dist/components/luster-alert.js +1 -0
  78. package/dist/components/luster-article-card.d.ts +11 -0
  79. package/dist/components/luster-article-card.js +1 -0
  80. package/dist/components/luster-badge.d.ts +11 -0
  81. package/dist/components/luster-badge.js +1 -0
  82. package/dist/components/luster-badge2.js +1 -0
  83. package/dist/components/luster-button.d.ts +11 -0
  84. package/dist/components/luster-button.js +1 -0
  85. package/dist/components/luster-button2.js +1 -0
  86. package/dist/components/luster-card.d.ts +11 -0
  87. package/dist/components/luster-card.js +1 -0
  88. package/dist/components/luster-checkbox.d.ts +11 -0
  89. package/dist/components/luster-checkbox.js +1 -0
  90. package/dist/components/luster-color-swatch.d.ts +11 -0
  91. package/dist/components/luster-color-swatch.js +1 -0
  92. package/dist/components/luster-feature-quote.d.ts +11 -0
  93. package/dist/components/luster-feature-quote.js +1 -0
  94. package/dist/components/luster-hero.d.ts +11 -0
  95. package/dist/components/luster-hero.js +1 -0
  96. package/dist/components/luster-input.d.ts +11 -0
  97. package/dist/components/luster-input.js +1 -0
  98. package/dist/components/luster-modal.d.ts +11 -0
  99. package/dist/components/luster-modal.js +1 -0
  100. package/dist/components/luster-navbar.d.ts +11 -0
  101. package/dist/components/luster-navbar.js +1 -0
  102. package/dist/components/luster-profile-card.d.ts +11 -0
  103. package/dist/components/luster-profile-card.js +1 -0
  104. package/dist/components/luster-resource-table.d.ts +11 -0
  105. package/dist/components/luster-resource-table.js +1 -0
  106. package/dist/components/luster-sidebar.d.ts +11 -0
  107. package/dist/components/luster-sidebar.js +1 -0
  108. package/dist/components/luster-stat-card.d.ts +11 -0
  109. package/dist/components/luster-stat-card.js +1 -0
  110. package/dist/components/luster-tabs.d.ts +11 -0
  111. package/dist/components/luster-tabs.js +1 -0
  112. package/dist/components/luster-toggle.d.ts +11 -0
  113. package/dist/components/luster-toggle.js +1 -0
  114. package/dist/components/luster-toggle2.js +1 -0
  115. package/dist/esm/index-CeYIN8dN.js +1563 -0
  116. package/dist/esm/index.js +1 -0
  117. package/dist/esm/loader.js +10 -0
  118. package/dist/esm/luster-accordion_19.entry.js +535 -0
  119. package/dist/esm/luster-card.entry.js +23 -0
  120. package/dist/esm/luster.js +20 -0
  121. package/dist/index.cjs.js +1 -0
  122. package/dist/index.js +1 -0
  123. package/dist/luster/index.esm.js +0 -0
  124. package/dist/luster/luster.css +313 -0
  125. package/dist/luster/luster.esm.js +1 -0
  126. package/dist/luster/p-3c4ce897.entry.js +1 -0
  127. package/dist/luster/p-CeYIN8dN.js +2 -0
  128. package/dist/luster/p-e368ec08.entry.js +1 -0
  129. package/dist/types/.stencil/luster-accordion/luster-accordion.d.ts +13 -0
  130. package/dist/types/.stencil/luster-accordion/luster-accordion.stories.d.ts +10 -0
  131. package/dist/types/.stencil/luster-activity-item/luster-activity-item.d.ts +11 -0
  132. package/dist/types/.stencil/luster-activity-item/luster-activity-item.stories.d.ts +9 -0
  133. package/dist/types/.stencil/luster-alert/luster-alert.d.ts +13 -0
  134. package/dist/types/.stencil/luster-alert/luster-alert.stories.d.ts +10 -0
  135. package/dist/types/.stencil/luster-article-card/luster-article-card.d.ts +11 -0
  136. package/dist/types/.stencil/luster-article-card/luster-article-card.stories.d.ts +8 -0
  137. package/dist/types/.stencil/luster-badge/luster-badge.d.ts +6 -0
  138. package/dist/types/.stencil/luster-badge/luster-badge.stories.d.ts +12 -0
  139. package/dist/types/.stencil/luster-button/luster-button.d.ts +12 -0
  140. package/dist/types/.stencil/luster-button/luster-button.stories.d.ts +13 -0
  141. package/dist/types/.stencil/luster-card/luster-card.d.ts +6 -0
  142. package/dist/types/.stencil/luster-card/luster-card.stories.d.ts +10 -0
  143. package/dist/types/.stencil/luster-checkbox/luster-checkbox.d.ts +13 -0
  144. package/dist/types/.stencil/luster-checkbox/luster-checkbox.stories.d.ts +10 -0
  145. package/dist/types/.stencil/luster-color-swatch/luster-color-swatch.d.ts +7 -0
  146. package/dist/types/.stencil/luster-color-swatch/luster-color-swatch.stories.d.ts +8 -0
  147. package/dist/types/.stencil/luster-feature-quote/luster-feature-quote.d.ts +7 -0
  148. package/dist/types/.stencil/luster-feature-quote/luster-feature-quote.stories.d.ts +8 -0
  149. package/dist/types/.stencil/luster-hero/luster-hero.d.ts +8 -0
  150. package/dist/types/.stencil/luster-hero/luster-hero.stories.d.ts +8 -0
  151. package/dist/types/.stencil/luster-input/luster-input.d.ts +25 -0
  152. package/dist/types/.stencil/luster-input/luster-input.stories.d.ts +9 -0
  153. package/dist/types/.stencil/luster-modal/luster-modal.d.ts +17 -0
  154. package/dist/types/.stencil/luster-modal/luster-modal.stories.d.ts +8 -0
  155. package/dist/types/.stencil/luster-navbar/luster-navbar.d.ts +6 -0
  156. package/dist/types/.stencil/luster-navbar/luster-navbar.stories.d.ts +6 -0
  157. package/dist/types/.stencil/luster-profile-card/luster-profile-card.d.ts +11 -0
  158. package/dist/types/.stencil/luster-profile-card/luster-profile-card.stories.d.ts +7 -0
  159. package/dist/types/.stencil/luster-resource-table/luster-resource-table.d.ts +14 -0
  160. package/dist/types/.stencil/luster-resource-table/luster-resource-table.stories.d.ts +6 -0
  161. package/dist/types/.stencil/luster-sidebar/luster-sidebar.d.ts +9 -0
  162. package/dist/types/.stencil/luster-sidebar/luster-sidebar.stories.d.ts +8 -0
  163. package/dist/types/.stencil/luster-stat-card/luster-stat-card.d.ts +11 -0
  164. package/dist/types/.stencil/luster-stat-card/luster-stat-card.stories.d.ts +8 -0
  165. package/dist/types/.stencil/luster-tabs/luster-tabs.d.ts +15 -0
  166. package/dist/types/.stencil/luster-tabs/luster-tabs.stories.d.ts +7 -0
  167. package/dist/types/.stencil/luster-toggle/luster-toggle.d.ts +11 -0
  168. package/dist/types/.stencil/luster-toggle/luster-toggle.stories.d.ts +9 -0
  169. package/dist/types/components.d.ts +1355 -0
  170. package/dist/types/stencil-public-runtime.d.ts +1860 -0
  171. package/loader/cdn.js +1 -0
  172. package/loader/index.cjs.js +1 -0
  173. package/loader/index.d.ts +24 -0
  174. package/loader/index.es2017.js +1 -0
  175. package/loader/index.js +2 -0
  176. package/package.json +73 -0
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-Couc0LVo.js');
4
+
5
+ const lusterCardCss = () => `:host{display:block}.card{border-radius:var(--dc-round-4);overflow:hidden;transition:background var(--dc-transition-base), box-shadow var(--dc-transition-base)}.card--pad-none{padding:0}.card--pad-sm{padding:var(--dc-space-4)}.card--pad-md{padding:var(--dc-space-6)}.card--pad-lg{padding:var(--dc-space-8)}.card--default{background:var(--dc-surface-container-high)}.card--elevated{background:var(--dc-surface-container-highest);box-shadow:var(--dc-shadow-md)}.card--feature{background:var(--dc-surface-container-high);border:1px solid var(--dc-border-default)}.card--glass{background:var(--dc-glass-bg);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border:1px solid var(--dc-border-default)}.card--hoverable{cursor:pointer}.card--hoverable:hover{background:var(--dc-surface-bright);box-shadow:var(--dc-shadow-lg)}`;
6
+
7
+ const DcCard = class {
8
+ constructor(hostRef) {
9
+ index.registerInstance(this, hostRef);
10
+ this.variant = 'default';
11
+ this.padding = 'md';
12
+ this.hoverable = false;
13
+ }
14
+ render() {
15
+ return (index.h("div", { key: 'b49300a94d3ec06822794698af4a1d8da248d319', class: [
16
+ 'card',
17
+ `card--${this.variant}`,
18
+ `card--pad-${this.padding}`,
19
+ this.hoverable ? 'card--hoverable' : '',
20
+ ].filter(Boolean).join(' ') }, index.h("slot", { key: '05c26e4626e0610588ab6694355f315b0adc9327' })));
21
+ }
22
+ };
23
+ DcCard.style = lusterCardCss();
24
+
25
+ exports.luster_card = DcCard;
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-Couc0LVo.js');
4
+
5
+ var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
6
+ /*
7
+ Stencil Client Patch Browser v4.43.3 | MIT Licensed | https://stenciljs.com
8
+ */
9
+
10
+ var patchBrowser = () => {
11
+ const importMeta = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('luster.cjs.js', document.baseURI).href));
12
+ const opts = {};
13
+ if (importMeta !== "") {
14
+ opts.resourcesUrl = new URL(".", importMeta).href;
15
+ }
16
+ return index.promiseResolve(opts);
17
+ };
18
+
19
+ patchBrowser().then(async (options) => {
20
+ await index.globalScripts();
21
+ return index.bootstrapLazy([["luster-card.cjs",[[257,"luster-card",{"variant":[1],"padding":[1],"hoverable":[4]}]]],["luster-accordion_19.cjs",[[1,"luster-resource-table",{"rows":[1]}],[1,"luster-stat-card",{"heading":[1],"description":[1],"version":[1],"status":[1],"users":[1],"hasToggle":[4,"has-toggle"],"toggleOn":[4,"toggle-on"],"icon":[1]}],[257,"luster-accordion",{"heading":[1],"subtitle":[1],"badge":[1],"badgeVariant":[1,"badge-variant"],"expanded":[1028],"isExpanded":[32]}],[257,"luster-modal",{"open":[1028],"heading":[1],"subtitle":[1],"confirmLabel":[1,"confirm-label"],"cancelLabel":[1,"cancel-label"],"size":[1],"visible":[32]},null,{"open":[{"watchOpen":0}]}],[1,"luster-profile-card",{"name":[1],"role":[1],"avatar":[1],"stat1Value":[1,"stat-1-value"],"stat1Label":[1,"stat-1-label"],"stat2Value":[1,"stat-2-value"],"stat2Label":[1,"stat-2-label"],"ctaLabel":[1,"cta-label"]}],[1,"luster-activity-item",{"label":[1],"description":[1],"time":[1],"variant":[1],"icon":[1],"fileSize":[1,"file-size"],"downloadable":[4]}],[1,"luster-alert",{"heading":[1],"message":[1],"variant":[1],"dismissible":[4],"timestamp":[1],"visible":[32]}],[1,"luster-article-card",{"category":[1],"heading":[1],"excerpt":[1],"date":[1],"author":[1],"authorRole":[1,"author-role"],"imageUrl":[1,"image-url"],"featured":[4]}],[1,"luster-checkbox",{"label":[1],"checked":[4],"disabled":[4],"indeterminate":[4],"value":[1],"innerChecked":[32]}],[1,"luster-color-swatch",{"color":[1],"name":[1],"hex":[1],"size":[1]}],[257,"luster-feature-quote",{"quote":[1],"author":[1],"role":[1],"variant":[1]}],[257,"luster-hero",{"heading":[1],"subtitle":[1],"section":[1],"imageUrl":[1,"image-url"],"parallax":[4]}],[1,"luster-input",{"label":[1],"placeholder":[1],"value":[1],"type":[1],"error":[4],"errorMessage":[1,"error-message"],"helperText":[1,"helper-text"],"disabled":[4],"readonly":[4],"name":[1],"focused":[32],"innerValue":[32]}],[1,"luster-navbar",{"logoTitle":[1,"logo-title"],"logoSub":[1,"logo-sub"],"activeLink":[1,"active-link"]}],[1,"luster-sidebar",{"active":[1]}],[257,"luster-tabs",{"tabs":[1],"active":[1],"activeTab":[32]}],[1,"luster-toggle",{"label":[1],"checked":[4],"disabled":[4],"innerChecked":[32]}],[257,"luster-badge",{"variant":[1],"dot":[4],"size":[1]}],[257,"luster-button",{"variant":[1],"size":[1],"disabled":[4],"loading":[4],"fullWidth":[4,"full-width"],"type":[1]}]]]], options);
22
+ });
23
+
24
+ exports.setNonce = index.setNonce;
@@ -0,0 +1,32 @@
1
+ {
2
+ "entries": [
3
+ "components/luster-resource-table/luster-resource-table.js",
4
+ "components/luster-tabs/luster-tabs.js",
5
+ "components/luster-accordion/luster-accordion.js",
6
+ "components/luster-activity-item/luster-activity-item.js",
7
+ "components/luster-alert/luster-alert.js",
8
+ "components/luster-article-card/luster-article-card.js",
9
+ "components/luster-badge/luster-badge.js",
10
+ "components/luster-button/luster-button.js",
11
+ "components/luster-card/luster-card.js",
12
+ "components/luster-checkbox/luster-checkbox.js",
13
+ "components/luster-color-swatch/luster-color-swatch.js",
14
+ "components/luster-feature-quote/luster-feature-quote.js",
15
+ "components/luster-hero/luster-hero.js",
16
+ "components/luster-input/luster-input.js",
17
+ "components/luster-modal/luster-modal.js",
18
+ "components/luster-navbar/luster-navbar.js",
19
+ "components/luster-profile-card/luster-profile-card.js",
20
+ "components/luster-sidebar/luster-sidebar.js",
21
+ "components/luster-stat-card/luster-stat-card.js",
22
+ "components/luster-toggle/luster-toggle.js"
23
+ ],
24
+ "mixins": [],
25
+ "compiler": {
26
+ "name": "@stencil/core",
27
+ "version": "4.43.3",
28
+ "typescriptVersion": "5.8.3"
29
+ },
30
+ "collections": [],
31
+ "bundles": []
32
+ }
@@ -0,0 +1,76 @@
1
+ :host { display: block; }
2
+
3
+ .accordion {
4
+ background: var(--dc-surface-container-high);
5
+ border-radius: var(--dc-round-3);
6
+ overflow: hidden;
7
+ transition: box-shadow var(--dc-transition-base);
8
+ }
9
+
10
+ .accordion--expanded {
11
+ box-shadow: var(--dc-shadow-sm);
12
+ }
13
+
14
+ .accordion__trigger {
15
+ display: flex;
16
+ align-items: flex-start;
17
+ justify-content: space-between;
18
+ gap: var(--dc-space-4);
19
+ width: 100%;
20
+ padding: var(--dc-space-4) var(--dc-space-5);
21
+ background: none;
22
+ border: none;
23
+ cursor: pointer;
24
+ text-align: left;
25
+ transition: background var(--dc-transition-fast);
26
+ }
27
+
28
+ .accordion__trigger:hover { background: var(--dc-hover-tint); }
29
+
30
+ .accordion__trigger-left {
31
+ display: flex;
32
+ flex-direction: column;
33
+ gap: var(--dc-space-2);
34
+ flex: 1;
35
+ }
36
+
37
+ .accordion__titles { display: flex; flex-direction: column; gap: 4px; }
38
+
39
+ .accordion__title {
40
+ font-family: var(--dc-font-display);
41
+ font-size: var(--dc-title-sm);
42
+ font-weight: 700;
43
+ color: var(--dc-on-surface);
44
+ }
45
+
46
+ .accordion__subtitle {
47
+ font-size: var(--dc-body-sm);
48
+ color: var(--dc-on-surface-variant);
49
+ line-height: 1.5;
50
+ }
51
+
52
+ .accordion__chevron {
53
+ color: var(--dc-on-surface-variant);
54
+ display: flex;
55
+ align-items: center;
56
+ transition: transform var(--dc-transition-base);
57
+ flex-shrink: 0;
58
+ margin-top: var(--dc-space-1);
59
+ }
60
+
61
+ .accordion__chevron--up { transform: rotate(180deg); }
62
+
63
+ .accordion__content {
64
+ max-height: 0;
65
+ overflow: hidden;
66
+ transition: max-height var(--dc-transition-slow) cubic-bezier(0.4, 0, 0.2, 1);
67
+ }
68
+
69
+ .accordion--expanded .accordion__content { max-height: 600px; }
70
+
71
+ .accordion__inner {
72
+ padding: 0 var(--dc-space-5) var(--dc-space-5);
73
+ color: var(--dc-on-surface-variant);
74
+ font-size: var(--dc-body-sm);
75
+ line-height: 1.6;
76
+ }
@@ -0,0 +1,160 @@
1
+ import { h } from "@stencil/core";
2
+ export class DcAccordion {
3
+ constructor() {
4
+ this.heading = '';
5
+ this.subtitle = '';
6
+ this.badge = '';
7
+ this.badgeVariant = 'default';
8
+ this.expanded = false;
9
+ this.isExpanded = false;
10
+ this.handleToggle = () => {
11
+ this.isExpanded = !this.isExpanded;
12
+ this.dcToggle.emit(this.isExpanded);
13
+ };
14
+ }
15
+ componentWillLoad() {
16
+ this.isExpanded = this.expanded;
17
+ }
18
+ render() {
19
+ return (h("div", { key: '8354addfd70119cc5c50b0cadb414d341f5c4dd1', class: `accordion ${this.isExpanded ? 'accordion--expanded' : ''}` }, h("button", { key: 'bffcbfdef833e817b8e03c79fa72b5a5a4edbbb0', class: "accordion__trigger", onClick: this.handleToggle, "aria-expanded": this.isExpanded ? 'true' : 'false' }, h("div", { key: '5b6e51d9e0eabb125b50b54ebd54667432a672b3', class: "accordion__trigger-left" }, this.badge && (h("luster-badge", { key: '1894640145ac7ab6df3867b9710e475573c99b5b', variant: this.badgeVariant, size: "sm" }, this.badge)), h("div", { key: '30e6782a85ceec036d91b12c936c5c2863a4f017', class: "accordion__titles" }, h("span", { key: '7c7bf525077ba806efb13ddee674a6049af64204', class: "accordion__title" }, this.heading), this.subtitle && (h("span", { key: 'd888d5b78704713aa1c4c9cc902dbd04979503e2', class: "accordion__subtitle" }, this.subtitle)))), h("span", { key: '98601396b5fcd1d777935d400a1f01072c9d437a', class: `accordion__chevron ${this.isExpanded ? 'accordion__chevron--up' : ''}` }, h("svg", { key: '5c9c4af605307d12973f82c5166d8e3873e402c3', width: "16", height: "16", viewBox: "0 0 24 24", fill: "none" }, h("polyline", { key: 'd59e9cc24f98cdd87c317f3107b34ba9c732b3af', points: "6,9 12,15 18,9", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), h("div", { key: '3b7245e52cc48797637756d8ec66bcf1868adfe4', class: "accordion__content", "aria-hidden": !this.isExpanded ? 'true' : 'false' }, h("div", { key: 'ab1069f5ab0d102b16fc02ef71365c4cd4525af8', class: "accordion__inner" }, h("slot", { key: 'cfc15924e2effa62732dd221d846f44baeff0901' })))));
20
+ }
21
+ static get is() { return "luster-accordion"; }
22
+ static get encapsulation() { return "shadow"; }
23
+ static get originalStyleUrls() {
24
+ return {
25
+ "$": ["luster-accordion.css"]
26
+ };
27
+ }
28
+ static get styleUrls() {
29
+ return {
30
+ "$": ["luster-accordion.css"]
31
+ };
32
+ }
33
+ static get properties() {
34
+ return {
35
+ "heading": {
36
+ "type": "string",
37
+ "mutable": false,
38
+ "complexType": {
39
+ "original": "string",
40
+ "resolved": "string",
41
+ "references": {}
42
+ },
43
+ "required": false,
44
+ "optional": false,
45
+ "docs": {
46
+ "tags": [],
47
+ "text": ""
48
+ },
49
+ "getter": false,
50
+ "setter": false,
51
+ "reflect": false,
52
+ "attribute": "heading",
53
+ "defaultValue": "''"
54
+ },
55
+ "subtitle": {
56
+ "type": "string",
57
+ "mutable": false,
58
+ "complexType": {
59
+ "original": "string",
60
+ "resolved": "string",
61
+ "references": {}
62
+ },
63
+ "required": false,
64
+ "optional": false,
65
+ "docs": {
66
+ "tags": [],
67
+ "text": ""
68
+ },
69
+ "getter": false,
70
+ "setter": false,
71
+ "reflect": false,
72
+ "attribute": "subtitle",
73
+ "defaultValue": "''"
74
+ },
75
+ "badge": {
76
+ "type": "string",
77
+ "mutable": false,
78
+ "complexType": {
79
+ "original": "string",
80
+ "resolved": "string",
81
+ "references": {}
82
+ },
83
+ "required": false,
84
+ "optional": false,
85
+ "docs": {
86
+ "tags": [],
87
+ "text": ""
88
+ },
89
+ "getter": false,
90
+ "setter": false,
91
+ "reflect": false,
92
+ "attribute": "badge",
93
+ "defaultValue": "''"
94
+ },
95
+ "badgeVariant": {
96
+ "type": "string",
97
+ "mutable": false,
98
+ "complexType": {
99
+ "original": "'primary' | 'default' | 'success' | 'beta'",
100
+ "resolved": "\"beta\" | \"default\" | \"primary\" | \"success\"",
101
+ "references": {}
102
+ },
103
+ "required": false,
104
+ "optional": false,
105
+ "docs": {
106
+ "tags": [],
107
+ "text": ""
108
+ },
109
+ "getter": false,
110
+ "setter": false,
111
+ "reflect": false,
112
+ "attribute": "badge-variant",
113
+ "defaultValue": "'default'"
114
+ },
115
+ "expanded": {
116
+ "type": "boolean",
117
+ "mutable": true,
118
+ "complexType": {
119
+ "original": "boolean",
120
+ "resolved": "boolean",
121
+ "references": {}
122
+ },
123
+ "required": false,
124
+ "optional": false,
125
+ "docs": {
126
+ "tags": [],
127
+ "text": ""
128
+ },
129
+ "getter": false,
130
+ "setter": false,
131
+ "reflect": false,
132
+ "attribute": "expanded",
133
+ "defaultValue": "false"
134
+ }
135
+ };
136
+ }
137
+ static get states() {
138
+ return {
139
+ "isExpanded": {}
140
+ };
141
+ }
142
+ static get events() {
143
+ return [{
144
+ "method": "dcToggle",
145
+ "name": "dcToggle",
146
+ "bubbles": true,
147
+ "cancelable": true,
148
+ "composed": true,
149
+ "docs": {
150
+ "tags": [],
151
+ "text": ""
152
+ },
153
+ "complexType": {
154
+ "original": "boolean",
155
+ "resolved": "boolean",
156
+ "references": {}
157
+ }
158
+ }];
159
+ }
160
+ }
@@ -0,0 +1,88 @@
1
+ import { html } from "lit";
2
+ const meta = {
3
+ title: 'Navigation/Accordion',
4
+ tags: ['autodocs'],
5
+ parameters: {
6
+ docs: {
7
+ description: {
8
+ component: 'Painel expansível com badge e subtítulo. Props: `heading`, `subtitle`, `badge`, `badge-variant`, `expanded`.',
9
+ },
10
+ },
11
+ },
12
+ argTypes: {
13
+ heading: { control: 'text', description: 'Título do accordion' },
14
+ subtitle: { control: 'text', description: 'Subtítulo exibido sob o título' },
15
+ badge: { control: 'text', description: 'Texto do badge (vazio = sem badge)' },
16
+ badgeVariant: {
17
+ control: 'select',
18
+ options: ['default', 'primary', 'success', 'beta'],
19
+ description: 'Variante do badge',
20
+ table: { defaultValue: { summary: 'default' } },
21
+ },
22
+ expanded: {
23
+ control: 'boolean',
24
+ description: 'Estado inicial expandido',
25
+ table: { defaultValue: { summary: 'false' } },
26
+ },
27
+ },
28
+ args: {
29
+ heading: 'Typography System',
30
+ subtitle: 'Fonts, sizes, weights and line heights',
31
+ badge: 'v1.2',
32
+ badgeVariant: 'default',
33
+ expanded: false,
34
+ },
35
+ };
36
+ export default meta;
37
+ const render = (args) => html `
38
+ <luster-accordion
39
+ heading="${args.heading}"
40
+ subtitle="${args.subtitle}"
41
+ badge="${args.badge}"
42
+ badge-variant="${args.badgeVariant}"
43
+ ?expanded="${args.expanded}"
44
+ >
45
+ <div style="color:var(--dc-on-surface-variant);font-size:0.875rem;line-height:1.6;">
46
+ Content inside the accordion panel. Add any components or text here.
47
+ </div>
48
+ </luster-accordion>
49
+ `;
50
+ export const Collapsed = {
51
+ args: { expanded: false },
52
+ render,
53
+ };
54
+ export const Expanded = {
55
+ args: { expanded: true },
56
+ render,
57
+ };
58
+ export const WithPrimaryBadge = {
59
+ name: 'Primary Badge',
60
+ args: { badge: 'New', badgeVariant: 'primary', expanded: true },
61
+ render,
62
+ };
63
+ export const WithBetaBadge = {
64
+ name: 'Beta Badge',
65
+ args: { badge: 'Beta', badgeVariant: 'beta' },
66
+ render,
67
+ };
68
+ export const NoSubtitle = {
69
+ name: 'No Subtitle',
70
+ args: { subtitle: '', badge: '' },
71
+ render,
72
+ };
73
+ export const StackedGroup = {
74
+ name: 'Stacked Group',
75
+ render: () => html `
76
+ <div style="display:flex;flex-direction:column;gap:0.5rem;width:520px;">
77
+ <luster-accordion heading="Typography" subtitle="Fonts and type scale" badge="v1.2" ?expanded="${true}">
78
+ <p style="color:var(--dc-on-surface-variant);margin:0;font-size:0.875rem;">Manrope for headings, Inter for body text.</p>
79
+ </luster-accordion>
80
+ <luster-accordion heading="Color Tokens" subtitle="Surfaces, primaries, semantic" badge="v2.0" badge-variant="primary">
81
+ <p style="color:var(--dc-on-surface-variant);margin:0;font-size:0.875rem;">All tokens defined as CSS custom properties on :root.</p>
82
+ </luster-accordion>
83
+ <luster-accordion heading="Spacing System" subtitle="Scale based on 4px grid" badge="Beta" badge-variant="beta">
84
+ <p style="color:var(--dc-on-surface-variant);margin:0;font-size:0.875rem;">xs: 4px · sm: 8px · md: 16px · lg: 24px · xl: 40px</p>
85
+ </luster-accordion>
86
+ </div>
87
+ `,
88
+ };
@@ -0,0 +1,102 @@
1
+ :host { display: block; }
2
+
3
+ .activity-item {
4
+ display: flex;
5
+ align-items: flex-start;
6
+ gap: var(--dc-space-3);
7
+ padding: var(--dc-space-3) 0;
8
+ }
9
+
10
+ .activity-item + .activity-item { border-top: 1px solid var(--dc-divider); }
11
+
12
+ .activity-item__icon {
13
+ width: 28px;
14
+ height: 28px;
15
+ border-radius: var(--dc-round-full);
16
+ background: var(--dc-icon-bg);
17
+ display: flex;
18
+ align-items: center;
19
+ justify-content: center;
20
+ color: var(--dc-primary);
21
+ flex-shrink: 0;
22
+ }
23
+
24
+ .activity-item__content {
25
+ flex: 1;
26
+ display: flex;
27
+ flex-direction: column;
28
+ gap: 2px;
29
+ overflow: hidden;
30
+ }
31
+
32
+ .activity-item__title {
33
+ font-size: var(--dc-body-sm);
34
+ font-weight: 600;
35
+ color: var(--dc-on-surface);
36
+ line-height: 1.3;
37
+ }
38
+
39
+ .activity-item__desc {
40
+ font-size: var(--dc-label-md);
41
+ color: var(--dc-on-surface-variant);
42
+ line-height: 1.4;
43
+ display: -webkit-box;
44
+ -webkit-line-clamp: 2;
45
+ -webkit-box-orient: vertical;
46
+ overflow: hidden;
47
+ }
48
+
49
+ .activity-item__time {
50
+ font-size: var(--dc-label-sm);
51
+ color: var(--dc-on-surface-variant);
52
+ margin-top: var(--dc-space-1);
53
+ }
54
+
55
+ /* File variant */
56
+ .activity-item--file {
57
+ align-items: center;
58
+ background: var(--dc-surface-container);
59
+ border-radius: var(--dc-round-3);
60
+ padding: var(--dc-space-3) var(--dc-space-4);
61
+ transition: background var(--dc-transition-fast);
62
+ }
63
+
64
+ .activity-item--file + .activity-item--file { border-top: none; margin-top: var(--dc-space-2); }
65
+
66
+ .activity-item--file:hover { background: var(--dc-surface-container-high); }
67
+
68
+ .activity-item__file-icon {
69
+ width: 36px;
70
+ height: 36px;
71
+ border-radius: var(--dc-round-2);
72
+ background: var(--dc-icon-bg);
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: center;
76
+ color: var(--dc-primary);
77
+ flex-shrink: 0;
78
+ }
79
+
80
+ .activity-item__meta {
81
+ display: flex;
82
+ align-items: center;
83
+ gap: var(--dc-space-1);
84
+ font-size: var(--dc-label-sm);
85
+ color: var(--dc-on-surface-variant);
86
+ }
87
+
88
+ .activity-item__download {
89
+ background: none;
90
+ border: none;
91
+ cursor: pointer;
92
+ color: var(--dc-on-surface-variant);
93
+ display: flex;
94
+ align-items: center;
95
+ padding: var(--dc-space-1);
96
+ border-radius: var(--dc-round-1);
97
+ flex-shrink: 0;
98
+ opacity: 0.6;
99
+ transition: opacity var(--dc-transition-fast);
100
+ }
101
+
102
+ .activity-item__download:hover { opacity: 1; }