@redvars/peacock 3.1.0 → 3.1.2

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 (187) hide show
  1. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/avatar.css.js +3 -3
  2. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/avatar.css.js.map +1 -1
  3. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/avatar.d.ts +16 -3
  4. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/avatar.js +16 -3
  5. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/avatar.js.map +1 -1
  6. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/p-avatar.d.ts +3 -0
  7. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/p-avatar.js +10 -0
  8. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/p-avatar.js.map +1 -0
  9. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.css.d.ts +1 -0
  10. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.css.js +34 -0
  11. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.css.js.map +1 -0
  12. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.d.ts +23 -0
  13. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.js +54 -0
  14. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.js.map +1 -0
  15. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/index.d.ts +1 -0
  16. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/index.js +2 -0
  17. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/index.js.map +1 -0
  18. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/p-badge.d.ts +3 -0
  19. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/p-badge.js +10 -0
  20. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/p-badge.js.map +1 -0
  21. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/clock.css.d.ts +1 -0
  22. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/clock.css.js +12 -0
  23. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/clock.css.js.map +1 -0
  24. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/clock.d.ts +27 -0
  25. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/clock.js +58 -0
  26. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/clock.js.map +1 -0
  27. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/index.d.ts +1 -0
  28. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/index.js +2 -0
  29. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/index.js.map +1 -0
  30. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/divider.css.d.ts +1 -0
  31. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/divider.css.js +58 -0
  32. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/divider.css.js.map +1 -0
  33. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/divider.d.ts +28 -0
  34. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/divider.js +68 -0
  35. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/divider.js.map +1 -0
  36. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/index.d.ts +1 -0
  37. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/index.js +2 -0
  38. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/index.js.map +1 -0
  39. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/icon.d.ts +15 -1
  40. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/icon.js +10 -1
  41. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/icon.js.map +1 -1
  42. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/p-icon.d.ts +1 -1
  43. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/p-icon.js +4 -4
  44. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/p-icon.js.map +1 -1
  45. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/index.d.ts +5 -2
  46. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/index.js +5 -2
  47. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/index.js.map +1 -1
  48. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/link/index.d.ts +1 -0
  49. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/link/index.js +2 -0
  50. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/link/index.js.map +1 -0
  51. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/link/link.css.d.ts +2 -0
  52. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/link/link.css.js +36 -0
  53. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/link/link.css.js.map +1 -0
  54. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/link/link.d.ts +12 -0
  55. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/link/link.js +18 -0
  56. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/link/link.js.map +1 -0
  57. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/peacock-loader.js +41 -2
  58. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/peacock-loader.js.map +1 -1
  59. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/styleMixins.css.d.ts +9 -0
  60. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/styleMixins.css.js +46 -0
  61. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/styleMixins.css.js.map +1 -0
  62. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/text/text.css.d.ts +2 -0
  63. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/text/text.css.js +70 -0
  64. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/text/text.css.js.map +1 -0
  65. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/utils.d.ts +1 -1
  66. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/utils.js +32 -7
  67. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/utils.js.map +1 -1
  68. package/.rollup.cache/E/git/redvars/peacock/components/dist/tsconfig.tsbuildinfo +1 -1
  69. package/bin/typedoc-gen.mjs +64 -0
  70. package/custom-elements-manifest.config.mjs +8 -21
  71. package/demo/index.html +21 -9
  72. package/demo/int.html +2 -0
  73. package/dist/assets/styles/tokens.css +8 -1
  74. package/dist/{component/avatar.js → avatar.js} +23 -13
  75. package/dist/avatar.js.map +1 -0
  76. package/dist/badge.js +89 -0
  77. package/dist/badge.js.map +1 -0
  78. package/dist/class-map-DpvLRi0h.js +11 -0
  79. package/dist/class-map-DpvLRi0h.js.map +1 -0
  80. package/dist/clock.js +70 -0
  81. package/dist/clock.js.map +1 -0
  82. package/dist/custom-elements-jsdocs.json +656 -0
  83. package/dist/directive-BKuZRRPO.js +9 -0
  84. package/dist/directive-BKuZRRPO.js.map +1 -0
  85. package/dist/divider.js +123 -0
  86. package/dist/divider.js.map +1 -0
  87. package/dist/{component/Icon.js → icon.js} +15 -9
  88. package/dist/icon.js.map +1 -0
  89. package/dist/index.js +11 -88
  90. package/dist/index.js.map +1 -1
  91. package/dist/peacock-loader.js +141 -3
  92. package/dist/peacock-loader.js.map +1 -1
  93. package/dist/property-D4Kn9TsY.js +63 -0
  94. package/dist/property-D4Kn9TsY.js.map +1 -0
  95. package/dist/src/avatar/avatar.d.ts +16 -3
  96. package/dist/src/avatar/p-avatar.d.ts +3 -0
  97. package/dist/src/badge/badge.css.d.ts +1 -0
  98. package/dist/src/badge/badge.d.ts +23 -0
  99. package/dist/src/badge/index.d.ts +1 -0
  100. package/dist/src/badge/p-badge.d.ts +3 -0
  101. package/dist/src/clock/clock.css.d.ts +1 -0
  102. package/dist/src/clock/clock.d.ts +27 -0
  103. package/dist/src/clock/index.d.ts +1 -0
  104. package/dist/src/divider/divider.css.d.ts +1 -0
  105. package/dist/src/divider/divider.d.ts +28 -0
  106. package/dist/src/divider/index.d.ts +1 -0
  107. package/dist/src/icon/icon.d.ts +15 -1
  108. package/dist/src/icon/p-icon.d.ts +1 -1
  109. package/dist/src/index.d.ts +5 -2
  110. package/dist/src/link/link.css.d.ts +2 -0
  111. package/dist/src/styleMixins.css.d.ts +9 -0
  112. package/dist/src/text/text.css.d.ts +2 -0
  113. package/dist/src/utils.d.ts +1 -1
  114. package/dist/state-CxzmLNIi.js +10 -0
  115. package/dist/state-CxzmLNIi.js.map +1 -0
  116. package/dist/styleMixins.css-CivfMYtB.js +17 -0
  117. package/dist/styleMixins.css-CivfMYtB.js.map +1 -0
  118. package/dist/tsconfig.tsbuildinfo +1 -1
  119. package/dist/{src/utils.js → utils-_5no4mk7.js} +37 -10
  120. package/dist/utils-_5no4mk7.js.map +1 -0
  121. package/package.json +17 -9
  122. package/readme.md +178 -0
  123. package/rollup.config.js +72 -34
  124. package/scratch.mjs +0 -0
  125. package/src/avatar/avatar.css.ts +3 -3
  126. package/src/avatar/avatar.ts +16 -3
  127. package/src/avatar/demo/index.html +2 -2
  128. package/src/avatar/p-avatar.ts +5 -0
  129. package/src/badge/badge.css.ts +34 -0
  130. package/src/badge/badge.ts +51 -0
  131. package/src/badge/demo/index.html +62 -0
  132. package/src/badge/index.ts +1 -0
  133. package/src/badge/p-badge.ts +5 -0
  134. package/src/clock/clock.css.ts +12 -0
  135. package/src/clock/clock.ts +57 -0
  136. package/src/clock/demo/index.html +26 -0
  137. package/src/clock/index.ts +1 -0
  138. package/src/divider/demo/index.html +58 -0
  139. package/src/divider/divider.css.ts +58 -0
  140. package/src/divider/divider.ts +65 -0
  141. package/src/divider/index.ts +1 -0
  142. package/src/icon/demo/index.html +4 -4
  143. package/src/icon/icon.ts +16 -2
  144. package/src/icon/p-icon.ts +1 -1
  145. package/src/index.ts +5 -2
  146. package/src/link/link.css.ts +36 -0
  147. package/src/peacock-loader.ts +49 -2
  148. package/src/styleMixins.css.ts +55 -0
  149. package/src/styles.d.ts +11 -0
  150. package/src/text/text.css.ts +76 -0
  151. package/src/utils.ts +42 -7
  152. package/tsconfig.json +1 -1
  153. package/README.md +0 -46
  154. package/custom-elements.md +0 -268
  155. package/demo/tokens.css +0 -510
  156. package/dist/component/Icon.js.map +0 -1
  157. package/dist/component/avatar.js.map +0 -1
  158. package/dist/icon-1wpxQtrZ.js +0 -341
  159. package/dist/icon-1wpxQtrZ.js.map +0 -1
  160. package/dist/src/LoaderUtils.js +0 -81
  161. package/dist/src/LoaderUtils.js.map +0 -1
  162. package/dist/src/avatar/avatar.css.js +0 -41
  163. package/dist/src/avatar/avatar.css.js.map +0 -1
  164. package/dist/src/avatar/avatar.js +0 -49
  165. package/dist/src/avatar/avatar.js.map +0 -1
  166. package/dist/src/avatar/index.js +0 -2
  167. package/dist/src/avatar/index.js.map +0 -1
  168. package/dist/src/icon/datasource.js +0 -20
  169. package/dist/src/icon/datasource.js.map +0 -1
  170. package/dist/src/icon/icon.css.js +0 -22
  171. package/dist/src/icon/icon.css.js.map +0 -1
  172. package/dist/src/icon/icon.js +0 -124
  173. package/dist/src/icon/icon.js.map +0 -1
  174. package/dist/src/icon/index.js +0 -2
  175. package/dist/src/icon/index.js.map +0 -1
  176. package/dist/src/icon/p-icon.js +0 -15
  177. package/dist/src/icon/p-icon.js.map +0 -1
  178. package/dist/src/index.js +0 -3
  179. package/dist/src/index.js.map +0 -1
  180. package/dist/src/peacock-loader.js +0 -16
  181. package/dist/src/peacock-loader.js.map +0 -1
  182. package/dist/src/utils.js.map +0 -1
  183. package/dist/test/icon.test.js +0 -14
  184. package/dist/test/icon.test.js.map +0 -1
  185. package/dist/utils-CSwoJIcG.js +0 -171
  186. package/dist/utils-CSwoJIcG.js.map +0 -1
  187. package/readme-gen.mjs +0 -11
@@ -0,0 +1,123 @@
1
+ import { i, _ as __decorate, n, a as i$1, b } from './property-D4Kn9TsY.js';
2
+ import { r } from './state-CxzmLNIi.js';
3
+ import { e } from './class-map-DpvLRi0h.js';
4
+ import { o as observerSlotChangesWithCallback } from './utils-_5no4mk7.js';
5
+ import './directive-BKuZRRPO.js';
6
+
7
+ const styles = i `
8
+ :host {
9
+ display: block;
10
+
11
+ --divider-color: var(--color-outline-variant);
12
+ --divider-padding: var(--spacing-200);
13
+ }
14
+
15
+ .divider {
16
+ display: flex;
17
+ margin: 0;
18
+ @include get-typography(body-small-emphasized);
19
+ color: var(--divider-color);
20
+
21
+ &:not(.vertical) {
22
+ width: 100%;
23
+ padding: var(--divider-padding) 0;
24
+ align-items: center;
25
+ justify-content: center;
26
+
27
+ .line {
28
+ width: 100%;
29
+ border-top: 1px solid var(--divider-color);
30
+ }
31
+
32
+ &.slot-has-content .slot-container {
33
+ padding: 0 var(--spacing-200);
34
+ }
35
+ }
36
+
37
+ &.vertical {
38
+ height: 100%;
39
+ padding: 0 var(--divider-padding);
40
+ flex-direction: column;
41
+ align-items: center;
42
+ justify-content: center;
43
+
44
+ .line {
45
+ height: 100%;
46
+ border-right: 1px solid var(--divider-color);
47
+ }
48
+
49
+ &.slot-has-content .slot-container {
50
+ padding: var(--spacing-200) 0;
51
+ }
52
+ }
53
+ }
54
+
55
+ :host(:not([vertical])) {
56
+ width: auto;
57
+ }
58
+
59
+ :host([vertical]) {
60
+ height: auto;
61
+ }
62
+ `;
63
+
64
+ var _Divider_instances;
65
+ /**
66
+ * @label Divider
67
+ * @tag p-divider
68
+ * @rawTag divider
69
+ *
70
+ * @summary The divider component is used to visually separate content.
71
+ * @overview
72
+ * - Dividers are used to separate content into clear groups, making it easier for users to scan and understand the information presented.
73
+ * - They can be oriented either vertically or horizontally, depending on the layout requirements.
74
+ *
75
+ * @cssprop --divider-color - Controls the color of the divider.
76
+ * @cssprop --divider-padding - Controls the padding of the divider.
77
+ *
78
+ * @example
79
+ * ```html
80
+ * <p-divider style="width: 12rem;">or</p-divider>
81
+ * ```
82
+ * @tags display
83
+ */
84
+ class Divider extends i$1 {
85
+ constructor() {
86
+ super(...arguments);
87
+ _Divider_instances.add(this);
88
+ this.vertical = false;
89
+ this.slotHasContent = false;
90
+ }
91
+ firstUpdated() {
92
+ observerSlotChangesWithCallback(this.renderRoot.querySelector('slot'), hasContent => {
93
+ this.slotHasContent = hasContent;
94
+ this.requestUpdate();
95
+ });
96
+ }
97
+ render() {
98
+ return b `<div
99
+ class=${e({
100
+ divider: true,
101
+ vertical: this.vertical,
102
+ 'slot-has-content': this.slotHasContent,
103
+ })}
104
+ >
105
+ <div class="line"></div>
106
+ <div class="slot-container">
107
+ <slot></slot>
108
+ </div>
109
+ <div class="line"></div>
110
+ </div>`;
111
+ }
112
+ }
113
+ _Divider_instances = new WeakSet();
114
+ Divider.styles = [styles];
115
+ __decorate([
116
+ n({ type: Boolean, reflect: true })
117
+ ], Divider.prototype, "vertical", void 0);
118
+ __decorate([
119
+ r()
120
+ ], Divider.prototype, "slotHasContent", void 0);
121
+
122
+ export { Divider };
123
+ //# sourceMappingURL=divider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"divider.js","sources":["../../src/divider/divider.css.ts","../../src/divider/divider.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`\n :host {\n display: block;\n\n --divider-color: var(--color-outline-variant);\n --divider-padding: var(--spacing-200);\n }\n\n .divider {\n display: flex;\n margin: 0;\n @include get-typography(body-small-emphasized);\n color: var(--divider-color);\n\n &:not(.vertical) {\n width: 100%;\n padding: var(--divider-padding) 0;\n align-items: center;\n justify-content: center;\n\n .line {\n width: 100%;\n border-top: 1px solid var(--divider-color);\n }\n\n &.slot-has-content .slot-container {\n padding: 0 var(--spacing-200);\n }\n }\n\n &.vertical {\n height: 100%;\n padding: 0 var(--divider-padding);\n flex-direction: column;\n align-items: center;\n justify-content: center;\n\n .line {\n height: 100%;\n border-right: 1px solid var(--divider-color);\n }\n\n &.slot-has-content .slot-container {\n padding: var(--spacing-200) 0;\n }\n }\n }\n\n :host(:not([vertical])) {\n width: auto;\n }\n\n :host([vertical]) {\n height: auto;\n }\n`;\n","import { html, LitElement } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './divider.css.js';\nimport { observerSlotChangesWithCallback } from '../utils.js';\n\n/**\n * @label Divider\n * @tag p-divider\n * @rawTag divider\n *\n * @summary The divider component is used to visually separate content.\n * @overview\n * - Dividers are used to separate content into clear groups, making it easier for users to scan and understand the information presented.\n * - They can be oriented either vertically or horizontally, depending on the layout requirements.\n *\n * @cssprop --divider-color - Controls the color of the divider.\n * @cssprop --divider-padding - Controls the padding of the divider.\n *\n * @example\n * ```html\n * <p-divider style=\"width: 12rem;\">or</p-divider>\n * ```\n * @tags display\n */\nexport class Divider extends LitElement {\n static styles = [styles];\n\n @property({ type: Boolean, reflect: true }) vertical = false;\n\n @state()\n slotHasContent = false;\n\n firstUpdated() {\n observerSlotChangesWithCallback(\n this.renderRoot.querySelector('slot'),\n hasContent => {\n this.slotHasContent = hasContent;\n this.requestUpdate();\n },\n );\n }\n\n render() {\n return html`<div\n class=${classMap({\n divider: true,\n vertical: this.vertical,\n 'slot-has-content': this.slotHasContent,\n })}\n >\n <div class=\"line\"></div>\n <div class=\"slot-container\">\n <slot></slot>\n </div>\n <div class=\"line\"></div>\n </div>`;\n }\n\n #handleSlotChange(event: { target: any }) {\n const slot = event.target;\n // Check assignedElements length\n this.slotHasContent = slot.assignedNodes({ flatten: true }).length > 0;\n }\n}\n"],"names":["css","LitElement","html","classMap","property","state"],"mappings":";;;;;;AAEO,MAAM,MAAM,GAAGA,CAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDxB;;;ACnDD;;;;;;;;;;;;;;;;;;AAkBG;AACG,MAAO,OAAQ,SAAQC,GAAU,CAAA;AAAvC,IAAA,WAAA,GAAA;;;QAG8C,IAAA,CAAA,QAAQ,GAAG,KAAK;QAG5D,IAAA,CAAA,cAAc,GAAG,KAAK;IAiCxB;IA/BE,YAAY,GAAA;AACV,QAAA,+BAA+B,CAC7B,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,MAAM,CAAC,EACrC,UAAU,IAAG;AACX,YAAA,IAAI,CAAC,cAAc,GAAG,UAAU;YAChC,IAAI,CAAC,aAAa,EAAE;AACtB,QAAA,CAAC,CACF;IACH;IAEA,MAAM,GAAA;AACJ,QAAA,OAAOC,CAAI,CAAA,CAAA;AACD,YAAA,EAAAC,CAAQ,CAAC;AACf,YAAA,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,kBAAkB,EAAE,IAAI,CAAC,cAAc;SACxC,CAAC;;;;;;;WAOG;IACT;;kCAMC;AArCM,OAAA,CAAA,MAAM,GAAG,CAAC,MAAM,CAAC;AAEoB,UAAA,CAAA;IAA3CC,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAAmB,CAAA,EAAA,OAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAG7D,UAAA,CAAA;AADC,IAAAC,CAAK;AACiB,CAAA,EAAA,OAAA,CAAA,SAAA,EAAA,gBAAA,EAAA,MAAA,CAAA;;;;"}
@@ -1,10 +1,7 @@
1
- import { n, i, A, t as t$1, E, e as e$1, c as createCacheFetch, a as i$1, _ as __decorate, b as i$2, d as b, s as sanitizeSvg } from '../utils-CSwoJIcG.js';
2
-
3
- /**
4
- * @license
5
- * Copyright 2017 Google LLC
6
- * SPDX-License-Identifier: BSD-3-Clause
7
- */function r(r){return n({...r,state:true,attribute:false})}
1
+ import { A, E, i as i$1, _ as __decorate, n, a as i$2, b } from './property-D4Kn9TsY.js';
2
+ import { r } from './state-CxzmLNIi.js';
3
+ import { i, t as t$1, e as e$1 } from './directive-BKuZRRPO.js';
4
+ import { c as createCacheFetch, s as sanitizeSvg } from './utils-_5no4mk7.js';
8
5
 
9
6
  /**
10
7
  * @license
@@ -59,15 +56,24 @@ const styles = i$1 `
59
56
  `;
60
57
 
61
58
  /**
59
+ * @label Icon
60
+ * @tag p-icon
61
+ * @rawTag icon
62
62
  * @summary Icons are visual symbols used to represent ideas, objects, or actions.
63
+ * @overview Icons are visual symbols used to represent ideas, objects, or actions. They communicate messages at a glance, afford interactivity, and draw attention to important information.
63
64
  *
64
65
  * @cssprop --icon-color - Controls the color of the icon.
65
66
  * @cssprop [--icon-size=1rem] - Controls the size of the icon. Defaults to "1rem"
67
+ *
68
+ * @example
69
+ * ```html
70
+ * <p-icon name="home"></p-icon>
71
+ * ```
72
+ *
66
73
  */
67
74
  class Icon extends i$2 {
68
75
  constructor() {
69
76
  super(...arguments);
70
- this.name = 'home';
71
77
  this.provider = 'material-symbols';
72
78
  this.svgContent = '';
73
79
  // loading + error states for consumers/tests
@@ -171,4 +177,4 @@ __decorate([
171
177
  ], Icon.prototype, "error", void 0);
172
178
 
173
179
  export { Icon };
174
- //# sourceMappingURL=Icon.js.map
180
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.js","sources":["../node_modules/lit-html/directives/unsafe-html.js","../node_modules/lit-html/directives/unsafe-svg.js","../../src/icon/datasource.ts","../../src/icon/icon.css.ts","../../src/icon/icon.ts"],"sourcesContent":["import{nothing as t,noChange as i}from\"../lit-html.js\";import{directive as r,Directive as s,PartType as n}from\"../directive.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class e extends s{constructor(i){if(super(i),this.it=t,i.type!==n.CHILD)throw Error(this.constructor.directiveName+\"() can only be used in child bindings\")}render(r){if(r===t||null==r)return this._t=void 0,this.it=r;if(r===i)return r;if(\"string\"!=typeof r)throw Error(this.constructor.directiveName+\"() called with a non-string value\");if(r===this.it)return this._t;this.it=r;const s=[r];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}}e.directiveName=\"unsafeHTML\",e.resultType=1;const o=r(e);export{e as UnsafeHTMLDirective,o as unsafeHTML};\n//# sourceMappingURL=unsafe-html.js.map\n","import{directive as s}from\"../directive.js\";import{UnsafeHTMLDirective as e}from\"./unsafe-html.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class t extends e{}t.directiveName=\"unsafeSVG\",t.resultType=2;const o=s(t);export{o as unsafeSVG};\n//# sourceMappingURL=unsafe-svg.js.map\n","import { createCacheFetch } from '../utils.js';\n\nconst PROVIDERS: Record<string, (name: string) => string> = {\n 'material-symbols': (name: string) =>\n `https://cdn.jsdelivr.net/npm/@material-symbols/svg-500@0.40.1/outlined/${name}.svg`,\n carbon: (name: string) =>\n `https://cdn.jsdelivr.net/npm/@carbon/icons@11.41.0/svg/32/${name}.svg`,\n};\n\nconst cacheFetch = await createCacheFetch('svg-cache');\n\nexport async function fetchSVG(url: string) {\n if (!url) return '';\n return cacheFetch(url);\n}\n\nexport async function fetchIcon(\n name: string,\n provider: string = 'material-symbols',\n) {\n if (!name) return '';\n\n if (!PROVIDERS[provider]) {\n throw new Error(`Provider '${provider}' not found`);\n }\n\n return fetchSVG(PROVIDERS[provider](name));\n}\n","import { css } from 'lit';\n\nexport const styles = css`\n :host {\n display: inline-block;\n line-height: 0;\n --icon-size: inherit;\n --icon-color: inherit;\n }\n\n .icon {\n display: inline-block;\n height: var(--icon-size, 1rem);\n width: var(--icon-size, 1rem);\n\n svg {\n fill: var(--icon-color);\n height: 100%;\n width: 100%;\n }\n }\n`;\n","import { html, LitElement } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { unsafeSVG } from 'lit/directives/unsafe-svg.js';\nimport { fetchIcon, fetchSVG } from './datasource.js';\nimport { sanitizeSvg } from '../utils.js';\nimport { styles } from './icon.css.js';\n\n/**\n * @label Icon\n * @tag p-icon\n * @rawTag icon\n * @summary Icons are visual symbols used to represent ideas, objects, or actions.\n * @overview Icons are visual symbols used to represent ideas, objects, or actions. They communicate messages at a glance, afford interactivity, and draw attention to important information.\n *\n * @cssprop --icon-color - Controls the color of the icon.\n * @cssprop [--icon-size=1rem] - Controls the size of the icon. Defaults to \"1rem\"\n *\n * @example\n * ```html\n * <p-icon name=\"home\"></p-icon>\n * ```\n *\n */\nexport class Icon extends LitElement {\n static styles = [styles];\n\n /**\n * The identifier for the icon.\n * This name corresponds to a specific SVG asset in the icon set.\n */\n @property({ type: String, reflect: true }) name?: string;\n\n @property({ type: String, reflect: true }) src?: string;\n\n @property({ type: String }) provider: 'material-symbols' | 'carbon' =\n 'material-symbols';\n\n @state()\n private svgContent: string = '';\n\n // loading + error states for consumers/tests\n @state()\n private loading: boolean = false;\n\n @state()\n private error: Error | null = null;\n\n // token to avoid race conditions when multiple fetches overlap\n private _fetchId = 0;\n\n // optional debounce for rapid property changes\n private _debounceTimer: number | undefined;\n\n firstUpdated() {\n // perform initial fetch once component is connected and rendered\n this.__scheduleUpdate();\n }\n\n updated(changedProperties: any) {\n // only refetch when name or src changed\n if (changedProperties.has('name') || changedProperties.has('src')) {\n this.__scheduleUpdate();\n }\n }\n\n render() {\n // accessible wrapper; consumers can provide a fallback via <slot name=\"fallback\">.\n return html` <div class=\"icon\">\n ${this.svgContent\n ? unsafeSVG(this.svgContent)\n : html`<slot name=\"fallback\"></slot>`}\n </div>`;\n }\n\n // small debounce to coalesce rapid changes (50ms)\n private __scheduleUpdate() {\n if (this._debounceTimer) {\n clearTimeout(this._debounceTimer as any);\n }\n // @ts-ignore - setTimeout in DOM returns number\n this._debounceTimer = window.setTimeout(() => this.__updateSvg(), 50);\n }\n\n /**\n * @internal\n */\n private async __updateSvg() {\n this._fetchId += 1;\n const currentId = this._fetchId;\n this.loading = true;\n this.error = null;\n\n try {\n let raw: string | undefined;\n\n if (this.name) {\n raw = await fetchIcon(this.name, this.provider);\n } else if (this.src) {\n raw = await fetchSVG(this.src);\n } else {\n raw = '';\n }\n\n // If another fetch started after this one, ignore this result\n if (currentId !== this._fetchId) return;\n\n if (raw) {\n this.svgContent = sanitizeSvg(raw);\n } else {\n this.svgContent = '';\n }\n } catch (err: any) {\n // capture and surface error, but avoid throwing\n this.error = err instanceof Error ? err : new Error(String(err));\n this.svgContent = '';\n // bubble an event so consumers can react\n this.dispatchEvent(\n new CustomEvent('icon-error', {\n detail: { name: this.name, src: this.src, error: this.error },\n bubbles: true,\n composed: true,\n }),\n );\n } finally {\n // ensure loading is cleared unless another fetch started\n if (currentId === this._fetchId) {\n this.loading = false;\n }\n }\n }\n}\n"],"names":["s","t","n","i","css","LitElement","html","unsafeSVG","property","state"],"mappings":";;;;;AACA;AACA;AACA;AACA;AACA,GAAG,MAAM,CAAC,SAASA,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAACC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAGC,GAAC,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,uCAAuC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAGD,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAGE,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,QAAQ,EAAE,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,mCAAmC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC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AAA,MAAA,CAAA;AAEd,UAAA,CAAA;IAA1CA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AAAe,CAAA,EAAA,IAAA,CAAA,SAAA,EAAA,KAAA,EAAA,MAAA,CAAA;AAE5B,UAAA,CAAA;AAA3B,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;AACL,CAAA,EAAA,IAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAGb,UAAA,CAAA;AADP,IAAAC,CAAK;AAC0B,CAAA,EAAA,IAAA,CAAA,SAAA,EAAA,YAAA,EAAA,MAAA,CAAA;AAIxB,UAAA,CAAA;AADP,IAAAA,CAAK;AAC2B,CAAA,EAAA,IAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAGzB,UAAA,CAAA;AADP,IAAAA,CAAK;AAC6B,CAAA,EAAA,IAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;;;;","x_google_ignoreList":[0,1]}
package/dist/index.js CHANGED
@@ -1,89 +1,12 @@
1
- import { e as e$1, i, t, E, r, g as getTypography, a as i$1, _ as __decorate, n, b as i$2, c as b } from './icon-1wpxQtrZ.js';
2
- export { I as Icon } from './icon-1wpxQtrZ.js';
3
-
4
- /**
5
- * @license
6
- * Copyright 2018 Google LLC
7
- * SPDX-License-Identifier: BSD-3-Clause
8
- */const e=e$1(class extends i{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter(s=>t[s]).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return E}});
9
-
10
- const styles = i$1 `
11
- :host {
12
- display: inline-block;
13
- pointer-events: none;
14
- --avatar-size: 2rem;
15
- --avatar-background-color: var(--color-primary);
16
- --avatar-text-color: var(--color-on-primary);
17
- --avatar-border-radius: var(--global-avatar-border-radius);
18
- }
19
-
20
- .avatar-container {
21
- display: flex;
22
- align-items: center;
23
- gap: var(--spacing-050);
24
- line-height: 0;
25
- }
26
-
27
- .avatar {
28
- border-radius: var(--avatar-border-radius);
29
- display: flex;
30
- justify-content: center;
31
- align-items: center;
32
- color: var(--avatar-text-color);
33
- width: var(--avatar-size);
34
- height: var(--avatar-size);
35
- ${r(getTypography('body-large-emphasized'))}
36
- background-color: var(--avatar-background-color);
37
-
38
- font-size: calc(var(--avatar-size) * 0.4);
39
-
40
- .image {
41
- width: 100%;
42
- height: 100%;
43
- overflow: hidden;
44
- border-radius: inherit;
45
- }
46
- }
47
- `;
48
-
49
- /**
50
- * @summary Icons are visual symbols used to represent ideas, objects, or actions.
51
- *
52
- * @cssprop --icon-color - Controls the color of the icon.
53
- * @cssprop --icon-size - Controls the size of the icon.
54
- */
55
- class Avatar extends i$2 {
56
- constructor() {
57
- super(...arguments);
58
- this.name = '';
59
- }
60
- render() {
61
- return b `<div class="avatar-container">
62
- <div
63
- class=${e({
64
- avatar: true,
65
- initials: !this.src,
66
- image: !!this.src,
67
- })}
68
- >
69
- ${this.src
70
- ? b `<img class="image" src=${this.src} alt=${this.name} />`
71
- : b `<div class="initials">${this.__getInitials()}</div>`}
72
- </div>
73
- </div>`;
74
- }
75
- __getInitials() {
76
- const [first = '', last = ''] = this.name.split(' ');
77
- return `${first.charAt(0)}${last.charAt(0)}`.toUpperCase();
78
- }
79
- }
80
- Avatar.styles = [styles];
81
- __decorate([
82
- n({ type: String, reflect: true })
83
- ], Avatar.prototype, "name", void 0);
84
- __decorate([
85
- n({ type: String, reflect: true })
86
- ], Avatar.prototype, "src", void 0);
87
-
88
- export { Avatar };
1
+ export { Icon } from './icon.js';
2
+ export { Avatar } from './avatar.js';
3
+ export { Badge } from './badge.js';
4
+ export { Divider } from './divider.js';
5
+ export { Clock } from './clock.js';
6
+ import './property-D4Kn9TsY.js';
7
+ import './state-CxzmLNIi.js';
8
+ import './directive-BKuZRRPO.js';
9
+ import './utils-_5no4mk7.js';
10
+ import './class-map-DpvLRi0h.js';
11
+ import './styleMixins.css-CivfMYtB.js';
89
12
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../node_modules/lit-html/directives/class-map.js","../../src/avatar/avatar.css.ts","../../src/avatar/avatar.ts"],"sourcesContent":["import{noChange as t}from\"../lit-html.js\";import{directive as s,Directive as i,PartType as r}from\"../directive.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=s(class extends i{constructor(t){if(super(t),t.type!==r.ATTRIBUTE||\"class\"!==t.name||t.strings?.length>2)throw Error(\"`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.\")}render(t){return\" \"+Object.keys(t).filter(s=>t[s]).join(\" \")+\" \"}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(\" \").split(/\\s/).filter(t=>\"\"!==t)));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)))}return t}});export{e as classMap};\n//# sourceMappingURL=class-map.js.map\n","import { css, unsafeCSS } from 'lit';\nimport { getTypography } from '../utils.js';\n\nexport const styles = css`\n :host {\n display: inline-block;\n pointer-events: none;\n --avatar-size: 2rem;\n --avatar-background-color: var(--color-primary);\n --avatar-text-color: var(--color-on-primary);\n --avatar-border-radius: var(--global-avatar-border-radius);\n }\n\n .avatar-container {\n display: flex;\n align-items: center;\n gap: var(--spacing-050);\n line-height: 0;\n }\n\n .avatar {\n border-radius: var(--avatar-border-radius);\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--avatar-text-color);\n width: var(--avatar-size);\n height: var(--avatar-size);\n ${unsafeCSS(getTypography('body-large-emphasized'))}\n background-color: var(--avatar-background-color);\n\n font-size: calc(var(--avatar-size) * 0.4);\n\n .image {\n width: 100%;\n height: 100%;\n overflow: hidden;\n border-radius: inherit;\n }\n }\n`;\n","import { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './avatar.css.js';\n\n/**\n * @summary Icons are visual symbols used to represent ideas, objects, or actions.\n *\n * @cssprop --icon-color - Controls the color of the icon.\n * @cssprop --icon-size - Controls the size of the icon.\n */\nexport class Avatar extends LitElement {\n static styles = [styles];\n\n @property({ type: String, reflect: true }) name: string = '';\n\n @property({ type: String, reflect: true }) src?: string;\n\n render() {\n return html`<div class=\"avatar-container\">\n <div\n class=${classMap({\n avatar: true,\n initials: !this.src,\n image: !!this.src,\n })}\n >\n ${this.src\n ? html`<img class=\"image\" src=${this.src} alt=${this.name} />`\n : html`<div class=\"initials\">${this.__getInitials()}</div>`}\n </div>\n </div>`;\n }\n\n private __getInitials() {\n const [first = '', last = ''] = this.name.split(' ');\n return `${first.charAt(0)}${last.charAt(0)}`.toUpperCase();\n }\n}\n"],"names":["s","t","r","css","unsafeCSS","LitElement","html","classMap","property"],"mappings":";;;AACA;AACA;AACA;AACA;AACA,GAAG,MAAM,CAAC,CAACA,GAAC,CAAC,cAAc,CAAC,CAAC,WAAW,CAACC,GAAC,CAAC,CAAC,GAAG,KAAK,CAACA,GAAC,CAAC,CAACA,GAAC,CAAC,IAAI,GAAGC,CAAC,CAAC,SAAS,EAA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AAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;AACpD,QAAA,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA,EAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,WAAW,EAAE;IAC5D;;AAzBO,MAAA,CAAA,MAAM,GAAG,CAAC,MAAM,CAAC;AAEmB,UAAA,CAAA;IAA1CE,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AAAoB,CAAA,EAAA,MAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAElB,UAAA,CAAA;IAA1CA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AAAe,CAAA,EAAA,MAAA,CAAA,SAAA,EAAA,KAAA,EAAA,MAAA,CAAA;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -1,4 +1,15 @@
1
- import { I as Icon } from './icon-1wpxQtrZ.js';
1
+ import { Icon } from './icon.js';
2
+ import { Avatar } from './avatar.js';
3
+ import { Badge } from './badge.js';
4
+ import { Divider } from './divider.js';
5
+ import { r, i } from './property-D4Kn9TsY.js';
6
+ import { f as focusRing, g as getTypography } from './styleMixins.css-CivfMYtB.js';
7
+ import './state-CxzmLNIi.js';
8
+ import './directive-BKuZRRPO.js';
9
+ import './utils-_5no4mk7.js';
10
+ import './class-map-DpvLRi0h.js';
11
+
12
+ var cssComponentsStyleSheet = "/* -------------------------------------------\n * Autogenerated by ⛋ Terrazzo. DO NOT EDIT!\n * ------------------------------------------- */\n\n:root {\n --color-black: #000000;\n --color-blue: #305cde;\n --color-blue-0: #000000;\n --color-blue-10: #001550;\n --color-blue-20: #00277f;\n --color-blue-30: #003ab2;\n --color-blue-40: #2352d5;\n --color-blue-50: #446def;\n --color-blue-60: #6789ff;\n --color-blue-70: #90a7ff;\n --color-blue-80: #b6c4ff;\n --color-blue-90: #dce1ff;\n --color-blue-95: #eff0ff;\n --color-blue-98: #faf8ff;\n --color-blue-100: #ffffff;\n --color-error: var(--color-red);\n --color-error-0: var(--color-red-0);\n --color-error-10: var(--color-red-10);\n --color-error-20: var(--color-red-20);\n --color-error-30: var(--color-red-30);\n --color-error-40: var(--color-red-40);\n --color-error-50: var(--color-red-50);\n --color-error-60: var(--color-red-60);\n --color-error-70: var(--color-red-70);\n --color-error-80: var(--color-red-80);\n --color-error-90: var(--color-red-90);\n --color-error-95: var(--color-red-95);\n --color-error-98: var(--color-red-98);\n --color-error-100: var(--color-red-100);\n --color-error-container: var(--color-error-90);\n --color-green: #2e6f40;\n --color-green-0: #000000;\n --color-green-10: #00210b;\n --color-green-20: #003917;\n --color-green-30: #005225;\n --color-green-40: #0f6d35;\n --color-green-50: #31874b;\n --color-green-60: #4da163;\n --color-green-70: #68bd7b;\n --color-green-80: #83d995;\n --color-green-90: #9ff6af;\n --color-green-95: #c4ffcb;\n --color-green-98: #eaffe9;\n --color-green-100: #ffffff;\n --color-inverse-error: var(--color-error-80);\n --color-inverse-on-surface: var(--color-neutral-95);\n --color-inverse-primary: var(--color-primary-80);\n --color-inverse-secondary: var(--color-secondary-80);\n --color-inverse-surface: var(--color-neutral-20);\n --color-inverse-tertiary: var(--color-tertiary-80);\n --color-neutral: #747878;\n --color-neutral-0: #000000;\n --color-neutral-4: #0b0f0f;\n --color-neutral-6: #101415;\n --color-neutral-10: #191c1d;\n --color-neutral-12: #1d2021;\n --color-neutral-17: #272b2b;\n --color-neutral-20: #2e3132;\n --color-neutral-22: #323536;\n --color-neutral-30: #444748;\n --color-neutral-40: #5c5f5f;\n --color-neutral-50: #747878;\n --color-neutral-60: #8e9192;\n --color-neutral-70: #a9acac;\n --color-neutral-80: #c4c7c7;\n --color-neutral-87: #d8dadb;\n --color-neutral-90: #e1e3e3;\n --color-neutral-92: #e6e8e9;\n --color-neutral-94: #eceeef;\n --color-neutral-95: #eff1f1;\n --color-neutral-96: #f2f4f4;\n --color-neutral-98: #f8fafa;\n --color-neutral-99: #fafdfd;\n --color-neutral-100: #ffffff;\n --color-neutral-variant: #6f797a;\n --color-neutral-variant-0: #000000;\n --color-neutral-variant-4: #071011;\n --color-neutral-variant-6: #0c1516;\n --color-neutral-variant-10: #141d1f;\n --color-neutral-variant-12: #182123;\n --color-neutral-variant-17: #222b2d;\n --color-neutral-variant-20: #293234;\n --color-neutral-variant-22: #2d3638;\n --color-neutral-variant-30: #3f484a;\n --color-neutral-variant-40: #576062;\n --color-neutral-variant-50: #6f797a;\n --color-neutral-variant-60: #899294;\n --color-neutral-variant-70: #a3adaf;\n --color-neutral-variant-80: #bfc8ca;\n --color-neutral-variant-87: #d2dcde;\n --color-neutral-variant-90: #dbe4e6;\n --color-neutral-variant-92: #e0eaec;\n --color-neutral-variant-94: #e6f0f1;\n --color-neutral-variant-95: #e9f2f4;\n --color-neutral-variant-96: #ecf5f7;\n --color-neutral-variant-98: #f2fbfd;\n --color-neutral-variant-99: #f6feff;\n --color-neutral-variant-100: #ffffff;\n --color-on-error: var(--color-error-100);\n --color-on-error-container: var(--color-error-10);\n --color-on-primary: var(--color-primary-100);\n --color-on-primary-container: var(--color-primary-10);\n --color-on-secondary: var(--color-secondary-100);\n --color-on-secondary-container: var(--color-secondary-10);\n --color-on-surface: var(--color-neutral-10);\n --color-on-surface-variant: var(--color-neutral-variant-30);\n --color-on-tertiary: var(--color-tertiary-100);\n --color-on-tertiary-container: var(--color-tertiary-10);\n --color-orange: #ff7518;\n --color-orange-0: #000000;\n --color-orange-10: #341100;\n --color-orange-20: #552100;\n --color-orange-30: #783100;\n --color-orange-40: #9e4300;\n --color-orange-50: #c55500;\n --color-orange-60: #ee6803;\n --color-orange-70: #ff8d4c;\n --color-orange-80: #ffb691;\n --color-orange-90: #ffdbcb;\n --color-orange-95: #ffede6;\n --color-orange-98: #fff8f6;\n --color-orange-100: #ffffff;\n --color-outline: var(--color-neutral-variant-50);\n --color-outline-variant: var(--color-neutral-variant-80);\n --color-primary: var(--color-primary-40);\n --color-primary-0: #000000;\n --color-primary-10: #001a42;\n --color-primary-20: #002e6b;\n --color-primary-30: #004396;\n --color-primary-40: #005ac4;\n --color-primary-50: #2673e8;\n --color-primary-60: #4f8eff;\n --color-primary-70: #82aaff;\n --color-primary-80: #aec6ff;\n --color-primary-90: #d8e2ff;\n --color-primary-95: #edf0ff;\n --color-primary-98: #faf9ff;\n --color-primary-100: #ffffff;\n --color-primary-container: var(--color-primary-90);\n --color-purple: #e40078;\n --color-purple-0: #000000;\n --color-purple-10: #3f001c;\n --color-purple-20: #650032;\n --color-purple-30: #8e0048;\n --color-purple-40: #ba0061;\n --color-purple-50: #e6067a;\n --color-purple-60: #ff4993;\n --color-purple-70: #ff84ad;\n --color-purple-80: #ffb1c7;\n --color-purple-90: #ffd9e2;\n --color-purple-95: #ffecef;\n --color-purple-98: #fff8f8;\n --color-purple-100: #ffffff;\n --color-red: #e73121;\n --color-red-0: #000000;\n --color-red-10: #410000;\n --color-red-20: #690000;\n --color-red-30: #930000;\n --color-red-40: #be0c05;\n --color-red-50: #e32e1f;\n --color-red-60: #ff5541;\n --color-red-70: #ff8a78;\n --color-red-80: #ffb4a8;\n --color-red-90: #ffdad4;\n --color-red-95: #ffedea;\n --color-red-98: #fff8f6;\n --color-red-100: #ffffff;\n --color-scrim: var(--color-neutral-0);\n --color-secondary: var(--color-secondary-40);\n --color-secondary-0: #000000;\n --color-secondary-10: #141b2c;\n --color-secondary-20: #293041;\n --color-secondary-30: #3f4759;\n --color-secondary-40: #575e71;\n --color-secondary-50: #6f778b;\n --color-secondary-60: #8990a5;\n --color-secondary-70: #a4abc0;\n --color-secondary-80: #bfc6dc;\n --color-secondary-90: #dbe2f9;\n --color-secondary-95: #edf0ff;\n --color-secondary-98: #faf9ff;\n --color-secondary-100: #ffffff;\n --color-secondary-container: var(--color-secondary-90);\n --color-shadow: var(--color-neutral-0);\n --color-success: var(--color-green);\n --color-success-0: var(--color-green-0);\n --color-success-10: var(--color-green-10);\n --color-success-20: var(--color-green-20);\n --color-success-30: var(--color-green-30);\n --color-success-40: var(--color-green-40);\n --color-success-50: var(--color-green-50);\n --color-success-60: var(--color-green-60);\n --color-success-70: var(--color-green-70);\n --color-success-80: var(--color-green-80);\n --color-success-90: var(--color-green-90);\n --color-success-95: var(--color-green-95);\n --color-success-98: var(--color-green-98);\n --color-success-100: var(--color-green-100);\n --color-surface: var(--color-neutral-99);\n --color-surface-container: var(--color-neutral-94);\n --color-surface-container-high: var(--color-neutral-92);\n --color-surface-container-highest: var(--color-neutral-90);\n --color-surface-container-low: var(--color-neutral-96);\n --color-surface-container-lowest: var(--color-neutral-100);\n --color-surface-dim: var(--color-neutral-87);\n --color-surface-variant: var(--color-neutral-variant-90);\n --color-tertiary: var(--color-tertiary-40);\n --color-tertiary-0: #000000;\n --color-tertiary-10: #29132d;\n --color-tertiary-20: #402843;\n --color-tertiary-30: #583e5a;\n --color-tertiary-40: #715573;\n --color-tertiary-50: #8b6d8d;\n --color-tertiary-60: #a686a7;\n --color-tertiary-70: #c2a1c2;\n --color-tertiary-80: #dfbcdf;\n --color-tertiary-90: #fcd7fb;\n --color-tertiary-95: #ffebfc;\n --color-tertiary-98: #fff7fa;\n --color-tertiary-100: #ffffff;\n --color-tertiary-container: var(--color-tertiary-90);\n --color-warning: var(--color-yellow);\n --color-warning-0: var(--color-yellow-0);\n --color-warning-10: var(--color-yellow-10);\n --color-warning-20: var(--color-yellow-20);\n --color-warning-30: var(--color-yellow-30);\n --color-warning-40: var(--color-yellow-40);\n --color-warning-50: var(--color-yellow-50);\n --color-warning-60: var(--color-yellow-60);\n --color-warning-70: var(--color-yellow-70);\n --color-warning-80: var(--color-yellow-80);\n --color-warning-90: var(--color-yellow-90);\n --color-warning-95: var(--color-yellow-95);\n --color-warning-98: var(--color-yellow-98);\n --color-warning-100: var(--color-yellow-100);\n --color-white: #ffffff;\n --color-yellow: #ffed29;\n --color-yellow-0: #000000;\n --color-yellow-10: #1f1c00;\n --color-yellow-20: #363100;\n --color-yellow-30: #4e4800;\n --color-yellow-40: #686000;\n --color-yellow-50: #837900;\n --color-yellow-60: #9f9300;\n --color-yellow-70: #bcae00;\n --color-yellow-80: #d9c900;\n --color-yellow-90: #f7e61e;\n --color-yellow-95: #fff392;\n --color-yellow-98: #fff9e6;\n --color-yellow-100: #ffffff;\n --container-lg: 1056px; /* Large container width. Intended for standard desktop layouts with typical content density. */\n --container-max: 1584px; /* Maximum container width. Use when constraining very wide layouts to maintain readable line lengths. */\n --container-md: 672px; /* Medium container width. Suitable for tablet layouts and compact desktop content areas. */\n --container-sm: 320px; /* Small container width. Use for narrow layouts and small screens such as mobile devices. */\n --container-xl: 1312px; /* Extra large container width. Use for wide desktop displays and content-heavy pages. */\n --duration-long1: 450ms; /* These durations are often paired with Emphasized easing. */\n --duration-long2: 500ms; /* These durations are often paired with Emphasized easing. */\n --duration-medium1: 250ms; /* These are used for medium duration transitions, like modal animations. */\n --duration-medium2: 300ms; /* These are used for medium duration transitions, like modal animations. */\n --duration-short1: 50ms; /* These are used for small utility-focused transitions. Like checkbox animations. */\n --duration-short2: 100ms; /* These are used for small utility-focused transitions. Like checkbox animations. */\n --duration-short3: 150ms; /* These are used for small utility-focused transitions. Like checkbox animations. */\n --duration-short4: 200ms; /* These are used for small utility-focused transitions. Like checkbox animations. */\n --easing-linear: cubic-bezier(0, 0, 1, 1);\n --easing-standard: cubic-bezier(0.2, 0, 0, 1);\n --font-family-brand: \"Noto Sans\", sans-serif; /* The font family used for brand headings and titles. */\n --font-family-monospace: \"Noto Sans Mono\", monospace; /* The font family used for code snippets and monospaced text. */\n --font-family-sans: \"Noto Sans\", sans-serif; /* The primary font family used for body text and general content. */\n --font-weight-bold: 700; /* Bold weight for emphasis. 700 weight. */\n --font-weight-medium: 500; /* Slightly heavier than regular weight. 500 weight. */\n --font-weight-regular: 400; /* Standard weight for regular text. 400 weight. */\n --font-weight-semi-bold: 600; /* Heavier than medium weight. 600 weight. */\n --global-avatar-border-radius: var(--shape-corner-full);\n --global-badge-color: var(--color-error-40);\n --shape-corner-full: 9999px;\n --shape-corner-large: 12px;\n --shape-corner-medium: 8px;\n --shape-corner-none: 0;\n --shape-corner-small: 4px;\n --spacing-000: 0; /* No spacing (base × 0). */\n --spacing-025: 0.125rem; /* 2px - Smallest increment (base × 0.125). */\n --spacing-050: 0.25rem; /* 4px - Extra small spacing (base × 0.25). */\n --spacing-100: 0.5rem; /* 8px - Small spacing (base × 0.5). */\n --spacing-150: 0.75rem; /* 12px - Small-medium spacing (base × 0.75). */\n --spacing-200: 1rem; /* 16px - Base spacing unit (base × 1). */\n --spacing-300: 1.5rem; /* 24px - Medium spacing (base × 1.5). */\n --spacing-400: 2rem; /* 32px - Medium-large spacing (base × 2). */\n --spacing-500: 2.5rem; /* 40px - Large spacing (base × 2.5). */\n --spacing-600: 3rem; /* 48px - Extra large spacing (base × 3). */\n --spacing-800: 4rem; /* 64px - Huge spacing (base × 4). */\n --spacing-1000: 5rem; /* 80px - Massive spacing (base × 5). */\n --spacing-1200: 6rem; /* 96px - Gigantic spacing (base × 6). */\n --spacing-2000: 10rem; /* 160px - Maximum defined spacing (base × 10). */\n --spacing-base: 1rem; /* Base spacing unit (1rem = 16px). */\n --typography-body-large-emphasized-font-family: var(--font-family-sans);\n --typography-body-large-emphasized-font-size: 1rem;\n --typography-body-large-emphasized-font-weight: var(--font-weight-medium);\n --typography-body-large-emphasized-letter-spacing: 0.5px;\n --typography-body-large-emphasized-line-height: 1.5rem;\n --typography-body-large-font-family: var(--font-family-sans);\n --typography-body-large-font-size: 1rem;\n --typography-body-large-font-weight: var(--font-weight-regular);\n --typography-body-large-letter-spacing: 0.5px;\n --typography-body-large-line-height: 1.5rem;\n --typography-body-medium-emphasized-font-family: var(--font-family-sans);\n --typography-body-medium-emphasized-font-size: 0.875rem;\n --typography-body-medium-emphasized-font-weight: var(--font-weight-medium);\n --typography-body-medium-emphasized-letter-spacing: 0.25px;\n --typography-body-medium-emphasized-line-height: 1.25rem;\n --typography-body-medium-font-family: var(--font-family-sans);\n --typography-body-medium-font-size: 0.875rem;\n --typography-body-medium-font-weight: var(--font-weight-regular);\n --typography-body-medium-letter-spacing: 0.25px;\n --typography-body-medium-line-height: 1.25rem;\n --typography-body-small-emphasized-font-family: var(--font-family-sans);\n --typography-body-small-emphasized-font-size: 0.75rem;\n --typography-body-small-emphasized-font-weight: var(--font-weight-medium);\n --typography-body-small-emphasized-letter-spacing: 0.4000000059604645px;\n --typography-body-small-emphasized-line-height: 1rem;\n --typography-body-small-font-family: var(--font-family-sans);\n --typography-body-small-font-size: 0.75rem;\n --typography-body-small-font-weight: var(--font-weight-regular);\n --typography-body-small-letter-spacing: 0.4000000059604645px;\n --typography-body-small-line-height: 1rem;\n --typography-code-large-emphasized-font-family: var(--font-family-monospace);\n --typography-code-large-emphasized-font-size: 1rem;\n --typography-code-large-emphasized-font-weight: var(--font-weight-medium);\n --typography-code-large-emphasized-letter-spacing: 0.5px;\n --typography-code-large-emphasized-line-height: 1.5rem;\n --typography-code-large-font-family: var(--font-family-monospace);\n --typography-code-large-font-size: 1rem;\n --typography-code-large-font-weight: var(--font-weight-regular);\n --typography-code-large-letter-spacing: 0.5px;\n --typography-code-large-line-height: 1.5rem;\n --typography-code-medium-emphasized-font-family: var(--font-family-monospace);\n --typography-code-medium-emphasized-font-size: 0.875rem;\n --typography-code-medium-emphasized-font-weight: var(--font-weight-medium);\n --typography-code-medium-emphasized-letter-spacing: 0.25px;\n --typography-code-medium-emphasized-line-height: 1.25rem;\n --typography-code-medium-font-family: var(--font-family-monospace);\n --typography-code-medium-font-size: 0.875rem;\n --typography-code-medium-font-weight: var(--font-weight-regular);\n --typography-code-medium-letter-spacing: 0.25px;\n --typography-code-medium-line-height: 1.25rem;\n --typography-code-small-emphasized-font-family: var(--font-family-monospace);\n --typography-code-small-emphasized-font-size: 0.75rem;\n --typography-code-small-emphasized-font-weight: var(--font-weight-medium);\n --typography-code-small-emphasized-letter-spacing: 0.4000000059604645px;\n --typography-code-small-emphasized-line-height: 1rem;\n --typography-code-small-font-family: var(--font-family-monospace);\n --typography-code-small-font-size: 0.75rem;\n --typography-code-small-font-weight: var(--font-weight-regular);\n --typography-code-small-letter-spacing: 0.4000000059604645px;\n --typography-code-small-line-height: 1rem;\n --typography-display-large-emphasized-font-family: var(--font-family-sans);\n --typography-display-large-emphasized-font-size: 3.5625rem;\n --typography-display-large-emphasized-font-weight: var(--font-weight-medium);\n --typography-display-large-emphasized-letter-spacing: -0.25px;\n --typography-display-large-emphasized-line-height: 4rem;\n --typography-display-large-font-family: var(--font-family-sans);\n --typography-display-large-font-size: 3.5625rem;\n --typography-display-large-font-weight: var(--font-weight-regular);\n --typography-display-large-letter-spacing: -0.25px;\n --typography-display-large-line-height: 4rem;\n --typography-display-medium-emphasized-font-family: var(--font-family-sans);\n --typography-display-medium-emphasized-font-size: 2.8125rem;\n --typography-display-medium-emphasized-font-weight: var(--font-weight-medium);\n --typography-display-medium-emphasized-letter-spacing: 0;\n --typography-display-medium-emphasized-line-height: 3.25rem;\n --typography-display-medium-font-family: var(--font-family-sans);\n --typography-display-medium-font-size: 2.8125rem;\n --typography-display-medium-font-weight: var(--font-weight-regular);\n --typography-display-medium-letter-spacing: 0;\n --typography-display-medium-line-height: 3.25rem;\n --typography-display-small-emphasized-font-family: var(--font-family-sans);\n --typography-display-small-emphasized-font-size: 2.25rem;\n --typography-display-small-emphasized-font-weight: var(--font-weight-medium);\n --typography-display-small-emphasized-letter-spacing: 0;\n --typography-display-small-emphasized-line-height: 2.75rem;\n --typography-display-small-font-family: var(--font-family-sans);\n --typography-display-small-font-size: 2.25rem;\n --typography-display-small-font-weight: var(--font-weight-regular);\n --typography-display-small-letter-spacing: 0;\n --typography-display-small-line-height: 2.75rem;\n --typography-headline-large-emphasized-font-family: var(--font-family-sans);\n --typography-headline-large-emphasized-font-size: 2rem;\n --typography-headline-large-emphasized-font-weight: var(--font-weight-medium);\n --typography-headline-large-emphasized-letter-spacing: 0;\n --typography-headline-large-emphasized-line-height: 2.5rem;\n --typography-headline-large-font-family: var(--font-family-sans);\n --typography-headline-large-font-size: 2rem;\n --typography-headline-large-font-weight: var(--font-weight-regular);\n --typography-headline-large-letter-spacing: 0;\n --typography-headline-large-line-height: 2.5rem;\n --typography-headline-medium-emphasized-font-family: var(--font-family-sans);\n --typography-headline-medium-emphasized-font-size: 1.75rem;\n --typography-headline-medium-emphasized-font-weight: var(--font-weight-medium);\n --typography-headline-medium-emphasized-letter-spacing: 0;\n --typography-headline-medium-emphasized-line-height: 2.25rem;\n --typography-headline-medium-font-family: var(--font-family-sans);\n --typography-headline-medium-font-size: 1.75rem;\n --typography-headline-medium-font-weight: var(--font-weight-regular);\n --typography-headline-medium-letter-spacing: 0;\n --typography-headline-medium-line-height: 2.25rem;\n --typography-headline-small-emphasized-font-family: var(--font-family-sans);\n --typography-headline-small-emphasized-font-size: 1.5rem;\n --typography-headline-small-emphasized-font-weight: var(--font-weight-medium);\n --typography-headline-small-emphasized-letter-spacing: 0;\n --typography-headline-small-emphasized-line-height: 2rem;\n --typography-headline-small-font-family: var(--font-family-sans);\n --typography-headline-small-font-size: 1.5rem;\n --typography-headline-small-font-weight: var(--font-weight-regular);\n --typography-headline-small-letter-spacing: 0;\n --typography-headline-small-line-height: 2rem;\n --typography-label-large-emphasized-font-family: var(--font-family-sans);\n --typography-label-large-emphasized-font-size: 0.875rem;\n --typography-label-large-emphasized-font-weight: var(--font-weight-semi-bold);\n --typography-label-large-emphasized-letter-spacing: 0.10000000149011612px;\n --typography-label-large-emphasized-line-height: 1.25rem;\n --typography-label-large-font-family: var(--font-family-sans);\n --typography-label-large-font-size: 0.875rem;\n --typography-label-large-font-weight: var(--font-weight-medium);\n --typography-label-large-letter-spacing: 0.10000000149011612px;\n --typography-label-large-line-height: 1.25rem;\n --typography-label-medium-emphasized-font-family: var(--font-family-sans);\n --typography-label-medium-emphasized-font-size: 0.75rem;\n --typography-label-medium-emphasized-font-weight: var(--font-weight-semi-bold);\n --typography-label-medium-emphasized-letter-spacing: 0.5px;\n --typography-label-medium-emphasized-line-height: 1rem;\n --typography-label-medium-font-family: var(--font-family-sans);\n --typography-label-medium-font-size: 0.75rem;\n --typography-label-medium-font-weight: var(--font-weight-medium);\n --typography-label-medium-letter-spacing: 0.5px;\n --typography-label-medium-line-height: 1rem;\n --typography-label-small-emphasized-font-family: var(--font-family-sans);\n --typography-label-small-emphasized-font-size: 0.6875rem;\n --typography-label-small-emphasized-font-weight: var(--font-weight-semi-bold);\n --typography-label-small-emphasized-letter-spacing: 0.5px;\n --typography-label-small-emphasized-line-height: 1rem;\n --typography-label-small-font-family: var(--font-family-sans);\n --typography-label-small-font-size: 0.6875rem;\n --typography-label-small-font-weight: var(--font-weight-medium);\n --typography-label-small-letter-spacing: 0.5px;\n --typography-label-small-line-height: 1rem;\n --typography-title-large-emphasized-font-family: var(--font-family-sans);\n --typography-title-large-emphasized-font-size: 1.375rem;\n --typography-title-large-emphasized-font-weight: var(--font-weight-medium);\n --typography-title-large-emphasized-letter-spacing: 0;\n --typography-title-large-emphasized-line-height: 1.75rem;\n --typography-title-large-font-family: var(--font-family-sans);\n --typography-title-large-font-size: 1.375rem;\n --typography-title-large-font-weight: var(--font-weight-regular);\n --typography-title-large-letter-spacing: 0;\n --typography-title-large-line-height: 1.75rem;\n --typography-title-medium-emphasized-font-family: var(--font-family-sans);\n --typography-title-medium-emphasized-font-size: 1rem;\n --typography-title-medium-emphasized-font-weight: var(--font-weight-semi-bold);\n --typography-title-medium-emphasized-letter-spacing: 0.15000000596046448px;\n --typography-title-medium-emphasized-line-height: 1.5rem;\n --typography-title-medium-font-family: var(--font-family-sans);\n --typography-title-medium-font-size: 1rem;\n --typography-title-medium-font-weight: var(--font-weight-medium);\n --typography-title-medium-letter-spacing: 0.15000000596046448px;\n --typography-title-medium-line-height: 1.5rem;\n --typography-title-small-emphasized-font-family: var(--font-family-sans);\n --typography-title-small-emphasized-font-size: 0.875rem;\n --typography-title-small-emphasized-font-weight: var(--font-weight-semi-bold);\n --typography-title-small-emphasized-letter-spacing: 0.10000000149011612px;\n --typography-title-small-emphasized-line-height: 1.25rem;\n --typography-title-small-font-family: var(--font-family-sans);\n --typography-title-small-font-size: 0.875rem;\n --typography-title-small-font-weight: var(--font-weight-medium);\n --typography-title-small-letter-spacing: 0.10000000149011612px;\n --typography-title-small-line-height: 1.25rem;\n color-scheme: light dark;\n}\n\n[data-theme='dark'] {\n --color-error: var(--color-error-80);\n --color-error-container: var(--color-error-30);\n --color-inverse-error: var(--color-error-40);\n --color-inverse-on-surface: var(--color-neutral-20);\n --color-inverse-primary: var(--color-primary-40);\n --color-inverse-secondary: var(--color-secondary-40);\n --color-inverse-surface: var(--color-neutral-90);\n --color-inverse-tertiary: var(--color-tertiary-40);\n --color-on-error: var(--color-error-20);\n --color-on-error-container: var(--color-error-90);\n --color-on-primary: var(--color-primary-20);\n --color-on-primary-container: var(--color-primary-90);\n --color-on-secondary: var(--color-secondary-20);\n --color-on-secondary-container: var(--color-secondary-90);\n --color-on-surface: var(--color-neutral-90);\n --color-on-surface-variant: var(--color-neutral-variant-80);\n --color-on-tertiary: var(--color-tertiary-20);\n --color-on-tertiary-container: var(--color-tertiary-90);\n --color-outline: var(--color-neutral-variant-60);\n --color-outline-variant: var(--color-neutral-variant-30);\n --color-primary: var(--color-primary-80);\n --color-primary-container: var(--color-primary-30);\n --color-scrim: var(--color-neutral-0);\n --color-secondary: var(--color-secondary-80);\n --color-secondary-container: var(--color-secondary-30);\n --color-shadow: var(--color-neutral-0);\n --color-surface: var(--color-neutral-10);\n --color-surface-container: var(--color-neutral-12);\n --color-surface-container-high: var(--color-neutral-17);\n --color-surface-container-highest: var(--color-neutral-22);\n --color-surface-container-low: var(--color-neutral-10);\n --color-surface-container-lowest: var(--color-neutral-4);\n --color-surface-dim: var(--color-neutral-6);\n --color-surface-variant: var(--color-neutral-variant-30);\n --color-tertiary: var(--color-tertiary-80);\n --color-tertiary-container: var(--color-tertiary-30);\n --global-badge-color: var(--color-error-80);\n}\n\n";
2
13
 
3
14
  class LoaderUtils {
4
15
  constructor(loaderConfig) {
@@ -81,15 +92,142 @@ class LoaderUtils {
81
92
  }
82
93
  }
83
94
 
95
+ const createLinkStyles = (prefix) => i `
96
+ .${r(prefix)}-link {
97
+ border-radius: inherit;
98
+ corner-shape: inherit;
99
+
100
+ color: var(--color-primary);
101
+ --icon-color: var(--color-primary);
102
+ }
103
+
104
+ .${r(prefix)}-link:hover {
105
+ color: var(--color-on-primary-container);
106
+ --icon-color: var(--color-on-primary-container);
107
+ }
108
+
109
+ .${r(prefix)}-link:focus {
110
+ text-decoration: none;
111
+ ${focusRing()}
112
+ }
113
+
114
+ .${r(prefix)}-link.no-style {
115
+ color: var(--color-on-surface);
116
+ --icon-color: var(--color-on-surface);
117
+ text-decoration: none !important;
118
+ }
119
+
120
+ .${r(prefix)}-link.no-decoration {
121
+ text-decoration: none !important;
122
+ }
123
+
124
+ .${r(prefix)}-link.inline {
125
+ text-decoration: var(--link-decoration, underline);
126
+ }
127
+ `;
128
+
129
+ /**
130
+ * Sass equivalents:
131
+ * $types: "display", "headline", "body", "code", "label", "title";
132
+ * $sizes: "large", "medium", "small";
133
+ */
134
+ const TYPES = [
135
+ 'display',
136
+ 'headline',
137
+ 'body',
138
+ 'code',
139
+ 'label',
140
+ 'title',
141
+ ];
142
+ const SIZES = ['large', 'medium', 'small'];
143
+ const createTagClass = (prefix, tag) => i `
144
+ .${r(prefix)}-text-${r(tag)} {
145
+ ${getTypography(tag)}
146
+ }
147
+
148
+ .${r(prefix)}-text-${r(tag)}-emphasized {
149
+ ${getTypography(`${tag}-emphasized`)}
150
+ }
151
+ `;
152
+ const createTypeClass = (prefix, type) => i `
153
+ .${r(prefix)}-text-${r(type)} {
154
+ ${getTypography(`${type}-medium`)}
155
+ }
156
+
157
+ .${r(prefix)}-text-${r(type)}-emphasized {
158
+ ${getTypography(`${type}-medium-emphasized`)}
159
+ }
160
+
161
+ ${r(SIZES.map(size => createTagClass(prefix, `${type}-${size}`)).join(''))}
162
+ `;
163
+ const createTextStyles = (prefix) => i `
164
+ /* === Margin rules (manual groups from Sass) === */
165
+
166
+ .${r(prefix)}-text-body,
167
+ .${r(prefix)}-text-body-medium,
168
+ .${r(prefix)}-text-body-large,
169
+ .${r(prefix)}-text-body-small {
170
+ margin-block-end: var(--spacing-200);
171
+ }
172
+
173
+ .${r(prefix)}-text-headline,
174
+ .${r(prefix)}-text-headline-medium,
175
+ .${r(prefix)}-text-headline-large,
176
+ .${r(prefix)}-text-headline-small {
177
+ margin-block-end: var(--spacing-400);
178
+ }
179
+
180
+ .${r(prefix)}-text-display,
181
+ .${r(prefix)}-text-display-medium,
182
+ .${r(prefix)}-text-display-large,
183
+ .${r(prefix)}-text-display-small {
184
+ margin-block-end: var(--spacing-400);
185
+ }
186
+
187
+ .${r(prefix)}-text-title,
188
+ .${r(prefix)}-text-title-medium,
189
+ .${r(prefix)}-text-title-large,
190
+ .${r(prefix)}-text-title-small {
191
+ margin-block-end: var(--spacing-400);
192
+ }
193
+
194
+ ${r(TYPES.map(type => createTypeClass(prefix, type)).join(''))}
195
+ `;
196
+
84
197
  // Eager loaded
198
+ const libraryPrefix = 'p';
199
+ function buildSheet(styleSheet) {
200
+ const sheet = new CSSStyleSheet();
201
+ // Add rules
202
+ sheet.replaceSync(styleSheet.toString());
203
+ return sheet;
204
+ }
205
+ const styleSheets = [buildSheet(cssComponentsStyleSheet)];
206
+ const linkStylesheet = createLinkStyles(libraryPrefix).styleSheet;
207
+ if (linkStylesheet)
208
+ styleSheets.push(linkStylesheet);
209
+ const textStylesheet = createTextStyles(libraryPrefix).styleSheet;
210
+ if (textStylesheet)
211
+ styleSheets.push(textStylesheet);
212
+ document.adoptedStyleSheets = styleSheets;
85
213
  const loaderConfig = {
86
- prefix: 'p',
214
+ prefix: libraryPrefix,
87
215
  components: {
88
216
  icon: {
89
217
  CustomElementClass: Icon,
218
+ // importPath: './component/icon.js', - for lazy load give path instead of CustomElementClass
90
219
  },
91
220
  avatar: {
92
- importPath: './component/avatar.js',
221
+ CustomElementClass: Avatar,
222
+ },
223
+ badge: {
224
+ CustomElementClass: Badge,
225
+ },
226
+ divider: {
227
+ CustomElementClass: Divider,
228
+ },
229
+ clock: {
230
+ importPath: '.' + '/clock.js',
93
231
  },
94
232
  },
95
233
  };