@mono-lit/helper 0.0.8 → 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-CLqE8F8P.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-DUXo_jxd.js → mono-data-dropdown-Bgj2PDfm.js} +1 -1
  38. package/dist/{mono-data-grid-Bb00QM72.js → mono-data-grid-DJkp96N-.js} +346 -51
  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 +58 -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 +130 -5
  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-Bkr-e1-i.js +0 -4043
  161. package/dist/normalize-error-BmLbgANw.js +0 -1048
@@ -1,735 +1,11 @@
1
- import { _ as buildSizeStyle, a as __decorate, f as customElement, 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";
3
- import { t as MonoFormControlCore } from "../../form-control-core-BbiACMtL.js";
4
- import { n as FieldTooltipController, t as field_tooltip_css_raw_default } from "../../field-tooltip.css_raw-U5UeTa2d.js";
5
- import { n as label_position_css_raw_default, r as FieldValidationController, t as field_validation_css_raw_default } from "../../field-validation.css_raw-Cx6SGrfP.js";
6
- import { LitElement, html, isServer, nothing, unsafeCSS } from "lit";
7
- import { property, query, state } from "lit/decorators.js";
8
- import { ifDefined } from "lit/directives/if-defined.js";
9
- import { styleMap } from "lit/directives/style-map.js";
1
+ import { t as customElement } from "../../mono-element-CKcT0rwv.js";
2
+ import { t as __decorate } from "../../decorate-DbYFpi8R.js";
3
+ import { t as MonoDateCore } from "../../date-core-CyuSyvvG.js";
4
+ import { r as toShadowCss, t as flushSsrHydration } from "../../hydration-flush-Volt9X7Q.js";
5
+ import { n as label_position_css_raw_default, t as field_validation_css_raw_default } from "../../field-validation.css_raw-BU7C6173.js";
6
+ import { t as field_tooltip_css_raw_default } from "../../field-tooltip.css_raw-DVblekCl.js";
7
+ import { LitElement, html, isServer, unsafeCSS } from "lit";
10
8
 
11
- //#region src/components/date/date-core.ts
12
- const numberStringConverter = {
13
- fromAttribute(value) {
14
- if (value === null || value === "") return void 0;
15
- const parsed = Number(value);
16
- return Number.isFinite(parsed) ? parsed : void 0;
17
- },
18
- toAttribute(value) {
19
- return value === void 0 || value === null ? null : String(value);
20
- }
21
- };
22
- let _uid = 0;
23
- /**
24
- * `MonoDateCore` — render-mode-agnostic logic for `mono-date` (props, hybrid
25
- * aliases, flatpickr instance lifecycle, validation/state, and the full
26
- * `render()`). SSR-safe: all DOM/`window` access (flatpickr init in
27
- * `firstUpdated`, the accent read in `_onReady`) is `isServer`-guarded, so the
28
- * server emits only the field markup and flatpickr is created on the client after
29
- * hydration. Each build supplies `createRenderRoot()` + `static styles`. Mirrors
30
- * `textarea-core`/`switch-core`.
31
- *
32
- * `mono-date` has no named slots — all content comes from props — so there is no
33
- * slot capture/scan machinery here. The calendar popup is owned by flatpickr
34
- * (appended to `<body>`, client-only, styled by the global bundle), so this needs
35
- * no `PopupPortalController`/`popup-stack`.
36
- */
37
- const MonoDateCore = (superClass) => {
38
- class MonoDateCoreClass extends MonoFormControlCore(superClass) {
39
- constructor(...args) {
40
- super(...args);
41
- this.type = "date";
42
- this.modelValue = "";
43
- this.size = "md";
44
- this.color = "primary";
45
- this.variant = "outlined";
46
- this.labelPosition = "top";
47
- this.validationPosition = "bottom";
48
- this.tooltip = null;
49
- this._tooltip = new FieldTooltipController(this, () => this.tooltip);
50
- this._validation = new FieldValidationController(this, () => ({
51
- position: this.validationPosition,
52
- ...this._validationNotice ?? {
53
- state: void 0,
54
- text: void 0
55
- },
56
- suppressed: !!this._fp?.isOpen
57
- }), () => this.renderRoot?.querySelector?.("[mono-date] > [mono-field]"));
58
- this.error = false;
59
- this.success = false;
60
- this.disabled = false;
61
- this.readonly = false;
62
- this.required = false;
63
- this.clearable = false;
64
- this.cssClass = {};
65
- this.cssClassName = "";
66
- this._hasValue = false;
67
- this._fp = null;
68
- this._buildToken = 0;
69
- this._id = `mono-date-${++_uid}`;
70
- this._onTyping = (event) => {
71
- if (!this._fp || !this._typeable || this.disabled || this.readonly) return;
72
- if (this.mode === "range" || this.mode === "multiple") return;
73
- const raw = event.target.value;
74
- if (!raw.trim()) return;
75
- const fmt = this._fp.config.dateFormat;
76
- const parsed = this._fp.parseDate(raw, fmt);
77
- if (!parsed) return;
78
- this._fp.jumpToDate(parsed);
79
- if (this._fp.formatDate(parsed, fmt) === raw) this._fp.setDate(parsed, true);
80
- };
81
- defineHybridPropAliases(this, [
82
- "labelPosition",
83
- "validationPosition",
84
- "modelValue",
85
- "helperText",
86
- "validationState",
87
- "validationMessage",
88
- "errorMessage",
89
- "successMessage",
90
- "ariaLabelText",
91
- "cssClass",
92
- "dateFormat",
93
- "altInput",
94
- "altFormat",
95
- "clickOpens",
96
- "defaultDate",
97
- "minDate",
98
- "maxDate",
99
- "enableSeconds",
100
- "hourIncrement",
101
- "minuteIncrement",
102
- "defaultHour",
103
- "defaultMinute",
104
- "weekNumbers",
105
- "monthSelectorType",
106
- "shorthandCurrentMonth",
107
- "ariaDateFormat",
108
- "minWidth",
109
- "maxWidth",
110
- "minHeight",
111
- "maxHeight"
112
- ]);
113
- Object.defineProperty(this, "css-class", {
114
- get: () => this.cssClass,
115
- set: (value) => this._setCssClass(value),
116
- configurable: true,
117
- enumerable: false
118
- });
119
- Object.defineProperty(this, "cssclass", {
120
- get: () => this.cssClass,
121
- set: (value) => this._setCssClass(value),
122
- configurable: true,
123
- enumerable: false
124
- });
125
- }
126
- static get observedAttributes() {
127
- return [
128
- ...super.observedAttributes ?? [],
129
- "modelvalue",
130
- "css-class",
131
- "cssclass"
132
- ];
133
- }
134
- attributeChangedCallback(name, oldValue, newValue) {
135
- super.attributeChangedCallback(name, oldValue, newValue);
136
- if (oldValue === newValue) return;
137
- if (name === "modelvalue") {
138
- this.modelValue = newValue ?? "";
139
- return;
140
- }
141
- if (name === "css-class" || name === "cssclass") this._setCssClass(newValue);
142
- }
143
- /**
144
- * Normalized `typeable` flag. Frameworks (e.g. Vue) set a bare boolean
145
- * attribute as the *property* `''` — which bypasses `booleanStringConverter`
146
- * and is falsy. Treat presence (`''`/`true`/`'true'`) as enabled so typing
147
- * actually works.
148
- */
149
- get _typeable() {
150
- const v = this.typeable;
151
- return v === true || v === "" || v === "true";
152
- }
153
- static {
154
- this._configKeys = [
155
- "type",
156
- "options",
157
- "mode",
158
- "inline",
159
- "locale",
160
- "dateFormat",
161
- "altInput",
162
- "altFormat",
163
- "typeable",
164
- "clickOpens",
165
- "defaultDate",
166
- "minDate",
167
- "maxDate",
168
- "disable",
169
- "enable",
170
- "enableSeconds",
171
- "time24hr",
172
- "hourIncrement",
173
- "minuteIncrement",
174
- "defaultHour",
175
- "defaultMinute",
176
- "weekNumbers",
177
- "monthSelectorType",
178
- "shorthandCurrentMonth",
179
- "position",
180
- "ariaDateFormat",
181
- "disabled",
182
- "readonly"
183
- ];
184
- }
185
- willUpdate(changed) {
186
- super.willUpdate?.(changed);
187
- for (const key of [
188
- "error",
189
- "success",
190
- "disabled",
191
- "readonly",
192
- "required",
193
- "clearable"
194
- ]) {
195
- const v = this[key];
196
- if (typeof v !== "boolean") this[key] = this._toBoolean(v);
197
- }
198
- }
199
- _toBoolean(value) {
200
- if (typeof value === "boolean") return value;
201
- if (typeof value === "string") {
202
- const normalized = value.toLowerCase().trim();
203
- return normalized === "" || normalized === "true";
204
- }
205
- return Boolean(value);
206
- }
207
- async firstUpdated() {
208
- await this._ensurePicker();
209
- }
210
- /**
211
- * Build the picker if there isn't one — idempotent, and safe to call from every
212
- * update.
213
- *
214
- * Creation used to live only in `firstUpdated`, which Lit runs exactly once. After
215
- * a disconnect (`v-if`, `<KeepAlive>`, a Vue node move) `disconnectedCallback`
216
- * destroyed the instance and nothing ever rebuilt it, so the field rendered but had
217
- * no picker at all — every `open`/`close`/`toggle` was a silent `this._fp?.` no-op.
218
- * `chart-core` self-heals the same way.
219
- *
220
- * The `isConnected` re-check after the await matters just as much: without it, an
221
- * element disconnected *during* the dynamic import would construct a flatpickr on a
222
- * detached input that nothing would ever destroy — leaking its calendar DOM and the
223
- * four document/window listeners flatpickr binds.
224
- */
225
- async _ensurePicker() {
226
- if (isServer || this._fp || !this._nativeEl) return;
227
- const token = ++this._buildToken;
228
- const { default: flatpickr } = await import("../../esm-D0We7ndD.js");
229
- if (token !== this._buildToken || !this.isConnected || !this._nativeEl || this._fp) return;
230
- this._fp = flatpickr(this._nativeEl, this._buildConfig());
231
- this._hasValue = Boolean(this.modelValue);
232
- }
233
- updated(changed) {
234
- super.updated?.(changed);
235
- if (!this._fp) {
236
- this._ensurePicker();
237
- return;
238
- }
239
- if (MonoDateCoreClass._configKeys.some((k) => changed.has(k))) {
240
- this._rebuild();
241
- return;
242
- }
243
- if (changed.has("modelValue")) this._applyModelValue();
244
- }
245
- connectedCallback() {
246
- super.connectedCallback();
247
- if (!isServer) this._ensurePicker();
248
- }
249
- disconnectedCallback() {
250
- this._buildToken++;
251
- this._fp?.destroy();
252
- this._fp = null;
253
- super.disconnectedCallback();
254
- }
255
- _buildConfig() {
256
- const typeDefaults = this.type === "time" ? {
257
- enableTime: true,
258
- noCalendar: true
259
- } : this.type === "datetime" ? { enableTime: true } : {};
260
- const named = {};
261
- const str = (k, v) => {
262
- if (v !== void 0 && v !== "") named[k] = v;
263
- };
264
- const any = (k, v) => {
265
- if (v !== void 0) named[k] = v;
266
- };
267
- str("dateFormat", this.dateFormat);
268
- any("altInput", this.altInput);
269
- str("altFormat", this.altFormat);
270
- any("allowInput", this._typeable);
271
- any("clickOpens", this.clickOpens);
272
- any("defaultDate", this.defaultDate);
273
- any("minDate", this.minDate);
274
- any("maxDate", this.maxDate);
275
- any("disable", this.disable);
276
- any("enable", this.enable);
277
- str("mode", this.mode);
278
- any("enableSeconds", this.enableSeconds);
279
- any("time_24hr", this.time24hr);
280
- any("hourIncrement", this.hourIncrement);
281
- any("minuteIncrement", this.minuteIncrement);
282
- any("defaultHour", this.defaultHour);
283
- any("defaultMinute", this.defaultMinute);
284
- any("inline", this.inline);
285
- any("weekNumbers", this.weekNumbers);
286
- str("monthSelectorType", this.monthSelectorType);
287
- any("shorthandCurrentMonth", this.shorthandCurrentMonth);
288
- str("position", this.position);
289
- str("ariaDateFormat", this.ariaDateFormat);
290
- any("locale", this.locale);
291
- const config = {
292
- ...typeDefaults,
293
- ...this.options ?? {},
294
- ...named,
295
- onReady: [(_d, _s, instance) => this._onReady(instance)],
296
- onChange: [(dates, dateStr, instance) => this._onChange(dates, dateStr, instance)],
297
- onOpen: [(dates, _s, instance) => {
298
- this._emitOpenClose("open", dates, instance);
299
- this._validation.refresh();
300
- }],
301
- onClose: [(dates, _s, instance) => {
302
- this._emitOpenClose("close", dates, instance);
303
- this._validation.refresh();
304
- }]
305
- };
306
- if (this.modelValue) config.defaultDate = this.modelValue;
307
- if (this.disabled || this.readonly) config.clickOpens = false;
308
- return config;
309
- }
310
- /**
311
- * Open / close the calendar. flatpickr owns the popup, so these just forward
312
- * to the instance — but they give `mono-date` the same `open()`/`close()`/
313
- * `toggle()` surface as `mono-select` and `mono-dropdown-table`, which lets
314
- * anything driving an editor generically (e.g. the data grid opening the
315
- * focused inline editor on `Enter`) treat all of them the same.
316
- */
317
- /** Whether the calendar is currently open. */
318
- get isOpen() {
319
- return !!this._fp?.isOpen;
320
- }
321
- open() {
322
- if (this.disabled || this.readonly) return;
323
- this._fp?.open();
324
- }
325
- close() {
326
- this._fp?.close();
327
- }
328
- toggle() {
329
- if (this._fp?.isOpen) this.close();
330
- else this.open();
331
- }
332
- _rebuild() {
333
- if (!this._nativeEl) return;
334
- const open = this._fp?.isOpen;
335
- this._fp?.destroy();
336
- this._fp = null;
337
- const token = ++this._buildToken;
338
- import("../../esm-D0We7ndD.js").then(({ default: flatpickr }) => {
339
- if (token !== this._buildToken || !this.isConnected || !this._nativeEl) return;
340
- this._fp = flatpickr(this._nativeEl, this._buildConfig());
341
- if (open) this._fp.open();
342
- });
343
- }
344
- _applyModelValue() {
345
- this._fp?.setDate(this.modelValue || "", false);
346
- this._hasValue = Boolean(this.modelValue);
347
- }
348
- /**
349
- * Tag the calendar so our CSS only targets our pickers, and copy the host's
350
- * resolved accent onto it (the calendar lives in <body> and can't inherit the
351
- * field's `--date-primary`, so it follows the `color` prop via `--cal-accent`).
352
- *
353
- * The accent variable is declared on the `.mono-date` element (the inner
354
- * wrapper), which in the shadow build lives inside the shadow root — reading
355
- * from the host (`this`) would return empty. Read from that wrapper instead;
356
- * in the light build `renderRoot === this` and `.mono-date` is the child, so
357
- * this resolves correctly for both.
358
- */
359
- _onReady(instance) {
360
- if (isServer) return;
361
- const cal = instance.calendarContainer;
362
- if (!cal) return;
363
- cal.classList.add("mono-flatpickr");
364
- const scope = this.renderRoot.querySelector?.("[mono-date]") ?? this;
365
- const cs = getComputedStyle(scope);
366
- const accent = cs.getPropertyValue("--_mono-date-calendar-accent").trim();
367
- const accentFg = cs.getPropertyValue("--_mono-date-primary-foreground").trim();
368
- if (accent) cal.style.setProperty("--cal-accent", accent);
369
- if (accentFg) cal.style.setProperty("--cal-accent-foreground", accentFg);
370
- }
371
- _onChange(dates, dateStr, instance) {
372
- this.modelValue = dateStr;
373
- this._hasValue = Boolean(dateStr);
374
- const detail = {
375
- value: dateStr,
376
- modelValue: dateStr,
377
- dates,
378
- instance
379
- };
380
- const native = this._nativeEl;
381
- let done = false;
382
- const onNative = (event) => {
383
- done = true;
384
- dispatchMonoEvent(this, "change", detail, { sourceEvent: event });
385
- };
386
- native?.addEventListener("change", onNative, {
387
- once: true,
388
- capture: true
389
- });
390
- queueMicrotask(() => {
391
- if (done) return;
392
- done = true;
393
- native?.removeEventListener("change", onNative, { capture: true });
394
- dispatchMonoEvent(this, "change", detail);
395
- });
396
- }
397
- _emitOpenClose(kind, dates, instance) {
398
- dispatchMonoEvent(this, kind, {
399
- dates,
400
- instance
401
- });
402
- }
403
- _clear() {
404
- this._fp?.clear();
405
- this.modelValue = "";
406
- this._hasValue = false;
407
- const detail = {
408
- value: "",
409
- modelValue: "",
410
- dates: [],
411
- instance: this._fp
412
- };
413
- dispatchMonoEvent(this, "change", detail);
414
- }
415
- _setCssClass(value) {
416
- if (value == null) {
417
- this.cssClass = {};
418
- this.cssClassName = "";
419
- return;
420
- }
421
- if (typeof value === "object") {
422
- this.cssClass = value;
423
- return;
424
- }
425
- if (typeof value === "string") {
426
- const trimmed = value.trim();
427
- if (!trimmed) {
428
- this.cssClass = {};
429
- this.cssClassName = "";
430
- return;
431
- }
432
- if (trimmed.startsWith("{") && trimmed.endsWith("}")) try {
433
- this.cssClass = JSON.parse(trimmed);
434
- return;
435
- } catch {}
436
- this.cssClassName = trimmed;
437
- }
438
- }
439
- _cls(base, key) {
440
- const extra = this.cssClass?.[key];
441
- return extra ? `${base} ${extra}` : base;
442
- }
443
- get _resolvedState() {
444
- if (this.error) return "error";
445
- if (this.success) return "success";
446
- const state = this.validationState;
447
- if (state === "invalid") return "error";
448
- if (state === "valid") return "success";
449
- return state ?? "default";
450
- }
451
- get _message() {
452
- if (this._resolvedState === "error") return this.errorMessage || this.validationMessage || void 0;
453
- if (this._resolvedState === "success") return this.successMessage || this.validationMessage || void 0;
454
- return this.helperText || void 0;
455
- }
456
- get _wrapperClasses() {
457
- return [
458
- "mono-date",
459
- this.size,
460
- this.color,
461
- this.variant,
462
- this.disabled ? "disabled" : "",
463
- this.readonly ? "readonly" : "",
464
- this.required ? "required" : "",
465
- this._hasValue ? "has-value" : "",
466
- this._resolvedState !== "default" ? `is-${this._resolvedState}` : "",
467
- this.cssClassName || "",
468
- this.cssClass?.root || ""
469
- ].filter(Boolean).join(" ");
470
- }
471
- get _fieldClasses() {
472
- return [
473
- this._cls("mono-date-field", "field"),
474
- this.size,
475
- this.color,
476
- this.variant,
477
- this._resolvedState !== "default" ? `is-${this._resolvedState}` : ""
478
- ].filter(Boolean).join(" ");
479
- }
480
- _icon() {
481
- return this.renderIcon(this.type === "time" ? "clock" : "calendar");
482
- }
483
- /**
484
- * Icon hook. Light build (default): the global `.mono-icon` / `i-mdi-*` UnoCSS
485
- * icon. Shadow overrides with inline SVG (UnoCSS mask rules can't reach a
486
- * shadow root — they'd render as a solid "black cube").
487
- */
488
- renderIcon(name) {
489
- return html`<span class=${`mono-icon ${name === "calendar" ? "i-mdi-calendar-outline" : name === "clock" ? "i-mdi-clock-outline" : "i-mdi-close"}`} mono-icon aria-hidden="true"></span>`;
490
- }
491
- /**
492
- * The wrapper renders unconditionally, like input / select / tag-input. The
493
- * wrapper is a grid child, so returning `nothing` when there is no message left
494
- * date's block exactly one row-gap shorter than its siblings' — visible as soon
495
- * as a labelled date sits beside a labelled input in the same row.
496
- */
497
- /** The validation message and its state — the same precedence `_message` uses. */
498
- get _validationNotice() {
499
- const state = this._resolvedState;
500
- const text = state === "error" ? this.errorMessage || this.validationMessage : state === "success" ? this.successMessage || this.validationMessage : "";
501
- return text ? {
502
- state,
503
- text
504
- } : null;
505
- }
506
- _renderMessage() {
507
- if (this._validation.moved) {
508
- const notice = this._validationNotice;
509
- return html`
510
- <div class=${this._cls("mono-date-message-wrap", "messageWrap")} mono-message-wrap>
511
- ${this.helperText ? html`<div class=${`${this._cls("mono-date-message", "message")} default`} mono-message="helper">${this.helperText}</div>` : nothing}
512
- <div
513
- class=${`${this._cls("mono-date-message", "message")} ${notice.state}`}
514
- mono-message=${notice.state}
515
- mono-sr-only
516
- role=${notice.state === "error" ? "alert" : nothing}
517
- >${notice.text}</div>
518
- </div>
519
- `;
520
- }
521
- const msg = this._message;
522
- return html`
523
- <div class=${this._cls("mono-date-message-wrap", "messageWrap")} mono-message-wrap>
524
- ${msg ? html`<div
525
- class=${`${this._cls("mono-date-message", "message")} ${this._resolvedState}`}
526
- mono-message=${this._resolvedState === "default" ? "helper" : this._resolvedState}
527
- role=${this._resolvedState === "error" ? "alert" : nothing}
528
- >${msg}</div>` : nothing}
529
- </div>
530
- `;
531
- }
532
- render() {
533
- const state = this._resolvedState;
534
- return html`
535
- <div
536
- class=${this._wrapperClasses}
537
- style=${styleMap(buildSizeStyle(this))}
538
- mono-date
539
- mono-size=${this.size === "md" ? nothing : this.size}
540
- mono-color=${this.color === "primary" ? nothing : this.color}
541
- mono-variant=${this.variant === "outlined" ? nothing : this.variant}
542
- mono-label-position=${this.labelPosition === "top" ? nothing : this.labelPosition}
543
- mono-validation-position=${this.validationPosition === "bottom" ? nothing : this.validationPosition}
544
- mono-validation-state=${state === "default" ? nothing : state}
545
- ?mono-disabled=${this.disabled}
546
- ?mono-readonly=${this.readonly}
547
- ?mono-required=${this.required}
548
- ?mono-clearable=${this.clearable}
549
- >
550
- ${this.label ? html`<label class=${this._cls("mono-date-label", "label")} mono-label for=${this._id}>
551
- ${this.label}${this.required ? html`<span class=${this._cls("mono-date-required", "required")} mono-required-mark>*</span>` : nothing}${this._tooltip.render()}
552
- </label>` : nothing}
553
-
554
- <div class=${this._fieldClasses} mono-field>
555
- <span class=${this._cls("mono-date-icon", "icon")} mono-prefix aria-hidden="true">${this._icon()}</span>
556
- <input
557
- class=${this._cls("mono-date-native", "native")}
558
- mono-native
559
- id=${this._id}
560
- type="text"
561
- placeholder=${ifDefined(this.placeholder)}
562
- ?disabled=${this.disabled}
563
- ?readonly=${this.readonly && !this._typeable}
564
- aria-label=${ifDefined(this.ariaLabelText || this.label || void 0)}
565
- @input=${this._onTyping}
566
- />
567
- ${this._validation.renderIcon()}
568
- ${this.clearable && this._hasValue && !this.disabled && !this.readonly ? html`<button
569
- type="button"
570
- class=${this._cls("mono-date-clear", "clear")}
571
- mono-clear
572
- aria-label="Clear"
573
- @click=${this._clear}
574
- >
575
- ${this.renderIcon("close")}
576
- </button>` : nothing}
577
- </div>
578
-
579
- ${this._renderMessage()}
580
- ${this._validation.renderFloat()}
581
- </div>
582
- `;
583
- }
584
- }
585
- __decorate([property({ type: String })], MonoDateCoreClass.prototype, "type", void 0);
586
- __decorate([property({
587
- attribute: "model-value",
588
- reflect: true
589
- })], MonoDateCoreClass.prototype, "modelValue", void 0);
590
- __decorate([property({ type: String })], MonoDateCoreClass.prototype, "size", void 0);
591
- __decorate([property({ type: String })], MonoDateCoreClass.prototype, "color", void 0);
592
- __decorate([property({ type: String })], MonoDateCoreClass.prototype, "variant", void 0);
593
- __decorate([property({
594
- type: String,
595
- attribute: "label-position"
596
- })], MonoDateCoreClass.prototype, "labelPosition", void 0);
597
- __decorate([property({
598
- type: String,
599
- attribute: "validation-position"
600
- })], MonoDateCoreClass.prototype, "validationPosition", void 0);
601
- __decorate([property({ type: String })], MonoDateCoreClass.prototype, "label", void 0);
602
- __decorate([property({ type: String })], MonoDateCoreClass.prototype, "placeholder", void 0);
603
- __decorate([property({
604
- type: String,
605
- attribute: "helper-text"
606
- })], MonoDateCoreClass.prototype, "helperText", void 0);
607
- __decorate([property()], MonoDateCoreClass.prototype, "tooltip", void 0);
608
- __decorate([property({
609
- type: String,
610
- attribute: "validation-state"
611
- })], MonoDateCoreClass.prototype, "validationState", void 0);
612
- __decorate([property({
613
- type: String,
614
- attribute: "validation-message"
615
- })], MonoDateCoreClass.prototype, "validationMessage", void 0);
616
- __decorate([property({ converter: booleanStringConverter })], MonoDateCoreClass.prototype, "error", void 0);
617
- __decorate([property({
618
- type: String,
619
- attribute: "error-message"
620
- })], MonoDateCoreClass.prototype, "errorMessage", void 0);
621
- __decorate([property({ converter: booleanStringConverter })], MonoDateCoreClass.prototype, "success", void 0);
622
- __decorate([property({
623
- type: String,
624
- attribute: "success-message"
625
- })], MonoDateCoreClass.prototype, "successMessage", void 0);
626
- __decorate([property({
627
- reflect: true,
628
- converter: booleanStringConverter
629
- })], MonoDateCoreClass.prototype, "disabled", void 0);
630
- __decorate([property({
631
- reflect: true,
632
- converter: booleanStringConverter
633
- })], MonoDateCoreClass.prototype, "readonly", void 0);
634
- __decorate([property({
635
- reflect: true,
636
- converter: booleanStringConverter
637
- })], MonoDateCoreClass.prototype, "required", void 0);
638
- __decorate([property({ converter: booleanStringConverter })], MonoDateCoreClass.prototype, "clearable", void 0);
639
- __decorate([property({
640
- type: String,
641
- attribute: "aria-label-text"
642
- })], MonoDateCoreClass.prototype, "ariaLabelText", void 0);
643
- __decorate([property({
644
- type: String,
645
- attribute: "date-format"
646
- })], MonoDateCoreClass.prototype, "dateFormat", void 0);
647
- __decorate([property({
648
- attribute: "alt-input",
649
- converter: booleanStringConverter
650
- })], MonoDateCoreClass.prototype, "altInput", void 0);
651
- __decorate([property({
652
- type: String,
653
- attribute: "alt-format"
654
- })], MonoDateCoreClass.prototype, "altFormat", void 0);
655
- __decorate([property({ converter: booleanStringConverter })], MonoDateCoreClass.prototype, "typeable", void 0);
656
- __decorate([property({
657
- attribute: "click-opens",
658
- converter: booleanStringConverter
659
- })], MonoDateCoreClass.prototype, "clickOpens", void 0);
660
- __decorate([property({ attribute: "default-date" })], MonoDateCoreClass.prototype, "defaultDate", void 0);
661
- __decorate([property({ attribute: "min-date" })], MonoDateCoreClass.prototype, "minDate", void 0);
662
- __decorate([property({ attribute: "max-date" })], MonoDateCoreClass.prototype, "maxDate", void 0);
663
- __decorate([property({ attribute: false })], MonoDateCoreClass.prototype, "disable", void 0);
664
- __decorate([property({ attribute: false })], MonoDateCoreClass.prototype, "enable", void 0);
665
- __decorate([property({ type: String })], MonoDateCoreClass.prototype, "mode", void 0);
666
- __decorate([property({
667
- attribute: "enable-seconds",
668
- converter: booleanStringConverter
669
- })], MonoDateCoreClass.prototype, "enableSeconds", void 0);
670
- __decorate([property({
671
- attribute: "time-24hr",
672
- converter: booleanStringConverter
673
- })], MonoDateCoreClass.prototype, "time24hr", void 0);
674
- __decorate([property({
675
- attribute: "hour-increment",
676
- converter: numberStringConverter
677
- })], MonoDateCoreClass.prototype, "hourIncrement", void 0);
678
- __decorate([property({
679
- attribute: "minute-increment",
680
- converter: numberStringConverter
681
- })], MonoDateCoreClass.prototype, "minuteIncrement", void 0);
682
- __decorate([property({
683
- attribute: "default-hour",
684
- converter: numberStringConverter
685
- })], MonoDateCoreClass.prototype, "defaultHour", void 0);
686
- __decorate([property({
687
- attribute: "default-minute",
688
- converter: numberStringConverter
689
- })], MonoDateCoreClass.prototype, "defaultMinute", void 0);
690
- __decorate([property({ converter: booleanStringConverter })], MonoDateCoreClass.prototype, "inline", void 0);
691
- __decorate([property({
692
- attribute: "week-numbers",
693
- converter: booleanStringConverter
694
- })], MonoDateCoreClass.prototype, "weekNumbers", void 0);
695
- __decorate([property({ attribute: "month-selector-type" })], MonoDateCoreClass.prototype, "monthSelectorType", void 0);
696
- __decorate([property({
697
- attribute: "shorthand-current-month",
698
- converter: booleanStringConverter
699
- })], MonoDateCoreClass.prototype, "shorthandCurrentMonth", void 0);
700
- __decorate([property({ type: String })], MonoDateCoreClass.prototype, "position", void 0);
701
- __decorate([property({
702
- type: String,
703
- attribute: "aria-date-format"
704
- })], MonoDateCoreClass.prototype, "ariaDateFormat", void 0);
705
- __decorate([property({ attribute: false })], MonoDateCoreClass.prototype, "locale", void 0);
706
- __decorate([property({ attribute: false })], MonoDateCoreClass.prototype, "options", void 0);
707
- __decorate([property({ type: String })], MonoDateCoreClass.prototype, "width", void 0);
708
- __decorate([property({ type: String })], MonoDateCoreClass.prototype, "height", void 0);
709
- __decorate([property({
710
- type: String,
711
- attribute: "min-width"
712
- })], MonoDateCoreClass.prototype, "minWidth", void 0);
713
- __decorate([property({
714
- type: String,
715
- attribute: "max-width"
716
- })], MonoDateCoreClass.prototype, "maxWidth", void 0);
717
- __decorate([property({
718
- type: String,
719
- attribute: "min-height"
720
- })], MonoDateCoreClass.prototype, "minHeight", void 0);
721
- __decorate([property({
722
- type: String,
723
- attribute: "max-height"
724
- })], MonoDateCoreClass.prototype, "maxHeight", void 0);
725
- __decorate([property({ attribute: false })], MonoDateCoreClass.prototype, "cssClass", void 0);
726
- __decorate([property({ attribute: false })], MonoDateCoreClass.prototype, "cssClassName", void 0);
727
- __decorate([state()], MonoDateCoreClass.prototype, "_hasValue", void 0);
728
- __decorate([query(".mono-date-native")], MonoDateCoreClass.prototype, "_nativeEl", void 0);
729
- return MonoDateCoreClass;
730
- };
731
-
732
- //#endregion
733
9
  //#region \0raw:C:\Users\VCT-DEV\Desktop\libs\packages\helper\src\components\date\date.css?raw.js
734
10
  var date_css_raw_default = "/* @unocss-include */\r\n\r\n/* flatpickr's base stylesheet. The calendar renders into <body>, so this must\r\n live in the global bundle (dist/ui/index.css) — that's why date.css is\r\n @imported from src/entries/index.css. */\r\n@import 'flatpickr/dist/flatpickr.css';\r\n\r\n/* =========================================================================\r\n mono-date — the mono-input box (a port of Basecoat's `.input-group` with a\r\n leading icon, basecoat-css@1.0.2, vega style) around a flatpickr field, plus\r\n a calendar restyled in Basecoat's popover idiom.\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-date size=\"sm\" color=\"danger\" variant=\"filled\" label=\"Start\">\r\n <div mono-date mono-size=\"sm\" mono-color=\"danger\" mono-variant=\"filled\">\r\n <label mono-label>Start</label>\r\n <div mono-field>\r\n <span mono-prefix><span mono-icon class=\"mono-icon i-mdi-calendar-outline\"></span></span>\r\n <input mono-native type=\"text\" placeholder=\"Pick a date\" />\r\n </div>\r\n </div>\r\n\r\n An absent attribute is the prop's default (`:not([mono-size])` = md,\r\n `:not([mono-color])` = primary, `:not([mono-variant])` = outlined). The element\r\n renders these attributes on its wrapper (both builds); the old classes\r\n (`.mono-date.sm.filled`) are still emitted as inert hooks until 2.0 but no\r\n rule here reads them.\r\n\r\n Selector map (ours ≡ upstream):\r\n [mono-date] ≡ .field (flex column gap-3)\r\n [mono-date] > [mono-label] ≡ .field > label / .label\r\n [mono-date] > [mono-field] ≡ .input-group (h-9 rounded-md border-input shadow-xs)\r\n [mono-field] > [mono-prefix] > [mono-icon] ≡ .input-group > span[data-align='start'] > svg (ps-2, size-4, muted)\r\n [mono-field] > [mono-native] ≡ .input-group > input (borderless, ps-1.5 after an affix, text-sm)\r\n [mono-field] > [mono-clear] > [mono-icon] ≡ .input-group > button[data-align='end']:has(> svg) (ghost, size-6)\r\n [mono-message-wrap] > [mono-message] ≡ .field > p / .field [role='alert']\r\n [mono-validation-state=\"error\"] ≡ .input-group:has([aria-invalid=true]) + .field[data-invalid]\r\n [mono-validation-state=\"success\"] ≡ EXTENSION (the invalid pattern in --success)\r\n [mono-size=\"xs|sm|lg|xl|xxl\"] ≡ EXTENSION (the --mono-control-height-* ladder)\r\n [mono-variant=\"filled\"] ≡ EXTENSION (luma's .input-group)\r\n [mono-variant=\"underlined\"] ≡ EXTENSION (sera's .input-group: bottom edge only, no ring)\r\n .flatpickr-calendar.mono-flatpickr ≡ [data-popover] frame (bg-popover ring-1 ring-foreground/10 rounded-md shadow-md)\r\n + EXTENSION: shadcn Calendar values (Basecoat 1.0.2 ships no calendar)\r\n\r\n Inner parts are attributes too: [mono-label] (+ [mono-required-mark]),\r\n [mono-field], [mono-prefix] > [mono-icon], [mono-native], [mono-clear] >\r\n [mono-icon], [mono-message-wrap] > [mono-message=\"helper|error|success\"].\r\n\r\n The calendar renders into <body> (both builds), so it is styled through\r\n flatpickr's own classes under our `.mono-flatpickr` marker and reads the page\r\n tokens directly; the element copies the field's accent onto it as\r\n `--cal-accent` / `--cal-accent-foreground` so it follows the `color` prop.\r\n\r\n FLAVORS set the same knobs as mono-input, renamed `--mono-date-*` (see\r\n input.css) plus `--mono-date-calendar-{radius,shadow,ring,day-radius}`. Every\r\n fallback here is vega's value.\r\n ========================================================================= */\r\n\r\nmono-date {\r\n display: block;\r\n}\r\n\r\n[mono-date] {\r\n /* ── palette: each slot is a public knob over a Basecoat token ─────────── */\r\n --_mono-date-text: var(--mono-date-color, var(--mono-date-text, var(--foreground)));\r\n --_mono-date-placeholder: var(--mono-date-placeholder, var(--muted-foreground));\r\n --_mono-date-muted: var(--mono-date-muted, var(--muted-foreground));\r\n --_mono-date-primary: var(--mono-date-primary, var(--_mono-date-primary-preset, var(--ring)));\r\n --_mono-date-primary-foreground: var(--mono-date-primary-foreground, var(--_mono-date-primary-foreground-preset, var(--primary-foreground)));\r\n --_mono-date-danger: var(--mono-date-danger, var(--destructive));\r\n --_mono-date-success: var(--mono-date-success, var(--success));\r\n --_mono-date-warning: var(--mono-date-warning, var(--warning));\r\n --_mono-date-info: var(--mono-date-info, var(--info));\r\n --_mono-date-teal: var(--mono-date-teal, var(--teal));\r\n --_mono-date-purple: var(--mono-date-purple, var(--purple));\r\n --_mono-date-neutral: var(--mono-date-neutral, var(--neutral));\r\n --_mono-date-dark: var(--mono-date-dark, var(--dark));\r\n --_mono-date-secondary: var(--mono-date-secondary, var(--muted-foreground));\r\n\r\n /* ── the painted result — three tiers, base = .input-group (vega) ──────── */\r\n --_mono-date-ring-color: var(--mono-date-ring-color, var(--mono-date-focus-color, var(--_mono-date-primary)));\r\n --_mono-date-ring-width: var(--mono-date-ring-width, var(--_mono-date-ring-width-preset, var(--mono-ring-width)));\r\n --_mono-date-ring-alpha: var(--mono-date-ring-alpha, var(--mono-ring-alpha));\r\n --_mono-date-border-color: var(--mono-date-rest-border, var(--mono-date-border-color, var(--mono-date-border, var(--_mono-date-border-color-preset, var(--input)))));\r\n --_mono-date-bg: var(--mono-date-bg, var(--mono-date-surface, var(--_mono-date-bg-preset, var(--mono-mode-surface))));\r\n --_mono-date-shadow: var(--mono-date-shadow, var(--_mono-date-shadow-preset, 0 0 #0000));\r\n --_mono-date-affix-padding: var(--mono-date-affix-padding, var(--_mono-date-affix-padding-preset, calc(var(--mono-spacing) * 2)));\r\n --_mono-date-affix-icon: var(--mono-date-affix-icon-size, calc(var(--mono-spacing) * 4));\r\n\r\n /* ── md metrics live on the unqualified root ON PURPOSE: hand-written\r\n `<div mono-date>` that names no size renders exactly like size=\"md\".\r\n basecoat@1.0.2 styles/vega.css .input-group — h-9 rounded-md; > input px-2.5 text-sm ── */\r\n --_mono-date-height: var(--mono-date-height-md, var(--mono-control-height-md));\r\n --_mono-date-radius: var(--mono-date-radius-md, var(--_mono-date-radius-preset, var(--mono-date-radius, var(--mono-radius-md))));\r\n --_mono-date-padding-x: var(--mono-date-padding-x-md, var(--mono-date-padding-x, var(--_mono-date-padding-x-preset, calc(var(--mono-spacing) * 2.5))));\r\n --_mono-date-font-size: var(--mono-date-font-md, var(--mono-text-sm));\r\n --_mono-date-line-height: var(--mono-date-line-height, var(--mono-date-line-height-md, var(--mono-text-sm--lh)));\r\n --_mono-date-clear: calc(var(--mono-spacing) * 6);\r\n --_mono-date-clear-glyph: calc(var(--mono-spacing) * 3.5);\r\n\r\n /* basecoat@1.0.2 styles/vega.css .field — flex w-full flex-col gap-3 */\r\n display: flex;\r\n flex-direction: column;\r\n gap: var(--mono-date-gap, calc(var(--mono-spacing) * 3));\r\n width: 100%;\r\n font-family: inherit;\r\n color: var(--_mono-date-text);\r\n}\r\n\r\n[mono-date],\r\n[mono-date] *,\r\n[mono-date] *::before,\r\n[mono-date] *::after {\r\n box-sizing: border-box;\r\n}\r\n\r\n[mono-date] :is([mono-label], [mono-message])[mono-empty] {\r\n display: none;\r\n}\r\n\r\n/* =========================================\r\n Sizes — the field's painted height IS the token (tests/perf/field-heights)\r\n EXTENSION: the shared --mono-control-height-* ladder; text follows .btn's steps\r\n ========================================= */\r\n\r\n@media (width < 48rem) {\r\n [mono-date]:is(:not([mono-size]), [mono-size=\"md\"]) {\r\n --_mono-date-font-size: var(--mono-date-font-md, var(--mono-text-base));\r\n --_mono-date-line-height: var(--mono-date-line-height, var(--mono-date-line-height-md, var(--mono-text-base--lh)));\r\n }\r\n}\r\n\r\n[mono-date][mono-size=\"xs\"] {\r\n --_mono-date-height: var(--mono-date-height-xs, var(--mono-control-height-xs));\r\n --_mono-date-radius: var(--mono-date-radius-xs, var(--_mono-date-radius-preset, var(--mono-date-radius, var(--mono-radius-md))));\r\n --_mono-date-padding-x: var(--mono-date-padding-x-xs, var(--mono-date-padding-x, var(--_mono-date-padding-x-preset, calc(var(--mono-spacing) * 2))));\r\n --_mono-date-font-size: var(--mono-date-font-xs, var(--mono-text-xs));\r\n --_mono-date-line-height: var(--mono-date-line-height, var(--mono-date-line-height-xs, var(--mono-text-xs--lh)));\r\n --_mono-date-affix-icon: var(--mono-date-affix-icon-size, calc(var(--mono-spacing) * 3.5));\r\n --_mono-date-clear: calc(var(--mono-spacing) * 4);\r\n --_mono-date-clear-glyph: calc(var(--mono-spacing) * 3);\r\n}\r\n\r\n[mono-date][mono-size=\"sm\"] {\r\n --_mono-date-height: var(--mono-date-height-sm, var(--mono-control-height-sm));\r\n --_mono-date-radius: var(--mono-date-radius-sm, var(--_mono-date-radius-preset, var(--mono-date-radius, var(--mono-radius-md))));\r\n --_mono-date-padding-x: var(--mono-date-padding-x-sm, var(--mono-date-padding-x, var(--_mono-date-padding-x-preset, calc(var(--mono-spacing) * 2.5))));\r\n --_mono-date-font-size: var(--mono-date-font-sm, var(--mono-date-font-md, var(--mono-text-sm)));\r\n --_mono-date-line-height: var(--mono-date-line-height, var(--mono-date-line-height-sm, var(--mono-text-sm--lh)));\r\n --_mono-date-clear: calc(var(--mono-spacing) * 5);\r\n --_mono-date-clear-glyph: calc(var(--mono-spacing) * 3.5);\r\n}\r\n\r\n[mono-date][mono-size=\"lg\"] {\r\n --_mono-date-height: var(--mono-date-height-lg, var(--mono-control-height-lg));\r\n --_mono-date-radius: var(--mono-date-radius-lg, var(--_mono-date-radius-preset, var(--mono-date-radius, var(--mono-radius-md))));\r\n --_mono-date-padding-x: var(--mono-date-padding-x-lg, var(--mono-date-padding-x, var(--_mono-date-padding-x-preset, calc(var(--mono-spacing) * 2.5))));\r\n --_mono-date-font-size: var(--mono-date-font-lg, var(--mono-date-font-md, var(--mono-text-sm)));\r\n --_mono-date-line-height: var(--mono-date-line-height, var(--mono-date-line-height-lg, var(--mono-text-sm--lh)));\r\n}\r\n\r\n[mono-date][mono-size=\"xl\"] {\r\n --_mono-date-height: var(--mono-date-height-xl, var(--mono-control-height-xl));\r\n --_mono-date-radius: var(--mono-date-radius-xl, var(--_mono-date-radius-preset, var(--mono-date-radius, var(--mono-radius-md))));\r\n --_mono-date-padding-x: var(--mono-date-padding-x-xl, var(--mono-date-padding-x, var(--_mono-date-padding-x-preset, calc(var(--mono-spacing) * 3))));\r\n --_mono-date-font-size: var(--mono-date-font-xl, var(--mono-text-base));\r\n --_mono-date-line-height: var(--mono-date-line-height, var(--mono-date-line-height-xl, var(--mono-text-base--lh)));\r\n --_mono-date-affix-icon: var(--mono-date-affix-icon-size, calc(var(--mono-spacing) * 5));\r\n --_mono-date-clear: calc(var(--mono-spacing) * 7);\r\n --_mono-date-clear-glyph: calc(var(--mono-spacing) * 4);\r\n}\r\n\r\n[mono-date][mono-size=\"xxl\"] {\r\n --_mono-date-height: var(--mono-date-height-xxl, var(--mono-control-height-xxl));\r\n --_mono-date-radius: var(--mono-date-radius-xxl, var(--_mono-date-radius-preset, var(--mono-date-radius, var(--mono-radius-md))));\r\n --_mono-date-padding-x: var(--mono-date-padding-x-xxl, var(--mono-date-padding-x, var(--_mono-date-padding-x-preset, calc(var(--mono-spacing) * 4))));\r\n --_mono-date-font-size: var(--mono-date-font-xxl, var(--mono-text-lg));\r\n --_mono-date-line-height: var(--mono-date-line-height, var(--mono-date-line-height-xxl, var(--mono-text-lg--lh)));\r\n --_mono-date-affix-icon: var(--mono-date-affix-icon-size, calc(var(--mono-spacing) * 5));\r\n --_mono-date-clear: calc(var(--mono-spacing) * 8);\r\n --_mono-date-clear-glyph: calc(var(--mono-spacing) * 4);\r\n}\r\n\r\n/* =========================================\r\n Variants — each writes only `*-preset` slots\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .input-group — rounded-md border border-input\r\n shadow-xs bg-transparent (dark:bg-input/30 via --mono-mode-surface) */\r\n[mono-date]:is(:not([mono-variant]), [mono-variant=\"outlined\"]) {\r\n --_mono-date-bg-preset: var(--mono-date-outline-bg);\r\n --_mono-date-border-color-preset: var(--mono-date-outline-border-color);\r\n --_mono-date-side-border-color-preset: var(--mono-date-outline-side-border-color);\r\n --_mono-date-shadow-preset: var(--mono-date-outline-shadow, var(--mono-shadow-xs));\r\n --_mono-date-ring-width-preset: var(--mono-date-outline-ring-width);\r\n --_mono-date-radius-preset: var(--mono-date-outline-radius);\r\n --_mono-date-padding-x-preset: var(--mono-date-outline-padding-x);\r\n --_mono-date-affix-padding-preset: var(--mono-date-outline-affix-padding);\r\n}\r\n\r\n/* EXTENSION — filled ≡ basecoat@1.0.2 styles/luma.css .input-group */\r\n[mono-date][mono-variant=\"filled\"] {\r\n --_mono-date-bg-preset: var(--mono-date-filled-bg, color-mix(in oklab, var(--input) 50%, transparent));\r\n --_mono-date-border-color-preset: transparent;\r\n --_mono-date-shadow-preset: 0 0 #0000;\r\n}\r\n\r\n/* EXTENSION — underlined ≡ basecoat@1.0.2 styles/sera.css .input-group */\r\n[mono-date][mono-variant=\"underlined\"] {\r\n --_mono-date-bg-preset: transparent;\r\n --_mono-date-side-border-color-preset: transparent;\r\n --_mono-date-shadow-preset: 0 0 #0000;\r\n --_mono-date-ring-width-preset: 0px;\r\n --_mono-date-radius-preset: 0;\r\n --_mono-date-padding-x-preset: 0;\r\n --_mono-date-affix-padding-preset: 0;\r\n}\r\n\r\n/* =========================================\r\n Colours — the `color` prop is the accent: the focus ring + the calendar's\r\n selected day. Primary is Basecoat's --ring for the ring and --primary for the\r\n calendar (copied by the element as --cal-accent).\r\n ========================================= */\r\n\r\n[mono-date]:is(:not([mono-color]), [mono-color=\"primary\"]) {\r\n --_mono-date-primary-preset: var(--ring);\r\n --_mono-date-primary-foreground-preset: var(--primary-foreground);\r\n --_mono-date-calendar-accent: var(--mono-date-calendar-accent, var(--primary));\r\n}\r\n[mono-date][mono-color=\"secondary\"] {\r\n --_mono-date-primary-preset: var(--_mono-date-secondary);\r\n --_mono-date-primary-foreground-preset: var(--background);\r\n --_mono-date-calendar-accent: var(--mono-date-calendar-accent, var(--_mono-date-secondary));\r\n}\r\n[mono-date][mono-color=\"success\"] {\r\n --_mono-date-primary-preset: var(--_mono-date-success);\r\n --_mono-date-primary-foreground-preset: var(--success-foreground);\r\n --_mono-date-calendar-accent: var(--mono-date-calendar-accent, var(--_mono-date-success));\r\n}\r\n[mono-date][mono-color=\"danger\"] {\r\n --_mono-date-primary-preset: var(--_mono-date-danger);\r\n --_mono-date-primary-foreground-preset: var(--destructive-foreground);\r\n --_mono-date-calendar-accent: var(--mono-date-calendar-accent, var(--_mono-date-danger));\r\n}\r\n[mono-date][mono-color=\"warning\"] {\r\n --_mono-date-primary-preset: var(--_mono-date-warning);\r\n --_mono-date-primary-foreground-preset: var(--warning-foreground);\r\n --_mono-date-calendar-accent: var(--mono-date-calendar-accent, var(--_mono-date-warning));\r\n}\r\n[mono-date][mono-color=\"info\"] {\r\n --_mono-date-primary-preset: var(--_mono-date-info);\r\n --_mono-date-primary-foreground-preset: var(--info-foreground);\r\n --_mono-date-calendar-accent: var(--mono-date-calendar-accent, var(--_mono-date-info));\r\n}\r\n[mono-date][mono-color=\"teal\"] {\r\n --_mono-date-primary-preset: var(--_mono-date-teal);\r\n --_mono-date-primary-foreground-preset: var(--teal-foreground);\r\n --_mono-date-calendar-accent: var(--mono-date-calendar-accent, var(--_mono-date-teal));\r\n}\r\n[mono-date][mono-color=\"purple\"] {\r\n --_mono-date-primary-preset: var(--_mono-date-purple);\r\n --_mono-date-primary-foreground-preset: var(--purple-foreground);\r\n --_mono-date-calendar-accent: var(--mono-date-calendar-accent, var(--_mono-date-purple));\r\n}\r\n[mono-date][mono-color=\"neutral\"] {\r\n --_mono-date-primary-preset: var(--_mono-date-neutral);\r\n --_mono-date-primary-foreground-preset: var(--neutral-foreground);\r\n --_mono-date-calendar-accent: var(--mono-date-calendar-accent, var(--_mono-date-neutral));\r\n}\r\n[mono-date][mono-color=\"dark\"] {\r\n --_mono-date-primary-preset: var(--_mono-date-dark);\r\n --_mono-date-primary-foreground-preset: var(--dark-foreground);\r\n --_mono-date-calendar-accent: var(--mono-date-calendar-accent, var(--_mono-date-dark));\r\n}\r\n\r\n/* =========================================\r\n Label\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .field > label, .label — flex items-center\r\n gap-2 text-sm leading-none font-medium select-none w-fit */\r\n[mono-date] > [mono-label] {\r\n display: flex;\r\n align-items: center;\r\n width: fit-content;\r\n gap: var(--mono-date-label-gap, calc(var(--mono-spacing) * 2));\r\n font-size: var(--mono-date-label-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-date-label-line-height, 1);\r\n font-weight: var(--mono-date-label-font-weight, var(--mono-label-font-weight, var(--mono-font-weight-medium)));\r\n text-transform: var(--mono-date-label-text-transform, none);\r\n letter-spacing: var(--mono-date-label-letter-spacing, normal);\r\n color: var(--_mono-date-text);\r\n user-select: none;\r\n}\r\n\r\n[mono-date][mono-disabled] > [mono-label],\r\n[mono-date]:has(> [mono-field] > [mono-native]:disabled) > [mono-label] {\r\n opacity: 0.5;\r\n pointer-events: none;\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .field — data-invalid:text-destructive */\r\n[mono-date][mono-validation-state=\"error\"] > [mono-label] {\r\n color: var(--_mono-date-danger);\r\n}\r\n\r\n[mono-date] [mono-required-mark] {\r\n color: var(--_mono-date-danger);\r\n}\r\n\r\n/* `tooltip` prop — the info icon at the end of the label row (the label's\r\n flex gap spaces it). `pointer-events` is restored because a disabled field\r\n switches its label's off, and a disabled field is exactly where the reason\r\n is worth a hover. Knobs: --mono-date-label-tooltip-size / -color / -opacity. */\r\n:where([mono-date]) > [mono-label] > [mono-label-tooltip] {\r\n display: inline-flex;\r\n flex: none;\r\n align-items: center;\r\n justify-content: center;\r\n font-size: var(--mono-date-label-tooltip-size, 1.1em);\r\n color: var(--mono-date-label-tooltip-color, currentColor);\r\n opacity: var(--mono-date-label-tooltip-opacity, 0.6);\r\n border-radius: 9999px;\r\n cursor: help;\r\n pointer-events: auto;\r\n outline: none;\r\n transition: opacity 150ms ease;\r\n}\r\n\r\n:where([mono-date]) > [mono-label] > [mono-label-tooltip]:is(:hover, :focus-visible) {\r\n opacity: 1;\r\n}\r\n\r\n:where([mono-date]) > [mono-label] > [mono-label-tooltip]:focus-visible {\r\n outline: 2px solid currentColor;\r\n outline-offset: 2px;\r\n}\r\n\r\n:where([mono-date]) > [mono-label] > [mono-label-tooltip] > [mono-icon] {\r\n width: 1em;\r\n height: 1em;\r\n}\r\n\r\n/* =========================================\r\n The field — the bordered box\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/input-group.css .input-group */\r\n/* basecoat@1.0.2 styles/vega.css .input-group — h-9 rounded-md border border-input\r\n shadow-xs focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 */\r\n[mono-date] > [mono-field] {\r\n --_mono-date-bc: var(--_mono-date-border-color);\r\n --_mono-date-side-bc: var(--mono-date-side-border-color, var(--_mono-date-side-border-color-preset, var(--_mono-date-bc)));\r\n --_mono-date-ring: 0 0 #0000;\r\n\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n width: 100%;\r\n min-width: 0;\r\n min-height: var(--_mono-date-height);\r\n padding-block: var(--mono-date-padding-y, 0);\r\n outline-style: none;\r\n border: var(--mono-border-width) solid var(--_mono-date-bc);\r\n border-top-color: var(--_mono-date-side-bc);\r\n border-inline-color: var(--_mono-date-side-bc);\r\n border-radius: var(--_mono-date-radius);\r\n background: var(--_mono-date-bg);\r\n color: var(--_mono-date-text);\r\n box-shadow: var(--_mono-date-ring), var(--_mono-date-shadow);\r\n transition-property: color, box-shadow, border-color, background-color;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n\r\n &:focus-within {\r\n --_mono-date-bc: var(--_mono-date-ring-color);\r\n --_mono-date-ring: 0 0 0 var(--_mono-date-ring-width) color-mix(in oklab, var(--_mono-date-ring-color) var(--_mono-date-ring-alpha), transparent);\r\n }\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .input-group — has-[[aria-invalid=true]]:border-destructive\r\n has-[[aria-invalid=true]]:ring-3 has-[[aria-invalid=true]]:ring-destructive/20 */\r\n[mono-date][mono-validation-state=\"error\"] > [mono-field],\r\n[mono-date] > [mono-field]:has(> [mono-native][aria-invalid=\"true\"]) {\r\n --_mono-date-bc: var(--mono-mode-invalid-border);\r\n --_mono-date-ring: 0 0 0 var(--_mono-date-ring-width) var(--mono-mode-invalid-ring);\r\n}\r\n\r\n/* EXTENSION — success is the invalid pattern in --success */\r\n[mono-date][mono-validation-state=\"success\"] > [mono-field] {\r\n --_mono-date-bc: color-mix(in oklab, var(--_mono-date-success) var(--mono-mode-state-border-alpha), transparent);\r\n --_mono-date-ring: 0 0 0 var(--_mono-date-ring-width) color-mix(in oklab, var(--_mono-date-success) var(--mono-mode-state-ring-alpha), transparent);\r\n}\r\n\r\n/* EXTENSION — readonly: a muted surface */\r\n[mono-date][mono-readonly] > [mono-field] {\r\n background: var(--mono-date-readonly-bg, var(--muted));\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .input-group:has(> :is(input, textarea, select, [data-control]):disabled) — opacity-50 */\r\n[mono-date][mono-disabled] > [mono-field],\r\n[mono-date]:not([mono-readonly]) > [mono-field]:has(> [mono-native]:disabled) {\r\n opacity: 0.5;\r\n cursor: not-allowed;\r\n background: var(--mono-date-disabled-bg, var(--_mono-date-bg));\r\n}\r\n\r\n/* =========================================\r\n The native input (flatpickr's altInput takes the same rule: it replaces the\r\n native in the DOM and inherits its class + attributes)\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/input-group.css .input-group > :is(input, textarea, select, [data-control]) */\r\n/* basecoat@1.0.2 styles/vega.css .input-group > :is(input, select, [data-control]) — px-2.5 py-1 text-sm */\r\n[mono-date] [mono-native],\r\n[mono-date] [mono-field] > input.flatpickr-input.altInput {\r\n display: block;\r\n flex: 1 1 auto;\r\n width: 100%;\r\n min-width: 0;\r\n align-self: stretch;\r\n appearance: none;\r\n margin: 0;\r\n border: 0;\r\n border-radius: 0;\r\n outline: none;\r\n background: transparent;\r\n box-shadow: none;\r\n color: var(--_mono-date-text);\r\n font-family: inherit;\r\n font-size: var(--_mono-date-font-size);\r\n line-height: var(--_mono-date-line-height);\r\n padding-inline: var(--_mono-date-padding-x);\r\n padding-block: 0;\r\n\r\n &::placeholder {\r\n color: var(--_mono-date-placeholder);\r\n }\r\n\r\n &:disabled {\r\n pointer-events: none;\r\n cursor: not-allowed;\r\n }\r\n\r\n &:read-only {\r\n cursor: inherit;\r\n }\r\n\r\n &:focus,\r\n &:focus-visible {\r\n outline: none !important;\r\n }\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .input-group:not([data-orientation='vertical']):has(> :is([data-align='start'], [data-align='inline-start'])) > :is(input, select, [data-control]) — ps-1.5 */\r\n[mono-date] > [mono-field]:has(> [mono-prefix]:not([mono-empty])) > :is([mono-native], input.flatpickr-input.altInput) {\r\n padding-inline-start: var(--mono-date-affix-gap, calc(var(--mono-spacing) * 1.5));\r\n}\r\n[mono-date] > [mono-field]:has(> [mono-clear]) > :is([mono-native], input.flatpickr-input.altInput) {\r\n padding-inline-end: var(--mono-date-affix-gap, calc(var(--mono-spacing) * 1.5));\r\n}\r\n\r\n/* =========================================\r\n The leading icon\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .input-group > :is(span, [role='group'], header, footer), .input-group > :is(svg, kbd, .popover, .dropdown-menu)\r\n — text-muted-foreground select-none, svg size-4; [data-align='start'] ps-2 */\r\n[mono-date] [mono-prefix] {\r\n flex: 0 0 auto;\r\n display: inline-flex;\r\n align-items: center;\r\n padding-inline-start: var(--_mono-date-affix-padding);\r\n color: var(--_mono-date-muted);\r\n user-select: none;\r\n pointer-events: none;\r\n}\r\n\r\n[mono-date] [mono-prefix] > :is(svg, .mono-icon, [mono-icon]) {\r\n display: block;\r\n width: var(--_mono-date-affix-icon);\r\n height: var(--_mono-date-affix-icon);\r\n flex-shrink: 0;\r\n}\r\n\r\n/* =========================================\r\n Clear button — a ghost icon button in the end slot\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .input-group > :is(button, [role='group'] > button, header > button, footer > button):has(> svg):not(:has(> :not(svg)))\r\n — size-6 rounded-[calc(var(--radius)-5px)] p-0 shadow-none, svg size-3.5; me-1 */\r\n[mono-date] [mono-clear] {\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-date-clear);\r\n height: var(--_mono-date-clear);\r\n padding: 0;\r\n margin: 0;\r\n margin-inline-end: var(--mono-spacing);\r\n border: 0;\r\n border-radius: var(--mono-date-clear-radius, calc(var(--radius) - 5px));\r\n background: transparent;\r\n box-shadow: none;\r\n color: var(--_mono-date-muted);\r\n font: inherit;\r\n line-height: 1;\r\n cursor: pointer;\r\n outline-style: none;\r\n transition-property: color, background-color, box-shadow;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n\r\n &:focus-visible {\r\n box-shadow: 0 0 0 var(--_mono-date-ring-width) color-mix(in oklab, var(--_mono-date-ring-color) var(--_mono-date-ring-alpha), transparent);\r\n }\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .btn[data-variant='ghost'] — hover:bg-muted hover:text-foreground */\r\n@media (hover: hover) {\r\n [mono-date] [mono-clear]:hover {\r\n background: var(--mono-mode-ghost-hover);\r\n color: var(--_mono-date-text);\r\n }\r\n}\r\n\r\n[mono-date] [mono-clear] > :is(svg, .mono-icon, [mono-icon]) {\r\n display: block;\r\n width: var(--_mono-date-clear-glyph);\r\n height: var(--_mono-date-clear-glyph);\r\n pointer-events: none;\r\n}\r\n\r\n/* =========================================\r\n Message\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .fieldset legend + p, .field > p, .field section > p */\r\n[mono-date] > [mono-message-wrap] {\r\n display: block;\r\n}\r\n\r\n[mono-date] > [mono-message-wrap]:not(:has([mono-message]:not([mono-empty]))) {\r\n display: none;\r\n}\r\n\r\n[mono-date] [mono-message] {\r\n font-size: var(--mono-date-message-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-date-message-line-height, var(--mono-leading-normal));\r\n font-weight: var(--mono-font-weight-normal);\r\n text-align: start;\r\n color: var(--_mono-date-muted);\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .field [role=\"alert\"] — text-destructive text-sm */\r\n[mono-date] [mono-message=\"error\"] {\r\n color: var(--_mono-date-danger);\r\n}\r\n\r\n[mono-date] [mono-message=\"success\"] {\r\n color: var(--_mono-date-success);\r\n}\r\n\r\n@media (prefers-reduced-motion: reduce) {\r\n [mono-date] > [mono-field],\r\n [mono-date] [mono-clear] {\r\n transition: none;\r\n }\r\n}\r\n\r\n/* =========================================\r\n flatpickr calendar — restyled in Basecoat's idiom\r\n -----------------------------------------\r\n The calendar renders into <body>, so it reads the page tokens and cannot see\r\n the field's resolvers; the element copies the field's accent onto it as\r\n `--cal-accent` / `--cal-accent-foreground` (inline) so it follows the `color`\r\n prop. Every rule is scoped to our `.mono-flatpickr` marker; flatpickr's own\r\n geometry (day cells, container widths) is kept — only colour, radius,\r\n typography and the frame are ours.\r\n\r\n basecoat@1.0.2 styles/vega.css .select:not(select) [data-popover] — the frame:\r\n bg-popover text-popover-foreground ring-1 ring-foreground/10 rounded-md\r\n shadow-md. EXTENSION: the day / caption / nav values are shadcn's Calendar\r\n (Basecoat 1.0.2 ships no calendar): day size-8 rounded-md text-sm,\r\n hover / today / in-range bg-accent text-accent-foreground, selected\r\n bg-primary text-primary-foreground, outside days text-muted-foreground/50,\r\n caption text-sm font-medium, weekdays text-muted-foreground text-[0.8rem].\r\n ========================================= */\r\n.flatpickr-calendar.mono-flatpickr {\r\n --cal-bg: var(--mono-date-calendar-bg, var(--popover));\r\n --cal-text: var(--mono-date-calendar-color, var(--popover-foreground));\r\n --cal-muted: var(--muted-foreground);\r\n --cal-faint: color-mix(in oklab, var(--muted-foreground) 50%, transparent);\r\n --cal-border: var(--border);\r\n --cal-soft: var(--accent);\r\n --cal-soft-foreground: var(--accent-foreground);\r\n --cal-accent: var(--primary);\r\n --cal-accent-foreground: var(--primary-foreground);\r\n --cal-radius: var(--mono-date-calendar-day-radius, var(--mono-radius-md));\r\n\r\n background: var(--cal-bg);\r\n border: 0;\r\n border-radius: var(--mono-date-calendar-radius, var(--mono-radius-md));\r\n box-shadow: var(--mono-date-calendar-ring, 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent)), var(--mono-date-calendar-shadow, var(--mono-shadow-md));\r\n color: var(--cal-text);\r\n font-family: inherit;\r\n font-size: var(--mono-text-sm);\r\n line-height: var(--mono-text-sm--lh);\r\n}\r\n\r\n/* a popover has no pointer arrow */\r\n.flatpickr-calendar.mono-flatpickr::before,\r\n.flatpickr-calendar.mono-flatpickr::after {\r\n display: none;\r\n}\r\n\r\n/* months / header — text-sm font-medium */\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-month,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-current-month,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-current-month input.cur-year {\r\n color: var(--cal-text);\r\n fill: var(--cal-text);\r\n font-size: var(--mono-text-sm);\r\n font-weight: var(--mono-font-weight-medium);\r\n}\r\n\r\n/* nav — .btn[data-variant='outline'][data-size='icon-sm']: size-7 rounded-md\r\n border-border bg-background hover:bg-muted, painted flat here */\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-prev-month,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-next-month {\r\n color: var(--cal-muted);\r\n fill: var(--cal-muted);\r\n border-radius: var(--cal-radius);\r\n transition-property: color, background-color;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n}\r\n\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-prev-month svg,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-next-month svg {\r\n fill: currentColor;\r\n}\r\n\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-prev-month:hover,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-next-month:hover {\r\n background: var(--cal-soft);\r\n color: var(--cal-soft-foreground);\r\n}\r\n\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-prev-month:hover svg,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-next-month:hover svg {\r\n fill: var(--cal-soft-foreground);\r\n}\r\n\r\n/* month dropdown — a native <select>. Its popup list is drawn by the browser\r\n from the select's OWN background-color and the option colours (a transparent\r\n select falls back to the OS palette, which is what mismatched the dark popover),\r\n so the select carries the popover surface and never changes it on hover. */\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-monthDropdown-months {\r\n background: var(--cal-bg);\r\n color: var(--cal-text);\r\n color-scheme: inherit;\r\n font-weight: var(--mono-font-weight-medium);\r\n border-radius: var(--cal-radius);\r\n transition-property: color;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n}\r\n\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-monthDropdown-months:hover {\r\n background: var(--cal-bg);\r\n color: var(--cal-accent);\r\n}\r\n\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {\r\n background: var(--cal-bg);\r\n color: var(--cal-text);\r\n font-weight: var(--mono-font-weight-normal);\r\n}\r\n\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month:checked {\r\n background: var(--cal-soft);\r\n color: var(--cal-soft-foreground);\r\n}\r\n\r\n/* year stepper */\r\n\r\n.flatpickr-calendar.mono-flatpickr .numInputWrapper:hover {\r\n background: var(--cal-soft);\r\n}\r\n\r\n.flatpickr-calendar.mono-flatpickr .numInputWrapper span {\r\n border-color: var(--cal-border);\r\n}\r\n\r\n.flatpickr-calendar.mono-flatpickr .numInputWrapper span:hover {\r\n background: var(--cal-soft);\r\n}\r\n\r\n.flatpickr-calendar.mono-flatpickr .numInputWrapper span.arrowUp::after {\r\n border-bottom-color: var(--cal-muted);\r\n}\r\n\r\n.flatpickr-calendar.mono-flatpickr .numInputWrapper span.arrowDown::after {\r\n border-top-color: var(--cal-muted);\r\n}\r\n\r\n/* weekdays — text-muted-foreground text-[0.8rem] font-normal */\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-weekdays {\r\n background: transparent;\r\n}\r\n\r\n.flatpickr-calendar.mono-flatpickr span.flatpickr-weekday {\r\n background: transparent;\r\n color: var(--cal-muted);\r\n font-size: 0.8rem;\r\n font-weight: var(--mono-font-weight-normal);\r\n}\r\n\r\n/* days — rounded-md text-sm; hover bg-accent; today bg-accent; selected bg-primary */\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-day {\r\n color: var(--cal-text);\r\n border: 1px solid transparent;\r\n border-radius: var(--cal-radius);\r\n font-size: var(--mono-text-sm);\r\n font-weight: var(--mono-font-weight-normal);\r\n}\r\n\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-day:hover,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-day:focus {\r\n background: var(--cal-soft);\r\n border-color: transparent;\r\n color: var(--cal-soft-foreground);\r\n}\r\n\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-day.today {\r\n background: var(--cal-soft);\r\n border-color: transparent;\r\n color: var(--cal-soft-foreground);\r\n}\r\n\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-day.selected,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-day.startRange,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-day.endRange,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-day.selected:hover,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-day.startRange:hover,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-day.endRange:hover,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-day.selected:focus,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-day.startRange:focus,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-day.endRange:focus,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-day.selected.today {\r\n background: var(--cal-accent);\r\n border-color: var(--cal-accent);\r\n color: var(--cal-accent-foreground);\r\n}\r\n\r\n/* range middle — bg-accent, squared between the two ends */\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-day.inRange {\r\n background: var(--cal-soft);\r\n border-color: transparent;\r\n color: var(--cal-soft-foreground);\r\n border-radius: 0;\r\n box-shadow: -5px 0 0 var(--cal-soft), 5px 0 0 var(--cal-soft);\r\n}\r\n\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-day.prevMonthDay,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-day.nextMonthDay {\r\n color: var(--cal-faint);\r\n}\r\n\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-day.flatpickr-disabled,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-day.flatpickr-disabled:hover {\r\n color: var(--cal-faint);\r\n background: transparent;\r\n cursor: not-allowed;\r\n}\r\n\r\n/* week numbers */\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-weekwrapper .flatpickr-weekday,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-weekwrapper span.flatpickr-day {\r\n color: var(--cal-faint);\r\n}\r\n\r\n/* time */\r\n.flatpickr-calendar.mono-flatpickr.hasTime .flatpickr-time {\r\n border-top: 1px solid var(--cal-border);\r\n}\r\n\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-time input,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-time .flatpickr-time-separator,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-time .flatpickr-am-pm {\r\n color: var(--cal-text);\r\n background: transparent;\r\n}\r\n\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-time input:hover,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-time input:focus,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-time .flatpickr-am-pm:hover,\r\n.flatpickr-calendar.mono-flatpickr .flatpickr-time .flatpickr-am-pm:focus {\r\n background: var(--cal-soft);\r\n color: var(--cal-soft-foreground);\r\n}\r\n\r\n/* the inline calendar (`inline`) sits in the page flow, on the field's own surface */\r\n.flatpickr-calendar.mono-flatpickr.inline {\r\n box-shadow: var(--mono-date-calendar-ring, 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent));\r\n}\r\n\r\n/* =========================================\r\n label-position — the slots form/label-position.css reads\r\n (top / notched / left / right; public knobs: --mono-date-label-width,\r\n -label-side-gap, -label-notch-font-size, -label-notch-bg)\r\n ========================================= */\r\n\r\n[mono-date][mono-label-position] {\r\n --_mono-lp-width: var(--mono-date-label-width, auto);\r\n --_mono-lp-gap: var(--mono-date-label-side-gap, calc(var(--mono-spacing) * 3));\r\n --_mono-lp-height: var(--_mono-date-height);\r\n --_mono-lp-box-min: var(--_mono-date-height);\r\n --_mono-lp-padding-x: var(--_mono-date-padding-x);\r\n --_mono-lp-padding-y: 0px;\r\n --_mono-lp-font: var(--mono-date-label-notch-font-size, var(--mono-text-xs));\r\n --_mono-lp-notch-bg: var(--mono-date-label-notch-bg, var(--background));\r\n --_mono-lp-field-bg: var(--_mono-date-bg);\r\n}\r\n";
735
11