@cboxdk/cbox-ui 0.17.1 → 0.18.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/README.md +2 -1
- package/dist/index.d.ts +43 -1
- package/dist/index.js +296 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/tokens/controls.css +42 -0
package/package.json
CHANGED
package/tokens/controls.css
CHANGED
|
@@ -232,6 +232,48 @@
|
|
|
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
|
+
@media (pointer: coarse) {
|
|
273
|
+
.cbx-ui-date-grid th { width: 42px; }
|
|
274
|
+
.cbx-ui-date-day { width: 42px; height: 42px; font-size: 14px; }
|
|
275
|
+
.cbx-ui-date-chip { height: 34px; padding: 0 12px; }
|
|
276
|
+
}
|
|
235
277
|
.cbx-ui-combo-note .cbx-ui-combo-icon { margin-top: 1px; color: currentColor; }
|
|
236
278
|
.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
279
|
.cbx-ui-combo-footer:hover { background: var(--info-soft); }
|