@ultimat3/ui 20.1.6 → 20.2.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/src/index.ts CHANGED
@@ -57,20 +57,35 @@ export {
57
57
  } from './components/async-branch';
58
58
  export type { BadgeProps } from './components/Badge';
59
59
  export { Badge } from './components/Badge';
60
+ export type { BarChartProps } from './components/BarChart';
61
+ export { BarChart } from './components/BarChart';
60
62
  export type { BreadcrumbItem, BreadcrumbProps } from './components/Breadcrumb';
61
63
  export { Breadcrumb } from './components/Breadcrumb';
62
64
  export type { ButtonProps } from './components/Button';
63
65
  export { Button } from './components/Button';
66
+ export type { BarRect, ChartPoint } from './components/bar-chart-view';
67
+ export { BAR_CHART, barRects, GRID_STEPS, gridY, maxOf } from './components/bar-chart-view';
64
68
  export type { CardProps, Elevation } from './components/Card';
65
69
  export { Card } from './components/Card';
66
70
  export type { CheckboxProps } from './components/Checkbox';
67
71
  export { Checkbox } from './components/Checkbox';
68
72
  export type { ComboboxProps } from './components/Combobox';
69
73
  export { Combobox } from './components/Combobox';
74
+ export type { CommandPaletteLabels, CommandPaletteProps } from './components/CommandPalette';
75
+ export { CommandPalette } from './components/CommandPalette';
70
76
  export type { ContainerProps, ContainerSize } from './components/Container';
71
77
  export { Container } from './components/Container';
78
+ export type { CopyButtonProps } from './components/CopyButton';
79
+ export { COPIED_MS, CopyButton } from './components/CopyButton';
72
80
  export type { ComboboxOption } from './components/combobox-filter';
73
81
  export { COMBOBOX_LIMIT, filterOptions, normalizeQuery } from './components/combobox-filter';
82
+ export type { CommandPaletteItem, PaletteKeyAction } from './components/command-palette-view';
83
+ export {
84
+ filterItems,
85
+ keyAction,
86
+ settleActive,
87
+ stepActive,
88
+ } from './components/command-palette-view';
74
89
  export type { Column, DataTableProps } from './components/DataTable';
75
90
  export { DataTable } from './components/DataTable';
76
91
  export type { DateTimeProps } from './components/DateTime';
@@ -137,6 +152,8 @@ export type { ImageBox, ImageLoadingHints, ImageVariant } from './components/ima
137
152
  export { boxFor, loadingHints, ratioFor, srcsetFor } from './components/image-source';
138
153
  export type { LoadMoreInput, LoadMoreState } from './components/infinite-scroll-view';
139
154
  export { loadMoreState } from './components/infinite-scroll-view';
155
+ export type { KbdProps } from './components/Kbd';
156
+ export { Kbd } from './components/Kbd';
140
157
  export type { LinkProps } from './components/Link';
141
158
  export { Link } from './components/Link';
142
159
  export type { LocaleSwitcherProps } from './components/LocaleSwitcher';
@@ -145,8 +162,11 @@ export type { LinkTarget } from './components/link-target';
145
162
  export { linkTarget } from './components/link-target';
146
163
  export type { MenuItem, MenuProps } from './components/Menu';
147
164
  export { Menu } from './components/Menu';
165
+ export type { MeterProps } from './components/Meter';
166
+ export { Meter } from './components/Meter';
148
167
  export type { MoneyProps } from './components/Money';
149
168
  export { Money } from './components/Money';
169
+ export { meterShare, meterWidth } from './components/meter-view';
150
170
  export type { MoneyFormatter, MoneyInput, MoneyViewOptions } from './components/money-view';
151
171
  // --- formatting cores (pure, renderer-free) ----------------------------------
152
172
  export { moneyText, toMoney } from './components/money-view';
@@ -156,6 +176,10 @@ export type { PaginationProps } from './components/Pagination';
156
176
  export { Pagination } from './components/Pagination';
157
177
  export type { Placement, PopoverProps } from './components/Popover';
158
178
  export { Popover } from './components/Popover';
179
+ export type { QrCodeProps } from './components/QrCode';
180
+ export { QrCode } from './components/QrCode';
181
+ export type { QrMatrix } from './components/qr-matrix';
182
+ export { encodeQr } from './components/qr-matrix';
159
183
  export type { RadioOption, RadioProps } from './components/Radio';
160
184
  export { Radio } from './components/Radio';
161
185
  export type { RelativeTimeProps } from './components/RelativeTime';
@@ -168,14 +192,22 @@ export type { SelectOption, SelectProps } from './components/Select';
168
192
  export { Select } from './components/Select';
169
193
  export type { SkeletonProps } from './components/Skeleton';
170
194
  export { Skeleton } from './components/Skeleton';
195
+ export type { SparklineProps } from './components/Sparkline';
196
+ export { Sparkline } from './components/Sparkline';
171
197
  export type { SpinnerProps } from './components/Spinner';
172
198
  export { Spinner } from './components/Spinner';
173
199
  export type { StackProps } from './components/Stack';
174
200
  export { Stack } from './components/Stack';
201
+ export type { StatTileProps } from './components/StatTile';
202
+ export { StatTile } from './components/StatTile';
175
203
  export type { SwitchProps } from './components/Switch';
176
204
  export { Switch } from './components/Switch';
177
205
  export type { SortDirection, SortState } from './components/sort-state';
178
206
  export { ariaSortFor, nextSortState } from './components/sort-state';
207
+ export type { SparkPoint } from './components/sparkline-view';
208
+ export { SPARKLINE, sparklinePath, sparkPoints } from './components/sparkline-view';
209
+ export type { StatDelta, StatTrend } from './components/stat-delta';
210
+ export { DELTA_ARROW_PATH, deltaOf } from './components/stat-delta';
179
211
  export type { TableProps } from './components/Table';
180
212
  export { Table } from './components/Table';
181
213
  export type { TabItem, TabsProps } from './components/Tabs';
@@ -1,6 +1,11 @@
1
1
  // The blocking <head> snippet that kills the flash of wrong theme. Built from the
2
2
  // same constants as theme.ts so the two can never disagree. Server/build-only:
3
3
  // the hash is computed with Bun's hasher for the CSP header.
4
+ //
5
+ // DEPRECATED `As of 20.2.0`: the framework's boot inlines this script itself, from
6
+ // `@ultimat3/render`'s `themeScript({ fallback })` with `theme.defaultMode` in `app.config.ts` as
7
+ // the fallback, and admits it to the CSP — an app no longer writes either half. This module stays
8
+ // exported for one major so an app that inlined it by hand keeps building; it is removed in 21.
4
9
 
5
10
  import { runtimeMissingError } from '../errors';
6
11
  import { THEME_ATTRIBUTE, THEME_MEDIA_QUERY, THEME_STORAGE_KEY } from './theme';
@@ -8,6 +8,8 @@
8
8
  @use 'colors';
9
9
  @use 'motion';
10
10
  @use 'radius';
11
+ @use 'space';
12
+ @use 'typography';
11
13
 
12
14
  /// Keyboard-only focus, drawn from the accent role so it themes automatically.
13
15
  @mixin focus-ring($role: 'accent', $width: 2px, $offset: 2px) {
@@ -191,6 +193,34 @@
191
193
  }
192
194
  }
193
195
 
196
+ /// The mono family with tabular figures, for slugs, counts, timestamps, ids and URLs — data
197
+ /// whose columns must not wobble as the value changes. Lifted from an app that had restated
198
+ /// these two lines in six stylesheets before the catalog carried them.
199
+ @mixin data-text {
200
+ font-family: var(--font-mono);
201
+ font-variant-numeric: tabular-nums;
202
+ }
203
+
204
+ /// The section-label voice: smallest text step, medium weight, wide tracking, uppercase. An
205
+ /// eyebrow over a hero, a stat tile's label, a table's column head.
206
+ @mixin label-caps {
207
+ font-size: typography.text('xs');
208
+ font-weight: typography.weight('medium');
209
+ letter-spacing: typography.tracking('wide');
210
+ text-transform: uppercase;
211
+ }
212
+
213
+ /// A dot grid faded toward the top-left, where the text sits, over the soft background — the
214
+ /// "quietly technical" ground a hero or a dashboard main sits on. Two layers: the fade (so the
215
+ /// dots never compete with the copy) and the grid itself, pitched on one spacing step. Every
216
+ /// colour is a role, so it themes with the page.
217
+ @mixin dot-grid($pitch: space.space(5), $alpha: 0.55) {
218
+ background:
219
+ radial-gradient(ellipse 70% 90% at 0% 0%, colors.role('bg') 35%, transparent 100%),
220
+ radial-gradient(colors.role('line', $alpha) 1px, transparent 1px) 0 0 / $pitch $pitch,
221
+ colors.role('bg-soft');
222
+ }
223
+
194
224
  /// Inline run of items on one baseline — a toolbar, a header, an icon beside a label.
195
225
  @mixin row($gap: var(--space-3), $align: center, $justify: flex-start) {
196
226
  display: flex;
@@ -15,6 +15,13 @@
15
15
  padding: 0;
16
16
  }
17
17
 
18
+ // The `*` above outranks the UA stylesheet's `dialog { margin: auto }`, which is the ONLY thing
19
+ // that centres a modal `<dialog>` in its viewport — so every `Dialog` and every app dialog opened
20
+ // pinned to the top-left corner until the app restated the margin itself. Restated once, here.
21
+ dialog {
22
+ margin: auto;
23
+ }
24
+
18
25
  html {
19
26
  -webkit-text-size-adjust: 100%;
20
27
  text-size-adjust: 100%;