@cboxdk/cbox-ui 0.15.7 → 0.16.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cboxdk/cbox-ui",
3
- "version": "0.15.7",
3
+ "version": "0.16.1",
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": {
@@ -1,4 +1,4 @@
1
- /* Form controls and the dialog: Button, Field, Input, Textarea, Checkbox, RadioGroup, Switch,
1
+ /* Form controls and the dialog: Button, Field, Input, Textarea, Checkbox, RadioGroup, Switch, Slider,
2
2
  * Spinner, Dialog. Plain CSS on the shared tokens, so it needs no Tailwind scan of the package.
3
3
  *
4
4
  * Everything sits in `@layer components`. In a Tailwind v4 app that layer is already ordered
@@ -14,6 +14,7 @@
14
14
  .cbx-ui-check,
15
15
  .cbx-ui-radio,
16
16
  .cbx-ui-switch,
17
+ .cbx-ui-slider,
17
18
  .cbx-ui-sheet,
18
19
  .cbx-ui-iconbtn {
19
20
  --cbx-ui-ease: cubic-bezier(.4, 0, .2, 1);
@@ -188,6 +189,52 @@
188
189
  .cbx-ui-radio.is-disabled .cbx-ui-radio-label,
189
190
  .cbx-ui-check.is-disabled .cbx-ui-check-label { cursor: not-allowed; opacity: 0.6; }
190
191
 
192
+ /* ── Slider: a 4px track filled up to the value, a 16px thumb; 20px tall like a Switch. */
193
+ .cbx-ui-slider {
194
+ --cbx-ui-slider-fill: 0%;
195
+ display: block;
196
+ width: 100%;
197
+ height: 20px;
198
+ margin: 0;
199
+ padding: 0;
200
+ background: transparent;
201
+ cursor: pointer;
202
+ appearance: none;
203
+ -webkit-appearance: none;
204
+ }
205
+ .cbx-ui-slider:disabled { opacity: 0.5; cursor: not-allowed; }
206
+ .cbx-ui-slider:focus-visible { outline: none; }
207
+ .cbx-ui-slider::-webkit-slider-runnable-track {
208
+ height: 4px;
209
+ border-radius: 9999px;
210
+ background: linear-gradient(to right, var(--primary) var(--cbx-ui-slider-fill), var(--control-border) var(--cbx-ui-slider-fill));
211
+ }
212
+ .cbx-ui-slider::-moz-range-track { height: 4px; border-radius: 9999px; background: var(--control-border); }
213
+ .cbx-ui-slider::-moz-range-progress { height: 4px; border-radius: 9999px; background: var(--primary); }
214
+ .cbx-ui-slider::-webkit-slider-thumb {
215
+ -webkit-appearance: none;
216
+ appearance: none;
217
+ width: 16px;
218
+ height: 16px;
219
+ margin-top: -6px;
220
+ border: 2px solid var(--primary);
221
+ border-radius: 9999px;
222
+ background: var(--background);
223
+ box-shadow: 0 1px 2px rgb(0 0 0 / 0.15);
224
+ transition: transform 150ms var(--cbx-ui-ease);
225
+ }
226
+ .cbx-ui-slider::-moz-range-thumb {
227
+ width: 12px;
228
+ height: 12px;
229
+ border: 2px solid var(--primary);
230
+ border-radius: 9999px;
231
+ background: var(--background);
232
+ box-shadow: 0 1px 2px rgb(0 0 0 / 0.15);
233
+ }
234
+ .cbx-ui-slider:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--ring); outline-offset: 2px; }
235
+ .cbx-ui-slider:focus-visible::-moz-range-thumb { outline: 2px solid var(--ring); outline-offset: 2px; }
236
+ .cbx-ui-slider:not(:disabled):active::-webkit-slider-thumb { transform: scale(1.15); }
237
+
191
238
  /* ── Switch: 36×20, a 16px thumb. */
192
239
  .cbx-ui-switch {
193
240
  position: relative;
@@ -244,6 +291,9 @@
244
291
 
245
292
  /* ── Sheet: never a centred modal. A bottom sheet on a phone, a panel from the right from
246
293
  768px. The body is the only scroller, so the title and the actions stay put. */
294
+ /* Each open sheet is one layer with its own stacking context, so a sheet opened from another
295
+ one (a stack) lays its scrim over the sheet underneath as well as over the page. */
296
+ [data-cbx-dialog-layer] { position: relative; z-index: 90; }
247
297
  .cbx-ui-overlay {
248
298
  position: fixed;
249
299
  inset: 0;
@@ -291,6 +341,7 @@
291
341
  }
292
342
  .cbx-ui-sheet--sm { width: min(26rem, calc(100vw - 48px)); }
293
343
  .cbx-ui-sheet--lg { width: min(44rem, calc(100vw - 48px)); }
344
+ .cbx-ui-sheet--xl { width: min(72rem, calc(100vw - 48px)); }
294
345
  .cbx-ui-sheet-handle { display: none; }
295
346
  }
296
347
  .cbx-ui-sheet-head { display: flex; flex: none; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--border); }
package/tokens/shell.css CHANGED
@@ -591,8 +591,10 @@ textarea.cbx-input { height: auto; padding: 10px 12px; resize: vertical; min-hei
591
591
  .cbx-create-tree .cbx-field-search { margin-top: 0; }
592
592
  .cbx-create-env { display: flex; align-items: center; gap: 6px; margin: 0 2px 12px; font-size: 12.5px; color: var(--muted-foreground); }
593
593
  .cbx-create-form:not([hidden]) { display: flex; flex-direction: column; flex: 1; }
594
- .cbx-cform { display: flex; flex-direction: column; flex: 1; }
595
- .cbx-cfield { margin: 0 0 14px; }
594
+ /* The form spaces its children, so a Field, a RadioGroup or an app's own block sits as far from the
595
+ next one as a CreateField does; a hint never touches the next label. */
596
+ .cbx-cform { display: flex; flex-direction: column; flex: 1; gap: 14px; }
597
+ .cbx-cfield { margin: 0; }
596
598
  .cbx-cfield-label { display: block; margin: 0 2px 6px; font-size: 13px; font-weight: 600; }
597
599
  .cbx-cfield .cbx-group { margin: 0; }
598
600
  .cbx-cinput { width: 100%; height: 46px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; background: var(--secondary); color: var(--foreground); font-size: 16px; outline: none; }