neba 1.12.0 → 1.13.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.
Files changed (117) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +43 -41
  3. package/dist/components/accordion/Accordion.d.ts +18 -0
  4. package/dist/components/accordion/Accordion.js +1 -1
  5. package/dist/components/anchor/Anchor.js +1 -1
  6. package/dist/components/animate-marquee/AnimateMarquee.d.ts +5 -3
  7. package/dist/components/animate-marquee/AnimateMarquee.js +1 -1
  8. package/dist/components/animate-scramble/AnimateScramble.js +1 -1
  9. package/dist/components/app-logo/AppLogo.js +1 -1
  10. package/dist/components/bottom-navigation/BottomNavigation.d.ts +10 -0
  11. package/dist/components/bottom-navigation/BottomNavigation.js +1 -1
  12. package/dist/components/button/Button.js +1 -1
  13. package/dist/components/calendar/Calendar.js +1 -1
  14. package/dist/components/carousel/Carousel.d.ts +13 -0
  15. package/dist/components/carousel/Carousel.js +1 -1
  16. package/dist/components/code-block/CodeBlock.js +1 -1
  17. package/dist/components/color-picker/ColorPicker.js +1 -1
  18. package/dist/components/combobox/Combobox.d.ts +18 -0
  19. package/dist/components/combobox/Combobox.js +1 -1
  20. package/dist/components/command-palette/CommandPalette.js +1 -1
  21. package/dist/components/data-table/DataTable.js +1 -1
  22. package/dist/components/date-picker/DatePicker.js +1 -1
  23. package/dist/components/date-range-picker/DateRangePicker.js +1 -1
  24. package/dist/components/date-time-picker/DateTimePicker.js +1 -1
  25. package/dist/components/dialog/Dialog.js +1 -1
  26. package/dist/components/drawer/Drawer.js +1 -1
  27. package/dist/components/gauge-chart/GaugeChart.js +1 -1
  28. package/dist/components/grid/Grid.d.ts +11 -1
  29. package/dist/components/grid/Grid.js +1 -1
  30. package/dist/components/hover-card/HoverCard.js +1 -1
  31. package/dist/components/image/Image.d.ts +32 -4
  32. package/dist/components/image/Image.js +1 -1
  33. package/dist/components/menu/Menu.js +1 -1
  34. package/dist/components/meter/Meter.d.ts +7 -0
  35. package/dist/components/meter/Meter.js +1 -1
  36. package/dist/components/navigation-menu/NavigationMenu.js +1 -1
  37. package/dist/components/number-field/NumberField.js +1 -1
  38. package/dist/components/otp-field/OtpField.js +1 -1
  39. package/dist/components/overlay/Overlay.js +1 -1
  40. package/dist/components/panes/Panes.js +1 -1
  41. package/dist/components/popover/Popover.js +1 -1
  42. package/dist/components/progress-circular/ProgressCircular.d.ts +10 -1
  43. package/dist/components/progress-circular/ProgressCircular.js +1 -1
  44. package/dist/components/progress-linear/ProgressLinear.d.ts +7 -1
  45. package/dist/components/progress-linear/ProgressLinear.js +1 -1
  46. package/dist/components/provider/NebaProvider.js +1 -1
  47. package/dist/components/scatter-chart/ScatterChart.js +1 -1
  48. package/dist/components/scroll-area/ScrollArea.js +1 -1
  49. package/dist/components/scroll-zone/ScrollZone.d.ts +8 -7
  50. package/dist/components/scroll-zone/ScrollZone.js +1 -1
  51. package/dist/components/select/Select.d.ts +13 -0
  52. package/dist/components/select/Select.js +1 -1
  53. package/dist/components/slider/Slider.d.ts +37 -2
  54. package/dist/components/slider/Slider.js +1 -1
  55. package/dist/components/tabs/Tabs.d.ts +18 -0
  56. package/dist/components/tabs/Tabs.js +1 -1
  57. package/dist/components/text-field/TextField.js +1 -1
  58. package/dist/components/time-picker/TimePicker.js +1 -1
  59. package/dist/components/timeline-chart/TimelineChart.js +1 -1
  60. package/dist/components/toast/Toast.js +1 -1
  61. package/dist/components/tooltip/Tooltip.js +1 -1
  62. package/dist/components/tour/Tour.js +1 -1
  63. package/dist/components/transfer/Transfer.js +1 -1
  64. package/dist/components/tree-select/TreeSelect.d.ts +2 -0
  65. package/dist/components/tree-select/TreeSelect.js +1 -1
  66. package/dist/components/typography/Typography.js +1 -1
  67. package/dist/internal/cache.d.ts +24 -0
  68. package/dist/internal/cache.js +1 -0
  69. package/dist/internal/calendar.d.ts +15 -42
  70. package/dist/internal/calendar.js +1 -1
  71. package/dist/internal/chart-frame.d.ts +16 -3
  72. package/dist/internal/chart-frame.js +1 -1
  73. package/dist/internal/date.js +1 -1
  74. package/dist/internal/drag.d.ts +8 -6
  75. package/dist/internal/drag.js +1 -1
  76. package/dist/internal/format.d.ts +21 -7
  77. package/dist/internal/format.js +1 -1
  78. package/dist/internal/grid.d.ts +16 -0
  79. package/dist/internal/grid.js +1 -1
  80. package/dist/internal/i18n.d.ts +72 -0
  81. package/dist/internal/i18n.js +1 -1
  82. package/dist/internal/icons.d.ts +25 -0
  83. package/dist/internal/icons.js +1 -1
  84. package/dist/internal/link.d.ts +5 -4
  85. package/dist/internal/media.js +1 -1
  86. package/dist/internal/observe.js +1 -1
  87. package/dist/internal/picker.d.ts +8 -3
  88. package/dist/internal/picker.js +1 -1
  89. package/dist/internal/progress.d.ts +24 -1
  90. package/dist/internal/progress.js +1 -1
  91. package/dist/internal/styles.d.ts +73 -3
  92. package/dist/internal/styles.js +1 -1
  93. package/dist/internal/text.d.ts +0 -10
  94. package/dist/internal/text.js +1 -1
  95. package/dist/internal/wheel.d.ts +38 -0
  96. package/dist/internal/wheel.js +1 -0
  97. package/dist/locales/ar.js +1 -1
  98. package/dist/locales/de.js +1 -1
  99. package/dist/locales/es.js +1 -1
  100. package/dist/locales/fr.js +1 -1
  101. package/dist/locales/hi.js +1 -1
  102. package/dist/locales/id.js +1 -1
  103. package/dist/locales/it.js +1 -1
  104. package/dist/locales/ja.js +1 -1
  105. package/dist/locales/ko.js +1 -1
  106. package/dist/locales/nl.js +1 -1
  107. package/dist/locales/pl.js +1 -1
  108. package/dist/locales/pt.js +1 -1
  109. package/dist/locales/ru.js +1 -1
  110. package/dist/locales/th.js +1 -1
  111. package/dist/locales/tr.js +1 -1
  112. package/dist/locales/vi.js +1 -1
  113. package/dist/locales/zh-hans.js +1 -1
  114. package/dist/locales/zh-hant.js +1 -1
  115. package/dist/styles.css +1 -1
  116. package/dist/tailwind.css +131 -6
  117. package/package.json +2 -2
package/dist/tailwind.css CHANGED
@@ -172,6 +172,13 @@
172
172
  as a move. Nothing else may use it. */
173
173
  --neba-duration-window: 240ms;
174
174
 
175
+ /* How high every portalled surface sits: a menu, a dialog, a drawer, a
176
+ tooltip, a toast. One number, because they are all the same kind of thing
177
+ — something drawn over the page the reader was looking at — and because
178
+ the value a host needs is its own. A site whose fixed header is at 1200
179
+ sets this once rather than beating fourteen `z-50`s with a selector. */
180
+ --neba-z-portal: 50;
181
+
175
182
  /* Color families -------------------------------------------------------
176
183
  Chroma sits just under the sRGB gamut boundary for each family's lightness
177
184
  — around 90% of the maximum, close enough to be vivid and far enough that
@@ -1463,6 +1470,82 @@
1463
1470
  * change at the same moment — including when a consumer has moved them.
1464
1471
  * ------------------------------------------------------------------------- */
1465
1472
 
1473
+ /* Every breakpoint slot is cleared on the element that reads it, and that is
1474
+ what keeps a nested component from reading its ancestor's layout.
1475
+
1476
+ A custom property inherits, and a slot the element did not write is
1477
+ therefore whatever the nearest ancestor wrote — so a grid inside a grid item
1478
+ resolved the *item's* `--n-span-md` and came out a third of the width it had
1479
+ asked for. Only the breakpoints a caller names are emitted, which is what
1480
+ keeps the inline style to one property, so there is nothing on the element
1481
+ to overwrite the inherited value with.
1482
+
1483
+ An inline style wins over this rule, so a component that really did name a
1484
+ breakpoint is untouched. What is deliberately *not* cleared is the resolved
1485
+ slot beside each of these: `--n-cols` and `--n-gap-x` are read by a grid's
1486
+ items rather than by the grid, and inheriting is how they get there. */
1487
+ .neba-grid,
1488
+ .neba-flex {
1489
+ --n-gap-x-xs: initial;
1490
+ --n-gap-x-sm: initial;
1491
+ --n-gap-x-md: initial;
1492
+ --n-gap-x-lg: initial;
1493
+ --n-gap-x-xl: initial;
1494
+ --n-gap-y-xs: initial;
1495
+ --n-gap-y-sm: initial;
1496
+ --n-gap-y-md: initial;
1497
+ --n-gap-y-lg: initial;
1498
+ --n-gap-y-xl: initial;
1499
+ }
1500
+
1501
+ .neba-grid,
1502
+ .neba-gallery {
1503
+ --n-cols-xs: initial;
1504
+ --n-cols-sm: initial;
1505
+ --n-cols-md: initial;
1506
+ --n-cols-lg: initial;
1507
+ --n-cols-xl: initial;
1508
+ }
1509
+
1510
+ .neba-flex {
1511
+ --n-flex-dir-xs: initial;
1512
+ --n-flex-dir-sm: initial;
1513
+ --n-flex-dir-md: initial;
1514
+ --n-flex-dir-lg: initial;
1515
+ --n-flex-dir-xl: initial;
1516
+ }
1517
+
1518
+ .neba-measure {
1519
+ --n-max-w-xs: initial;
1520
+ --n-max-w-sm: initial;
1521
+ --n-max-w-md: initial;
1522
+ --n-max-w-lg: initial;
1523
+ --n-max-w-xl: initial;
1524
+ }
1525
+
1526
+ .neba-grid-item {
1527
+ --n-span-xs: initial;
1528
+ --n-span-sm: initial;
1529
+ --n-span-md: initial;
1530
+ --n-span-lg: initial;
1531
+ --n-span-xl: initial;
1532
+ --n-span-w-xs: initial;
1533
+ --n-span-w-sm: initial;
1534
+ --n-span-w-md: initial;
1535
+ --n-span-w-lg: initial;
1536
+ --n-span-w-xl: initial;
1537
+ --n-grow-xs: initial;
1538
+ --n-grow-sm: initial;
1539
+ --n-grow-md: initial;
1540
+ --n-grow-lg: initial;
1541
+ --n-grow-xl: initial;
1542
+ --n-offset-xs: initial;
1543
+ --n-offset-sm: initial;
1544
+ --n-offset-md: initial;
1545
+ --n-offset-lg: initial;
1546
+ --n-offset-xl: initial;
1547
+ }
1548
+
1466
1549
  /* The two gutters, shared: a GridContainer and a Flex ask the same question
1467
1550
  and `spacing` has to mean the same number on both.
1468
1551
 
@@ -1506,13 +1589,30 @@
1506
1589
  the container, so this re-resolves on its own at every breakpoint. */
1507
1590
  --n-track: calc((100% + var(--n-gap-x, 0px)) / var(--n-cols, 12));
1508
1591
 
1509
- /* Inseparable from the width above it: `flex` stops the row from resizing
1510
- the item, `min-width` stops a long unbroken word from doing the same, and
1511
- `box-sizing` is what makes the percentage mean the whole item. */
1592
+ /* What a span that is a share of the row works out to, named rather than
1593
+ written into `width` so that a breakpoint which goes back to a number can
1594
+ point at it. */
1595
+ --n-col-width: calc(var(--n-track) * min(var(--n-span), var(--n-cols, 12)) - var(--n-gap-x, 0px));
1596
+
1597
+ /* `auto` and `grow` are the two widths a column count cannot reach — the
1598
+ contents' own width, with and without the space left over in the row — so
1599
+ they are a cascade of their own rather than a value inside the one above.
1600
+ A caller who names a number at a wider breakpoint points this back at the
1601
+ arithmetic, which is what lets the two mix in one map. */
1602
+ --n-span-w: var(--n-span-w-xs, var(--n-col-width));
1603
+ --n-grow: var(--n-grow-xs, 0);
1604
+
1605
+ /* Inseparable from the width above it: the row must not resize the item,
1606
+ `min-width` stops a long unbroken word from doing the same, `max-width`
1607
+ holds an `auto` item inside the row it is in, and `box-sizing` is what
1608
+ makes the percentage mean the whole item. */
1512
1609
  box-sizing: border-box;
1513
- flex: 0 0 auto;
1610
+ flex-grow: var(--n-grow);
1611
+ flex-shrink: 0;
1612
+ flex-basis: auto;
1514
1613
  min-width: 0;
1515
- width: calc(var(--n-track) * min(var(--n-span), var(--n-cols, 12)) - var(--n-gap-x, 0px));
1614
+ max-width: 100%;
1615
+ width: var(--n-span-w);
1516
1616
  margin-inline-start: calc(var(--n-track) * min(var(--n-offset), var(--n-cols, 12)));
1517
1617
  }
1518
1618
 
@@ -1538,6 +1638,8 @@
1538
1638
 
1539
1639
  .neba-grid-item {
1540
1640
  --n-span: var(--n-span-sm, var(--n-span-xs, var(--n-cols, 12)));
1641
+ --n-span-w: var(--n-span-w-sm, var(--n-span-w-xs, var(--n-col-width)));
1642
+ --n-grow: var(--n-grow-sm, var(--n-grow-xs, 0));
1541
1643
  --n-offset: var(--n-offset-sm, var(--n-offset-xs, 0));
1542
1644
  }
1543
1645
  }
@@ -1564,6 +1666,8 @@
1564
1666
 
1565
1667
  .neba-grid-item {
1566
1668
  --n-span: var(--n-span-md, var(--n-span-sm, var(--n-span-xs, var(--n-cols, 12))));
1669
+ --n-span-w: var(--n-span-w-md, var(--n-span-w-sm, var(--n-span-w-xs, var(--n-col-width))));
1670
+ --n-grow: var(--n-grow-md, var(--n-grow-sm, var(--n-grow-xs, 0)));
1567
1671
  --n-offset: var(--n-offset-md, var(--n-offset-sm, var(--n-offset-xs, 0)));
1568
1672
  }
1569
1673
  }
@@ -1596,6 +1700,11 @@
1596
1700
  --n-span-lg,
1597
1701
  var(--n-span-md, var(--n-span-sm, var(--n-span-xs, var(--n-cols, 12))))
1598
1702
  );
1703
+ --n-span-w: var(
1704
+ --n-span-w-lg,
1705
+ var(--n-span-w-md, var(--n-span-w-sm, var(--n-span-w-xs, var(--n-col-width))))
1706
+ );
1707
+ --n-grow: var(--n-grow-lg, var(--n-grow-md, var(--n-grow-sm, var(--n-grow-xs, 0))));
1599
1708
  --n-offset: var(--n-offset-lg, var(--n-offset-md, var(--n-offset-sm, var(--n-offset-xs, 0))));
1600
1709
  }
1601
1710
  }
@@ -1640,6 +1749,17 @@
1640
1749
  --n-span-xl,
1641
1750
  var(--n-span-lg, var(--n-span-md, var(--n-span-sm, var(--n-span-xs, var(--n-cols, 12)))))
1642
1751
  );
1752
+ --n-span-w: var(
1753
+ --n-span-w-xl,
1754
+ var(
1755
+ --n-span-w-lg,
1756
+ var(--n-span-w-md, var(--n-span-w-sm, var(--n-span-w-xs, var(--n-col-width))))
1757
+ )
1758
+ );
1759
+ --n-grow: var(
1760
+ --n-grow-xl,
1761
+ var(--n-grow-lg, var(--n-grow-md, var(--n-grow-sm, var(--n-grow-xs, 0))))
1762
+ );
1643
1763
  --n-offset: var(
1644
1764
  --n-offset-xl,
1645
1765
  var(--n-offset-lg, var(--n-offset-md, var(--n-offset-sm, var(--n-offset-xs, 0))))
@@ -2304,7 +2424,12 @@
2304
2424
  animation-name: neba-anim-marquee-y;
2305
2425
  }
2306
2426
 
2307
- .neba-marquee[data-pause-on-hover]:hover .neba-marquee-track {
2427
+ /* `:focus-within` beside `:hover` for the same reason the prop exists at all. A
2428
+ pointer stops the strip so a link on it can be aimed at; a keyboard reaches
2429
+ that link by tabbing to it, and a strip that kept moving would be carrying the
2430
+ focused element off the screen. */
2431
+ .neba-marquee[data-pause-on-hover]:hover .neba-marquee-track,
2432
+ .neba-marquee[data-pause-on-hover]:focus-within .neba-marquee-track {
2308
2433
  animation-play-state: paused;
2309
2434
  }
2310
2435
 
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "neba",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "A comprehensive React UI component library — buttons, fields, menus, dialogs, tables and much more — accessible and themeable, sharing one prop vocabulary and a translucent acrylic design language. ESM only, types included, dark mode built in.",
5
5
  "type": "module",
6
6
  "types": "dist/index.d.ts",
7
7
  "sideEffects": [
8
8
  "**/*.css"
9
9
  ],
10
- "author": "CDGet <jooy2.contact@gmail.com>",
10
+ "author": "CDGet (https://cdget.com)",
11
11
  "license": "MIT",
12
12
  "homepage": "https://neba.cdget.com",
13
13
  "repository": {