prime-ui-kit 0.11.0 → 0.12.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/bin/prime-ui-kit.js +0 -0
- package/dist/chunks/{chunk-GKX3QAUC.js → chunk-OTOIOHVE.js} +1 -1
- package/dist/chunks/{chunk-WDTSHOTD.js → chunk-VOZ7J72X.js} +7 -2
- package/dist/chunks/{chunk-CUH6DJ57.js → chunk-YJO3NJIJ.js} +716 -548
- package/dist/color-picker.js +2 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/components/list/List.d.ts +105 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -2
- package/dist/internal/VisuallyHidden.d.ts +6 -1
- package/dist/skill/api-contract.md +1 -1
- package/dist/skill/cheatsheet.md +1 -1
- package/dist/skill/choosing.md +4 -2
- package/dist/skill/components.md +2 -1
- package/dist/skill/composition.md +8 -0
- package/dist/skill/layouts.md +2 -1
- package/dist/skill/patterns/app-shell.module.css +18 -0
- package/dist/skill/patterns/app-shell.tsx +301 -0
- package/dist/skill/patterns/chat.module.css +0 -16
- package/dist/skill/patterns/chat.tsx +16 -19
- package/dist/skill/patterns/kanban-board.module.css +28 -0
- package/dist/skill/patterns/kanban-board.tsx +618 -0
- package/dist/skill/patterns/media-library.module.css +66 -0
- package/dist/skill/patterns/media-library.tsx +638 -0
- package/dist/skill/patterns/schedule.module.css +22 -0
- package/dist/skill/patterns/schedule.tsx +710 -0
- package/dist/skill/reference/components/file-upload/COMPONENT.md +3 -1
- package/dist/skill/reference/components/list/COMPONENT.md +180 -0
- package/dist/skill/reference/components/list/examples/as-link.tsx +37 -0
- package/dist/skill/reference/components/list/examples/examples.module.css +18 -0
- package/dist/skill/reference/components/list/examples/overflow.tsx +46 -0
- package/dist/skill/reference/components/list/examples/overview.tsx +63 -0
- package/dist/skill/reference/components/list/examples/sizes.tsx +35 -0
- package/dist/skill/reference/components/list/examples/states.tsx +27 -0
- package/dist/skill/reference/components/list/examples/with-icon.tsx +60 -0
- package/dist/skill/reference/components/page-content/COMPONENT.md +2 -2
- package/dist/skill/reference/components/page-content/examples/examples.module.css +5 -12
- package/dist/skill/reference/components/page-content/examples/list-detail.tsx +13 -18
- package/dist/skill/reference/components/visually-hidden/COMPONENT.md +6 -3
- package/dist/skill/reference/components/visually-hidden/examples/overview.tsx +2 -2
- package/package.json +3 -3
- package/src/components/file-upload/COMPONENT.md +3 -1
- package/src/components/list/COMPONENT.md +180 -0
- package/src/components/list/examples/as-link.tsx +37 -0
- package/src/components/list/examples/examples.module.css +18 -0
- package/src/components/list/examples/overflow.tsx +46 -0
- package/src/components/list/examples/overview.tsx +63 -0
- package/src/components/list/examples/sizes.tsx +35 -0
- package/src/components/list/examples/states.tsx +27 -0
- package/src/components/list/examples/with-icon.tsx +60 -0
- package/src/components/page-content/COMPONENT.md +2 -2
- package/src/components/page-content/examples/examples.module.css +5 -12
- package/src/components/page-content/examples/list-detail.tsx +13 -18
- package/src/components/visually-hidden/COMPONENT.md +6 -3
- package/src/components/visually-hidden/examples/overview.tsx +2 -2
package/dist/color-picker.js
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
ColorField,
|
|
5
5
|
ColorPicker,
|
|
6
6
|
parseColor
|
|
7
|
-
} from "./chunks/chunk-
|
|
8
|
-
import "./chunks/chunk-
|
|
7
|
+
} from "./chunks/chunk-OTOIOHVE.js";
|
|
8
|
+
import "./chunks/chunk-VOZ7J72X.js";
|
|
9
9
|
import "./chunks/chunk-Q3BFRQHZ.js";
|
|
10
10
|
export {
|
|
11
11
|
ColorField,
|
|
@@ -80,6 +80,8 @@ export type { LabelDescriptionProps, LabelIconProps, LabelLabels, LabelRootProps
|
|
|
80
80
|
export { Label } from "./label/Label";
|
|
81
81
|
export type { LinkButtonProps } from "./link-button/LinkButton";
|
|
82
82
|
export { LinkButton } from "./link-button/LinkButton";
|
|
83
|
+
export type { ListItemCountProps, ListItemDescriptionProps, ListItemIconProps, ListItemMetaProps, ListItemProps, ListItemTextProps, ListRootProps, } from "./list/List";
|
|
84
|
+
export { List } from "./list/List";
|
|
83
85
|
export type { LoginFormActionsProps, LoginFormBodyProps, LoginFormDescriptionProps, LoginFormFooterProps, LoginFormFormProps, LoginFormHeaderProps, LoginFormLogoProps, LoginFormRootProps, LoginFormTitleProps, } from "./login-form/LoginForm";
|
|
84
86
|
export { LoginForm } from "./login-form/LoginForm";
|
|
85
87
|
export type { MediaViewerItem, MediaViewerLabels, MediaViewerProps, } from "./media-viewer/MediaViewer";
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ControlSize, PaletteColor } from "../../internal/states";
|
|
3
|
+
export type ListRootProps = React.HTMLAttributes<HTMLUListElement> & {
|
|
4
|
+
/** Row tier: height, text, icon and avatar size; counts take one tier down. Default `m`. */
|
|
5
|
+
size?: ControlSize;
|
|
6
|
+
/** `List.Item`s. */
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
ref?: React.Ref<HTMLUListElement>;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* A selectable navigation list: the master half of a list + detail screen (conversations, tickets,
|
|
12
|
+
* mail, records). Rows are buttons or links; the open record is `current`.
|
|
13
|
+
*/
|
|
14
|
+
declare function ListRoot({ size, className, ...rest }: ListRootProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare namespace ListRoot {
|
|
16
|
+
var displayName: string;
|
|
17
|
+
}
|
|
18
|
+
export type ListItemIconProps = Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> & {
|
|
19
|
+
/** An `Avatar.Root` (sized by the row) or an `Icon`. */
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* The leading picture of a row: an avatar the slot sizes to the tier, or an icon. After the text
|
|
25
|
+
* it is a quiet trailing glyph. Decorative: the text names the row.
|
|
26
|
+
*/
|
|
27
|
+
declare function ListItemIcon({ className, ...rest }: ListItemIconProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
declare namespace ListItemIcon {
|
|
29
|
+
var displayName: string;
|
|
30
|
+
}
|
|
31
|
+
export type ListItemTextProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
32
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
33
|
+
};
|
|
34
|
+
/** The primary line: one line, truncated with an ellipsis. */
|
|
35
|
+
declare function ListItemText({ className, ...rest }: ListItemTextProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
declare namespace ListItemText {
|
|
37
|
+
var displayName: string;
|
|
38
|
+
}
|
|
39
|
+
export type ListItemDescriptionProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
40
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
41
|
+
};
|
|
42
|
+
/** The second line (a preview, a status): muted, smaller, truncated. */
|
|
43
|
+
declare function ListItemDescription({ className, ...rest }: ListItemDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
declare namespace ListItemDescription {
|
|
45
|
+
var displayName: string;
|
|
46
|
+
}
|
|
47
|
+
export type ListItemMetaProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
48
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
49
|
+
};
|
|
50
|
+
/** Small trailing text at the end of the first line: a time, a date, an amount. */
|
|
51
|
+
declare function ListItemMeta({ className, ...rest }: ListItemMetaProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
declare namespace ListItemMeta {
|
|
53
|
+
var displayName: string;
|
|
54
|
+
}
|
|
55
|
+
export type ListItemCountProps = Omit<React.HTMLAttributes<HTMLSpanElement>, "children" | "color"> & {
|
|
56
|
+
/** Badge hue. Default `gray`; a hue for what needs attention (unread). */
|
|
57
|
+
color?: PaletteColor;
|
|
58
|
+
/** The number (or a short status). */
|
|
59
|
+
children: React.ReactNode;
|
|
60
|
+
/** The Badge `<span>`. */
|
|
61
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
62
|
+
};
|
|
63
|
+
/** A count at the end of the row: a soft Badge one tier below the rows. */
|
|
64
|
+
declare function ListItemCount({ color, className, ...rest }: ListItemCountProps): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
declare namespace ListItemCount {
|
|
66
|
+
var displayName: string;
|
|
67
|
+
}
|
|
68
|
+
type ListItemOwnProps = {
|
|
69
|
+
/**
|
|
70
|
+
* The open record: the selected fill and `aria-current` — `"true"` on a button, `"page"` on a
|
|
71
|
+
* link (`href`, `asChild`). Links rendered by a router may set it themselves.
|
|
72
|
+
*/
|
|
73
|
+
current?: boolean;
|
|
74
|
+
disabled?: boolean;
|
|
75
|
+
/** Render the single child element (a router link) as the row; its children are the content. */
|
|
76
|
+
asChild?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Content and parts: `List.ItemIcon`, `List.ItemText`, `List.ItemDescription`, `List.ItemMeta`,
|
|
79
|
+
* `List.ItemCount`.
|
|
80
|
+
*/
|
|
81
|
+
children?: React.ReactNode;
|
|
82
|
+
};
|
|
83
|
+
export type ListItemProps = ListItemOwnProps & Omit<React.ComponentPropsWithoutRef<"button">, keyof ListItemOwnProps> & {
|
|
84
|
+
/** Renders an `<a>` instead of a `<button>`. */
|
|
85
|
+
href?: string;
|
|
86
|
+
target?: string;
|
|
87
|
+
rel?: string;
|
|
88
|
+
/** The `<button>`, `<a>` or the `asChild` element (not the `<li>`). */
|
|
89
|
+
ref?: React.Ref<HTMLElement>;
|
|
90
|
+
};
|
|
91
|
+
/** A row of the list: an `<li>` holding a full-width button or link. */
|
|
92
|
+
declare function ListItem({ current, disabled, asChild, href, className, children, onClick, type, ref, ...rest }: ListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
93
|
+
declare namespace ListItem {
|
|
94
|
+
var displayName: string;
|
|
95
|
+
}
|
|
96
|
+
export declare const List: {
|
|
97
|
+
Root: typeof ListRoot;
|
|
98
|
+
Item: typeof ListItem;
|
|
99
|
+
ItemIcon: typeof ListItemIcon;
|
|
100
|
+
ItemText: typeof ListItemText;
|
|
101
|
+
ItemDescription: typeof ListItemDescription;
|
|
102
|
+
ItemMeta: typeof ListItemMeta;
|
|
103
|
+
ItemCount: typeof ListItemCount;
|
|
104
|
+
};
|
|
105
|
+
export {};
|