@leonardaustin/ui 0.26.2 → 0.28.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 (53) hide show
  1. package/dist/components/charts/AreaChart.js +113 -114
  2. package/dist/components/charts/Heatmap.d.ts +20 -0
  3. package/dist/components/charts/Heatmap.js +46 -0
  4. package/dist/components/charts/chartUtils.d.ts +2 -0
  5. package/dist/components/charts/chartUtils.js +14 -9
  6. package/dist/components/charts/useChartSize.d.ts +5 -0
  7. package/dist/components/charts/useChartSize.js +18 -0
  8. package/dist/components/tables/Pagination.d.ts +3 -1
  9. package/dist/components/tables/Pagination.js +12 -12
  10. package/dist/components/tables/ResourceTable.d.ts +5 -0
  11. package/dist/components/tables/ResourceTable.js +11 -9
  12. package/dist/components/tables/Table.d.ts +22 -3
  13. package/dist/components/tables/Table.js +41 -35
  14. package/dist/components/ui/ActionLink.d.ts +14 -0
  15. package/dist/components/ui/ActionLink.js +12 -0
  16. package/dist/components/ui/CalendarGrid.js +10 -10
  17. package/dist/components/ui/DatePicker.d.ts +1 -1
  18. package/dist/components/ui/DatePicker.js +5 -10
  19. package/dist/components/ui/DateRangePicker.d.ts +3 -1
  20. package/dist/components/ui/DateRangePicker.js +105 -80
  21. package/dist/components/ui/DateTimePicker.js +20 -20
  22. package/dist/components/ui/EmptyState.d.ts +8 -6
  23. package/dist/components/ui/EmptyState.js +11 -10
  24. package/dist/components/ui/ErrorBoundary.d.ts +6 -0
  25. package/dist/components/ui/ErrorBoundary.js +11 -5
  26. package/dist/components/ui/Grid.d.ts +1 -1
  27. package/dist/components/ui/Icon.d.ts +91 -0
  28. package/dist/components/ui/Icon.js +98 -0
  29. package/dist/components/ui/Inline.d.ts +1 -1
  30. package/dist/components/ui/LoadingSpinner.d.ts +7 -3
  31. package/dist/components/ui/LoadingSpinner.js +19 -11
  32. package/dist/components/ui/Meter.d.ts +11 -0
  33. package/dist/components/ui/Meter.js +7 -0
  34. package/dist/components/ui/MetricCard.d.ts +11 -8
  35. package/dist/components/ui/MetricCard.js +18 -15
  36. package/dist/components/ui/PaginationBar.d.ts +3 -3
  37. package/dist/components/ui/PaginationBar.js +35 -33
  38. package/dist/components/ui/SideSheet.d.ts +4 -2
  39. package/dist/components/ui/SideSheet.js +64 -52
  40. package/dist/components/ui/Stack.d.ts +1 -1
  41. package/dist/components/ui/Tabs.d.ts +5 -1
  42. package/dist/components/ui/Tabs.js +23 -21
  43. package/dist/components/ui/Text.d.ts +19 -0
  44. package/dist/components/ui/Text.js +20 -0
  45. package/dist/components/ui/Toolbar.js +13 -13
  46. package/dist/core.css +105 -0
  47. package/dist/hooks/useFocusTrap.js +1 -1
  48. package/dist/index.d.ts +5 -0
  49. package/dist/index.js +134 -129
  50. package/dist/lib/calendar.d.ts +2 -0
  51. package/dist/lib/calendar.js +234 -229
  52. package/dist/styles.css +106 -0
  53. package/package.json +1 -1
package/dist/styles.css CHANGED
@@ -2869,6 +2869,32 @@ select:disabled + .ui-select-placeholder {
2869
2869
 
2870
2870
  /* Component defaults stay below consumer utilities in the cascade. */
2871
2871
  @layer components {
2872
+ .ui-toolbar-start {
2873
+ display: flex;
2874
+ flex: auto;
2875
+ }
2876
+ .ui-toolbar-start:empty {
2877
+ display: none;
2878
+ }
2879
+ .ui-toolbar-end {
2880
+ margin-inline-start: auto;
2881
+ }
2882
+ :where(.ui-toolbar-start, .ui-toolbar-end),
2883
+ :where(.ui-toolbar-start, .ui-toolbar-end) > * {
2884
+ max-width: 100%;
2885
+ }
2886
+ :where(.ui-toolbar-start, .ui-toolbar-end) > * {
2887
+ min-width: 0;
2888
+ }
2889
+
2890
+ @media (width < 640px) {
2891
+ /* The narrow layout takes precedence over the inline drag width and cap. */
2892
+ .ui-sheet-full-narrow {
2893
+ width: 100% !important;
2894
+ max-width: 100% !important;
2895
+ }
2896
+ }
2897
+
2872
2898
  @media (width < 40rem) {
2873
2899
  .ui-pagination-count:where(:not(:focus-within)) {
2874
2900
  clip-path: inset(50%);
@@ -3072,6 +3098,17 @@ select:disabled + .ui-select-placeholder {
3072
3098
  border: var(--ui-border-width, 1px) solid var(--border);
3073
3099
  border-radius: var(--ui-radius-md);
3074
3100
  background-color: var(--bg-table, transparent);
3101
+ inline-size: 100%;
3102
+ container: ui-table / inline-size;
3103
+ }
3104
+ @container ui-table (max-width: 32rem) {
3105
+ .ui-table-wrap
3106
+ > .ui-table
3107
+ > :is(thead, tbody, tfoot)
3108
+ > tr
3109
+ > .ui-table-low-priority {
3110
+ display: none !important;
3111
+ }
3075
3112
  }
3076
3113
  .ui-table {
3077
3114
  width: 100%;
@@ -3090,6 +3127,46 @@ select:disabled + .ui-select-placeholder {
3090
3127
  letter-spacing: var(--ui-tracking);
3091
3128
  text-transform: uppercase;
3092
3129
  }
3130
+ .ui-table-wrap-embedded {
3131
+ border: 0;
3132
+ border-radius: 0;
3133
+ background-color: transparent;
3134
+ }
3135
+ .ui-table-wrap-embedded > .ui-table:not(.ui-table-sticky) > .ui-table-head {
3136
+ background-color: transparent;
3137
+ }
3138
+ .ui-table-wrap-embedded > .ui-table > .ui-table-body > tr + tr {
3139
+ border-top: 0;
3140
+ }
3141
+ .ui-table-compact {
3142
+ font-size: var(--ui-control-font-size, var(--text-xs));
3143
+ }
3144
+ .ui-table-compact
3145
+ > :is(thead, tbody, tfoot)
3146
+ > tr
3147
+ > :is(th, td):not(.ui-table-empty-cell) {
3148
+ padding-inline: var(--ui-table-cell-padding-x, calc(var(--spacing) * 2));
3149
+ padding-block: var(--ui-table-cell-padding-y, calc(var(--spacing) * 1.5));
3150
+ }
3151
+ .ui-table-header-band > thead > tr > th {
3152
+ color: var(--text-primary);
3153
+ background-color: var(--bg-hover);
3154
+ font-size: inherit;
3155
+ letter-spacing: normal;
3156
+ text-transform: none;
3157
+ }
3158
+ :where(.theme-glass) .ui-table-header-band > thead > tr > th {
3159
+ background-color: var(--glass-solid-hover);
3160
+ }
3161
+ :where(
3162
+ .ui-table-striped > tbody > tr:nth-child(odd):not(.ui-table-empty-row)
3163
+ ) {
3164
+ background-color: var(--bg-active);
3165
+ }
3166
+ .ui-table-foot {
3167
+ border-top: var(--ui-border-width, 1px) solid var(--border);
3168
+ font-weight: 600;
3169
+ }
3093
3170
  .ui-table-sort-button {
3094
3171
  display: inline-flex;
3095
3172
  align-items: center;
@@ -3647,3 +3724,32 @@ button[data-pressed="true"][data-variant="link"] {
3647
3724
  button[data-variant="link"]:disabled:hover {
3648
3725
  text-decoration: none;
3649
3726
  }
3727
+
3728
+ .ui-heatmap {
3729
+ font-variant-numeric: tabular-nums;
3730
+ white-space: nowrap;
3731
+ }
3732
+ .ui-heatmap td[data-intensity] {
3733
+ text-align: center;
3734
+ background-color: color-mix(
3735
+ in srgb,
3736
+ var(--accent) var(--heatmap-tint, 0%),
3737
+ var(--bg-primary)
3738
+ );
3739
+ }
3740
+ .ui-heatmap td[data-intensity="1"] {
3741
+ --heatmap-tint: 10%;
3742
+ }
3743
+ .ui-heatmap td[data-intensity="2"] {
3744
+ --heatmap-tint: 20%;
3745
+ }
3746
+ .ui-heatmap td[data-intensity="3"] {
3747
+ --heatmap-tint: 30%;
3748
+ }
3749
+ .ui-heatmap td[data-intensity="4"] {
3750
+ --heatmap-tint: 40%;
3751
+ }
3752
+ .ui-heatmap td[data-intensity="missing"] {
3753
+ color: var(--text-secondary);
3754
+ background-color: var(--bg-secondary);
3755
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leonardaustin/ui",
3
- "version": "0.26.2",
3
+ "version": "0.28.0",
4
4
  "description": "Reusable React component library and application shell for Leonard Austin projects.",
5
5
  "license": "MIT",
6
6
  "type": "module",