@aortl/admin-react 0.16.2 → 0.17.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 +19 -1
- package/dist/Alert.d.ts +6 -1
- package/dist/Alert.d.ts.map +1 -1
- package/dist/Avatar.d.ts +21 -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 +9 -2
- package/dist/Card.d.ts.map +1 -1
- package/dist/Input.d.ts +6 -1
- package/dist/Input.d.ts.map +1 -1
- package/dist/Separator.d.ts +11 -0
- package/dist/Separator.d.ts.map +1 -0
- package/dist/Table.d.ts +1 -0
- package/dist/Table.d.ts.map +1 -1
- package/dist/admin.scoped.css +345 -7
- package/dist/index.cjs +133 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +131 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export { Accordion, type AccordionProps, type AccordionItemProps, type AccordionSummaryProps, type AccordionContentProps, } from './Accordion';
|
|
2
2
|
export { AdminRoot, type AdminRootProps } from './AdminRoot';
|
|
3
|
-
export { Alert, type AlertProps, type AlertVariant, type AlertTitleProps, type AlertDescriptionProps, } from './Alert';
|
|
3
|
+
export { Alert, type AlertProps, type AlertVariant, type AlertTitleProps, type AlertDescriptionProps, type AlertActionProps, } from './Alert';
|
|
4
4
|
export { AppShell, useAppShell, type AppShellProps, type AppShellMainProps } from './AppShell';
|
|
5
5
|
export { Badge, type BadgeProps, type BadgeVariant, type BadgeSize } from './Badge';
|
|
6
|
-
export { BrandTile, type BrandTileProps } from './BrandTile';
|
|
6
|
+
export { BrandTile, type BrandTileProps, type BrandTileVariant } from './BrandTile';
|
|
7
|
+
export { Avatar, AvatarGroup, type AvatarProps, type AvatarGroupProps, type AvatarSize, type AvatarShape, } from './Avatar';
|
|
7
8
|
export { Button, type ButtonProps, type ButtonVariant, type ButtonSize } from './Button';
|
|
8
9
|
export { ButtonGroup, type ButtonGroupProps, type ButtonGroupOrientation } from './ButtonGroup';
|
|
9
10
|
export { Breadcrumbs, type BreadcrumbsProps, type BreadcrumbItemProps, type BreadcrumbSeparatorProps, } from './Breadcrumbs';
|
|
@@ -12,6 +13,7 @@ export { FileInput, type FileInputProps, type FileInputVariant, type FileInputSi
|
|
|
12
13
|
export { InputGroup, type InputGroupProps, type InputGroupAddonProps } from './InputGroup';
|
|
13
14
|
export { Indicator, type IndicatorProps, type IndicatorPlacement, type IndicatorVertical, type IndicatorHorizontal, } from './Indicator';
|
|
14
15
|
export { Link, type LinkProps } from './Link';
|
|
16
|
+
export { Separator, type SeparatorProps } from './Separator';
|
|
15
17
|
export { Pagination, getPaginationItems, type PaginationProps, type PaginationItem, } from './Pagination';
|
|
16
18
|
export { Textarea, type TextareaProps, type TextareaVariant, type TextareaSize } from './Textarea';
|
|
17
19
|
export { Checkbox, type CheckboxProps, type CheckboxIndicatorProps } from './Checkbox';
|
|
@@ -21,7 +23,7 @@ export { Spinner, type SpinnerProps, type SpinnerSize } from './Spinner';
|
|
|
21
23
|
export { Switch, type SwitchProps, type SwitchThumbProps } from './Switch';
|
|
22
24
|
export { Select, type SelectProps, type SelectTriggerProps, type SelectTriggerVariant, type SelectTriggerSize, type SelectValueProps, type SelectIconProps, type SelectPopupProps, type SelectItemProps, type SelectItemTextProps, type SelectItemIndicatorProps, type SelectGroupProps, type SelectGroupLabelProps, } from './Select';
|
|
23
25
|
export { Container, type ContainerProps, type ContainerSize } from './Container';
|
|
24
|
-
export { Card, type CardProps, type CardVariant, type CardContainerProps, type CardBodyProps, type CardHeaderProps, type CardToolbarProps, type CardTitleProps, type CardDescriptionProps, type CardActionsProps, } from './Card';
|
|
26
|
+
export { Card, type CardProps, type CardVariant, type CardContainerProps, type CardMediaProps, type CardBodyProps, type CardHeaderProps, type CardToolbarProps, type CardTitleProps, type CardDescriptionProps, type CardActionsProps, } from './Card';
|
|
25
27
|
export { StatCard, type StatCardProps } from './StatCard';
|
|
26
28
|
export { BarChart, type BarChartProps, type BarChartContainerProps, type BarProps, type BarChartVariant, type BarChartOrientation, } from './BarChart';
|
|
27
29
|
export { Donut, type DonutProps, type DonutFigureProps, type DonutRingProps } from './Donut';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EACL,KAAK,EACL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EACL,KAAK,EACL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,GACtB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CA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BAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,GAChC,MAAM,WAAW,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { clsx } from "clsx";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Children, Fragment as Fragment$1, createContext, createElement, isValidElement, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
4
|
+
import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
|
|
4
5
|
import { Button as Button$1 } from "@base-ui/react/button";
|
|
5
6
|
import { Input as Input$1 } from "@base-ui/react/input";
|
|
6
7
|
import { Field as Field$1 } from "@base-ui/react/field";
|
|
@@ -113,7 +114,7 @@ function renderIcon(icon, size = "1em") {
|
|
|
113
114
|
}
|
|
114
115
|
//#endregion
|
|
115
116
|
//#region src/Alert.tsx
|
|
116
|
-
function AlertRoot({ variant, icon, title, description, className, role, children, ...rest }) {
|
|
117
|
+
function AlertRoot({ variant, icon, title, description, action, className, role, children, ...rest }) {
|
|
117
118
|
return /* @__PURE__ */ jsxs("div", {
|
|
118
119
|
role: role ?? (variant === "danger" || variant === "warning" ? "alert" : "status"),
|
|
119
120
|
className: cn(["alert", `alert-${variant}`], className),
|
|
@@ -122,7 +123,8 @@ function AlertRoot({ variant, icon, title, description, className, role, childre
|
|
|
122
123
|
renderIcon(icon),
|
|
123
124
|
title !== void 0 ? /* @__PURE__ */ jsx(AlertTitle, { children: title }) : null,
|
|
124
125
|
description !== void 0 ? /* @__PURE__ */ jsx(AlertDescription, { children: description }) : null,
|
|
125
|
-
children
|
|
126
|
+
children,
|
|
127
|
+
action !== void 0 ? /* @__PURE__ */ jsx(AlertAction, { children: action }) : null
|
|
126
128
|
]
|
|
127
129
|
});
|
|
128
130
|
}
|
|
@@ -138,9 +140,16 @@ function AlertDescription({ className, ...rest }) {
|
|
|
138
140
|
...rest
|
|
139
141
|
});
|
|
140
142
|
}
|
|
143
|
+
function AlertAction({ className, ...rest }) {
|
|
144
|
+
return /* @__PURE__ */ jsx("div", {
|
|
145
|
+
className: cn("alert-action", className),
|
|
146
|
+
...rest
|
|
147
|
+
});
|
|
148
|
+
}
|
|
141
149
|
var Alert = Object.assign(AlertRoot, {
|
|
142
150
|
Title: AlertTitle,
|
|
143
|
-
Description: AlertDescription
|
|
151
|
+
Description: AlertDescription,
|
|
152
|
+
Action: AlertAction
|
|
144
153
|
});
|
|
145
154
|
//#endregion
|
|
146
155
|
//#region src/AppShell.tsx
|
|
@@ -188,25 +197,97 @@ function AppShellMain({ className, ...rest }) {
|
|
|
188
197
|
var AppShell = Object.assign(AppShellRoot, { Main: AppShellMain });
|
|
189
198
|
//#endregion
|
|
190
199
|
//#region src/Badge.tsx
|
|
191
|
-
function
|
|
200
|
+
function RemoveIcon() {
|
|
201
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
202
|
+
width: "1em",
|
|
203
|
+
height: "1em",
|
|
204
|
+
viewBox: "0 0 24 24",
|
|
205
|
+
fill: "none",
|
|
206
|
+
stroke: "currentColor",
|
|
207
|
+
strokeWidth: "2",
|
|
208
|
+
strokeLinecap: "round",
|
|
209
|
+
strokeLinejoin: "round",
|
|
210
|
+
"aria-hidden": "true",
|
|
211
|
+
children: [/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }), /* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })]
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
function Badge({ variant = "neutral", size = "md", icon, soft = false, onRemove, removeLabel = "Remove", className, children, ...rest }) {
|
|
192
215
|
return /* @__PURE__ */ jsxs("span", {
|
|
193
216
|
className: cn([
|
|
194
217
|
"badge",
|
|
195
218
|
variant !== "neutral" && `badge-${variant}`,
|
|
196
|
-
size !== "md" && `badge-${size}
|
|
219
|
+
size !== "md" && `badge-${size}`,
|
|
220
|
+
soft && "badge-soft"
|
|
197
221
|
], className),
|
|
198
222
|
...rest,
|
|
199
|
-
children: [
|
|
223
|
+
children: [
|
|
224
|
+
renderIcon(icon),
|
|
225
|
+
children,
|
|
226
|
+
onRemove ? /* @__PURE__ */ jsx("button", {
|
|
227
|
+
type: "button",
|
|
228
|
+
className: cn("badge-remove", void 0),
|
|
229
|
+
"aria-label": removeLabel,
|
|
230
|
+
onClick: onRemove,
|
|
231
|
+
children: /* @__PURE__ */ jsx(RemoveIcon, {})
|
|
232
|
+
}) : null
|
|
233
|
+
]
|
|
200
234
|
});
|
|
201
235
|
}
|
|
202
236
|
//#endregion
|
|
203
237
|
//#region src/BrandTile.tsx
|
|
204
|
-
|
|
238
|
+
/**
|
|
239
|
+
* Brand/system mark for the navbar — monogram, icon, or shop logo. Precedence
|
|
240
|
+
* is `src` > `icon` > `monogram`. Monogram/icon tiles are `aria-hidden`; image
|
|
241
|
+
* tiles expose `alt` to assistive tech instead.
|
|
242
|
+
*/
|
|
243
|
+
function BrandTile({ variant = "solid", size = "md", monogram, icon, src, alt = "", className, children, ...rest }) {
|
|
244
|
+
const classes = cn([
|
|
245
|
+
"brand-tile",
|
|
246
|
+
variant !== "solid" && `brand-tile-${variant}`,
|
|
247
|
+
size === "lg" && "brand-tile-lg"
|
|
248
|
+
], className);
|
|
249
|
+
if (src) return /* @__PURE__ */ jsx("span", {
|
|
250
|
+
className: classes,
|
|
251
|
+
...rest,
|
|
252
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
253
|
+
src,
|
|
254
|
+
alt
|
|
255
|
+
})
|
|
256
|
+
});
|
|
205
257
|
return /* @__PURE__ */ jsx("span", {
|
|
206
|
-
className:
|
|
258
|
+
className: classes,
|
|
207
259
|
"aria-hidden": true,
|
|
208
260
|
...rest,
|
|
209
|
-
children: icon ? renderIcon(icon
|
|
261
|
+
children: icon ? renderIcon(icon) : children ?? monogram
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
//#endregion
|
|
265
|
+
//#region src/Avatar.tsx
|
|
266
|
+
/**
|
|
267
|
+
* Image avatar with an initials fallback. Initials show until the image loads
|
|
268
|
+
* (and again, React-only, if it errors); the vanilla CSS layers the `<img>`
|
|
269
|
+
* over the initials instead.
|
|
270
|
+
*/
|
|
271
|
+
function Avatar({ src, alt, initials, size = "md", shape = "circle", className, children, ...rest }) {
|
|
272
|
+
const fallback = children ?? initials;
|
|
273
|
+
return /* @__PURE__ */ jsxs(Avatar$1.Root, {
|
|
274
|
+
className: cn([
|
|
275
|
+
"avatar",
|
|
276
|
+
size !== "md" && `avatar-${size}`,
|
|
277
|
+
shape === "square" && "avatar-square"
|
|
278
|
+
], className),
|
|
279
|
+
...rest,
|
|
280
|
+
children: [fallback !== void 0 ? /* @__PURE__ */ jsx(Avatar$1.Fallback, { children: fallback }) : null, src !== void 0 ? /* @__PURE__ */ jsx(Avatar$1.Image, {
|
|
281
|
+
src,
|
|
282
|
+
alt
|
|
283
|
+
}) : null]
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
/** Overlapping stack of avatars; later children paint on top. */
|
|
287
|
+
function AvatarGroup({ className, ...rest }) {
|
|
288
|
+
return /* @__PURE__ */ jsx("div", {
|
|
289
|
+
className: cn("avatar-group", className),
|
|
290
|
+
...rest
|
|
210
291
|
});
|
|
211
292
|
}
|
|
212
293
|
//#endregion
|
|
@@ -534,8 +615,8 @@ var Breadcrumbs = Object.assign(BreadcrumbsRoot, {
|
|
|
534
615
|
});
|
|
535
616
|
//#endregion
|
|
536
617
|
//#region src/Input.tsx
|
|
537
|
-
function Input({ variant = "bordered", inputSize = "md", className, type = "text", ...rest }) {
|
|
538
|
-
|
|
618
|
+
function Input({ variant = "bordered", inputSize = "md", icon, iconTrailing, className, type = "text", ...rest }) {
|
|
619
|
+
const input = /* @__PURE__ */ jsx(Input$1, {
|
|
539
620
|
type,
|
|
540
621
|
className: cn([
|
|
541
622
|
"input",
|
|
@@ -544,6 +625,15 @@ function Input({ variant = "bordered", inputSize = "md", className, type = "text
|
|
|
544
625
|
], className),
|
|
545
626
|
...rest
|
|
546
627
|
});
|
|
628
|
+
if (icon == null && iconTrailing == null) return input;
|
|
629
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
630
|
+
className: cn("input-icon", void 0),
|
|
631
|
+
children: [
|
|
632
|
+
renderIcon(icon),
|
|
633
|
+
input,
|
|
634
|
+
renderIcon(iconTrailing)
|
|
635
|
+
]
|
|
636
|
+
});
|
|
547
637
|
}
|
|
548
638
|
//#endregion
|
|
549
639
|
//#region src/FileInput.tsx
|
|
@@ -626,6 +716,20 @@ function Link({ external, icon, iconTrailing, className, target, rel, children,
|
|
|
626
716
|
});
|
|
627
717
|
}
|
|
628
718
|
//#endregion
|
|
719
|
+
//#region src/Separator.tsx
|
|
720
|
+
/**
|
|
721
|
+
* A styled `<hr>` (implicit `role="separator"`). Margins are zeroed — spacing
|
|
722
|
+
* comes from the parent's gap or margin utilities.
|
|
723
|
+
*/
|
|
724
|
+
function Separator({ orientation = "horizontal", className, ...rest }) {
|
|
725
|
+
const vertical = orientation === "vertical";
|
|
726
|
+
return /* @__PURE__ */ jsx("hr", {
|
|
727
|
+
className: cn(["separator", vertical && "separator-vertical"], className),
|
|
728
|
+
"aria-orientation": vertical ? "vertical" : void 0,
|
|
729
|
+
...rest
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
//#endregion
|
|
629
733
|
//#region src/Pagination.tsx
|
|
630
734
|
/** Pure (safe during render): previous, numbers/ellipses (`boundaryCount` at each end, `siblingCount` around `page`), next. */
|
|
631
735
|
function getPaginationItems({ page, total, siblingCount = 1, boundaryCount = 1 }) {
|
|
@@ -1017,13 +1121,14 @@ function Container({ size = "md", compact, className, ...rest }) {
|
|
|
1017
1121
|
* The bare `.card` container — no body, no title. Use this when you need to
|
|
1018
1122
|
* compose the internals yourself (e.g. a media block above the body).
|
|
1019
1123
|
*/
|
|
1020
|
-
function CardContainer({ variant = "default", bordered, compact, className, ...rest }) {
|
|
1124
|
+
function CardContainer({ variant = "default", bordered, compact, scroll, className, ...rest }) {
|
|
1021
1125
|
return /* @__PURE__ */ jsx("div", {
|
|
1022
1126
|
className: cn([
|
|
1023
1127
|
"card",
|
|
1024
1128
|
variant !== "default" && `card-${variant}`,
|
|
1025
1129
|
bordered && "card-bordered",
|
|
1026
|
-
compact && "card-compact"
|
|
1130
|
+
compact && "card-compact",
|
|
1131
|
+
scroll && "card-scroll"
|
|
1027
1132
|
], className),
|
|
1028
1133
|
...rest
|
|
1029
1134
|
});
|
|
@@ -1033,23 +1138,29 @@ function CardContainer({ variant = "default", bordered, compact, className, ...r
|
|
|
1033
1138
|
* an optional title (with icon), description, children, and actions. For
|
|
1034
1139
|
* anything outside that shape, use `<Card.Container>` and compose by hand.
|
|
1035
1140
|
*/
|
|
1036
|
-
function CardRoot({ variant, bordered, compact, icon, title, description, toolbar, actions, className, children, ...rest }) {
|
|
1141
|
+
function CardRoot({ variant, bordered, compact, media, icon, title, description, toolbar, actions, className, children, ...rest }) {
|
|
1037
1142
|
const titleEl = icon !== void 0 || title !== void 0 ? /* @__PURE__ */ jsx(CardTitle, {
|
|
1038
1143
|
icon,
|
|
1039
1144
|
children: title
|
|
1040
1145
|
}) : null;
|
|
1041
|
-
return /* @__PURE__ */
|
|
1146
|
+
return /* @__PURE__ */ jsxs(CardContainer, {
|
|
1042
1147
|
variant,
|
|
1043
1148
|
bordered,
|
|
1044
1149
|
compact,
|
|
1045
1150
|
className,
|
|
1046
1151
|
...rest,
|
|
1047
|
-
children: /* @__PURE__ */ jsxs(CardBody, { children: [
|
|
1152
|
+
children: [media !== void 0 ? /* @__PURE__ */ jsx(CardMedia, { children: media }) : null, /* @__PURE__ */ jsxs(CardBody, { children: [
|
|
1048
1153
|
toolbar !== void 0 ? /* @__PURE__ */ jsxs(CardHeader, { children: [titleEl, /* @__PURE__ */ jsx(CardToolbar, { children: toolbar })] }) : titleEl,
|
|
1049
1154
|
description !== void 0 ? /* @__PURE__ */ jsx(CardDescription, { children: description }) : null,
|
|
1050
1155
|
children,
|
|
1051
1156
|
actions !== void 0 ? /* @__PURE__ */ jsx(CardActions, { children: actions }) : null
|
|
1052
|
-
] })
|
|
1157
|
+
] })]
|
|
1158
|
+
});
|
|
1159
|
+
}
|
|
1160
|
+
function CardMedia({ className, ...rest }) {
|
|
1161
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1162
|
+
className: cn("card-media", className),
|
|
1163
|
+
...rest
|
|
1053
1164
|
});
|
|
1054
1165
|
}
|
|
1055
1166
|
function CardBody({ className, ...rest }) {
|
|
@@ -1091,6 +1202,7 @@ function CardActions({ className, ...rest }) {
|
|
|
1091
1202
|
}
|
|
1092
1203
|
var Card = Object.assign(CardRoot, {
|
|
1093
1204
|
Container: CardContainer,
|
|
1205
|
+
Media: CardMedia,
|
|
1094
1206
|
Body: CardBody,
|
|
1095
1207
|
Header: CardHeader,
|
|
1096
1208
|
Toolbar: CardToolbar,
|
|
@@ -1988,6 +2100,7 @@ function TableBody({ className, ...rest }) {
|
|
|
1988
2100
|
...rest
|
|
1989
2101
|
});
|
|
1990
2102
|
}
|
|
2103
|
+
/** Footer rows are semibold by default; the first row gets a strong top divider against the body. */
|
|
1991
2104
|
function TableFoot({ className, ...rest }) {
|
|
1992
2105
|
return /* @__PURE__ */ jsx("tfoot", {
|
|
1993
2106
|
className,
|
|
@@ -2192,6 +2305,6 @@ var Sidebar = Object.assign(SidebarRoot, {
|
|
|
2192
2305
|
CollapseToggle: SidebarCollapseToggle
|
|
2193
2306
|
});
|
|
2194
2307
|
//#endregion
|
|
2195
|
-
export { Accordion, AdminRoot, Alert, AppShell, Badge, BarChart, BrandTile, Breadcrumbs, Button, ButtonGroup, Card, ChartLegend, Checkbox, CodeBlock, Container, Dialog, Donut, Field, FileInput, Footer, Indicator, Input, InputGroup, Kbd, Link, Menu, Navbar, Pagination, Progress, PropertyList, Prose, Radio, RadioGroup, SERIES, Select, Sidebar, Spinner, StackedBar, StatCard, Switch, Table, Tabs, Textarea, Tooltip, getPaginationItems, useAppShell, useHotkey };
|
|
2308
|
+
export { Accordion, AdminRoot, Alert, AppShell, Avatar, AvatarGroup, Badge, BarChart, BrandTile, Breadcrumbs, Button, ButtonGroup, Card, ChartLegend, Checkbox, CodeBlock, Container, Dialog, Donut, Field, FileInput, Footer, Indicator, Input, InputGroup, Kbd, Link, Menu, Navbar, Pagination, Progress, PropertyList, Prose, Radio, RadioGroup, SERIES, Select, Separator, Sidebar, Spinner, StackedBar, StatCard, Switch, Table, Tabs, Textarea, Tooltip, getPaginationItems, useAppShell, useHotkey };
|
|
2196
2309
|
|
|
2197
2310
|
//# sourceMappingURL=index.mjs.map
|