@aortl/admin-react 0.16.2 → 0.18.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 +37 -1
- package/dist/Alert.d.ts +14 -2
- package/dist/Alert.d.ts.map +1 -1
- package/dist/Avatar.d.ts +26 -0
- package/dist/Avatar.d.ts.map +1 -0
- package/dist/Badge.d.ts +8 -2
- package/dist/Badge.d.ts.map +1 -1
- package/dist/BrandTile.d.ts +16 -3
- package/dist/BrandTile.d.ts.map +1 -1
- package/dist/Card.d.ts +12 -2
- package/dist/Card.d.ts.map +1 -1
- package/dist/Dialog.d.ts +4 -1
- package/dist/Dialog.d.ts.map +1 -1
- package/dist/Drawer.d.ts +51 -0
- package/dist/Drawer.d.ts.map +1 -0
- package/dist/Field.d.ts +4 -1
- package/dist/Field.d.ts.map +1 -1
- package/dist/Indicator.d.ts +3 -1
- package/dist/Indicator.d.ts.map +1 -1
- package/dist/Input.d.ts +24 -2
- package/dist/Input.d.ts.map +1 -1
- package/dist/Item.d.ts +55 -0
- package/dist/Item.d.ts.map +1 -0
- package/dist/Menu.d.ts +7 -5
- package/dist/Menu.d.ts.map +1 -1
- package/dist/NumberInput.d.ts +28 -0
- package/dist/NumberInput.d.ts.map +1 -0
- package/dist/Pagination.d.ts +4 -1
- package/dist/Pagination.d.ts.map +1 -1
- package/dist/PropertyList.d.ts +10 -3
- package/dist/PropertyList.d.ts.map +1 -1
- package/dist/Separator.d.ts +11 -0
- package/dist/Separator.d.ts.map +1 -0
- package/dist/Sidebar.d.ts +16 -5
- package/dist/Sidebar.d.ts.map +1 -1
- package/dist/StatCard.d.ts +16 -1
- package/dist/StatCard.d.ts.map +1 -1
- package/dist/Table.d.ts +15 -1
- package/dist/Table.d.ts.map +1 -1
- package/dist/Timeline.d.ts +29 -0
- package/dist/Timeline.d.ts.map +1 -0
- package/dist/Tooltip.d.ts +4 -1
- package/dist/Tooltip.d.ts.map +1 -1
- package/dist/admin.scoped.css +1072 -127
- package/dist/cn.d.ts +7 -0
- package/dist/cn.d.ts.map +1 -1
- package/dist/dialog-internal.d.ts +17 -0
- package/dist/dialog-internal.d.ts.map +1 -0
- package/dist/index.cjs +758 -103
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +12 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +750 -104
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,40 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.18.0] - 2026-06-16
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `classNames` prop for per-slot class overrides on shorthand components — reach inner elements the shorthand props render (`Card`, `StatCard`, `Alert`, `Item`, `Field`, `Dialog`, `Drawer`, `Timeline.Item`, `PropertyList`, `Input`, `NumberInput`, `Pagination`, `Sidebar.Item`/`SubItem`/`Collapsible`/`CollapseToggle`, `Tooltip`). Exports a `SlotClasses` type helper. (react)
|
|
12
|
+
- `Alert` dismiss button (`onDismiss` / `.alert-dismiss`). (both)
|
|
13
|
+
- `StatCard` `trend` slot with a directional caret and direction-independent intent color (`.stat-card-trend`). (both)
|
|
14
|
+
- `AvatarGroup` `max` overflow with a `+N` tile (`.avatar-more`). (both)
|
|
15
|
+
- `Indicator` `max` clamp for numeric labels (e.g. `99+`). (react)
|
|
16
|
+
- `Table` density (`compact`), an empty-state row (`Table.Empty` / `.table-empty`), and a pinned first column (`pinCol` / `.table-pin-col`). (both)
|
|
17
|
+
- `Menu` checkbox/radio items (`checked` / `.menu-item[aria-checked]` + `.menu-item-indicator`). (both)
|
|
18
|
+
- `Input` `clearable` button and a `PasswordInput` reveal toggle (`.input-action`). (both)
|
|
19
|
+
- `Item` and `ItemGroup` components / `.item` — compact list rows with media, content, and actions. (both)
|
|
20
|
+
- `Timeline` component / `.timeline` — vertical event rail with a numbered steps variant. (both)
|
|
21
|
+
- `Drawer` component / `.drawer` — edge-anchored panel sharing the `<dialog>` machinery. (both)
|
|
22
|
+
- `NumberInput` component / `.number-input` — numeric field with steppers over Base UI NumberField. (both)
|
|
23
|
+
|
|
24
|
+
## [0.17.0] - 2026-06-15
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- `Separator` component / `.separator` class — a styled `<hr>` with a vertical modifier. (both)
|
|
29
|
+
- `Avatar` and `AvatarGroup` / `.avatar` — image with a no-JS initials fallback, circle/square, `sm`/`md`/`lg`, plus `.indicator` auto-offsets for avatar anchors. (both)
|
|
30
|
+
- Badge soft tinted variants (`soft` / `.badge-soft`) and a dismissible remove button (`onRemove`, `removeLabel` / `.badge-remove`). (both)
|
|
31
|
+
- Alert trailing action slot (`action` / `Alert.Action` / `.alert-action`). (both)
|
|
32
|
+
- In-field input icons — `icon` / `iconTrailing` on `Input`, `.input-icon` wrapper. (both)
|
|
33
|
+
- Card media slot (`media` / `Card.Media` / `.card-media`) and scroll region (`scroll` on `Card.Container` / `.card-scroll`). (both)
|
|
34
|
+
- BrandTile `lg` size, soft tint variants, and bordered image tiles. (both)
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- `.link` inside an `.alert` inherits the variant's content color instead of the link blue. (css)
|
|
39
|
+
- `tfoot` rows are styled by default — semibold cells with a strong divider above the first footer row (previously unstyled). (css)
|
|
40
|
+
|
|
7
41
|
## [0.16.2] - 2026-06-11
|
|
8
42
|
|
|
9
43
|
- Add a changelog following the Keep a Changelog format.
|
|
@@ -45,10 +79,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
45
79
|
- Make `primary` a high-contrast neutral and move blue to `info`. (both)
|
|
46
80
|
- Use solid color fills for `Alert` and `Badge` status variants. (both)
|
|
47
81
|
|
|
48
|
-
[Unreleased]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.
|
|
82
|
+
[Unreleased]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.18.0...HEAD
|
|
49
83
|
[0.16.1]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.16.0...v0.16.1
|
|
50
84
|
[0.16.0]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.15.1...v0.16.0
|
|
51
85
|
[0.15.1]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.15.0...v0.15.1
|
|
52
86
|
[0.15.0]: https://github.com/Digital-Udvikling/admin-design-system/releases/tag/v0.15.0
|
|
53
87
|
|
|
88
|
+
[0.18.0]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.17.0...v0.18.0
|
|
89
|
+
[0.17.0]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.16.2...v0.17.0
|
|
54
90
|
[0.16.2]: https://github.com/Digital-Udvikling/admin-design-system/releases/tag/v0.16.2
|
package/dist/Alert.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
1
|
+
import { ComponentProps, MouseEventHandler, ReactNode } from 'react';
|
|
2
|
+
import { SlotClasses } from './cn';
|
|
2
3
|
import { IconProp } from './icon';
|
|
3
4
|
export type AlertVariant = "info" | "success" | "warning" | "danger";
|
|
4
5
|
export interface AlertProps extends Omit<ComponentProps<"div">, "title"> {
|
|
@@ -9,15 +10,26 @@ export interface AlertProps extends Omit<ComponentProps<"div">, "title"> {
|
|
|
9
10
|
title?: ReactNode;
|
|
10
11
|
/** Renders as `<Alert.Description>`. */
|
|
11
12
|
description?: ReactNode;
|
|
13
|
+
/** Trailing action. Renders as `<Alert.Action>` after children so reading order matches. */
|
|
14
|
+
action?: ReactNode;
|
|
15
|
+
/** Renders a trailing dismiss (×) button. The Alert stays stateless — the consumer hides or removes it. */
|
|
16
|
+
onDismiss?: MouseEventHandler<HTMLButtonElement>;
|
|
17
|
+
/** aria-label for the dismiss button. Default: "Dismiss". */
|
|
18
|
+
dismissLabel?: string;
|
|
19
|
+
/** Per-slot class overrides. `className` targets the root; these target inner slots. */
|
|
20
|
+
classNames?: SlotClasses<"title" | "description" | "action" | "dismiss">;
|
|
12
21
|
}
|
|
13
|
-
declare function AlertRoot({ variant, icon, title, description, className, role, children, ...rest }: AlertProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function AlertRoot({ variant, icon, title, description, action, onDismiss, dismissLabel, classNames, className, role, children, ...rest }: AlertProps): import("react/jsx-runtime").JSX.Element;
|
|
14
23
|
export type AlertTitleProps = ComponentProps<"strong">;
|
|
15
24
|
declare function AlertTitle({ className, ...rest }: AlertTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
16
25
|
export type AlertDescriptionProps = ComponentProps<"p">;
|
|
17
26
|
declare function AlertDescription({ className, ...rest }: AlertDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export type AlertActionProps = ComponentProps<"div">;
|
|
28
|
+
declare function AlertAction({ className, ...rest }: AlertActionProps): import("react/jsx-runtime").JSX.Element;
|
|
18
29
|
export declare const Alert: typeof AlertRoot & {
|
|
19
30
|
Title: typeof AlertTitle;
|
|
20
31
|
Description: typeof AlertDescription;
|
|
32
|
+
Action: typeof AlertAction;
|
|
21
33
|
};
|
|
22
34
|
export {};
|
|
23
35
|
//# sourceMappingURL=Alert.d.ts.map
|
package/dist/Alert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../src/Alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../src/Alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAM,KAAK,WAAW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gB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AACrD,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB,2CAE5D;AAED,eAAO,MAAM,KAAK;;;;CAIhB,CAAC"}
|
package/dist/Avatar.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
export type AvatarSize = "sm" | "md" | "lg";
|
|
3
|
+
export type AvatarShape = "circle" | "square";
|
|
4
|
+
export interface AvatarProps extends ComponentProps<"span"> {
|
|
5
|
+
src?: string;
|
|
6
|
+
alt?: string;
|
|
7
|
+
/** Fallback text, typically 1–3 letters. Ignored when `children` is given. */
|
|
8
|
+
initials?: string;
|
|
9
|
+
size?: AvatarSize;
|
|
10
|
+
shape?: AvatarShape;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Image avatar with an initials fallback. Initials show until the image loads
|
|
14
|
+
* (and again, React-only, if it errors); the vanilla CSS layers the `<img>`
|
|
15
|
+
* over the initials instead.
|
|
16
|
+
*/
|
|
17
|
+
export declare function Avatar({ src, alt, initials, size, shape, className, children, ...rest }: AvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export interface AvatarGroupProps extends ComponentProps<"div"> {
|
|
19
|
+
/** Cap the visible avatars; the rest collapse into a trailing "+N" tile. */
|
|
20
|
+
max?: number;
|
|
21
|
+
/** Size for the surplus tile — match the avatars inside. Default `"md"`. */
|
|
22
|
+
size?: AvatarSize;
|
|
23
|
+
}
|
|
24
|
+
/** Overlapping stack of avatars; later children paint on top. `max` caps the visible count. */
|
|
25
|
+
export declare function AvatarGroup({ max, size, className, children, ...rest }: AvatarGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../src/Avatar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,cAAc,EAAkB,MAAM,OAAO,CAAC;AAGtE,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC5C,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE9C,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,MAAM,CAAC;IACzD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,EACrB,GAAG,EACH,GAAG,EACH,QAAQ,EACR,IAAW,EACX,KAAgB,EAChB,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,WAAW,2CAcb;AAED,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC7D,4EAA4E;IAC5E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,+FAA+F;AAC/F,wBAAgB,WAAW,CAAC,EAAE,GAAG,EAAE,IAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB,2CAiB/F"}
|
package/dist/Badge.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
1
|
+
import { ComponentProps, MouseEventHandler } from 'react';
|
|
2
2
|
import { IconProp } from './icon';
|
|
3
3
|
export type BadgeVariant = "neutral" | "info" | "success" | "warning" | "danger" | "primary";
|
|
4
4
|
export type BadgeSize = "sm" | "md" | "lg";
|
|
@@ -7,6 +7,12 @@ export interface BadgeProps extends ComponentProps<"span"> {
|
|
|
7
7
|
size?: BadgeSize;
|
|
8
8
|
/** Leading icon. */
|
|
9
9
|
icon?: IconProp;
|
|
10
|
+
/** Tinted fill with accent text instead of the solid status fill. */
|
|
11
|
+
soft?: boolean;
|
|
12
|
+
/** Renders a trailing remove button. */
|
|
13
|
+
onRemove?: MouseEventHandler<HTMLButtonElement>;
|
|
14
|
+
/** aria-label for the remove button. Default: "Remove". */
|
|
15
|
+
removeLabel?: string;
|
|
10
16
|
}
|
|
11
|
-
export declare function Badge({ variant, size, icon, className, children, ...rest }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function Badge({ variant, size, icon, soft, onRemove, removeLabel, className, children, ...rest }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
12
18
|
//# sourceMappingURL=Badge.d.ts.map
|
package/dist/Badge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../src/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../src/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC7F,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAqB3C,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,MAAM,CAAC;IACxD,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,oBAAoB;IACpB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,qEAAqE;IACrE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,wCAAwC;IACxC,QAAQ,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IAChD,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,KAAK,CAAC,EACpB,OAAmB,EACnB,IAAW,EACX,IAAI,EACJ,IAAY,EACZ,QAAQ,EACR,WAAsB,EACtB,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,UAAU,2CA4BZ"}
|
package/dist/BrandTile.d.ts
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { IconProp } from './icon';
|
|
3
|
+
export type BrandTileVariant = "solid" | "soft" | "info" | "success" | "danger";
|
|
3
4
|
export interface BrandTileProps extends ComponentProps<"span"> {
|
|
4
|
-
/**
|
|
5
|
+
/** Tint treatment. `solid` is the accent fill; the rest are `*-muted` fills with a colored glyph. */
|
|
6
|
+
variant?: BrandTileVariant;
|
|
7
|
+
size?: "md" | "lg";
|
|
8
|
+
/** 1–2 letter monogram. Ignored if `icon` or `src` is provided. */
|
|
5
9
|
monogram?: string;
|
|
6
|
-
/** Icon component or element. Takes precedence over `monogram`. */
|
|
10
|
+
/** Icon component or element. Takes precedence over `monogram`, yields to `src`. */
|
|
7
11
|
icon?: IconProp;
|
|
12
|
+
/** Logo image source. Wins over `icon` and `monogram`, flipping the tile to a bordered surface. */
|
|
13
|
+
src?: string;
|
|
14
|
+
/** Alt text for the image tile. Defaults to `""` (decorative). */
|
|
15
|
+
alt?: string;
|
|
8
16
|
}
|
|
9
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Brand/system mark for the navbar — monogram, icon, or shop logo. Precedence
|
|
19
|
+
* is `src` > `icon` > `monogram`. Monogram/icon tiles are `aria-hidden`; image
|
|
20
|
+
* tiles expose `alt` to assistive tech instead.
|
|
21
|
+
*/
|
|
22
|
+
export declare function BrandTile({ variant, size, monogram, icon, src, alt, className, children, ...rest }: BrandTileProps): import("react/jsx-runtime").JSX.Element;
|
|
10
23
|
//# sourceMappingURL=BrandTile.d.ts.map
|
package/dist/BrandTile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrandTile.d.ts","sourceRoot":"","sources":["../src/BrandTile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEnD,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,MAAM,CAAC;IAC5D,
|
|
1
|
+
{"version":3,"file":"BrandTile.d.ts","sourceRoot":"","sources":["../src/BrandTile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEnD,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEhF,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,MAAM,CAAC;IAC5D,qGAAqG;IACrG,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oFAAoF;IACpF,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,mGAAmG;IACnG,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EACxB,OAAiB,EACjB,IAAW,EACX,QAAQ,EACR,IAAI,EACJ,GAAG,EACH,GAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,cAAc,2CAuBhB"}
|
package/dist/Card.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { SlotClasses } from './cn';
|
|
2
3
|
import { IconProp } from './icon';
|
|
3
4
|
export type CardVariant = "default" | "muted" | "primary" | "info" | "success" | "warning" | "danger";
|
|
4
5
|
export interface CardContainerProps extends ComponentProps<"div"> {
|
|
@@ -6,17 +7,21 @@ export interface CardContainerProps extends ComponentProps<"div"> {
|
|
|
6
7
|
variant?: CardVariant;
|
|
7
8
|
bordered?: boolean;
|
|
8
9
|
compact?: boolean;
|
|
10
|
+
/** Pins direct-child header/actions and scrolls the body. Set the height yourself. */
|
|
11
|
+
scroll?: boolean;
|
|
9
12
|
}
|
|
10
13
|
/**
|
|
11
14
|
* The bare `.card` container — no body, no title. Use this when you need to
|
|
12
15
|
* compose the internals yourself (e.g. a media block above the body).
|
|
13
16
|
*/
|
|
14
|
-
declare function CardContainer({ variant, bordered, compact, className, ...rest }: CardContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function CardContainer({ variant, bordered, compact, scroll, className, ...rest }: CardContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
15
18
|
export interface CardProps extends Omit<ComponentProps<"div">, "title"> {
|
|
16
19
|
/** Tinted surface + matching border. Defaults to the neutral surface. */
|
|
17
20
|
variant?: CardVariant;
|
|
18
21
|
bordered?: boolean;
|
|
19
22
|
compact?: boolean;
|
|
23
|
+
/** Full-bleed media rendered as `<Card.Media>` above the body. */
|
|
24
|
+
media?: ReactNode;
|
|
20
25
|
/** Leading icon for the title row. */
|
|
21
26
|
icon?: IconProp;
|
|
22
27
|
/** Renders as `<Card.Title>`. */
|
|
@@ -27,13 +32,17 @@ export interface CardProps extends Omit<ComponentProps<"div">, "title"> {
|
|
|
27
32
|
toolbar?: ReactNode;
|
|
28
33
|
/** Renders as `<Card.Actions>`. */
|
|
29
34
|
actions?: ReactNode;
|
|
35
|
+
/** Per-slot class overrides. `className` targets the root; these target inner slots. */
|
|
36
|
+
classNames?: SlotClasses<"media" | "body" | "header" | "toolbar" | "title" | "description" | "actions">;
|
|
30
37
|
}
|
|
31
38
|
/**
|
|
32
39
|
* Standard card: a `.card` container with a single `.card-body` that lays out
|
|
33
40
|
* an optional title (with icon), description, children, and actions. For
|
|
34
41
|
* anything outside that shape, use `<Card.Container>` and compose by hand.
|
|
35
42
|
*/
|
|
36
|
-
declare function CardRoot({ variant, bordered, compact, icon, title, description, toolbar, actions, className, children, ...rest }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
declare function CardRoot({ variant, bordered, compact, media, icon, title, description, toolbar, actions, className, classNames, children, ...rest }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export type CardMediaProps = ComponentProps<"div">;
|
|
45
|
+
declare function CardMedia({ className, ...rest }: CardMediaProps): import("react/jsx-runtime").JSX.Element;
|
|
37
46
|
export type CardBodyProps = ComponentProps<"div">;
|
|
38
47
|
declare function CardBody({ className, ...rest }: CardBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
39
48
|
export type CardHeaderProps = ComponentProps<"div">;
|
|
@@ -51,6 +60,7 @@ export type CardActionsProps = ComponentProps<"div">;
|
|
|
51
60
|
declare function CardActions({ className, ...rest }: CardActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
52
61
|
export declare const Card: typeof CardRoot & {
|
|
53
62
|
Container: typeof CardContainer;
|
|
63
|
+
Media: typeof CardMedia;
|
|
54
64
|
Body: typeof CardBody;
|
|
55
65
|
Header: typeof CardHeader;
|
|
56
66
|
Toolbar: typeof CardToolbar;
|
package/dist/Card.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../src/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
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AAC;AACvD,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,oBAAoB,2CAEpE;AAED,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AACrD,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB,2CAE5D;AAED,eAAO,MAAM,IAAI;;;;;;;;;CASf,CAAC"}
|
package/dist/Dialog.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { SlotClasses } from './cn';
|
|
2
3
|
import { IconProp } from './icon';
|
|
3
4
|
export type DialogSize = "sm" | "md" | "lg";
|
|
4
5
|
export type DialogClosedBy = "any" | "closerequest" | "none";
|
|
@@ -45,10 +46,12 @@ export interface DialogProps extends Omit<DialogContainerProps, "title" | "child
|
|
|
45
46
|
dismissible?: boolean;
|
|
46
47
|
/** aria-label for the close button. Default: `"Close"`. */
|
|
47
48
|
closeLabel?: string;
|
|
49
|
+
/** Per-slot class overrides. `className` targets the root; these target inner slots. */
|
|
50
|
+
classNames?: SlotClasses<"header" | "title" | "close" | "description" | "body" | "footer">;
|
|
48
51
|
children?: ReactNode;
|
|
49
52
|
}
|
|
50
53
|
/** Standard modal with shorthand-driven header/body/footer. For other shapes, compose `<Dialog.Container>` by hand. */
|
|
51
|
-
declare function DialogRoot({ icon, title, description, actions, dismissible, closeLabel, children, ...containerProps }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
declare function DialogRoot({ icon, title, description, actions, dismissible, closeLabel, classNames, children, ...containerProps }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
52
55
|
export declare const Dialog: typeof DialogRoot & {
|
|
53
56
|
Container: typeof DialogContainer;
|
|
54
57
|
Header: typeof DialogHeader;
|
package/dist/Dialog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":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xF,UAAU,CAAC,EAAE,WAAW,CAAC,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,QAAQ,CAAC,CAAC;IAC3F,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,uHAAuH;AACvH,iBAAS,UAAU,CAAC,EAClB,IAAI,EACJ,KAAK,EACL,WAAW,EACX,OAAO,EACP,WAAkB,EAClB,UAAoB,EACpB,UAAU,EACV,QAAQ,EACR,GAAG,cAAc,EAClB,EAAE,WAAW,2CA8Bb;AAED,eAAO,MAAM,MAAM;;;;;;;;CAQjB,CAAC"}
|
package/dist/Drawer.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { SlotClasses } from './cn';
|
|
3
|
+
import { DialogClosedBy } from './Dialog';
|
|
4
|
+
import { IconProp } from './icon';
|
|
5
|
+
export type DrawerSide = "start" | "end" | "bottom";
|
|
6
|
+
export type DrawerSize = "sm" | "md" | "lg";
|
|
7
|
+
export interface DrawerContainerProps extends Omit<ComponentProps<"dialog">, "open"> {
|
|
8
|
+
/** Controlled open state. Omit for uncontrolled (e.g. Invoker Commands). */
|
|
9
|
+
open?: boolean;
|
|
10
|
+
/** Fires when the drawer closes (Esc, backdrop, close button, form method="dialog"). */
|
|
11
|
+
onOpenChange?: (open: boolean) => void;
|
|
12
|
+
/** Which edge the panel anchors to. Default `"end"`. */
|
|
13
|
+
side?: DrawerSide;
|
|
14
|
+
/** Cross-axis extent. Default `"md"`. */
|
|
15
|
+
size?: DrawerSize;
|
|
16
|
+
/** Native `closedby` attribute. Default `"any"`. */
|
|
17
|
+
closedby?: DialogClosedBy;
|
|
18
|
+
}
|
|
19
|
+
/** The bare edge-anchored `<dialog>` primitive — for layouts the default `<Drawer>` doesn't fit. */
|
|
20
|
+
declare function DrawerContainer({ open, onOpenChange, side, size, closedby, className, children, ref: consumerRef, ...rest }: DrawerContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export interface DrawerProps extends Omit<DrawerContainerProps, "title" | "children"> {
|
|
22
|
+
/** Leading icon for the title row. */
|
|
23
|
+
icon?: IconProp;
|
|
24
|
+
/** Renders as `<Drawer.Title>`. */
|
|
25
|
+
title?: ReactNode;
|
|
26
|
+
/** Renders as `<Drawer.Description>`. */
|
|
27
|
+
description?: ReactNode;
|
|
28
|
+
/** Renders as `<Drawer.Footer>`. */
|
|
29
|
+
actions?: ReactNode;
|
|
30
|
+
/** Show the X close button in the header. Default `true`. */
|
|
31
|
+
dismissible?: boolean;
|
|
32
|
+
/** aria-label for the close button. Default `"Close"`. */
|
|
33
|
+
closeLabel?: string;
|
|
34
|
+
/** Per-slot class overrides. `className` targets the root; these target inner slots. */
|
|
35
|
+
classNames?: SlotClasses<"header" | "title" | "close" | "description" | "body" | "footer">;
|
|
36
|
+
children?: ReactNode;
|
|
37
|
+
}
|
|
38
|
+
/** Edge-anchored panel with shorthand-driven header/body/footer. For other shapes, compose `<Drawer.Container>`. */
|
|
39
|
+
declare function DrawerRoot({ icon, title, description, actions, dismissible, closeLabel, classNames, children, ...containerProps }: DrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
/** Shares the Dialog header/body/footer subparts; only the container differs. */
|
|
41
|
+
export declare const Drawer: typeof DrawerRoot & {
|
|
42
|
+
Container: typeof DrawerContainer;
|
|
43
|
+
Header: ({ className, ...rest }: import('./Dialog').DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
Title: ({ icon, className, children, ...rest }: import('./Dialog').DialogTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
Description: ({ className, ...rest }: import('./Dialog').DialogDescriptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
Body: ({ className, ...rest }: import('./Dialog').DialogBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
Footer: ({ className, ...rest }: import('./Dialog').DialogFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
CloseButton: ({ icon, className, children, onClick, type, "aria-label": ariaLabel, ...rest }: import('./Dialog').DialogCloseButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
};
|
|
50
|
+
export {};
|
|
51
|
+
//# sourceMappingURL=Drawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../src/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAM,KAAK,WAAW,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,EAAU,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAEvD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAGvC,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AACpD,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClF,4EAA4E;IAC5E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,wFAAwF;IACxF,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,wDAAwD;IACxD,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,yCAAyC;IACzC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED,oGAAoG;AACpG,iBAAS,eAAe,CAAC,EACvB,IAAI,EACJ,YAAY,EACZ,IAAY,EACZ,IAAW,EACX,QAAgB,EAChB,SAAS,EACT,QAAQ,EACR,GAAG,EAAE,WAAW,EAChB,GAAG,IAAI,EACR,EAAE,oBAAoB,2CAwBtB;AAED,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,UAAU,CAAC;IACnF,sCAAsC;IACtC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,mCAAmC;IACnC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,yCAAyC;IACzC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,oCAAoC;IACpC,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wFAAwF;IACxF,UAAU,CAAC,EAAE,WAAW,CAAC,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,QAAQ,CAAC,CAAC;IAC3F,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,oHAAoH;AACpH,iBAAS,UAAU,CAAC,EAClB,IAAI,EACJ,KAAK,EACL,WAAW,EACX,OAAO,EACP,WAAkB,EAClB,UAAoB,EACpB,UAAU,EACV,QAAQ,EACR,GAAG,cAAc,EAClB,EAAE,WAAW,2CA8Bb;AAED,iFAAiF;AACjF,eAAO,MAAM,MAAM;;;;;;;;CAQjB,CAAC"}
|
package/dist/Field.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Field as BaseField } from '@base-ui/react/field';
|
|
2
2
|
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
import { SlotClasses } from './cn';
|
|
3
4
|
export type FieldContainerProps = ComponentProps<typeof BaseField.Root>;
|
|
4
5
|
/** The bare `.field` container — for layouts the default `<Field>` doesn't fit. */
|
|
5
6
|
declare function FieldContainer({ className, ...rest }: FieldContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -18,9 +19,11 @@ export interface FieldProps extends FieldContainerProps {
|
|
|
18
19
|
required?: boolean;
|
|
19
20
|
/** Inline layout (`.field-row`) — control beside its label; pairs with switches and single checkboxes. */
|
|
20
21
|
inline?: boolean;
|
|
22
|
+
/** Per-slot class overrides. `className` targets the root; these target inner slots. */
|
|
23
|
+
classNames?: SlotClasses<"label" | "description" | "error">;
|
|
21
24
|
}
|
|
22
25
|
/** Standard field — label, control (`children`), description, error. For other shapes, compose `<Field.Container>` by hand. */
|
|
23
|
-
declare function FieldRoot({ label, description, error, required, inline, className, children, ...rest }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare function FieldRoot({ label, description, error, required, inline, className, classNames, children, ...rest }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
24
27
|
export type FieldLabelProps = ComponentProps<typeof BaseField.Label> & {
|
|
25
28
|
/** Renders a red asterisk after the label text via `data-required`. */
|
|
26
29
|
required?: boolean;
|
package/dist/Field.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../src/Field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../src/Field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAM,KAAK,WAAW,EAAE,MAAM,MAAM,CAAC;AAE5C,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AAExE,mFAAmF;AACnF,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,mBAAmB,2CAElE;AAED,MAAM,WAAW,UAAW,SAAQ,mBAA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* the visual corner of rounded anchors (e.g. `4` for `rounded-md`).
|
|
21
21
|
*/
|
|
22
22
|
offset?: number;
|
|
23
|
+
/** Clamp a numeric `label` to `${max}+` when it exceeds this value. */
|
|
24
|
+
max?: number;
|
|
23
25
|
}
|
|
24
|
-
export declare function Indicator({ label, variant, size, icon, placement, offset, className, "aria-label": ariaLabel, style: styleProp, children, ...rest }: IndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function Indicator({ label, variant, size, icon, placement, offset, max, className, "aria-label": ariaLabel, style: styleProp, children, ...rest }: IndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
25
27
|
//# sourceMappingURL=Indicator.d.ts.map
|
package/dist/Indicator.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Indicator.d.ts","sourceRoot":"","sources":["../src/Indicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAAS,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC5D,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAC7D,MAAM,MAAM,kBAAkB,GAAG,GAAG,iBAAiB,IAAI,mBAAmB,EAAE,CAAC;AAE/E,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC3D,0EAA0E;IAC1E,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,uEAAuE;IACvE,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,oEAAoE;IACpE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,4EAA4E;IAC5E,IAAI,CAAC,EAAE,QAAQ,CAAC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,cAAc,2CA2ChB"}
|
package/dist/Input.d.ts
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
import { Input as BaseInput } from '@base-ui/react/input';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
2
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
import { SlotClasses } from './cn';
|
|
4
|
+
import { IconProp } from './icon';
|
|
3
5
|
export type InputVariant = "bordered" | "ghost" | "danger" | "info" | "success" | "warning";
|
|
4
6
|
export type InputSize = "sm" | "md" | "lg";
|
|
5
7
|
type BaseInputProps = Omit<ComponentProps<typeof BaseInput>, "size">;
|
|
6
8
|
export interface InputProps extends BaseInputProps {
|
|
7
9
|
variant?: InputVariant;
|
|
8
10
|
inputSize?: InputSize;
|
|
11
|
+
/** Leading icon, floated inside the field. Pass a component (`icon={IconSearch}`) or an element. */
|
|
12
|
+
icon?: IconProp;
|
|
13
|
+
/** Trailing icon, floated inside the field. Pass a component (`iconTrailing={IconX}`) or an element. */
|
|
14
|
+
iconTrailing?: IconProp;
|
|
15
|
+
/** Show a trailing clear (×) button while the field holds a value. */
|
|
16
|
+
clearable?: boolean;
|
|
17
|
+
/** aria-label for the clear button. Default `"Clear"`. */
|
|
18
|
+
clearLabel?: string;
|
|
19
|
+
/** Called after the clear button empties the field. */
|
|
20
|
+
onClear?: () => void;
|
|
21
|
+
/** Custom interactive trailing control (style it `.input-action`), e.g. a reveal toggle. */
|
|
22
|
+
action?: ReactNode;
|
|
23
|
+
/** Per-slot class overrides. `className` targets the root; these target inner slots. */
|
|
24
|
+
classNames?: SlotClasses<"wrapper" | "action">;
|
|
9
25
|
}
|
|
10
|
-
export declare function Input({ variant, inputSize, className, type, ...rest }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function Input({ variant, inputSize, icon, iconTrailing, clearable, clearLabel, onClear, action, className, classNames, type, value, defaultValue, onChange, disabled, readOnly, ref: consumerRef, ...rest }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export interface PasswordInputProps extends Omit<InputProps, "type" | "action" | "clearable" | "onClear" | "clearLabel"> {
|
|
28
|
+
/** aria-label for the reveal toggle. Default `"Show password"`. */
|
|
29
|
+
revealLabel?: string;
|
|
30
|
+
}
|
|
31
|
+
/** Password field with a trailing reveal toggle. Emits the same `.input` / `.input-action` classes. */
|
|
32
|
+
export declare function PasswordInput({ revealLabel, classNames, ...rest }: PasswordInputProps): import("react/jsx-runtime").JSX.Element;
|
|
11
33
|
export {};
|
|
12
34
|
//# sourceMappingURL=Input.d.ts.map
|
package/dist/Input.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../src/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../src/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAiC,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3F,OAAO,EAAM,KAAK,WAAW,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;AAC5F,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C,KAAK,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC;AAKrE,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,oGAAoG;IACpG,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,wGAAwG;IACxG,YAAY,CAAC,EAAE,QAAQ,CAAC;IACxB,sEAAsE;IACtE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,4FAA4F;IAC5F,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,wFAAwF;IACxF,UAAU,CAAC,EAAE,WAAW,CAAC,SAAS,GAAG,QAAQ,CAAC,CAAC;CAChD;AAqBD,wBAAgB,KAAK,CAAC,EACpB,OAAoB,EACpB,SAAgB,EAChB,IAAI,EACJ,YAAY,EACZ,SAAiB,EACjB,UAAoB,EACpB,OAAO,EACP,MAAM,EACN,SAAS,EACT,UAAU,EACV,IAAa,EACb,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,GAAG,EAAE,WAAW,EAChB,GAAG,IAAI,EACR,EAAE,UAAU,2CAkFZ;AAyCD,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAC9C,UAAU,EACV,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,GAAG,YAAY,CAC3D;IACC,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,uGAAuG;AACvG,wBAAgB,aAAa,CAAC,EAC5B,WAA6B,EAC7B,UAAU,EACV,GAAG,IAAI,EACR,EAAE,kBAAkB,2CAoBpB"}
|
package/dist/Item.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { SlotClasses } from './cn';
|
|
3
|
+
import { IconProp } from './icon';
|
|
4
|
+
export type ItemVariant = "default" | "outline" | "muted";
|
|
5
|
+
export type ItemSize = "sm" | "md" | "lg";
|
|
6
|
+
export interface ItemContainerProps extends ComponentProps<"div"> {
|
|
7
|
+
variant?: ItemVariant;
|
|
8
|
+
size?: ItemSize;
|
|
9
|
+
/** Expand the first nested link to fill the whole row (and add hover/focus affordance). */
|
|
10
|
+
asLink?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** The bare row primitive — just the `.item` shell, for layouts the default `<Item>` doesn't fit. */
|
|
13
|
+
declare function ItemContainer({ variant, size, asLink, className, ...rest }: ItemContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export type ItemMediaProps = ComponentProps<"div">;
|
|
15
|
+
declare function ItemMedia({ className, ...rest }: ItemMediaProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export type ItemContentProps = ComponentProps<"div">;
|
|
17
|
+
declare function ItemContent({ className, ...rest }: ItemContentProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export type ItemTitleProps = ComponentProps<"div">;
|
|
19
|
+
declare function ItemTitle({ className, ...rest }: ItemTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export type ItemDescriptionProps = ComponentProps<"div">;
|
|
21
|
+
declare function ItemDescription({ className, ...rest }: ItemDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export type ItemActionsProps = ComponentProps<"div">;
|
|
23
|
+
declare function ItemActions({ className, ...rest }: ItemActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export interface ItemProps extends Omit<ItemContainerProps, "title"> {
|
|
25
|
+
/** Leading media (avatar, thumbnail). Takes precedence over `icon`. */
|
|
26
|
+
media?: ReactNode;
|
|
27
|
+
/** Leading icon, rendered inside `.item-media`. */
|
|
28
|
+
icon?: IconProp;
|
|
29
|
+
/** Primary line. */
|
|
30
|
+
title?: ReactNode;
|
|
31
|
+
/** Secondary line under the title. */
|
|
32
|
+
description?: ReactNode;
|
|
33
|
+
/** Trailing controls, pinned to the row's end. */
|
|
34
|
+
actions?: ReactNode;
|
|
35
|
+
/** Per-slot class overrides. `className` targets the root; these target inner slots. */
|
|
36
|
+
classNames?: SlotClasses<"media" | "content" | "title" | "description" | "actions">;
|
|
37
|
+
}
|
|
38
|
+
/** Opinionated row with media / title+description / actions shorthand. For other shapes, compose `<Item.Container>`. */
|
|
39
|
+
declare function ItemRoot({ media, icon, title, description, actions, classNames, children, ...rest }: ItemProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export interface ItemGroupProps extends ComponentProps<"div"> {
|
|
41
|
+
/** Wrap the stack in a rounded border. */
|
|
42
|
+
bordered?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/** Divided vertical stack of items. */
|
|
45
|
+
export declare function ItemGroup({ bordered, className, ...rest }: ItemGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare const Item: typeof ItemRoot & {
|
|
47
|
+
Container: typeof ItemContainer;
|
|
48
|
+
Media: typeof ItemMedia;
|
|
49
|
+
Content: typeof ItemContent;
|
|
50
|
+
Title: typeof ItemTitle;
|
|
51
|
+
Description: typeof ItemDescription;
|
|
52
|
+
Actions: typeof ItemActions;
|
|
53
|
+
};
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=Item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../src/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAM,KAAK,WAAW,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEnD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAC1D,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE1C,MAAM,WAAW,kBAAmB,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC/D,OAAO,CAAC,EA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,kDAAkD;IAClD,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,wFAAwF;IACxF,UAAU,CAAC,EAAE,WAAW,CAAC,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,GAAG,SAAS,CAAC,CAAC;CACrF;AAED,wHAAwH;AACxH,iBAAS,QAAQ,CAAC,EAChB,KAAK,EACL,IAAI,EACJ,KAAK,EACL,WAAW,EACX,OAAO,EACP,UAAU,EACV,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,SAAS,2CAsBX;AAED,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC3D,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AACD,uCAAuC;AACvC,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,2CAIzE;AAED,eAAO,MAAM,IAAI;;;;;;;CAOf,CAAC"}
|
package/dist/Menu.d.ts
CHANGED
|
@@ -6,17 +6,19 @@ export type MenuTriggerProps = ComponentProps<"summary">;
|
|
|
6
6
|
declare function MenuTrigger({ className, ...rest }: MenuTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export type MenuPopupProps = ComponentProps<"div">;
|
|
8
8
|
declare function MenuPopup({ className, role, ...rest }: MenuPopupProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
interface
|
|
9
|
+
interface MenuItemExtras {
|
|
10
10
|
/** Keyboard shortcut (`useHotkey` syntax) — synthesizes a click; shown right-pinned in the row. */
|
|
11
11
|
hotkey?: string | readonly string[];
|
|
12
|
+
/** Leading icon. Replaced by the check indicator when `checked` is set. */
|
|
13
|
+
icon?: IconProp;
|
|
14
|
+
/** Render as a checkable item: shows a leading check when `true`, reserves the gutter when `false`. Set `role="menuitemradio"` for single-select groups. */
|
|
15
|
+
checked?: boolean;
|
|
12
16
|
}
|
|
13
|
-
type MenuItemAsButton = ComponentProps<"button"> &
|
|
17
|
+
type MenuItemAsButton = ComponentProps<"button"> & MenuItemExtras & {
|
|
14
18
|
href?: undefined;
|
|
15
|
-
icon?: IconProp;
|
|
16
19
|
};
|
|
17
|
-
type MenuItemAsLink = ComponentProps<"a"> &
|
|
20
|
+
type MenuItemAsLink = ComponentProps<"a"> & MenuItemExtras & {
|
|
18
21
|
href: string;
|
|
19
|
-
icon?: IconProp;
|
|
20
22
|
};
|
|
21
23
|
export type MenuItemProps = MenuItemAsButton | MenuItemAsLink;
|
|
22
24
|
declare function MenuItem(props: MenuItemProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/Menu.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../src/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,cAAc,EAAY,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAInD,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;AAElD,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,2CAElD;AAED,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;AAEzD,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB,2CAE5D;AAED,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEnD,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,IAAa,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,2CAEvE;AAED,UAAU,
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../src/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,cAAc,EAAY,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAc,KAAK,QAAQ,EAAE,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AC,EAAE,SAAS,EAAE,IAAc,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,2CAExE;AAED,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAExD,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,mBAAmB,2CAElE;AAED,eAAO,MAAM,IAAI;;;;;;;CAOf,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { NumberField } from '@base-ui/react/number-field';
|
|
2
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
import { SlotClasses } from './cn';
|
|
4
|
+
export type NumberInputSize = "sm" | "md" | "lg";
|
|
5
|
+
export interface NumberInputProps extends ComponentProps<typeof NumberField.Root> {
|
|
6
|
+
size?: NumberInputSize;
|
|
7
|
+
/** Per-slot class overrides. `className` targets the root; these target inner slots. */
|
|
8
|
+
classNames?: SlotClasses<"group" | "decrement" | "input" | "increment">;
|
|
9
|
+
/** Input placeholder. */
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
/** aria-label for the field when there's no associated `<label>`. */
|
|
12
|
+
inputAriaLabel?: string;
|
|
13
|
+
/** aria-label for the decrement button. Default `"Decrease"`. */
|
|
14
|
+
decrementLabel?: string;
|
|
15
|
+
/** aria-label for the increment button. Default `"Increase"`. */
|
|
16
|
+
incrementLabel?: string;
|
|
17
|
+
/** Override the decrement button content. */
|
|
18
|
+
decrementIcon?: ReactNode;
|
|
19
|
+
/** Override the increment button content. */
|
|
20
|
+
incrementIcon?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Numeric field with stepper buttons over Base UI NumberField (clamp-on-blur,
|
|
24
|
+
* step, `Intl` formatting via `format`). The vanilla bundle styles a native
|
|
25
|
+
* `<input type="number">` and steps with `stepUp()` / `stepDown()`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function NumberInput({ size, classNames, placeholder, inputAriaLabel, decrementLabel, incrementLabel, decrementIcon, incrementIcon, className, ...rootProps }: NumberInputProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
//# sourceMappingURL=NumberInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../src/NumberInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAM,KAAK,WAAW,EAAE,MAAM,MAAM,CAAC;AAE5C,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAsCjD,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,OAAO,WAAW,CAAC,IAAI,CAAC;IAC/E,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,wFAAwF;IACxF,UAAU,CAAC,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,GAAG,OAAO,GAAG,WAAW,CAAC,CAAC;IACxE,yBAAyB;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iEAAiE;IACjE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iEAAiE;IACjE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6CAA6C;IAC7C,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,6CAA6C;IAC7C,aAAa,CAAC,EAAE,SAAS,CAAC;CAC3B;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAW,EACX,UAAU,EACV,WAAW,EACX,cAAc,EACd,cAA2B,EAC3B,cAA2B,EAC3B,aAAa,EACb,aAAa,EACb,SAAS,EACT,GAAG,SAAS,EACb,EAAE,gBAAgB,2CA0BlB"}
|