@umriss-ui/core 0.27.0 → 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.
- package/CHANGELOG.md +16 -0
- package/README.md +1 -1
- package/dist/core.js +963 -963
- package/dist/index.d.ts +12 -5
- package/docs/llms-full.md +62 -10
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1085,19 +1085,26 @@ export declare interface GlyphProps extends Omit<SVGProps<SVGSVGElement>, "viewB
|
|
|
1085
1085
|
size?: number;
|
|
1086
1086
|
}
|
|
1087
1087
|
|
|
1088
|
-
/** Children in a grid: a fixed number of columns,
|
|
1089
|
-
`minItemWidth`. */
|
|
1088
|
+
/** Children in a grid: a fixed number of columns, a list of column widths,
|
|
1089
|
+
or as many columns as fit at `minItemWidth`. */
|
|
1090
1090
|
export declare const Grid: ForwardRefExoticComponent<GridProps & RefAttributes<HTMLDivElement>>;
|
|
1091
1091
|
|
|
1092
|
+
/** The width of one column in `Grid`'s list: a number in pixels, or
|
|
1093
|
+
`"fill"` for a share of what the other columns leave. */
|
|
1094
|
+
export declare type GridColumnWidth = number | "fill";
|
|
1095
|
+
|
|
1092
1096
|
/** The grid laid over an area. Two by two lines; the frame is missing on
|
|
1093
1097
|
purpose, otherwise it would be a window. */
|
|
1094
1098
|
export declare const GridGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
1095
1099
|
|
|
1096
1100
|
/** The props of `Grid`. */
|
|
1097
1101
|
export declare interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
1098
|
-
/**
|
|
1099
|
-
|
|
1100
|
-
|
|
1102
|
+
/** How many columns, all of one width - or a list with one width per
|
|
1103
|
+
column: a number in pixels, or `"fill"` for a share of what is left.
|
|
1104
|
+
Overridden by minItemWidth. */
|
|
1105
|
+
columns?: number | readonly GridColumnWidth[];
|
|
1106
|
+
/** Responsive: as many columns as fit at this minimum width; wins over
|
|
1107
|
+
`columns`, a list included. */
|
|
1101
1108
|
minItemWidth?: string;
|
|
1102
1109
|
/** Spacing as a step of the 4 px spacing steps (1–8); applies in both
|
|
1103
1110
|
directions. */
|
package/docs/llms-full.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @umriss-ui/core 0.
|
|
1
|
+
# @umriss-ui/core 0.28.0
|
|
2
2
|
|
|
3
3
|
> React component library for data-dense dashboards and tools - forms, date pickers, overlays, a tree view and a command palette. Precise, quiet, professional.
|
|
4
4
|
|
|
@@ -3034,8 +3034,8 @@ From `GridProps` — the full table stands on [Stack and Grid](#/stack-and-grid/
|
|
|
3034
3034
|
|
|
3035
3035
|
| Prop | Type | Default | Description |
|
|
3036
3036
|
|---|---|---|---|
|
|
3037
|
-
| [`columns`](#/stack-and-grid/GridProps-columns) | `number` | `2` |
|
|
3038
|
-
| [`minItemWidth`](#/stack-and-grid/GridProps-minItemWidth) | `string` | — | Responsive: as many columns as fit at this minimum width. |
|
|
3037
|
+
| [`columns`](#/stack-and-grid/GridProps-columns) | `number \| readonly `[`GridColumnWidth`](#/stack-and-grid/type-GridColumnWidth)`[]` | `2` | How many columns, all of one width - or a list with one width per column: a number in pixels, or `"fill"` for a share of what is left. Overridden by minItemWidth. |
|
|
3038
|
+
| [`minItemWidth`](#/stack-and-grid/GridProps-minItemWidth) | `string` | — | Responsive: as many columns as fit at this minimum width; wins over `columns`, a list included. |
|
|
3039
3039
|
| [`gap`](#/stack-and-grid/GridProps-gap) | [`SpaceStep`](#/stack-and-grid/type-SpaceStep)<br>`1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8` | `4` | Spacing as a step of the 4 px spacing steps (1–8); applies in both directions. |
|
|
3040
3040
|
|
|
3041
3041
|
From `CardHeaderProps` — the full table stands on [Card](#/card/type-CardHeaderProps).
|
|
@@ -4671,6 +4671,40 @@ export default function ColumnsByWidth() {
|
|
|
4671
4671
|
}
|
|
4672
4672
|
```
|
|
4673
4673
|
|
|
4674
|
+
##### Columns of their own widths
|
|
4675
|
+
|
|
4676
|
+
```tsx
|
|
4677
|
+
import { Card, CardBody, Grid, Text } from "@umriss-ui/core";
|
|
4678
|
+
|
|
4679
|
+
/* One cost centre's key figures, written out here so the example runs on its own. */
|
|
4680
|
+
const FIGURES = [
|
|
4681
|
+
{ label: "Cost centre", value: "CC-1200 · Marketing" },
|
|
4682
|
+
{ label: "Owner", value: "Rafael Ortiz" },
|
|
4683
|
+
{ label: "Monthly budget", value: "68,000\u00a0€" },
|
|
4684
|
+
{ label: "Spent, March", value: "77,500\u00a0€, 9,500\u00a0€ over budget" },
|
|
4685
|
+
{ label: "Approved by", value: "Helen Marsh, Sales" },
|
|
4686
|
+
];
|
|
4687
|
+
|
|
4688
|
+
export default function ColumnsOfTheirOwnWidths() {
|
|
4689
|
+
return (
|
|
4690
|
+
<Card style={{ maxWidth: 480 }}>
|
|
4691
|
+
<CardBody>
|
|
4692
|
+
<Grid columns={[140, "fill"]} gap={3}>
|
|
4693
|
+
{FIGURES.flatMap((figure) => [
|
|
4694
|
+
<Text key={`${figure.label} label`} size="sm" tone="muted">
|
|
4695
|
+
{figure.label}
|
|
4696
|
+
</Text>,
|
|
4697
|
+
<Text key={`${figure.label} value`} size="sm">
|
|
4698
|
+
{figure.value}
|
|
4699
|
+
</Text>,
|
|
4700
|
+
])}
|
|
4701
|
+
</Grid>
|
|
4702
|
+
</CardBody>
|
|
4703
|
+
</Card>
|
|
4704
|
+
);
|
|
4705
|
+
}
|
|
4706
|
+
```
|
|
4707
|
+
|
|
4674
4708
|
##### A tour summary
|
|
4675
4709
|
|
|
4676
4710
|
Stacks and grids nest: a column holds a header row, a grid of key figures and a row of actions.
|
|
@@ -4746,9 +4780,9 @@ Also takes every attribute of `<div>`.
|
|
|
4746
4780
|
|
|
4747
4781
|
| Prop | Type | Default | Description |
|
|
4748
4782
|
|---|---|---|---|
|
|
4749
|
-
| `columns` | `number` | `2` |
|
|
4750
|
-
| `minItemWidth` | `string` | — | Responsive: as many columns as fit at this minimum width.<br>Shown in: [Columns by width](#/stack-and-grid/columns-by-width), [A tour summary](#/stack-and-grid/a-tour-summary), [A dark region (Theming)](#/theming/a-dark-region) and 51 more |
|
|
4751
|
-
| `gap` | [`SpaceStep`](#type-SpaceStep)<br>`1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8` | `4` | Spacing as a step of the 4 px spacing steps (1–8); applies in both directions.<br>Shown in: [Fixed columns](#/stack-and-grid/fixed-columns), [Columns by width](#/stack-and-grid/columns-by-width), [
|
|
4783
|
+
| `columns` | `number \| readonly `[`GridColumnWidth`](#type-GridColumnWidth)`[]` | `2` | How many columns, all of one width - or a list with one width per column: a number in pixels, or `"fill"` for a share of what is left. Overridden by minItemWidth.<br>Shown in: [Fixed columns](#/stack-and-grid/fixed-columns), [Columns of their own widths](#/stack-and-grid/columns-of-their-own-widths), [A token for one region (Theming)](#/theming/a-token-for-one-region) and 3 more |
|
|
4784
|
+
| `minItemWidth` | `string` | — | Responsive: as many columns as fit at this minimum width; wins over `columns`, a list included.<br>Shown in: [Columns by width](#/stack-and-grid/columns-by-width), [A tour summary](#/stack-and-grid/a-tour-summary), [A dark region (Theming)](#/theming/a-dark-region) and 51 more |
|
|
4785
|
+
| `gap` | [`SpaceStep`](#type-SpaceStep)<br>`1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8` | `4` | Spacing as a step of the 4 px spacing steps (1–8); applies in both directions.<br>Shown in: [Fixed columns](#/stack-and-grid/fixed-columns), [Columns by width](#/stack-and-grid/columns-by-width), [Columns of their own widths](#/stack-and-grid/columns-of-their-own-widths) and 57 more |
|
|
4752
4786
|
|
|
4753
4787
|
Also takes every attribute of `<div>`.
|
|
4754
4788
|
|
|
@@ -4763,6 +4797,15 @@ A step of the spacing scale, from 1 (4 px) to 8 (40 px) - the tokens
|
|
|
4763
4797
|
type SpaceStep = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
4764
4798
|
```
|
|
4765
4799
|
|
|
4800
|
+
###### `GridColumnWidth`
|
|
4801
|
+
|
|
4802
|
+
The width of one column in `Grid`'s list: a number in pixels, or
|
|
4803
|
+
`"fill"` for a share of what the other columns leave.
|
|
4804
|
+
|
|
4805
|
+
```ts
|
|
4806
|
+
type GridColumnWidth = number | "fill";
|
|
4807
|
+
```
|
|
4808
|
+
|
|
4766
4809
|
#### Known limits
|
|
4767
4810
|
|
|
4768
4811
|
- No breakpoints and no responsive props: a grid follows the width through `minItemWidth`, anything else is your stylesheet's.
|
|
@@ -6350,9 +6393,9 @@ export default function IncidentSummary() {
|
|
|
6350
6393
|
| Prop | Type | Default | Description |
|
|
6351
6394
|
|---|---|---|---|
|
|
6352
6395
|
| `as` | `ElementType` | `"p"` | Element to render as.<br>Shown in: [Tones and weights](#/typography/tones-and-weights), [Set an incident summary](#/typography/incident-summary), [Use the language in your own components (Language)](#/language/own-components) and 16 more |
|
|
6353
|
-
| `size` | [`TextSize`](#type-TextSize)<br>`"xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `"md"` | Type size from the token set. It is independent of the element: a `p` may be small without becoming a different element.<br>Shown in: [Configurator](#/typography/configurator-typography), [Sizes](#/typography/sizes), [Tones and weights](#/typography/tones-and-weights) and
|
|
6396
|
+
| `size` | [`TextSize`](#type-TextSize)<br>`"xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `"md"` | Type size from the token set. It is independent of the element: a `p` may be small without becoming a different element.<br>Shown in: [Configurator](#/typography/configurator-typography), [Sizes](#/typography/sizes), [Tones and weights](#/typography/tones-and-weights) and 130 more |
|
|
6354
6397
|
| `weight` | [`TextWeight`](#type-TextWeight)<br>`"regular" \| "medium" \| "semibold"` | `"regular"` | Font weight from the token set.<br>Shown in: [Configurator](#/typography/configurator-typography), [Tones and weights](#/typography/tones-and-weights), [Tracking and leading](#/typography/tracking-and-leading) and 16 more |
|
|
6355
|
-
| `tone` | [`TextTone`](#type-TextTone)<br>`"default" \| "secondary" \| "muted"` | `"default"` | How loud the text is. `secondary` and `muted` step back without falling below the contrast threshold.<br>Shown in: [Configurator](#/typography/configurator-typography), [Tones and weights](#/typography/tones-and-weights), [Tracking and leading](#/typography/tracking-and-leading) and
|
|
6398
|
+
| `tone` | [`TextTone`](#type-TextTone)<br>`"default" \| "secondary" \| "muted"` | `"default"` | How loud the text is. `secondary` and `muted` step back without falling below the contrast threshold.<br>Shown in: [Configurator](#/typography/configurator-typography), [Tones and weights](#/typography/tones-and-weights), [Tracking and leading](#/typography/tracking-and-leading) and 95 more |
|
|
6356
6399
|
| `mono` | `boolean` | `false` | Geist Mono with tabular figures – for numbers and identifiers.<br>Shown in: [Configurator](#/typography/configurator-typography), [Numbers and identifiers](#/typography/numbers), [Handle long values](#/typography/long-values) and 30 more |
|
|
6357
6400
|
| `tracking` | [`TextTracking`](#type-TextTracking)<br>`"normal" \| "tight" \| "display" \| "caps"` | `"normal"` | Letter spacing from the token set. `caps` belongs with letterspaced capitals.<br>Shown in: [Configurator](#/typography/configurator-typography), [Tracking and leading](#/typography/tracking-and-leading), [Set an incident summary](#/typography/incident-summary) |
|
|
6358
6401
|
| `leading` | [`TextLeading`](#type-TextLeading)<br>`"normal" \| "tight"` | `"normal"` | Line spacing. `tight` for multi-line headings and key figures, where the normal spacing lets the lines fall apart.<br>Shown in: [Configurator](#/typography/configurator-typography), [Tracking and leading](#/typography/tracking-and-leading) |
|
|
@@ -18328,8 +18371,8 @@ function FormFieldBoundary({ children }: {
|
|
|
18328
18371
|
|
|
18329
18372
|
##### `Grid`
|
|
18330
18373
|
|
|
18331
|
-
[Stack and Grid](#/stack-and-grid) – Children in a grid: a fixed number of columns,
|
|
18332
|
-
`minItemWidth`.
|
|
18374
|
+
[Stack and Grid](#/stack-and-grid) – Children in a grid: a fixed number of columns, a list of column widths,
|
|
18375
|
+
or as many columns as fit at `minItemWidth`.
|
|
18333
18376
|
|
|
18334
18377
|
Used on [Scenarios](#/), [Theming](#/theming), [Sizes](#/sizes), [Language](#/language), [Stack and Grid](#/stack-and-grid), [Card](#/card), [Splitter](#/splitter), [Dock](#/dock), [Typography](#/typography), [Input](#/input), [FormField](#/formfield), [Textarea](#/textarea), [NumberInput](#/numberinput), [Slider](#/slider), [Checkbox](#/checkbox), [Switch](#/switch), [RadioGroup](#/radiogroup), [FileInput](#/fileinput), [Select](#/select), [Combobox](#/combobox), [MultiSelect](#/multiselect), [DatePicker](#/datepicker), [DateTimePicker](#/datetimepicker), [DateRangePicker](#/daterangepicker), [DateTimeRangePicker](#/datetimerangepicker), [Modal](#/modal), [Drawer](#/drawer), [CommandPalette](#/commandpalette), [Breadcrumb](#/breadcrumb), [Tabs](#/tabs), [TreeView](#/treeview), [Stat](#/stat) and [Meter](#/meter).
|
|
18335
18378
|
|
|
@@ -19596,6 +19639,15 @@ The props of a glyph: an SVG's attributes and its edge length.
|
|
|
19596
19639
|
|
|
19597
19640
|
Also takes every attribute of `<svg>` – without `children`, `viewBox`.
|
|
19598
19641
|
|
|
19642
|
+
##### `GridColumnWidth`
|
|
19643
|
+
|
|
19644
|
+
The width of one column in `Grid`'s list: a number in pixels, or
|
|
19645
|
+
`"fill"` for a share of what the other columns leave.
|
|
19646
|
+
|
|
19647
|
+
```ts
|
|
19648
|
+
type GridColumnWidth = number | "fill";
|
|
19649
|
+
```
|
|
19650
|
+
|
|
19599
19651
|
##### `GridProps`
|
|
19600
19652
|
|
|
19601
19653
|
Its table stands on [Stack and Grid](#/stack-and-grid/type-GridProps).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umriss-ui/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "React component library for data-dense dashboards and tools - forms, date pickers, overlays, a tree view and a command palette. Precise, quiet, professional.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Roman Händler",
|