@ratio-ui/core 0.3.0 → 0.5.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/dist/catalogue.json +935 -75
- package/dist/components/accordion/Accordion.d.ts +19 -0
- package/dist/components/accordion/Accordion.js +52 -0
- package/dist/components/accordion/index.d.ts +2 -0
- package/dist/components/accordion/index.js +1 -0
- package/dist/components/alert/Alert.js +4 -3
- package/dist/components/breadcrumb/Breadcrumb.d.ts +19 -0
- package/dist/components/breadcrumb/Breadcrumb.js +50 -0
- package/dist/components/breadcrumb/index.d.ts +2 -0
- package/dist/components/breadcrumb/index.js +1 -0
- package/dist/components/button/Button.js +6 -6
- package/dist/components/calendar/Calendar.js +2 -2
- package/dist/components/chart/Chart.d.ts +137 -0
- package/dist/components/chart/Chart.js +238 -0
- package/dist/components/chart/index.d.ts +2 -0
- package/dist/components/chart/index.js +1 -0
- package/dist/components/checkbox/Checkbox.js +1 -1
- package/dist/components/combobox/Combobox.d.ts +52 -0
- package/dist/components/combobox/Combobox.js +92 -0
- package/dist/components/combobox/index.d.ts +2 -0
- package/dist/components/combobox/index.js +1 -0
- package/dist/components/data-table/DataTable.js +12 -18
- package/dist/components/date-picker/DatePicker.d.ts +3 -2
- package/dist/components/date-picker/DatePicker.js +7 -3
- package/dist/components/date-range-picker/DateRangePicker.d.ts +3 -2
- package/dist/components/date-range-picker/DateRangePicker.js +7 -3
- package/dist/components/definition/Definition.js +1 -1
- package/dist/components/dialog/Dialog.js +1 -1
- package/dist/components/drawer/Drawer.d.ts +52 -0
- package/dist/components/drawer/Drawer.js +120 -0
- package/dist/components/drawer/index.d.ts +2 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/field/Field.d.ts +8 -5
- package/dist/components/field/Field.js +9 -3
- package/dist/components/icon/Icon.d.ts +1 -1
- package/dist/components/icon/Icon.js +16 -5
- package/dist/components/icon/glyphs.js +19 -8
- package/dist/components/icon/registry.d.ts +3 -2
- package/dist/components/icon/registry.js +14 -2
- package/dist/components/input/Input.js +1 -1
- package/dist/components/input-group/InputGroup.d.ts +3 -1
- package/dist/components/input-group/InputGroup.js +20 -8
- package/dist/components/input-otp/InputOtp.d.ts +43 -0
- package/dist/components/input-otp/InputOtp.js +45 -0
- package/dist/components/input-otp/index.d.ts +2 -0
- package/dist/components/input-otp/index.js +1 -0
- package/dist/components/key-value-list/KeyValueList.d.ts +25 -0
- package/dist/components/key-value-list/KeyValueList.js +40 -0
- package/dist/components/key-value-list/index.d.ts +2 -0
- package/dist/components/key-value-list/index.js +1 -0
- package/dist/components/link/Link.js +1 -1
- package/dist/components/metric-strip/MetricStrip.js +1 -1
- package/dist/components/page-header/PageHeader.js +8 -8
- package/dist/components/pagination/Pagination.js +1 -1
- package/dist/components/progress/Progress.d.ts +25 -0
- package/dist/components/progress/Progress.js +38 -0
- package/dist/components/progress/index.d.ts +2 -0
- package/dist/components/progress/index.js +1 -0
- package/dist/components/radio-group/RadioGroup.d.ts +18 -0
- package/dist/components/radio-group/RadioGroup.js +32 -0
- package/dist/components/radio-group/index.d.ts +2 -0
- package/dist/components/radio-group/index.js +1 -0
- package/dist/components/scroll-area/ScrollArea.d.ts +12 -0
- package/dist/components/scroll-area/ScrollArea.js +34 -0
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/index.js +1 -0
- package/dist/components/search-field/SearchField.js +8 -4
- package/dist/components/select/Select.js +1 -1
- package/dist/components/separator/Separator.d.ts +15 -0
- package/dist/components/separator/Separator.js +25 -0
- package/dist/components/separator/index.d.ts +2 -0
- package/dist/components/separator/index.js +1 -0
- package/dist/components/sheet/Sheet.d.ts +52 -0
- package/dist/components/sheet/Sheet.js +89 -0
- package/dist/components/sheet/index.d.ts +2 -0
- package/dist/components/sheet/index.js +1 -0
- package/dist/components/side-nav/SideNav.js +15 -10
- package/dist/components/status-pill/StatusPill.js +1 -1
- package/dist/components/summary-chips/SummaryChips.js +1 -1
- package/dist/components/switch/Switch.js +2 -2
- package/dist/components/table/Table.d.ts +1 -1
- package/dist/components/table/Table.js +24 -3
- package/dist/components/tag-input/TagInput.js +1 -1
- package/dist/components/text/Text.d.ts +3 -2
- package/dist/components/text/Text.js +3 -1
- package/dist/components/textarea/Textarea.js +1 -1
- package/dist/components/toaster/Toaster.js +1 -1
- package/dist/components/tooltip/Tooltip.d.ts +1 -1
- package/dist/components/tooltip/Tooltip.js +2 -2
- package/dist/components/top-bar/TopBar.d.ts +2 -4
- package/dist/components/top-bar/TopBar.js +2 -7
- package/dist/index.d.ts +28 -4
- package/dist/index.js +13 -1
- package/dist/lib/cn.js +3 -1
- package/dist/styles.css +1 -1
- package/package.json +52 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JSX, Ref } from "react";
|
|
2
|
+
/** The props of Separator. */
|
|
3
|
+
export type SeparatorProps = {
|
|
4
|
+
/** The direction of the line. Defaults to horizontal. */
|
|
5
|
+
orientation?: 'horizontal' | 'vertical';
|
|
6
|
+
/** True, the default, hides the line from assistive technology; false makes it a semantic separator. */
|
|
7
|
+
decorative?: boolean;
|
|
8
|
+
/** Receives the rendered element. */
|
|
9
|
+
ref?: Ref<HTMLDivElement>;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A 1px hairline in the divider grey, horizontal or vertical. A horizontal line fills its row and shrinks to share it, so
|
|
13
|
+
* two lines and a word between them in an Inline make the "or" divider; a vertical line keeps its 1px.
|
|
14
|
+
*/
|
|
15
|
+
export declare function Separator({ orientation, decorative, ref }: SeparatorProps): JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cn } from "../../lib/cn.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Separator } from "@base-ui/react/separator";
|
|
4
|
+
// src/components/separator/Separator.tsx
|
|
5
|
+
/**
|
|
6
|
+
* A 1px hairline in the divider grey, horizontal or vertical. A horizontal line fills its row and shrinks to share it, so
|
|
7
|
+
* two lines and a word between them in an Inline make the "or" divider; a vertical line keeps its 1px.
|
|
8
|
+
*/
|
|
9
|
+
function Separator$1({ orientation = "horizontal", decorative = true, ref }) {
|
|
10
|
+
const classes = cn("rt:bg-divider rt:data-horizontal:h-px rt:data-horizontal:min-h-px rt:data-horizontal:w-full rt:data-vertical:w-px rt:data-vertical:shrink-0 rt:data-vertical:self-stretch");
|
|
11
|
+
if (decorative) return /* @__PURE__ */ jsx("div", {
|
|
12
|
+
ref,
|
|
13
|
+
role: "none",
|
|
14
|
+
"data-slot": "separator",
|
|
15
|
+
"data-orientation": orientation,
|
|
16
|
+
className: classes
|
|
17
|
+
});
|
|
18
|
+
return /* @__PURE__ */ jsx(Separator, {
|
|
19
|
+
ref,
|
|
20
|
+
"data-slot": "separator",
|
|
21
|
+
orientation,
|
|
22
|
+
className: classes
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export { Separator$1 as Separator };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Separator } from "./Separator.js";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ComponentProps, JSX } from "react";
|
|
2
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
3
|
+
/**
|
|
4
|
+
* The root of a sheet. It holds the open state and renders nothing itself. Pass `open` and `onOpenChange` to control it,
|
|
5
|
+
* or `defaultOpen` to leave it uncontrolled. The page behind is inert while it is open, with no scrim over it.
|
|
6
|
+
*/
|
|
7
|
+
export declare function Sheet(props: Dialog.Root.Props): JSX.Element;
|
|
8
|
+
/** Props of SheetTrigger. */
|
|
9
|
+
export type SheetTriggerProps = Omit<Dialog.Trigger.Props, 'className' | 'style'>;
|
|
10
|
+
/** The button that opens the sheet. */
|
|
11
|
+
export declare function SheetTrigger(props: SheetTriggerProps): JSX.Element;
|
|
12
|
+
/** Props of SheetClose. */
|
|
13
|
+
export type SheetCloseProps = Omit<Dialog.Close.Props, 'className' | 'style'>;
|
|
14
|
+
/** A button that closes the sheet, such as Done in the footer. */
|
|
15
|
+
export declare function SheetClose(props: SheetCloseProps): JSX.Element;
|
|
16
|
+
/** The edge a sheet sits on. */
|
|
17
|
+
export type SheetSide = 'right' | 'left' | 'bottom';
|
|
18
|
+
/** Props of SheetContent. */
|
|
19
|
+
export interface SheetContentProps extends Omit<Dialog.Popup.Props, 'className' | 'style'> {
|
|
20
|
+
/** The edge the sheet sits on: a full-height side sheet, or a bottom sheet with 24px top corners. Defaults to right. */
|
|
21
|
+
side?: SheetSide;
|
|
22
|
+
/** Whether the corner close button shows. Defaults to true. */
|
|
23
|
+
showCloseButton?: boolean;
|
|
24
|
+
/** The accessible name of the corner close button. Defaults to Close. */
|
|
25
|
+
closeLabel?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The panel, white with a hairline on its inner edge. A side sheet is full height and three quarters of a phone screen,
|
|
29
|
+
* 384px from the small breakpoint up; a bottom sheet spans the screen, sizes to its content and has 24px top corners.
|
|
30
|
+
* It appears without sliding and with no scrim, blur or shadow. Put SheetHeader, SheetBody and SheetFooter inside.
|
|
31
|
+
*/
|
|
32
|
+
export declare function SheetContent({ children, side, showCloseButton, closeLabel, ...props }: SheetContentProps): JSX.Element;
|
|
33
|
+
/** Props of SheetHeader. */
|
|
34
|
+
export type SheetHeaderProps = Omit<ComponentProps<'div'>, 'className' | 'style'>;
|
|
35
|
+
/** The title and description, stacked, with room on the right for the close button. */
|
|
36
|
+
export declare function SheetHeader(props: SheetHeaderProps): JSX.Element;
|
|
37
|
+
/** Props of SheetBody. */
|
|
38
|
+
export type SheetBodyProps = Omit<ComponentProps<'div'>, 'className' | 'style'>;
|
|
39
|
+
/** The content between header and footer. It takes the free height and scrolls when the content is taller. */
|
|
40
|
+
export declare function SheetBody(props: SheetBodyProps): JSX.Element;
|
|
41
|
+
/** Props of SheetFooter. */
|
|
42
|
+
export type SheetFooterProps = Omit<ComponentProps<'div'>, 'className' | 'style'>;
|
|
43
|
+
/** The row of actions at the bottom of the sheet, aligned to the end. */
|
|
44
|
+
export declare function SheetFooter(props: SheetFooterProps): JSX.Element;
|
|
45
|
+
/** Props of SheetTitle. */
|
|
46
|
+
export type SheetTitleProps = Omit<Dialog.Title.Props, 'className' | 'style'>;
|
|
47
|
+
/** The sheet's name, in the b4 style. It names the sheet for assistive technology. */
|
|
48
|
+
export declare function SheetTitle(props: SheetTitleProps): JSX.Element;
|
|
49
|
+
/** Props of SheetDescription. */
|
|
50
|
+
export type SheetDescriptionProps = Omit<Dialog.Description.Props, 'className' | 'style'>;
|
|
51
|
+
/** One line that says what the sheet is for, in subdued body text. */
|
|
52
|
+
export declare function SheetDescription(props: SheetDescriptionProps): JSX.Element;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { cn } from "../../lib/cn.js";
|
|
2
|
+
import { Icon } from "../icon/Icon.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
5
|
+
// src/components/sheet/Sheet.tsx
|
|
6
|
+
/**
|
|
7
|
+
* The root of a sheet. It holds the open state and renders nothing itself. Pass `open` and `onOpenChange` to control it,
|
|
8
|
+
* or `defaultOpen` to leave it uncontrolled. The page behind is inert while it is open, with no scrim over it.
|
|
9
|
+
*/
|
|
10
|
+
function Sheet(props) {
|
|
11
|
+
return /* @__PURE__ */ jsx(Dialog.Root, { ...props });
|
|
12
|
+
}
|
|
13
|
+
/** The button that opens the sheet. */
|
|
14
|
+
function SheetTrigger(props) {
|
|
15
|
+
return /* @__PURE__ */ jsx(Dialog.Trigger, {
|
|
16
|
+
"data-slot": "sheet-trigger",
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/** A button that closes the sheet, such as Done in the footer. */
|
|
21
|
+
function SheetClose(props) {
|
|
22
|
+
return /* @__PURE__ */ jsx(Dialog.Close, {
|
|
23
|
+
"data-slot": "sheet-close",
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The panel, white with a hairline on its inner edge. A side sheet is full height and three quarters of a phone screen,
|
|
29
|
+
* 384px from the small breakpoint up; a bottom sheet spans the screen, sizes to its content and has 24px top corners.
|
|
30
|
+
* It appears without sliding and with no scrim, blur or shadow. Put SheetHeader, SheetBody and SheetFooter inside.
|
|
31
|
+
*/
|
|
32
|
+
function SheetContent({ children, side = "right", showCloseButton = true, closeLabel = "Close", ...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsx(Dialog.Portal, { children: /* @__PURE__ */ jsxs(Dialog.Popup, {
|
|
34
|
+
"data-slot": "sheet-content",
|
|
35
|
+
"data-side": side,
|
|
36
|
+
className: cn("rt:fixed rt:z-50 rt:flex rt:max-h-full rt:flex-col rt:overflow-y-auto rt:border-border rt:bg-popover rt:text-b3 rt:text-popover-foreground rt:focus-visible:focus-ring", "rt:side-right:inset-y-0 rt:side-right:right-0 rt:side-right:w-3/4 rt:side-right:border-l rt:side-right:sm:w-96", "rt:side-left:inset-y-0 rt:side-left:left-0 rt:side-left:w-3/4 rt:side-left:border-r rt:side-left:sm:w-96", "rt:side-bottom:inset-x-0 rt:side-bottom:bottom-0 rt:side-bottom:rounded-t-3xl rt:side-bottom:border-x rt:side-bottom:border-t"),
|
|
37
|
+
...props,
|
|
38
|
+
children: [children, showCloseButton && /* @__PURE__ */ jsx(Dialog.Close, {
|
|
39
|
+
"data-slot": "sheet-close",
|
|
40
|
+
"aria-label": closeLabel,
|
|
41
|
+
className: "rt:absolute rt:top-6 rt:right-6 rt:flex rt:size-7 rt:items-center rt:justify-center rt:rounded-md rt:text-icon rt:transition-colors rt:hover:bg-primary-tint rt:focus-visible:focus-ring",
|
|
42
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
43
|
+
name: "x",
|
|
44
|
+
size: 12
|
|
45
|
+
})
|
|
46
|
+
})]
|
|
47
|
+
}) });
|
|
48
|
+
}
|
|
49
|
+
/** The title and description, stacked, with room on the right for the close button. */
|
|
50
|
+
function SheetHeader(props) {
|
|
51
|
+
return /* @__PURE__ */ jsx("div", {
|
|
52
|
+
"data-slot": "sheet-header",
|
|
53
|
+
className: "rt:flex rt:shrink-0 rt:flex-col rt:gap-1 rt:p-6 rt:pr-20",
|
|
54
|
+
...props
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/** The content between header and footer. It takes the free height and scrolls when the content is taller. */
|
|
58
|
+
function SheetBody(props) {
|
|
59
|
+
return /* @__PURE__ */ jsx("div", {
|
|
60
|
+
"data-slot": "sheet-body",
|
|
61
|
+
className: "rt:flex rt:min-h-0 rt:flex-1 rt:flex-col rt:gap-3.5 rt:overflow-y-auto rt:px-6 rt:pb-6",
|
|
62
|
+
...props
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/** The row of actions at the bottom of the sheet, aligned to the end. */
|
|
66
|
+
function SheetFooter(props) {
|
|
67
|
+
return /* @__PURE__ */ jsx("div", {
|
|
68
|
+
"data-slot": "sheet-footer",
|
|
69
|
+
className: "rt:mt-auto rt:flex rt:shrink-0 rt:items-center rt:justify-end rt:gap-2 rt:px-6 rt:pb-6",
|
|
70
|
+
...props
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/** The sheet's name, in the b4 style. It names the sheet for assistive technology. */
|
|
74
|
+
function SheetTitle(props) {
|
|
75
|
+
return /* @__PURE__ */ jsx(Dialog.Title, {
|
|
76
|
+
"data-slot": "sheet-title",
|
|
77
|
+
className: "rt:text-b4 rt:text-foreground-strong",
|
|
78
|
+
...props
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/** One line that says what the sheet is for, in subdued body text. */
|
|
82
|
+
function SheetDescription(props) {
|
|
83
|
+
return /* @__PURE__ */ jsx(Dialog.Description, {
|
|
84
|
+
"data-slot": "sheet-description",
|
|
85
|
+
className: "rt:text-b3 rt:text-foreground-subdued",
|
|
86
|
+
...props
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
export { Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Sheet, SheetBody, SheetBodyProps, SheetClose, SheetCloseProps, SheetContent, SheetContentProps, SheetDescription, SheetDescriptionProps, SheetFooter, SheetFooterProps, SheetHeader, SheetHeaderProps, SheetSide, SheetTitle, SheetTitleProps, SheetTrigger, SheetTriggerProps } from "./Sheet.js";
|
|
2
|
+
export { Sheet, SheetBody, type SheetBodyProps, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, type SheetDescriptionProps, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, type SheetSide, SheetTitle, type SheetTitleProps, SheetTrigger, type SheetTriggerProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from "./Sheet.js";
|
|
@@ -28,17 +28,20 @@ function Row({ item, active, depth, onSelect }) {
|
|
|
28
28
|
const open = toggled && toggled.forActive === active ? toggled.open : containsActive(item, active);
|
|
29
29
|
const cls = cn(ROW, depth > 0 && "rt:pl-8", isActive && "rt:bg-muted rt:text-primary rt:font-medium");
|
|
30
30
|
const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
31
|
-
item.icon && /* @__PURE__ */ jsx(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
item.icon && /* @__PURE__ */ jsx("span", {
|
|
32
|
+
className: "rt:flex rt:size-6 rt:shrink-0 rt:items-center rt:justify-center",
|
|
33
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
34
|
+
name: item.icon,
|
|
35
|
+
size: 16,
|
|
36
|
+
tone: isActive ? "primary" : "icon"
|
|
37
|
+
})
|
|
35
38
|
}),
|
|
36
39
|
/* @__PURE__ */ jsx("span", {
|
|
37
40
|
className: "rt:min-w-0 rt:flex-1 rt:truncate",
|
|
38
41
|
children: item.label
|
|
39
42
|
}),
|
|
40
43
|
item.count !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
41
|
-
className: "rt:text-
|
|
44
|
+
className: "rt:text-badge rt:text-foreground-subdued",
|
|
42
45
|
children: item.count
|
|
43
46
|
}),
|
|
44
47
|
hasChildren && /* @__PURE__ */ jsx(Icon, {
|
|
@@ -107,13 +110,13 @@ function Section({ section, active, onSelect }) {
|
|
|
107
110
|
})]
|
|
108
111
|
});
|
|
109
112
|
}
|
|
110
|
-
function Panel({ label, sections, active, onSelect, account, footer }) {
|
|
113
|
+
function Panel({ label, sections, active, onSelect, account, footer, edge }) {
|
|
111
114
|
return /* @__PURE__ */ jsxs("div", {
|
|
112
115
|
"data-slot": "side-nav",
|
|
113
|
-
className: "rt:flex rt:h-full rt:w-60 rt:shrink-0 rt:flex-col rt:bg-sidebar rt:text-sidebar-foreground",
|
|
116
|
+
className: cn("rt:flex rt:h-full rt:w-60 rt:shrink-0 rt:flex-col rt:bg-sidebar rt:text-sidebar-foreground", edge && "rt:border-r rt:border-border"),
|
|
114
117
|
children: [
|
|
115
118
|
account && /* @__PURE__ */ jsx("div", {
|
|
116
|
-
className: "rt:flex rt:shrink-0 rt:items-start rt:px-3.5 rt:pt-2",
|
|
119
|
+
className: "rt:flex rt:h-15 rt:shrink-0 rt:items-start rt:px-3.5 rt:pt-2",
|
|
117
120
|
children: /* @__PURE__ */ jsxs("button", {
|
|
118
121
|
type: "button",
|
|
119
122
|
onClick: account.onClick,
|
|
@@ -121,7 +124,6 @@ function Panel({ label, sections, active, onSelect, account, footer }) {
|
|
|
121
124
|
children: [
|
|
122
125
|
/* @__PURE__ */ jsx(Avatar, {
|
|
123
126
|
name: account.name,
|
|
124
|
-
shape: "square",
|
|
125
127
|
size: "sm"
|
|
126
128
|
}),
|
|
127
129
|
/* @__PURE__ */ jsxs("span", {
|
|
@@ -166,7 +168,10 @@ function Panel({ label, sections, active, onSelect, account, footer }) {
|
|
|
166
168
|
function SideNav(props) {
|
|
167
169
|
const phone = useIsPhone();
|
|
168
170
|
const shell = use(ShellNavContext);
|
|
169
|
-
if (!phone) return /* @__PURE__ */ jsx(Panel, {
|
|
171
|
+
if (!phone) return /* @__PURE__ */ jsx(Panel, {
|
|
172
|
+
...props,
|
|
173
|
+
edge: true
|
|
174
|
+
});
|
|
170
175
|
const open = props.open ?? shell?.open ?? false;
|
|
171
176
|
const onOpenChange = (next) => {
|
|
172
177
|
props.onOpenChange?.(next);
|
|
@@ -12,7 +12,7 @@ function StatusPill({ tone = "neutral", children, ref, ...rest }) {
|
|
|
12
12
|
...rest,
|
|
13
13
|
ref,
|
|
14
14
|
"data-tone": tone,
|
|
15
|
-
className: cn("rt:inline-flex rt:h-5 rt:w-fit rt:shrink-0 rt:items-center rt:justify-center rt:rounded-sm rt:border rt:px-
|
|
15
|
+
className: cn("rt:inline-flex rt:h-5 rt:w-fit rt:shrink-0 rt:items-center rt:justify-center rt:rounded-sm rt:border rt:px-1.5 rt:text-b1 rt:whitespace-nowrap", TONE_CLASSES[tone]),
|
|
16
16
|
children
|
|
17
17
|
});
|
|
18
18
|
}
|
|
@@ -8,7 +8,7 @@ function SummaryChips({ items, ref, ...rest }) {
|
|
|
8
8
|
ref,
|
|
9
9
|
className: "rt:m-0 rt:flex rt:list-none rt:flex-wrap rt:gap-1 rt:p-0",
|
|
10
10
|
children: items.map((item) => /* @__PURE__ */ jsxs("li", {
|
|
11
|
-
className: "rt:inline-flex rt:h-5 rt:items-center rt:gap-1 rt:rounded-sm rt:border rt:border-
|
|
11
|
+
className: "rt:inline-flex rt:h-5 rt:items-center rt:gap-1 rt:rounded-sm rt:border rt:border-chip-border rt:bg-chip-background rt:px-2 rt:text-c1 rt:whitespace-nowrap rt:text-chip-foreground",
|
|
12
12
|
children: [/* @__PURE__ */ jsx("span", { children: item.label }), item.value !== void 0 ? /* @__PURE__ */ jsx("span", {
|
|
13
13
|
className: "rt:text-c2 rt:text-foreground",
|
|
14
14
|
children: item.value
|
|
@@ -9,11 +9,11 @@ import { Switch } from "@base-ui/react/switch";
|
|
|
9
9
|
function Switch$1({ ...props }) {
|
|
10
10
|
return /* @__PURE__ */ jsx(Switch.Root, {
|
|
11
11
|
"data-slot": "switch",
|
|
12
|
-
className: cn("rt:peer rt:relative rt:inline-flex rt:h-4.5 rt:w-8 rt:shrink-0 rt:cursor-pointer rt:items-center rt:justify-start rt:rounded-
|
|
12
|
+
className: cn("rt:peer rt:relative rt:inline-flex rt:h-4.5 rt:w-8 rt:shrink-0 rt:cursor-pointer rt:items-center rt:justify-start rt:rounded-md rt:bg-background rt:shadow-ring-hairline rt:transition-colors rt:outline-none", "rt:after:absolute rt:after:-inset-x-1.5 rt:after:-inset-y-1.5", "rt:data-checked:justify-end rt:data-checked:bg-primary rt:data-checked:shadow-none", "rt:focus-visible:focus-ring rt:forced-outline", "rt:aria-invalid:shadow-ring-invalid rt:aria-invalid:focus-visible:shadow-ring-invalid", "rt:data-disabled:cursor-not-allowed rt:data-disabled:opacity-50"),
|
|
13
13
|
...props,
|
|
14
14
|
children: /* @__PURE__ */ jsx(Switch.Thumb, {
|
|
15
15
|
"data-slot": "switch-thumb",
|
|
16
|
-
className: "rt:pointer-events-none rt:mx-0.5 rt:block rt:size-3.5 rt:rounded-
|
|
16
|
+
className: "rt:pointer-events-none rt:mx-0.5 rt:block rt:size-3.5 rt:rounded-sm rt:forced-outline rt:bg-control rt:transition-colors rt:data-checked:bg-primary-foreground"
|
|
17
17
|
})
|
|
18
18
|
});
|
|
19
19
|
}
|
|
@@ -31,7 +31,7 @@ export type TableHeadProps = Omit<ComponentProps<'th'>, 'className' | 'style'> &
|
|
|
31
31
|
/** Aligns the heading to the right, over a column of numbers. Defaults to false, which aligns it to the left. */
|
|
32
32
|
numeric?: boolean;
|
|
33
33
|
};
|
|
34
|
-
/** A column heading: 12px uppercase text in the
|
|
34
|
+
/** A column heading: 12px uppercase text in the muted foreground, the design system's colour for column headings. It is a column header unless `scope` says otherwise. */
|
|
35
35
|
export declare function TableHead({ numeric, scope, ...rest }: TableHeadProps): JSX.Element;
|
|
36
36
|
/** The props of TableCell: the attributes of a td element, except className and style, and the alignment of its column. */
|
|
37
37
|
export type TableCellProps = Omit<ComponentProps<'td'>, 'className' | 'style'> & {
|
|
@@ -62,11 +62,11 @@ function TableRow({ selected = false, ...rest }) {
|
|
|
62
62
|
...rest
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
/** A column heading: 12px uppercase text in the
|
|
65
|
+
/** A column heading: 12px uppercase text in the muted foreground, the design system's colour for column headings. It is a column header unless `scope` says otherwise. */
|
|
66
66
|
function TableHead({ numeric = false, scope = "col", ...rest }) {
|
|
67
67
|
return /* @__PURE__ */ jsx("th", {
|
|
68
68
|
scope,
|
|
69
|
-
className: cn("rt:px-2 rt:align-middle rt:text-label rt:uppercase rt:whitespace-nowrap rt:text-foreground
|
|
69
|
+
className: cn("rt:px-2 rt:align-middle rt:text-label rt:uppercase rt:whitespace-nowrap rt:text-muted-foreground", numeric ? "rt:text-right" : "rt:text-left"),
|
|
70
70
|
...rest
|
|
71
71
|
});
|
|
72
72
|
}
|
|
@@ -84,4 +84,25 @@ function TableCaption(props) {
|
|
|
84
84
|
...props
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
/** The head cell of a selection column: 40px wide with its checkbox centred. For DataTable; not exported from the package. */
|
|
88
|
+
function SelectionHead({ children }) {
|
|
89
|
+
return /* @__PURE__ */ jsx("th", {
|
|
90
|
+
scope: "col",
|
|
91
|
+
className: "rt:w-10 rt:px-0 rt:align-middle",
|
|
92
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
93
|
+
className: "rt:flex rt:justify-center",
|
|
94
|
+
children
|
|
95
|
+
})
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/** The body cell of a selection column: 40px wide with its checkbox centred. For DataTable; not exported from the package. */
|
|
99
|
+
function SelectionCell({ children }) {
|
|
100
|
+
return /* @__PURE__ */ jsx("td", {
|
|
101
|
+
className: "rt:w-10 rt:px-0 rt:align-middle",
|
|
102
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
103
|
+
className: "rt:flex rt:justify-center",
|
|
104
|
+
children
|
|
105
|
+
})
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
export { SelectionCell, SelectionHead, Table, TableBody, TableBox, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
@@ -43,7 +43,7 @@ function TagInput({ options, value, defaultValue, onValueChange, creatable = tru
|
|
|
43
43
|
"data-slot": "tag-input-chips",
|
|
44
44
|
className: cn("rt:flex rt:min-h-9 rt:w-full rt:min-w-0 rt:flex-wrap rt:items-center rt:gap-1 rt:rounded-lg rt:bg-background rt:py-2 rt:pr-3 rt:shadow-ring-subtle rt:transition-colors rt:forced-outline rt:focus-within:shadow-ring-focus rt:has-aria-invalid:shadow-ring-invalid rt:has-aria-invalid:focus-within:shadow-ring-invalid rt:has-disabled:opacity-50", current.length > 0 ? "rt:pl-2" : "rt:pl-3"),
|
|
45
45
|
children: [current.map((item) => /* @__PURE__ */ jsxs(Combobox.Chip, {
|
|
46
|
-
className: "rt:inline-flex rt:h-5 rt:items-center rt:gap-1 rt:rounded-sm rt:border rt:border-
|
|
46
|
+
className: "rt:inline-flex rt:h-5 rt:items-center rt:gap-1 rt:rounded-sm rt:border rt:border-chip-border rt:bg-chip-background rt:pr-0.5 rt:pl-2 rt:text-c1 rt:whitespace-nowrap rt:text-chip-foreground rt:outline-none rt:focus-visible:focus-ring",
|
|
47
47
|
children: [item, /* @__PURE__ */ jsx(Combobox.ChipRemove, {
|
|
48
48
|
"aria-label": `Remove ${item}`,
|
|
49
49
|
className: "rt:flex rt:size-4 rt:items-center rt:justify-center rt:rounded-sm rt:text-muted-foreground rt:transition-colors rt:hover:text-foreground rt:focus-visible:focus-ring rt:disabled:pointer-events-none",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { HTMLAttributes, JSX, Ref } from "react";
|
|
2
2
|
/**
|
|
3
3
|
* One of the design system's 13 text styles, named as in its type scale: display, the headings h1 and h5, the subtitles s1
|
|
4
|
-
* and s2, the body styles b1 to b4, the captions c1 to c3, and the label, which is set in capitals
|
|
4
|
+
* and s2, the body styles b1 to b4, the captions c1 to c3, and the label, which is set in capitals; and the two page 05 adds,
|
|
5
|
+
* section (a 16px section title) and badge (the 10px count badge). The design system's
|
|
5
6
|
* two button styles are not among them: buttons take those.
|
|
6
7
|
*/
|
|
7
|
-
export type TextVariant = 'display' | 'h1' | 'h5' | 's1' | 's2' | 'b1' | 'b2' | 'b3' | 'b4' | 'c1' | 'c2' | 'c3' | 'label';
|
|
8
|
+
export type TextVariant = 'display' | 'h1' | 'h5' | 's1' | 's2' | 'b1' | 'b2' | 'b3' | 'b4' | 'c1' | 'c2' | 'c3' | 'label' | 'section' | 'badge';
|
|
8
9
|
/**
|
|
9
10
|
* The colour of the text. Default is the body colour for b3 and b4 and the strong colour for every other style, as in the
|
|
10
11
|
* design system. Inherit sets no colour, so the text takes the colour of its parent.
|
|
@@ -14,7 +14,9 @@ const VARIANT_CLASSES = {
|
|
|
14
14
|
c1: "rt:text-c1",
|
|
15
15
|
c2: "rt:text-c2",
|
|
16
16
|
c3: "rt:text-c3",
|
|
17
|
-
label: "rt:text-label rt:uppercase"
|
|
17
|
+
label: "rt:text-label rt:uppercase",
|
|
18
|
+
section: "rt:text-section",
|
|
19
|
+
badge: "rt:text-badge"
|
|
18
20
|
};
|
|
19
21
|
const TONE_CLASSES = {
|
|
20
22
|
subdued: "rt:text-foreground-subdued",
|
|
@@ -2,7 +2,7 @@ import { cn } from "../../lib/cn.js";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
// src/components/textarea/Textarea.tsx
|
|
5
|
-
const textareaVariants = cva("rt:block rt:w-full rt:min-w-0 rt:resize-y rt:rounded-lg rt:bg-background rt:border-y-2 rt:border-transparent rt:px-3 rt:py-2 rt:text-b3 rt:text-foreground rt:placeholder:text-muted-foreground rt:shadow-ring-subtle rt:outline-none rt:
|
|
5
|
+
const textareaVariants = cva("rt:block rt:w-full rt:min-w-0 rt:resize-y rt:rounded-lg rt:bg-background rt:border-y-2 rt:border-transparent rt:px-3 rt:py-2 rt:text-b3 rt:text-foreground rt:placeholder:text-muted-foreground rt:shadow-ring-subtle rt:outline-none rt:ring-fade rt:forced-outline rt:focus-visible:shadow-ring-focus rt:aria-invalid:shadow-ring-invalid rt:aria-invalid:focus-visible:shadow-ring-invalid rt:disabled:pointer-events-none rt:disabled:cursor-not-allowed rt:disabled:opacity-50", {
|
|
6
6
|
variants: { size: {
|
|
7
7
|
88: "rt:min-h-22",
|
|
8
8
|
64: "rt:min-h-16"
|
|
@@ -81,7 +81,7 @@ function Toaster({ closeLabel = "Close notification" }) {
|
|
|
81
81
|
toastManager: manager,
|
|
82
82
|
children: /* @__PURE__ */ jsx(Toast.Portal, { children: /* @__PURE__ */ jsx(Toast.Viewport, {
|
|
83
83
|
"data-slot": "toast-viewport",
|
|
84
|
-
className: "rt:pointer-events-none rt:fixed rt:right-
|
|
84
|
+
className: "rt:pointer-events-none rt:fixed rt:right-6 rt:bottom-6 rt:z-50 rt:flex rt:w-90 rt:max-w-full rt:flex-col rt:gap-2",
|
|
85
85
|
children: /* @__PURE__ */ jsx(ToastList, { closeLabel })
|
|
86
86
|
}) })
|
|
87
87
|
});
|
|
@@ -13,6 +13,6 @@ export type TooltipTriggerProps = Omit<Tooltip.Trigger.Props, 'className' | 'sty
|
|
|
13
13
|
export declare function TooltipTrigger(props: TooltipTriggerProps): import("react").JSX.Element;
|
|
14
14
|
/** The props of TooltipContent: the popup props plus where the tooltip sits. */
|
|
15
15
|
export type TooltipContentProps = Omit<Tooltip.Popup.Props, 'className' | 'style'> & Pick<Tooltip.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>;
|
|
16
|
-
/** The tooltip text: a
|
|
16
|
+
/** The tooltip text: a white panel with a 1px line-100 border and ink-800 text, like a popover, no shadow and no animation. It sits above the trigger by default. */
|
|
17
17
|
export declare function TooltipContent({ side, sideOffset, align, alignOffset, children, ...props }: TooltipContentProps): import("react").JSX.Element;
|
|
18
18
|
export { Tooltip$1 as Tooltip };
|
|
@@ -17,7 +17,7 @@ function Tooltip$1(props) {
|
|
|
17
17
|
function TooltipTrigger(props) {
|
|
18
18
|
return /* @__PURE__ */ jsx(Tooltip.Trigger, { ...props });
|
|
19
19
|
}
|
|
20
|
-
/** The tooltip text: a
|
|
20
|
+
/** The tooltip text: a white panel with a 1px line-100 border and ink-800 text, like a popover, no shadow and no animation. It sits above the trigger by default. */
|
|
21
21
|
function TooltipContent({ side = "top", sideOffset = 4, align = "center", alignOffset = 0, children, ...props }) {
|
|
22
22
|
return /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
|
|
23
23
|
align,
|
|
@@ -26,7 +26,7 @@ function TooltipContent({ side = "top", sideOffset = 4, align = "center", alignO
|
|
|
26
26
|
sideOffset,
|
|
27
27
|
className: "rt:isolate rt:z-50",
|
|
28
28
|
children: /* @__PURE__ */ jsx(Tooltip.Popup, {
|
|
29
|
-
className: cn("rt:inline-flex rt:w-fit rt:max-w-72 rt:items-center rt:gap-1.5 rt:rounded-
|
|
29
|
+
className: cn("rt:inline-flex rt:w-fit rt:max-w-72 rt:items-center rt:gap-1.5 rt:rounded-lg rt:border rt:border-border rt:bg-popover rt:px-3 rt:py-1.5 rt:text-b1 rt:text-popover-foreground"),
|
|
30
30
|
...props,
|
|
31
31
|
children
|
|
32
32
|
})
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { JSX, ReactNode } from "react";
|
|
2
2
|
/** The props of TopBar. */
|
|
3
3
|
export type TopBarProps = {
|
|
4
|
-
/** The logo, usually
|
|
4
|
+
/** The logo, usually the SVG the app gets from its designer. The bar draws no logo of its own: without one the slot is empty. */
|
|
5
5
|
logo?: ReactNode;
|
|
6
|
-
/** The accessible name of the text wordmark, shown when there is no logo. Defaults to Ratio. */
|
|
7
|
-
wordmarkLabel?: string;
|
|
8
6
|
/** The accessible name of the phone menu button that opens the side navigation. Defaults to Open navigation menu. */
|
|
9
7
|
menuLabel?: string;
|
|
10
8
|
/** The global search, for example GlobalSearch. It takes the free space in the middle. */
|
|
@@ -21,4 +19,4 @@ export type TopBarProps = {
|
|
|
21
19
|
* desktop and 52px on a phone, with a hairline under it. The parts are slots, so the bar does not depend on their
|
|
22
20
|
* components. Inside an AppShell with a side nav it shows a menu button on phones, which opens the side nav drawer.
|
|
23
21
|
*/
|
|
24
|
-
export declare function TopBar({ logo,
|
|
22
|
+
export declare function TopBar({ logo, menuLabel, search, actions, storeSwitcher, account }: TopBarProps): JSX.Element;
|
|
@@ -8,7 +8,7 @@ import { use } from "react";
|
|
|
8
8
|
* desktop and 52px on a phone, with a hairline under it. The parts are slots, so the bar does not depend on their
|
|
9
9
|
* components. Inside an AppShell with a side nav it shows a menu button on phones, which opens the side nav drawer.
|
|
10
10
|
*/
|
|
11
|
-
function TopBar({ logo,
|
|
11
|
+
function TopBar({ logo, menuLabel = "Open navigation menu", search, actions, storeSwitcher, account }) {
|
|
12
12
|
const nav = use(ShellNavContext);
|
|
13
13
|
return /* @__PURE__ */ jsxs("header", {
|
|
14
14
|
className: "rt:flex rt:h-13 rt:md:h-15 rt:shrink-0 rt:items-center rt:gap-3 rt:border-b rt:border-border rt:bg-page rt:px-3 rt:md:px-6 rt:font-sans",
|
|
@@ -28,12 +28,7 @@ function TopBar({ logo, wordmarkLabel = "Ratio", menuLabel = "Open navigation me
|
|
|
28
28
|
}),
|
|
29
29
|
/* @__PURE__ */ jsx("div", {
|
|
30
30
|
className: "rt:flex rt:shrink-0 rt:items-center rt:text-b4 rt:text-foreground",
|
|
31
|
-
children: logo
|
|
32
|
-
"data-slot": "wordmark",
|
|
33
|
-
role: "img",
|
|
34
|
-
"aria-label": wordmarkLabel,
|
|
35
|
-
className: "rt:wordmark"
|
|
36
|
-
})
|
|
31
|
+
children: logo
|
|
37
32
|
}),
|
|
38
33
|
/* @__PURE__ */ jsx("div", {
|
|
39
34
|
className: "rt:flex rt:min-w-0 rt:flex-1 rt:justify-center",
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Accordion, AccordionContent, AccordionContentProps, AccordionItem, AccordionItemProps, AccordionProps, AccordionTrigger, AccordionTriggerProps } from "./components/accordion/Accordion.js";
|
|
2
|
+
import "./components/accordion/index.js";
|
|
1
3
|
import { Button, ButtonProps, ButtonVariant } from "./components/button/Button.js";
|
|
2
4
|
import "./components/button/index.js";
|
|
3
5
|
import { AlertDialog, AlertDialogAction, AlertDialogActionProps, AlertDialogCancel, AlertDialogCancelProps, AlertDialogContent, AlertDialogContentProps, AlertDialogDescription, AlertDialogDescriptionProps, AlertDialogFooter, AlertDialogFooterProps, AlertDialogHeader, AlertDialogHeaderProps, AlertDialogTitle, AlertDialogTitleProps, AlertDialogTrigger, AlertDialogTriggerProps } from "./components/alert-dialog/AlertDialog.js";
|
|
@@ -8,10 +10,17 @@ import { AppShell, AppShellProps } from "./components/app-shell/AppShell.js";
|
|
|
8
10
|
import "./components/app-shell/index.js";
|
|
9
11
|
import { Avatar, AvatarProps, AvatarShape, AvatarSize, getInitials } from "./components/avatar/Avatar.js";
|
|
10
12
|
import "./components/avatar/index.js";
|
|
13
|
+
import { Breadcrumb, BreadcrumbItem, BreadcrumbProps } from "./components/breadcrumb/Breadcrumb.js";
|
|
14
|
+
import "./components/breadcrumb/index.js";
|
|
11
15
|
import { Calendar, CalendarProps } from "./components/calendar/Calendar.js";
|
|
12
16
|
import "./components/calendar/index.js";
|
|
13
17
|
import { Card, CardContent, CardContentProps, CardDescription, CardDescriptionProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps } from "./components/card/Card.js";
|
|
14
18
|
import "./components/card/index.js";
|
|
19
|
+
import { IconName } from "./components/icon/registry.js";
|
|
20
|
+
import { Icon, IconProps, IconSize, IconTone } from "./components/icon/Icon.js";
|
|
21
|
+
import "./components/icon/index.js";
|
|
22
|
+
import { Chart, ChartAspect, ChartColor, ChartConfig, ChartLegend, ChartLegendContent, ChartLegendContentProps, ChartLegendProps, ChartProps, ChartSeriesConfig, ChartTable, ChartTooltip, ChartTooltipContent, ChartTooltipContentProps, ChartTooltipProps, chartColor } from "./components/chart/Chart.js";
|
|
23
|
+
import "./components/chart/index.js";
|
|
15
24
|
import { CheckboxList, CheckboxListItem, CheckboxListProps } from "./components/checkbox-list/CheckboxList.js";
|
|
16
25
|
import "./components/checkbox-list/index.js";
|
|
17
26
|
import { Checkbox, CheckboxProps } from "./components/checkbox/Checkbox.js";
|
|
@@ -20,6 +29,8 @@ import { SummaryChip, SummaryChips, SummaryChipsProps } from "./components/summa
|
|
|
20
29
|
import "./components/summary-chips/index.js";
|
|
21
30
|
import { Collapsible, CollapsibleProps } from "./components/collapsible/Collapsible.js";
|
|
22
31
|
import "./components/collapsible/index.js";
|
|
32
|
+
import { Combobox, ComboboxItem, ComboboxProps } from "./components/combobox/Combobox.js";
|
|
33
|
+
import "./components/combobox/index.js";
|
|
23
34
|
import { Table, TableBody, TableBodyProps, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableFooter, TableFooterProps, TableHead, TableHeadProps, TableHeader, TableHeaderProps, TableProps, TableRow, TableRowProps } from "./components/table/Table.js";
|
|
24
35
|
import "./components/table/index.js";
|
|
25
36
|
import { DataTable, DataTableColumn, DataTableProps, DataTableSort } from "./components/data-table/DataTable.js";
|
|
@@ -34,6 +45,8 @@ import { Definition, DefinitionProps } from "./components/definition/Definition.
|
|
|
34
45
|
import "./components/definition/index.js";
|
|
35
46
|
import { Dialog, DialogClose, DialogCloseProps, DialogContent, DialogContentProps, DialogDescription, DialogDescriptionProps, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogTitle, DialogTitleProps, DialogTrigger, DialogTriggerProps } from "./components/dialog/Dialog.js";
|
|
36
47
|
import "./components/dialog/index.js";
|
|
48
|
+
import { Drawer, DrawerClose, DrawerCloseProps, DrawerContent, DrawerContentProps, DrawerDescription, DrawerDescriptionProps, DrawerFooter, DrawerFooterProps, DrawerHeader, DrawerHeaderProps, DrawerProps, DrawerTitle, DrawerTitleProps, DrawerTrigger, DrawerTriggerProps } from "./components/drawer/Drawer.js";
|
|
49
|
+
import "./components/drawer/index.js";
|
|
37
50
|
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuCheckboxItemProps, DropdownMenuContent, DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuGroupProps, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuLabelProps, DropdownMenuProps, DropdownMenuRadioGroup, DropdownMenuRadioGroupProps, DropdownMenuRadioItem, DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuSeparatorProps, DropdownMenuShortcut, DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubContentProps, DropdownMenuSubProps, DropdownMenuSubTrigger, DropdownMenuSubTriggerProps, DropdownMenuTrigger, DropdownMenuTriggerProps } from "./components/dropdown-menu/DropdownMenu.js";
|
|
38
51
|
import "./components/dropdown-menu/index.js";
|
|
39
52
|
import { EmptyState, EmptyStateProps } from "./components/empty-state/EmptyState.js";
|
|
@@ -43,18 +56,19 @@ import { Label, LabelProps } from "./components/field/Label.js";
|
|
|
43
56
|
import "./components/field/index.js";
|
|
44
57
|
import { FilterTabs, FilterTabsItem, FilterTabsProps } from "./components/filter-tabs/FilterTabs.js";
|
|
45
58
|
import "./components/filter-tabs/index.js";
|
|
46
|
-
import { IconName } from "./components/icon/registry.js";
|
|
47
|
-
import { Icon, IconProps, IconSize, IconTone } from "./components/icon/Icon.js";
|
|
48
|
-
import "./components/icon/index.js";
|
|
49
59
|
import { GlobalSearch, GlobalSearchGroup, GlobalSearchProps, GlobalSearchResult } from "./components/global-search/GlobalSearch.js";
|
|
50
60
|
import "./components/global-search/index.js";
|
|
51
61
|
import { Space } from "./lib/space.js";
|
|
52
62
|
import { Inline, InlineProps } from "./components/inline/Inline.js";
|
|
53
63
|
import "./components/inline/index.js";
|
|
64
|
+
import { InputOtp, InputOtpProps } from "./components/input-otp/InputOtp.js";
|
|
65
|
+
import "./components/input-otp/index.js";
|
|
54
66
|
import { Input, InputProps, InputSize } from "./components/input/Input.js";
|
|
55
67
|
import "./components/input/index.js";
|
|
56
68
|
import { Kbd, KbdGroup, KbdGroupProps, KbdProps } from "./components/kbd/Kbd.js";
|
|
57
69
|
import "./components/kbd/index.js";
|
|
70
|
+
import { KeyValueItem, KeyValueList, KeyValueListProps } from "./components/key-value-list/KeyValueList.js";
|
|
71
|
+
import "./components/key-value-list/index.js";
|
|
58
72
|
import { LinkProvider, LinkProviderProps, LinkRender, LinkRenderProps } from "./components/link-provider/LinkProvider.js";
|
|
59
73
|
import "./components/link-provider/index.js";
|
|
60
74
|
import { Link, LinkProps } from "./components/link/Link.js";
|
|
@@ -73,12 +87,22 @@ import { Pagination, PaginationProps } from "./components/pagination/Pagination.
|
|
|
73
87
|
import "./components/pagination/index.js";
|
|
74
88
|
import { Popover, PopoverContent, PopoverContentProps, PopoverDescription, PopoverDescriptionProps, PopoverHeader, PopoverHeaderProps, PopoverProps, PopoverTitle, PopoverTitleProps, PopoverTrigger, PopoverTriggerProps } from "./components/popover/Popover.js";
|
|
75
89
|
import "./components/popover/index.js";
|
|
90
|
+
import { Progress, ProgressProps } from "./components/progress/Progress.js";
|
|
91
|
+
import "./components/progress/index.js";
|
|
92
|
+
import { RadioGroup, RadioGroupItem, RadioGroupItemProps, RadioGroupProps } from "./components/radio-group/RadioGroup.js";
|
|
93
|
+
import "./components/radio-group/index.js";
|
|
76
94
|
import { SaveBar, SaveBarProps } from "./components/save-bar/SaveBar.js";
|
|
77
95
|
import "./components/save-bar/index.js";
|
|
96
|
+
import { ScrollArea, ScrollAreaProps } from "./components/scroll-area/ScrollArea.js";
|
|
97
|
+
import "./components/scroll-area/index.js";
|
|
78
98
|
import { SearchField, SearchFieldProps } from "./components/search-field/SearchField.js";
|
|
79
99
|
import "./components/search-field/index.js";
|
|
80
100
|
import { Select, SelectContent, SelectContentProps, SelectGroup, SelectGroupProps, SelectItem, SelectItemProps, SelectLabel, SelectLabelProps, SelectProps, SelectSeparator, SelectSeparatorProps, SelectSize, SelectTrigger, SelectTriggerProps, SelectValue, SelectValueProps } from "./components/select/Select.js";
|
|
81
101
|
import "./components/select/index.js";
|
|
102
|
+
import { Separator, SeparatorProps } from "./components/separator/Separator.js";
|
|
103
|
+
import "./components/separator/index.js";
|
|
104
|
+
import { Sheet, SheetBody, SheetBodyProps, SheetClose, SheetCloseProps, SheetContent, SheetContentProps, SheetDescription, SheetDescriptionProps, SheetFooter, SheetFooterProps, SheetHeader, SheetHeaderProps, SheetSide, SheetTitle, SheetTitleProps, SheetTrigger, SheetTriggerProps } from "./components/sheet/Sheet.js";
|
|
105
|
+
import "./components/sheet/index.js";
|
|
82
106
|
import { SideNav, SideNavAccount, SideNavItem, SideNavProps, SideNavSection } from "./components/side-nav/SideNav.js";
|
|
83
107
|
import "./components/side-nav/index.js";
|
|
84
108
|
import { Skeleton, SkeletonProps, SkeletonShape } from "./components/skeleton/Skeleton.js";
|
|
@@ -109,4 +133,4 @@ import "./components/top-bar/index.js";
|
|
|
109
133
|
import { UnitInput, UnitInputProps } from "./components/unit-input/UnitInput.js";
|
|
110
134
|
import "./components/unit-input/index.js";
|
|
111
135
|
import { DateInput, FORMAT, MONEY_NUMBER_FORMAT, amountToPaise, currencySymbol, formatCount, formatDate, formatIsoDate, formatMoney, formatPaise, formatPaiseForEditing, formatTime, numberSeparators, paiseToAmount, parseDate, parseMoney } from "./lib/format.js";
|
|
112
|
-
export { Alert, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertDialogTriggerProps, type AlertProps, type AlertTone, AppShell, type AppShellProps, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, Button, type ButtonProps, type ButtonVariant, Calendar, type CalendarProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, Checkbox, CheckboxList, type CheckboxListItem, type CheckboxListProps, type CheckboxProps, Collapsible, type CollapsibleProps, DataTable, type DataTableColumn, type DataTableProps, type DataTableSort, DateInput, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, type DateRangeValue, Definition, type DefinitionProps, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyState, type EmptyStateProps, FORMAT, Field, type FieldControlProps, type FieldProps, FilterTabs, type FilterTabsItem, type FilterTabsProps, GlobalSearch, type GlobalSearchGroup, type GlobalSearchProps, type GlobalSearchResult, Icon, type IconName, type IconProps, type IconSize, type IconTone, Inline, type InlineProps, Input, InputGroup, InputGroupAddon, type InputGroupAddonAlign, type InputGroupAddonProps, InputGroupInput, type InputGroupInputProps, type InputGroupProps, InputGroupShortcut, type InputGroupShortcutProps, type InputGroupSize, InputGroupText, type InputGroupTextProps, type InputProps, type InputSize, Kbd, KbdGroup, type KbdGroupProps, type KbdProps, Label, type LabelProps, Link, type LinkProps, LinkProvider, type LinkProviderProps, type LinkRender, type LinkRenderProps, MONEY_NUMBER_FORMAT, MediaGrid, type MediaGridItem, type MediaGridProps, type MetricSegment, MetricStrip, type MetricStripProps, MoneyInput, type MoneyInputProps, PageHeader, type PageHeaderMenuItem, type PageHeaderProps, Pagination, type PaginationProps, Popover, PopoverContent, type PopoverContentProps, PopoverDescription, type PopoverDescriptionProps, PopoverHeader, type PopoverHeaderProps, type PopoverProps, PopoverTitle, type PopoverTitleProps, PopoverTrigger, type PopoverTriggerProps, SaveBar, type SaveBarProps, SearchField, type SearchFieldProps, Select, SelectContent, type SelectContentProps, SelectGroup, type SelectGroupProps, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, type SelectProps, SelectSeparator, type SelectSeparatorProps, type SelectSize, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, SideNav, type SideNavAccount, type SideNavItem, type SideNavProps, type SideNavSection, Skeleton, type SkeletonProps, type SkeletonShape, type Space, Spinner, type SpinnerProps, Stack, type StackProps, StatusPill, type StatusPillProps, type StatusPillTone, type StoreOption, StoreSwitcher, type StoreSwitcherProps, type SummaryChip, SummaryChips, type SummaryChipsProps, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, TableLoader, type TableLoaderColumn, type TableLoaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TagInput, type TagInputProps, Text, type TextProps, type TextTone, type TextVariant, Textarea, type TextareaProps, type TextareaSize, type ToastOptions, Toaster, type ToasterProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps, TopBar, type TopBarProps, UnitInput, type UnitInputProps, amountToPaise, currencySymbol, formatCount, formatDate, formatIsoDate, formatMoney, formatPaise, formatPaiseForEditing, formatTime, getInitials, numberSeparators, paiseToAmount, parseDate, parseMoney, toast };
|
|
136
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertDialogTriggerProps, type AlertProps, type AlertTone, AppShell, type AppShellProps, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, type ButtonVariant, Calendar, type CalendarProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, Chart, type ChartAspect, type ChartColor, type ChartConfig, ChartLegend, ChartLegendContent, type ChartLegendContentProps, type ChartLegendProps, type ChartProps, type ChartSeriesConfig, type ChartTable, ChartTooltip, ChartTooltipContent, type ChartTooltipContentProps, type ChartTooltipProps, Checkbox, CheckboxList, type CheckboxListItem, type CheckboxListProps, type CheckboxProps, Collapsible, type CollapsibleProps, Combobox, type ComboboxItem, type ComboboxProps, DataTable, type DataTableColumn, type DataTableProps, type DataTableSort, DateInput, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, type DateRangeValue, Definition, type DefinitionProps, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, Drawer, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyState, type EmptyStateProps, FORMAT, Field, type FieldControlProps, type FieldProps, FilterTabs, type FilterTabsItem, type FilterTabsProps, GlobalSearch, type GlobalSearchGroup, type GlobalSearchProps, type GlobalSearchResult, Icon, type IconName, type IconProps, type IconSize, type IconTone, Inline, type InlineProps, Input, InputGroup, InputGroupAddon, type InputGroupAddonAlign, type InputGroupAddonProps, InputGroupInput, type InputGroupInputProps, type InputGroupProps, InputGroupShortcut, type InputGroupShortcutProps, type InputGroupSize, InputGroupText, type InputGroupTextProps, InputOtp, type InputOtpProps, type InputProps, type InputSize, Kbd, KbdGroup, type KbdGroupProps, type KbdProps, type KeyValueItem, KeyValueList, type KeyValueListProps, Label, type LabelProps, Link, type LinkProps, LinkProvider, type LinkProviderProps, type LinkRender, type LinkRenderProps, MONEY_NUMBER_FORMAT, MediaGrid, type MediaGridItem, type MediaGridProps, type MetricSegment, MetricStrip, type MetricStripProps, MoneyInput, type MoneyInputProps, PageHeader, type PageHeaderMenuItem, type PageHeaderProps, Pagination, type PaginationProps, Popover, PopoverContent, type PopoverContentProps, PopoverDescription, type PopoverDescriptionProps, PopoverHeader, type PopoverHeaderProps, type PopoverProps, PopoverTitle, type PopoverTitleProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, SaveBar, type SaveBarProps, ScrollArea, type ScrollAreaProps, SearchField, type SearchFieldProps, Select, SelectContent, type SelectContentProps, SelectGroup, type SelectGroupProps, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, type SelectProps, SelectSeparator, type SelectSeparatorProps, type SelectSize, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, Separator, type SeparatorProps, Sheet, SheetBody, type SheetBodyProps, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, type SheetDescriptionProps, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, type SheetSide, SheetTitle, type SheetTitleProps, SheetTrigger, type SheetTriggerProps, SideNav, type SideNavAccount, type SideNavItem, type SideNavProps, type SideNavSection, Skeleton, type SkeletonProps, type SkeletonShape, type Space, Spinner, type SpinnerProps, Stack, type StackProps, StatusPill, type StatusPillProps, type StatusPillTone, type StoreOption, StoreSwitcher, type StoreSwitcherProps, type SummaryChip, SummaryChips, type SummaryChipsProps, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, TableLoader, type TableLoaderColumn, type TableLoaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TagInput, type TagInputProps, Text, type TextProps, type TextTone, type TextVariant, Textarea, type TextareaProps, type TextareaSize, type ToastOptions, Toaster, type ToasterProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps, TopBar, type TopBarProps, UnitInput, type UnitInputProps, amountToPaise, chartColor, currencySymbol, formatCount, formatDate, formatIsoDate, formatMoney, formatPaise, formatPaiseForEditing, formatTime, getInitials, numberSeparators, paiseToAmount, parseDate, parseMoney, toast };
|