@openwarelabs/ui 0.1.1 → 0.3.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/README.md +2 -1
- package/dist/components/Avatar/Avatar.d.cts +13 -2
- package/dist/components/Avatar/Avatar.d.ts +13 -2
- package/dist/components/Avatar/AvatarGroup.d.cts +6 -5
- package/dist/components/Avatar/AvatarGroup.d.ts +6 -5
- package/dist/components/Steps/Steps.d.cts +1 -1
- package/dist/components/Steps/Steps.d.ts +1 -1
- package/dist/components/Table/Table.d.cts +6 -1
- package/dist/components/Table/Table.d.ts +6 -1
- package/dist/components/Text/Text.d.cts +26 -0
- package/dist/components/Text/Text.d.ts +26 -0
- package/dist/components/Tooltip/Tooltip.d.cts +3 -3
- package/dist/components/Tooltip/Tooltip.d.ts +3 -3
- package/dist/components.css +166 -22
- package/dist/hooks/useFloating.d.cts +2 -2
- package/dist/hooks/useFloating.d.ts +2 -2
- package/dist/index.cjs +616 -533
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +478 -395
- package/dist/index.js.map +4 -4
- package/dist/openware-ui.iife.js +6 -6
- package/dist/styles.css +170 -23
- package/dist/tailwind.css +1 -0
- package/dist/tokens.css +4 -1
- package/dist/tokens.json +12 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,10 +50,11 @@ import { Button, Field, Input, Toaster, toast } from "@openwarelabs/ui";
|
|
|
50
50
|
|
|
51
51
|
## Components
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
71 components, each with a page in the docs.
|
|
54
54
|
|
|
55
55
|
| Group | Components |
|
|
56
56
|
| --- | --- |
|
|
57
|
+
| Typography | `Text` (each style on the Typography page as a variant: hero to caption, code and kbd; tones, `truncate`, `as`) |
|
|
57
58
|
| Buttons | `Button` (primary, secondary, ghost, danger; sm, md, lg; `loading`; `shape="pill"`), `buttonClassName()` for links, `ButtonGroup`, `ToggleButton`, `CloseButton`, `CopyButton`, `SegmentedControl`, `ChoiceCard` |
|
|
58
59
|
| Forms | `Field`, `Fieldset`, `Input` (start and end content), `SearchField`, `NumberField`, `InputOTP`, `Textarea` (`autoGrow`), `Select`, `Combobox`, `Checkbox`, `CheckboxGroup`, `RadioGroup` (plain or cards), `Switch`, `Slider` (one value or a range), `ColorPicker`, `ColorField`, `FileDropZone` |
|
|
59
60
|
| Dates | `Calendar`, `DatePicker` |
|
|
@@ -1,14 +1,25 @@
|
|
|
1
|
+
import { type CSSProperties } from "react";
|
|
1
2
|
export interface AvatarProps {
|
|
2
3
|
/** The person's name; its initials show when there's no image. */
|
|
3
4
|
name: string;
|
|
4
5
|
/** A photo URL. If it fails to load, the initials show instead. */
|
|
5
6
|
src?: string;
|
|
6
|
-
/** sm 24px, md 28px, lg 36px.
|
|
7
|
+
/** sm 24px, md 28px, lg 36px, xl 48px, or any size in pixels, such as 96 for a team page. The initials scale with it.
|
|
7
8
|
* @default "md" */
|
|
8
|
-
size?:
|
|
9
|
+
size?: AvatarSize;
|
|
9
10
|
/** Give it when the avatar stands alone; beside the name, leave it out and it's hidden from screen readers. */
|
|
10
11
|
label?: string;
|
|
11
12
|
className?: string;
|
|
12
13
|
}
|
|
14
|
+
export type AvatarSize = "sm" | "md" | "lg" | "xl" | number;
|
|
15
|
+
/**
|
|
16
|
+
* The class and style that size an avatar: a named size's class, or a pixel size through --ow-avatar-size.
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function avatarSize(size: AvatarSize): {
|
|
20
|
+
className: string;
|
|
21
|
+
style?: CSSProperties;
|
|
22
|
+
pixels: number;
|
|
23
|
+
};
|
|
13
24
|
/** A round picture of a person: their photo, else their initials on the brand colour, else a person icon. */
|
|
14
25
|
export declare function Avatar({ name, src, size, label, className }: AvatarProps): import("react").JSX.Element;
|
|
@@ -1,14 +1,25 @@
|
|
|
1
|
+
import { type CSSProperties } from "react";
|
|
1
2
|
export interface AvatarProps {
|
|
2
3
|
/** The person's name; its initials show when there's no image. */
|
|
3
4
|
name: string;
|
|
4
5
|
/** A photo URL. If it fails to load, the initials show instead. */
|
|
5
6
|
src?: string;
|
|
6
|
-
/** sm 24px, md 28px, lg 36px.
|
|
7
|
+
/** sm 24px, md 28px, lg 36px, xl 48px, or any size in pixels, such as 96 for a team page. The initials scale with it.
|
|
7
8
|
* @default "md" */
|
|
8
|
-
size?:
|
|
9
|
+
size?: AvatarSize;
|
|
9
10
|
/** Give it when the avatar stands alone; beside the name, leave it out and it's hidden from screen readers. */
|
|
10
11
|
label?: string;
|
|
11
12
|
className?: string;
|
|
12
13
|
}
|
|
14
|
+
export type AvatarSize = "sm" | "md" | "lg" | "xl" | number;
|
|
15
|
+
/**
|
|
16
|
+
* The class and style that size an avatar: a named size's class, or a pixel size through --ow-avatar-size.
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function avatarSize(size: AvatarSize): {
|
|
20
|
+
className: string;
|
|
21
|
+
style?: CSSProperties;
|
|
22
|
+
pixels: number;
|
|
23
|
+
};
|
|
13
24
|
/** A round picture of a person: their photo, else their initials on the brand colour, else a person icon. */
|
|
14
25
|
export declare function Avatar({ name, src, size, label, className }: AvatarProps): import("react").JSX.Element;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import { type
|
|
2
|
+
import { type AvatarSize } from "./Avatar.cjs";
|
|
3
3
|
export interface AvatarGroupProps {
|
|
4
4
|
/** Avatars. */
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
/** Shows this many, then a "+3" count.
|
|
7
7
|
* @default 4 */
|
|
8
8
|
max?: number;
|
|
9
|
-
/** Applied to every avatar in the group.
|
|
9
|
+
/** Applied to every avatar in the group: a named size or pixels.
|
|
10
10
|
* @default "md" */
|
|
11
|
-
size?:
|
|
11
|
+
size?: AvatarSize;
|
|
12
12
|
/** Names the group for screen readers, e.g. "5 people on this project". */
|
|
13
13
|
label?: string;
|
|
14
14
|
className?: string;
|
|
@@ -20,8 +20,9 @@ export interface UserProps {
|
|
|
20
20
|
/** A second line: an email, a role. */
|
|
21
21
|
description?: ReactNode;
|
|
22
22
|
src?: string;
|
|
23
|
-
/**
|
|
24
|
-
|
|
23
|
+
/** The avatar's size; the name and gap grow with it from xl (48px) up.
|
|
24
|
+
* @default "md" */
|
|
25
|
+
size?: AvatarSize;
|
|
25
26
|
className?: string;
|
|
26
27
|
}
|
|
27
28
|
/** A person: avatar, name and a line about them, as in an account menu. */
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import { type
|
|
2
|
+
import { type AvatarSize } from "./Avatar.js";
|
|
3
3
|
export interface AvatarGroupProps {
|
|
4
4
|
/** Avatars. */
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
/** Shows this many, then a "+3" count.
|
|
7
7
|
* @default 4 */
|
|
8
8
|
max?: number;
|
|
9
|
-
/** Applied to every avatar in the group.
|
|
9
|
+
/** Applied to every avatar in the group: a named size or pixels.
|
|
10
10
|
* @default "md" */
|
|
11
|
-
size?:
|
|
11
|
+
size?: AvatarSize;
|
|
12
12
|
/** Names the group for screen readers, e.g. "5 people on this project". */
|
|
13
13
|
label?: string;
|
|
14
14
|
className?: string;
|
|
@@ -20,8 +20,9 @@ export interface UserProps {
|
|
|
20
20
|
/** A second line: an email, a role. */
|
|
21
21
|
description?: ReactNode;
|
|
22
22
|
src?: string;
|
|
23
|
-
/**
|
|
24
|
-
|
|
23
|
+
/** The avatar's size; the name and gap grow with it from xl (48px) up.
|
|
24
|
+
* @default "md" */
|
|
25
|
+
size?: AvatarSize;
|
|
25
26
|
className?: string;
|
|
26
27
|
}
|
|
27
28
|
/** A person: avatar, name and a line about them, as in an account menu. */
|
|
@@ -3,7 +3,7 @@ export interface StepItem {
|
|
|
3
3
|
title: ReactNode;
|
|
4
4
|
/** A line under the title. Hidden once the step is done, in the vertical layout. */
|
|
5
5
|
description?: ReactNode;
|
|
6
|
-
/** A control on the right of the current
|
|
6
|
+
/** A control on the right of the step while it's the current one, such as a small Button. Other steps don't show it. */
|
|
7
7
|
action?: ReactNode;
|
|
8
8
|
/** Overrides the status worked out from `current`. */
|
|
9
9
|
status?: "done" | "current" | "upcoming";
|
|
@@ -3,7 +3,7 @@ export interface StepItem {
|
|
|
3
3
|
title: ReactNode;
|
|
4
4
|
/** A line under the title. Hidden once the step is done, in the vertical layout. */
|
|
5
5
|
description?: ReactNode;
|
|
6
|
-
/** A control on the right of the current
|
|
6
|
+
/** A control on the right of the step while it's the current one, such as a small Button. Other steps don't show it. */
|
|
7
7
|
action?: ReactNode;
|
|
8
8
|
/** Overrides the status worked out from `current`. */
|
|
9
9
|
status?: "done" | "current" | "upcoming";
|
|
@@ -41,6 +41,11 @@ export interface TableProps<Row> {
|
|
|
41
41
|
selectedKeys?: Key[];
|
|
42
42
|
defaultSelectedKeys?: Key[];
|
|
43
43
|
onSelectionChange?(keys: Key[]): void;
|
|
44
|
+
/**
|
|
45
|
+
* Names a row for its checkbox, read out as "Select …": the person, the file, the project. Defaults to the
|
|
46
|
+
* first column's value when it's text or a number, else "row 3".
|
|
47
|
+
*/
|
|
48
|
+
rowLabel?(row: Row): string;
|
|
44
49
|
/** Shown in place of the rows when there are none, such as an EmptyState. */
|
|
45
50
|
emptyContent?: ReactNode;
|
|
46
51
|
/** `compact` rows are 36px; `comfortable` 44px.
|
|
@@ -52,4 +57,4 @@ export interface TableProps<Row> {
|
|
|
52
57
|
className?: string;
|
|
53
58
|
}
|
|
54
59
|
/** Rows of records with sortable columns and optional selection, in a bordered card. */
|
|
55
|
-
export declare function Table<Row extends object>({ columns, rows, rowKey, caption, hideCaption, sort, defaultSort, onSortChange, manualSort, selectionMode, selectedKeys, defaultSelectedKeys, onSelectionChange, emptyContent, density, stickyHeader, maxHeight, className, }: TableProps<Row>): import("react").JSX.Element;
|
|
60
|
+
export declare function Table<Row extends object>({ columns, rows, rowKey, caption, hideCaption, sort, defaultSort, onSortChange, manualSort, selectionMode, selectedKeys, defaultSelectedKeys, onSelectionChange, rowLabel, emptyContent, density, stickyHeader, maxHeight, className, }: TableProps<Row>): import("react").JSX.Element;
|
|
@@ -41,6 +41,11 @@ export interface TableProps<Row> {
|
|
|
41
41
|
selectedKeys?: Key[];
|
|
42
42
|
defaultSelectedKeys?: Key[];
|
|
43
43
|
onSelectionChange?(keys: Key[]): void;
|
|
44
|
+
/**
|
|
45
|
+
* Names a row for its checkbox, read out as "Select …": the person, the file, the project. Defaults to the
|
|
46
|
+
* first column's value when it's text or a number, else "row 3".
|
|
47
|
+
*/
|
|
48
|
+
rowLabel?(row: Row): string;
|
|
44
49
|
/** Shown in place of the rows when there are none, such as an EmptyState. */
|
|
45
50
|
emptyContent?: ReactNode;
|
|
46
51
|
/** `compact` rows are 36px; `comfortable` 44px.
|
|
@@ -52,4 +57,4 @@ export interface TableProps<Row> {
|
|
|
52
57
|
className?: string;
|
|
53
58
|
}
|
|
54
59
|
/** Rows of records with sortable columns and optional selection, in a bordered card. */
|
|
55
|
-
export declare function Table<Row extends object>({ columns, rows, rowKey, caption, hideCaption, sort, defaultSort, onSortChange, manualSort, selectionMode, selectedKeys, defaultSelectedKeys, onSelectionChange, emptyContent, density, stickyHeader, maxHeight, className, }: TableProps<Row>): import("react").JSX.Element;
|
|
60
|
+
export declare function Table<Row extends object>({ columns, rows, rowKey, caption, hideCaption, sort, defaultSort, onSortChange, manualSort, selectionMode, selectedKeys, defaultSelectedKeys, onSelectionChange, rowLabel, emptyContent, density, stickyHeader, maxHeight, className, }: TableProps<Row>): import("react").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { HTMLAttributes, JSX, ReactNode } from "react";
|
|
2
|
+
/** The text styles on the Typography page, by the same names: `lead` is the class ow-type-lead. */
|
|
3
|
+
export type TextVariant = "hero" | "page-title" | "section-title" | "heading" | "lead" | "prose" | "dialog-title" | "card-title" | "body" | "copy" | "label" | "button" | "caption" | "badge" | "overline" | "code" | "kbd";
|
|
4
|
+
export type TextTone = "default" | "soft" | "muted" | "primary" | "danger" | "success" | "warning";
|
|
5
|
+
export interface TextProps extends HTMLAttributes<HTMLElement> {
|
|
6
|
+
/** Which text style: size, leading, weight and tracking from the Typography page. The display styles shrink on phones.
|
|
7
|
+
* @default "body" */
|
|
8
|
+
variant?: TextVariant;
|
|
9
|
+
/** The element, for the page's outline. Defaults to one that suits the variant: h1 for hero and page-title, h2 for
|
|
10
|
+
* section-title, h3 for heading and the titles, p for running text, span for the rest. */
|
|
11
|
+
as?: keyof JSX.IntrinsicElements;
|
|
12
|
+
/** The colour. Left out, lead, copy, caption and overline are muted, as the styles ask, and the rest take the
|
|
13
|
+
* colour around them. */
|
|
14
|
+
tone?: TextTone;
|
|
15
|
+
/** @default "start" */
|
|
16
|
+
align?: "start" | "center" | "end";
|
|
17
|
+
/** One line, cut off with an ellipsis.
|
|
18
|
+
* @default false */
|
|
19
|
+
truncate?: boolean;
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Text in one of Openware's styles: `<Text variant="lead">`. The variant sets the look and a sensible element;
|
|
24
|
+
* `as` changes the element without changing the look, so the outline stays right.
|
|
25
|
+
*/
|
|
26
|
+
export declare function Text({ variant, as, tone, align, truncate, className, children, ...props }: TextProps): JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { HTMLAttributes, JSX, ReactNode } from "react";
|
|
2
|
+
/** The text styles on the Typography page, by the same names: `lead` is the class ow-type-lead. */
|
|
3
|
+
export type TextVariant = "hero" | "page-title" | "section-title" | "heading" | "lead" | "prose" | "dialog-title" | "card-title" | "body" | "copy" | "label" | "button" | "caption" | "badge" | "overline" | "code" | "kbd";
|
|
4
|
+
export type TextTone = "default" | "soft" | "muted" | "primary" | "danger" | "success" | "warning";
|
|
5
|
+
export interface TextProps extends HTMLAttributes<HTMLElement> {
|
|
6
|
+
/** Which text style: size, leading, weight and tracking from the Typography page. The display styles shrink on phones.
|
|
7
|
+
* @default "body" */
|
|
8
|
+
variant?: TextVariant;
|
|
9
|
+
/** The element, for the page's outline. Defaults to one that suits the variant: h1 for hero and page-title, h2 for
|
|
10
|
+
* section-title, h3 for heading and the titles, p for running text, span for the rest. */
|
|
11
|
+
as?: keyof JSX.IntrinsicElements;
|
|
12
|
+
/** The colour. Left out, lead, copy, caption and overline are muted, as the styles ask, and the rest take the
|
|
13
|
+
* colour around them. */
|
|
14
|
+
tone?: TextTone;
|
|
15
|
+
/** @default "start" */
|
|
16
|
+
align?: "start" | "center" | "end";
|
|
17
|
+
/** One line, cut off with an ellipsis.
|
|
18
|
+
* @default false */
|
|
19
|
+
truncate?: boolean;
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Text in one of Openware's styles: `<Text variant="lead">`. The variant sets the look and a sensible element;
|
|
24
|
+
* `as` changes the element without changing the look, so the outline stays right.
|
|
25
|
+
*/
|
|
26
|
+
export declare function Text({ variant, as, tone, align, truncate, className, children, ...props }: TextProps): JSX.Element;
|
|
@@ -4,15 +4,15 @@ export interface TooltipProps {
|
|
|
4
4
|
label: ReactNode;
|
|
5
5
|
/** The thing it explains: usually an icon-only Button with the same words as its aria-label. */
|
|
6
6
|
children: ReactNode;
|
|
7
|
-
/** Which side it prefers; it flips when there's no room.
|
|
7
|
+
/** Which side it prefers; it flips to the opposite side when there's no room. `right` suits icons in a folded sidebar.
|
|
8
8
|
* @default "top" */
|
|
9
|
-
placement?: "top" | "bottom";
|
|
9
|
+
placement?: "top" | "bottom" | "left" | "right";
|
|
10
10
|
/** Milliseconds of hovering before it shows. Moving to a neighbour while one is showing skips the wait.
|
|
11
11
|
* @default 400 */
|
|
12
12
|
delay?: number;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* A small dark label
|
|
15
|
+
* A small dark label beside its child (above, unless `placement` says otherwise) on hover or keyboard focus. It's for sighted users only: the child
|
|
16
16
|
* carries the same words for screen readers (an aria-label, or visually hidden text), so they aren't read twice.
|
|
17
17
|
* It sits in the top layer, so scroll areas and dialogs can't clip it.
|
|
18
18
|
*/
|
|
@@ -4,15 +4,15 @@ export interface TooltipProps {
|
|
|
4
4
|
label: ReactNode;
|
|
5
5
|
/** The thing it explains: usually an icon-only Button with the same words as its aria-label. */
|
|
6
6
|
children: ReactNode;
|
|
7
|
-
/** Which side it prefers; it flips when there's no room.
|
|
7
|
+
/** Which side it prefers; it flips to the opposite side when there's no room. `right` suits icons in a folded sidebar.
|
|
8
8
|
* @default "top" */
|
|
9
|
-
placement?: "top" | "bottom";
|
|
9
|
+
placement?: "top" | "bottom" | "left" | "right";
|
|
10
10
|
/** Milliseconds of hovering before it shows. Moving to a neighbour while one is showing skips the wait.
|
|
11
11
|
* @default 400 */
|
|
12
12
|
delay?: number;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* A small dark label
|
|
15
|
+
* A small dark label beside its child (above, unless `placement` says otherwise) on hover or keyboard focus. It's for sighted users only: the child
|
|
16
16
|
* carries the same words for screen readers (an aria-label, or visually hidden text), so they aren't read twice.
|
|
17
17
|
* It sits in the top layer, so scroll areas and dialogs can't clip it.
|
|
18
18
|
*/
|
package/dist/components.css
CHANGED
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
back into it. useFloating sets data-side and --ow-floating-origin; usePresence sets data-state. */
|
|
40
40
|
.ow-floating {
|
|
41
41
|
--ow-floating-shift: -4px;
|
|
42
|
+
--ow-floating-shift-x: 0px;
|
|
42
43
|
transform-origin: var(--ow-floating-origin, top center);
|
|
43
44
|
}
|
|
44
45
|
|
|
@@ -46,6 +47,16 @@
|
|
|
46
47
|
--ow-floating-shift: 4px;
|
|
47
48
|
}
|
|
48
49
|
|
|
50
|
+
.ow-floating[data-side="left"] {
|
|
51
|
+
--ow-floating-shift: 0px;
|
|
52
|
+
--ow-floating-shift-x: 4px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ow-floating[data-side="right"] {
|
|
56
|
+
--ow-floating-shift: 0px;
|
|
57
|
+
--ow-floating-shift-x: -4px;
|
|
58
|
+
}
|
|
59
|
+
|
|
49
60
|
.ow-floating[data-state="open"] {
|
|
50
61
|
animation: ow-floating-in var(--ow-duration-base) var(--ow-ease-emphasized);
|
|
51
62
|
}
|
|
@@ -58,14 +69,14 @@
|
|
|
58
69
|
@keyframes ow-floating-in {
|
|
59
70
|
from {
|
|
60
71
|
opacity: 0;
|
|
61
|
-
transform:
|
|
72
|
+
transform: translate(var(--ow-floating-shift-x), var(--ow-floating-shift)) scale(0.96);
|
|
62
73
|
}
|
|
63
74
|
}
|
|
64
75
|
|
|
65
76
|
@keyframes ow-floating-out {
|
|
66
77
|
to {
|
|
67
78
|
opacity: 0;
|
|
68
|
-
transform:
|
|
79
|
+
transform: translate(var(--ow-floating-shift-x), var(--ow-floating-shift)) scale(0.97);
|
|
69
80
|
}
|
|
70
81
|
}
|
|
71
82
|
|
|
@@ -94,6 +105,104 @@
|
|
|
94
105
|
}
|
|
95
106
|
}
|
|
96
107
|
|
|
108
|
+
/* components/Text/Text.css */
|
|
109
|
+
/* Text: the type styles from tokens.css as a component, with colours and the sizes the display styles take on phones. */
|
|
110
|
+
.ow-text {
|
|
111
|
+
margin: 0;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Titles balance their lines; running text avoids a lone last word. */
|
|
115
|
+
.ow-text--hero,
|
|
116
|
+
.ow-text--page-title,
|
|
117
|
+
.ow-text--section-title,
|
|
118
|
+
.ow-text--heading {
|
|
119
|
+
text-wrap: balance;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.ow-text--lead,
|
|
123
|
+
.ow-text--prose,
|
|
124
|
+
.ow-text--copy {
|
|
125
|
+
text-wrap: pretty;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.ow-text--lead {
|
|
129
|
+
max-width: 560px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.ow-text--overline {
|
|
133
|
+
text-transform: uppercase;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.ow-text--code,
|
|
137
|
+
.ow-text--kbd {
|
|
138
|
+
font-variant-ligatures: none;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.ow-text--default {
|
|
142
|
+
color: var(--ow-text);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.ow-text--soft {
|
|
146
|
+
color: var(--ow-text-soft);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.ow-text--muted {
|
|
150
|
+
color: var(--ow-text-muted);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.ow-text--primary {
|
|
154
|
+
color: var(--ow-primary-text);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.ow-text--danger {
|
|
158
|
+
color: var(--ow-danger-text);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.ow-text--success {
|
|
162
|
+
color: var(--ow-success-text);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.ow-text--warning {
|
|
166
|
+
color: var(--ow-warning-text);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.ow-text--center {
|
|
170
|
+
text-align: center;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.ow-text--center.ow-text--lead {
|
|
174
|
+
margin-inline: auto;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.ow-text--end {
|
|
178
|
+
text-align: end;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.ow-text--truncate {
|
|
182
|
+
overflow: hidden;
|
|
183
|
+
text-overflow: ellipsis;
|
|
184
|
+
white-space: nowrap;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* The display styles on phones, as the Typography page gives them. */
|
|
188
|
+
@media (max-width: 760px) {
|
|
189
|
+
.ow-text--hero {
|
|
190
|
+
font-size: 42px;
|
|
191
|
+
line-height: 1.02;
|
|
192
|
+
}
|
|
193
|
+
.ow-text--page-title {
|
|
194
|
+
font-size: 40px;
|
|
195
|
+
line-height: 1.06;
|
|
196
|
+
}
|
|
197
|
+
.ow-text--section-title {
|
|
198
|
+
font-size: 32px;
|
|
199
|
+
line-height: 1.12;
|
|
200
|
+
}
|
|
201
|
+
.ow-text--heading {
|
|
202
|
+
font-size: 21px;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
97
206
|
/* components/Spinner/Spinner.css */
|
|
98
207
|
/* Spinner: a ring with one coloured quarter, turning. */
|
|
99
208
|
.ow-spinner {
|
|
@@ -494,6 +603,8 @@
|
|
|
494
603
|
border-radius: var(--ow-radius-container);
|
|
495
604
|
background: var(--ow-track);
|
|
496
605
|
padding: var(--ow-space-2xs);
|
|
606
|
+
/* A hairline edge, so the well shows on the canvas as well as on a surface. */
|
|
607
|
+
box-shadow: inset 0 0 0 1px var(--ow-border);
|
|
497
608
|
}
|
|
498
609
|
|
|
499
610
|
.ow-segmented--full {
|
|
@@ -797,6 +908,8 @@
|
|
|
797
908
|
.ow-input-group {
|
|
798
909
|
display: flex;
|
|
799
910
|
width: 100%;
|
|
911
|
+
/* Shrink in a narrow grid or flex column instead of pushing past it. */
|
|
912
|
+
min-width: 0;
|
|
800
913
|
height: 40px;
|
|
801
914
|
align-items: center;
|
|
802
915
|
gap: var(--ow-space-sm);
|
|
@@ -843,6 +956,8 @@
|
|
|
843
956
|
}
|
|
844
957
|
|
|
845
958
|
.ow-input-group__input {
|
|
959
|
+
/* A percentage width lets the field's minimum size come from its start and end content alone. */
|
|
960
|
+
width: 100%;
|
|
846
961
|
min-width: 0;
|
|
847
962
|
height: 100%;
|
|
848
963
|
flex: 1;
|
|
@@ -1031,19 +1146,22 @@
|
|
|
1031
1146
|
|
|
1032
1147
|
.ow-option {
|
|
1033
1148
|
display: flex;
|
|
1034
|
-
min-height:
|
|
1149
|
+
min-height: 36px;
|
|
1035
1150
|
align-items: flex-start;
|
|
1036
1151
|
gap: var(--ow-space-sm);
|
|
1037
1152
|
border-radius: var(--ow-radius-lg);
|
|
1038
|
-
|
|
1153
|
+
/* 10 + a 16px line + 10: one line sits centred in the 36px row; a description just makes the row taller. */
|
|
1154
|
+
padding: var(--ow-space-md);
|
|
1039
1155
|
color: var(--ow-text);
|
|
1040
1156
|
font-size: 14px;
|
|
1041
|
-
line-height:
|
|
1157
|
+
line-height: 16px;
|
|
1042
1158
|
text-align: left;
|
|
1043
1159
|
cursor: pointer;
|
|
1044
1160
|
}
|
|
1045
1161
|
|
|
1046
1162
|
.ow-listbox--sm .ow-option {
|
|
1163
|
+
min-height: 32px;
|
|
1164
|
+
padding-block: var(--ow-space-sm);
|
|
1047
1165
|
font-size: 12px;
|
|
1048
1166
|
}
|
|
1049
1167
|
|
|
@@ -1064,11 +1182,11 @@
|
|
|
1064
1182
|
.ow-option__check {
|
|
1065
1183
|
display: flex;
|
|
1066
1184
|
width: 16px;
|
|
1185
|
+
/* As tall as the label's first line, so the tick sits level with it. */
|
|
1067
1186
|
height: 16px;
|
|
1068
1187
|
flex-shrink: 0;
|
|
1069
1188
|
align-items: center;
|
|
1070
1189
|
justify-content: center;
|
|
1071
|
-
padding-top: 2px;
|
|
1072
1190
|
color: var(--ow-primary-text);
|
|
1073
1191
|
}
|
|
1074
1192
|
|
|
@@ -1076,7 +1194,7 @@
|
|
|
1076
1194
|
display: grid;
|
|
1077
1195
|
min-width: 0;
|
|
1078
1196
|
flex: 1;
|
|
1079
|
-
gap: var(--ow-space-
|
|
1197
|
+
gap: var(--ow-space-2xs);
|
|
1080
1198
|
}
|
|
1081
1199
|
|
|
1082
1200
|
.ow-option__label {
|
|
@@ -1252,12 +1370,13 @@
|
|
|
1252
1370
|
cursor: pointer;
|
|
1253
1371
|
}
|
|
1254
1372
|
|
|
1373
|
+
/* Centred on the label's first line, whatever its line height. */
|
|
1255
1374
|
.ow-check-label .ow-checkbox--md {
|
|
1256
|
-
margin-top:
|
|
1375
|
+
margin-top: calc((1lh - 16px) / 2);
|
|
1257
1376
|
}
|
|
1258
1377
|
|
|
1259
1378
|
.ow-check-label .ow-checkbox--sm {
|
|
1260
|
-
margin-top:
|
|
1379
|
+
margin-top: calc((1lh - 14px) / 2);
|
|
1261
1380
|
}
|
|
1262
1381
|
|
|
1263
1382
|
.ow-check-label--disabled {
|
|
@@ -1267,7 +1386,7 @@
|
|
|
1267
1386
|
|
|
1268
1387
|
.ow-check-label__text {
|
|
1269
1388
|
display: grid;
|
|
1270
|
-
gap: var(--ow-space-
|
|
1389
|
+
gap: var(--ow-space-2xs);
|
|
1271
1390
|
}
|
|
1272
1391
|
|
|
1273
1392
|
.ow-check-label__description {
|
|
@@ -1449,7 +1568,7 @@
|
|
|
1449
1568
|
width: 16px;
|
|
1450
1569
|
height: 16px;
|
|
1451
1570
|
border-radius: var(--ow-radius-pill);
|
|
1452
|
-
background:
|
|
1571
|
+
background: var(--ow-knob);
|
|
1453
1572
|
box-shadow: var(--ow-shadow-control);
|
|
1454
1573
|
transform: translateX(2px);
|
|
1455
1574
|
transition:
|
|
@@ -1471,7 +1590,7 @@
|
|
|
1471
1590
|
}
|
|
1472
1591
|
|
|
1473
1592
|
/* components/Slider/Slider.css */
|
|
1474
|
-
/* Slider: native range inputs over a drawn track. The thumb is the switch's knob:
|
|
1593
|
+
/* Slider: native range inputs over a drawn track. The thumb is the switch's knob (ow-knob): round, with a soft shadow. */
|
|
1475
1594
|
.ow-slider {
|
|
1476
1595
|
display: grid;
|
|
1477
1596
|
gap: var(--ow-space-sm);
|
|
@@ -1562,7 +1681,7 @@
|
|
|
1562
1681
|
appearance: none;
|
|
1563
1682
|
border: 1px solid var(--ow-border-strong);
|
|
1564
1683
|
border-radius: 50%;
|
|
1565
|
-
background:
|
|
1684
|
+
background: var(--ow-knob);
|
|
1566
1685
|
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
|
|
1567
1686
|
pointer-events: auto;
|
|
1568
1687
|
cursor: grab;
|
|
@@ -1575,7 +1694,7 @@
|
|
|
1575
1694
|
height: 18px;
|
|
1576
1695
|
border: 1px solid var(--ow-border-strong);
|
|
1577
1696
|
border-radius: 50%;
|
|
1578
|
-
background:
|
|
1697
|
+
background: var(--ow-knob);
|
|
1579
1698
|
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
|
|
1580
1699
|
pointer-events: auto;
|
|
1581
1700
|
cursor: grab;
|
|
@@ -2185,7 +2304,7 @@
|
|
|
2185
2304
|
}
|
|
2186
2305
|
|
|
2187
2306
|
/* components/Tooltip/Tooltip.css */
|
|
2188
|
-
/* Tooltip: a small dark label in the top layer,
|
|
2307
|
+
/* Tooltip: a small dark label in the top layer, on the side of the child it prefers (or the other side when there's no room). */
|
|
2189
2308
|
.ow-tooltip {
|
|
2190
2309
|
display: inline-flex;
|
|
2191
2310
|
}
|
|
@@ -2197,7 +2316,7 @@
|
|
|
2197
2316
|
border: 0;
|
|
2198
2317
|
border-radius: var(--ow-radius-md);
|
|
2199
2318
|
background: var(--ow-tooltip);
|
|
2200
|
-
padding: var(--ow-space-
|
|
2319
|
+
padding: var(--ow-space-2xs) var(--ow-space-sm);
|
|
2201
2320
|
color: var(--ow-on-tooltip);
|
|
2202
2321
|
font-family: var(--ow-font-sans);
|
|
2203
2322
|
font-size: 12px;
|
|
@@ -2655,7 +2774,7 @@
|
|
|
2655
2774
|
display: grid;
|
|
2656
2775
|
min-width: 0;
|
|
2657
2776
|
flex: 1;
|
|
2658
|
-
gap: var(--ow-space-
|
|
2777
|
+
gap: var(--ow-space-2xs);
|
|
2659
2778
|
padding-top: 5px;
|
|
2660
2779
|
}
|
|
2661
2780
|
|
|
@@ -3180,7 +3299,7 @@
|
|
|
3180
3299
|
}
|
|
3181
3300
|
|
|
3182
3301
|
.ow-palette__group {
|
|
3183
|
-
padding: var(--ow-space-sm) var(--ow-space-sm) var(--ow-space-
|
|
3302
|
+
padding: var(--ow-space-sm) var(--ow-space-sm) var(--ow-space-2xs);
|
|
3184
3303
|
color: var(--ow-text-muted);
|
|
3185
3304
|
font-size: 11px;
|
|
3186
3305
|
font-weight: var(--ow-weight-control);
|
|
@@ -3439,7 +3558,7 @@
|
|
|
3439
3558
|
.ow-disclosure__titles {
|
|
3440
3559
|
display: grid;
|
|
3441
3560
|
min-width: 0;
|
|
3442
|
-
gap: var(--ow-space-
|
|
3561
|
+
gap: var(--ow-space-2xs);
|
|
3443
3562
|
}
|
|
3444
3563
|
|
|
3445
3564
|
.ow-disclosure__title {
|
|
@@ -3784,7 +3903,7 @@
|
|
|
3784
3903
|
display: grid;
|
|
3785
3904
|
min-width: 0;
|
|
3786
3905
|
flex: 1 1 160px;
|
|
3787
|
-
gap: var(--ow-space-
|
|
3906
|
+
gap: var(--ow-space-2xs);
|
|
3788
3907
|
}
|
|
3789
3908
|
|
|
3790
3909
|
.ow-steps__title {
|
|
@@ -3933,7 +4052,7 @@
|
|
|
3933
4052
|
|
|
3934
4053
|
.ow-choice__text {
|
|
3935
4054
|
display: grid;
|
|
3936
|
-
gap: var(--ow-space-
|
|
4055
|
+
gap: var(--ow-space-2xs);
|
|
3937
4056
|
}
|
|
3938
4057
|
|
|
3939
4058
|
.ow-choice__title {
|
|
@@ -3989,6 +4108,19 @@
|
|
|
3989
4108
|
font-size: 13px;
|
|
3990
4109
|
}
|
|
3991
4110
|
|
|
4111
|
+
.ow-avatar--xl {
|
|
4112
|
+
width: 48px;
|
|
4113
|
+
height: 48px;
|
|
4114
|
+
font-size: 17px;
|
|
4115
|
+
}
|
|
4116
|
+
|
|
4117
|
+
/* Any size in pixels, through --ow-avatar-size: the initials stay in proportion. */
|
|
4118
|
+
.ow-avatar--custom {
|
|
4119
|
+
width: var(--ow-avatar-size);
|
|
4120
|
+
height: var(--ow-avatar-size);
|
|
4121
|
+
font-size: calc(var(--ow-avatar-size) * 0.36);
|
|
4122
|
+
}
|
|
4123
|
+
|
|
3992
4124
|
.ow-avatar__image {
|
|
3993
4125
|
width: 100%;
|
|
3994
4126
|
height: 100%;
|
|
@@ -4025,6 +4157,18 @@
|
|
|
4025
4157
|
gap: var(--ow-space-md);
|
|
4026
4158
|
}
|
|
4027
4159
|
|
|
4160
|
+
.ow-user--xl {
|
|
4161
|
+
gap: var(--ow-space-lg);
|
|
4162
|
+
}
|
|
4163
|
+
|
|
4164
|
+
.ow-user--xl .ow-user__name {
|
|
4165
|
+
font-size: 15px;
|
|
4166
|
+
}
|
|
4167
|
+
|
|
4168
|
+
.ow-user--xl .ow-user__description {
|
|
4169
|
+
font-size: 13px;
|
|
4170
|
+
}
|
|
4171
|
+
|
|
4028
4172
|
.ow-user__text {
|
|
4029
4173
|
display: grid;
|
|
4030
4174
|
min-width: 0;
|
|
@@ -4869,7 +5013,7 @@
|
|
|
4869
5013
|
display: grid;
|
|
4870
5014
|
min-width: 0;
|
|
4871
5015
|
flex: 1 1 192px;
|
|
4872
|
-
gap: var(--ow-space-
|
|
5016
|
+
gap: var(--ow-space-2xs);
|
|
4873
5017
|
}
|
|
4874
5018
|
|
|
4875
5019
|
.ow-settings-row__label {
|