@crewlethq/ui 0.4.2 → 0.4.4

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 (50) hide show
  1. package/dist/Combobox/index.js +3 -3
  2. package/dist/CommandPalette/index.js +3 -3
  3. package/dist/DataTable/index.js +4 -4
  4. package/dist/{DataTable-ITNACQ2X.css → DataTable-37UWTRN6.css} +9 -5
  5. package/dist/DataView/index.js +10 -10
  6. package/dist/DateTimePicker/index.js +2 -2
  7. package/dist/DiffList/index.js +1 -1
  8. package/dist/Input/index.js +1 -1
  9. package/dist/ListInput/index.js +3 -3
  10. package/dist/Listbox/index.js +1 -1
  11. package/dist/Listbox/useListbox.d.ts +14 -0
  12. package/dist/Listbox/useOptionKeys.d.ts +12 -1
  13. package/dist/{Listbox-X2DOTSQA.css → Listbox-ZXYYNN6U.css} +28 -0
  14. package/dist/Menu/index.js +1 -1
  15. package/dist/{Menu-6DE7I66I.css → Menu-BT5PMFJI.css} +15 -0
  16. package/dist/Popover/index.js +1 -1
  17. package/dist/SegmentedControl/index.js +2 -2
  18. package/dist/Select/index.js +2 -2
  19. package/dist/{Select-2X77FSWR.css → Select-E24U5LBC.css} +34 -0
  20. package/dist/Table/index.js +1 -1
  21. package/dist/{Table-MDOLVUAW.css → Table-TGCS4C3F.css} +14 -4
  22. package/dist/Tabs/index.js +1 -1
  23. package/dist/{Tabs-VLICJFVB.css → Tabs-MJ2E3VPK.css} +33 -1
  24. package/dist/TagsInput/index.js +3 -3
  25. package/dist/ThemeSwitcher/index.js +3 -3
  26. package/dist/TimeWindowPicker/index.js +5 -5
  27. package/dist/Tooltip/index.js +1 -1
  28. package/dist/{chunk-XV6WRMBC.js → chunk-5KSRXHOW.js} +3 -0
  29. package/dist/{chunk-BJSKPEZI.js → chunk-6KCO2D5C.js} +2 -2
  30. package/dist/{chunk-6ZFVFA56.js → chunk-7PEFUMQJ.js} +2 -2
  31. package/dist/{chunk-ESCO4XYW.js → chunk-AJNCATWZ.js} +2 -2
  32. package/dist/{chunk-HQNHV7D6.js → chunk-AQTBF4EB.js} +1 -1
  33. package/dist/{chunk-34VGEDVV.js → chunk-CC67MUUO.js} +8 -8
  34. package/dist/{chunk-UG46QBLT.js → chunk-DB2VDLVR.js} +1 -1
  35. package/dist/{chunk-DD5BBGBE.js → chunk-EFSG7HNU.js} +8 -4
  36. package/dist/{chunk-LFJ6UJTI.js → chunk-FSOW3ARP.js} +2 -2
  37. package/dist/{chunk-O6232G37.js → chunk-GKHAKGOF.js} +14 -2
  38. package/dist/{chunk-GTOUGQQK.js → chunk-KIC7BZYJ.js} +8 -6
  39. package/dist/{chunk-OFHBK7RI.js → chunk-KNYYCWMK.js} +31 -11
  40. package/dist/{chunk-UOGSZKLT.js → chunk-MW356IVK.js} +2 -2
  41. package/dist/{chunk-WQX73TWF.js → chunk-PATXSJGR.js} +5 -4
  42. package/dist/{chunk-QEUY3A5P.js → chunk-Q3B66TJM.js} +3 -2
  43. package/dist/{chunk-2HQR4U4D.js → chunk-R66KLW7S.js} +1 -1
  44. package/dist/{chunk-FBZAKNSX.js → chunk-T43A26SD.js} +4 -1
  45. package/dist/{chunk-FEFTGVMF.js → chunk-V2N3BMOT.js} +7 -2
  46. package/dist/{chunk-WOYYD2YR.js → chunk-XJWXPRSK.js} +3 -3
  47. package/dist/generated/index.js +35 -35
  48. package/dist/index.js +35 -35
  49. package/dist/styles.css +139 -16
  50. package/package.json +3 -3
package/dist/styles.css CHANGED
@@ -3506,7 +3506,7 @@
3506
3506
  }
3507
3507
 
3508
3508
 
3509
- /* DataTable-ITNACQ2X.css */
3509
+ /* DataTable-37UWTRN6.css */
3510
3510
  /* ─────────────────────────────────────────────────────────────────
3511
3511
  * Default variant.
3512
3512
  *
@@ -3525,11 +3525,15 @@
3525
3525
  --crewlet-data-table-active-sort-color: var(--color-brand-accent-ink);
3526
3526
  width: 100%;
3527
3527
  position: relative;
3528
- overflow-x: auto;
3529
- /* The gesture stops at the table's own edge. Without it a trackpad swipe
3530
- that runs out of table carries on into the browser's back navigation, so
3531
- one column too far left loses the page. */
3532
- overscroll-behavior-x: contain;
3528
+ /* NO SCROLLER HERE. This carried `overflow-x: auto` and its own
3529
+ `overscroll-behavior-x`, and neither could act: `.crewlet-data-table__scroll`
3530
+ is rendered inside it for BOTH variants at `width: 100%`, so it absorbs
3531
+ the table's width and the root never has anything to scroll. What the
3532
+ declaration did still do is make this a scroll container — and per CSS
3533
+ Overflow that pulls `overflow-y` to `auto` as well — so it quietly became
3534
+ the scrollport a `position: sticky` descendant resolves against. The inner
3535
+ wrapper carries the real scrolling and the gesture containment, which is
3536
+ what the layout comment further down already describes. */
3533
3537
  }
3534
3538
 
3535
3539
  .crewlet-data-table--default .crewlet-data-table__table {
@@ -8597,7 +8601,7 @@ svg.crewlet-datetime__chevron {
8597
8601
  }
8598
8602
 
8599
8603
 
8600
- /* Listbox-X2DOTSQA.css */
8604
+ /* Listbox-ZXYYNN6U.css */
8601
8605
  /*
8602
8606
  * The listbox register: one look for every list a field offers.
8603
8607
  *
@@ -8632,6 +8636,29 @@ svg.crewlet-datetime__chevron {
8632
8636
  display: flex;
8633
8637
  align-items: center;
8634
8638
  gap: var(--spacing-2);
8639
+ /*
8640
+ * A ROW IS NEVER SHRUNK BELOW ITS OWN CONTENT, and `flex: none` is what says
8641
+ * so. The list above is a column flex container with a `max-height` and
8642
+ * `overflow-y: auto`, which makes every row a flex ITEM, and a flex item's
8643
+ * automatic minimum size is normally its content — that is what stops a
8644
+ * column from compressing its children and makes the container scroll
8645
+ * instead. The `min-height` below REPLACES that automatic minimum with a
8646
+ * fixed floor, so once the rows no longer fit, the free space goes negative
8647
+ * and every row shrinks to exactly that floor BEFORE the scrollbar appears.
8648
+ * A row is `overflow: visible`, so its content then paints over its
8649
+ * neighbours.
8650
+ *
8651
+ * It is not a corner case: a row is 19.5px of text plus 16px of padding =
8652
+ * 35.5px against a 28px floor, so EVERY row of a list long enough to scroll
8653
+ * was over-tall. Measured in Chromium on a nine-option Select — five rows
8654
+ * drawn over each other, two of them at 59px inside a 28px box.
8655
+ *
8656
+ * `flex: none` is `0 0 auto`: the basis stays content-derived and the row
8657
+ * can no longer shrink, which leaves `min-height` doing the one job it was
8658
+ * written for — a floor under a SHORT row, not a cap on a tall one. The
8659
+ * scroller absorbs the excess, one row deep, which is what it is for.
8660
+ */
8661
+ flex: none;
8635
8662
  min-height: var(--size-row-sm);
8636
8663
  padding: var(--spacing-2) var(--spacing-3);
8637
8664
  border-radius: var(--radius-md);
@@ -8703,14 +8730,19 @@ svg.crewlet-datetime__chevron {
8703
8730
  font-size: var(--font-size-compact);
8704
8731
  }
8705
8732
 
8733
+ /* AND NEITHER IS THE SEPARATOR, for the same reason one step further: its
8734
+ content minimum is zero, so it is the one child a squeezed column can
8735
+ flatten completely — exactly when the list is long enough to need the
8736
+ grouping it draws. */
8706
8737
  .crewlet-listbox__separator {
8738
+ flex: none;
8707
8739
  height: 1px;
8708
8740
  margin: var(--spacing-1) 0;
8709
8741
  background: var(--color-border-default);
8710
8742
  }
8711
8743
 
8712
8744
 
8713
- /* Menu-6DE7I66I.css */
8745
+ /* Menu-BT5PMFJI.css */
8714
8746
  /*
8715
8747
  * The menu button's panel.
8716
8748
  *
@@ -8783,6 +8815,21 @@ svg.crewlet-datetime__chevron {
8783
8815
  align-items: center;
8784
8816
  gap: var(--spacing-2);
8785
8817
  width: 100%;
8818
+ /*
8819
+ * THE SAME RULE THE LISTBOX ROW STATES, and it has to be stated twice
8820
+ * because a menu's rows are deliberately not in that family (see the head of
8821
+ * Listbox.css). The panel above is a column flex scroller, `__group` is
8822
+ * `display: contents` so every item is a direct flex item of it, and the
8823
+ * `min-height` below replaces the automatic minimum that would otherwise
8824
+ * hold a row at its content. Once the menu is long enough to scroll, the
8825
+ * free space goes negative and the rows shrink to that floor first.
8826
+ *
8827
+ * A plain row survives it by accident — one nowrap line is 19.5px, under the
8828
+ * floor, so there is nothing to shrink. A `--described` row does not: it
8829
+ * adds `padding-block` and stacks a label over a wrapping description, which
8830
+ * is ~52px squeezed into 28px and drawn over the rows either side.
8831
+ */
8832
+ flex: none;
8786
8833
  min-height: var(--size-row-sm);
8787
8834
  padding: 0 var(--spacing-2);
8788
8835
  border: none;
@@ -11409,7 +11456,7 @@ svg.crewlet-datetime__chevron {
11409
11456
  }
11410
11457
 
11411
11458
 
11412
- /* Select-2X77FSWR.css */
11459
+ /* Select-E24U5LBC.css */
11413
11460
  /*
11414
11461
  * Select: one chrome over two controls, and the product's only dropdown.
11415
11462
  *
@@ -11709,9 +11756,25 @@ svg.crewlet-select__chevron {
11709
11756
  min-width: 0;
11710
11757
  }
11711
11758
 
11759
+ /*
11760
+ * ONE LINE, WHICH IS WHAT THE ELLIPSIS BELOW WAS ALWAYS FOR. `overflow:
11761
+ * hidden` clips what leaves the box and `text-overflow` replaces what a LINE
11762
+ * cannot hold — and neither does anything to text that is simply allowed to
11763
+ * wrap, which is what this rule did without `white-space`. A long option
11764
+ * silently grew a second line instead of ellipsing, and with the row's own
11765
+ * flex minimum gone (see Listbox.css) that second line was drawn over the
11766
+ * option underneath.
11767
+ *
11768
+ * The trigger's `.crewlet-select__label` a hundred lines above has carried all
11769
+ * three since it was written; this is the same register on the same text, and
11770
+ * `.crewlet-listbox__hint` states the rule outright — "never wrapped: a hint
11771
+ * that broke across two lines turned every row in the list a different
11772
+ * height".
11773
+ */
11712
11774
  .crewlet-select__option-label {
11713
11775
  overflow: hidden;
11714
11776
  text-overflow: ellipsis;
11777
+ white-space: nowrap;
11715
11778
  }
11716
11779
 
11717
11780
  .crewlet-select__option-desc {
@@ -11729,6 +11792,24 @@ svg.crewlet-select__chevron {
11729
11792
 
11730
11793
  /* ── The search box ──────────────────────────────────────────────────── */
11731
11794
 
11795
+ /*
11796
+ * THE RING IS DRAWN WHERE THE ELEMENT IS. The input below clears the user
11797
+ * agent's outline, and the frame's `:focus-within` rule is the package's one
11798
+ * replacement for it — but that rule's own premise is that everything
11799
+ * focusable sits INSIDE `.crewlet-select`, and this box does not: the panel is
11800
+ * portalled into the layer host, outside that subtree, so `:focus-within`
11801
+ * could never match while focus was in the search field. And focus is moved
11802
+ * here on every open, so the one control a searchable Select puts a reader in
11803
+ * was the one with no focus indicator at all.
11804
+ *
11805
+ * On the band rather than the input, and INSET, because the panel clips: an
11806
+ * outset ring on the input would be cut by the menu's own `overflow: hidden`.
11807
+ */
11808
+ .crewlet-select__search:focus-within {
11809
+ outline: 2px solid var(--color-focus);
11810
+ outline-offset: var(--size-focus-ring-inset-offset);
11811
+ }
11812
+
11732
11813
  .crewlet-select__search {
11733
11814
  display: flex;
11734
11815
  align-items: center;
@@ -12964,7 +13045,7 @@ svg.crewlet-select__chevron {
12964
13045
  }
12965
13046
 
12966
13047
 
12967
- /* Table-MDOLVUAW.css */
13048
+ /* Table-TGCS4C3F.css */
12968
13049
  /*
12969
13050
  * Table: the operator's table, on the elements a table is made of.
12970
13051
  *
@@ -12996,10 +13077,20 @@ svg.crewlet-select__chevron {
12996
13077
  .crewlet-table__container {
12997
13078
  /* The overflow is a safety net for a cell that cannot wrap (a long token, a
12998
13079
  hash); the fixed layout below is what keeps a table inside the width it is
12999
- given. A `maxHeight` turns this into the vertical scroller the sticky
13000
- header needs, which is the only way a long table keeps its column names. */
13001
- overflow-x: auto;
13002
- overflow-y: var(--crewlet-table-overflow-y, visible);
13080
+ given. A `maxHeight` gives it something to scroll vertically, which is
13081
+ what the sticky header needs and the only way a long table keeps its
13082
+ column names.
13083
+
13084
+ BOTH AXES, STATED. This was `overflow-y: var(--crewlet-table-overflow-y,
13085
+ visible)`, and the fallback was unreachable: per CSS Overflow, when one
13086
+ axis is not `visible` the other computes to `auto`, so the unconditional
13087
+ `overflow-x: auto` beside it made this box a scrollport in both
13088
+ directions in every state. The variable had exactly one reachable value —
13089
+ the `auto` Table.tsx wrote beside the max-height — so it read as a knob
13090
+ with a default nothing could ever select. Without a max-height there is
13091
+ simply nothing to scroll to, which is what made the difference invisible
13092
+ rather than what made it absent. */
13093
+ overflow: auto;
13003
13094
  max-height: var(--crewlet-table-max-height, none);
13004
13095
  overscroll-behavior-x: contain;
13005
13096
  flex: 1;
@@ -13126,7 +13217,7 @@ svg.crewlet-select__chevron {
13126
13217
  }
13127
13218
 
13128
13219
 
13129
- /* Tabs-VLICJFVB.css */
13220
+ /* Tabs-MJ2E3VPK.css */
13130
13221
  /*
13131
13222
  * The pill register: Tabs and SegmentedControl.
13132
13223
  *
@@ -13179,7 +13270,21 @@ svg.crewlet-select__chevron {
13179
13270
  */
13180
13271
  content: '';
13181
13272
  position: absolute;
13182
- bottom: -1px;
13273
+ /*
13274
+ * ON THE PADDING EDGE, NOT BELOW IT. This is an absolutely positioned child
13275
+ * of the row, and the row is a scroll container: `overflow-x: auto` makes
13276
+ * `overflow-y` compute to `auto` as well, so there is no axis on which it
13277
+ * does not clip. Clipping is to the PADDING edge and the row's own 1px
13278
+ * `border-bottom` lies outside it, so at `bottom: -1px` a 2px bar was cut in
13279
+ * half — and the half removed was the lower one, the half meant to sit on
13280
+ * the baseline rule and replace it. `scrollbar-width: none` above then hid
13281
+ * the 1px vertical scrollbar that would have given the game away.
13282
+ *
13283
+ * `overflow: visible` is not the way out: the horizontal scrolling is the
13284
+ * row's whole contract. The bar sits at 0 instead and paints over the row's
13285
+ * last two pixels, which is where a reader sees it anyway.
13286
+ */
13287
+ bottom: 0;
13183
13288
  /*
13184
13289
  * Under the LABEL, not under the tab's box: the measurement is the button,
13185
13290
  * which carries the small side pad an inset focus ring needs, and a bar
@@ -13237,6 +13342,24 @@ svg.crewlet-select__chevron {
13237
13342
  align-items: center;
13238
13343
  justify-content: center;
13239
13344
  gap: var(--spacing-1);
13345
+ /*
13346
+ * A TAB IS NEVER SQUEEZED, which is what makes the row above it SCROLL.
13347
+ *
13348
+ * `.crewlet-tabs--underline` is a `width: 100%` flex row with
13349
+ * `overflow-x: auto`, and its own comment states the contract: the row
13350
+ * scrolls rather than overflowing the page. That behaviour came entirely
13351
+ * from each tab's automatic minimum resolving to its `nowrap` label, which
13352
+ * is what makes the line unable to fit — and the explicit `min-width` below
13353
+ * REPLACES that automatic minimum with a flat 24px for every item, not just
13354
+ * the narrow ones the floor is for. With the default `flex-shrink: 1` the
13355
+ * tabs were squeezed toward 24px until the line fitted, the strip stopped
13356
+ * scrolling, and the labels — `nowrap`, with `min-width: 0` and no clip —
13357
+ * spilled out of their buttons over their neighbours.
13358
+ *
13359
+ * `flex: none` is what the comment above already claims: "a tab whose label
13360
+ * is wider than the floor is untouched".
13361
+ */
13362
+ flex: none;
13240
13363
  /* Never under the 24px target floor, at any density. */
13241
13364
  min-height: var(--size-control-sm);
13242
13365
  min-width: var(--size-target-min);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewlethq/ui",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "Crewlet shared React components built on @crewlethq/tokens and @crewlethq/icons.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -42,8 +42,8 @@
42
42
  "clean": "rm -rf dist src/generated"
43
43
  },
44
44
  "dependencies": {
45
- "@crewlethq/icons": "0.4.2",
46
- "@crewlethq/tokens": "0.4.2"
45
+ "@crewlethq/icons": "0.4.4",
46
+ "@crewlethq/tokens": "0.4.4"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "react": ">=18",