@editora/ui-core 0.2.0 → 0.2.1

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 (153) hide show
  1. package/README.md +8 -0
  2. package/dist/accordion.cjs.js +1 -1
  3. package/dist/accordion.esm.js +1 -1
  4. package/dist/alert-dialog.cjs.js +32 -24
  5. package/dist/alert-dialog.esm.js +48 -40
  6. package/dist/alert.cjs.js +2 -2
  7. package/dist/alert.esm.js +2 -2
  8. package/dist/animated-text.cjs.js +5 -5
  9. package/dist/animated-text.esm.js +5 -5
  10. package/dist/app-header.cjs.js +12 -7
  11. package/dist/app-header.esm.js +12 -7
  12. package/dist/avatar.cjs.js +3 -3
  13. package/dist/avatar.esm.js +3 -3
  14. package/dist/{calendar-o273O28D.js → calendar-CzpWDxLc.js} +5 -4
  15. package/dist/{calendar-DmxiZrR7.mjs → calendar-DkSDFg33.mjs} +1 -0
  16. package/dist/calendar.cjs.js +1 -1
  17. package/dist/calendar.esm.js +1 -1
  18. package/dist/chart.cjs.js +13 -7
  19. package/dist/chart.esm.js +13 -7
  20. package/dist/collapsible.cjs.js +2 -2
  21. package/dist/collapsible.esm.js +2 -2
  22. package/dist/color-picker.cjs.js +3 -3
  23. package/dist/color-picker.esm.js +3 -3
  24. package/dist/combobox.cjs.js +3 -3
  25. package/dist/combobox.esm.js +36 -36
  26. package/dist/components/ui-alert-dialog.d.ts.map +1 -1
  27. package/dist/components/ui-app-header.d.ts.map +1 -1
  28. package/dist/components/ui-calendar.d.ts.map +1 -1
  29. package/dist/components/ui-chart.d.ts.map +1 -1
  30. package/dist/components/ui-gantt.d.ts.map +1 -1
  31. package/dist/components/ui-hover-card.d.ts.map +1 -1
  32. package/dist/components/ui-inline-edit.d.ts.map +1 -1
  33. package/dist/components/ui-multi-select.d.ts.map +1 -1
  34. package/dist/components/ui-sidebar.d.ts.map +1 -1
  35. package/dist/components/ui-tabs.d.ts.map +1 -1
  36. package/dist/components/ui-wizard.d.ts.map +1 -1
  37. package/dist/context-menu.cjs.js +1 -1
  38. package/dist/context-menu.esm.js +1 -1
  39. package/dist/data-table.cjs.js +3 -3
  40. package/dist/data-table.esm.js +3 -3
  41. package/dist/date-field.cjs.js +2 -2
  42. package/dist/date-field.esm.js +14 -14
  43. package/dist/date-picker.cjs.js +3 -3
  44. package/dist/date-picker.esm.js +4 -4
  45. package/dist/date-range-picker.cjs.js +3 -3
  46. package/dist/date-range-picker.esm.js +59 -59
  47. package/dist/date-range-time-picker.cjs.js +2 -2
  48. package/dist/date-range-time-picker.esm.js +3 -3
  49. package/dist/date-time-picker.cjs.js +2 -2
  50. package/dist/date-time-picker.esm.js +3 -3
  51. package/dist/{date-time-utils-DdigV4hs.js → date-time-utils-C-4eHTyy.js} +1 -1
  52. package/dist/{date-time-utils-B4hAkt36.mjs → date-time-utils-zAx4ghvC.mjs} +1 -1
  53. package/dist/description.cjs.js +4 -4
  54. package/dist/description.esm.js +4 -4
  55. package/dist/dialog.cjs.js +2 -2
  56. package/dist/dialog.esm.js +2 -2
  57. package/dist/direction-provider.cjs.js +1 -1
  58. package/dist/direction-provider.esm.js +1 -1
  59. package/dist/dock.cjs.js +1 -1
  60. package/dist/dock.esm.js +1 -1
  61. package/dist/dropdown.cjs.js +1 -1
  62. package/dist/dropdown.esm.js +1 -1
  63. package/dist/field-error.cjs.js +1 -1
  64. package/dist/field-error.esm.js +7 -7
  65. package/dist/field.cjs.js +1 -1
  66. package/dist/field.esm.js +29 -29
  67. package/dist/fieldset.cjs.js +4 -4
  68. package/dist/fieldset.esm.js +3 -3
  69. package/dist/file-upload.cjs.js +2 -2
  70. package/dist/file-upload.esm.js +2 -2
  71. package/dist/flex.cjs.js +2 -2
  72. package/dist/flex.esm.js +8 -8
  73. package/dist/form.cjs.js +4 -4
  74. package/dist/form.esm.js +4 -4
  75. package/dist/gantt.cjs.js +7 -5
  76. package/dist/gantt.esm.js +7 -5
  77. package/dist/grid.cjs.js +1 -1
  78. package/dist/grid.esm.js +1 -1
  79. package/dist/hover-card.cjs.js +1 -1
  80. package/dist/hover-card.esm.js +11 -8
  81. package/dist/index.cjs.js +1 -1
  82. package/dist/index.esm.js +2 -2
  83. package/dist/inline-edit.cjs.js +6 -6
  84. package/dist/inline-edit.esm.js +15 -15
  85. package/dist/input.cjs.js +1 -1
  86. package/dist/input.esm.js +1 -1
  87. package/dist/label.cjs.js +6 -6
  88. package/dist/label.esm.js +6 -6
  89. package/dist/masonry-grid.cjs.js +2 -2
  90. package/dist/masonry-grid.esm.js +11 -11
  91. package/dist/{menu-item-styles-IGSFLAHu.mjs → menu-item-styles-CdqxPUuw.mjs} +15 -15
  92. package/dist/{menu-item-styles-B4onAr4C.js → menu-item-styles-DUdyjQ7i.js} +10 -10
  93. package/dist/menu.cjs.js +1 -1
  94. package/dist/menu.esm.js +1 -1
  95. package/dist/menubar.cjs.js +1 -1
  96. package/dist/menubar.esm.js +1 -1
  97. package/dist/multi-select.cjs.js +7 -7
  98. package/dist/multi-select.esm.js +26 -26
  99. package/dist/number-field.cjs.js +1 -1
  100. package/dist/number-field.esm.js +1 -1
  101. package/dist/number-ticker.cjs.js +4 -4
  102. package/dist/number-ticker.esm.js +10 -10
  103. package/dist/odometer.cjs.js +7 -7
  104. package/dist/odometer.esm.js +14 -14
  105. package/dist/password-field.cjs.js +1 -1
  106. package/dist/password-field.esm.js +1 -1
  107. package/dist/pin-input.cjs.js +1 -1
  108. package/dist/pin-input.esm.js +1 -1
  109. package/dist/placement-grid.cjs.js +1 -1
  110. package/dist/placement-grid.esm.js +1 -1
  111. package/dist/portal.cjs.js +1 -1
  112. package/dist/portal.esm.js +1 -1
  113. package/dist/presence.cjs.js +1 -1
  114. package/dist/presence.esm.js +1 -1
  115. package/dist/quick-actions.cjs.js +1 -1
  116. package/dist/quick-actions.esm.js +1 -1
  117. package/dist/radio.cjs.js +1 -1
  118. package/dist/radio.esm.js +1 -1
  119. package/dist/{runtime-CQM6wZOc.mjs → runtime-BRT7E4A8.mjs} +377 -329
  120. package/dist/runtime-CXw4SGV9.js +5 -0
  121. package/dist/runtime.cjs.js +1 -1
  122. package/dist/runtime.esm.js +1 -1
  123. package/dist/select.cjs.js +2 -2
  124. package/dist/select.esm.js +2 -2
  125. package/dist/separator.cjs.js +6 -6
  126. package/dist/separator.esm.js +7 -7
  127. package/dist/sidebar.cjs.js +7 -6
  128. package/dist/sidebar.esm.js +7 -6
  129. package/dist/slot.cjs.js +1 -1
  130. package/dist/slot.esm.js +1 -1
  131. package/dist/sortable.cjs.js +6 -6
  132. package/dist/sortable.esm.js +6 -6
  133. package/dist/split-button.cjs.js +2 -2
  134. package/dist/split-button.esm.js +2 -2
  135. package/dist/tabs.cjs.js +11 -6
  136. package/dist/tabs.esm.js +28 -23
  137. package/dist/tags-input.cjs.js +2 -2
  138. package/dist/tags-input.esm.js +2 -2
  139. package/dist/textarea.cjs.js +2 -2
  140. package/dist/textarea.esm.js +16 -16
  141. package/dist/theme.d.ts.map +1 -1
  142. package/dist/time-field.cjs.js +2 -2
  143. package/dist/time-field.esm.js +24 -24
  144. package/dist/time-picker.cjs.js +2 -2
  145. package/dist/time-picker.esm.js +3 -3
  146. package/dist/toast.cjs.js +2 -2
  147. package/dist/toast.esm.js +2 -2
  148. package/dist/transfer-list.cjs.js +9 -9
  149. package/dist/transfer-list.esm.js +4 -4
  150. package/dist/wizard.cjs.js +16 -7
  151. package/dist/wizard.esm.js +16 -7
  152. package/package.json +1 -1
  153. package/dist/runtime-DxCl0A5q.js +0 -5
@@ -112,7 +112,7 @@ const k = "720ms", T = "55ms", A = "0ms", x = 1400, M = /* @__PURE__ */ new Set(
112
112
 
113
113
  :host([variant="soft"]) {
114
114
  --ui-animated-text-color:
115
- color-mix(in srgb, var(--ui-animated-text-accent) 72%, var(--ui-color-text, var(--ui-text, #0f172a)));
115
+ color-mix(in srgb, var(--ui-animated-text-accent) 62%, var(--ui-color-text, var(--ui-text, #0f172a)));
116
116
  --ui-animated-text-bg:
117
117
  color-mix(in srgb, var(--ui-animated-text-accent) 8%, var(--ui-color-surface, #ffffff));
118
118
  --ui-animated-text-border:
@@ -122,7 +122,7 @@ const k = "720ms", T = "55ms", A = "0ms", x = 1400, M = /* @__PURE__ */ new Set(
122
122
  }
123
123
 
124
124
  :host([variant="solid"]) {
125
- --ui-animated-text-color: color-mix(in srgb, var(--ui-animated-text-accent) 88%, #061221);
125
+ --ui-animated-text-color: color-mix(in srgb, var(--ui-animated-text-accent) 45%, var(--ui-color-text-strong, #0f172a));
126
126
  --ui-animated-text-bg:
127
127
  linear-gradient(
128
128
  180deg,
@@ -165,7 +165,7 @@ const k = "720ms", T = "55ms", A = "0ms", x = 1400, M = /* @__PURE__ */ new Set(
165
165
 
166
166
  :host([variant="minimal"]) {
167
167
  --ui-animated-text-color:
168
- color-mix(in srgb, var(--ui-animated-text-accent) 84%, var(--ui-color-text, var(--ui-text, #0f172a)));
168
+ color-mix(in srgb, var(--ui-animated-text-accent) 45%, var(--ui-color-text-strong, var(--ui-color-text, var(--ui-text, #0f172a))));
169
169
  --ui-animated-text-bg: transparent;
170
170
  --ui-animated-text-border: none;
171
171
  --ui-animated-text-shadow: none;
@@ -412,8 +412,8 @@ const k = "720ms", T = "55ms", A = "0ms", x = 1400, M = /* @__PURE__ */ new Set(
412
412
  background:
413
413
  linear-gradient(
414
414
  135deg,
415
- color-mix(in srgb, var(--ui-animated-text-accent) 96%, #ffffff 4%),
416
- color-mix(in srgb, var(--ui-animated-text-accent) 58%, #0f172a 42%)
415
+ color-mix(in srgb, var(--ui-animated-text-accent) 62%, var(--ui-color-text-strong, #0f172a)),
416
+ color-mix(in srgb, var(--ui-animated-text-accent) 40%, var(--ui-color-text-strong, #0f172a))
417
417
  );
418
418
  -webkit-background-clip: text;
419
419
  background-clip: text;
@@ -12,6 +12,7 @@
12
12
  --ui-app-header-color: var(--ui-color-text, var(--ui-text, #202020));
13
13
  --ui-app-header-muted: color-mix(in srgb, var(--ui-app-header-color) 56%, var(--ui-color-muted, var(--ui-muted, #646464)) 44%);
14
14
  --ui-app-header-accent: var(--ui-color-primary, var(--ui-primary, #2563eb));
15
+ --ui-app-header-on-accent: var(--ui-color-foreground-on-primary, #ffffff);
15
16
  --ui-app-header-border-color: var(--ui-color-line-subtle, color-mix(in srgb, var(--ui-color-border, var(--ui-border, rgba(15, 23, 42, 0.14))) 84%, transparent));
16
17
  --ui-app-header-border: var(--base-app-header-border, 1px solid var(--ui-app-header-border-color));
17
18
  --ui-app-header-control-bg: color-mix(in srgb, var(--ui-app-header-bg-base) 90%, transparent);
@@ -76,12 +77,12 @@
76
77
 
77
78
  :host([variant='solid']) {
78
79
  --ui-app-header-bg: var(--ui-app-header-accent);
79
- --ui-app-header-color: #ffffff;
80
- --ui-app-header-muted: color-mix(in srgb, #ffffff 94%, transparent);
80
+ --ui-app-header-color: var(--ui-app-header-on-accent, #ffffff);
81
+ --ui-app-header-muted: color-mix(in srgb, var(--ui-app-header-on-accent, #ffffff) 98%, transparent);
81
82
  --ui-app-header-border: 1px solid color-mix(in srgb, #000000 16%, transparent);
82
- --ui-app-header-control-bg: color-mix(in srgb, #ffffff 14%, transparent);
83
- --ui-app-header-control-bg-hover: color-mix(in srgb, #ffffff 24%, transparent);
84
- --ui-app-header-control-color: #ffffff;
83
+ --ui-app-header-control-bg: color-mix(in srgb, var(--ui-app-header-on-accent, #ffffff) 14%, transparent);
84
+ --ui-app-header-control-bg-hover: color-mix(in srgb, var(--ui-app-header-on-accent, #ffffff) 24%, transparent);
85
+ --ui-app-header-control-color: var(--ui-app-header-on-accent, #ffffff);
85
86
  --ui-app-header-focus-ring: color-mix(in srgb, #ffffff 72%, var(--ui-app-header-accent) 28%);
86
87
  }
87
88
 
@@ -99,18 +100,22 @@
99
100
 
100
101
  :host([tone='info']) {
101
102
  --ui-app-header-accent: var(--ui-color-primary, var(--ui-primary, #2563eb));
103
+ --ui-app-header-on-accent: var(--ui-color-foreground-on-primary, #ffffff);
102
104
  }
103
105
 
104
106
  :host([tone='success']) {
105
- --ui-app-header-accent: var(--ui-color-success, #15803d);
107
+ --ui-app-header-accent: var(--ui-color-success-solid, var(--ui-color-success, #15803d));
108
+ --ui-app-header-on-accent: var(--ui-color-foreground-on-success, #ffffff);
106
109
  }
107
110
 
108
111
  :host([tone='warning']) {
109
112
  --ui-app-header-accent: var(--ui-color-warning, #b45309);
113
+ --ui-app-header-on-accent: var(--ui-color-foreground-on-warning, #ffffff);
110
114
  }
111
115
 
112
116
  :host([tone='danger']) {
113
- --ui-app-header-accent: var(--ui-color-danger, #dc2626);
117
+ --ui-app-header-accent: var(--ui-color-danger-solid, var(--ui-color-danger, #dc2626));
118
+ --ui-app-header-on-accent: var(--ui-color-foreground-on-danger, #ffffff);
114
119
  }
115
120
 
116
121
  :host([sticky]) {
@@ -13,6 +13,7 @@ const t = `
13
13
  --ui-app-header-color: var(--ui-color-text, var(--ui-text, #202020));
14
14
  --ui-app-header-muted: color-mix(in srgb, var(--ui-app-header-color) 56%, var(--ui-color-muted, var(--ui-muted, #646464)) 44%);
15
15
  --ui-app-header-accent: var(--ui-color-primary, var(--ui-primary, #2563eb));
16
+ --ui-app-header-on-accent: var(--ui-color-foreground-on-primary, #ffffff);
16
17
  --ui-app-header-border-color: var(--ui-color-line-subtle, color-mix(in srgb, var(--ui-color-border, var(--ui-border, rgba(15, 23, 42, 0.14))) 84%, transparent));
17
18
  --ui-app-header-border: var(--base-app-header-border, 1px solid var(--ui-app-header-border-color));
18
19
  --ui-app-header-control-bg: color-mix(in srgb, var(--ui-app-header-bg-base) 90%, transparent);
@@ -77,12 +78,12 @@ const t = `
77
78
 
78
79
  :host([variant='solid']) {
79
80
  --ui-app-header-bg: var(--ui-app-header-accent);
80
- --ui-app-header-color: #ffffff;
81
- --ui-app-header-muted: color-mix(in srgb, #ffffff 94%, transparent);
81
+ --ui-app-header-color: var(--ui-app-header-on-accent, #ffffff);
82
+ --ui-app-header-muted: color-mix(in srgb, var(--ui-app-header-on-accent, #ffffff) 98%, transparent);
82
83
  --ui-app-header-border: 1px solid color-mix(in srgb, #000000 16%, transparent);
83
- --ui-app-header-control-bg: color-mix(in srgb, #ffffff 14%, transparent);
84
- --ui-app-header-control-bg-hover: color-mix(in srgb, #ffffff 24%, transparent);
85
- --ui-app-header-control-color: #ffffff;
84
+ --ui-app-header-control-bg: color-mix(in srgb, var(--ui-app-header-on-accent, #ffffff) 14%, transparent);
85
+ --ui-app-header-control-bg-hover: color-mix(in srgb, var(--ui-app-header-on-accent, #ffffff) 24%, transparent);
86
+ --ui-app-header-control-color: var(--ui-app-header-on-accent, #ffffff);
86
87
  --ui-app-header-focus-ring: color-mix(in srgb, #ffffff 72%, var(--ui-app-header-accent) 28%);
87
88
  }
88
89
 
@@ -100,18 +101,22 @@ const t = `
100
101
 
101
102
  :host([tone='info']) {
102
103
  --ui-app-header-accent: var(--ui-color-primary, var(--ui-primary, #2563eb));
104
+ --ui-app-header-on-accent: var(--ui-color-foreground-on-primary, #ffffff);
103
105
  }
104
106
 
105
107
  :host([tone='success']) {
106
- --ui-app-header-accent: var(--ui-color-success, #15803d);
108
+ --ui-app-header-accent: var(--ui-color-success-solid, var(--ui-color-success, #15803d));
109
+ --ui-app-header-on-accent: var(--ui-color-foreground-on-success, #ffffff);
107
110
  }
108
111
 
109
112
  :host([tone='warning']) {
110
113
  --ui-app-header-accent: var(--ui-color-warning, #b45309);
114
+ --ui-app-header-on-accent: var(--ui-color-foreground-on-warning, #ffffff);
111
115
  }
112
116
 
113
117
  :host([tone='danger']) {
114
- --ui-app-header-accent: var(--ui-color-danger, #dc2626);
118
+ --ui-app-header-accent: var(--ui-color-danger-solid, var(--ui-color-danger, #dc2626));
119
+ --ui-app-header-on-accent: var(--ui-color-foreground-on-danger, #ffffff);
115
120
  }
116
121
 
117
122
  :host([sticky]) {
@@ -16,7 +16,7 @@
16
16
  --ui-avatar-transition: 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
17
17
  --ui-avatar-accent: var(--ui-color-primary, #2563eb);
18
18
  --ui-avatar-badge-bg: color-mix(in srgb, var(--ui-avatar-accent) 14%, var(--ui-color-surface, #ffffff));
19
- --ui-avatar-badge-color: color-mix(in srgb, var(--ui-avatar-accent) 82%, var(--ui-color-text, #0f172a) 18%);
19
+ --ui-avatar-badge-color: color-mix(in srgb, var(--ui-avatar-accent) 45%, var(--ui-color-text-strong, #0f172a));
20
20
  --ui-avatar-badge-radius: var(--base-avatar-badge-radius, 999px);
21
21
  color-scheme: light dark;
22
22
  }
@@ -58,7 +58,7 @@
58
58
 
59
59
  :host([variant="surface"]) {
60
60
  --ui-avatar-bg: var(--ui-avatar-bg-base);
61
- --ui-avatar-color: color-mix(in srgb, var(--ui-avatar-accent) 78%, var(--ui-color-text, #0f172a) 22%);
61
+ --ui-avatar-color: color-mix(in srgb, var(--ui-avatar-accent) 45%, var(--ui-color-text-strong, #0f172a));
62
62
  }
63
63
 
64
64
  :host([variant="soft"]) {
@@ -77,7 +77,7 @@
77
77
  :host([variant="outline"]) {
78
78
  --ui-avatar-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 88%, transparent);
79
79
  --ui-avatar-border: 1px solid color-mix(in srgb, var(--ui-avatar-accent) 45%, var(--ui-color-border, rgba(15, 23, 42, 0.14)));
80
- --ui-avatar-color: color-mix(in srgb, var(--ui-avatar-accent) 82%, var(--ui-color-text, #0f172a) 18%);
80
+ --ui-avatar-color: color-mix(in srgb, var(--ui-avatar-accent) 45%, var(--ui-color-text-strong, #0f172a));
81
81
  --ui-avatar-ring: none;
82
82
  }
83
83
 
@@ -17,7 +17,7 @@ const x = `
17
17
  --ui-avatar-transition: 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
18
18
  --ui-avatar-accent: var(--ui-color-primary, #2563eb);
19
19
  --ui-avatar-badge-bg: color-mix(in srgb, var(--ui-avatar-accent) 14%, var(--ui-color-surface, #ffffff));
20
- --ui-avatar-badge-color: color-mix(in srgb, var(--ui-avatar-accent) 82%, var(--ui-color-text, #0f172a) 18%);
20
+ --ui-avatar-badge-color: color-mix(in srgb, var(--ui-avatar-accent) 45%, var(--ui-color-text-strong, #0f172a));
21
21
  --ui-avatar-badge-radius: var(--base-avatar-badge-radius, 999px);
22
22
  color-scheme: light dark;
23
23
  }
@@ -59,7 +59,7 @@ const x = `
59
59
 
60
60
  :host([variant="surface"]) {
61
61
  --ui-avatar-bg: var(--ui-avatar-bg-base);
62
- --ui-avatar-color: color-mix(in srgb, var(--ui-avatar-accent) 78%, var(--ui-color-text, #0f172a) 22%);
62
+ --ui-avatar-color: color-mix(in srgb, var(--ui-avatar-accent) 45%, var(--ui-color-text-strong, #0f172a));
63
63
  }
64
64
 
65
65
  :host([variant="soft"]) {
@@ -78,7 +78,7 @@ const x = `
78
78
  :host([variant="outline"]) {
79
79
  --ui-avatar-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 88%, transparent);
80
80
  --ui-avatar-border: 1px solid color-mix(in srgb, var(--ui-avatar-accent) 45%, var(--ui-color-border, rgba(15, 23, 42, 0.14)));
81
- --ui-avatar-color: color-mix(in srgb, var(--ui-avatar-accent) 82%, var(--ui-color-text, #0f172a) 18%);
81
+ --ui-avatar-color: color-mix(in srgb, var(--ui-avatar-accent) 45%, var(--ui-color-text-strong, #0f172a));
82
82
  --ui-avatar-ring: none;
83
83
  }
84
84
 
@@ -1,4 +1,4 @@
1
- "use strict";const Oe=require("./ElementBase-DxbvhLJs.js"),Pe={calendarLabel:"Calendar",today:"Today",clear:"Clear",apply:"Apply",cancel:"Cancel",now:"Now",previousMonth:"Previous month",nextMonth:"Next month",chooseMonthYear:"Choose month and year",previousYear:"Previous year",nextYear:"Next year",syncingSchedule:"Syncing schedule...",unableToSyncEvents:"Unable to sync events",scheduleSynced:"Schedule synced",event:"Event",selectDate:"Select date",selectDateRange:"Select date range",startDate:"Start date",endDate:"End date",startEnd:"Start — End",toggleCalendar:"Toggle calendar",clearDate:"Clear date",clearDateRange:"Clear date range",invalidDate:"Invalid date",dateOutOfRange:"Date is outside the allowed range",invalidRange:"Invalid range",invalidTime:"Invalid time",invalidDateTime:"Invalid date-time",invalidRangeOrder:"Invalid range order",rangeIncomplete:"Range is incomplete",last7Days:"Last 7 days",thisMonth:"This month",hour:"Hour",minute:"Minute",second:"Second",meridiem:"Meridiem",am:"AM",pm:"PM",startTime:"Start time",endTime:"End time",datePickerPanel:"Date picker panel",timePlaceholder:"HH:mm",timePlaceholderSeconds:"HH:mm:ss",dateTimePlaceholder:"YYYY-MM-DD HH:mm",dateRangeTimePlaceholder:"Start — End"},Le={calendarLabel:"日历",today:"今天",clear:"清除",apply:"应用",cancel:"取消",now:"现在",previousMonth:"上个月",nextMonth:"下个月",chooseMonthYear:"选择月份和年份",previousYear:"上一年",nextYear:"下一年",syncingSchedule:"正在同步日程...",unableToSyncEvents:"无法同步事件",scheduleSynced:"日程已同步",event:"事件",selectDate:"选择日期",selectDateRange:"选择日期范围",startDate:"开始日期",endDate:"结束日期",startEnd:"开始 — 结束",toggleCalendar:"切换日历",clearDate:"清除日期",clearDateRange:"清除日期范围",invalidDate:"日期无效",dateOutOfRange:"日期超出允许范围",invalidRange:"范围无效",invalidTime:"时间无效",invalidDateTime:"日期时间无效",invalidRangeOrder:"范围顺序无效",rangeIncomplete:"范围不完整",last7Days:"最近7天",thisMonth:"本月",hour:"小时",minute:"分钟",second:"秒",meridiem:"上午/下午",am:"上午",pm:"下午",startTime:"开始时间",endTime:"结束时间",datePickerPanel:"日期选择面板",timePlaceholder:"HH:mm",timePlaceholderSeconds:"HH:mm:ss",dateTimePlaceholder:"YYYY-MM-DD HH:mm",dateRangeTimePlaceholder:"开始 — 结束"},Be={calendarLabel:"Calendrier",today:"Aujourd'hui",clear:"Effacer",apply:"Appliquer",cancel:"Annuler",now:"Maintenant",previousMonth:"Mois precedent",nextMonth:"Mois suivant",chooseMonthYear:"Choisir le mois et l annee",previousYear:"Annee precedente",nextYear:"Annee suivante",syncingSchedule:"Synchronisation du planning...",unableToSyncEvents:"Impossible de synchroniser les evenements",scheduleSynced:"Planning synchronise",event:"Evenement",selectDate:"Selectionner une date",selectDateRange:"Selectionner une periode",startDate:"Date de debut",endDate:"Date de fin",startEnd:"Debut — Fin",toggleCalendar:"Afficher le calendrier",clearDate:"Effacer la date",clearDateRange:"Effacer la periode",invalidDate:"Date invalide",dateOutOfRange:"La date est hors de la plage autorisee",invalidRange:"Periode invalide",invalidTime:"Heure invalide",invalidDateTime:"Date/heure invalide",invalidRangeOrder:"Ordre de periode invalide",rangeIncomplete:"Periode incomplete",last7Days:"7 derniers jours",thisMonth:"Ce mois-ci",hour:"Heure",minute:"Minute",second:"Seconde",meridiem:"AM/PM",am:"AM",pm:"PM",startTime:"Heure de debut",endTime:"Heure de fin",datePickerPanel:"Panneau de selection de date",timePlaceholder:"HH:mm",timePlaceholderSeconds:"HH:mm:ss",dateTimePlaceholder:"YYYY-MM-DD HH:mm",dateRangeTimePlaceholder:"Debut — Fin"},Fe={en:Pe,zh:Le,fr:Be},oe=new Map;function Ue(r){return r.trim().toLowerCase().replace(/_/g,"-")}function He(r){const e=r||(typeof navigator<"u"&&navigator.language?navigator.language:"en"),t=Ue(e||"");return t==="zh"||t.startsWith("zh-")||t==="cn"||t==="chinese"||t==="zh-cn"||t==="zh-hans"||t==="zh-hant"?"zh":t==="fr"||t.startsWith("fr-")||t==="french"?"fr":"en"}function de(r){if(!r||typeof r!="object"||Array.isArray(r))return{};const e={};return Object.entries(r).forEach(([t,n])=>{typeof n=="string"&&(e[t]=n)}),e}function Ne(r,e){if(!r)return{};try{const t=JSON.parse(r);if(!t||typeof t!="object"||Array.isArray(t))return{};const n=de(t),a=de(t[e]);return{...n,...a}}catch{return{}}}function fe(r,e){const t=He(r),n=`${t}::${e||""}`,a=oe.get(n);if(a)return a;const i=Fe[t],s=Ne(e,t),d={...i,...s};return oe.set(n,d),d}const Ye=`
1
+ "use strict";const Oe=require("./ElementBase-DxbvhLJs.js"),Pe={calendarLabel:"Calendar",today:"Today",clear:"Clear",apply:"Apply",cancel:"Cancel",now:"Now",previousMonth:"Previous month",nextMonth:"Next month",chooseMonthYear:"Choose month and year",previousYear:"Previous year",nextYear:"Next year",syncingSchedule:"Syncing schedule...",unableToSyncEvents:"Unable to sync events",scheduleSynced:"Schedule synced",event:"Event",selectDate:"Select date",selectDateRange:"Select date range",startDate:"Start date",endDate:"End date",startEnd:"Start — End",toggleCalendar:"Toggle calendar",clearDate:"Clear date",clearDateRange:"Clear date range",invalidDate:"Invalid date",dateOutOfRange:"Date is outside the allowed range",invalidRange:"Invalid range",invalidTime:"Invalid time",invalidDateTime:"Invalid date-time",invalidRangeOrder:"Invalid range order",rangeIncomplete:"Range is incomplete",last7Days:"Last 7 days",thisMonth:"This month",hour:"Hour",minute:"Minute",second:"Second",meridiem:"Meridiem",am:"AM",pm:"PM",startTime:"Start time",endTime:"End time",datePickerPanel:"Date picker panel",timePlaceholder:"HH:mm",timePlaceholderSeconds:"HH:mm:ss",dateTimePlaceholder:"YYYY-MM-DD HH:mm",dateRangeTimePlaceholder:"Start — End"},Le={calendarLabel:"日历",today:"今天",clear:"清除",apply:"应用",cancel:"取消",now:"现在",previousMonth:"上个月",nextMonth:"下个月",chooseMonthYear:"选择月份和年份",previousYear:"上一年",nextYear:"下一年",syncingSchedule:"正在同步日程...",unableToSyncEvents:"无法同步事件",scheduleSynced:"日程已同步",event:"事件",selectDate:"选择日期",selectDateRange:"选择日期范围",startDate:"开始日期",endDate:"结束日期",startEnd:"开始 — 结束",toggleCalendar:"切换日历",clearDate:"清除日期",clearDateRange:"清除日期范围",invalidDate:"日期无效",dateOutOfRange:"日期超出允许范围",invalidRange:"范围无效",invalidTime:"时间无效",invalidDateTime:"日期时间无效",invalidRangeOrder:"范围顺序无效",rangeIncomplete:"范围不完整",last7Days:"最近7天",thisMonth:"本月",hour:"小时",minute:"分钟",second:"秒",meridiem:"上午/下午",am:"上午",pm:"下午",startTime:"开始时间",endTime:"结束时间",datePickerPanel:"日期选择面板",timePlaceholder:"HH:mm",timePlaceholderSeconds:"HH:mm:ss",dateTimePlaceholder:"YYYY-MM-DD HH:mm",dateRangeTimePlaceholder:"开始 — 结束"},Be={calendarLabel:"Calendrier",today:"Aujourd'hui",clear:"Effacer",apply:"Appliquer",cancel:"Annuler",now:"Maintenant",previousMonth:"Mois precedent",nextMonth:"Mois suivant",chooseMonthYear:"Choisir le mois et l annee",previousYear:"Annee precedente",nextYear:"Annee suivante",syncingSchedule:"Synchronisation du planning...",unableToSyncEvents:"Impossible de synchroniser les evenements",scheduleSynced:"Planning synchronise",event:"Evenement",selectDate:"Selectionner une date",selectDateRange:"Selectionner une periode",startDate:"Date de debut",endDate:"Date de fin",startEnd:"Debut — Fin",toggleCalendar:"Afficher le calendrier",clearDate:"Effacer la date",clearDateRange:"Effacer la periode",invalidDate:"Date invalide",dateOutOfRange:"La date est hors de la plage autorisee",invalidRange:"Periode invalide",invalidTime:"Heure invalide",invalidDateTime:"Date/heure invalide",invalidRangeOrder:"Ordre de periode invalide",rangeIncomplete:"Periode incomplete",last7Days:"7 derniers jours",thisMonth:"Ce mois-ci",hour:"Heure",minute:"Minute",second:"Seconde",meridiem:"AM/PM",am:"AM",pm:"PM",startTime:"Heure de debut",endTime:"Heure de fin",datePickerPanel:"Panneau de selection de date",timePlaceholder:"HH:mm",timePlaceholderSeconds:"HH:mm:ss",dateTimePlaceholder:"YYYY-MM-DD HH:mm",dateRangeTimePlaceholder:"Debut — Fin"},Fe={en:Pe,zh:Le,fr:Be},oe=new Map;function Ue(r){return r.trim().toLowerCase().replace(/_/g,"-")}function He(r){const e=r||(typeof navigator<"u"&&navigator.language?navigator.language:"en"),t=Ue(e||"");return t==="zh"||t.startsWith("zh-")||t==="cn"||t==="chinese"||t==="zh-cn"||t==="zh-hans"||t==="zh-hant"?"zh":t==="fr"||t.startsWith("fr-")||t==="french"?"fr":"en"}function le(r){if(!r||typeof r!="object"||Array.isArray(r))return{};const e={};return Object.entries(r).forEach(([t,n])=>{typeof n=="string"&&(e[t]=n)}),e}function Ne(r,e){if(!r)return{};try{const t=JSON.parse(r);if(!t||typeof t!="object"||Array.isArray(t))return{};const n=le(t),a=le(t[e]);return{...n,...a}}catch{return{}}}function fe(r,e){const t=He(r),n=`${t}::${e||""}`,a=oe.get(n);if(a)return a;const i=Fe[t],s=Ne(e,t),l={...i,...s};return oe.set(n,l),l}const Ye=`
2
2
  :host {
3
3
  --ui-calendar-bg: var(--color-panel-solid, var(--ui-color-surface, #ffffff));
4
4
  --ui-calendar-border: var(--ui-color-line-subtle, color-mix(in srgb, var(--ui-color-border, #cbd5e1) 74%, transparent));
@@ -302,6 +302,7 @@
302
302
  .picker-month[data-active="true"] {
303
303
  border-color: var(--ui-calendar-selected-border);
304
304
  background: var(--ui-calendar-selected-bg);
305
+ color: var(--ui-calendar-selected-color);
305
306
  }
306
307
 
307
308
  .grid-wrap {
@@ -686,7 +687,7 @@
686
687
  from { background-position: 120% 0; }
687
688
  to { background-position: -120% 0; }
688
689
  }
689
- `,K={default:"var(--ui-color-primary, #2563eb)",info:"var(--ui-color-info, #0e7490)",success:"var(--ui-color-success, #15803d)",warning:"var(--ui-color-warning, #b45309)",danger:"var(--ui-color-danger, #dc2626)"};function O(r,e,t){return Math.max(e,Math.min(t,r))}function L(r){return String(r).padStart(2,"0")}function b(r){return`${r.y}-${L(r.m)}-${L(r.d)}`}function c(r){const e=/^(\d{4})-(\d{2})-(\d{2})$/.exec((r||"").trim());if(!e)return null;const t=Number(e[1]),n=Number(e[2]),a=Number(e[3]);if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(a)||n<1||n>12)return null;const i=F(t,n);return a<1||a>i?null:{y:t,m:n,d:a}}function F(r,e){return new Date(Date.UTC(r,e,0)).getUTCDate()}function B(r){return new Date(Date.UTC(r.y,r.m-1,r.d))}function ve(r){return{y:r.getUTCFullYear(),m:r.getUTCMonth()+1,d:r.getUTCDate()}}function k(r,e){const t=c(r),n=c(e);return!t||!n?r.localeCompare(e):t.y!==n.y?t.y-n.y:t.m!==n.m?t.m-n.m:t.d-n.d}function ge(r,e){const t=c(r);if(!t)return r;const n=B(t);return n.setUTCDate(n.getUTCDate()+e),b(ve(n))}function P(r,e){const t=new Date(Date.UTC(r.y,r.m-1,1));t.setUTCMonth(t.getUTCMonth()+e);const n=t.getUTCFullYear(),a=t.getUTCMonth()+1,i=O(r.d,1,F(n,a));return{y:n,m:a,d:i}}function be(r,e){const t=c(r);return t?b(P(t,e)):r}function J(r,e){return{y:r,m:e,d:1}}function me(r,e){return{y:r,m:e,d:F(r,e)}}function le(r){const e=c(r);return e?B(e).getUTCDay():0}function Z(r,e){if(r==null||r==="")return e;const t=Number(r);return Number.isFinite(t)?Math.trunc(t):e}function ce(r,e){const t=Z(r,e);return t<1?e:t}function je(r,e){if(r==null)return e;const t=String(r).toLowerCase();return t!=="false"&&t!=="0"&&t!=="off"}function m(r){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function W(r,e,t){return k(r,e)>=0&&k(r,t)<=0}function $(r,e){return k(r,e)<=0?{start:r,end:e}:{start:e,end:r}}function ue(r,e){const t=Number(r);if(t===0||t===1||t===6)return t;try{const a=new Intl.Locale(e||void 0)?.weekInfo?.firstDay;if(a===7)return 0;if(a===1||a===6)return a}catch{}return 0}function Ve(r){return r==="range"||r==="multiple"?r:"single"}function qe(r){return r==="none"||r==="select"?r:"navigate"}function Ke(r){return r==="badges"||r==="count"?r:"dots"}function We(r){return r==="sm"||r==="lg"?r:"md"}function Je(r){return r==="neutral"||r==="info"||r==="success"||r==="warning"||r==="danger"?r:null}function he(r){return r==="loading"||r==="error"||r==="success"?r:"idle"}function pe(r){const e=[],t=new Set;return r.forEach(n=>{const a=c(n);if(!a)return;const i=b(a);t.has(i)||(t.add(i),e.push(i))}),e.sort(k),e}function E(r){return r.mode==="single"?{mode:"single",value:r.value}:r.mode==="range"?{mode:"range",start:r.start,end:r.end}:{mode:"multiple",values:[...r.values]}}class ye extends Oe.ElementBase{constructor(){super(),this._eventsRawCache=null,this._eventsParsedCache=[],this._eventsByDateCache=new Map,this._valueRawCache=null,this._valueModeCache=null,this._valueParsedCache={mode:"single",value:null},this._focusedIso="",this._hoverIso=null,this._pickerOpen=!1,this._syncingValueAttribute=!1,this._rangeKeyboardAnchor=null,this._shouldRefocus=!1,this._docPointerDownBound=e=>this._onDocumentPointerDown(e),this._onClick=this._onClick.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onPointerOver=this._onPointerOver.bind(this),this._onMouseLeave=this._onMouseLeave.bind(this),this._onFocusIn=this._onFocusIn.bind(this)}static get observedAttributes(){return["year","month","events","value","variant","headless","selection","min","max","disabled","readonly","week-start","locale","translations","outside-click","events-max","events-display","max-selections","size","hide-today","show-today","tone","state","bare","aria-label"]}connectedCallback(){super.connectedCallback(),this.root.addEventListener("click",this._onClick),this.root.addEventListener("keydown",this._onKeyDown),this.root.addEventListener("pointerover",this._onPointerOver),this.root.addEventListener("mouseleave",this._onMouseLeave),this.root.addEventListener("focusin",this._onFocusIn),this._syncDocumentListener()}disconnectedCallback(){this.root.removeEventListener("click",this._onClick),this.root.removeEventListener("keydown",this._onKeyDown),this.root.removeEventListener("pointerover",this._onPointerOver),this.root.removeEventListener("mouseleave",this._onMouseLeave),this.root.removeEventListener("focusin",this._onFocusIn),typeof document<"u"&&document.removeEventListener("pointerdown",this._docPointerDownBound,!0),super.disconnectedCallback()}attributeChangedCallback(e,t,n){t!==n&&(e==="events"&&(this._eventsRawCache=null),e==="value"&&!this._syncingValueAttribute&&(this._rangeKeyboardAnchor=null,this._valueRawCache=null),e==="selection"&&(this._rangeKeyboardAnchor=null,this._valueModeCache=null),e==="disabled"&&this.hasAttribute("disabled")&&(this._pickerOpen=!1,this._hoverIso=null),e==="state"&&he(n)==="loading"&&(this._pickerOpen=!1,this._hoverIso=null),this.isConnected&&(this._syncDocumentListener(),this.requestRender()))}focusDate(e){const t=c(e);t&&(this.goToMonth(t.y,t.m),this._focusedIso=b(t),this._shouldRefocus=!0,this.requestRender())}goToMonth(e,t,n="api"){if(!Number.isFinite(e)||!Number.isFinite(t))return;let a=Math.trunc(e),i=Math.trunc(t);for(;i<1;)i+=12,a-=1;for(;i>12;)i-=12,a+=1;let s=!1;if(String(a)!==(this.getAttribute("year")||"")&&(this.setAttribute("year",String(a)),s=!0),String(i)!==(this.getAttribute("month")||"")&&(this.setAttribute("month",String(i)),s=!0),s){const d={year:a,month:i,source:n};this.dispatchEvent(new CustomEvent("month-change",{detail:d,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("ui-month-change",{detail:d,bubbles:!0,composed:!0}))}}selectDate(e){const t=c(e);if(!t)return;const n=b(t);this._shouldRefocus=!0,this._applySelection(n,!1,"api")}_syncDocumentListener(){typeof document>"u"||(document.removeEventListener("pointerdown",this._docPointerDownBound,!0),this._pickerOpen&&document.addEventListener("pointerdown",this._docPointerDownBound,!0))}_onDocumentPointerDown(e){!this._pickerOpen||e.composedPath().includes(this)||(this._pickerOpen=!1,this.requestRender())}_resolveLocale(){const t=(this.getAttribute("locale")||"").trim()||(typeof navigator<"u"?navigator.language:"en-US");try{return new Intl.DateTimeFormat(t),t}catch{return"en-US"}}_resolvedView(){const e=new Date,t=Z(this.getAttribute("year"),e.getFullYear()),n=Z(this.getAttribute("month"),e.getMonth()+1);return{year:t,month:O(n,1,12)}}_todayIso(){const e=new Date;return`${e.getFullYear()}-${L(e.getMonth()+1)}-${L(e.getDate())}`}_resolveMinIso(){const e=c(this.getAttribute("min")||"");return e?b(e):null}_resolveMaxIso(){const e=c(this.getAttribute("max")||"");return e?b(e):null}_monthHasAllowedDay(e,t,n,a){const i=b(J(e,t)),s=b(me(e,t));return!(n&&k(s,n)<0||a&&k(i,a)>0)}_resolveSelectionMode(){return Ve(this.getAttribute("selection"))}_resolveEventsDisplay(){return Ke(this.getAttribute("events-display"))}_resolveOutsideClickMode(){return qe(this.getAttribute("outside-click"))}_resolveCalendarSize(){return We(this.getAttribute("size"))}_resolveTone(){return Je(this.getAttribute("tone"))}_resolveState(){return he(this.getAttribute("state"))}_resolveLabel(){const e=(this.getAttribute("aria-label")||"").trim();return e||this._translations().calendarLabel}_translations(){return fe(this.getAttribute("locale"),this.getAttribute("translations"))}_resolveBounds(){let e=this._resolveMinIso(),t=this._resolveMaxIso();if(e&&t&&k(e,t)>0){const n=e;e=t,t=n}return{minIso:e,maxIso:t}}_direction(){const e=this.getAttribute("dir");if(e==="rtl"||e==="ltr")return e;const n=this.closest("[dir]")?.getAttribute("dir");return n==="rtl"||n==="ltr"?n:getComputedStyle(this).direction==="rtl"?"rtl":"ltr"}_maxSelections(){return ce(this.getAttribute("max-selections"),Number.MAX_SAFE_INTEGER)}_eventsMax(){return O(ce(this.getAttribute("events-max"),3),1,9)}_showTodayButton(){return this.hasAttribute("hide-today")?!1:je(this.getAttribute("show-today"),!0)}_isDisabled(){return this.hasAttribute("disabled")}_isReadonly(){return this.hasAttribute("readonly")}_isInteractionDisabled(){return this._isDisabled()||this._resolveState()==="loading"}_isDateOutOfBounds(e,t,n){return!!(t&&k(e,t)<0||n&&k(e,n)>0)}_isDateBlocked(e,t,n,a){return!!(this._isInteractionDisabled()||this._isDateOutOfBounds(e,n,a)||t&&this._resolveOutsideClickMode()==="none")}_normalizeValueForMode(e){const t=this.getAttribute("value")||"";if(this._valueRawCache===t&&this._valueModeCache===e)return E(this._valueParsedCache);let n;if(e==="multiple"){try{const i=JSON.parse(t);if(!Array.isArray(i))n={mode:e,values:[]};else{const s=pe(i.map(d=>String(d||"")));n={mode:e,values:s}}}catch{n={mode:e,values:[]}}return this._valueRawCache=t,this._valueModeCache=e,this._valueParsedCache=E(n),n}if(e==="range"){try{const i=JSON.parse(t),s=i&&typeof i=="object"?String(i.start||""):"",d=i&&typeof i=="object"?String(i.end||""):"",o=c(s),p=c(d),u=o?b(o):null,h=p?b(p):null;if(u&&h){const f=$(u,h);n={mode:e,start:f.start,end:f.end}}else n={mode:e,start:u,end:null}}catch{n={mode:e,start:null,end:null}}return this._valueRawCache=t,this._valueModeCache=e,this._valueParsedCache=E(n),n}const a=c(t);return n={mode:e,value:a?b(a):null},this._valueRawCache=t,this._valueModeCache=e,this._valueParsedCache=E(n),n}_serializeSelection(e){if(e.mode==="single")return e.value;if(e.mode==="multiple")return JSON.stringify(e.values);const t={};return e.start&&(t.start=e.start),e.end&&(t.end=e.end),!t.start&&!t.end?null:JSON.stringify(t)}_emitSelectionEvents(e,t,n){e.mode==="single"&&t&&(this.dispatchEvent(new CustomEvent("select",{detail:{value:t,source:n},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("ui-select",{detail:{value:t,source:n},bubbles:!0,composed:!0})));const a={mode:e.mode,source:n};e.mode==="single"?a.value=e.value:e.mode==="range"?(a.value=e.start&&e.end?{start:e.start,end:e.end}:null,a.start=e.start,a.end=e.end):(a.value=[...e.values],a.values=[...e.values]),this.dispatchEvent(new CustomEvent("change",{detail:a,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("ui-change",{detail:a,bubbles:!0,composed:!0}))}_setValueAttribute(e){this._syncingValueAttribute=!0;try{e?this.getAttribute("value")!==e&&this.setAttribute("value",e):this.hasAttribute("value")&&this.removeAttribute("value")}finally{this._syncingValueAttribute=!1}}_applySelection(e,t,n){if(!c(e))return;const a=this._resolveSelectionMode(),{minIso:i,maxIso:s}=this._resolveBounds();if(this._isDateOutOfBounds(e,i,s))return;const d=this._isReadonly();if(this._isInteractionDisabled()||d)return;let o=this._normalizeValueForMode(a);if(a==="single")o={mode:a,value:e};else if(a==="multiple"){const h=this._normalizeValueForMode("multiple"),f=new Set(h.values);f.has(e)?f.delete(e):f.size<this._maxSelections()&&f.add(e),o={mode:a,values:pe(Array.from(f))}}else{const h=this._normalizeValueForMode("range"),f=h.start,_=h.end;if(t){const l=this._rangeKeyboardAnchor||f||this._focusedIso||e;if(!c(l))this._rangeKeyboardAnchor=e,o={mode:a,start:e,end:null};else{const g=$(l,e);o={mode:a,start:g.start,end:g.end}}}else if(!f||f&&_)this._rangeKeyboardAnchor=e,o={mode:a,start:e,end:null};else if(f&&!_){const l=$(f,e);o={mode:a,start:l.start,end:l.end}}}const p=this.getAttribute("value"),u=this._serializeSelection(o);p!==u?(this._setValueAttribute(u),this._emitSelectionEvents(o,a==="single"?e:null,n)):a==="single"&&this._emitSelectionEvents(o,e,n),this._focusedIso=e,this._hoverIso=null,this._shouldRefocus=!0,n!=="api"&&this.requestRender()}_monthLabel(e,t,n){try{return new Intl.DateTimeFormat(n,{month:"long",year:"numeric",timeZone:"UTC"}).format(new Date(Date.UTC(e,t-1,1)))}catch{return`${String(t)} ${e}`}}_monthPickerLabels(e){try{const t=new Intl.DateTimeFormat(e,{month:"short",timeZone:"UTC"});return Array.from({length:12},(n,a)=>t.format(new Date(Date.UTC(2024,a,1))))}catch{return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}}_weekdayLabels(e,t){const n=[],a=new Intl.DateTimeFormat(e,{weekday:"short",timeZone:"UTC"});for(let i=0;i<7;i+=1){const s=(t+i)%7,d=new Date(Date.UTC(2024,0,7+s));n.push(a.format(d))}return n}_dayAriaLabel(e,t){const n=c(e);if(!n)return e;try{return new Intl.DateTimeFormat(t,{weekday:"long",year:"numeric",month:"long",day:"numeric",timeZone:"UTC"}).format(B(n))}catch{return e}}_ensureEventsCache(){const e=this.getAttribute("events");if(e!==this._eventsRawCache&&(this._eventsRawCache=e,this._eventsParsedCache=[],this._eventsByDateCache=new Map,!!e))try{const t=JSON.parse(e);if(!Array.isArray(t))return;const n=[];t.forEach(a=>{if(!a||typeof a!="object")return;const i=String(a.date||"").trim(),s=c(i),d=s?b(s):"";if(!d)return;const o=String(a.tone||"default"),p=o==="success"||o==="warning"||o==="danger"||o==="info"?o:"default",u=a.title!=null?String(a.title):void 0;n.push({date:d,title:u,tone:p})}),this._eventsParsedCache=n,n.forEach(a=>{this._eventsByDateCache.has(a.date)||this._eventsByDateCache.set(a.date,[]),this._eventsByDateCache.get(a.date).push(a)})}catch{}}_buildCells(e,t,n,a,i,s){const d=b(J(e,t)),p=(le(d)-n+7)%7,u=c(d);if(!u)return[];const h=B(u);h.setUTCDate(h.getUTCDate()-p);const f=[];for(let _=0;_<42;_+=1){_>0&&h.setUTCDate(h.getUTCDate()+1);const l=ve(h),g=b(l),D=l.y!==e||l.m!==t,y=this._isDateBlocked(g,D,a,i);f.push({iso:g,parts:l,outside:D,disabled:y,today:g===s})}return f}_resolveFocusIso(e,t,n){const a=new Map;e.forEach(o=>a.set(o.iso,o));const i=o=>{if(!o)return null;const p=a.get(o);return!p||p.disabled?null:o};let s=i(this._focusedIso);if(s||(t.mode==="single"&&(s=i(t.value)),!s&&t.mode==="range"&&(s=i(t.end||t.start)),!s&&t.mode==="multiple"&&(s=i(t.values[0])),s||(s=i(n)),s))return s;const d=e.find(o=>!o.disabled);return d?d.iso:e[0]?.iso||""}_focusDateButton(e){if(!e||this.root.activeElement?.getAttribute("data-date")===e)return;const n=`.day[data-date="${e}"]`,a=this.root.querySelector(n);if(a)try{a.focus({preventScroll:!0})}catch{a.focus()}}_moveFocusByDays(e,t,n){const a=ge(e,t),i=c(a);i&&(this.goToMonth(i.y,i.m,"keyboard"),this._focusedIso=a,this._shouldRefocus=!0,n&&this._resolveSelectionMode()==="range"&&!this._isReadonly()&&!this._isInteractionDisabled()?this._applySelection(a,!0,"keyboard"):this.requestRender())}_moveFocusByMonths(e,t){const n=be(e,t),a=c(n);a&&(this.goToMonth(a.y,a.m,"keyboard"),this._focusedIso=n,this._shouldRefocus=!0,this.requestRender())}_focusWeekBoundary(e,t,n){const i=(le(e)-n+7)%7,s=t==="start"?-i:6-i;this._moveFocusByDays(e,s,!1)}_onPointerOver(e){if(this._resolveSelectionMode()!=="range")return;const t=this._normalizeValueForMode("range");if(!t.start||t.end)return;const a=e.target?.closest(".day");if(!a)return;const i=a.getAttribute("data-date")||"";if(!c(i))return;const s=a.getAttribute("data-outside")==="true",{minIso:d,maxIso:o}=this._resolveBounds();this._isDateBlocked(i,s,d,o)||this._hoverIso!==i&&(this._hoverIso=i,this.requestRender())}_onMouseLeave(){this._hoverIso!=null&&(this._hoverIso=null,this.requestRender())}_onFocusIn(e){const n=e.target?.closest(".day");if(!n)return;const a=n.getAttribute("data-date")||"";if(c(a)&&(this._focusedIso=a,this._resolveSelectionMode()==="range")){const i=this._normalizeValueForMode("range");i.start&&!i.end&&(this._hoverIso=a,this.requestRender())}}_toggleMonthYearPicker(e){this._isInteractionDisabled()||(this._pickerOpen=typeof e=="boolean"?e:!this._pickerOpen,this._syncDocumentListener(),this.requestRender())}_onClick(e){const t=e.target;if(!t)return;const n=t.closest("[data-action]"),a=n?.getAttribute("data-action")||"",{year:i,month:s}=this._resolvedView(),d=this._todayIso(),o=c(d);if(a==="prev-month"||a==="next-month"){if(this._isInteractionDisabled())return;const l=a==="prev-month"?-1:1,D=(this._focusedIso?c(this._focusedIso):null)||{y:i,m:s,d:1},y=P(D,l);this.goToMonth(y.y,y.m,"pointer"),this._focusedIso=b({y:y.y,m:y.m,d:O(D.d,1,F(y.y,y.m))}),this._shouldRefocus=!0,this.requestRender();return}if(a==="today"){if(this._isInteractionDisabled())return;this.goToMonth(o.y,o.m,"pointer"),this._focusedIso=d,this._shouldRefocus=!0,this._isReadonly()?this.requestRender():this._applySelection(d,!1,"pointer");return}if(a==="toggle-monthyear"){this._toggleMonthYearPicker();return}if(a==="picker-prev-year"||a==="picker-next-year"){if(this._isInteractionDisabled())return;const l=a==="picker-prev-year"?-1:1;this.goToMonth(i+l,s,"pointer"),this._pickerOpen=!0,this._shouldRefocus=!0,this.requestRender();return}if(a==="pick-month"){if(this._isInteractionDisabled())return;const l=Number(n?.getAttribute("data-month")||"");if(!Number.isInteger(l)||l<1||l>12)return;this.goToMonth(i,l,"pointer"),this._pickerOpen=!1,this._shouldRefocus=!0,this.requestRender();return}const p=t.closest(".day");if(!p)return;const u=p.getAttribute("data-date")||"";if(!c(u))return;const h=p.getAttribute("data-outside")==="true",{minIso:f,maxIso:_}=this._resolveBounds();if(!this._isDateBlocked(u,h,f,_)){if(h){const l=this._resolveOutsideClickMode();if(l==="none")return;if(l==="navigate"){const g=c(u);this.goToMonth(g.y,g.m,"pointer")}}if(this._isReadonly()){this._focusedIso=u,this._shouldRefocus=!0,this.requestRender();return}this._applySelection(u,!1,"pointer")}}_onKeyDown(e){if(e.key==="Escape"&&this._pickerOpen){e.preventDefault(),this._toggleMonthYearPicker(!1);return}const n=e.target?.closest(".day");if(!n)return;const a=n.getAttribute("data-date")||"";if(!c(a))return;const i=ue(this.getAttribute("week-start"),this._resolveLocale()),s=this._direction()==="rtl",d=e.shiftKey;if(e.key==="ArrowRight"){e.preventDefault(),this._moveFocusByDays(a,s?-1:1,d);return}if(e.key==="ArrowLeft"){e.preventDefault(),this._moveFocusByDays(a,s?1:-1,d);return}if(e.key==="ArrowDown"){e.preventDefault(),this._moveFocusByDays(a,7,d);return}if(e.key==="ArrowUp"){e.preventDefault(),this._moveFocusByDays(a,-7,d);return}if(e.key==="Home"){e.preventDefault(),this._focusWeekBoundary(a,"start",i);return}if(e.key==="End"){e.preventDefault(),this._focusWeekBoundary(a,"end",i);return}if(e.key==="PageUp"){e.preventDefault(),this._moveFocusByMonths(a,e.shiftKey?-12:-1);return}if(e.key==="PageDown"){e.preventDefault(),this._moveFocusByMonths(a,e.shiftKey?12:1);return}if(e.key==="Enter"||e.key===" "){e.preventDefault();const o=n.getAttribute("data-outside")==="true",{minIso:p,maxIso:u}=this._resolveBounds();if(this._isDateBlocked(a,o,p,u))return;if(o&&this._resolveOutsideClickMode()==="navigate"){const h=c(a);this.goToMonth(h.y,h.m,"keyboard")}this._isReadonly()||this._applySelection(a,!1,"keyboard")}}render(){const e=this._resolveLocale(),t=this._translations(),n=ue(this.getAttribute("week-start"),e),{year:a,month:i}=this._resolvedView(),s=this._resolveSelectionMode(),{minIso:d,maxIso:o}=this._resolveBounds(),p=this._todayIso(),u=this._resolveEventsDisplay(),h=this._eventsMax(),f=this._resolveCalendarSize(),_=this._resolveTone(),l=this._resolveState(),g=this._isInteractionDisabled(),D=this._resolveLabel();_?this.setAttribute("tone",_):this.removeAttribute("tone"),l!=="idle"?this.setAttribute("state",l):this.removeAttribute("state"),l==="loading"?this.setAttribute("aria-busy","true"):this.removeAttribute("aria-busy"),this._ensureEventsCache();const y=this._normalizeValueForMode(s),X=this._buildCells(a,i,n,d,o,p);this._focusedIso=this._resolveFocusIso(X,y,p);const U=this._monthLabel(a,i,e),G=P({y:a,m:i,d:1},-1),Q=P({y:a,m:i,d:1},1),_e=this._monthHasAllowedDay(G.y,G.m,d,o),xe=this._monthHasAllowedDay(Q.y,Q.m,d,o),ke=this._weekdayLabels(e,n),ee=s==="range"?y:null,S=ee?.start||null,M=ee?.end||null,we=s==="multiple"?new Set(y.values):null;let H=null,N=null;if(s==="range"&&S&&!M&&this._hoverIso&&c(this._hoverIso)){const x=$(S,this._hoverIso);H=x.start,N=x.end}const te=[];for(let x=0;x<6;x+=1){const C=X.slice(x*7,x*7+7).map(v=>{const w=this._eventsByDateCache.get(v.iso)||[],Ae=this._dayAriaLabel(v.iso,e);let A=!1;s==="single"?A=y.value===v.iso:s==="multiple"?A=we?.has(v.iso)||!1:S&&M&&(A=W(v.iso,S,M));const T=!!(S&&M&&W(v.iso,S,M)),Y=!!(S&&v.iso===S),j=!!(M&&v.iso===M),Te=!!(H&&N&&W(v.iso,H,N)),Re=!v.disabled&&v.iso===this._focusedIso?0:-1;let I="";w.length>0&&(u==="count"?I=`<span class="event-count" part="event-more" style="--event-tone:${K[w[0].tone||"default"]}">${w.length}</span>`:u==="badges"?I=w.slice(0,h).map(z=>{const q=m(z.title||t.event);return`<span class="event-badge" part="event-dot" style="--event-tone:${K[z.tone||"default"]}" title="${q}">${q}</span>`}).join(""):I=w.slice(0,h).map(z=>`<span class="event-dot" part="event-dot" style="--event-tone:${K[z.tone||"default"]}"></span>`).join(""),w.length>h&&u!=="count"&&(I+=`<span class="event-more" part="event-more">+${w.length-h}</span>`));const re=`ui-calendar-tip-${v.iso}`,ie=w.length?w.map(R=>m(R.title||t.event)).join("<br/>"):"",se=ie.length>0,ze=I?`<span class="events" part="events" aria-hidden="true">${I}</span>`:"",$e=se?`<span class="tooltip" part="tooltip" id="${re}">${ie}</span>`:"",V=A||T||Y||j,Ee=T||Y||j?"day range":"day";return`
690
+ `,K={default:"var(--ui-color-primary, #2563eb)",info:"var(--ui-color-info, #0e7490)",success:"var(--ui-color-success, #15803d)",warning:"var(--ui-color-warning, #b45309)",danger:"var(--ui-color-danger, #dc2626)"};function O(r,e,t){return Math.max(e,Math.min(t,r))}function L(r){return String(r).padStart(2,"0")}function b(r){return`${r.y}-${L(r.m)}-${L(r.d)}`}function c(r){const e=/^(\d{4})-(\d{2})-(\d{2})$/.exec((r||"").trim());if(!e)return null;const t=Number(e[1]),n=Number(e[2]),a=Number(e[3]);if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(a)||n<1||n>12)return null;const i=F(t,n);return a<1||a>i?null:{y:t,m:n,d:a}}function F(r,e){return new Date(Date.UTC(r,e,0)).getUTCDate()}function B(r){return new Date(Date.UTC(r.y,r.m-1,r.d))}function ve(r){return{y:r.getUTCFullYear(),m:r.getUTCMonth()+1,d:r.getUTCDate()}}function k(r,e){const t=c(r),n=c(e);return!t||!n?r.localeCompare(e):t.y!==n.y?t.y-n.y:t.m!==n.m?t.m-n.m:t.d-n.d}function ge(r,e){const t=c(r);if(!t)return r;const n=B(t);return n.setUTCDate(n.getUTCDate()+e),b(ve(n))}function P(r,e){const t=new Date(Date.UTC(r.y,r.m-1,1));t.setUTCMonth(t.getUTCMonth()+e);const n=t.getUTCFullYear(),a=t.getUTCMonth()+1,i=O(r.d,1,F(n,a));return{y:n,m:a,d:i}}function be(r,e){const t=c(r);return t?b(P(t,e)):r}function J(r,e){return{y:r,m:e,d:1}}function me(r,e){return{y:r,m:e,d:F(r,e)}}function de(r){const e=c(r);return e?B(e).getUTCDay():0}function Z(r,e){if(r==null||r==="")return e;const t=Number(r);return Number.isFinite(t)?Math.trunc(t):e}function ce(r,e){const t=Z(r,e);return t<1?e:t}function je(r,e){if(r==null)return e;const t=String(r).toLowerCase();return t!=="false"&&t!=="0"&&t!=="off"}function m(r){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function W(r,e,t){return k(r,e)>=0&&k(r,t)<=0}function $(r,e){return k(r,e)<=0?{start:r,end:e}:{start:e,end:r}}function ue(r,e){const t=Number(r);if(t===0||t===1||t===6)return t;try{const a=new Intl.Locale(e||void 0)?.weekInfo?.firstDay;if(a===7)return 0;if(a===1||a===6)return a}catch{}return 0}function Ve(r){return r==="range"||r==="multiple"?r:"single"}function qe(r){return r==="none"||r==="select"?r:"navigate"}function Ke(r){return r==="badges"||r==="count"?r:"dots"}function We(r){return r==="sm"||r==="lg"?r:"md"}function Je(r){return r==="neutral"||r==="info"||r==="success"||r==="warning"||r==="danger"?r:null}function he(r){return r==="loading"||r==="error"||r==="success"?r:"idle"}function pe(r){const e=[],t=new Set;return r.forEach(n=>{const a=c(n);if(!a)return;const i=b(a);t.has(i)||(t.add(i),e.push(i))}),e.sort(k),e}function E(r){return r.mode==="single"?{mode:"single",value:r.value}:r.mode==="range"?{mode:"range",start:r.start,end:r.end}:{mode:"multiple",values:[...r.values]}}class ye extends Oe.ElementBase{constructor(){super(),this._eventsRawCache=null,this._eventsParsedCache=[],this._eventsByDateCache=new Map,this._valueRawCache=null,this._valueModeCache=null,this._valueParsedCache={mode:"single",value:null},this._focusedIso="",this._hoverIso=null,this._pickerOpen=!1,this._syncingValueAttribute=!1,this._rangeKeyboardAnchor=null,this._shouldRefocus=!1,this._docPointerDownBound=e=>this._onDocumentPointerDown(e),this._onClick=this._onClick.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onPointerOver=this._onPointerOver.bind(this),this._onMouseLeave=this._onMouseLeave.bind(this),this._onFocusIn=this._onFocusIn.bind(this)}static get observedAttributes(){return["year","month","events","value","variant","headless","selection","min","max","disabled","readonly","week-start","locale","translations","outside-click","events-max","events-display","max-selections","size","hide-today","show-today","tone","state","bare","aria-label"]}connectedCallback(){super.connectedCallback(),this.root.addEventListener("click",this._onClick),this.root.addEventListener("keydown",this._onKeyDown),this.root.addEventListener("pointerover",this._onPointerOver),this.root.addEventListener("mouseleave",this._onMouseLeave),this.root.addEventListener("focusin",this._onFocusIn),this._syncDocumentListener()}disconnectedCallback(){this.root.removeEventListener("click",this._onClick),this.root.removeEventListener("keydown",this._onKeyDown),this.root.removeEventListener("pointerover",this._onPointerOver),this.root.removeEventListener("mouseleave",this._onMouseLeave),this.root.removeEventListener("focusin",this._onFocusIn),typeof document<"u"&&document.removeEventListener("pointerdown",this._docPointerDownBound,!0),super.disconnectedCallback()}attributeChangedCallback(e,t,n){t!==n&&(e==="events"&&(this._eventsRawCache=null),e==="value"&&!this._syncingValueAttribute&&(this._rangeKeyboardAnchor=null,this._valueRawCache=null),e==="selection"&&(this._rangeKeyboardAnchor=null,this._valueModeCache=null),e==="disabled"&&this.hasAttribute("disabled")&&(this._pickerOpen=!1,this._hoverIso=null),e==="state"&&he(n)==="loading"&&(this._pickerOpen=!1,this._hoverIso=null),this.isConnected&&(this._syncDocumentListener(),this.requestRender()))}focusDate(e){const t=c(e);t&&(this.goToMonth(t.y,t.m),this._focusedIso=b(t),this._shouldRefocus=!0,this.requestRender())}goToMonth(e,t,n="api"){if(!Number.isFinite(e)||!Number.isFinite(t))return;let a=Math.trunc(e),i=Math.trunc(t);for(;i<1;)i+=12,a-=1;for(;i>12;)i-=12,a+=1;let s=!1;if(String(a)!==(this.getAttribute("year")||"")&&(this.setAttribute("year",String(a)),s=!0),String(i)!==(this.getAttribute("month")||"")&&(this.setAttribute("month",String(i)),s=!0),s){const l={year:a,month:i,source:n};this.dispatchEvent(new CustomEvent("month-change",{detail:l,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("ui-month-change",{detail:l,bubbles:!0,composed:!0}))}}selectDate(e){const t=c(e);if(!t)return;const n=b(t);this._shouldRefocus=!0,this._applySelection(n,!1,"api")}_syncDocumentListener(){typeof document>"u"||(document.removeEventListener("pointerdown",this._docPointerDownBound,!0),this._pickerOpen&&document.addEventListener("pointerdown",this._docPointerDownBound,!0))}_onDocumentPointerDown(e){!this._pickerOpen||e.composedPath().includes(this)||(this._pickerOpen=!1,this.requestRender())}_resolveLocale(){const t=(this.getAttribute("locale")||"").trim()||(typeof navigator<"u"?navigator.language:"en-US");try{return new Intl.DateTimeFormat(t),t}catch{return"en-US"}}_resolvedView(){const e=new Date,t=Z(this.getAttribute("year"),e.getFullYear()),n=Z(this.getAttribute("month"),e.getMonth()+1);return{year:t,month:O(n,1,12)}}_todayIso(){const e=new Date;return`${e.getFullYear()}-${L(e.getMonth()+1)}-${L(e.getDate())}`}_resolveMinIso(){const e=c(this.getAttribute("min")||"");return e?b(e):null}_resolveMaxIso(){const e=c(this.getAttribute("max")||"");return e?b(e):null}_monthHasAllowedDay(e,t,n,a){const i=b(J(e,t)),s=b(me(e,t));return!(n&&k(s,n)<0||a&&k(i,a)>0)}_resolveSelectionMode(){return Ve(this.getAttribute("selection"))}_resolveEventsDisplay(){return Ke(this.getAttribute("events-display"))}_resolveOutsideClickMode(){return qe(this.getAttribute("outside-click"))}_resolveCalendarSize(){return We(this.getAttribute("size"))}_resolveTone(){return Je(this.getAttribute("tone"))}_resolveState(){return he(this.getAttribute("state"))}_resolveLabel(){const e=(this.getAttribute("aria-label")||"").trim();return e||this._translations().calendarLabel}_translations(){return fe(this.getAttribute("locale"),this.getAttribute("translations"))}_resolveBounds(){let e=this._resolveMinIso(),t=this._resolveMaxIso();if(e&&t&&k(e,t)>0){const n=e;e=t,t=n}return{minIso:e,maxIso:t}}_direction(){const e=this.getAttribute("dir");if(e==="rtl"||e==="ltr")return e;const n=this.closest("[dir]")?.getAttribute("dir");return n==="rtl"||n==="ltr"?n:getComputedStyle(this).direction==="rtl"?"rtl":"ltr"}_maxSelections(){return ce(this.getAttribute("max-selections"),Number.MAX_SAFE_INTEGER)}_eventsMax(){return O(ce(this.getAttribute("events-max"),3),1,9)}_showTodayButton(){return this.hasAttribute("hide-today")?!1:je(this.getAttribute("show-today"),!0)}_isDisabled(){return this.hasAttribute("disabled")}_isReadonly(){return this.hasAttribute("readonly")}_isInteractionDisabled(){return this._isDisabled()||this._resolveState()==="loading"}_isDateOutOfBounds(e,t,n){return!!(t&&k(e,t)<0||n&&k(e,n)>0)}_isDateBlocked(e,t,n,a){return!!(this._isInteractionDisabled()||this._isDateOutOfBounds(e,n,a)||t&&this._resolveOutsideClickMode()==="none")}_normalizeValueForMode(e){const t=this.getAttribute("value")||"";if(this._valueRawCache===t&&this._valueModeCache===e)return E(this._valueParsedCache);let n;if(e==="multiple"){try{const i=JSON.parse(t);if(!Array.isArray(i))n={mode:e,values:[]};else{const s=pe(i.map(l=>String(l||"")));n={mode:e,values:s}}}catch{n={mode:e,values:[]}}return this._valueRawCache=t,this._valueModeCache=e,this._valueParsedCache=E(n),n}if(e==="range"){try{const i=JSON.parse(t),s=i&&typeof i=="object"?String(i.start||""):"",l=i&&typeof i=="object"?String(i.end||""):"",o=c(s),p=c(l),u=o?b(o):null,h=p?b(p):null;if(u&&h){const f=$(u,h);n={mode:e,start:f.start,end:f.end}}else n={mode:e,start:u,end:null}}catch{n={mode:e,start:null,end:null}}return this._valueRawCache=t,this._valueModeCache=e,this._valueParsedCache=E(n),n}const a=c(t);return n={mode:e,value:a?b(a):null},this._valueRawCache=t,this._valueModeCache=e,this._valueParsedCache=E(n),n}_serializeSelection(e){if(e.mode==="single")return e.value;if(e.mode==="multiple")return JSON.stringify(e.values);const t={};return e.start&&(t.start=e.start),e.end&&(t.end=e.end),!t.start&&!t.end?null:JSON.stringify(t)}_emitSelectionEvents(e,t,n){e.mode==="single"&&t&&(this.dispatchEvent(new CustomEvent("select",{detail:{value:t,source:n},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("ui-select",{detail:{value:t,source:n},bubbles:!0,composed:!0})));const a={mode:e.mode,source:n};e.mode==="single"?a.value=e.value:e.mode==="range"?(a.value=e.start&&e.end?{start:e.start,end:e.end}:null,a.start=e.start,a.end=e.end):(a.value=[...e.values],a.values=[...e.values]),this.dispatchEvent(new CustomEvent("change",{detail:a,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("ui-change",{detail:a,bubbles:!0,composed:!0}))}_setValueAttribute(e){this._syncingValueAttribute=!0;try{e?this.getAttribute("value")!==e&&this.setAttribute("value",e):this.hasAttribute("value")&&this.removeAttribute("value")}finally{this._syncingValueAttribute=!1}}_applySelection(e,t,n){if(!c(e))return;const a=this._resolveSelectionMode(),{minIso:i,maxIso:s}=this._resolveBounds();if(this._isDateOutOfBounds(e,i,s))return;const l=this._isReadonly();if(this._isInteractionDisabled()||l)return;let o=this._normalizeValueForMode(a);if(a==="single")o={mode:a,value:e};else if(a==="multiple"){const h=this._normalizeValueForMode("multiple"),f=new Set(h.values);f.has(e)?f.delete(e):f.size<this._maxSelections()&&f.add(e),o={mode:a,values:pe(Array.from(f))}}else{const h=this._normalizeValueForMode("range"),f=h.start,_=h.end;if(t){const d=this._rangeKeyboardAnchor||f||this._focusedIso||e;if(!c(d))this._rangeKeyboardAnchor=e,o={mode:a,start:e,end:null};else{const g=$(d,e);o={mode:a,start:g.start,end:g.end}}}else if(!f||f&&_)this._rangeKeyboardAnchor=e,o={mode:a,start:e,end:null};else if(f&&!_){const d=$(f,e);o={mode:a,start:d.start,end:d.end}}}const p=this.getAttribute("value"),u=this._serializeSelection(o);p!==u?(this._setValueAttribute(u),this._emitSelectionEvents(o,a==="single"?e:null,n)):a==="single"&&this._emitSelectionEvents(o,e,n),this._focusedIso=e,this._hoverIso=null,this._shouldRefocus=!0,n!=="api"&&this.requestRender()}_monthLabel(e,t,n){try{return new Intl.DateTimeFormat(n,{month:"long",year:"numeric",timeZone:"UTC"}).format(new Date(Date.UTC(e,t-1,1)))}catch{return`${String(t)} ${e}`}}_monthPickerLabels(e){try{const t=new Intl.DateTimeFormat(e,{month:"short",timeZone:"UTC"});return Array.from({length:12},(n,a)=>t.format(new Date(Date.UTC(2024,a,1))))}catch{return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}}_weekdayLabels(e,t){const n=[],a=new Intl.DateTimeFormat(e,{weekday:"short",timeZone:"UTC"});for(let i=0;i<7;i+=1){const s=(t+i)%7,l=new Date(Date.UTC(2024,0,7+s));n.push(a.format(l))}return n}_dayAriaLabel(e,t){const n=c(e);if(!n)return e;try{return new Intl.DateTimeFormat(t,{weekday:"long",year:"numeric",month:"long",day:"numeric",timeZone:"UTC"}).format(B(n))}catch{return e}}_ensureEventsCache(){const e=this.getAttribute("events");if(e!==this._eventsRawCache&&(this._eventsRawCache=e,this._eventsParsedCache=[],this._eventsByDateCache=new Map,!!e))try{const t=JSON.parse(e);if(!Array.isArray(t))return;const n=[];t.forEach(a=>{if(!a||typeof a!="object")return;const i=String(a.date||"").trim(),s=c(i),l=s?b(s):"";if(!l)return;const o=String(a.tone||"default"),p=o==="success"||o==="warning"||o==="danger"||o==="info"?o:"default",u=a.title!=null?String(a.title):void 0;n.push({date:l,title:u,tone:p})}),this._eventsParsedCache=n,n.forEach(a=>{this._eventsByDateCache.has(a.date)||this._eventsByDateCache.set(a.date,[]),this._eventsByDateCache.get(a.date).push(a)})}catch{}}_buildCells(e,t,n,a,i,s){const l=b(J(e,t)),p=(de(l)-n+7)%7,u=c(l);if(!u)return[];const h=B(u);h.setUTCDate(h.getUTCDate()-p);const f=[];for(let _=0;_<42;_+=1){_>0&&h.setUTCDate(h.getUTCDate()+1);const d=ve(h),g=b(d),D=d.y!==e||d.m!==t,y=this._isDateBlocked(g,D,a,i);f.push({iso:g,parts:d,outside:D,disabled:y,today:g===s})}return f}_resolveFocusIso(e,t,n){const a=new Map;e.forEach(o=>a.set(o.iso,o));const i=o=>{if(!o)return null;const p=a.get(o);return!p||p.disabled?null:o};let s=i(this._focusedIso);if(s||(t.mode==="single"&&(s=i(t.value)),!s&&t.mode==="range"&&(s=i(t.end||t.start)),!s&&t.mode==="multiple"&&(s=i(t.values[0])),s||(s=i(n)),s))return s;const l=e.find(o=>!o.disabled);return l?l.iso:e[0]?.iso||""}_focusDateButton(e){if(!e||this.root.activeElement?.getAttribute("data-date")===e)return;const n=`.day[data-date="${e}"]`,a=this.root.querySelector(n);if(a)try{a.focus({preventScroll:!0})}catch{a.focus()}}_moveFocusByDays(e,t,n){const a=ge(e,t),i=c(a);i&&(this.goToMonth(i.y,i.m,"keyboard"),this._focusedIso=a,this._shouldRefocus=!0,n&&this._resolveSelectionMode()==="range"&&!this._isReadonly()&&!this._isInteractionDisabled()?this._applySelection(a,!0,"keyboard"):this.requestRender())}_moveFocusByMonths(e,t){const n=be(e,t),a=c(n);a&&(this.goToMonth(a.y,a.m,"keyboard"),this._focusedIso=n,this._shouldRefocus=!0,this.requestRender())}_focusWeekBoundary(e,t,n){const i=(de(e)-n+7)%7,s=t==="start"?-i:6-i;this._moveFocusByDays(e,s,!1)}_onPointerOver(e){if(this._resolveSelectionMode()!=="range")return;const t=this._normalizeValueForMode("range");if(!t.start||t.end)return;const a=e.target?.closest(".day");if(!a)return;const i=a.getAttribute("data-date")||"";if(!c(i))return;const s=a.getAttribute("data-outside")==="true",{minIso:l,maxIso:o}=this._resolveBounds();this._isDateBlocked(i,s,l,o)||this._hoverIso!==i&&(this._hoverIso=i,this.requestRender())}_onMouseLeave(){this._hoverIso!=null&&(this._hoverIso=null,this.requestRender())}_onFocusIn(e){const n=e.target?.closest(".day");if(!n)return;const a=n.getAttribute("data-date")||"";if(c(a)&&(this._focusedIso=a,this._resolveSelectionMode()==="range")){const i=this._normalizeValueForMode("range");i.start&&!i.end&&(this._hoverIso=a,this.requestRender())}}_toggleMonthYearPicker(e){this._isInteractionDisabled()||(this._pickerOpen=typeof e=="boolean"?e:!this._pickerOpen,this._syncDocumentListener(),this.requestRender())}_onClick(e){const t=e.target;if(!t)return;const n=t.closest("[data-action]"),a=n?.getAttribute("data-action")||"",{year:i,month:s}=this._resolvedView(),l=this._todayIso(),o=c(l);if(a==="prev-month"||a==="next-month"){if(this._isInteractionDisabled())return;const d=a==="prev-month"?-1:1,D=(this._focusedIso?c(this._focusedIso):null)||{y:i,m:s,d:1},y=P(D,d);this.goToMonth(y.y,y.m,"pointer"),this._focusedIso=b({y:y.y,m:y.m,d:O(D.d,1,F(y.y,y.m))}),this._shouldRefocus=!0,this.requestRender();return}if(a==="today"){if(this._isInteractionDisabled())return;this.goToMonth(o.y,o.m,"pointer"),this._focusedIso=l,this._shouldRefocus=!0,this._isReadonly()?this.requestRender():this._applySelection(l,!1,"pointer");return}if(a==="toggle-monthyear"){this._toggleMonthYearPicker();return}if(a==="picker-prev-year"||a==="picker-next-year"){if(this._isInteractionDisabled())return;const d=a==="picker-prev-year"?-1:1;this.goToMonth(i+d,s,"pointer"),this._pickerOpen=!0,this._shouldRefocus=!0,this.requestRender();return}if(a==="pick-month"){if(this._isInteractionDisabled())return;const d=Number(n?.getAttribute("data-month")||"");if(!Number.isInteger(d)||d<1||d>12)return;this.goToMonth(i,d,"pointer"),this._pickerOpen=!1,this._shouldRefocus=!0,this.requestRender();return}const p=t.closest(".day");if(!p)return;const u=p.getAttribute("data-date")||"";if(!c(u))return;const h=p.getAttribute("data-outside")==="true",{minIso:f,maxIso:_}=this._resolveBounds();if(!this._isDateBlocked(u,h,f,_)){if(h){const d=this._resolveOutsideClickMode();if(d==="none")return;if(d==="navigate"){const g=c(u);this.goToMonth(g.y,g.m,"pointer")}}if(this._isReadonly()){this._focusedIso=u,this._shouldRefocus=!0,this.requestRender();return}this._applySelection(u,!1,"pointer")}}_onKeyDown(e){if(e.key==="Escape"&&this._pickerOpen){e.preventDefault(),this._toggleMonthYearPicker(!1);return}const n=e.target?.closest(".day");if(!n)return;const a=n.getAttribute("data-date")||"";if(!c(a))return;const i=ue(this.getAttribute("week-start"),this._resolveLocale()),s=this._direction()==="rtl",l=e.shiftKey;if(e.key==="ArrowRight"){e.preventDefault(),this._moveFocusByDays(a,s?-1:1,l);return}if(e.key==="ArrowLeft"){e.preventDefault(),this._moveFocusByDays(a,s?1:-1,l);return}if(e.key==="ArrowDown"){e.preventDefault(),this._moveFocusByDays(a,7,l);return}if(e.key==="ArrowUp"){e.preventDefault(),this._moveFocusByDays(a,-7,l);return}if(e.key==="Home"){e.preventDefault(),this._focusWeekBoundary(a,"start",i);return}if(e.key==="End"){e.preventDefault(),this._focusWeekBoundary(a,"end",i);return}if(e.key==="PageUp"){e.preventDefault(),this._moveFocusByMonths(a,e.shiftKey?-12:-1);return}if(e.key==="PageDown"){e.preventDefault(),this._moveFocusByMonths(a,e.shiftKey?12:1);return}if(e.key==="Enter"||e.key===" "){e.preventDefault();const o=n.getAttribute("data-outside")==="true",{minIso:p,maxIso:u}=this._resolveBounds();if(this._isDateBlocked(a,o,p,u))return;if(o&&this._resolveOutsideClickMode()==="navigate"){const h=c(a);this.goToMonth(h.y,h.m,"keyboard")}this._isReadonly()||this._applySelection(a,!1,"keyboard")}}render(){const e=this._resolveLocale(),t=this._translations(),n=ue(this.getAttribute("week-start"),e),{year:a,month:i}=this._resolvedView(),s=this._resolveSelectionMode(),{minIso:l,maxIso:o}=this._resolveBounds(),p=this._todayIso(),u=this._resolveEventsDisplay(),h=this._eventsMax(),f=this._resolveCalendarSize(),_=this._resolveTone(),d=this._resolveState(),g=this._isInteractionDisabled(),D=this._resolveLabel();_?this.setAttribute("tone",_):this.removeAttribute("tone"),d!=="idle"?this.setAttribute("state",d):this.removeAttribute("state"),d==="loading"?this.setAttribute("aria-busy","true"):this.removeAttribute("aria-busy"),this._ensureEventsCache();const y=this._normalizeValueForMode(s),X=this._buildCells(a,i,n,l,o,p);this._focusedIso=this._resolveFocusIso(X,y,p);const U=this._monthLabel(a,i,e),G=P({y:a,m:i,d:1},-1),Q=P({y:a,m:i,d:1},1),_e=this._monthHasAllowedDay(G.y,G.m,l,o),xe=this._monthHasAllowedDay(Q.y,Q.m,l,o),ke=this._weekdayLabels(e,n),ee=s==="range"?y:null,S=ee?.start||null,M=ee?.end||null,we=s==="multiple"?new Set(y.values):null;let H=null,N=null;if(s==="range"&&S&&!M&&this._hoverIso&&c(this._hoverIso)){const x=$(S,this._hoverIso);H=x.start,N=x.end}const te=[];for(let x=0;x<6;x+=1){const C=X.slice(x*7,x*7+7).map(v=>{const w=this._eventsByDateCache.get(v.iso)||[],Ae=this._dayAriaLabel(v.iso,e);let A=!1;s==="single"?A=y.value===v.iso:s==="multiple"?A=we?.has(v.iso)||!1:S&&M&&(A=W(v.iso,S,M));const T=!!(S&&M&&W(v.iso,S,M)),Y=!!(S&&v.iso===S),j=!!(M&&v.iso===M),Te=!!(H&&N&&W(v.iso,H,N)),Re=!v.disabled&&v.iso===this._focusedIso?0:-1;let I="";w.length>0&&(u==="count"?I=`<span class="event-count" part="event-more" style="--event-tone:${K[w[0].tone||"default"]}">${w.length}</span>`:u==="badges"?I=w.slice(0,h).map(z=>{const q=m(z.title||t.event);return`<span class="event-badge" part="event-dot" style="--event-tone:${K[z.tone||"default"]}" title="${q}">${q}</span>`}).join(""):I=w.slice(0,h).map(z=>`<span class="event-dot" part="event-dot" style="--event-tone:${K[z.tone||"default"]}"></span>`).join(""),w.length>h&&u!=="count"&&(I+=`<span class="event-more" part="event-more">+${w.length-h}</span>`));const re=`ui-calendar-tip-${v.iso}`,ie=w.length?w.map(R=>m(R.title||t.event)).join("<br/>"):"",se=ie.length>0,ze=I?`<span class="events" part="events" aria-hidden="true">${I}</span>`:"",$e=se?`<span class="tooltip" part="tooltip" id="${re}">${ie}</span>`:"",V=A||T||Y||j,Ee=T||Y||j?"day range":"day";return`
690
691
  <div class="day-cell" part="day-cell"${I?` data-events="${u}"`:""}${V?' data-selected="true"':""}>
691
692
  <button
692
693
  type="button"
@@ -726,13 +727,13 @@
726
727
  >
727
728
  ${x}
728
729
  </button>
729
- `}).join(""),Se=ke.map(x=>`<span class="weekday" part="weekday" role="columnheader">${m(x)}</span>`).join(""),Me=this._showTodayButton()?`<button type="button" class="today-btn" part="today" data-action="today" ${g?"disabled":""}>${m(t.today)}</button>`:"",ae=l==="loading"?t.syncingSchedule:l==="error"?t.unableToSyncEvents:l==="success"?t.scheduleSynced:"";this.setContent(`
730
+ `}).join(""),Se=ke.map(x=>`<span class="weekday" part="weekday" role="columnheader">${m(x)}</span>`).join(""),Me=this._showTodayButton()?`<button type="button" class="today-btn" part="today" data-action="today" ${g?"disabled":""}>${m(t.today)}</button>`:"",ae=d==="loading"?t.syncingSchedule:d==="error"?t.unableToSyncEvents:d==="success"?t.scheduleSynced:"";this.setContent(`
730
731
  <style>${Ye}</style>
731
732
  <section
732
733
  class="frame"
733
734
  part="frame"
734
735
  data-size="${f}"
735
- data-state="${l}"
736
+ data-state="${d}"
736
737
  aria-disabled="${g?"true":"false"}"
737
738
  aria-label="${m(D)}"
738
739
  >
@@ -477,6 +477,7 @@ const Fe = `
477
477
  .picker-month[data-active="true"] {
478
478
  border-color: var(--ui-calendar-selected-border);
479
479
  background: var(--ui-calendar-selected-bg);
480
+ color: var(--ui-calendar-selected-color);
480
481
  }
481
482
 
482
483
  .grid-wrap {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./calendar-o273O28D.js");exports.UICalendar=e.UICalendar;exports.addDaysISO=e.addDaysISO;exports.addMonthsISO=e.addMonthsISO;exports.compareISO=e.compareISO;exports.endOfMonth=e.endOfMonth;exports.parseISO=e.parseISO;exports.startOfMonth=e.startOfMonth;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./calendar-CzpWDxLc.js");exports.UICalendar=e.UICalendar;exports.addDaysISO=e.addDaysISO;exports.addMonthsISO=e.addMonthsISO;exports.compareISO=e.compareISO;exports.endOfMonth=e.endOfMonth;exports.parseISO=e.parseISO;exports.startOfMonth=e.startOfMonth;
@@ -1,4 +1,4 @@
1
- import { U as d, a as e, b as o, c as r, e as t, p as O, s as n } from "./calendar-DmxiZrR7.mjs";
1
+ import { U as d, a as e, b as o, c as r, e as t, p as O, s as n } from "./calendar-DkSDFg33.mjs";
2
2
  export {
3
3
  d as UICalendar,
4
4
  e as addDaysISO,
package/dist/chart.cjs.js CHANGED
@@ -8,6 +8,9 @@
8
8
  --ui-chart-grid: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 45%, transparent);
9
9
  --ui-chart-accent: var(--ui-color-primary, #2563eb);
10
10
  --ui-chart-success: var(--ui-color-success, #15803d);
11
+ --ui-chart-success-text: var(--ui-color-success-text, color-mix(in srgb, var(--ui-chart-success) 74%, var(--ui-chart-text)));
12
+ --ui-chart-danger-text: var(--ui-color-danger-text, color-mix(in srgb, var(--ui-chart-danger) 74%, var(--ui-chart-text)));
13
+ --ui-chart-warning-text: var(--ui-color-warning-text, color-mix(in srgb, var(--ui-chart-warning) 74%, var(--ui-chart-text)));
11
14
  --ui-chart-warning: var(--ui-color-warning, #b45309);
12
15
  --ui-chart-danger: var(--ui-color-danger, #dc2626);
13
16
  --ui-chart-radius: calc(var(--ui-radius, 6px) + 4px);
@@ -53,6 +56,9 @@
53
56
  --ui-chart-accent: #93c5fd;
54
57
  --ui-chart-success: #34d399;
55
58
  --ui-chart-warning: #fbbf24;
59
+ --ui-chart-success-text: var(--ui-chart-success);
60
+ --ui-chart-danger-text: var(--ui-chart-danger);
61
+ --ui-chart-warning-text: var(--ui-chart-warning);
56
62
  --ui-chart-danger: #f87171;
57
63
  --ui-chart-shadow: none;
58
64
  }
@@ -149,19 +155,19 @@
149
155
  }
150
156
 
151
157
  .status-pill[data-state="success"] {
152
- color: color-mix(in srgb, var(--ui-chart-success) 74%, var(--ui-chart-text));
158
+ color: var(--ui-chart-success-text);
153
159
  border-color: color-mix(in srgb, var(--ui-chart-success) 35%, var(--ui-chart-border));
154
160
  background: color-mix(in srgb, var(--ui-chart-success) 13%, transparent);
155
161
  }
156
162
 
157
163
  .status-pill[data-state="error"] {
158
- color: color-mix(in srgb, var(--ui-chart-danger) 74%, var(--ui-chart-text));
164
+ color: var(--ui-chart-danger-text);
159
165
  border-color: color-mix(in srgb, var(--ui-chart-danger) 35%, var(--ui-chart-border));
160
166
  background: color-mix(in srgb, var(--ui-chart-danger) 12%, transparent);
161
167
  }
162
168
 
163
169
  .status-pill[data-state="loading"] {
164
- color: color-mix(in srgb, var(--ui-chart-warning) 74%, var(--ui-chart-text));
170
+ color: var(--ui-chart-warning-text);
165
171
  border-color: color-mix(in srgb, var(--ui-chart-warning) 32%, var(--ui-chart-border));
166
172
  background: color-mix(in srgb, var(--ui-chart-warning) 10%, transparent);
167
173
  }
@@ -200,11 +206,11 @@
200
206
  }
201
207
 
202
208
  .metric-value[data-tone="up"] {
203
- color: color-mix(in srgb, var(--ui-chart-success) 68%, var(--ui-chart-text));
209
+ color: var(--ui-chart-success-text);
204
210
  }
205
211
 
206
212
  .metric-value[data-tone="down"] {
207
- color: color-mix(in srgb, var(--ui-chart-danger) 68%, var(--ui-chart-text));
213
+ color: var(--ui-chart-danger-text);
208
214
  }
209
215
 
210
216
  .plot-shell {
@@ -489,13 +495,13 @@
489
495
  }
490
496
 
491
497
  .message[data-tone="error"] {
492
- color: color-mix(in srgb, var(--ui-chart-danger) 68%, var(--ui-chart-text));
498
+ color: var(--ui-chart-danger-text);
493
499
  border-color: color-mix(in srgb, var(--ui-chart-danger) 30%, var(--ui-chart-border));
494
500
  background: color-mix(in srgb, var(--ui-chart-danger) 10%, transparent);
495
501
  }
496
502
 
497
503
  .message[data-tone="success"] {
498
- color: color-mix(in srgb, var(--ui-chart-success) 68%, var(--ui-chart-text));
504
+ color: var(--ui-chart-success-text);
499
505
  border-color: color-mix(in srgb, var(--ui-chart-success) 30%, var(--ui-chart-border));
500
506
  background: color-mix(in srgb, var(--ui-chart-success) 10%, transparent);
501
507
  }
package/dist/chart.esm.js CHANGED
@@ -9,6 +9,9 @@ const V = 180, Z = `
9
9
  --ui-chart-grid: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 45%, transparent);
10
10
  --ui-chart-accent: var(--ui-color-primary, #2563eb);
11
11
  --ui-chart-success: var(--ui-color-success, #15803d);
12
+ --ui-chart-success-text: var(--ui-color-success-text, color-mix(in srgb, var(--ui-chart-success) 74%, var(--ui-chart-text)));
13
+ --ui-chart-danger-text: var(--ui-color-danger-text, color-mix(in srgb, var(--ui-chart-danger) 74%, var(--ui-chart-text)));
14
+ --ui-chart-warning-text: var(--ui-color-warning-text, color-mix(in srgb, var(--ui-chart-warning) 74%, var(--ui-chart-text)));
12
15
  --ui-chart-warning: var(--ui-color-warning, #b45309);
13
16
  --ui-chart-danger: var(--ui-color-danger, #dc2626);
14
17
  --ui-chart-radius: calc(var(--ui-radius, 6px) + 4px);
@@ -54,6 +57,9 @@ const V = 180, Z = `
54
57
  --ui-chart-accent: #93c5fd;
55
58
  --ui-chart-success: #34d399;
56
59
  --ui-chart-warning: #fbbf24;
60
+ --ui-chart-success-text: var(--ui-chart-success);
61
+ --ui-chart-danger-text: var(--ui-chart-danger);
62
+ --ui-chart-warning-text: var(--ui-chart-warning);
57
63
  --ui-chart-danger: #f87171;
58
64
  --ui-chart-shadow: none;
59
65
  }
@@ -150,19 +156,19 @@ const V = 180, Z = `
150
156
  }
151
157
 
152
158
  .status-pill[data-state="success"] {
153
- color: color-mix(in srgb, var(--ui-chart-success) 74%, var(--ui-chart-text));
159
+ color: var(--ui-chart-success-text);
154
160
  border-color: color-mix(in srgb, var(--ui-chart-success) 35%, var(--ui-chart-border));
155
161
  background: color-mix(in srgb, var(--ui-chart-success) 13%, transparent);
156
162
  }
157
163
 
158
164
  .status-pill[data-state="error"] {
159
- color: color-mix(in srgb, var(--ui-chart-danger) 74%, var(--ui-chart-text));
165
+ color: var(--ui-chart-danger-text);
160
166
  border-color: color-mix(in srgb, var(--ui-chart-danger) 35%, var(--ui-chart-border));
161
167
  background: color-mix(in srgb, var(--ui-chart-danger) 12%, transparent);
162
168
  }
163
169
 
164
170
  .status-pill[data-state="loading"] {
165
- color: color-mix(in srgb, var(--ui-chart-warning) 74%, var(--ui-chart-text));
171
+ color: var(--ui-chart-warning-text);
166
172
  border-color: color-mix(in srgb, var(--ui-chart-warning) 32%, var(--ui-chart-border));
167
173
  background: color-mix(in srgb, var(--ui-chart-warning) 10%, transparent);
168
174
  }
@@ -201,11 +207,11 @@ const V = 180, Z = `
201
207
  }
202
208
 
203
209
  .metric-value[data-tone="up"] {
204
- color: color-mix(in srgb, var(--ui-chart-success) 68%, var(--ui-chart-text));
210
+ color: var(--ui-chart-success-text);
205
211
  }
206
212
 
207
213
  .metric-value[data-tone="down"] {
208
- color: color-mix(in srgb, var(--ui-chart-danger) 68%, var(--ui-chart-text));
214
+ color: var(--ui-chart-danger-text);
209
215
  }
210
216
 
211
217
  .plot-shell {
@@ -490,13 +496,13 @@ const V = 180, Z = `
490
496
  }
491
497
 
492
498
  .message[data-tone="error"] {
493
- color: color-mix(in srgb, var(--ui-chart-danger) 68%, var(--ui-chart-text));
499
+ color: var(--ui-chart-danger-text);
494
500
  border-color: color-mix(in srgb, var(--ui-chart-danger) 30%, var(--ui-chart-border));
495
501
  background: color-mix(in srgb, var(--ui-chart-danger) 10%, transparent);
496
502
  }
497
503
 
498
504
  .message[data-tone="success"] {
499
- color: color-mix(in srgb, var(--ui-chart-success) 68%, var(--ui-chart-text));
505
+ color: var(--ui-chart-success-text);
500
506
  border-color: color-mix(in srgb, var(--ui-chart-success) 30%, var(--ui-chart-border));
501
507
  background: color-mix(in srgb, var(--ui-chart-success) 10%, transparent);
502
508
  }
@@ -191,7 +191,7 @@
191
191
  .icon {
192
192
  inline-size: 16px;
193
193
  block-size: 16px;
194
- color: color-mix(in srgb, var(--ui-collapsible-accent) 74%, var(--ui-collapsible-text));
194
+ color: color-mix(in srgb, var(--ui-collapsible-accent) 45%, var(--ui-collapsible-text));
195
195
  transition:
196
196
  transform var(--ui-collapsible-duration) var(--ui-collapsible-easing),
197
197
  color var(--ui-collapsible-duration) var(--ui-collapsible-easing);
@@ -259,7 +259,7 @@
259
259
  }
260
260
 
261
261
  :host([state="error"]) .state-note {
262
- color: var(--ui-color-danger, #dc2626);
262
+ color: var(--ui-color-danger-text, var(--ui-color-danger, #dc2626));
263
263
  }
264
264
 
265
265
  :host([state="success"]) .state-note {
@@ -192,7 +192,7 @@ const m = `
192
192
  .icon {
193
193
  inline-size: 16px;
194
194
  block-size: 16px;
195
- color: color-mix(in srgb, var(--ui-collapsible-accent) 74%, var(--ui-collapsible-text));
195
+ color: color-mix(in srgb, var(--ui-collapsible-accent) 45%, var(--ui-collapsible-text));
196
196
  transition:
197
197
  transform var(--ui-collapsible-duration) var(--ui-collapsible-easing),
198
198
  color var(--ui-collapsible-duration) var(--ui-collapsible-easing);
@@ -260,7 +260,7 @@ const m = `
260
260
  }
261
261
 
262
262
  :host([state="error"]) .state-note {
263
- color: var(--ui-color-danger, #dc2626);
263
+ color: var(--ui-color-danger-text, var(--ui-color-danger, #dc2626));
264
264
  }
265
265
 
266
266
  :host([state="success"]) .state-note {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const O=require("./ElementBase-DxbvhLJs.js"),m=require("./date-time-utils-DdigV4hs.js");function g(o,t,e){return Math.max(t,Math.min(e,o))}function _(o,t=3){const e=10**t;return Math.round(o*e)/e}function A(o){return g(Math.round(o),0,255)}function D(o){const t=o.trim();if(!t)return null;if(t.endsWith("%")){const r=Number(t.slice(0,-1));return Number.isFinite(r)?g(r/100,0,1):null}const e=Number(t);return Number.isFinite(e)?g(e,0,1):null}function C(o){const t=o.trim();if(!t)return null;if(t.endsWith("%")){const r=Number(t.slice(0,-1));return Number.isFinite(r)?A(g(r,0,100)/100*255):null}const e=Number(t);return Number.isFinite(e)?A(e):null}function B(o){const t=o.trim();if(!t.endsWith("%"))return null;const e=Number(t.slice(0,-1));return Number.isFinite(e)?g(e,0,100):null}function F(o){const t=o.trim().toLowerCase();if(!t)return null;if(t.endsWith("deg")){const r=Number(t.slice(0,-3));return Number.isFinite(r)?x(r):null}if(t.endsWith("turn")){const r=Number(t.slice(0,-4));return Number.isFinite(r)?x(r*360):null}if(t.endsWith("rad")){const r=Number(t.slice(0,-3));return Number.isFinite(r)?x(r*180/Math.PI):null}const e=Number(t);return Number.isFinite(e)?x(e):null}function x(o){const t=o%360;return t<0?t+360:t}function T(o){const t=o.trim();if(!t)return null;if(t.includes("/")){const[r,i]=t.split("/");if(i==null)return null;const a=r.includes(",")?r.split(","):r.trim().split(/\s+/);return a.length<3?null:{channels:a.map(n=>n.trim()).filter(Boolean),alpha:i.trim()}}if(t.includes(",")){const r=t.split(",").map(i=>i.trim()).filter(Boolean);return r.length<3?null:{channels:r.slice(0,3),alpha:r[3]??null}}const e=t.split(/\s+/).map(r=>r.trim()).filter(Boolean);return e.length<3?null:{channels:e.slice(0,3),alpha:e[3]??null}}function U(o){const t=o.trim().replace(/^#/,"");if(![3,4,6,8].includes(t.length)||!/^[0-9a-f]+$/i.test(t))return null;if(t.length===3||t.length===4){const n=parseInt(t[0]+t[0],16),s=parseInt(t[1]+t[1],16),l=parseInt(t[2]+t[2],16),c=t.length===4?parseInt(t[3]+t[3],16)/255:1;return b({r:n,g:s,b:l,a:c})}const e=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16),a=t.length===8?parseInt(t.slice(6,8),16)/255:1;return b({r:e,g:r,b:i,a})}function N(o){const t=/^rgba?\((.+)\)$/i.exec(o.trim());if(!t)return null;const e=T(t[1]);if(!e||e.channels.length<3)return null;const r=C(e.channels[0]),i=C(e.channels[1]),a=C(e.channels[2]);if(r==null||i==null||a==null)return null;const n=e.alpha!=null?D(e.alpha):1;return n==null?null:b({r,g:i,b:a,a:n})}function V(o){const t=/^hsla?\((.+)\)$/i.exec(o.trim());if(!t)return null;const e=T(t[1]);if(!e||e.channels.length<3)return null;const r=F(e.channels[0]),i=B(e.channels[1]),a=B(e.channels[2]);if(r==null||i==null||a==null)return null;const n=e.alpha!=null?D(e.alpha):1;return n==null?null:$({h:r,s:i,l:a,a:n})}function b(o){return{r:A(o.r),g:A(o.g),b:A(o.b),a:_(g(o.a,0,1),4)}}function v(o){const t=(o||"").trim();return t?t.startsWith("#")?U(t):/^rgba?\(/i.test(t)?N(t):/^hsla?\(/i.test(t)?V(t):null:null}function W(o,t=!1){const e=b(o),r=a=>a.toString(16).padStart(2,"0"),i=`#${r(e.r)}${r(e.g)}${r(e.b)}`;return t?`${i}${r(Math.round(e.a*255))}`:i}function K(o,t=!0){const e=b(o);return!t||e.a>=1?`rgb(${e.r} ${e.g} ${e.b})`:`rgb(${e.r} ${e.g} ${e.b} / ${_(e.a,3)})`}function G(o,t=!0){const e=Math.round(x(o.h)),r=Math.round(g(o.s,0,100)),i=Math.round(g(o.l,0,100)),a=_(g(o.a,0,1),3);return!t||a>=1?`hsl(${e} ${r}% ${i}%)`:`hsl(${e} ${r}% ${i}% / ${a})`}function z(o){const t=b(o),e=t.r/255,r=t.g/255,i=t.b/255,a=Math.max(e,r,i),n=Math.min(e,r,i),s=a-n;let l=0;s!==0&&(a===e?l=(r-i)/s%6:a===r?l=(i-e)/s+2:l=(e-r)/s+4,l*=60,l<0&&(l+=360));const c=a===0?0:s/a*100,p=a*100;return{h:_(l,3),s:_(c,3),v:_(p,3),a:t.a}}function X(o){const t=x(o.h),e=g(o.s,0,100)/100,r=g(o.v,0,100)/100,i=r*e,a=i*(1-Math.abs(t/60%2-1)),n=r-i;let s=0,l=0,c=0;return t<60?(s=i,l=a):t<120?(s=a,l=i):t<180?(l=i,c=a):t<240?(l=a,c=i):t<300?(s=a,c=i):(s=i,c=a),b({r:(s+n)*255,g:(l+n)*255,b:(c+n)*255,a:o.a})}function M(o){const t=b(o),e=t.r/255,r=t.g/255,i=t.b/255,a=Math.max(e,r,i),n=Math.min(e,r,i),s=a-n,l=(a+n)/2;let c=0,p=0;return s!==0&&(p=s/(1-Math.abs(2*l-1)),a===e?c=(r-i)/s%6:a===r?c=(i-e)/s+2:c=(e-r)/s+4,c*=60,c<0&&(c+=360)),{h:_(c,3),s:_(p*100,3),l:_(l*100,3),a:t.a}}function $(o){const t=x(o.h),e=g(o.s,0,100)/100,r=g(o.l,0,100)/100,i=(1-Math.abs(2*r-1))*e,a=i*(1-Math.abs(t/60%2-1)),n=r-i/2;let s=0,l=0,c=0;return t<60?(s=i,l=a):t<120?(s=a,l=i):t<180?(l=i,c=a):t<240?(l=a,c=i):t<300?(s=a,c=i):(s=i,c=a),b({r:(s+n)*255,g:(l+n)*255,b:(c+n)*255,a:o.a})}function y(o,t){return W(o,t).toUpperCase()}function k(o,t){return K(o,t)}function Y(o,t){return G(M(o),t)}const I="#2563eb",L="editora:ui-color-picker:recent",j=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const O=require("./ElementBase-DxbvhLJs.js"),m=require("./date-time-utils-C-4eHTyy.js");function g(o,t,e){return Math.max(t,Math.min(e,o))}function _(o,t=3){const e=10**t;return Math.round(o*e)/e}function A(o){return g(Math.round(o),0,255)}function D(o){const t=o.trim();if(!t)return null;if(t.endsWith("%")){const r=Number(t.slice(0,-1));return Number.isFinite(r)?g(r/100,0,1):null}const e=Number(t);return Number.isFinite(e)?g(e,0,1):null}function C(o){const t=o.trim();if(!t)return null;if(t.endsWith("%")){const r=Number(t.slice(0,-1));return Number.isFinite(r)?A(g(r,0,100)/100*255):null}const e=Number(t);return Number.isFinite(e)?A(e):null}function B(o){const t=o.trim();if(!t.endsWith("%"))return null;const e=Number(t.slice(0,-1));return Number.isFinite(e)?g(e,0,100):null}function F(o){const t=o.trim().toLowerCase();if(!t)return null;if(t.endsWith("deg")){const r=Number(t.slice(0,-3));return Number.isFinite(r)?x(r):null}if(t.endsWith("turn")){const r=Number(t.slice(0,-4));return Number.isFinite(r)?x(r*360):null}if(t.endsWith("rad")){const r=Number(t.slice(0,-3));return Number.isFinite(r)?x(r*180/Math.PI):null}const e=Number(t);return Number.isFinite(e)?x(e):null}function x(o){const t=o%360;return t<0?t+360:t}function T(o){const t=o.trim();if(!t)return null;if(t.includes("/")){const[r,i]=t.split("/");if(i==null)return null;const a=r.includes(",")?r.split(","):r.trim().split(/\s+/);return a.length<3?null:{channels:a.map(n=>n.trim()).filter(Boolean),alpha:i.trim()}}if(t.includes(",")){const r=t.split(",").map(i=>i.trim()).filter(Boolean);return r.length<3?null:{channels:r.slice(0,3),alpha:r[3]??null}}const e=t.split(/\s+/).map(r=>r.trim()).filter(Boolean);return e.length<3?null:{channels:e.slice(0,3),alpha:e[3]??null}}function U(o){const t=o.trim().replace(/^#/,"");if(![3,4,6,8].includes(t.length)||!/^[0-9a-f]+$/i.test(t))return null;if(t.length===3||t.length===4){const n=parseInt(t[0]+t[0],16),s=parseInt(t[1]+t[1],16),l=parseInt(t[2]+t[2],16),c=t.length===4?parseInt(t[3]+t[3],16)/255:1;return b({r:n,g:s,b:l,a:c})}const e=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16),a=t.length===8?parseInt(t.slice(6,8),16)/255:1;return b({r:e,g:r,b:i,a})}function N(o){const t=/^rgba?\((.+)\)$/i.exec(o.trim());if(!t)return null;const e=T(t[1]);if(!e||e.channels.length<3)return null;const r=C(e.channels[0]),i=C(e.channels[1]),a=C(e.channels[2]);if(r==null||i==null||a==null)return null;const n=e.alpha!=null?D(e.alpha):1;return n==null?null:b({r,g:i,b:a,a:n})}function V(o){const t=/^hsla?\((.+)\)$/i.exec(o.trim());if(!t)return null;const e=T(t[1]);if(!e||e.channels.length<3)return null;const r=F(e.channels[0]),i=B(e.channels[1]),a=B(e.channels[2]);if(r==null||i==null||a==null)return null;const n=e.alpha!=null?D(e.alpha):1;return n==null?null:$({h:r,s:i,l:a,a:n})}function b(o){return{r:A(o.r),g:A(o.g),b:A(o.b),a:_(g(o.a,0,1),4)}}function v(o){const t=(o||"").trim();return t?t.startsWith("#")?U(t):/^rgba?\(/i.test(t)?N(t):/^hsla?\(/i.test(t)?V(t):null:null}function W(o,t=!1){const e=b(o),r=a=>a.toString(16).padStart(2,"0"),i=`#${r(e.r)}${r(e.g)}${r(e.b)}`;return t?`${i}${r(Math.round(e.a*255))}`:i}function K(o,t=!0){const e=b(o);return!t||e.a>=1?`rgb(${e.r} ${e.g} ${e.b})`:`rgb(${e.r} ${e.g} ${e.b} / ${_(e.a,3)})`}function G(o,t=!0){const e=Math.round(x(o.h)),r=Math.round(g(o.s,0,100)),i=Math.round(g(o.l,0,100)),a=_(g(o.a,0,1),3);return!t||a>=1?`hsl(${e} ${r}% ${i}%)`:`hsl(${e} ${r}% ${i}% / ${a})`}function z(o){const t=b(o),e=t.r/255,r=t.g/255,i=t.b/255,a=Math.max(e,r,i),n=Math.min(e,r,i),s=a-n;let l=0;s!==0&&(a===e?l=(r-i)/s%6:a===r?l=(i-e)/s+2:l=(e-r)/s+4,l*=60,l<0&&(l+=360));const c=a===0?0:s/a*100,p=a*100;return{h:_(l,3),s:_(c,3),v:_(p,3),a:t.a}}function X(o){const t=x(o.h),e=g(o.s,0,100)/100,r=g(o.v,0,100)/100,i=r*e,a=i*(1-Math.abs(t/60%2-1)),n=r-i;let s=0,l=0,c=0;return t<60?(s=i,l=a):t<120?(s=a,l=i):t<180?(l=i,c=a):t<240?(l=a,c=i):t<300?(s=a,c=i):(s=i,c=a),b({r:(s+n)*255,g:(l+n)*255,b:(c+n)*255,a:o.a})}function M(o){const t=b(o),e=t.r/255,r=t.g/255,i=t.b/255,a=Math.max(e,r,i),n=Math.min(e,r,i),s=a-n,l=(a+n)/2;let c=0,p=0;return s!==0&&(p=s/(1-Math.abs(2*l-1)),a===e?c=(r-i)/s%6:a===r?c=(i-e)/s+2:c=(e-r)/s+4,c*=60,c<0&&(c+=360)),{h:_(c,3),s:_(p*100,3),l:_(l*100,3),a:t.a}}function $(o){const t=x(o.h),e=g(o.s,0,100)/100,r=g(o.l,0,100)/100,i=(1-Math.abs(2*r-1))*e,a=i*(1-Math.abs(t/60%2-1)),n=r-i/2;let s=0,l=0,c=0;return t<60?(s=i,l=a):t<120?(s=a,l=i):t<180?(l=i,c=a):t<240?(l=a,c=i):t<300?(s=a,c=i):(s=i,c=a),b({r:(s+n)*255,g:(l+n)*255,b:(c+n)*255,a:o.a})}function y(o,t){return W(o,t).toUpperCase()}function k(o,t){return K(o,t)}function Y(o,t){return G(M(o),t)}const I="#2563eb",L="editora:ui-color-picker:recent",j=`
2
2
  <svg viewBox="0 0 20 20" aria-hidden="true" focusable="false">
3
3
  <path d="m5.6 7.6 4.4 4.6 4.4-4.6" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
4
4
  </svg>
@@ -251,7 +251,7 @@
251
251
  padding: 0 8px;
252
252
  border: 1px solid color-mix(in srgb, var(--ui-cp-accent) 36%, var(--ui-cp-border));
253
253
  background: color-mix(in srgb, var(--ui-cp-accent) 12%, transparent);
254
- color: color-mix(in srgb, var(--ui-cp-accent) 82%, var(--ui-cp-text));
254
+ color: color-mix(in srgb, var(--ui-cp-accent) 45%, var(--ui-cp-text));
255
255
  font: 650 10px/1 "Inter", "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
256
256
  letter-spacing: 0.04em;
257
257
  text-transform: uppercase;
@@ -544,7 +544,7 @@
544
544
 
545
545
  .error {
546
546
  min-block-size: 16px;
547
- color: var(--ui-color-danger, #dc2626);
547
+ color: var(--ui-color-danger-text, var(--ui-color-danger, #dc2626));
548
548
  font: 500 11px/1.2 "Inter", "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
549
549
  }
550
550