@cboxdk/cbox-ui 0.17.1 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cboxdk/cbox-ui",
3
- "version": "0.17.1",
3
+ "version": "0.19.0",
4
4
  "private": false,
5
5
  "description": "Cbox shared UI — layout primitives, design tokens, and brand assets used across every Cbox-family app (id, cortex, atlas, track, …).",
6
6
  "repository": {
@@ -232,6 +232,61 @@
232
232
  .cbx-ui-combo-empty { margin: 0; padding: 16px 12px; text-align: center; color: var(--muted-foreground); }
233
233
  .cbx-ui-combo-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; color: var(--destructive-text); border-bottom: 1px solid var(--border); }
234
234
  .cbx-ui-combo-note:last-child { border-bottom: 0; }
235
+
236
+ /* ── DatePicker: the Combobox's trigger and panel, with a month calendar inside. Six rows
237
+ always, so the panel keeps its height from month to month; 36px days (42px on touch). */
238
+ .cbx-ui-date-trigger { min-width: 9.5rem; }
239
+ .cbx-ui-date-panel { padding: 8px; width: max-content; overflow-y: auto; }
240
+ .cbx-ui-date-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 0 6px; }
241
+ .cbx-ui-date-month { flex: 1; text-align: center; font-weight: 600; font-size: 13px; text-transform: capitalize; }
242
+ .cbx-ui-date-nav {
243
+ display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
244
+ padding: 0; border: 0; border-radius: var(--radius-md, 8px); background: none; color: var(--muted-foreground); cursor: pointer;
245
+ }
246
+ .cbx-ui-date-nav:hover:not(:disabled) { background: var(--secondary); color: var(--foreground); }
247
+ .cbx-ui-date-nav:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
248
+ .cbx-ui-date-nav:disabled { opacity: 0.35; cursor: not-allowed; }
249
+ .cbx-ui-date-grid { border-collapse: separate; border-spacing: 2px; margin: 0 auto; }
250
+ .cbx-ui-date-grid th { width: 36px; height: 24px; padding: 0; font-size: 11px; font-weight: 500; color: var(--muted-foreground); text-align: center; text-transform: uppercase; }
251
+ .cbx-ui-date-grid td { padding: 0; }
252
+ .cbx-ui-date-day {
253
+ display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
254
+ padding: 0; border: 0; border-radius: var(--radius-md, 8px); background: none; color: var(--foreground);
255
+ font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer;
256
+ transition: background-color 120ms ease, color 120ms ease;
257
+ }
258
+ .cbx-ui-date-day:hover:not(:disabled) { background: var(--secondary); }
259
+ .cbx-ui-date-day:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
260
+ .cbx-ui-date-day[data-outside] { color: var(--muted-foreground); opacity: 0.6; }
261
+ .cbx-ui-date-day[data-today] { box-shadow: inset 0 0 0 1px var(--border-strong); font-weight: 600; }
262
+ .cbx-ui-date-day[data-selected], .cbx-ui-date-day[data-selected]:hover { background: var(--primary); color: var(--primary-foreground); opacity: 1; font-weight: 600; box-shadow: none; }
263
+ .cbx-ui-date-day:disabled { opacity: 0.3; cursor: not-allowed; text-decoration: line-through; }
264
+ .cbx-ui-date-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
265
+ .cbx-ui-date-chip {
266
+ display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border: 1px solid var(--border);
267
+ border-radius: 999px; background: none; color: var(--foreground); font: inherit; font-size: 12px; cursor: pointer;
268
+ }
269
+ .cbx-ui-date-chip:hover { background: var(--secondary); border-color: var(--border-strong); }
270
+ .cbx-ui-date-chip:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
271
+ .cbx-ui-date-clear { margin-left: auto; color: var(--muted-foreground); }
272
+ /* TimePicker: a field to type in and the times to pick from; DateTimePicker: the two side by side. */
273
+ .cbx-ui-time-trigger { min-width: 7.5rem; }
274
+ .cbx-ui-time-panel { min-width: 12rem; }
275
+ .cbx-ui-time-list { position: relative; max-height: 15rem; font-variant-numeric: tabular-nums; }
276
+ .cbx-ui-time-typed {
277
+ display: flex; flex: none; align-items: center; justify-content: space-between; gap: 8px; margin: 4px; padding: 8px;
278
+ border: 0; border-radius: 6px; background: var(--accent-soft); color: var(--foreground); font: inherit; font-weight: 500; text-align: left; cursor: pointer;
279
+ }
280
+ .cbx-ui-time-typed + .cbx-ui-time-list { border-top: 1px solid var(--border); }
281
+ .cbx-ui-time-typed kbd { font-family: var(--font-mono, ui-monospace, monospace); font-size: 11px; color: var(--muted-foreground); }
282
+ .cbx-ui-datetime { display: flex; flex-wrap: wrap; gap: 8px; }
283
+ .cbx-ui-datetime > .cbx-ui-combo:first-child { flex: 1 1 9.5rem; }
284
+ .cbx-ui-datetime > .cbx-ui-combo:first-child .cbx-ui-combo-trigger { width: 100%; }
285
+ @media (pointer: coarse) {
286
+ .cbx-ui-date-grid th { width: 42px; }
287
+ .cbx-ui-date-day { width: 42px; height: 42px; font-size: 14px; }
288
+ .cbx-ui-date-chip { height: 34px; padding: 0 12px; }
289
+ }
235
290
  .cbx-ui-combo-note .cbx-ui-combo-icon { margin-top: 1px; color: currentColor; }
236
291
  .cbx-ui-combo-footer { display: flex; flex: none; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); color: var(--info-text); font-weight: 500; text-decoration: none; }
237
292
  .cbx-ui-combo-footer:hover { background: var(--info-soft); }