@mono-lit/helper 0.0.9 → 0.0.10

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 (161) hide show
  1. package/dist/accordion-core-DaNyPWRr.js +277 -0
  2. package/dist/alert-core-DWtHbX_-.js +134 -0
  3. package/dist/breadcrumb-list-core-Dh68T8Cf.js +747 -0
  4. package/dist/{mono-button-CLkHg3WW.js → button-core-DerXg84Q.js} +3 -276
  5. package/dist/button-dropdown-core-DKYEOyjy.js +654 -0
  6. package/dist/button-utils-D5-66M02.js +63 -0
  7. package/dist/card-utils-l80qAmrN.js +312 -0
  8. package/dist/chart-core-DV7hD3ZY.js +801 -0
  9. package/dist/checkbox-utils-DKdrhAzF.js +337 -0
  10. package/dist/chip-utils-DpRrd7Zj.js +403 -0
  11. package/dist/{data-source-controller-C6C4ej_M.js → data-source-controller-DS_JLrmS.js} +1 -1
  12. package/dist/{data-source-options-fxT5QIX4.js → data-source-options-DJUNU26C.js} +6 -6
  13. package/dist/{data-source-read-BL266IW0.js → data-source-read-uKJpRAzx.js} +2 -2
  14. package/dist/date-core-CyuSyvvG.js +734 -0
  15. package/dist/drawer-core-DbFWvNln.js +759 -0
  16. package/dist/dropdown-core-BCH1pK14.js +511 -0
  17. package/dist/dropdown-table-core-SfHUJVFq.js +1342 -0
  18. package/dist/export.js +1 -1
  19. package/dist/{field-path-BabiMrrA.js → field-path-DK2VBWHl.js} +1 -1
  20. package/dist/field-tooltip.css_raw-DVblekCl.js +5 -0
  21. package/dist/{field-validation.css_raw-Cx6SGrfP.js → field-validation.css_raw-BU7C6173.js} +1 -170
  22. package/dist/file-upload-core-Cz_dBQMx.js +624 -0
  23. package/dist/filter-builder-core-DyWjbBP7.js +381 -0
  24. package/dist/{filter-builder-B6Y2mmbM.js → filter-builder-vbqIuPhX.js} +1 -1
  25. package/dist/{filter-eval-ChDSaAUH.js → filter-eval-CqeBnMYh.js} +1 -1
  26. package/dist/{filter-odata-Bi27XUpQ.js → filter-odata-GsczYKNC.js} +1 -1
  27. package/dist/{hydration-flush-BaE9gN3C.js → hydration-flush-Volt9X7Q.js} +2 -1071
  28. package/dist/index.js +11 -11
  29. package/dist/{index.node-DTqDBca7.js → index.node-Csy9zrr1.js} +4 -4
  30. package/dist/index.node.js +11 -11
  31. package/dist/input-utils-BglY-k0H.js +1145 -0
  32. package/dist/menu-core-DkAYuCZ2.js +831 -0
  33. package/dist/modal-core-CSBSPN_m.js +844 -0
  34. package/dist/mono-button-DVvZ03P-.js +280 -0
  35. package/dist/{mono-button.shadow-DqZMpcqY.js → mono-button.shadow-BANxMGln.js} +6 -594
  36. package/dist/{mono-data-chart-NKPdAgVq.js → mono-data-chart-ChF4J9RT.js} +6 -6
  37. package/dist/{mono-data-dropdown-B2iRpJuI.js → mono-data-dropdown-Bgj2PDfm.js} +1 -1
  38. package/dist/{mono-data-grid-llJCX9MC.js → mono-data-grid-DJkp96N-.js} +144 -46
  39. package/dist/{mono-event-BPku9HpS.js → mono-event-CAZf0F_k.js} +14 -9
  40. package/dist/{mono-form-controller-BrA10erm.js → mono-form-controller-DxZLvyg6.js} +2 -1
  41. package/dist/mono-table-checkbox-core-BKOMx8R5.js +5288 -0
  42. package/dist/nav-core-B5qU2dzn.js +225 -0
  43. package/dist/{normalize-error-D93O4q8g.js → normalize-error-BEcd1tmS.js} +2 -2
  44. package/dist/otp-core-DXg3vFLh.js +758 -0
  45. package/dist/radio-utils-Dk9Tl1jz.js +319 -0
  46. package/dist/rich-text-editor-core-Ddd_QaLn.js +1280 -0
  47. package/dist/select-utils-BgArYHk8.js +2140 -0
  48. package/dist/sidebar-core-CD6txDo3.js +583 -0
  49. package/dist/slider-core-vcWr321-.js +1014 -0
  50. package/dist/src/components/dropdown-table/dropdown-table-core.d.ts +2 -2
  51. package/dist/src/components/dropdown-table/dropdown-table-types.d.ts +1 -1
  52. package/dist/src/components/dropdown-table/index.d.ts +1 -1
  53. package/dist/src/components/dropdown-table/index.shadow.d.ts +1 -1
  54. package/dist/src/components/dropdown-table/mono-data-dropdown.d.ts +1 -1
  55. package/dist/src/components/form/form-types.d.ts +9 -3
  56. package/dist/src/components/input/input-core.d.ts +1 -1
  57. package/dist/src/components/input/input-types.d.ts +1 -1
  58. package/dist/src/components/otp/otp-core.d.ts +1 -1
  59. package/dist/src/components/select/select-core.d.ts +1 -1
  60. package/dist/src/components/select/select-types.d.ts +1 -1
  61. package/dist/src/components/slider/slider-core.d.ts +1 -1
  62. package/dist/src/components/slider/slider-types.d.ts +1 -1
  63. package/dist/src/components/table/filter-suggestion.d.ts +171 -0
  64. package/dist/src/components/table/index.d.ts +5 -4
  65. package/dist/src/components/table/index.shadow.d.ts +5 -4
  66. package/dist/src/components/table/mono-data-grid.d.ts +22 -3
  67. package/dist/src/components/table/mono-table-empty-core.d.ts +37 -0
  68. package/dist/src/components/table/mono-table-search-core.d.ts +22 -3
  69. package/dist/src/components/table/table-types.d.ts +74 -4
  70. package/dist/src/components/tag-input/tag-input-core.d.ts +1 -1
  71. package/dist/src/components/tag-input/tag-input-types.d.ts +1 -1
  72. package/dist/src/components/textarea/textarea-core.d.ts +1 -1
  73. package/dist/src/composables/mono-event.d.ts +7 -1
  74. package/dist/src/entries/index.d.ts +8 -6
  75. package/dist/src/entries/index.node.d.ts +8 -6
  76. package/dist/src/search/index.d.ts +1 -1
  77. package/dist/src/utils/group-count.d.ts +36 -0
  78. package/dist/switch-utils-CTZ4id2V.js +338 -0
  79. package/dist/tabs-core-r5-B8k_N.js +317 -0
  80. package/dist/tag-input-utils-D2JA90DQ.js +3060 -0
  81. package/dist/textarea-utils-VU1KeXm8.js +821 -0
  82. package/dist/ui/accordion.js +2 -274
  83. package/dist/ui/alert.js +2 -131
  84. package/dist/ui/breadcrumb.js +4 -745
  85. package/dist/ui/button-dropdown.js +4 -652
  86. package/dist/ui/button.js +2 -63
  87. package/dist/ui/card.js +2 -310
  88. package/dist/ui/chart.js +4 -800
  89. package/dist/ui/checkbox.js +4 -335
  90. package/dist/ui/chip.js +4 -402
  91. package/dist/ui/date.js +3 -732
  92. package/dist/ui/drawer.js +3 -757
  93. package/dist/ui/dropdown-table.js +5 -1341
  94. package/dist/ui/dropdown.js +4 -509
  95. package/dist/ui/file-upload.js +3 -622
  96. package/dist/ui/filter.js +5 -380
  97. package/dist/ui/form.js +1 -1
  98. package/dist/ui/index.css +118 -1
  99. package/dist/ui/input.js +3 -1141
  100. package/dist/ui/menu.js +4 -828
  101. package/dist/ui/modal.js +4 -843
  102. package/dist/ui/nav.js +4 -223
  103. package/dist/ui/otp.js +4 -756
  104. package/dist/ui/radio.js +4 -317
  105. package/dist/ui/rich-text-editor.js +4 -1278
  106. package/dist/ui/select.js +5 -2138
  107. package/dist/ui/shadow/accordion.js +4 -273
  108. package/dist/ui/shadow/alert.js +4 -130
  109. package/dist/ui/shadow/breadcrumb.js +5 -744
  110. package/dist/ui/shadow/button-dropdown.js +6 -652
  111. package/dist/ui/shadow/button.js +3 -63
  112. package/dist/ui/shadow/card.js +4 -309
  113. package/dist/ui/shadow/chart.js +6 -1576
  114. package/dist/ui/shadow/checkbox.js +4 -334
  115. package/dist/ui/shadow/chip.js +4 -396
  116. package/dist/ui/shadow/date.js +7 -731
  117. package/dist/ui/shadow/drawer.js +4 -756
  118. package/dist/ui/shadow/dropdown-table.js +8 -1762
  119. package/dist/ui/shadow/dropdown.js +4 -508
  120. package/dist/ui/shadow/file-upload.js +4 -620
  121. package/dist/ui/shadow/filter.js +7 -379
  122. package/dist/ui/shadow/input.js +6 -1140
  123. package/dist/ui/shadow/menu.js +5 -828
  124. package/dist/ui/shadow/modal.js +6 -1063
  125. package/dist/ui/shadow/nav.js +5 -223
  126. package/dist/ui/shadow/otp.js +6 -754
  127. package/dist/ui/shadow/radio.js +4 -316
  128. package/dist/ui/shadow/rich-text-editor.js +4 -1276
  129. package/dist/ui/shadow/select.js +6 -2136
  130. package/dist/ui/shadow/sidebar.js +5 -581
  131. package/dist/ui/shadow/slider.js +5 -1010
  132. package/dist/ui/shadow/switch.js +4 -335
  133. package/dist/ui/shadow/table.js +10 -4501
  134. package/dist/ui/shadow/tabs.js +6 -315
  135. package/dist/ui/shadow/tag-input.js +7 -3057
  136. package/dist/ui/shadow/textarea.js +6 -817
  137. package/dist/ui/sidebar.js +3 -581
  138. package/dist/ui/slider.js +4 -1012
  139. package/dist/ui/switch.js +4 -336
  140. package/dist/ui/table.js +9 -4502
  141. package/dist/ui/tabs.js +4 -315
  142. package/dist/ui/tag-input.js +5 -3058
  143. package/dist/ui/textarea.js +4 -819
  144. package/dist/vue.d.ts +3 -2
  145. package/package.json +3 -3
  146. package/dist/chip-strip-bNfLn52Z.js +0 -215
  147. package/dist/data-source-controller-Dx6IQ2CN.js +0 -243
  148. package/dist/data-source-options-BM4r4PRw.js +0 -558
  149. package/dist/data-source-read-HyBCRg1t.js +0 -242
  150. package/dist/excel-BXzr3uI1.js +0 -784
  151. package/dist/export-ixRdCS2y.js +0 -2388
  152. package/dist/field-tooltip-addon-CWCp19mJ.js +0 -702
  153. package/dist/field-tooltip.css_raw-U5UeTa2d.js +0 -269
  154. package/dist/filter-builder-C0T3pMx2.js +0 -208
  155. package/dist/form-control-core-BbiACMtL.js +0 -226
  156. package/dist/icon-ClxnYhBG.js +0 -19
  157. package/dist/import-Dc4eXC02.js +0 -612
  158. package/dist/light-slots-_no0r2Z-.js +0 -246
  159. package/dist/markdown-uGlE_OfJ.js +0 -20191
  160. package/dist/mono-data-grid-e9ZVBlNN.js +0 -4240
  161. package/dist/normalize-error-BmLbgANw.js +0 -1048
@@ -1,65 +1,5 @@
1
- import { r as MonoButtonCore, t as MonoButtonShadow } from "../../mono-button.shadow-DqZMpcqY.js";
1
+ import { t as MonoButtonCore } from "../../button-core-DerXg84Q.js";
2
+ import { n as processIconContent, r as validateButtonProps, t as generateBadgeClasses } from "../../button-utils-D5-66M02.js";
3
+ import { t as MonoButtonShadow } from "../../mono-button.shadow-BANxMGln.js";
2
4
 
3
- //#region src/components/button/button-utils.ts
4
- /**
5
- * Generate badge CSS classes
6
- */
7
- function generateBadgeClasses(badgeColor = "red") {
8
- return `btn-badge bb-${badgeColor}`;
9
- }
10
- /**
11
- * Process SVG icon content
12
- */
13
- function processIconContent(icon) {
14
- if (icon.startsWith("<svg")) return icon;
15
- return icon;
16
- }
17
- /**
18
- * Validate button props
19
- */
20
- function validateButtonProps(props) {
21
- const validSizes = [
22
- "xs",
23
- "sm",
24
- "md",
25
- "lg",
26
- "xl",
27
- "xxl"
28
- ];
29
- const validColors = [
30
- "primary",
31
- "secondary",
32
- "success",
33
- "danger",
34
- "warning",
35
- "info",
36
- "teal",
37
- "purple",
38
- "dark",
39
- "light"
40
- ];
41
- const validVariants = [
42
- "solid",
43
- "outline",
44
- "tonal",
45
- "text"
46
- ];
47
- const validRounded = [
48
- "none",
49
- "xs",
50
- "sm",
51
- "md",
52
- "lg",
53
- "xl",
54
- "xxl",
55
- "full"
56
- ];
57
- if (props.size && !validSizes.includes(props.size)) return false;
58
- if (props.color && !validColors.includes(props.color)) return false;
59
- if (props.variant && !validVariants.includes(props.variant)) return false;
60
- if (props.rounded && !validRounded.includes(props.rounded)) return false;
61
- return true;
62
- }
63
-
64
- //#endregion
65
5
  export { MonoButtonCore, MonoButtonShadow, generateBadgeClasses, processIconContent, validateButtonProps };
@@ -1,280 +1,11 @@
1
- import { _ as buildSizeStyle, a as __decorate, c as defineHybridPropAlias, f as customElement, i as withShadowUtilityStyles, l as defineHybridPropAliases, r as toShadowCss, s as booleanStringConverter, t as flushSsrHydration } from "../../hydration-flush-BaE9gN3C.js";
2
- import { t as dispatchMonoEvent } from "../../mono-event-BPku9HpS.js";
1
+ import { t as customElement } from "../../mono-element-CKcT0rwv.js";
2
+ import { t as __decorate } from "../../decorate-DbYFpi8R.js";
3
+ import { n as validateCardProps, r as MonoCardCore, t as generateCardAttributes } from "../../card-utils-l80qAmrN.js";
4
+ import { i as withShadowUtilityStyles, r as toShadowCss, t as flushSsrHydration } from "../../hydration-flush-Volt9X7Q.js";
3
5
  import { LitElement, html, isServer, nothing, unsafeCSS } from "lit";
4
- import { property, query, state } from "lit/decorators.js";
5
6
  import { ifDefined } from "lit/directives/if-defined.js";
6
7
  import { styleMap } from "lit/directives/style-map.js";
7
8
 
8
- //#region src/components/card/card-core.ts
9
- /**
10
- * `MonoCardCore` — all render-mode-agnostic logic for `mono-card`: reactive
11
- * props, hybrid aliases, the camelCase attribute fallbacks, slot-presence
12
- * `@state`, class/getter computation, click/keyboard interactivity, and the
13
- * imperative `focus/blur/click`. No `render()` — the light build keeps its
14
- * `[data-mono-slot]` capture strategy and the shadow build uses native `<slot>`
15
- * (each ships its own `render()`, mirroring `mono-input`).
16
- *
17
- * SSR-safe: no `document`/`window` access. `_cardElement` (`@query`) is lazy and
18
- * `focus/blur/click` + the `HTMLAnchorElement` check only run client-side.
19
- */
20
- const MonoCardCore = (superClass) => {
21
- class MonoCardCoreClass extends superClass {
22
- constructor(...args) {
23
- super(...args);
24
- this._hasMedia = false;
25
- this._hasIcon = false;
26
- this._hasTitle = false;
27
- this._hasSubtitle = false;
28
- this._hasHeaderSlot = false;
29
- this._hasActions = false;
30
- this._hasFooter = false;
31
- this._hasDefault = false;
32
- defineHybridPropAliases(this, [
33
- "mediaPosition",
34
- "headerDivider",
35
- "footerDivider",
36
- "ariaLabelText",
37
- "cssClass",
38
- "minWidth",
39
- "maxWidth",
40
- "minHeight",
41
- "maxHeight"
42
- ]);
43
- defineHybridPropAlias(this, "heading", "title");
44
- defineHybridPropAlias(this, "subheading", "subtitle");
45
- this.size = "md";
46
- this.variant = "elevated";
47
- this.color = "neutral";
48
- this.mediaPosition = "top";
49
- this.title = "";
50
- this.subtitle = "";
51
- this.bordered = false;
52
- this.hoverable = false;
53
- this.clickable = false;
54
- this.selected = false;
55
- this.disabled = false;
56
- this.loading = false;
57
- this.headerDivider = true;
58
- this.footerDivider = true;
59
- this.href = void 0;
60
- this.target = void 0;
61
- this.ariaLabelText = void 0;
62
- this.cssClass = {};
63
- }
64
- /**
65
- * Static camelCase HTML fallback.
66
- *
67
- * Browser converts:
68
- * mediaPosition -> mediaposition
69
- * headerDivider -> headerdivider
70
- * footerDivider -> footerdivider
71
- * ariaLabelText -> arialabeltext
72
- */
73
- static get observedAttributes() {
74
- return [
75
- ...super.observedAttributes ?? [],
76
- "mediaposition",
77
- "headerdivider",
78
- "footerdivider",
79
- "arialabeltext",
80
- "arialabel",
81
- "heading",
82
- "subheading"
83
- ];
84
- }
85
- attributeChangedCallback(name, oldValue, newValue) {
86
- super.attributeChangedCallback(name, oldValue, newValue);
87
- if (oldValue === newValue) return;
88
- if (name === "mediaposition") {
89
- this.mediaPosition = newValue ?? "top";
90
- return;
91
- }
92
- if (name === "headerdivider") {
93
- this.headerDivider = this._toBoolean(newValue);
94
- return;
95
- }
96
- if (name === "footerdivider") {
97
- this.footerDivider = this._toBoolean(newValue);
98
- return;
99
- }
100
- if (name === "arialabeltext" || name === "arialabel") {
101
- this.ariaLabelText = newValue ?? void 0;
102
- return;
103
- }
104
- if (name === "heading") {
105
- this.title = newValue ?? "";
106
- return;
107
- }
108
- if (name === "subheading") this.subtitle = newValue ?? "";
109
- }
110
- _cls(base, key) {
111
- const extra = this.cssClass?.[key];
112
- return extra ? `${base} ${extra}` : base;
113
- }
114
- /** Inline sizing applied to the card root. */
115
- _sizeStyle() {
116
- return buildSizeStyle(this);
117
- }
118
- _toBoolean(value) {
119
- if (typeof value === "boolean") return value;
120
- if (typeof value === "string") {
121
- const normalized = value.toLowerCase().trim();
122
- return normalized === "" || normalized === "true";
123
- }
124
- return Boolean(value);
125
- }
126
- get _isInteractive() {
127
- return Boolean(this.href) || this.clickable;
128
- }
129
- get _isDisabled() {
130
- return this.disabled || this.loading;
131
- }
132
- get _hasHeader() {
133
- return Boolean(this._hasIcon || this._hasTitle || this._hasSubtitle || this._hasHeaderSlot || this.title || this.subtitle);
134
- }
135
- /**
136
- * The header shows a title with NO subtitle under it — drives `mono-no-subtitle`,
137
- * which centres the icon chip and that lone title on one axis. With a subtitle
138
- * the row stays top-aligned (icon level with the first line); a `slot="header"`
139
- * owns its own layout, so it never counts.
140
- */
141
- get _noSubtitle() {
142
- return !this._hasHeaderSlot && !this._hasSubtitle && !this.subtitle;
143
- }
144
- get _cardClasses() {
145
- const classes = ["mono-card"];
146
- classes.push(this.size);
147
- classes.push(this.variant);
148
- classes.push(this.color);
149
- if (this.rounded) classes.push(`rounded-${this.rounded}`);
150
- if (this.bordered) classes.push("bordered");
151
- if (this.hoverable) classes.push("hoverable");
152
- if (this.clickable || this.href) classes.push("clickable");
153
- if (this.selected) classes.push("selected");
154
- if (this.disabled) classes.push("disabled");
155
- if (this.loading) classes.push("loading");
156
- if (!this.headerDivider) classes.push("no-header-divider");
157
- if (!this.footerDivider) classes.push("no-footer-divider");
158
- if (this._hasMedia) classes.push(`media-${this.mediaPosition}`);
159
- if (this.cssClass?.root) classes.push(this.cssClass.root);
160
- return classes.join(" ");
161
- }
162
- _emitClick(originalEvent) {
163
- const detail = { originalEvent };
164
- dispatchMonoEvent(this, "click", detail, { sourceEvent: originalEvent });
165
- }
166
- _handleClick(event) {
167
- if (this._isDisabled) {
168
- event.preventDefault();
169
- event.stopPropagation();
170
- return;
171
- }
172
- if (!this._isInteractive) return;
173
- this._emitClick(event);
174
- }
175
- _handleKeyDown(event) {
176
- if (this._isDisabled || !this._isInteractive) return;
177
- if (event.key === "Enter" || event.key === " ") {
178
- event.preventDefault();
179
- if (this._cardElement) {
180
- this._cardElement.click();
181
- return;
182
- }
183
- this._emitClick(event);
184
- }
185
- }
186
- focus() {
187
- this._cardElement?.focus();
188
- }
189
- blur() {
190
- this._cardElement?.blur();
191
- }
192
- click() {
193
- this._cardElement?.click();
194
- }
195
- }
196
- __decorate([property({ type: String })], MonoCardCoreClass.prototype, "size", void 0);
197
- __decorate([property({ type: String })], MonoCardCoreClass.prototype, "variant", void 0);
198
- __decorate([property({ type: String })], MonoCardCoreClass.prototype, "color", void 0);
199
- __decorate([property({ type: String })], MonoCardCoreClass.prototype, "rounded", void 0);
200
- __decorate([property({
201
- type: String,
202
- attribute: "media-position"
203
- })], MonoCardCoreClass.prototype, "mediaPosition", void 0);
204
- __decorate([property({ type: String })], MonoCardCoreClass.prototype, "title", void 0);
205
- __decorate([property({ type: String })], MonoCardCoreClass.prototype, "subtitle", void 0);
206
- __decorate([property({
207
- reflect: true,
208
- converter: booleanStringConverter
209
- })], MonoCardCoreClass.prototype, "bordered", void 0);
210
- __decorate([property({
211
- reflect: true,
212
- converter: booleanStringConverter
213
- })], MonoCardCoreClass.prototype, "hoverable", void 0);
214
- __decorate([property({
215
- reflect: true,
216
- converter: booleanStringConverter
217
- })], MonoCardCoreClass.prototype, "clickable", void 0);
218
- __decorate([property({
219
- reflect: true,
220
- converter: booleanStringConverter
221
- })], MonoCardCoreClass.prototype, "selected", void 0);
222
- __decorate([property({
223
- reflect: true,
224
- converter: booleanStringConverter
225
- })], MonoCardCoreClass.prototype, "disabled", void 0);
226
- __decorate([property({
227
- reflect: true,
228
- converter: booleanStringConverter
229
- })], MonoCardCoreClass.prototype, "loading", void 0);
230
- __decorate([property({ type: String })], MonoCardCoreClass.prototype, "width", void 0);
231
- __decorate([property({ type: String })], MonoCardCoreClass.prototype, "height", void 0);
232
- __decorate([property({
233
- type: String,
234
- attribute: "min-width"
235
- })], MonoCardCoreClass.prototype, "minWidth", void 0);
236
- __decorate([property({
237
- type: String,
238
- attribute: "max-width"
239
- })], MonoCardCoreClass.prototype, "maxWidth", void 0);
240
- __decorate([property({
241
- type: String,
242
- attribute: "min-height"
243
- })], MonoCardCoreClass.prototype, "minHeight", void 0);
244
- __decorate([property({
245
- type: String,
246
- attribute: "max-height"
247
- })], MonoCardCoreClass.prototype, "maxHeight", void 0);
248
- __decorate([property({
249
- attribute: "header-divider",
250
- reflect: true,
251
- converter: booleanStringConverter
252
- })], MonoCardCoreClass.prototype, "headerDivider", void 0);
253
- __decorate([property({
254
- attribute: "footer-divider",
255
- reflect: true,
256
- converter: booleanStringConverter
257
- })], MonoCardCoreClass.prototype, "footerDivider", void 0);
258
- __decorate([property({ type: String })], MonoCardCoreClass.prototype, "href", void 0);
259
- __decorate([property({ type: String })], MonoCardCoreClass.prototype, "target", void 0);
260
- __decorate([property({
261
- type: String,
262
- attribute: "aria-label-text"
263
- })], MonoCardCoreClass.prototype, "ariaLabelText", void 0);
264
- __decorate([property({ attribute: false })], MonoCardCoreClass.prototype, "cssClass", void 0);
265
- __decorate([state()], MonoCardCoreClass.prototype, "_hasMedia", void 0);
266
- __decorate([state()], MonoCardCoreClass.prototype, "_hasIcon", void 0);
267
- __decorate([state()], MonoCardCoreClass.prototype, "_hasTitle", void 0);
268
- __decorate([state()], MonoCardCoreClass.prototype, "_hasSubtitle", void 0);
269
- __decorate([state()], MonoCardCoreClass.prototype, "_hasHeaderSlot", void 0);
270
- __decorate([state()], MonoCardCoreClass.prototype, "_hasActions", void 0);
271
- __decorate([state()], MonoCardCoreClass.prototype, "_hasFooter", void 0);
272
- __decorate([state()], MonoCardCoreClass.prototype, "_hasDefault", void 0);
273
- __decorate([query(".mono-card")], MonoCardCoreClass.prototype, "_cardElement", void 0);
274
- return MonoCardCoreClass;
275
- };
276
-
277
- //#endregion
278
9
  //#region \0raw:C:\Users\VCT-DEV\Desktop\libs\packages\helper\src\components\card\card.css?raw.js
279
10
  var card_css_raw_default = "/* =========================================================================\r\n mono-card — a port of Basecoat's `.card` (basecoat-css@1.0.2, vega style).\r\n\r\n Styled by ATTRIBUTE, like Basecoat — and the attributes mirror the element's\r\n props one for one, so hand-written markup reads like the Lit / Vue tag:\r\n\r\n <mono-card size=\"sm\" variant=\"outlined\" color=\"primary\" title=\"Title\">\r\n <div mono-card mono-size=\"sm\" mono-variant=\"outlined\" mono-color=\"primary\">\r\n <div mono-header>\r\n <div mono-header-content><h3 mono-title>Title</h3></div>\r\n </div>\r\n <div mono-body><p>…</p></div>\r\n <div mono-footer>…</div>\r\n </div>\r\n\r\n An absent attribute is the prop's default (`:not([mono-size])` = md,\r\n `:not([mono-variant])` = elevated, `:not([mono-color])` = neutral). The element\r\n renders these attributes on its root (both builds) plus the STATES\r\n `mono-bordered` / `mono-hoverable` / `mono-clickable` / `mono-selected` /\r\n `mono-disabled` / `mono-loading`, and the negatives `mono-no-header-divider` /\r\n `mono-no-footer-divider` (both dividers default ON, so the attribute marks the\r\n exception). The old classes (`.mono-card.md.elevated.primary`) are still\r\n emitted as inert hooks until 2.0 but no rule here reads them.\r\n\r\n Selector map (ours ≡ upstream):\r\n [mono-card] ≡ .card (flex-col gap-6 py-6 rounded-xl bg-card text-card-foreground text-sm shadow-xs ring-1 ring-foreground/10 overflow-hidden)\r\n — the ring is drawn as an INSET box-shadow, see --_mono-card-edge-*\r\n [mono-card] > [mono-header] ≡ .card > header (grid auto-rows-min gap-1 px-6)\r\n [mono-title] ≡ .card > header > :is(h2, h3, [data-title], .card-title) (text-base font-medium leading-normal)\r\n [mono-subtitle] ≡ .card > header > :is(p, [data-description], .card-description) (text-sm text-muted-foreground)\r\n [mono-body] ≡ .card > section (px-6)\r\n [mono-footer] / [mono-actions] ≡ .card > footer (flex items-center px-6)\r\n [mono-size=\"sm\"] ≡ .card[data-size='sm'] (gap-4 py-4, px-4 on every region)\r\n [mono-size=\"xs|lg|xl|xxl\"] ≡ EXTENSION (the same ladder continued)\r\n [mono-variant=\"outlined\"] ≡ .card verbatim (the ring + shadow-xs)\r\n [mono-variant=\"elevated|flat|tonal|glass\"] ≡ EXTENSION (shadow-md / none / an accent tint / a blurred pane)\r\n [mono-color=\"…\"] ≡ EXTENSION (the ring and the title in the role's colour)\r\n [mono-media] ≡ .card [&>img:first-child]:rounded-t-xl — a full-bleed media band\r\n [mono-icon], [mono-loading], [mono-selected] ≡ EXTENSION\r\n\r\n `gradient` is GONE (variant and colour alike): the port drops every colour\r\n gradient. `--mono-card-gradient-*` are no-ops until 2.0.\r\n\r\n Specificity contract (same as the pre-port class sheet): a part's RESTING rule\r\n is exactly one attribute strong — `:where([mono-card]) [mono-body]` = (0,1,0)\r\n — so a utility class handed in through `cssClass` wins by source order, while\r\n prop and state rules stay heavier and win over it.\r\n\r\n Inner parts: [mono-media], [mono-header] > [mono-icon] / [mono-header-content]\r\n > [mono-title] / [mono-subtitle], [mono-body], [mono-actions], [mono-footer],\r\n [mono-loading] > [mono-spinner]. The shadow build renders every region and\r\n marks the empty ones [mono-empty]; this sheet hides them.\r\n\r\n FLAVORS set `--mono-card-{radius,shadow,ring-color,ring-width,padding-<size>,\r\n gap-<size>,title-font-<size>,…}` (the per-style `.card` deltas); every fallback\r\n here is vega's value (`node scripts/basecoat-styles.mjs --varying \"^\\.card\"`).\r\n ========================================================================= */\r\n\r\nmono-card {\r\n display: block;\r\n}\r\n\r\n[mono-card] {\r\n /* ── palette: each slot is a public knob over a Basecoat token ─────────── */\r\n --_mono-card-bg: var(--mono-card-bg, var(--card));\r\n --_mono-card-text: var(--mono-card-text, var(--card-foreground));\r\n --_mono-card-subtext: var(--mono-card-subtext, var(--muted-foreground));\r\n --_mono-card-accent: var(--mono-card-accent, var(--_mono-card-accent-preset, var(--neutral)));\r\n /* ring-1 ring-foreground/10 — Basecoat rings the card, it does not border it;\r\n `bordered` adds a real border on top (EXTENSION) */\r\n --_mono-card-ring-color: var(--mono-card-ring-color, color-mix(in oklab, var(--foreground) 10%, transparent));\r\n --_mono-card-ring-width: var(--mono-card-ring-width, var(--mono-border-width));\r\n --_mono-card-shadow: var(--mono-card-shadow, var(--mono-shadow-xs));\r\n --_mono-card-shadow-elevated: var(--mono-card-shadow-elevated, var(--mono-shadow-md));\r\n --_mono-card-shadow-hover: var(--mono-card-shadow-hover, var(--mono-shadow-lg));\r\n /* the ONE knob a prop also drives: `rounded` writes --_mono-card-radius-preset\r\n on the element, so a FLAVOR must write that same preset tier (an inherited\r\n preset loses to the element's own) while --mono-card-radius stays the\r\n consumer's override and wins over both */\r\n --_mono-card-radius: var(--mono-card-radius, var(--_mono-card-radius-preset, var(--mono-radius-xl)));\r\n --_mono-card-border-width: var(--mono-card-border-width, var(--mono-border-width));\r\n --_mono-card-border-color: var(--mono-card-border-color, var(--border));\r\n --_mono-card-divider-color: var(--mono-card-divider-color, var(--border));\r\n --_mono-card-focus-ring-color: var(--mono-card-focus-ring-color, var(--ring));\r\n --_mono-card-focus-ring-width: var(--mono-card-focus-ring-width, var(--mono-ring-width));\r\n --_mono-card-focus-ring-alpha: var(--mono-card-focus-ring-alpha, var(--mono-ring-alpha));\r\n\r\n /* ── md metrics live on the unqualified root ON PURPOSE ────────────────────\r\n basecoat@1.0.2 styles/vega.css .card — gap-6 py-6 text-sm; .card > header —\r\n gap-1 px-6; .card > section / > footer — px-6 */\r\n --_mono-card-padding: var(--mono-card-padding, var(--mono-card-padding-md, calc(var(--mono-spacing) * 6)));\r\n --_mono-card-gap: var(--mono-card-gap, var(--mono-card-gap-md, calc(var(--mono-spacing) * 6)));\r\n --_mono-card-header-gap: var(--mono-card-header-gap, var(--mono-card-header-gap-md, calc(var(--mono-spacing) * 1)));\r\n --_mono-card-actions-gap: var(--mono-card-actions-gap, var(--mono-card-actions-gap-md, calc(var(--mono-spacing) * 2)));\r\n --_mono-card-font: var(--mono-card-font, var(--mono-card-font-md, var(--mono-text-sm)));\r\n --_mono-card-title-font: var(--mono-card-title-font, var(--mono-card-title-font-md, var(--mono-text-base)));\r\n --_mono-card-subtitle-font: var(--mono-card-subtitle-font, var(--mono-card-subtitle-font-md, var(--mono-text-sm)));\r\n --_mono-card-icon-size: var(--mono-card-icon-size, var(--mono-card-icon-size-md, calc(var(--mono-spacing) * 9)));\r\n --_mono-card-icon-glyph: var(--mono-card-icon-glyph, 55%);\r\n\r\n /* The edge and the elevation are independent, so a variant can drop one\r\n without touching the other.\r\n\r\n DEVIATION from upstream: Basecoat draws the edge with `ring-1`, a box-shadow\r\n OUTSIDE the border box. That pixel is lost wherever the card is flush against\r\n anything that clips — a container with `overflow: hidden` (every demo stage),\r\n a horizontal scroller, or the viewport itself — which hid the left edge of a\r\n full-width card at most widths. The same hairline drawn INSIDE the box is\r\n unclippable: an INSET box-shadow, layered under the elevation. (It used to\r\n be an outline with a negative offset; an outline is rasterised as a stroke\r\n of its own, and on fractional display scales it landed one device pixel\r\n inside the background's edge, so the card read as a DOUBLE border. An inset\r\n shadow is part of the background's own box and cannot separate from it.)\r\n It paints under the descendants, so a full-bleed child must stop one\r\n edge-width short of the box, or cover it knowingly. */\r\n --_mono-card-edge-width: var(--_mono-card-ring-width);\r\n --_mono-card-edge-color: var(--_mono-card-ring-color);\r\n --_mono-card-elevation: var(--_mono-card-shadow);\r\n\r\n display: flex;\r\n flex-direction: column;\r\n gap: var(--_mono-card-gap);\r\n position: relative;\r\n min-width: 0;\r\n padding-block: var(--_mono-card-padding);\r\n overflow: hidden;\r\n border-radius: var(--_mono-card-radius);\r\n background-color: var(--_mono-card-bg);\r\n color: var(--_mono-card-text);\r\n font-family: inherit;\r\n font-size: var(--_mono-card-font);\r\n box-shadow:\r\n inset 0 0 0 var(--_mono-card-edge-width) var(--_mono-card-edge-color),\r\n var(--_mono-card-elevation);\r\n text-decoration: none;\r\n transition-property: background-color, border-color, box-shadow, transform, opacity;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n}\r\n\r\n[mono-card],\r\n:where([mono-card]) *,\r\n:where([mono-card]) *::before,\r\n:where([mono-card]) *::after {\r\n box-sizing: border-box;\r\n}\r\n\r\n/* The shadow build renders EVERY region up front (so DSD can project into them\r\n server-side) and marks the ones with nothing in them; the light build renders\r\n only what exists. Hiding them here is what keeps the two builds identical —\r\n and why the media rules below test `:not([mono-empty])`.\r\n\r\n NOT wrapped in `:where()`, unlike the other parts: a region rule such as\r\n `[mono-header] > [mono-icon]` is two attributes strong, so a zero-weight hide\r\n would tie and lose on source order — the icon box kept its 36px in the shadow\r\n build while the light one rendered nothing at all. */\r\n[mono-card] :is(\r\n [mono-media],\r\n [mono-header],\r\n [mono-icon],\r\n [mono-title],\r\n [mono-subtitle],\r\n [mono-body],\r\n [mono-actions],\r\n [mono-footer]\r\n)[mono-empty] {\r\n display: none;\r\n}\r\n\r\n/* =========================================\r\n Sizes — `sm` is upstream's data-size='sm'; the rest continue the ladder\r\n ========================================= */\r\n\r\n[mono-card][mono-size=\"xs\"] {\r\n --_mono-card-padding: var(--mono-card-padding, var(--mono-card-padding-xs, calc(var(--mono-spacing) * 2.5)));\r\n --_mono-card-gap: var(--mono-card-gap, var(--mono-card-gap-xs, calc(var(--mono-spacing) * 2.5)));\r\n --_mono-card-font: var(--mono-card-font, var(--mono-card-font-xs, var(--mono-text-xs)));\r\n --_mono-card-title-font: var(--mono-card-title-font, var(--mono-card-title-font-xs, 0.8125rem));\r\n --_mono-card-subtitle-font: var(--mono-card-subtitle-font, var(--mono-card-subtitle-font-xs, var(--mono-text-xs)));\r\n --_mono-card-icon-size: var(--mono-card-icon-size, var(--mono-card-icon-size-xs, calc(var(--mono-spacing) * 6)));\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .card[data-size='sm'] — gap-4 py-4 (px-4 on every region) */\r\n[mono-card][mono-size=\"sm\"] {\r\n --_mono-card-padding: var(--mono-card-padding, var(--mono-card-padding-sm, calc(var(--mono-spacing) * 4)));\r\n --_mono-card-gap: var(--mono-card-gap, var(--mono-card-gap-sm, calc(var(--mono-spacing) * 4)));\r\n --_mono-card-font: var(--mono-card-font, var(--mono-card-font-sm, var(--mono-text-sm)));\r\n --_mono-card-title-font: var(--mono-card-title-font, var(--mono-card-title-font-sm, var(--mono-text-sm)));\r\n --_mono-card-subtitle-font: var(--mono-card-subtitle-font, var(--mono-card-subtitle-font-sm, var(--mono-text-sm)));\r\n --_mono-card-icon-size: var(--mono-card-icon-size, var(--mono-card-icon-size-sm, calc(var(--mono-spacing) * 7.5)));\r\n}\r\n\r\n[mono-card][mono-size=\"lg\"] {\r\n --_mono-card-padding: var(--mono-card-padding, var(--mono-card-padding-lg, calc(var(--mono-spacing) * 7)));\r\n --_mono-card-gap: var(--mono-card-gap, var(--mono-card-gap-lg, calc(var(--mono-spacing) * 7)));\r\n /* lg keeps md's body and subtitle type by DEFAULT, but still reads its own\r\n knobs — every step of the ladder has to be settable, or a flavor's value is\r\n silently inert (the theme lint catches that). */\r\n --_mono-card-font: var(--mono-card-font, var(--mono-card-font-lg, var(--mono-text-sm)));\r\n --_mono-card-subtitle-font: var(--mono-card-subtitle-font, var(--mono-card-subtitle-font-lg, var(--mono-text-sm)));\r\n --_mono-card-title-font: var(--mono-card-title-font, var(--mono-card-title-font-lg, var(--mono-text-lg)));\r\n --_mono-card-icon-size: var(--mono-card-icon-size, var(--mono-card-icon-size-lg, calc(var(--mono-spacing) * 10)));\r\n}\r\n\r\n[mono-card][mono-size=\"xl\"] {\r\n --_mono-card-padding: var(--mono-card-padding, var(--mono-card-padding-xl, calc(var(--mono-spacing) * 8)));\r\n --_mono-card-gap: var(--mono-card-gap, var(--mono-card-gap-xl, calc(var(--mono-spacing) * 8)));\r\n --_mono-card-font: var(--mono-card-font, var(--mono-card-font-xl, var(--mono-text-base)));\r\n --_mono-card-title-font: var(--mono-card-title-font, var(--mono-card-title-font-xl, var(--mono-text-xl)));\r\n --_mono-card-subtitle-font: var(--mono-card-subtitle-font, var(--mono-card-subtitle-font-xl, var(--mono-text-base)));\r\n --_mono-card-icon-size: var(--mono-card-icon-size, var(--mono-card-icon-size-xl, calc(var(--mono-spacing) * 11)));\r\n}\r\n\r\n[mono-card][mono-size=\"xxl\"] {\r\n --_mono-card-padding: var(--mono-card-padding, var(--mono-card-padding-xxl, calc(var(--mono-spacing) * 9)));\r\n --_mono-card-gap: var(--mono-card-gap, var(--mono-card-gap-xxl, calc(var(--mono-spacing) * 9)));\r\n --_mono-card-font: var(--mono-card-font, var(--mono-card-font-xxl, var(--mono-text-base)));\r\n --_mono-card-title-font: var(--mono-card-title-font, var(--mono-card-title-font-xxl, calc(var(--mono-text-xl) * 1.125)));\r\n --_mono-card-subtitle-font: var(--mono-card-subtitle-font, var(--mono-card-subtitle-font-xxl, var(--mono-text-lg)));\r\n --_mono-card-icon-size: var(--mono-card-icon-size, var(--mono-card-icon-size-xxl, calc(var(--mono-spacing) * 12)));\r\n}\r\n\r\n/* =========================================\r\n Corners — the library-wide radius scale\r\n ========================================= */\r\n\r\n[mono-card][mono-rounded=\"none\"] {\r\n --_mono-card-radius-preset: 0;\r\n}\r\n[mono-card][mono-rounded=\"xs\"] {\r\n --_mono-card-radius-preset: var(--mono-radius-sm);\r\n}\r\n[mono-card][mono-rounded=\"sm\"] {\r\n --_mono-card-radius-preset: var(--mono-radius-sm);\r\n}\r\n[mono-card][mono-rounded=\"md\"] {\r\n --_mono-card-radius-preset: var(--mono-radius-md);\r\n}\r\n[mono-card][mono-rounded=\"lg\"] {\r\n --_mono-card-radius-preset: var(--mono-radius-lg);\r\n}\r\n[mono-card][mono-rounded=\"xl\"] {\r\n --_mono-card-radius-preset: var(--mono-radius-xl);\r\n}\r\n[mono-card][mono-rounded=\"xxl\"] {\r\n --_mono-card-radius-preset: var(--mono-radius-2xl);\r\n}\r\n[mono-card][mono-rounded=\"full\"] {\r\n --_mono-card-radius-preset: var(--mono-radius-full);\r\n}\r\n\r\n/* =========================================\r\n Colours — EXTENSION: the ring and the title take the role's colour\r\n ========================================= */\r\n\r\n[mono-card][mono-color=\"primary\"] {\r\n --_mono-card-accent-preset: var(--primary);\r\n}\r\n[mono-card][mono-color=\"secondary\"] {\r\n --_mono-card-accent-preset: var(--secondary-foreground);\r\n}\r\n[mono-card][mono-color=\"success\"] {\r\n --_mono-card-accent-preset: var(--success);\r\n}\r\n[mono-card][mono-color=\"danger\"] {\r\n --_mono-card-accent-preset: var(--destructive);\r\n}\r\n[mono-card][mono-color=\"warning\"] {\r\n --_mono-card-accent-preset: var(--warning);\r\n}\r\n[mono-card][mono-color=\"info\"] {\r\n --_mono-card-accent-preset: var(--info);\r\n}\r\n[mono-card][mono-color=\"teal\"] {\r\n --_mono-card-accent-preset: var(--teal);\r\n}\r\n[mono-card][mono-color=\"purple\"] {\r\n --_mono-card-accent-preset: var(--purple);\r\n}\r\n[mono-card][mono-color=\"dark\"] {\r\n --_mono-card-accent-preset: var(--dark);\r\n}\r\n[mono-card][mono-color=\"neutral\"] {\r\n --_mono-card-accent-preset: var(--neutral);\r\n}\r\n[mono-card][mono-color=\"light\"] {\r\n --_mono-card-accent-preset: var(--muted-foreground);\r\n}\r\n\r\n/* =========================================\r\n Variants\r\n ========================================= */\r\n\r\n/* `outlined` IS upstream's `.card`: the ring and shadow-xs already on the root */\r\n[mono-card][mono-variant=\"outlined\"] {\r\n --_mono-card-ring-color: var(--mono-card-ring-color, color-mix(in oklab, var(--_mono-card-accent) 34%, transparent));\r\n}\r\n\r\n/* EXTENSION — a lifted card; the ring stays, the elevation grows */\r\n[mono-card]:is(:not([mono-variant]), [mono-variant=\"elevated\"]) {\r\n --_mono-card-elevation: var(--_mono-card-shadow-elevated);\r\n}\r\n\r\n/* EXTENSION — no elevation at all */\r\n[mono-card][mono-variant=\"flat\"] {\r\n --_mono-card-elevation: 0 0 #0000;\r\n}\r\n\r\n/* EXTENSION — an accent wash (flat tint, never a gradient) */\r\n[mono-card][mono-variant=\"tonal\"] {\r\n --_mono-card-elevation: 0 0 #0000;\r\n --_mono-card-ring-color: var(--mono-card-ring-color, color-mix(in oklab, var(--_mono-card-accent) 22%, transparent));\r\n background-color: color-mix(in oklab, var(--_mono-card-accent) var(--mono-mode-tint), var(--_mono-card-bg));\r\n}\r\n\r\n/* EXTENSION — a blurred pane over whatever is behind it */\r\n[mono-card][mono-variant=\"glass\"] {\r\n --_mono-card-elevation: var(--mono-shadow-lg);\r\n --_mono-card-ring-color: var(--mono-card-glass-border, color-mix(in oklab, var(--foreground) 12%, transparent));\r\n background-color: var(--mono-card-glass-bg, color-mix(in oklab, var(--card) 45%, transparent));\r\n backdrop-filter: blur(var(--mono-card-glass-blur, 12px));\r\n}\r\n\r\n/* =========================================\r\n States\r\n ========================================= */\r\n\r\n/* EXTENSION — a real border on top of the ring */\r\n[mono-card][mono-bordered] {\r\n border: var(--_mono-card-border-width) solid var(--_mono-card-border-color);\r\n}\r\n\r\n[mono-card][mono-clickable] {\r\n cursor: pointer;\r\n}\r\n\r\n@media (hover: hover) {\r\n [mono-card]:is([mono-hoverable], [mono-clickable]):not([mono-disabled]):hover {\r\n --_mono-card-elevation: var(--_mono-card-shadow-hover);\r\n }\r\n}\r\n\r\n/* EXTENSION — the chosen card, in the accent (Basecoat's own `has-[:checked]`\r\n treatment for a selectable label: primary/5 with a primary/30 edge) */\r\n[mono-card][mono-selected] {\r\n --_mono-card-edge-color: color-mix(in oklab, var(--_mono-card-accent) var(--mono-mode-checked-border), transparent);\r\n --_mono-card-edge-width: calc(var(--mono-border-width) * 2);\r\n background-color: color-mix(in oklab, var(--_mono-card-accent) var(--mono-mode-checked-bg), var(--_mono-card-bg));\r\n}\r\n\r\n[mono-card][mono-disabled] {\r\n cursor: not-allowed;\r\n opacity: 0.5;\r\n pointer-events: none;\r\n}\r\n\r\n/* the focus ring is that same inside edge, recoloured and thickened — an\r\n outside ring would be clipped exactly where the resting one was */\r\n[mono-card]:focus-visible {\r\n --_mono-card-edge-width: var(--_mono-card-focus-ring-width);\r\n --_mono-card-edge-color: color-mix(in oklab, var(--_mono-card-focus-ring-color) var(--_mono-card-focus-ring-alpha), transparent);\r\n}\r\n\r\n/* =========================================\r\n Regions — every one of them is inset by the card's padding, which is how\r\n upstream does it (`px-6` per region, `py-6` on the card) so a media band can\r\n run full-bleed between them\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/card.css .card >> > header\r\n — grid auto-rows-min items-start (grid-cols-[1fr_auto] when an action is present) */\r\n/* basecoat@1.0.2 styles/vega.css .card > header — gap-1 px-6 */\r\n:where([mono-card]) > [mono-header] {\r\n display: flex;\r\n align-items: flex-start;\r\n gap: var(--_mono-card-actions-gap);\r\n padding-inline: var(--_mono-card-padding);\r\n}\r\n\r\n/* No subtitle: the title is a single line beside a taller icon chip, so\r\n top-aligning pinned it to the chip's top edge. Centre the row instead.\r\n With a subtitle the row stays top-aligned (icon level with the title). */\r\n:where([mono-card]) > [mono-header][mono-no-subtitle] {\r\n align-items: center;\r\n}\r\n\r\n:where([mono-card]) > [mono-header] > [mono-header-content] {\r\n display: grid;\r\n align-content: start;\r\n gap: var(--_mono-card-header-gap);\r\n min-width: 0;\r\n flex: 1 1 auto;\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .card > header > :is(h2, h3, [data-title], .card-title)\r\n — text-base leading-normal font-medium (upstream also sets `leading-none` in\r\n components/card.css; vega's `leading-normal` wins) */\r\n:where([mono-card]) [mono-title] {\r\n margin: 0;\r\n font-size: var(--_mono-card-title-font);\r\n line-height: var(--mono-card-title-line-height, var(--mono-leading-normal));\r\n font-weight: var(--mono-card-title-font-weight, var(--mono-font-weight-medium));\r\n letter-spacing: var(--mono-card-title-tracking, normal);\r\n text-transform: var(--mono-card-title-transform, none);\r\n color: var(--mono-card-title-color, var(--_mono-card-text));\r\n}\r\n\r\n/* the colour prop tints the title, nothing else — `color` is an accent, not a fill */\r\n[mono-card][mono-color]:not([mono-color=\"neutral\"]) [mono-title] {\r\n color: var(--mono-card-title-color, var(--_mono-card-accent));\r\n}\r\n\r\n/* A heading handed in as <h2>/<h3>/<p> brings its own margins and type, and a\r\n host page styles those tags too (`.vp-doc h3` is a class selector, so it beats\r\n any sane rule here). The card OWNS the header type — Basecoat's own\r\n `.card > header > :is(h2, h3, …)` does the same — so both twins are important:\r\n the light one to beat the page, the slotted one because an inner-tree rule\r\n cannot otherwise reach outer-tree content at all. */\r\n:where([mono-card]) :is([mono-title], [mono-subtitle]) > * {\r\n margin: 0 !important;\r\n font: inherit !important;\r\n letter-spacing: inherit !important;\r\n color: inherit !important;\r\n}\r\n\r\n:where([mono-card]) :is([mono-title], [mono-subtitle]) slot::slotted(*) {\r\n margin: 0 !important;\r\n font: inherit !important;\r\n letter-spacing: inherit !important;\r\n color: inherit !important;\r\n}\r\n\r\n[mono-card] :is(h1, h2, h3, h4, h5, h6, p, small)[mono-title] {\r\n margin: 0;\r\n font-size: var(--_mono-card-title-font);\r\n line-height: var(--mono-card-title-line-height, var(--mono-leading-normal));\r\n font-weight: var(--mono-card-title-font-weight, var(--mono-font-weight-medium));\r\n letter-spacing: var(--mono-card-title-tracking, normal);\r\n}\r\n\r\n[mono-card] :is(h1, h2, h3, h4, h5, h6, p, small)[mono-subtitle] {\r\n margin: 0;\r\n font-size: var(--_mono-card-subtitle-font);\r\n line-height: var(--mono-card-subtitle-line-height, var(--mono-leading-normal));\r\n font-weight: var(--mono-font-weight-normal);\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .card > header > :is(p, [data-description], .card-description)\r\n — text-muted-foreground text-sm */\r\n:where([mono-card]) [mono-subtitle] {\r\n margin: 0;\r\n font-size: var(--_mono-card-subtitle-font);\r\n line-height: var(--mono-card-subtitle-line-height, var(--mono-leading-normal));\r\n font-weight: var(--mono-font-weight-normal);\r\n color: var(--_mono-card-subtext);\r\n}\r\n\r\n/* EXTENSION — the header's leading glyph box */\r\n:where([mono-card]) > [mono-header] > [mono-icon] {\r\n flex: 0 0 auto;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: var(--_mono-card-icon-size);\r\n height: var(--_mono-card-icon-size);\r\n border-radius: var(--mono-card-icon-radius, var(--mono-radius-md));\r\n line-height: 1;\r\n background-color: color-mix(in oklab, var(--_mono-card-accent) var(--mono-mode-tint), transparent);\r\n color: var(--_mono-card-accent);\r\n overflow: hidden;\r\n}\r\n\r\n/* `:not(slot)`: in the shadow build the region's only child IS a <slot>, a real\r\n element that this rule would size — and then `::slotted()` would size the\r\n glyph again, to 55% of that 55%. The glyph came out half the size of its light\r\n twin. */\r\n:where([mono-card]) > [mono-header] > [mono-icon] > *:not(slot) {\r\n display: block;\r\n width: var(--_mono-card-icon-glyph);\r\n height: var(--_mono-card-icon-glyph);\r\n}\r\n\r\n:where([mono-card]) > [mono-header] > [mono-icon] slot::slotted(*) {\r\n display: block !important;\r\n width: var(--_mono-card-icon-glyph) !important;\r\n height: var(--_mono-card-icon-glyph) !important;\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .card > section — px-6 */\r\n:where([mono-card]) > [mono-body] {\r\n padding-inline: var(--_mono-card-padding);\r\n min-width: 0;\r\n}\r\n\r\n[mono-card] > :is(p, ul, ol, dl, blockquote)[mono-body] {\r\n margin-block: 0;\r\n}\r\n\r\n:where([mono-card]) > [mono-body]:empty {\r\n display: none;\r\n}\r\n\r\n/* The body's own children keep their block margins out of the card's rhythm —\r\n the card's `gap` is what spaces the regions, and content that wants paragraph\r\n spacing brings its own.\r\n\r\n ALL children, not just the first and last: in the shadow build `::slotted()`\r\n sees the HOST's child order, so `:first-child` there means \"first child of the\r\n card element\" — a body paragraph that follows a `slot=\"title\"` heading is not\r\n first, and kept the page's margins while its light twin did not.\r\n\r\n `!important` on the slotted twins is not a style choice: a `::slotted()` rule\r\n is an INNER-tree declaration, and a normal declaration from the outer tree (a\r\n page's `p { margin: … }`) beats it at any specificity. Marking it important\r\n inverts that order. The light twins need no such thing — they are ordinary\r\n descendant rules in the same tree as the page. */\r\n:where([mono-card]) > [mono-body] > * {\r\n margin-block: 0 !important;\r\n}\r\n\r\n:where([mono-card]) > [mono-body] slot::slotted(*) {\r\n margin-block: 0 !important;\r\n}\r\n\r\n/* basecoat@1.0.2 components/card.css .card >> > footer — flex items-center */\r\n/* basecoat@1.0.2 styles/vega.css .card > footer — rounded-b-xl px-6 [.border-t]:pt-6 */\r\n:where([mono-card]) > :is([mono-actions], [mono-footer]) {\r\n display: flex;\r\n align-items: center;\r\n flex-wrap: wrap;\r\n gap: var(--_mono-card-actions-gap);\r\n padding-inline: var(--_mono-card-padding);\r\n}\r\n\r\n:where([mono-card]) > [mono-actions] {\r\n justify-content: flex-end;\r\n}\r\n\r\n/* the dividers: upstream's `[.border-b]:pb-6` idiom — a divided region pays the\r\n padding back on the divided edge. Both are ON by default, so the ATTRIBUTE\r\n marks the exception. */\r\n[mono-card]:not([mono-no-header-divider]) > [mono-header]:not([mono-empty]) {\r\n padding-bottom: var(--_mono-card-padding);\r\n border-bottom: var(--mono-border-width) solid var(--_mono-card-divider-color);\r\n}\r\n\r\n[mono-card]:not([mono-no-footer-divider]) > :is([mono-actions], [mono-footer]):not([mono-empty]) {\r\n padding-top: var(--_mono-card-padding);\r\n border-top: var(--mono-border-width) solid var(--_mono-card-divider-color);\r\n}\r\n\r\n/* =========================================\r\n Media — a full-bleed band; upstream gives the first/last child image the\r\n card's own corners and drops the padding on that edge\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .card\r\n — has-[>img:first-child]:pt-0 [&>img:first-child]:rounded-t-xl [&>img:last-child]:rounded-b-xl */\r\n:where([mono-card]) > [mono-media] {\r\n display: block;\r\n overflow: hidden;\r\n line-height: 0;\r\n}\r\n\r\n:where([mono-card]) > [mono-media] :is(img, picture, video, canvas, svg) {\r\n display: block;\r\n width: 100%;\r\n max-width: 100%;\r\n height: auto;\r\n object-fit: cover;\r\n}\r\n\r\n:where([mono-card]) > [mono-media] slot::slotted(:is(img, picture, video, canvas, svg)) {\r\n display: block !important;\r\n width: 100% !important;\r\n max-width: 100% !important;\r\n height: auto !important;\r\n object-fit: cover !important;\r\n}\r\n\r\n[mono-card]:has(> [mono-media]:not([mono-empty]):first-child) {\r\n padding-top: 0;\r\n}\r\n\r\n[mono-card]:has(> [mono-media]:not([mono-empty]):last-child) {\r\n padding-bottom: 0;\r\n}\r\n\r\n/* =========================================\r\n Loading — EXTENSION: a blurred veil with a spinner\r\n ========================================= */\r\n\r\n:where([mono-card]) > [mono-loading] {\r\n position: absolute;\r\n inset: 0;\r\n z-index: 2;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n background-color: var(--mono-card-loading-bg, color-mix(in oklab, var(--card) 58%, transparent));\r\n backdrop-filter: blur(var(--mono-card-loading-blur, 2px));\r\n}\r\n\r\n:where([mono-card]) [mono-spinner] {\r\n display: block;\r\n width: var(--mono-card-spinner-size, calc(var(--mono-spacing) * 5.5));\r\n height: var(--mono-card-spinner-size, calc(var(--mono-spacing) * 5.5));\r\n border: var(--mono-card-spinner-width, 2px) solid color-mix(in oklab, var(--_mono-card-accent) 25%, transparent);\r\n border-top-color: var(--_mono-card-accent);\r\n border-radius: var(--mono-radius-full);\r\n animation: mono-card-spin var(--mono-card-spinner-speed, 0.65s) linear infinite;\r\n}\r\n\r\n@keyframes mono-card-spin {\r\n to {\r\n transform: rotate(360deg);\r\n }\r\n}\r\n\r\n@media (prefers-reduced-motion: reduce) {\r\n [mono-card] {\r\n transition: none;\r\n }\r\n\r\n :where([mono-card]) [mono-spinner] {\r\n animation-duration: 2.4s;\r\n }\r\n}\r\n";
280
11
 
@@ -502,41 +233,5 @@ let MonoCardShadow = class MonoCardShadow extends withShadowUtilityStyles(MonoCa
502
233
  };
503
234
  MonoCardShadow = __decorate([customElement("mono-shadow-card")], MonoCardShadow);
504
235
 
505
- //#endregion
506
- //#region src/components/card/card-utils.ts
507
- /**
508
- * Validate card props
509
- */
510
- function validateCardProps(props) {
511
- const validVariants = [
512
- "outlined",
513
- "elevated",
514
- "flat",
515
- "tonal"
516
- ];
517
- const validColors = [
518
- "primary",
519
- "secondary",
520
- "success",
521
- "danger",
522
- "warning",
523
- "info",
524
- "neutral"
525
- ];
526
- if (props.variant && !validVariants.includes(props.variant)) return false;
527
- if (props.color && !validColors.includes(props.color)) return false;
528
- return true;
529
- }
530
- /**
531
- * Generate ARIA attributes for accessibility
532
- */
533
- function generateCardAttributes(clickable, hoverable, label) {
534
- return {
535
- "role": clickable ? "button" : "article",
536
- "tabindex": clickable ? "0" : void 0,
537
- "aria-label": label || void 0
538
- };
539
- }
540
-
541
236
  //#endregion
542
237
  export { MonoCardCore, MonoCardShadow, generateCardAttributes, validateCardProps };