@aortl/admin-react 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Alert.d.ts +1 -1
- package/dist/Alert.d.ts.map +1 -1
- package/dist/Badge.d.ts.map +1 -1
- package/dist/Button.d.ts +1 -1
- package/dist/Button.d.ts.map +1 -1
- package/dist/Card.d.ts +7 -2
- package/dist/Card.d.ts.map +1 -1
- package/dist/Container.d.ts +16 -0
- package/dist/Container.d.ts.map +1 -0
- package/dist/FileInput.d.ts.map +1 -1
- package/dist/Input.d.ts.map +1 -1
- package/dist/Select.d.ts.map +1 -1
- package/dist/StatCard.d.ts +10 -5
- package/dist/StatCard.d.ts.map +1 -1
- package/dist/Textarea.d.ts.map +1 -1
- package/dist/admin.scoped.css +153 -63
- package/dist/index.cjs +43 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +43 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -100,7 +100,7 @@ function renderIcon(icon, size = "1em") {
|
|
|
100
100
|
}
|
|
101
101
|
//#endregion
|
|
102
102
|
//#region src/Alert.tsx
|
|
103
|
-
function AlertRoot({ variant
|
|
103
|
+
function AlertRoot({ variant, icon, title, description, className, role, children, ...rest }) {
|
|
104
104
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
105
105
|
role: role ?? (variant === "danger" || variant === "warning" ? "alert" : "status"),
|
|
106
106
|
className: cn(["alert", `alert-${variant}`], className),
|
|
@@ -183,7 +183,7 @@ function Badge({ variant = "neutral", size = "md", icon, className, children, ..
|
|
|
183
183
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
184
184
|
className: cn([
|
|
185
185
|
"badge",
|
|
186
|
-
`badge-${variant}`,
|
|
186
|
+
variant !== "neutral" && `badge-${variant}`,
|
|
187
187
|
size !== "md" && `badge-${size}`
|
|
188
188
|
], className),
|
|
189
189
|
...rest,
|
|
@@ -447,7 +447,7 @@ function useHotkey(keys, handler, options) {
|
|
|
447
447
|
}
|
|
448
448
|
//#endregion
|
|
449
449
|
//#region src/Button.tsx
|
|
450
|
-
function Button({ variant = "
|
|
450
|
+
function Button({ variant = "default", size = "md", fullWidth, loading, icon, iconTrailing, hotkey, className, type = "button", disabled, children, onClick, ...rest }) {
|
|
451
451
|
const { ariaKeyShortcuts, primaryChord } = useHotkey(hotkey, (e) => onClick?.(e), { enabled: !disabled && !loading });
|
|
452
452
|
const iconOnly = children == null && (icon != null || iconTrailing != null);
|
|
453
453
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_button.Button, {
|
|
@@ -458,7 +458,7 @@ function Button({ variant = "primary", size = "md", fullWidth, loading, icon, ic
|
|
|
458
458
|
"aria-keyshortcuts": ariaKeyShortcuts,
|
|
459
459
|
className: cn([
|
|
460
460
|
"btn",
|
|
461
|
-
`btn-${variant}`,
|
|
461
|
+
variant !== "default" && `btn-${variant}`,
|
|
462
462
|
size !== "md" && `btn-${size}`,
|
|
463
463
|
fullWidth && "btn-full-width",
|
|
464
464
|
loading && "btn-loading",
|
|
@@ -531,7 +531,7 @@ function Input({ variant = "bordered", inputSize = "md", className, type = "text
|
|
|
531
531
|
type,
|
|
532
532
|
className: cn([
|
|
533
533
|
"input",
|
|
534
|
-
`input-${variant}`,
|
|
534
|
+
variant !== "bordered" && `input-${variant}`,
|
|
535
535
|
inputSize !== "md" && `input-${inputSize}`
|
|
536
536
|
], className),
|
|
537
537
|
...rest
|
|
@@ -544,7 +544,7 @@ function FileInput({ variant = "bordered", inputSize = "md", className, ...rest
|
|
|
544
544
|
type: "file",
|
|
545
545
|
className: cn([
|
|
546
546
|
"file-input",
|
|
547
|
-
`file-input-${variant}`,
|
|
547
|
+
variant !== "bordered" && `file-input-${variant}`,
|
|
548
548
|
inputSize !== "md" && `file-input-${inputSize}`
|
|
549
549
|
], className),
|
|
550
550
|
...rest
|
|
@@ -763,7 +763,7 @@ function Textarea({ variant = "bordered", textareaSize = "md", className, ...res
|
|
|
763
763
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
764
764
|
className: cn([
|
|
765
765
|
"textarea",
|
|
766
|
-
`textarea-${variant}`,
|
|
766
|
+
variant !== "bordered" && `textarea-${variant}`,
|
|
767
767
|
textareaSize !== "md" && `textarea-${textareaSize}`
|
|
768
768
|
], className),
|
|
769
769
|
...rest
|
|
@@ -879,7 +879,7 @@ function SelectTrigger({ variant = "bordered", triggerSize = "md", className, ..
|
|
|
879
879
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_select.Select.Trigger, {
|
|
880
880
|
className: cn([
|
|
881
881
|
"select",
|
|
882
|
-
`select-${variant}`,
|
|
882
|
+
variant !== "bordered" && `select-${variant}`,
|
|
883
883
|
triggerSize !== "md" && `select-${triggerSize}`
|
|
884
884
|
], className),
|
|
885
885
|
...rest
|
|
@@ -975,15 +975,34 @@ var Select = Object.assign(SelectRoot, {
|
|
|
975
975
|
GroupLabel: SelectGroupLabel
|
|
976
976
|
});
|
|
977
977
|
//#endregion
|
|
978
|
+
//#region src/Container.tsx
|
|
979
|
+
/**
|
|
980
|
+
* Page content region: a centered, max-width column that also owns the
|
|
981
|
+
* vertical gap between stacked sections. Place inside `<AppShell.Main>`,
|
|
982
|
+
* which provides no padding of its own. Distinct from the `.Container`
|
|
983
|
+
* escape hatch (e.g. `Card.Container`) — this is a standalone page region.
|
|
984
|
+
*/
|
|
985
|
+
function Container({ size = "md", compact, className, ...rest }) {
|
|
986
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
987
|
+
className: cn([
|
|
988
|
+
"container",
|
|
989
|
+
size !== "md" && `container-${size}`,
|
|
990
|
+
compact && "container-compact"
|
|
991
|
+
], className),
|
|
992
|
+
...rest
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
//#endregion
|
|
978
996
|
//#region src/Card.tsx
|
|
979
997
|
/**
|
|
980
998
|
* The bare `.card` container — no body, no title. Use this when you need to
|
|
981
999
|
* compose the internals yourself (e.g. a media block above the body).
|
|
982
1000
|
*/
|
|
983
|
-
function CardContainer({ bordered, compact, className, ...rest }) {
|
|
1001
|
+
function CardContainer({ variant = "default", bordered, compact, className, ...rest }) {
|
|
984
1002
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
985
1003
|
className: cn([
|
|
986
1004
|
"card",
|
|
1005
|
+
variant !== "default" && `card-${variant}`,
|
|
987
1006
|
bordered && "card-bordered",
|
|
988
1007
|
compact && "card-compact"
|
|
989
1008
|
], className),
|
|
@@ -995,12 +1014,13 @@ function CardContainer({ bordered, compact, className, ...rest }) {
|
|
|
995
1014
|
* an optional title (with icon), description, children, and actions. For
|
|
996
1015
|
* anything outside that shape, use `<Card.Container>` and compose by hand.
|
|
997
1016
|
*/
|
|
998
|
-
function CardRoot({ bordered, compact, icon, title, description, toolbar, actions, className, children, ...rest }) {
|
|
1017
|
+
function CardRoot({ variant, bordered, compact, icon, title, description, toolbar, actions, className, children, ...rest }) {
|
|
999
1018
|
const titleEl = icon !== void 0 || title !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardTitle, {
|
|
1000
1019
|
icon,
|
|
1001
1020
|
children: title
|
|
1002
1021
|
}) : null;
|
|
1003
1022
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardContainer, {
|
|
1023
|
+
variant,
|
|
1004
1024
|
bordered,
|
|
1005
1025
|
compact,
|
|
1006
1026
|
className,
|
|
@@ -1062,18 +1082,22 @@ var Card = Object.assign(CardRoot, {
|
|
|
1062
1082
|
//#endregion
|
|
1063
1083
|
//#region src/StatCard.tsx
|
|
1064
1084
|
/**
|
|
1065
|
-
* Compact KPI tile — `label / value / detail`.
|
|
1066
|
-
*
|
|
1067
|
-
* value dominates, label is
|
|
1068
|
-
*
|
|
1085
|
+
* Compact KPI tile — `label / value / detail`. Renders a `.card` shell (so it
|
|
1086
|
+
* shares the surface, border, radius, shadow, and every card modifier) with an
|
|
1087
|
+
* inverted inner hierarchy: the value dominates, the label is a small
|
|
1088
|
+
* annotation. `compact`/`bordered` map to the shared `.card-compact`/
|
|
1089
|
+
* `.card-bordered` modifiers. For free-form tiles, use `<Card>`; for
|
|
1090
|
+
* label/value tables, use `<PropertyList>`.
|
|
1069
1091
|
*/
|
|
1070
|
-
function StatCard({ label, value, detail, icon, compact, bordered, className, children, ...rest }) {
|
|
1092
|
+
function StatCard({ variant = "default", label, value, detail, icon, compact, bordered, className, children, ...rest }) {
|
|
1071
1093
|
const hasLabel = icon !== void 0 || label !== void 0;
|
|
1072
1094
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1073
1095
|
className: cn([
|
|
1096
|
+
"card",
|
|
1074
1097
|
"stat-card",
|
|
1075
|
-
|
|
1076
|
-
|
|
1098
|
+
variant !== "default" && `card-${variant}`,
|
|
1099
|
+
compact && "card-compact",
|
|
1100
|
+
bordered && "card-bordered"
|
|
1077
1101
|
], className),
|
|
1078
1102
|
...rest,
|
|
1079
1103
|
children: [
|
|
@@ -1469,7 +1493,7 @@ function TabsRoot({ variant = "bordered", size = "md", fullWidth = false, classN
|
|
|
1469
1493
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_tabs.Tabs.Root, {
|
|
1470
1494
|
className: cn([
|
|
1471
1495
|
"tabs",
|
|
1472
|
-
`tabs-${variant}`,
|
|
1496
|
+
variant !== "bordered" && `tabs-${variant}`,
|
|
1473
1497
|
size !== "md" && `tabs-${size}`,
|
|
1474
1498
|
fullWidth && "tabs-full-width"
|
|
1475
1499
|
], className),
|
|
@@ -1919,6 +1943,7 @@ exports.ButtonGroup = ButtonGroup;
|
|
|
1919
1943
|
exports.Card = Card;
|
|
1920
1944
|
exports.Checkbox = Checkbox;
|
|
1921
1945
|
exports.CodeBlock = CodeBlock;
|
|
1946
|
+
exports.Container = Container;
|
|
1922
1947
|
exports.Dialog = Dialog;
|
|
1923
1948
|
exports.Field = Field;
|
|
1924
1949
|
exports.FileInput = FileInput;
|