@frontmcp/ui 0.12.2 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +279 -72
- package/bridge/adapters/claude.adapter.d.ts.map +1 -1
- package/bridge/adapters/gemini.adapter.d.ts.map +1 -1
- package/bridge/index.js +2 -36
- package/components/Alert/Alert.d.ts +11 -0
- package/components/Alert/Alert.d.ts.map +1 -0
- package/components/Alert/index.d.ts +4 -0
- package/components/Alert/index.d.ts.map +1 -0
- package/components/Alert/index.js +61 -0
- package/components/Avatar/Avatar.d.ts +10 -0
- package/components/Avatar/Avatar.d.ts.map +1 -0
- package/components/Avatar/index.d.ts +4 -0
- package/components/Avatar/index.d.ts.map +1 -0
- package/components/Avatar/index.js +43 -0
- package/components/Badge/Badge.d.ts +13 -0
- package/components/Badge/Badge.d.ts.map +1 -0
- package/components/Badge/index.d.ts +4 -0
- package/components/Badge/index.d.ts.map +1 -0
- package/{render → components/Badge}/index.js +54 -42
- package/components/Button/Button.d.ts +16 -0
- package/components/Button/Button.d.ts.map +1 -0
- package/components/Button/index.d.ts +4 -0
- package/components/Button/index.d.ts.map +1 -0
- package/components/Button/index.js +91 -0
- package/components/Card/Card.d.ts +25 -0
- package/components/Card/Card.d.ts.map +1 -0
- package/components/Card/index.d.ts +4 -0
- package/components/Card/index.d.ts.map +1 -0
- package/components/Card/index.js +110 -0
- package/components/List/List.d.ts +15 -0
- package/components/List/List.d.ts.map +1 -0
- package/components/List/index.d.ts +4 -0
- package/components/List/index.d.ts.map +1 -0
- package/components/List/index.js +58 -0
- package/components/Loader/Loader.d.ts +28 -0
- package/components/Loader/Loader.d.ts.map +1 -0
- package/components/Loader/LoaderContext.d.ts +20 -0
- package/components/Loader/LoaderContext.d.ts.map +1 -0
- package/components/Loader/index.d.ts +6 -0
- package/components/Loader/index.d.ts.map +1 -0
- package/components/Loader/index.js +174 -0
- package/components/Modal/Modal.d.ts +22 -0
- package/components/Modal/Modal.d.ts.map +1 -0
- package/components/Modal/index.d.ts +4 -0
- package/components/Modal/index.d.ts.map +1 -0
- package/components/Modal/index.js +80 -0
- package/components/Select/Select.d.ts +21 -0
- package/components/Select/Select.d.ts.map +1 -0
- package/components/Select/index.d.ts +4 -0
- package/components/Select/index.d.ts.map +1 -0
- package/components/Select/index.js +78 -0
- package/components/Table/Table.d.ts +15 -0
- package/components/Table/Table.d.ts.map +1 -0
- package/components/Table/index.d.ts +4 -0
- package/components/Table/index.d.ts.map +1 -0
- package/components/Table/index.js +70 -0
- package/components/TextField/TextField.d.ts +19 -0
- package/components/TextField/TextField.d.ts.map +1 -0
- package/components/TextField/index.d.ts +4 -0
- package/components/TextField/index.d.ts.map +1 -0
- package/components/TextField/index.js +77 -0
- package/components/index.d.ts +22 -28
- package/components/index.d.ts.map +1 -1
- package/components/index.js +523 -2521
- package/esm/bridge/index.mjs +2 -6
- package/esm/components/Alert/index.mjs +28 -0
- package/esm/components/Avatar/index.mjs +10 -0
- package/esm/components/Badge/index.mjs +56 -0
- package/esm/components/Button/index.mjs +58 -0
- package/esm/components/Card/index.mjs +77 -0
- package/esm/components/List/index.mjs +25 -0
- package/esm/components/Loader/index.mjs +141 -0
- package/esm/components/Modal/index.mjs +47 -0
- package/esm/components/Select/index.mjs +45 -0
- package/esm/components/Table/index.mjs +37 -0
- package/esm/components/TextField/index.mjs +44 -0
- package/esm/components/index.mjs +513 -2415
- package/esm/index.mjs +62 -4652
- package/esm/package.json +372 -16
- package/esm/react/index.mjs +2 -285
- package/esm/renderer/charts/index.mjs +336 -0
- package/esm/renderer/common/index.mjs +135 -0
- package/esm/renderer/csv/index.mjs +193 -0
- package/esm/renderer/flow/index.mjs +259 -0
- package/esm/renderer/html/index.mjs +99 -0
- package/esm/renderer/image/index.mjs +125 -0
- package/esm/renderer/index.mjs +2173 -0
- package/esm/renderer/maps/index.mjs +217 -0
- package/esm/renderer/math/index.mjs +229 -0
- package/esm/renderer/mdx/index.mjs +261 -0
- package/esm/renderer/media/index.mjs +235 -0
- package/esm/renderer/mermaid/index.mjs +220 -0
- package/esm/renderer/pdf/index.mjs +229 -0
- package/esm/renderer/react/index.mjs +230 -0
- package/esm/runtime/index.mjs +194 -0
- package/esm/theme/index.mjs +93 -0
- package/index.d.ts +10 -18
- package/index.d.ts.map +1 -1
- package/index.js +63 -4806
- package/package.json +372 -16
- package/react/index.d.ts +8 -54
- package/react/index.d.ts.map +1 -1
- package/react/index.js +2 -295
- package/renderer/auto-detect.d.ts +39 -0
- package/renderer/auto-detect.d.ts.map +1 -0
- package/renderer/charts/index.d.ts +22 -0
- package/renderer/charts/index.d.ts.map +1 -0
- package/renderer/charts/index.js +367 -0
- package/renderer/common/index.d.ts +5 -0
- package/renderer/common/index.d.ts.map +1 -0
- package/renderer/common/index.js +158 -0
- package/renderer/common/inject-stylesheet.d.ts +9 -0
- package/renderer/common/inject-stylesheet.d.ts.map +1 -0
- package/renderer/common/lazy-import.d.ts +85 -0
- package/renderer/common/lazy-import.d.ts.map +1 -0
- package/renderer/common/use-lazy-module.d.ts +13 -0
- package/renderer/common/use-lazy-module.d.ts.map +1 -0
- package/renderer/common/use-renderer-theme.d.ts +35 -0
- package/renderer/common/use-renderer-theme.d.ts.map +1 -0
- package/renderer/csv/index.d.ts +12 -0
- package/renderer/csv/index.d.ts.map +1 -0
- package/renderer/csv/index.js +224 -0
- package/renderer/flow/index.d.ts +40 -0
- package/renderer/flow/index.d.ts.map +1 -0
- package/renderer/flow/index.js +290 -0
- package/renderer/html/index.d.ts +12 -0
- package/renderer/html/index.d.ts.map +1 -0
- package/renderer/html/index.js +130 -0
- package/renderer/image/index.d.ts +11 -0
- package/renderer/image/index.d.ts.map +1 -0
- package/renderer/image/index.js +156 -0
- package/renderer/index.d.ts +32 -0
- package/renderer/index.d.ts.map +1 -0
- package/renderer/index.js +2206 -0
- package/renderer/maps/index.d.ts +27 -0
- package/renderer/maps/index.d.ts.map +1 -0
- package/renderer/maps/index.js +248 -0
- package/renderer/math/index.d.ts +11 -0
- package/renderer/math/index.d.ts.map +1 -0
- package/renderer/math/index.js +260 -0
- package/renderer/mdx/index.d.ts +10 -0
- package/renderer/mdx/index.d.ts.map +1 -0
- package/renderer/mdx/index.js +292 -0
- package/renderer/media/index.d.ts +20 -0
- package/renderer/media/index.d.ts.map +1 -0
- package/renderer/media/index.js +266 -0
- package/renderer/mermaid/index.d.ts +11 -0
- package/renderer/mermaid/index.d.ts.map +1 -0
- package/renderer/mermaid/index.js +251 -0
- package/renderer/pdf/index.d.ts +10 -0
- package/renderer/pdf/index.d.ts.map +1 -0
- package/renderer/pdf/index.js +260 -0
- package/renderer/react/index.d.ts +45 -0
- package/renderer/react/index.d.ts.map +1 -0
- package/renderer/react/index.js +261 -0
- package/renderer/types.d.ts +24 -0
- package/renderer/types.d.ts.map +1 -0
- package/runtime/babel-runtime.d.ts +70 -0
- package/runtime/babel-runtime.d.ts.map +1 -0
- package/runtime/content-detector.d.ts +43 -0
- package/runtime/content-detector.d.ts.map +1 -0
- package/runtime/index.d.ts +10 -0
- package/runtime/index.d.ts.map +1 -0
- package/runtime/index.js +217 -0
- package/theme/FrontMcpThemeProvider.d.ts +4 -0
- package/theme/FrontMcpThemeProvider.d.ts.map +1 -0
- package/theme/create-theme.d.ts +9 -0
- package/theme/create-theme.d.ts.map +1 -0
- package/theme/index.d.ts +5 -0
- package/theme/index.d.ts.map +1 -0
- package/theme/index.js +126 -0
- package/theme/types.d.ts +28 -0
- package/theme/types.d.ts.map +1 -0
- package/theme/use-theme.d.ts +3 -0
- package/theme/use-theme.d.ts.map +1 -0
- package/bundler/browser-components.d.ts +0 -42
- package/bundler/browser-components.d.ts.map +0 -1
- package/bundler/bundler.d.ts +0 -282
- package/bundler/bundler.d.ts.map +0 -1
- package/bundler/index.d.ts +0 -43
- package/bundler/index.d.ts.map +0 -1
- package/bundler/index.js +0 -3168
- package/bundler/types.d.ts +0 -883
- package/bundler/types.d.ts.map +0 -1
- package/components/alert.d.ts +0 -83
- package/components/alert.d.ts.map +0 -1
- package/components/alert.schema.d.ts +0 -98
- package/components/alert.schema.d.ts.map +0 -1
- package/components/avatar.d.ts +0 -77
- package/components/avatar.d.ts.map +0 -1
- package/components/avatar.schema.d.ts +0 -170
- package/components/avatar.schema.d.ts.map +0 -1
- package/components/badge.d.ts +0 -78
- package/components/badge.d.ts.map +0 -1
- package/components/badge.schema.d.ts +0 -91
- package/components/badge.schema.d.ts.map +0 -1
- package/components/button.d.ts +0 -100
- package/components/button.d.ts.map +0 -1
- package/components/button.schema.d.ts +0 -120
- package/components/button.schema.d.ts.map +0 -1
- package/components/card.d.ts +0 -76
- package/components/card.d.ts.map +0 -1
- package/components/card.schema.d.ts +0 -93
- package/components/card.schema.d.ts.map +0 -1
- package/components/form.d.ts +0 -227
- package/components/form.d.ts.map +0 -1
- package/components/form.schema.d.ts +0 -365
- package/components/form.schema.d.ts.map +0 -1
- package/components/list.d.ts +0 -121
- package/components/list.d.ts.map +0 -1
- package/components/list.schema.d.ts +0 -129
- package/components/list.schema.d.ts.map +0 -1
- package/components/modal.d.ts +0 -100
- package/components/modal.d.ts.map +0 -1
- package/components/modal.schema.d.ts +0 -151
- package/components/modal.schema.d.ts.map +0 -1
- package/components/table.d.ts +0 -91
- package/components/table.d.ts.map +0 -1
- package/components/table.schema.d.ts +0 -123
- package/components/table.schema.d.ts.map +0 -1
- package/esm/bundler/index.mjs +0 -3136
- package/esm/layouts/index.mjs +0 -409
- package/esm/render/index.mjs +0 -45
- package/esm/renderers/index.mjs +0 -621
- package/esm/universal/index.mjs +0 -1946
- package/esm/web-components/index.mjs +0 -2023
- package/layouts/base.d.ts +0 -86
- package/layouts/base.d.ts.map +0 -1
- package/layouts/index.d.ts +0 -8
- package/layouts/index.d.ts.map +0 -1
- package/layouts/index.js +0 -437
- package/layouts/presets.d.ts +0 -134
- package/layouts/presets.d.ts.map +0 -1
- package/react/Alert.d.ts +0 -101
- package/react/Alert.d.ts.map +0 -1
- package/react/Badge.d.ts +0 -100
- package/react/Badge.d.ts.map +0 -1
- package/react/Button.d.ts +0 -108
- package/react/Button.d.ts.map +0 -1
- package/react/Card.d.ts +0 -103
- package/react/Card.d.ts.map +0 -1
- package/react/types.d.ts +0 -105
- package/react/types.d.ts.map +0 -1
- package/render/index.d.ts +0 -8
- package/render/index.d.ts.map +0 -1
- package/render/prerender.d.ts +0 -57
- package/render/prerender.d.ts.map +0 -1
- package/renderers/index.d.ts +0 -26
- package/renderers/index.d.ts.map +0 -1
- package/renderers/index.js +0 -666
- package/renderers/mdx.renderer.d.ts +0 -99
- package/renderers/mdx.renderer.d.ts.map +0 -1
- package/renderers/react.adapter.d.ts +0 -70
- package/renderers/react.adapter.d.ts.map +0 -1
- package/renderers/react.renderer.d.ts +0 -105
- package/renderers/react.renderer.d.ts.map +0 -1
- package/renderers/transpiler.d.ts +0 -49
- package/renderers/transpiler.d.ts.map +0 -1
- package/universal/UniversalApp.d.ts +0 -108
- package/universal/UniversalApp.d.ts.map +0 -1
- package/universal/cached-runtime.d.ts +0 -139
- package/universal/cached-runtime.d.ts.map +0 -1
- package/universal/context.d.ts +0 -122
- package/universal/context.d.ts.map +0 -1
- package/universal/index.d.ts +0 -57
- package/universal/index.d.ts.map +0 -1
- package/universal/index.js +0 -2032
- package/universal/renderers/html.renderer.d.ts +0 -36
- package/universal/renderers/html.renderer.d.ts.map +0 -1
- package/universal/renderers/index.d.ts +0 -112
- package/universal/renderers/index.d.ts.map +0 -1
- package/universal/renderers/markdown.renderer.d.ts +0 -33
- package/universal/renderers/markdown.renderer.d.ts.map +0 -1
- package/universal/renderers/mdx.renderer.d.ts +0 -38
- package/universal/renderers/mdx.renderer.d.ts.map +0 -1
- package/universal/renderers/react.renderer.d.ts +0 -46
- package/universal/renderers/react.renderer.d.ts.map +0 -1
- package/universal/runtime-builder.d.ts +0 -33
- package/universal/runtime-builder.d.ts.map +0 -1
- package/universal/store.d.ts +0 -135
- package/universal/store.d.ts.map +0 -1
- package/universal/types.d.ts +0 -199
- package/universal/types.d.ts.map +0 -1
- package/web-components/core/attribute-parser.d.ts +0 -82
- package/web-components/core/attribute-parser.d.ts.map +0 -1
- package/web-components/core/base-element.d.ts +0 -197
- package/web-components/core/base-element.d.ts.map +0 -1
- package/web-components/core/index.d.ts +0 -9
- package/web-components/core/index.d.ts.map +0 -1
- package/web-components/elements/fmcp-alert.d.ts +0 -46
- package/web-components/elements/fmcp-alert.d.ts.map +0 -1
- package/web-components/elements/fmcp-badge.d.ts +0 -47
- package/web-components/elements/fmcp-badge.d.ts.map +0 -1
- package/web-components/elements/fmcp-button.d.ts +0 -117
- package/web-components/elements/fmcp-button.d.ts.map +0 -1
- package/web-components/elements/fmcp-card.d.ts +0 -53
- package/web-components/elements/fmcp-card.d.ts.map +0 -1
- package/web-components/elements/fmcp-input.d.ts +0 -96
- package/web-components/elements/fmcp-input.d.ts.map +0 -1
- package/web-components/elements/fmcp-select.d.ts +0 -100
- package/web-components/elements/fmcp-select.d.ts.map +0 -1
- package/web-components/elements/index.d.ts +0 -13
- package/web-components/elements/index.d.ts.map +0 -1
- package/web-components/index.d.ts +0 -49
- package/web-components/index.d.ts.map +0 -1
- package/web-components/index.js +0 -2058
- package/web-components/register.d.ts +0 -57
- package/web-components/register.d.ts.map +0 -1
- package/web-components/types.d.ts +0 -122
- package/web-components/types.d.ts.map +0 -1
package/components/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,2564 +17,564 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// libs/ui/src/components/index.ts
|
|
21
31
|
var components_exports = {};
|
|
22
32
|
__export(components_exports, {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
BadgeVariantSchema: () => BadgeVariantSchema,
|
|
38
|
-
ButtonGroupOptionsSchema: () => ButtonGroupOptionsSchema,
|
|
39
|
-
ButtonOptionsSchema: () => ButtonOptionsSchema,
|
|
40
|
-
ButtonSizeSchema: () => ButtonSizeSchema,
|
|
41
|
-
ButtonVariantSchema: () => ButtonVariantSchema,
|
|
42
|
-
CardGroupOptionsSchema: () => CardGroupOptionsSchema,
|
|
43
|
-
CardOptionsSchema: () => CardOptionsSchema,
|
|
44
|
-
CardSizeSchema: () => CardSizeSchema,
|
|
45
|
-
CardVariantSchema: () => CardVariantSchema,
|
|
46
|
-
CheckboxOptionsSchema: () => CheckboxOptionsSchema,
|
|
47
|
-
ConfirmModalOptionsSchema: () => ConfirmModalOptionsSchema,
|
|
48
|
-
ConfirmModalVariantSchema: () => ConfirmModalVariantSchema,
|
|
49
|
-
DescriptionItemSchema: () => DescriptionItemSchema,
|
|
50
|
-
DescriptionListOptionsSchema: () => DescriptionListOptionsSchema,
|
|
51
|
-
DrawerOptionsSchema: () => DrawerOptionsSchema,
|
|
52
|
-
DrawerPositionSchema: () => DrawerPositionSchema,
|
|
53
|
-
FeatureItemSchema: () => FeatureItemSchema,
|
|
54
|
-
FeatureListOptionsSchema: () => FeatureListOptionsSchema,
|
|
55
|
-
FormActionsOptionsSchema: () => FormActionsOptionsSchema,
|
|
56
|
-
FormEnctypeSchema: () => FormEnctypeSchema,
|
|
57
|
-
FormMethodSchema: () => FormMethodSchema,
|
|
58
|
-
FormOptionsSchema: () => FormOptionsSchema,
|
|
59
|
-
FormRowOptionsSchema: () => FormRowOptionsSchema,
|
|
60
|
-
FormSectionOptionsSchema: () => FormSectionOptionsSchema,
|
|
61
|
-
InputOptionsSchema: () => InputOptionsSchema,
|
|
62
|
-
InputSizeSchema: () => InputSizeSchema,
|
|
63
|
-
InputStateSchema: () => InputStateSchema,
|
|
64
|
-
InputTypeSchema: () => InputTypeSchema,
|
|
65
|
-
ModalOptionsSchema: () => ModalOptionsSchema,
|
|
66
|
-
ModalSizeSchema: () => ModalSizeSchema,
|
|
67
|
-
ModalTriggerOptionsSchema: () => ModalTriggerOptionsSchema,
|
|
68
|
-
PaginationOptionsSchema: () => PaginationOptionsSchema,
|
|
69
|
-
PermissionItemSchema: () => PermissionItemSchema,
|
|
70
|
-
PermissionListOptionsSchema: () => PermissionListOptionsSchema,
|
|
71
|
-
RadioGroupOptionsSchema: () => RadioGroupOptionsSchema,
|
|
72
|
-
RadioOptionItemSchema: () => RadioOptionItemSchema,
|
|
73
|
-
SelectOptionItemSchema: () => SelectOptionItemSchema,
|
|
74
|
-
SelectOptionsSchema: () => SelectOptionsSchema,
|
|
75
|
-
TableAlignSchema: () => TableAlignSchema,
|
|
76
|
-
TableColumnSchema: () => TableColumnSchema,
|
|
77
|
-
TableOptionsSchema: () => TableOptionsSchema,
|
|
78
|
-
TableSortDirectionSchema: () => TableSortDirectionSchema,
|
|
79
|
-
TextareaOptionsSchema: () => TextareaOptionsSchema,
|
|
80
|
-
TextareaResizeSchema: () => TextareaResizeSchema,
|
|
81
|
-
ToastOptionsSchema: () => ToastOptionsSchema,
|
|
82
|
-
ToastPositionSchema: () => ToastPositionSchema,
|
|
83
|
-
actionList: () => actionList,
|
|
84
|
-
activeBadge: () => activeBadge,
|
|
85
|
-
alert: () => alert,
|
|
86
|
-
avatar: () => avatar,
|
|
87
|
-
avatarGroup: () => avatarGroup,
|
|
88
|
-
avatarWithText: () => avatarWithText,
|
|
89
|
-
awayDot: () => awayDot,
|
|
90
|
-
badge: () => badge,
|
|
91
|
-
badgeGroup: () => badgeGroup,
|
|
92
|
-
betaBadge: () => betaBadge,
|
|
93
|
-
busyDot: () => busyDot,
|
|
94
|
-
button: () => button,
|
|
95
|
-
buttonGroup: () => buttonGroup,
|
|
96
|
-
card: () => card,
|
|
97
|
-
cardGroup: () => cardGroup,
|
|
98
|
-
checkbox: () => checkbox,
|
|
99
|
-
confirmModal: () => confirmModal,
|
|
100
|
-
csrfInput: () => csrfInput,
|
|
101
|
-
dangerAlert: () => dangerAlert,
|
|
102
|
-
dangerButton: () => dangerButton,
|
|
103
|
-
descriptionList: () => descriptionList,
|
|
104
|
-
drawer: () => drawer,
|
|
105
|
-
errorBadge: () => errorBadge,
|
|
106
|
-
featureList: () => featureList,
|
|
107
|
-
form: () => form,
|
|
108
|
-
formActions: () => formActions,
|
|
109
|
-
formRow: () => formRow,
|
|
110
|
-
formSection: () => formSection,
|
|
111
|
-
ghostButton: () => ghostButton,
|
|
112
|
-
hiddenInput: () => hiddenInput,
|
|
113
|
-
inactiveBadge: () => inactiveBadge,
|
|
114
|
-
infoAlert: () => infoAlert,
|
|
115
|
-
input: () => input,
|
|
116
|
-
linkButton: () => linkButton,
|
|
117
|
-
modal: () => modal,
|
|
118
|
-
modalTrigger: () => modalTrigger,
|
|
119
|
-
newBadge: () => newBadge,
|
|
120
|
-
offlineDot: () => offlineDot,
|
|
121
|
-
onlineDot: () => onlineDot,
|
|
122
|
-
outlineButton: () => outlineButton,
|
|
123
|
-
pagination: () => pagination,
|
|
124
|
-
pendingBadge: () => pendingBadge,
|
|
125
|
-
permissionList: () => permissionList,
|
|
126
|
-
primaryButton: () => primaryButton,
|
|
127
|
-
radioGroup: () => radioGroup,
|
|
128
|
-
secondaryButton: () => secondaryButton,
|
|
129
|
-
select: () => select,
|
|
130
|
-
successAlert: () => successAlert,
|
|
131
|
-
table: () => table,
|
|
132
|
-
textarea: () => textarea,
|
|
133
|
-
toast: () => toast,
|
|
134
|
-
toastContainer: () => toastContainer,
|
|
135
|
-
warningAlert: () => warningAlert
|
|
33
|
+
Alert: () => Alert,
|
|
34
|
+
Avatar: () => Avatar,
|
|
35
|
+
Badge: () => Badge,
|
|
36
|
+
Button: () => Button,
|
|
37
|
+
Card: () => Card,
|
|
38
|
+
List: () => List,
|
|
39
|
+
Loader: () => Loader,
|
|
40
|
+
LoaderContext: () => LoaderContext,
|
|
41
|
+
LoaderProvider: () => LoaderProvider,
|
|
42
|
+
Modal: () => Modal,
|
|
43
|
+
Select: () => Select,
|
|
44
|
+
Table: () => Table,
|
|
45
|
+
TextField: () => TextField,
|
|
46
|
+
useLoaderContext: () => useLoaderContext
|
|
136
47
|
});
|
|
137
48
|
module.exports = __toCommonJS(components_exports);
|
|
138
49
|
|
|
139
|
-
// libs/ui/src/components/
|
|
140
|
-
var
|
|
141
|
-
var
|
|
142
|
-
var
|
|
143
|
-
var
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
/** Full width */
|
|
155
|
-
fullWidth: import_zod.z.boolean().optional(),
|
|
156
|
-
/** Icon before text (HTML string) */
|
|
157
|
-
iconBefore: import_zod.z.string().optional(),
|
|
158
|
-
/** Icon after text (HTML string) */
|
|
159
|
-
iconAfter: import_zod.z.string().optional(),
|
|
160
|
-
/** Icon only (no text) */
|
|
161
|
-
iconOnly: import_zod.z.boolean().optional(),
|
|
162
|
-
/** Additional CSS classes */
|
|
163
|
-
className: import_zod.z.string().optional(),
|
|
164
|
-
/** Button ID */
|
|
165
|
-
id: import_zod.z.string().optional(),
|
|
166
|
-
/** Name attribute */
|
|
167
|
-
name: import_zod.z.string().optional(),
|
|
168
|
-
/** Value attribute */
|
|
169
|
-
value: import_zod.z.string().optional(),
|
|
170
|
-
/** Click handler (URL for links) */
|
|
171
|
-
href: import_zod.z.string().optional(),
|
|
172
|
-
/** Open in new tab */
|
|
173
|
-
target: import_zod.z.enum(["_blank", "_self"]).optional(),
|
|
174
|
-
/** Data attributes */
|
|
175
|
-
data: import_zod.z.record(import_zod.z.string(), import_zod.z.string()).optional(),
|
|
176
|
-
/** ARIA label */
|
|
177
|
-
ariaLabel: import_zod.z.string().optional()
|
|
178
|
-
}).strict();
|
|
179
|
-
var ButtonGroupOptionsSchema = import_zod.z.object({
|
|
180
|
-
/** Attach buttons visually */
|
|
181
|
-
attached: import_zod.z.boolean().optional(),
|
|
182
|
-
/** Direction */
|
|
183
|
-
direction: import_zod.z.enum(["horizontal", "vertical"]).optional(),
|
|
184
|
-
/** Gap between buttons */
|
|
185
|
-
gap: import_zod.z.enum(["sm", "md", "lg"]).optional(),
|
|
186
|
-
/** Additional CSS classes */
|
|
187
|
-
className: import_zod.z.string().optional()
|
|
188
|
-
}).strict();
|
|
189
|
-
|
|
190
|
-
// libs/ui/src/components/card.schema.ts
|
|
191
|
-
var import_zod2 = require("zod");
|
|
192
|
-
var CardVariantSchema = import_zod2.z.enum(["default", "outlined", "elevated", "filled", "ghost"]);
|
|
193
|
-
var CardSizeSchema = import_zod2.z.enum(["sm", "md", "lg"]);
|
|
194
|
-
var CardOptionsSchema = import_zod2.z.object({
|
|
195
|
-
/** Card variant */
|
|
196
|
-
variant: CardVariantSchema.optional(),
|
|
197
|
-
/** Card size (padding) */
|
|
198
|
-
size: CardSizeSchema.optional(),
|
|
199
|
-
/** Card title */
|
|
200
|
-
title: import_zod2.z.string().optional(),
|
|
201
|
-
/** Card subtitle/description */
|
|
202
|
-
subtitle: import_zod2.z.string().optional(),
|
|
203
|
-
/** Header actions (HTML string) */
|
|
204
|
-
headerActions: import_zod2.z.string().optional(),
|
|
205
|
-
/** Footer content (HTML string) */
|
|
206
|
-
footer: import_zod2.z.string().optional(),
|
|
207
|
-
/** Additional CSS classes */
|
|
208
|
-
className: import_zod2.z.string().optional(),
|
|
209
|
-
/** Card ID */
|
|
210
|
-
id: import_zod2.z.string().optional(),
|
|
211
|
-
/** Data attributes */
|
|
212
|
-
data: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.string()).optional(),
|
|
213
|
-
/** Clickable card (adds hover effects) */
|
|
214
|
-
clickable: import_zod2.z.boolean().optional(),
|
|
215
|
-
/** Click handler URL */
|
|
216
|
-
href: import_zod2.z.string().optional()
|
|
217
|
-
}).strict();
|
|
218
|
-
var CardGroupOptionsSchema = import_zod2.z.object({
|
|
219
|
-
/** Direction */
|
|
220
|
-
direction: import_zod2.z.enum(["horizontal", "vertical"]).optional(),
|
|
221
|
-
/** Gap between cards */
|
|
222
|
-
gap: import_zod2.z.enum(["sm", "md", "lg"]).optional(),
|
|
223
|
-
/** Additional CSS classes */
|
|
224
|
-
className: import_zod2.z.string().optional()
|
|
225
|
-
}).strict();
|
|
226
|
-
|
|
227
|
-
// libs/ui/src/components/badge.schema.ts
|
|
228
|
-
var import_zod3 = require("zod");
|
|
229
|
-
var BadgeVariantSchema = import_zod3.z.enum([
|
|
230
|
-
"default",
|
|
231
|
-
"primary",
|
|
232
|
-
"secondary",
|
|
233
|
-
"success",
|
|
234
|
-
"warning",
|
|
235
|
-
"danger",
|
|
236
|
-
"info",
|
|
237
|
-
"outline"
|
|
238
|
-
]);
|
|
239
|
-
var BadgeSizeSchema = import_zod3.z.enum(["sm", "md", "lg"]);
|
|
240
|
-
var BadgeOptionsSchema = import_zod3.z.object({
|
|
241
|
-
/** Badge variant */
|
|
242
|
-
variant: BadgeVariantSchema.optional(),
|
|
243
|
-
/** Badge size */
|
|
244
|
-
size: BadgeSizeSchema.optional(),
|
|
245
|
-
/** Rounded pill style */
|
|
246
|
-
pill: import_zod3.z.boolean().optional(),
|
|
247
|
-
/** Icon before text (HTML string) */
|
|
248
|
-
icon: import_zod3.z.string().optional(),
|
|
249
|
-
/** Dot indicator (no text) */
|
|
250
|
-
dot: import_zod3.z.boolean().optional(),
|
|
251
|
-
/** Additional CSS classes */
|
|
252
|
-
className: import_zod3.z.string().optional(),
|
|
253
|
-
/** Removable badge */
|
|
254
|
-
removable: import_zod3.z.boolean().optional()
|
|
255
|
-
}).strict();
|
|
256
|
-
var BadgeGroupOptionsSchema = import_zod3.z.object({
|
|
257
|
-
/** Gap between badges */
|
|
258
|
-
gap: import_zod3.z.enum(["sm", "md", "lg"]).optional(),
|
|
259
|
-
/** Additional CSS classes */
|
|
260
|
-
className: import_zod3.z.string().optional()
|
|
261
|
-
}).strict();
|
|
262
|
-
|
|
263
|
-
// libs/ui/src/components/alert.schema.ts
|
|
264
|
-
var import_zod4 = require("zod");
|
|
265
|
-
var AlertVariantSchema = import_zod4.z.enum(["info", "success", "warning", "danger", "neutral"]);
|
|
266
|
-
var AlertOptionsSchema = import_zod4.z.object({
|
|
267
|
-
/** Alert variant */
|
|
268
|
-
variant: AlertVariantSchema.optional(),
|
|
269
|
-
/** Alert title */
|
|
270
|
-
title: import_zod4.z.string().optional(),
|
|
271
|
-
/** Show icon */
|
|
272
|
-
showIcon: import_zod4.z.boolean().optional(),
|
|
273
|
-
/** Custom icon (HTML string, overrides default) */
|
|
274
|
-
icon: import_zod4.z.string().optional(),
|
|
275
|
-
/** Dismissible alert */
|
|
276
|
-
dismissible: import_zod4.z.boolean().optional(),
|
|
277
|
-
/** Additional CSS classes */
|
|
278
|
-
className: import_zod4.z.string().optional(),
|
|
279
|
-
/** Alert ID */
|
|
280
|
-
id: import_zod4.z.string().optional(),
|
|
281
|
-
/** Actions (HTML string for buttons) */
|
|
282
|
-
actions: import_zod4.z.string().optional()
|
|
283
|
-
}).strict();
|
|
284
|
-
var ToastPositionSchema = import_zod4.z.enum([
|
|
285
|
-
"top-right",
|
|
286
|
-
"top-left",
|
|
287
|
-
"bottom-right",
|
|
288
|
-
"bottom-left",
|
|
289
|
-
"top-center",
|
|
290
|
-
"bottom-center"
|
|
291
|
-
]);
|
|
292
|
-
var ToastOptionsSchema = import_zod4.z.object({
|
|
293
|
-
/** Toast variant */
|
|
294
|
-
variant: AlertVariantSchema.optional(),
|
|
295
|
-
/** Toast title */
|
|
296
|
-
title: import_zod4.z.string().optional(),
|
|
297
|
-
/** Duration in ms (0 = no auto-dismiss) */
|
|
298
|
-
duration: import_zod4.z.number().min(0).optional(),
|
|
299
|
-
/** Position */
|
|
300
|
-
position: ToastPositionSchema.optional(),
|
|
301
|
-
/** Toast ID */
|
|
302
|
-
id: import_zod4.z.string().optional()
|
|
303
|
-
}).strict();
|
|
304
|
-
|
|
305
|
-
// libs/ui/src/components/avatar.schema.ts
|
|
306
|
-
var import_zod5 = require("zod");
|
|
307
|
-
var AvatarSizeSchema = import_zod5.z.enum(["xs", "sm", "md", "lg", "xl", "2xl"]);
|
|
308
|
-
var AvatarShapeSchema = import_zod5.z.enum(["circle", "square", "rounded"]);
|
|
309
|
-
var AvatarStatusSchema = import_zod5.z.enum(["online", "offline", "busy", "away", "none"]);
|
|
310
|
-
var AvatarOptionsSchema = import_zod5.z.object({
|
|
311
|
-
/** Image source URL */
|
|
312
|
-
src: import_zod5.z.string().optional(),
|
|
313
|
-
/** Alt text / name (required) */
|
|
314
|
-
alt: import_zod5.z.string(),
|
|
315
|
-
/** Avatar size */
|
|
316
|
-
size: AvatarSizeSchema.optional(),
|
|
317
|
-
/** Avatar shape */
|
|
318
|
-
shape: AvatarShapeSchema.optional(),
|
|
319
|
-
/** Status indicator */
|
|
320
|
-
status: AvatarStatusSchema.optional(),
|
|
321
|
-
/** Additional CSS classes */
|
|
322
|
-
className: import_zod5.z.string().optional(),
|
|
323
|
-
/** Click handler URL */
|
|
324
|
-
href: import_zod5.z.string().optional(),
|
|
325
|
-
/** Custom initials (overrides auto-generation) */
|
|
326
|
-
initials: import_zod5.z.string().optional(),
|
|
327
|
-
/** Background color for initials (CSS color) */
|
|
328
|
-
bgColor: import_zod5.z.string().optional()
|
|
329
|
-
}).strict();
|
|
330
|
-
var AvatarSpacingSchema = import_zod5.z.enum(["tight", "normal", "loose"]);
|
|
331
|
-
var AvatarGroupOptionsSchema = import_zod5.z.object({
|
|
332
|
-
/** Maximum visible avatars */
|
|
333
|
-
max: import_zod5.z.number().min(1).optional(),
|
|
334
|
-
/** Avatar size */
|
|
335
|
-
size: AvatarSizeSchema.optional(),
|
|
336
|
-
/** Overlap amount */
|
|
337
|
-
spacing: AvatarSpacingSchema.optional(),
|
|
338
|
-
/** Additional CSS classes */
|
|
339
|
-
className: import_zod5.z.string().optional()
|
|
340
|
-
}).strict();
|
|
341
|
-
var AvatarWithTextOptionsSchema = AvatarOptionsSchema.extend({
|
|
342
|
-
/** Primary text (name) */
|
|
343
|
-
name: import_zod5.z.string(),
|
|
344
|
-
/** Secondary text (email, role, etc.) */
|
|
345
|
-
subtitle: import_zod5.z.string().optional(),
|
|
346
|
-
/** Text alignment */
|
|
347
|
-
align: import_zod5.z.enum(["left", "right"]).optional()
|
|
348
|
-
}).strict();
|
|
349
|
-
|
|
350
|
-
// libs/ui/src/components/modal.schema.ts
|
|
351
|
-
var import_zod6 = require("zod");
|
|
352
|
-
var ModalSizeSchema = import_zod6.z.enum(["sm", "md", "lg", "xl", "full"]);
|
|
353
|
-
var ModalOptionsSchema = import_zod6.z.object({
|
|
354
|
-
/** Modal ID (required) */
|
|
355
|
-
id: import_zod6.z.string(),
|
|
356
|
-
/** Modal title */
|
|
357
|
-
title: import_zod6.z.string().optional(),
|
|
358
|
-
/** Modal size */
|
|
359
|
-
size: ModalSizeSchema.optional(),
|
|
360
|
-
/** Show close button */
|
|
361
|
-
showClose: import_zod6.z.boolean().optional(),
|
|
362
|
-
/** Close on backdrop click */
|
|
363
|
-
closeOnBackdrop: import_zod6.z.boolean().optional(),
|
|
364
|
-
/** Close on escape key */
|
|
365
|
-
closeOnEscape: import_zod6.z.boolean().optional(),
|
|
366
|
-
/** Footer content (HTML string) */
|
|
367
|
-
footer: import_zod6.z.string().optional(),
|
|
368
|
-
/** Additional CSS classes for modal */
|
|
369
|
-
className: import_zod6.z.string().optional(),
|
|
370
|
-
/** Initially visible */
|
|
371
|
-
open: import_zod6.z.boolean().optional()
|
|
372
|
-
}).strict();
|
|
373
|
-
var ConfirmModalVariantSchema = import_zod6.z.enum(["info", "warning", "danger"]);
|
|
374
|
-
var ConfirmModalOptionsSchema = import_zod6.z.object({
|
|
375
|
-
/** Modal ID (required) */
|
|
376
|
-
id: import_zod6.z.string(),
|
|
377
|
-
/** Confirm message */
|
|
378
|
-
message: import_zod6.z.string(),
|
|
379
|
-
/** Title */
|
|
380
|
-
title: import_zod6.z.string().optional(),
|
|
381
|
-
/** Variant/severity */
|
|
382
|
-
variant: ConfirmModalVariantSchema.optional(),
|
|
383
|
-
/** Confirm button text */
|
|
384
|
-
confirmText: import_zod6.z.string().optional(),
|
|
385
|
-
/** Cancel button text */
|
|
386
|
-
cancelText: import_zod6.z.string().optional(),
|
|
387
|
-
/** Initially visible */
|
|
388
|
-
open: import_zod6.z.boolean().optional(),
|
|
389
|
-
/** Confirm action URL */
|
|
390
|
-
confirmHref: import_zod6.z.string().optional()
|
|
391
|
-
}).strict();
|
|
392
|
-
var DrawerPositionSchema = import_zod6.z.enum(["left", "right", "top", "bottom"]);
|
|
393
|
-
var DrawerOptionsSchema = import_zod6.z.object({
|
|
394
|
-
/** Drawer ID (required) */
|
|
395
|
-
id: import_zod6.z.string(),
|
|
396
|
-
/** Position */
|
|
397
|
-
position: DrawerPositionSchema.optional(),
|
|
398
|
-
/** Size (width for left/right, height for top/bottom) */
|
|
399
|
-
size: ModalSizeSchema.optional(),
|
|
400
|
-
/** Drawer title */
|
|
401
|
-
title: import_zod6.z.string().optional(),
|
|
402
|
-
/** Show close button */
|
|
403
|
-
showClose: import_zod6.z.boolean().optional(),
|
|
404
|
-
/** Footer content (HTML string) */
|
|
405
|
-
footer: import_zod6.z.string().optional(),
|
|
406
|
-
/** Additional CSS classes */
|
|
407
|
-
className: import_zod6.z.string().optional(),
|
|
408
|
-
/** Initially visible */
|
|
409
|
-
open: import_zod6.z.boolean().optional()
|
|
410
|
-
}).strict();
|
|
411
|
-
var ModalTriggerOptionsSchema = import_zod6.z.object({
|
|
412
|
-
/** Target modal ID (required) */
|
|
413
|
-
targetId: import_zod6.z.string(),
|
|
414
|
-
/** Trigger text */
|
|
415
|
-
text: import_zod6.z.string().optional(),
|
|
416
|
-
/** HTML tag to use */
|
|
417
|
-
tag: import_zod6.z.enum(["button", "a", "span", "div"]).optional(),
|
|
418
|
-
/** Additional CSS classes */
|
|
419
|
-
className: import_zod6.z.string().optional()
|
|
420
|
-
}).strict();
|
|
421
|
-
|
|
422
|
-
// libs/ui/src/components/table.schema.ts
|
|
423
|
-
var import_zod7 = require("zod");
|
|
424
|
-
var TableAlignSchema = import_zod7.z.enum(["left", "center", "right"]);
|
|
425
|
-
var TableSortDirectionSchema = import_zod7.z.enum(["asc", "desc"]).nullable();
|
|
426
|
-
var TableColumnSchema = import_zod7.z.object({
|
|
427
|
-
/** Column key (property name) */
|
|
428
|
-
key: import_zod7.z.string(),
|
|
429
|
-
/** Column header text */
|
|
430
|
-
header: import_zod7.z.string(),
|
|
431
|
-
/** Column width (CSS value) */
|
|
432
|
-
width: import_zod7.z.string().optional(),
|
|
433
|
-
/** Text alignment */
|
|
434
|
-
align: TableAlignSchema.optional(),
|
|
435
|
-
/** Sortable column */
|
|
436
|
-
sortable: import_zod7.z.boolean().optional(),
|
|
437
|
-
/** Current sort direction */
|
|
438
|
-
sortDirection: TableSortDirectionSchema.optional(),
|
|
439
|
-
/** Custom cell renderer (function - cannot validate at runtime) */
|
|
440
|
-
render: import_zod7.z.any().optional(),
|
|
441
|
-
/** Additional header CSS classes */
|
|
442
|
-
headerClass: import_zod7.z.string().optional(),
|
|
443
|
-
/** Additional cell CSS classes */
|
|
444
|
-
cellClass: import_zod7.z.string().optional()
|
|
445
|
-
}).strict();
|
|
446
|
-
var TableOptionsSchema = import_zod7.z.object({
|
|
447
|
-
/** Column definitions */
|
|
448
|
-
columns: import_zod7.z.array(TableColumnSchema),
|
|
449
|
-
/** Table ID */
|
|
450
|
-
id: import_zod7.z.string().optional(),
|
|
451
|
-
/** Show row selection checkboxes */
|
|
452
|
-
selectable: import_zod7.z.boolean().optional(),
|
|
453
|
-
/** Row hover effect */
|
|
454
|
-
hoverable: import_zod7.z.boolean().optional(),
|
|
455
|
-
/** Striped rows */
|
|
456
|
-
striped: import_zod7.z.boolean().optional(),
|
|
457
|
-
/** Bordered cells */
|
|
458
|
-
bordered: import_zod7.z.boolean().optional(),
|
|
459
|
-
/** Compact size */
|
|
460
|
-
compact: import_zod7.z.boolean().optional(),
|
|
461
|
-
/** Fixed header (sticky) */
|
|
462
|
-
stickyHeader: import_zod7.z.boolean().optional(),
|
|
463
|
-
/** Additional CSS classes */
|
|
464
|
-
className: import_zod7.z.string().optional(),
|
|
465
|
-
/** Empty state message */
|
|
466
|
-
emptyMessage: import_zod7.z.string().optional(),
|
|
467
|
-
/** Empty state HTML */
|
|
468
|
-
emptyContent: import_zod7.z.string().optional(),
|
|
469
|
-
/** Loading state */
|
|
470
|
-
loading: import_zod7.z.boolean().optional(),
|
|
471
|
-
/** Row key property for selection */
|
|
472
|
-
rowKey: import_zod7.z.string().optional(),
|
|
473
|
-
/** Row click handler (URL template with {key}) */
|
|
474
|
-
onRowClick: import_zod7.z.string().optional()
|
|
475
|
-
}).strict();
|
|
476
|
-
var PaginationOptionsSchema = import_zod7.z.object({
|
|
477
|
-
/** Current page (1-indexed) */
|
|
478
|
-
page: import_zod7.z.number().min(1),
|
|
479
|
-
/** Total pages */
|
|
480
|
-
totalPages: import_zod7.z.number().min(0),
|
|
481
|
-
/** Total items count */
|
|
482
|
-
totalItems: import_zod7.z.number().min(0).optional(),
|
|
483
|
-
/** Items per page */
|
|
484
|
-
pageSize: import_zod7.z.number().min(1).optional(),
|
|
485
|
-
/** Page size options */
|
|
486
|
-
pageSizeOptions: import_zod7.z.array(import_zod7.z.number()).optional(),
|
|
487
|
-
/** Show first/last buttons */
|
|
488
|
-
showFirstLast: import_zod7.z.boolean().optional(),
|
|
489
|
-
/** Show page count */
|
|
490
|
-
showPageCount: import_zod7.z.boolean().optional(),
|
|
491
|
-
/** Show item count */
|
|
492
|
-
showItemCount: import_zod7.z.boolean().optional(),
|
|
493
|
-
/** Show page size selector */
|
|
494
|
-
showPageSize: import_zod7.z.boolean().optional(),
|
|
495
|
-
/** Max visible page buttons */
|
|
496
|
-
maxVisiblePages: import_zod7.z.number().min(1).optional(),
|
|
497
|
-
/** Additional CSS classes */
|
|
498
|
-
className: import_zod7.z.string().optional()
|
|
499
|
-
}).strict();
|
|
500
|
-
|
|
501
|
-
// libs/ui/src/components/form.schema.ts
|
|
502
|
-
var import_zod8 = require("zod");
|
|
503
|
-
var InputTypeSchema = import_zod8.z.enum([
|
|
504
|
-
"text",
|
|
505
|
-
"email",
|
|
506
|
-
"password",
|
|
507
|
-
"number",
|
|
508
|
-
"tel",
|
|
509
|
-
"url",
|
|
510
|
-
"search",
|
|
511
|
-
"date",
|
|
512
|
-
"time",
|
|
513
|
-
"datetime-local",
|
|
514
|
-
"hidden"
|
|
515
|
-
]);
|
|
516
|
-
var InputSizeSchema = import_zod8.z.enum(["sm", "md", "lg"]);
|
|
517
|
-
var InputStateSchema = import_zod8.z.enum(["default", "error", "success", "warning"]);
|
|
518
|
-
var InputOptionsSchema = import_zod8.z.object({
|
|
519
|
-
/** Input type */
|
|
520
|
-
type: InputTypeSchema.optional(),
|
|
521
|
-
/** Input name (required) */
|
|
522
|
-
name: import_zod8.z.string(),
|
|
523
|
-
/** Input ID (defaults to name) */
|
|
524
|
-
id: import_zod8.z.string().optional(),
|
|
525
|
-
/** Input value */
|
|
526
|
-
value: import_zod8.z.string().optional(),
|
|
527
|
-
/** Placeholder text */
|
|
528
|
-
placeholder: import_zod8.z.string().optional(),
|
|
529
|
-
/** Label text */
|
|
530
|
-
label: import_zod8.z.string().optional(),
|
|
531
|
-
/** Helper text */
|
|
532
|
-
helper: import_zod8.z.string().optional(),
|
|
533
|
-
/** Error message */
|
|
534
|
-
error: import_zod8.z.string().optional(),
|
|
535
|
-
/** Input size */
|
|
536
|
-
size: InputSizeSchema.optional(),
|
|
537
|
-
/** Input state */
|
|
538
|
-
state: InputStateSchema.optional(),
|
|
539
|
-
/** Required field */
|
|
540
|
-
required: import_zod8.z.boolean().optional(),
|
|
541
|
-
/** Disabled state */
|
|
542
|
-
disabled: import_zod8.z.boolean().optional(),
|
|
543
|
-
/** Readonly state */
|
|
544
|
-
readonly: import_zod8.z.boolean().optional(),
|
|
545
|
-
/** Autocomplete attribute */
|
|
546
|
-
autocomplete: import_zod8.z.string().optional(),
|
|
547
|
-
/** Pattern for validation */
|
|
548
|
-
pattern: import_zod8.z.string().optional(),
|
|
549
|
-
/** Min value (for number/date) */
|
|
550
|
-
min: import_zod8.z.union([import_zod8.z.string(), import_zod8.z.number()]).optional(),
|
|
551
|
-
/** Max value (for number/date) */
|
|
552
|
-
max: import_zod8.z.union([import_zod8.z.string(), import_zod8.z.number()]).optional(),
|
|
553
|
-
/** Step value (for number) */
|
|
554
|
-
step: import_zod8.z.union([import_zod8.z.string(), import_zod8.z.number()]).optional(),
|
|
555
|
-
/** Additional CSS classes */
|
|
556
|
-
className: import_zod8.z.string().optional(),
|
|
557
|
-
/** Data attributes */
|
|
558
|
-
data: import_zod8.z.record(import_zod8.z.string(), import_zod8.z.string()).optional(),
|
|
559
|
-
/** Icon before input (HTML string) */
|
|
560
|
-
iconBefore: import_zod8.z.string().optional(),
|
|
561
|
-
/** Icon after input (HTML string) */
|
|
562
|
-
iconAfter: import_zod8.z.string().optional()
|
|
563
|
-
}).strict();
|
|
564
|
-
var SelectOptionItemSchema = import_zod8.z.object({
|
|
565
|
-
value: import_zod8.z.string(),
|
|
566
|
-
label: import_zod8.z.string(),
|
|
567
|
-
disabled: import_zod8.z.boolean().optional(),
|
|
568
|
-
selected: import_zod8.z.boolean().optional()
|
|
569
|
-
}).strict();
|
|
570
|
-
var SelectOptionsSchema = import_zod8.z.object({
|
|
571
|
-
/** Input name (required) */
|
|
572
|
-
name: import_zod8.z.string(),
|
|
573
|
-
/** Input ID (defaults to name) */
|
|
574
|
-
id: import_zod8.z.string().optional(),
|
|
575
|
-
/** Input value */
|
|
576
|
-
value: import_zod8.z.string().optional(),
|
|
577
|
-
/** Placeholder text */
|
|
578
|
-
placeholder: import_zod8.z.string().optional(),
|
|
579
|
-
/** Label text */
|
|
580
|
-
label: import_zod8.z.string().optional(),
|
|
581
|
-
/** Helper text */
|
|
582
|
-
helper: import_zod8.z.string().optional(),
|
|
583
|
-
/** Error message */
|
|
584
|
-
error: import_zod8.z.string().optional(),
|
|
585
|
-
/** Input size */
|
|
586
|
-
size: InputSizeSchema.optional(),
|
|
587
|
-
/** Input state */
|
|
588
|
-
state: InputStateSchema.optional(),
|
|
589
|
-
/** Required field */
|
|
590
|
-
required: import_zod8.z.boolean().optional(),
|
|
591
|
-
/** Disabled state */
|
|
592
|
-
disabled: import_zod8.z.boolean().optional(),
|
|
593
|
-
/** Readonly state */
|
|
594
|
-
readonly: import_zod8.z.boolean().optional(),
|
|
595
|
-
/** Additional CSS classes */
|
|
596
|
-
className: import_zod8.z.string().optional(),
|
|
597
|
-
/** Data attributes */
|
|
598
|
-
data: import_zod8.z.record(import_zod8.z.string(), import_zod8.z.string()).optional(),
|
|
599
|
-
/** Icon before input (HTML string) */
|
|
600
|
-
iconBefore: import_zod8.z.string().optional(),
|
|
601
|
-
/** Icon after input (HTML string) */
|
|
602
|
-
iconAfter: import_zod8.z.string().optional(),
|
|
603
|
-
/** Select options (required) */
|
|
604
|
-
options: import_zod8.z.array(SelectOptionItemSchema),
|
|
605
|
-
/** Multiple selection */
|
|
606
|
-
multiple: import_zod8.z.boolean().optional()
|
|
607
|
-
}).strict();
|
|
608
|
-
var TextareaResizeSchema = import_zod8.z.enum(["none", "vertical", "horizontal", "both"]);
|
|
609
|
-
var TextareaOptionsSchema = import_zod8.z.object({
|
|
610
|
-
/** Input name (required) */
|
|
611
|
-
name: import_zod8.z.string(),
|
|
612
|
-
/** Input ID (defaults to name) */
|
|
613
|
-
id: import_zod8.z.string().optional(),
|
|
614
|
-
/** Input value */
|
|
615
|
-
value: import_zod8.z.string().optional(),
|
|
616
|
-
/** Placeholder text */
|
|
617
|
-
placeholder: import_zod8.z.string().optional(),
|
|
618
|
-
/** Label text */
|
|
619
|
-
label: import_zod8.z.string().optional(),
|
|
620
|
-
/** Helper text */
|
|
621
|
-
helper: import_zod8.z.string().optional(),
|
|
622
|
-
/** Error message */
|
|
623
|
-
error: import_zod8.z.string().optional(),
|
|
624
|
-
/** Input size */
|
|
625
|
-
size: InputSizeSchema.optional(),
|
|
626
|
-
/** Input state */
|
|
627
|
-
state: InputStateSchema.optional(),
|
|
628
|
-
/** Required field */
|
|
629
|
-
required: import_zod8.z.boolean().optional(),
|
|
630
|
-
/** Disabled state */
|
|
631
|
-
disabled: import_zod8.z.boolean().optional(),
|
|
632
|
-
/** Readonly state */
|
|
633
|
-
readonly: import_zod8.z.boolean().optional(),
|
|
634
|
-
/** Autocomplete attribute */
|
|
635
|
-
autocomplete: import_zod8.z.string().optional(),
|
|
636
|
-
/** Additional CSS classes */
|
|
637
|
-
className: import_zod8.z.string().optional(),
|
|
638
|
-
/** Data attributes */
|
|
639
|
-
data: import_zod8.z.record(import_zod8.z.string(), import_zod8.z.string()).optional(),
|
|
640
|
-
/** Icon before input (HTML string) */
|
|
641
|
-
iconBefore: import_zod8.z.string().optional(),
|
|
642
|
-
/** Icon after input (HTML string) */
|
|
643
|
-
iconAfter: import_zod8.z.string().optional(),
|
|
644
|
-
/** Number of rows */
|
|
645
|
-
rows: import_zod8.z.number().min(1).optional(),
|
|
646
|
-
/** Resize behavior */
|
|
647
|
-
resize: TextareaResizeSchema.optional()
|
|
648
|
-
}).strict();
|
|
649
|
-
var CheckboxOptionsSchema = import_zod8.z.object({
|
|
650
|
-
/** Input name (required) */
|
|
651
|
-
name: import_zod8.z.string(),
|
|
652
|
-
/** Input ID */
|
|
653
|
-
id: import_zod8.z.string().optional(),
|
|
654
|
-
/** Input value */
|
|
655
|
-
value: import_zod8.z.string().optional(),
|
|
656
|
-
/** Label text (required) */
|
|
657
|
-
label: import_zod8.z.string(),
|
|
658
|
-
/** Checked state */
|
|
659
|
-
checked: import_zod8.z.boolean().optional(),
|
|
660
|
-
/** Disabled state */
|
|
661
|
-
disabled: import_zod8.z.boolean().optional(),
|
|
662
|
-
/** Helper text */
|
|
663
|
-
helper: import_zod8.z.string().optional(),
|
|
664
|
-
/** Error message */
|
|
665
|
-
error: import_zod8.z.string().optional(),
|
|
666
|
-
/** Additional CSS classes */
|
|
667
|
-
className: import_zod8.z.string().optional()
|
|
668
|
-
}).strict();
|
|
669
|
-
var RadioOptionItemSchema = import_zod8.z.object({
|
|
670
|
-
value: import_zod8.z.string(),
|
|
671
|
-
label: import_zod8.z.string(),
|
|
672
|
-
disabled: import_zod8.z.boolean().optional()
|
|
673
|
-
}).strict();
|
|
674
|
-
var RadioGroupOptionsSchema = import_zod8.z.object({
|
|
675
|
-
/** Group name (required) */
|
|
676
|
-
name: import_zod8.z.string(),
|
|
677
|
-
/** Radio options (required) */
|
|
678
|
-
options: import_zod8.z.array(RadioOptionItemSchema),
|
|
679
|
-
/** Selected value */
|
|
680
|
-
value: import_zod8.z.string().optional(),
|
|
681
|
-
/** Label for the group */
|
|
682
|
-
label: import_zod8.z.string().optional(),
|
|
683
|
-
/** Helper text */
|
|
684
|
-
helper: import_zod8.z.string().optional(),
|
|
685
|
-
/** Error message */
|
|
686
|
-
error: import_zod8.z.string().optional(),
|
|
687
|
-
/** Layout direction */
|
|
688
|
-
direction: import_zod8.z.enum(["horizontal", "vertical"]).optional(),
|
|
689
|
-
/** Additional CSS classes */
|
|
690
|
-
className: import_zod8.z.string().optional()
|
|
691
|
-
}).strict();
|
|
692
|
-
var FormMethodSchema = import_zod8.z.enum(["get", "post", "dialog"]);
|
|
693
|
-
var FormEnctypeSchema = import_zod8.z.enum(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
|
|
694
|
-
var FormOptionsSchema = import_zod8.z.object({
|
|
695
|
-
/** Form action URL */
|
|
696
|
-
action: import_zod8.z.string().optional(),
|
|
697
|
-
/** Form method */
|
|
698
|
-
method: FormMethodSchema.optional(),
|
|
699
|
-
/** Form ID */
|
|
700
|
-
id: import_zod8.z.string().optional(),
|
|
701
|
-
/** Form enctype */
|
|
702
|
-
enctype: FormEnctypeSchema.optional(),
|
|
703
|
-
/** Disable browser validation */
|
|
704
|
-
novalidate: import_zod8.z.boolean().optional(),
|
|
705
|
-
/** Autocomplete behavior */
|
|
706
|
-
autocomplete: import_zod8.z.enum(["on", "off"]).optional(),
|
|
707
|
-
/** Additional CSS classes */
|
|
708
|
-
className: import_zod8.z.string().optional()
|
|
709
|
-
}).strict();
|
|
710
|
-
var FormRowOptionsSchema = import_zod8.z.object({
|
|
711
|
-
/** Number of columns */
|
|
712
|
-
cols: import_zod8.z.number().min(1).max(12).optional(),
|
|
713
|
-
/** Gap between columns */
|
|
714
|
-
gap: import_zod8.z.enum(["sm", "md", "lg"]).optional(),
|
|
715
|
-
/** Additional CSS classes */
|
|
716
|
-
className: import_zod8.z.string().optional()
|
|
717
|
-
}).strict();
|
|
718
|
-
var FormSectionOptionsSchema = import_zod8.z.object({
|
|
719
|
-
/** Section title */
|
|
720
|
-
title: import_zod8.z.string().optional(),
|
|
721
|
-
/** Section description */
|
|
722
|
-
description: import_zod8.z.string().optional(),
|
|
723
|
-
/** Additional CSS classes */
|
|
724
|
-
className: import_zod8.z.string().optional()
|
|
725
|
-
}).strict();
|
|
726
|
-
var FormActionsOptionsSchema = import_zod8.z.object({
|
|
727
|
-
/** Alignment */
|
|
728
|
-
align: import_zod8.z.enum(["left", "center", "right", "between"]).optional(),
|
|
729
|
-
/** Additional CSS classes */
|
|
730
|
-
className: import_zod8.z.string().optional()
|
|
731
|
-
}).strict();
|
|
732
|
-
|
|
733
|
-
// libs/ui/src/components/list.schema.ts
|
|
734
|
-
var import_zod9 = require("zod");
|
|
735
|
-
var PermissionItemSchema = import_zod9.z.object({
|
|
736
|
-
/** Scope identifier */
|
|
737
|
-
scope: import_zod9.z.string(),
|
|
738
|
-
/** Display name */
|
|
739
|
-
name: import_zod9.z.string(),
|
|
740
|
-
/** Description */
|
|
741
|
-
description: import_zod9.z.string().optional(),
|
|
742
|
-
/** Icon HTML */
|
|
743
|
-
icon: import_zod9.z.string().optional(),
|
|
744
|
-
/** Required permission (cannot be unchecked) */
|
|
745
|
-
required: import_zod9.z.boolean().optional(),
|
|
746
|
-
/** Checked by default */
|
|
747
|
-
checked: import_zod9.z.boolean().optional(),
|
|
748
|
-
/** Sensitive/dangerous permission */
|
|
749
|
-
sensitive: import_zod9.z.boolean().optional()
|
|
750
|
-
}).strict();
|
|
751
|
-
var PermissionListOptionsSchema = import_zod9.z.object({
|
|
752
|
-
/** List ID */
|
|
753
|
-
id: import_zod9.z.string().optional(),
|
|
754
|
-
/** Checkable permissions */
|
|
755
|
-
checkable: import_zod9.z.boolean().optional(),
|
|
756
|
-
/** Input name for checkable */
|
|
757
|
-
inputName: import_zod9.z.string().optional(),
|
|
758
|
-
/** Group title */
|
|
759
|
-
title: import_zod9.z.string().optional(),
|
|
760
|
-
/** Additional CSS classes */
|
|
761
|
-
className: import_zod9.z.string().optional()
|
|
762
|
-
}).strict();
|
|
763
|
-
var FeatureItemSchema = import_zod9.z.object({
|
|
764
|
-
/** Feature name */
|
|
765
|
-
name: import_zod9.z.string(),
|
|
766
|
-
/** Feature description */
|
|
767
|
-
description: import_zod9.z.string().optional(),
|
|
768
|
-
/** Icon HTML */
|
|
769
|
-
icon: import_zod9.z.string().optional(),
|
|
770
|
-
/** Included in plan */
|
|
771
|
-
included: import_zod9.z.boolean().optional()
|
|
772
|
-
}).strict();
|
|
773
|
-
var FeatureListOptionsSchema = import_zod9.z.object({
|
|
774
|
-
/** Group title */
|
|
775
|
-
title: import_zod9.z.string().optional(),
|
|
776
|
-
/** Show included/excluded styling */
|
|
777
|
-
showStatus: import_zod9.z.boolean().optional(),
|
|
778
|
-
/** Additional CSS classes */
|
|
779
|
-
className: import_zod9.z.string().optional()
|
|
780
|
-
}).strict();
|
|
781
|
-
var DescriptionItemSchema = import_zod9.z.object({
|
|
782
|
-
/** Term/label */
|
|
783
|
-
term: import_zod9.z.string(),
|
|
784
|
-
/** Description/value */
|
|
785
|
-
description: import_zod9.z.string(),
|
|
786
|
-
/** Copy button */
|
|
787
|
-
copyable: import_zod9.z.boolean().optional()
|
|
788
|
-
}).strict();
|
|
789
|
-
var DescriptionListOptionsSchema = import_zod9.z.object({
|
|
790
|
-
/** Layout direction */
|
|
791
|
-
direction: import_zod9.z.enum(["horizontal", "vertical"]).optional(),
|
|
792
|
-
/** Striped rows */
|
|
793
|
-
striped: import_zod9.z.boolean().optional(),
|
|
794
|
-
/** Additional CSS classes */
|
|
795
|
-
className: import_zod9.z.string().optional()
|
|
796
|
-
}).strict();
|
|
797
|
-
var ActionItemSchema = import_zod9.z.object({
|
|
798
|
-
/** Action label */
|
|
799
|
-
label: import_zod9.z.string(),
|
|
800
|
-
/** Action description */
|
|
801
|
-
description: import_zod9.z.string().optional(),
|
|
802
|
-
/** Icon HTML */
|
|
803
|
-
icon: import_zod9.z.string().optional(),
|
|
804
|
-
/** Click URL */
|
|
805
|
-
href: import_zod9.z.string().optional(),
|
|
806
|
-
/** Destructive action styling */
|
|
807
|
-
destructive: import_zod9.z.boolean().optional(),
|
|
808
|
-
/** Disabled state */
|
|
809
|
-
disabled: import_zod9.z.boolean().optional()
|
|
810
|
-
}).strict();
|
|
811
|
-
var ActionListOptionsSchema = import_zod9.z.object({
|
|
812
|
-
/** Divided items */
|
|
813
|
-
divided: import_zod9.z.boolean().optional(),
|
|
814
|
-
/** Additional CSS classes */
|
|
815
|
-
className: import_zod9.z.string().optional()
|
|
816
|
-
}).strict();
|
|
817
|
-
|
|
818
|
-
// libs/ui/src/layouts/base.ts
|
|
819
|
-
var import_theme = require("@frontmcp/uipack/theme");
|
|
820
|
-
var import_utils = require("@frontmcp/uipack/utils");
|
|
821
|
-
var import_utils2 = require("@frontmcp/uipack/utils");
|
|
822
|
-
|
|
823
|
-
// libs/ui/src/components/button.ts
|
|
824
|
-
var import_validation = require("@frontmcp/uipack/validation");
|
|
825
|
-
function getVariantClasses(variant) {
|
|
826
|
-
const variants = {
|
|
827
|
-
primary: "bg-primary hover:bg-primary/90 text-white shadow-sm",
|
|
828
|
-
secondary: "bg-secondary hover:bg-secondary/90 text-white shadow-sm",
|
|
829
|
-
outline: "border-2 border-primary text-primary hover:bg-primary/10",
|
|
830
|
-
ghost: "text-text-primary hover:bg-gray-100",
|
|
831
|
-
danger: "bg-danger hover:bg-danger/90 text-white shadow-sm",
|
|
832
|
-
success: "bg-success hover:bg-success/90 text-white shadow-sm",
|
|
833
|
-
link: "text-primary hover:text-primary/80 hover:underline"
|
|
834
|
-
};
|
|
835
|
-
return variants[variant];
|
|
836
|
-
}
|
|
837
|
-
function getSizeClasses(size, iconOnly) {
|
|
838
|
-
if (iconOnly) {
|
|
839
|
-
const iconSizes = {
|
|
840
|
-
xs: "p-1.5",
|
|
841
|
-
sm: "p-2",
|
|
842
|
-
md: "p-2.5",
|
|
843
|
-
lg: "p-3",
|
|
844
|
-
xl: "p-4"
|
|
845
|
-
};
|
|
846
|
-
return iconSizes[size];
|
|
847
|
-
}
|
|
848
|
-
const sizes = {
|
|
849
|
-
xs: "px-2.5 py-1.5 text-xs",
|
|
850
|
-
sm: "px-3 py-2 text-sm",
|
|
851
|
-
md: "px-4 py-2.5 text-sm",
|
|
852
|
-
lg: "px-5 py-3 text-base",
|
|
853
|
-
xl: "px-6 py-3.5 text-lg"
|
|
854
|
-
};
|
|
855
|
-
return sizes[size];
|
|
856
|
-
}
|
|
857
|
-
function sanitizeDataKey(key) {
|
|
858
|
-
const sanitized = key.toLowerCase().replace(/[^a-z0-9_-]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
859
|
-
if (!sanitized) {
|
|
860
|
-
console.warn(`[frontmcp/ui] Dropping invalid data-* key: "${key}"`);
|
|
861
|
-
return null;
|
|
50
|
+
// libs/ui/src/components/Button/Button.tsx
|
|
51
|
+
var import_styles = require("@mui/material/styles");
|
|
52
|
+
var import_Button = __toESM(require("@mui/material/Button"));
|
|
53
|
+
var import_CircularProgress = __toESM(require("@mui/material/CircularProgress"));
|
|
54
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
55
|
+
function mapVariant(variant) {
|
|
56
|
+
switch (variant) {
|
|
57
|
+
case "primary":
|
|
58
|
+
return { variant: "contained", color: "primary" };
|
|
59
|
+
case "secondary":
|
|
60
|
+
return { variant: "outlined", color: "secondary" };
|
|
61
|
+
case "danger":
|
|
62
|
+
return { variant: "contained", color: "error" };
|
|
63
|
+
case "ghost":
|
|
64
|
+
return { variant: "text", color: "inherit" };
|
|
862
65
|
}
|
|
863
|
-
return sanitized;
|
|
864
66
|
}
|
|
865
|
-
var
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
}
|
|
873
|
-
function
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
if (!iconOnly && !text.trim()) {
|
|
902
|
-
console.warn("[frontmcp/ui] Button has empty text. Consider providing text or using iconOnly with ariaLabel.");
|
|
903
|
-
}
|
|
904
|
-
if (iconOnly && !ariaLabel && !text.trim()) {
|
|
905
|
-
console.warn(
|
|
906
|
-
"[frontmcp/ui] iconOnly button requires non-empty text or ariaLabel for accessibility; control will have no label."
|
|
907
|
-
);
|
|
908
|
-
}
|
|
909
|
-
if (href && !isValidHrefProtocol(href)) {
|
|
910
|
-
console.warn(`[frontmcp/ui] Button href contains potentially dangerous protocol: "${href.slice(0, 20)}..."`);
|
|
911
|
-
}
|
|
912
|
-
const variantClasses = getVariantClasses(variant);
|
|
913
|
-
const sizeClasses = getSizeClasses(size, iconOnly);
|
|
914
|
-
const safeClassName = className ? (0, import_utils2.escapeHtml)(className) : "";
|
|
915
|
-
const baseClasses = [
|
|
916
|
-
"inline-flex items-center justify-center",
|
|
917
|
-
"font-medium",
|
|
918
|
-
"rounded-lg",
|
|
919
|
-
"transition-colors duration-200",
|
|
920
|
-
"focus:outline-none focus:ring-2 focus:ring-primary/50 focus:ring-offset-2",
|
|
921
|
-
disabled || loading ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
922
|
-
fullWidth ? "w-full" : "",
|
|
923
|
-
variantClasses,
|
|
924
|
-
sizeClasses,
|
|
925
|
-
safeClassName
|
|
926
|
-
].filter(Boolean).join(" ");
|
|
927
|
-
const dataAttrs = data ? Object.entries(data).map(([key, val]) => {
|
|
928
|
-
const safeKey = sanitizeDataKey(key);
|
|
929
|
-
return safeKey ? `data-${safeKey}="${(0, import_utils2.escapeHtml)(val)}"` : "";
|
|
930
|
-
}).filter(Boolean).join(" ") : "";
|
|
931
|
-
const idAttr = id ? `id="${(0, import_utils2.escapeHtml)(id)}"` : "";
|
|
932
|
-
const nameAttr = name ? `name="${(0, import_utils2.escapeHtml)(name)}"` : "";
|
|
933
|
-
const valueAttr = value ? `value="${(0, import_utils2.escapeHtml)(value)}"` : "";
|
|
934
|
-
const disabledAttr = disabled || loading ? "disabled" : "";
|
|
935
|
-
const targetAttr = target ? `target="${(0, import_utils2.escapeHtml)(target)}"` : "";
|
|
936
|
-
const relAttr = target === "_blank" ? 'rel="noopener noreferrer"' : "";
|
|
937
|
-
const trimmedText = text.trim();
|
|
938
|
-
const effectiveAriaLabel = ariaLabel ?? (iconOnly && trimmedText ? trimmedText : void 0);
|
|
939
|
-
const ariaLabelAttr = effectiveAriaLabel ? `aria-label="${(0, import_utils2.escapeHtml)(effectiveAriaLabel)}"` : "";
|
|
940
|
-
const iconBeforeHtml = iconBefore && !loading ? `<span class="${iconOnly ? "" : "mr-2"}">${iconBefore}</span>` : "";
|
|
941
|
-
const iconAfterHtml = iconAfter && !loading ? `<span class="${iconOnly ? "" : "ml-2"}">${iconAfter}</span>` : "";
|
|
942
|
-
const loadingHtml = loading ? loadingSpinner : "";
|
|
943
|
-
const textHtml = iconOnly ? "" : (0, import_utils2.escapeHtml)(text);
|
|
944
|
-
const contentHtml = `${loadingHtml}${iconBeforeHtml}${textHtml}${iconAfterHtml}`;
|
|
945
|
-
if (href && !disabled && !loading && isValidHrefProtocol(href)) {
|
|
946
|
-
return `<a href="${(0, import_utils2.escapeHtml)(
|
|
947
|
-
href
|
|
948
|
-
)}" class="${baseClasses}" ${idAttr} ${dataAttrs} ${ariaLabelAttr} ${targetAttr} ${relAttr}>
|
|
949
|
-
${contentHtml}
|
|
950
|
-
</a>`;
|
|
951
|
-
}
|
|
952
|
-
return `<button type="${type}" class="${baseClasses}" ${idAttr} ${nameAttr} ${valueAttr} ${disabledAttr} ${dataAttrs} ${ariaLabelAttr}>
|
|
953
|
-
${contentHtml}
|
|
954
|
-
</button>`;
|
|
67
|
+
var StyledButton = (0, import_styles.styled)(import_Button.default, {
|
|
68
|
+
name: "Button",
|
|
69
|
+
slot: "Root"
|
|
70
|
+
})(({ theme }) => ({
|
|
71
|
+
textTransform: "none",
|
|
72
|
+
fontWeight: 500,
|
|
73
|
+
borderRadius: theme.shape.borderRadius
|
|
74
|
+
}));
|
|
75
|
+
function Button({
|
|
76
|
+
variant = "primary",
|
|
77
|
+
size = "medium",
|
|
78
|
+
loading = false,
|
|
79
|
+
disabled = false,
|
|
80
|
+
startIcon,
|
|
81
|
+
endIcon,
|
|
82
|
+
fullWidth = false,
|
|
83
|
+
onClick,
|
|
84
|
+
type = "button",
|
|
85
|
+
children
|
|
86
|
+
}) {
|
|
87
|
+
const mapped = mapVariant(variant);
|
|
88
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
89
|
+
StyledButton,
|
|
90
|
+
{
|
|
91
|
+
variant: mapped.variant,
|
|
92
|
+
color: mapped.color,
|
|
93
|
+
size,
|
|
94
|
+
disabled: disabled || loading,
|
|
95
|
+
startIcon: loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_CircularProgress.default, { size: 16, color: "inherit" }) : startIcon,
|
|
96
|
+
endIcon,
|
|
97
|
+
fullWidth,
|
|
98
|
+
onClick,
|
|
99
|
+
type,
|
|
100
|
+
children
|
|
101
|
+
}
|
|
102
|
+
);
|
|
955
103
|
}
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
104
|
+
|
|
105
|
+
// libs/ui/src/components/Card/Card.tsx
|
|
106
|
+
var import_styles2 = require("@mui/material/styles");
|
|
107
|
+
var import_Card = __toESM(require("@mui/material/Card"));
|
|
108
|
+
var import_CardHeader = __toESM(require("@mui/material/CardHeader"));
|
|
109
|
+
var import_CardContent = __toESM(require("@mui/material/CardContent"));
|
|
110
|
+
var import_CardActions = __toESM(require("@mui/material/CardActions"));
|
|
111
|
+
var import_CardActionArea = __toESM(require("@mui/material/CardActionArea"));
|
|
112
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
113
|
+
var StyledCard = (0, import_styles2.styled)(import_Card.default, {
|
|
114
|
+
name: "Card",
|
|
115
|
+
slot: "Root"
|
|
116
|
+
})(({ theme }) => ({
|
|
117
|
+
borderRadius: theme.shape.borderRadius,
|
|
118
|
+
transition: theme.transitions.create(["box-shadow", "border-color"], {
|
|
119
|
+
duration: theme.transitions.duration.short
|
|
120
|
+
})
|
|
121
|
+
}));
|
|
122
|
+
var StyledCardHeader = (0, import_styles2.styled)(import_CardHeader.default, {
|
|
123
|
+
name: "Card",
|
|
124
|
+
slot: "Header"
|
|
125
|
+
})(({ theme }) => ({
|
|
126
|
+
"& .MuiCardHeader-title": {
|
|
127
|
+
fontWeight: 600,
|
|
128
|
+
fontSize: theme.typography.body1.fontSize
|
|
129
|
+
},
|
|
130
|
+
"& .MuiCardHeader-subheader": {
|
|
131
|
+
fontSize: theme.typography.body2.fontSize
|
|
967
132
|
}
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
133
|
+
}));
|
|
134
|
+
var StyledCardContent = (0, import_styles2.styled)(import_CardContent.default, {
|
|
135
|
+
name: "Card",
|
|
136
|
+
slot: "Content"
|
|
137
|
+
})({
|
|
138
|
+
"&:last-child": {
|
|
139
|
+
paddingBottom: 16
|
|
974
140
|
}
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
};
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
}
|
|
1006
|
-
function buildDataAttrs(data) {
|
|
1007
|
-
if (!data) return "";
|
|
1008
|
-
return Object.entries(data).map(([key, value]) => `data-${key}="${(0, import_utils2.escapeHtml)(value)}"`).join(" ");
|
|
1009
|
-
}
|
|
1010
|
-
function card(content, options = {}) {
|
|
1011
|
-
const {
|
|
1012
|
-
variant = "default",
|
|
1013
|
-
size = "md",
|
|
1014
|
-
title,
|
|
1015
|
-
subtitle,
|
|
1016
|
-
headerActions,
|
|
1017
|
-
footer,
|
|
1018
|
-
className = "",
|
|
1019
|
-
id,
|
|
1020
|
-
data,
|
|
1021
|
-
clickable = false,
|
|
1022
|
-
href,
|
|
1023
|
-
sanitize = false
|
|
1024
|
-
} = options;
|
|
1025
|
-
const safeContent = sanitize ? (0, import_runtime.sanitizeHtmlContent)(content) : content;
|
|
1026
|
-
const safeHeaderActions = sanitize && headerActions ? (0, import_runtime.sanitizeHtmlContent)(headerActions) : headerActions;
|
|
1027
|
-
const safeFooter = sanitize && footer ? (0, import_runtime.sanitizeHtmlContent)(footer) : footer;
|
|
1028
|
-
const variantClasses = getVariantClasses2(variant);
|
|
1029
|
-
const sizeClasses = getSizeClasses2(size);
|
|
1030
|
-
const clickableClasses = clickable ? "cursor-pointer hover:shadow-md transition-shadow" : "";
|
|
1031
|
-
const safeClassName = className ? (0, import_utils2.escapeHtml)(className) : "";
|
|
1032
|
-
const allClasses = [variantClasses, sizeClasses, clickableClasses, safeClassName].filter(Boolean).join(" ");
|
|
1033
|
-
const dataAttrs = buildDataAttrs(data);
|
|
1034
|
-
const idAttr = id ? `id="${(0, import_utils2.escapeHtml)(id)}"` : "";
|
|
1035
|
-
const hasHeader = title || subtitle || safeHeaderActions;
|
|
1036
|
-
const headerHtml = hasHeader ? `<div class="flex items-start justify-between mb-4">
|
|
1037
|
-
<div>
|
|
1038
|
-
${title ? `<h3 class="text-lg font-semibold text-text-primary">${(0, import_utils2.escapeHtml)(title)}</h3>` : ""}
|
|
1039
|
-
${subtitle ? `<p class="text-sm text-text-secondary mt-1">${(0, import_utils2.escapeHtml)(subtitle)}</p>` : ""}
|
|
1040
|
-
</div>
|
|
1041
|
-
${safeHeaderActions ? `<div class="flex items-center gap-2">${safeHeaderActions}</div>` : ""}
|
|
1042
|
-
</div>` : "";
|
|
1043
|
-
const footerHtml = safeFooter ? `<div class="mt-4 pt-4 border-t border-divider">${safeFooter}</div>` : "";
|
|
1044
|
-
if (href) {
|
|
1045
|
-
return `<a href="${(0, import_utils2.escapeHtml)(href)}" class="${allClasses}" ${idAttr} ${dataAttrs}>
|
|
1046
|
-
${headerHtml}
|
|
1047
|
-
${safeContent}
|
|
1048
|
-
${footerHtml}
|
|
1049
|
-
</a>`;
|
|
141
|
+
});
|
|
142
|
+
var StyledCardActions = (0, import_styles2.styled)(import_CardActions.default, {
|
|
143
|
+
name: "Card",
|
|
144
|
+
slot: "Actions"
|
|
145
|
+
})(({ theme }) => ({
|
|
146
|
+
borderTop: `1px solid ${theme.palette.divider}`,
|
|
147
|
+
padding: theme.spacing(1, 2)
|
|
148
|
+
}));
|
|
149
|
+
function Card({
|
|
150
|
+
title,
|
|
151
|
+
subtitle,
|
|
152
|
+
headerActions,
|
|
153
|
+
footer,
|
|
154
|
+
elevation = 1,
|
|
155
|
+
clickable = false,
|
|
156
|
+
onClick,
|
|
157
|
+
slotProps,
|
|
158
|
+
children
|
|
159
|
+
}) {
|
|
160
|
+
const header = title || subtitle || headerActions ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(StyledCardHeader, { title, subheader: subtitle, action: headerActions, ...slotProps?.header }) : null;
|
|
161
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(StyledCardContent, { ...slotProps?.content, children });
|
|
162
|
+
const actions = footer ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(StyledCardActions, { ...slotProps?.actions, children: footer }) : null;
|
|
163
|
+
if (clickable) {
|
|
164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(StyledCard, { elevation, ...slotProps?.root, children: [
|
|
165
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_CardActionArea.default, { onClick, children: [
|
|
166
|
+
header,
|
|
167
|
+
content
|
|
168
|
+
] }),
|
|
169
|
+
actions
|
|
170
|
+
] });
|
|
1050
171
|
}
|
|
1051
|
-
return
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
}
|
|
1057
|
-
function cardGroup(cards, options = {}) {
|
|
1058
|
-
const { direction = "vertical", gap = "md", className = "" } = options;
|
|
1059
|
-
const gapClasses = { sm: "gap-2", md: "gap-4", lg: "gap-6" };
|
|
1060
|
-
const directionClasses = direction === "horizontal" ? "flex flex-row flex-wrap" : "flex flex-col";
|
|
1061
|
-
const safeClassName = className ? (0, import_utils2.escapeHtml)(className) : "";
|
|
1062
|
-
return `<div class="${directionClasses} ${gapClasses[gap]} ${safeClassName}">
|
|
1063
|
-
${cards.join("\n")}
|
|
1064
|
-
</div>`;
|
|
172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(StyledCard, { elevation, onClick, ...slotProps?.root, children: [
|
|
173
|
+
header,
|
|
174
|
+
content,
|
|
175
|
+
actions
|
|
176
|
+
] });
|
|
1065
177
|
}
|
|
1066
178
|
|
|
1067
|
-
// libs/ui/src/components/
|
|
1068
|
-
var
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
}
|
|
1090
|
-
function input(options) {
|
|
1091
|
-
const {
|
|
1092
|
-
type = "text",
|
|
1093
|
-
name,
|
|
1094
|
-
id = name,
|
|
1095
|
-
value = "",
|
|
1096
|
-
placeholder = "",
|
|
1097
|
-
label,
|
|
1098
|
-
helper,
|
|
1099
|
-
error,
|
|
1100
|
-
size = "md",
|
|
1101
|
-
state = error ? "error" : "default",
|
|
1102
|
-
required = false,
|
|
1103
|
-
disabled = false,
|
|
1104
|
-
readonly = false,
|
|
1105
|
-
autocomplete,
|
|
1106
|
-
pattern,
|
|
1107
|
-
min,
|
|
1108
|
-
max,
|
|
1109
|
-
step,
|
|
1110
|
-
className = "",
|
|
1111
|
-
data,
|
|
1112
|
-
iconBefore,
|
|
1113
|
-
iconAfter,
|
|
1114
|
-
sanitize = false
|
|
1115
|
-
} = options;
|
|
1116
|
-
const safeIconBefore = sanitize && iconBefore ? (0, import_runtime2.sanitizeHtmlContent)(iconBefore) : iconBefore;
|
|
1117
|
-
const safeIconAfter = sanitize && iconAfter ? (0, import_runtime2.sanitizeHtmlContent)(iconAfter) : iconAfter;
|
|
1118
|
-
const sizeClasses = getInputSizeClasses(size);
|
|
1119
|
-
const stateClasses = getInputStateClasses(state);
|
|
1120
|
-
const hasIcon = safeIconBefore || safeIconAfter;
|
|
1121
|
-
const safeClassName = className ? (0, import_utils2.escapeHtml)(className) : "";
|
|
1122
|
-
const baseClasses = [
|
|
1123
|
-
"w-full rounded-lg border bg-white",
|
|
1124
|
-
"transition-colors duration-200",
|
|
1125
|
-
"focus:outline-none focus:ring-2",
|
|
1126
|
-
disabled ? "opacity-50 cursor-not-allowed bg-gray-50" : "",
|
|
1127
|
-
sizeClasses,
|
|
1128
|
-
stateClasses,
|
|
1129
|
-
hasIcon ? (safeIconBefore ? "pl-10" : "") + (safeIconAfter ? " pr-10" : "") : "",
|
|
1130
|
-
safeClassName
|
|
1131
|
-
].filter(Boolean).join(" ");
|
|
1132
|
-
const dataAttrs = buildDataAttrs2(data);
|
|
1133
|
-
const inputAttrs = [
|
|
1134
|
-
`type="${type}"`,
|
|
1135
|
-
`name="${(0, import_utils2.escapeHtml)(name)}"`,
|
|
1136
|
-
`id="${(0, import_utils2.escapeHtml)(id)}"`,
|
|
1137
|
-
value ? `value="${(0, import_utils2.escapeHtml)(value)}"` : "",
|
|
1138
|
-
placeholder ? `placeholder="${(0, import_utils2.escapeHtml)(placeholder)}"` : "",
|
|
1139
|
-
required ? "required" : "",
|
|
1140
|
-
disabled ? "disabled" : "",
|
|
1141
|
-
readonly ? "readonly" : "",
|
|
1142
|
-
autocomplete ? `autocomplete="${(0, import_utils2.escapeHtml)(autocomplete)}"` : "",
|
|
1143
|
-
pattern ? `pattern="${(0, import_utils2.escapeHtml)(pattern)}"` : "",
|
|
1144
|
-
min !== void 0 ? `min="${(0, import_utils2.escapeHtml)(String(min))}"` : "",
|
|
1145
|
-
max !== void 0 ? `max="${(0, import_utils2.escapeHtml)(String(max))}"` : "",
|
|
1146
|
-
step !== void 0 ? `step="${(0, import_utils2.escapeHtml)(String(step))}"` : "",
|
|
1147
|
-
`class="${baseClasses}"`,
|
|
1148
|
-
dataAttrs
|
|
1149
|
-
].filter(Boolean).join(" ");
|
|
1150
|
-
const labelHtml = label ? `<label for="${(0, import_utils2.escapeHtml)(id)}" class="block text-sm font-medium text-text-primary mb-1.5">
|
|
1151
|
-
${(0, import_utils2.escapeHtml)(label)}${required ? '<span class="text-danger ml-1">*</span>' : ""}
|
|
1152
|
-
</label>` : "";
|
|
1153
|
-
const helperHtml = helper && !error ? `<p class="mt-1.5 text-sm text-text-secondary">${(0, import_utils2.escapeHtml)(helper)}</p>` : "";
|
|
1154
|
-
const errorHtml = error ? `<p class="mt-1.5 text-sm text-danger">${(0, import_utils2.escapeHtml)(error)}</p>` : "";
|
|
1155
|
-
const iconBeforeHtml = safeIconBefore ? `<span class="absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary">${safeIconBefore}</span>` : "";
|
|
1156
|
-
const iconAfterHtml = safeIconAfter ? `<span class="absolute right-3 top-1/2 -translate-y-1/2 text-text-secondary">${safeIconAfter}</span>` : "";
|
|
1157
|
-
const inputHtml = hasIcon ? `<div class="relative">
|
|
1158
|
-
${iconBeforeHtml}
|
|
1159
|
-
<input ${inputAttrs}>
|
|
1160
|
-
${iconAfterHtml}
|
|
1161
|
-
</div>` : `<input ${inputAttrs}>`;
|
|
1162
|
-
return `<div class="form-field">
|
|
1163
|
-
${labelHtml}
|
|
1164
|
-
${inputHtml}
|
|
1165
|
-
${helperHtml}
|
|
1166
|
-
${errorHtml}
|
|
1167
|
-
</div>`;
|
|
1168
|
-
}
|
|
1169
|
-
function select(options) {
|
|
1170
|
-
const {
|
|
1171
|
-
name,
|
|
1172
|
-
id = name,
|
|
1173
|
-
options: selectOptions,
|
|
1174
|
-
value,
|
|
1175
|
-
label,
|
|
1176
|
-
helper,
|
|
1177
|
-
error,
|
|
1178
|
-
size = "md",
|
|
1179
|
-
state = error ? "error" : "default",
|
|
1180
|
-
required = false,
|
|
1181
|
-
disabled = false,
|
|
1182
|
-
multiple = false,
|
|
1183
|
-
className = "",
|
|
1184
|
-
data
|
|
1185
|
-
} = options;
|
|
1186
|
-
const sizeClasses = getInputSizeClasses(size);
|
|
1187
|
-
const stateClasses = getInputStateClasses(state);
|
|
1188
|
-
const safeClassName = className ? (0, import_utils2.escapeHtml)(className) : "";
|
|
1189
|
-
const baseClasses = [
|
|
1190
|
-
"w-full rounded-lg border bg-white",
|
|
1191
|
-
"transition-colors duration-200",
|
|
1192
|
-
"focus:outline-none focus:ring-2",
|
|
1193
|
-
disabled ? "opacity-50 cursor-not-allowed bg-gray-50" : "",
|
|
1194
|
-
sizeClasses,
|
|
1195
|
-
stateClasses,
|
|
1196
|
-
safeClassName
|
|
1197
|
-
].filter(Boolean).join(" ");
|
|
1198
|
-
const dataAttrs = buildDataAttrs2(data);
|
|
1199
|
-
const optionsHtml = selectOptions.map((opt) => {
|
|
1200
|
-
const selected = opt.selected || opt.value === value ? "selected" : "";
|
|
1201
|
-
const optDisabled = opt.disabled ? "disabled" : "";
|
|
1202
|
-
return `<option value="${(0, import_utils2.escapeHtml)(opt.value)}" ${selected} ${optDisabled}>${(0, import_utils2.escapeHtml)(opt.label)}</option>`;
|
|
1203
|
-
}).join("\n");
|
|
1204
|
-
const labelHtml = label ? `<label for="${(0, import_utils2.escapeHtml)(id)}" class="block text-sm font-medium text-text-primary mb-1.5">
|
|
1205
|
-
${(0, import_utils2.escapeHtml)(label)}${required ? '<span class="text-danger ml-1">*</span>' : ""}
|
|
1206
|
-
</label>` : "";
|
|
1207
|
-
const helperHtml = helper && !error ? `<p class="mt-1.5 text-sm text-text-secondary">${(0, import_utils2.escapeHtml)(helper)}</p>` : "";
|
|
1208
|
-
const errorHtml = error ? `<p class="mt-1.5 text-sm text-danger">${(0, import_utils2.escapeHtml)(error)}</p>` : "";
|
|
1209
|
-
return `<div class="form-field">
|
|
1210
|
-
${labelHtml}
|
|
1211
|
-
<select
|
|
1212
|
-
name="${(0, import_utils2.escapeHtml)(name)}"
|
|
1213
|
-
id="${(0, import_utils2.escapeHtml)(id)}"
|
|
1214
|
-
class="${baseClasses}"
|
|
1215
|
-
${required ? "required" : ""}
|
|
1216
|
-
${disabled ? "disabled" : ""}
|
|
1217
|
-
${multiple ? "multiple" : ""}
|
|
1218
|
-
${dataAttrs}
|
|
1219
|
-
>
|
|
1220
|
-
${optionsHtml}
|
|
1221
|
-
</select>
|
|
1222
|
-
${helperHtml}
|
|
1223
|
-
${errorHtml}
|
|
1224
|
-
</div>`;
|
|
1225
|
-
}
|
|
1226
|
-
function textarea(options) {
|
|
1227
|
-
const {
|
|
1228
|
-
name,
|
|
1229
|
-
id = name,
|
|
1230
|
-
value = "",
|
|
1231
|
-
placeholder = "",
|
|
1232
|
-
label,
|
|
1233
|
-
helper,
|
|
1234
|
-
error,
|
|
1235
|
-
size = "md",
|
|
1236
|
-
state = error ? "error" : "default",
|
|
1237
|
-
required = false,
|
|
1238
|
-
disabled = false,
|
|
1239
|
-
readonly = false,
|
|
1240
|
-
rows = 4,
|
|
1241
|
-
resize = "vertical",
|
|
1242
|
-
className = "",
|
|
1243
|
-
data
|
|
1244
|
-
} = options;
|
|
1245
|
-
const sizeClasses = getInputSizeClasses(size);
|
|
1246
|
-
const stateClasses = getInputStateClasses(state);
|
|
1247
|
-
const resizeClasses = {
|
|
1248
|
-
none: "resize-none",
|
|
1249
|
-
vertical: "resize-y",
|
|
1250
|
-
horizontal: "resize-x",
|
|
1251
|
-
both: "resize"
|
|
1252
|
-
};
|
|
1253
|
-
const safeClassName = className ? (0, import_utils2.escapeHtml)(className) : "";
|
|
1254
|
-
const baseClasses = [
|
|
1255
|
-
"w-full rounded-lg border bg-white",
|
|
1256
|
-
"transition-colors duration-200",
|
|
1257
|
-
"focus:outline-none focus:ring-2",
|
|
1258
|
-
disabled ? "opacity-50 cursor-not-allowed bg-gray-50" : "",
|
|
1259
|
-
sizeClasses,
|
|
1260
|
-
stateClasses,
|
|
1261
|
-
resizeClasses[resize],
|
|
1262
|
-
safeClassName
|
|
1263
|
-
].filter(Boolean).join(" ");
|
|
1264
|
-
const dataAttrs = buildDataAttrs2(data);
|
|
1265
|
-
const labelHtml = label ? `<label for="${(0, import_utils2.escapeHtml)(id)}" class="block text-sm font-medium text-text-primary mb-1.5">
|
|
1266
|
-
${(0, import_utils2.escapeHtml)(label)}${required ? '<span class="text-danger ml-1">*</span>' : ""}
|
|
1267
|
-
</label>` : "";
|
|
1268
|
-
const helperHtml = helper && !error ? `<p class="mt-1.5 text-sm text-text-secondary">${(0, import_utils2.escapeHtml)(helper)}</p>` : "";
|
|
1269
|
-
const errorHtml = error ? `<p class="mt-1.5 text-sm text-danger">${(0, import_utils2.escapeHtml)(error)}</p>` : "";
|
|
1270
|
-
return `<div class="form-field">
|
|
1271
|
-
${labelHtml}
|
|
1272
|
-
<textarea
|
|
1273
|
-
name="${(0, import_utils2.escapeHtml)(name)}"
|
|
1274
|
-
id="${(0, import_utils2.escapeHtml)(id)}"
|
|
1275
|
-
rows="${rows}"
|
|
1276
|
-
class="${baseClasses}"
|
|
1277
|
-
${placeholder ? `placeholder="${(0, import_utils2.escapeHtml)(placeholder)}"` : ""}
|
|
1278
|
-
${required ? "required" : ""}
|
|
1279
|
-
${disabled ? "disabled" : ""}
|
|
1280
|
-
${readonly ? "readonly" : ""}
|
|
1281
|
-
${dataAttrs}
|
|
1282
|
-
>${(0, import_utils2.escapeHtml)(value)}</textarea>
|
|
1283
|
-
${helperHtml}
|
|
1284
|
-
${errorHtml}
|
|
1285
|
-
</div>`;
|
|
1286
|
-
}
|
|
1287
|
-
function checkbox(options) {
|
|
1288
|
-
const {
|
|
1289
|
-
name,
|
|
1290
|
-
id = name,
|
|
1291
|
-
value = "true",
|
|
1292
|
-
label,
|
|
1293
|
-
checked = false,
|
|
1294
|
-
disabled = false,
|
|
1295
|
-
helper,
|
|
1296
|
-
error,
|
|
1297
|
-
className = ""
|
|
1298
|
-
} = options;
|
|
1299
|
-
const checkboxClasses = [
|
|
1300
|
-
"h-4 w-4 rounded border-border text-primary",
|
|
1301
|
-
"focus:ring-2 focus:ring-primary/20 focus:ring-offset-0",
|
|
1302
|
-
disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
1303
|
-
].join(" ");
|
|
1304
|
-
const helperHtml = helper && !error ? `<p class="text-sm text-text-secondary">${(0, import_utils2.escapeHtml)(helper)}</p>` : "";
|
|
1305
|
-
const errorHtml = error ? `<p class="text-sm text-danger">${(0, import_utils2.escapeHtml)(error)}</p>` : "";
|
|
1306
|
-
const safeClassName = className ? (0, import_utils2.escapeHtml)(className) : "";
|
|
1307
|
-
return `<div class="form-field ${safeClassName}">
|
|
1308
|
-
<label class="flex items-start gap-3 ${disabled ? "cursor-not-allowed" : "cursor-pointer"}">
|
|
1309
|
-
<input
|
|
1310
|
-
type="checkbox"
|
|
1311
|
-
name="${(0, import_utils2.escapeHtml)(name)}"
|
|
1312
|
-
id="${(0, import_utils2.escapeHtml)(id)}"
|
|
1313
|
-
value="${(0, import_utils2.escapeHtml)(value)}"
|
|
1314
|
-
class="${checkboxClasses}"
|
|
1315
|
-
${checked ? "checked" : ""}
|
|
1316
|
-
${disabled ? "disabled" : ""}
|
|
1317
|
-
>
|
|
1318
|
-
<div>
|
|
1319
|
-
<span class="text-sm font-medium text-text-primary">${(0, import_utils2.escapeHtml)(label)}</span>
|
|
1320
|
-
${helperHtml}
|
|
1321
|
-
${errorHtml}
|
|
1322
|
-
</div>
|
|
1323
|
-
</label>
|
|
1324
|
-
</div>`;
|
|
1325
|
-
}
|
|
1326
|
-
function radioGroup(options) {
|
|
1327
|
-
const { name, options: radioOptions, value, label, helper, error, direction = "vertical", className = "" } = options;
|
|
1328
|
-
const directionClasses = direction === "horizontal" ? "flex flex-row flex-wrap gap-4" : "flex flex-col gap-2";
|
|
1329
|
-
const radioClasses = "h-4 w-4 border-border text-primary focus:ring-2 focus:ring-primary/20 focus:ring-offset-0";
|
|
1330
|
-
const radiosHtml = radioOptions.map((opt, index) => {
|
|
1331
|
-
const radioId = `${name}-${index}`;
|
|
1332
|
-
const checked = opt.value === value ? "checked" : "";
|
|
1333
|
-
const disabled = opt.disabled ? "disabled" : "";
|
|
1334
|
-
const cursorClass = opt.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer";
|
|
1335
|
-
return `<label class="flex items-center gap-2 ${cursorClass}">
|
|
1336
|
-
<input
|
|
1337
|
-
type="radio"
|
|
1338
|
-
name="${(0, import_utils2.escapeHtml)(name)}"
|
|
1339
|
-
id="${(0, import_utils2.escapeHtml)(radioId)}"
|
|
1340
|
-
value="${(0, import_utils2.escapeHtml)(opt.value)}"
|
|
1341
|
-
class="${radioClasses}"
|
|
1342
|
-
${checked}
|
|
1343
|
-
${disabled}
|
|
1344
|
-
>
|
|
1345
|
-
<span class="text-sm text-text-primary">${(0, import_utils2.escapeHtml)(opt.label)}</span>
|
|
1346
|
-
</label>`;
|
|
1347
|
-
}).join("\n");
|
|
1348
|
-
const labelHtml = label ? `<label class="block text-sm font-medium text-text-primary mb-2">${(0, import_utils2.escapeHtml)(label)}</label>` : "";
|
|
1349
|
-
const helperHtml = helper && !error ? `<p class="mt-1.5 text-sm text-text-secondary">${(0, import_utils2.escapeHtml)(helper)}</p>` : "";
|
|
1350
|
-
const errorHtml = error ? `<p class="mt-1.5 text-sm text-danger">${(0, import_utils2.escapeHtml)(error)}</p>` : "";
|
|
1351
|
-
const safeClassName = className ? (0, import_utils2.escapeHtml)(className) : "";
|
|
1352
|
-
return `<div class="form-field ${safeClassName}" role="radiogroup">
|
|
1353
|
-
${labelHtml}
|
|
1354
|
-
<div class="${directionClasses}">
|
|
1355
|
-
${radiosHtml}
|
|
1356
|
-
</div>
|
|
1357
|
-
${helperHtml}
|
|
1358
|
-
${errorHtml}
|
|
1359
|
-
</div>`;
|
|
1360
|
-
}
|
|
1361
|
-
function form(content, options = {}) {
|
|
1362
|
-
const { action, method = "post", id, className = "", preventDefault = false, autocomplete, enctype } = options;
|
|
1363
|
-
const attrs = [
|
|
1364
|
-
action ? `action="${(0, import_utils2.escapeHtml)(action)}"` : "",
|
|
1365
|
-
`method="${method}"`,
|
|
1366
|
-
id ? `id="${(0, import_utils2.escapeHtml)(id)}"` : "",
|
|
1367
|
-
className ? `class="${(0, import_utils2.escapeHtml)(className)}"` : "",
|
|
1368
|
-
autocomplete ? `autocomplete="${autocomplete}"` : "",
|
|
1369
|
-
enctype ? `enctype="${enctype}"` : "",
|
|
1370
|
-
preventDefault ? 'onsubmit="return false;"' : ""
|
|
1371
|
-
].filter(Boolean).join(" ");
|
|
1372
|
-
return `<form ${attrs}>${content}</form>`;
|
|
1373
|
-
}
|
|
1374
|
-
var GRID_COLS_MAP = {
|
|
1375
|
-
1: "grid-cols-1",
|
|
1376
|
-
2: "grid-cols-2",
|
|
1377
|
-
3: "grid-cols-3",
|
|
1378
|
-
4: "grid-cols-4",
|
|
1379
|
-
5: "grid-cols-5",
|
|
1380
|
-
6: "grid-cols-6",
|
|
1381
|
-
7: "grid-cols-7",
|
|
1382
|
-
8: "grid-cols-8",
|
|
1383
|
-
9: "grid-cols-9",
|
|
1384
|
-
10: "grid-cols-10",
|
|
1385
|
-
11: "grid-cols-11",
|
|
1386
|
-
12: "grid-cols-12"
|
|
1387
|
-
};
|
|
1388
|
-
function formRow(fields, options = {}) {
|
|
1389
|
-
const { gap = "md", className = "" } = options;
|
|
1390
|
-
const gapClasses = { sm: "gap-2", md: "gap-4", lg: "gap-6" };
|
|
1391
|
-
const gridCols = GRID_COLS_MAP[fields.length] ?? "grid-cols-1";
|
|
1392
|
-
const safeClassName = className ? (0, import_utils2.escapeHtml)(className) : "";
|
|
1393
|
-
return `<div class="grid ${gridCols} ${gapClasses[gap]} ${safeClassName}">
|
|
1394
|
-
${fields.join("\n")}
|
|
1395
|
-
</div>`;
|
|
1396
|
-
}
|
|
1397
|
-
function formSection(content, options = {}) {
|
|
1398
|
-
const { title, description, className = "" } = options;
|
|
1399
|
-
const headerHtml = title ? `<div class="mb-4">
|
|
1400
|
-
<h3 class="text-lg font-semibold text-text-primary">${(0, import_utils2.escapeHtml)(title)}</h3>
|
|
1401
|
-
${description ? `<p class="text-sm text-text-secondary mt-1">${(0, import_utils2.escapeHtml)(description)}</p>` : ""}
|
|
1402
|
-
</div>` : "";
|
|
1403
|
-
const safeClassName = className ? (0, import_utils2.escapeHtml)(className) : "";
|
|
1404
|
-
return `<div class="form-section ${safeClassName}">
|
|
1405
|
-
${headerHtml}
|
|
1406
|
-
<div class="space-y-4">
|
|
1407
|
-
${content}
|
|
1408
|
-
</div>
|
|
1409
|
-
</div>`;
|
|
1410
|
-
}
|
|
1411
|
-
function formActions(buttons, options = {}) {
|
|
1412
|
-
const { align = "right", className = "" } = options;
|
|
1413
|
-
const alignClasses = {
|
|
1414
|
-
left: "justify-start",
|
|
1415
|
-
center: "justify-center",
|
|
1416
|
-
right: "justify-end",
|
|
1417
|
-
between: "justify-between"
|
|
1418
|
-
};
|
|
1419
|
-
const safeClassName = className ? (0, import_utils2.escapeHtml)(className) : "";
|
|
1420
|
-
return `<div class="flex items-center gap-3 pt-4 ${alignClasses[align]} ${safeClassName}">
|
|
1421
|
-
${buttons.join("\n")}
|
|
1422
|
-
</div>`;
|
|
1423
|
-
}
|
|
1424
|
-
function hiddenInput(name, value) {
|
|
1425
|
-
return `<input type="hidden" name="${(0, import_utils2.escapeHtml)(name)}" value="${(0, import_utils2.escapeHtml)(value)}">`;
|
|
1426
|
-
}
|
|
1427
|
-
function csrfInput(token) {
|
|
1428
|
-
return hiddenInput("_csrf", token);
|
|
179
|
+
// libs/ui/src/components/Alert/Alert.tsx
|
|
180
|
+
var import_react = require("react");
|
|
181
|
+
var import_Alert = __toESM(require("@mui/material/Alert"));
|
|
182
|
+
var import_AlertTitle = __toESM(require("@mui/material/AlertTitle"));
|
|
183
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
184
|
+
function Alert({
|
|
185
|
+
severity = "info",
|
|
186
|
+
title,
|
|
187
|
+
dismissible = false,
|
|
188
|
+
onDismiss,
|
|
189
|
+
icon,
|
|
190
|
+
children
|
|
191
|
+
}) {
|
|
192
|
+
const [dismissed, setDismissed] = (0, import_react.useState)(false);
|
|
193
|
+
if (dismissed) return null;
|
|
194
|
+
const handleClose = dismissible ? () => {
|
|
195
|
+
setDismissed(true);
|
|
196
|
+
onDismiss?.();
|
|
197
|
+
} : void 0;
|
|
198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_Alert.default, { severity, onClose: handleClose, icon, children: [
|
|
199
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_AlertTitle.default, { children: title }),
|
|
200
|
+
children
|
|
201
|
+
] });
|
|
1429
202
|
}
|
|
1430
203
|
|
|
1431
|
-
// libs/ui/src/components/
|
|
1432
|
-
var
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
sm: "w-2 h-2",
|
|
1450
|
-
md: "w-2.5 h-2.5",
|
|
1451
|
-
lg: "w-3 h-3"
|
|
1452
|
-
};
|
|
1453
|
-
return dotSizes[size];
|
|
204
|
+
// libs/ui/src/components/Badge/Badge.tsx
|
|
205
|
+
var import_react2 = __toESM(require("react"));
|
|
206
|
+
var import_Chip = __toESM(require("@mui/material/Chip"));
|
|
207
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
208
|
+
function mapColor(variant) {
|
|
209
|
+
switch (variant) {
|
|
210
|
+
case "default":
|
|
211
|
+
return "default";
|
|
212
|
+
case "primary":
|
|
213
|
+
return "primary";
|
|
214
|
+
case "success":
|
|
215
|
+
return "success";
|
|
216
|
+
case "warning":
|
|
217
|
+
return "warning";
|
|
218
|
+
case "error":
|
|
219
|
+
return "error";
|
|
220
|
+
case "info":
|
|
221
|
+
return "info";
|
|
1454
222
|
}
|
|
1455
|
-
const sizes = {
|
|
1456
|
-
sm: "px-2 py-0.5 text-xs",
|
|
1457
|
-
md: "px-2.5 py-1 text-xs",
|
|
1458
|
-
lg: "px-3 py-1.5 text-sm"
|
|
1459
|
-
};
|
|
1460
|
-
return sizes[size];
|
|
1461
223
|
}
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
className = "",
|
|
1470
|
-
removable = false,
|
|
1471
|
-
sanitize = false
|
|
1472
|
-
} = options;
|
|
1473
|
-
const safeIcon = sanitize && icon ? (0, import_runtime3.sanitizeHtmlContent)(icon) : icon;
|
|
1474
|
-
const safeClassName = className ? (0, import_utils2.escapeHtml)(className) : "";
|
|
1475
|
-
if (dot) {
|
|
1476
|
-
const dotVariants = {
|
|
1477
|
-
default: "bg-gray-400",
|
|
1478
|
-
primary: "bg-primary",
|
|
1479
|
-
secondary: "bg-secondary",
|
|
1480
|
-
success: "bg-success",
|
|
1481
|
-
warning: "bg-warning",
|
|
1482
|
-
danger: "bg-danger",
|
|
1483
|
-
info: "bg-blue-500",
|
|
1484
|
-
outline: "border border-current"
|
|
1485
|
-
};
|
|
1486
|
-
const dotClasses = ["inline-block rounded-full", getSizeClasses3(size, true), dotVariants[variant], safeClassName].filter(Boolean).join(" ");
|
|
1487
|
-
return `<span class="${dotClasses}" aria-label="${(0, import_utils2.escapeHtml)(text)}" title="${(0, import_utils2.escapeHtml)(text)}"></span>`;
|
|
224
|
+
var DotIndicator = import_react2.default.createElement("span", {
|
|
225
|
+
style: {
|
|
226
|
+
width: 8,
|
|
227
|
+
height: 8,
|
|
228
|
+
borderRadius: "50%",
|
|
229
|
+
backgroundColor: "currentColor",
|
|
230
|
+
display: "inline-block"
|
|
1488
231
|
}
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
const
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
${iconHtml}${(0, import_utils2.escapeHtml)(text)}${removeHtml}
|
|
1511
|
-
</span>`;
|
|
1512
|
-
}
|
|
1513
|
-
function badgeGroup(badges, options = {}) {
|
|
1514
|
-
const { gap = "sm", className = "" } = options;
|
|
1515
|
-
const gapClasses = { sm: "gap-1", md: "gap-2", lg: "gap-3" };
|
|
1516
|
-
const safeClassName = className ? (0, import_utils2.escapeHtml)(className) : "";
|
|
1517
|
-
return `<div class="inline-flex flex-wrap ${gapClasses[gap]} ${safeClassName}">
|
|
1518
|
-
${badges.join("\n")}
|
|
1519
|
-
</div>`;
|
|
1520
|
-
}
|
|
1521
|
-
var activeBadge = (text = "Active") => badge(text, { variant: "success", dot: false });
|
|
1522
|
-
var inactiveBadge = (text = "Inactive") => badge(text, { variant: "default", dot: false });
|
|
1523
|
-
var pendingBadge = (text = "Pending") => badge(text, { variant: "warning", dot: false });
|
|
1524
|
-
var errorBadge = (text = "Error") => badge(text, { variant: "danger", dot: false });
|
|
1525
|
-
var newBadge = (text = "New") => badge(text, { variant: "primary", size: "sm", pill: true });
|
|
1526
|
-
var betaBadge = (text = "Beta") => badge(text, { variant: "secondary", size: "sm", pill: true });
|
|
1527
|
-
var onlineDot = (label = "Online") => badge(label, { variant: "success", dot: true });
|
|
1528
|
-
var offlineDot = (label = "Offline") => badge(label, { variant: "default", dot: true });
|
|
1529
|
-
var busyDot = (label = "Busy") => badge(label, { variant: "danger", dot: true });
|
|
1530
|
-
var awayDot = (label = "Away") => badge(label, { variant: "warning", dot: true });
|
|
1531
|
-
|
|
1532
|
-
// libs/ui/src/components/alert.ts
|
|
1533
|
-
var import_runtime4 = require("@frontmcp/uipack/runtime");
|
|
1534
|
-
var alertIcons = {
|
|
1535
|
-
info: `<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1536
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
|
1537
|
-
</svg>`,
|
|
1538
|
-
success: `<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1539
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
|
1540
|
-
</svg>`,
|
|
1541
|
-
warning: `<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1542
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"/>
|
|
1543
|
-
</svg>`,
|
|
1544
|
-
danger: `<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1545
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
|
1546
|
-
</svg>`,
|
|
1547
|
-
neutral: `<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1548
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
|
1549
|
-
</svg>`
|
|
1550
|
-
};
|
|
1551
|
-
function getVariantClasses4(variant) {
|
|
1552
|
-
const variants = {
|
|
1553
|
-
info: {
|
|
1554
|
-
container: "bg-blue-50 border-blue-200 text-blue-800",
|
|
1555
|
-
icon: "text-blue-500"
|
|
1556
|
-
},
|
|
1557
|
-
success: {
|
|
1558
|
-
container: "bg-success/10 border-success/30 text-success",
|
|
1559
|
-
icon: "text-success"
|
|
1560
|
-
},
|
|
1561
|
-
warning: {
|
|
1562
|
-
container: "bg-warning/10 border-warning/30 text-warning",
|
|
1563
|
-
icon: "text-warning"
|
|
1564
|
-
},
|
|
1565
|
-
danger: {
|
|
1566
|
-
container: "bg-danger/10 border-danger/30 text-danger",
|
|
1567
|
-
icon: "text-danger"
|
|
1568
|
-
},
|
|
1569
|
-
neutral: {
|
|
1570
|
-
container: "bg-gray-50 border-gray-200 text-gray-800",
|
|
1571
|
-
icon: "text-gray-500"
|
|
232
|
+
});
|
|
233
|
+
function Badge({
|
|
234
|
+
variant = "default",
|
|
235
|
+
label,
|
|
236
|
+
dot = false,
|
|
237
|
+
removable = false,
|
|
238
|
+
onRemove,
|
|
239
|
+
size = "small",
|
|
240
|
+
icon
|
|
241
|
+
}) {
|
|
242
|
+
const avatarProp = dot && !icon ? { avatar: DotIndicator } : {};
|
|
243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
244
|
+
import_Chip.default,
|
|
245
|
+
{
|
|
246
|
+
label,
|
|
247
|
+
color: mapColor(variant),
|
|
248
|
+
size,
|
|
249
|
+
icon,
|
|
250
|
+
...avatarProp,
|
|
251
|
+
onDelete: removable && onRemove ? onRemove : void 0,
|
|
252
|
+
variant: "filled"
|
|
1572
253
|
}
|
|
1573
|
-
|
|
1574
|
-
return variants[variant];
|
|
1575
|
-
}
|
|
1576
|
-
function alert(message, options = {}) {
|
|
1577
|
-
const {
|
|
1578
|
-
variant = "info",
|
|
1579
|
-
title,
|
|
1580
|
-
showIcon = true,
|
|
1581
|
-
icon,
|
|
1582
|
-
dismissible = false,
|
|
1583
|
-
className = "",
|
|
1584
|
-
id,
|
|
1585
|
-
actions,
|
|
1586
|
-
sanitize = false
|
|
1587
|
-
} = options;
|
|
1588
|
-
const safeIcon = sanitize && icon ? (0, import_runtime4.sanitizeHtmlContent)(icon) : icon;
|
|
1589
|
-
const safeActions = sanitize && actions ? (0, import_runtime4.sanitizeHtmlContent)(actions) : actions;
|
|
1590
|
-
const variantClasses = getVariantClasses4(variant);
|
|
1591
|
-
const safeClassName = className ? (0, import_utils2.escapeHtml)(className) : "";
|
|
1592
|
-
const baseClasses = ["rounded-lg border p-4", variantClasses.container, safeClassName].filter(Boolean).join(" ");
|
|
1593
|
-
const iconHtml = showIcon ? `<div class="flex-shrink-0 ${variantClasses.icon}">
|
|
1594
|
-
${safeIcon || alertIcons[variant]}
|
|
1595
|
-
</div>` : "";
|
|
1596
|
-
const titleHtml = title ? `<h3 class="font-semibold">${(0, import_utils2.escapeHtml)(title)}</h3>` : "";
|
|
1597
|
-
const dismissHtml = dismissible ? `<button
|
|
1598
|
-
type="button"
|
|
1599
|
-
class="flex-shrink-0 ml-auto -mr-1 -mt-1 p-1 rounded hover:bg-black/5 transition-colors"
|
|
1600
|
-
onclick="this.closest('.alert').remove()"
|
|
1601
|
-
aria-label="Dismiss"
|
|
1602
|
-
>
|
|
1603
|
-
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1604
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
|
|
1605
|
-
</svg>
|
|
1606
|
-
</button>` : "";
|
|
1607
|
-
const actionsHtml = safeActions ? `<div class="mt-3">${safeActions}</div>` : "";
|
|
1608
|
-
const idAttr = id ? `id="${(0, import_utils2.escapeHtml)(id)}"` : "";
|
|
1609
|
-
return `<div class="alert ${baseClasses}" role="alert" ${idAttr}>
|
|
1610
|
-
<div class="flex gap-3">
|
|
1611
|
-
${iconHtml}
|
|
1612
|
-
<div class="flex-1">
|
|
1613
|
-
${titleHtml}
|
|
1614
|
-
<div class="${title ? "mt-1" : ""}">${(0, import_utils2.escapeHtml)(message)}</div>
|
|
1615
|
-
${actionsHtml}
|
|
1616
|
-
</div>
|
|
1617
|
-
${dismissHtml}
|
|
1618
|
-
</div>
|
|
1619
|
-
</div>`;
|
|
1620
|
-
}
|
|
1621
|
-
var infoAlert = (message, opts) => alert(message, { ...opts, variant: "info" });
|
|
1622
|
-
var successAlert = (message, opts) => alert(message, { ...opts, variant: "success" });
|
|
1623
|
-
var warningAlert = (message, opts) => alert(message, { ...opts, variant: "warning" });
|
|
1624
|
-
var dangerAlert = (message, opts) => alert(message, { ...opts, variant: "danger" });
|
|
1625
|
-
function toast(message, options = {}) {
|
|
1626
|
-
const { variant = "info", title, duration = 5e3, position = "top-right", id = `toast-${Date.now()}` } = options;
|
|
1627
|
-
const variantClasses = getVariantClasses4(variant);
|
|
1628
|
-
const positionClasses = {
|
|
1629
|
-
"top-right": "top-4 right-4",
|
|
1630
|
-
"top-left": "top-4 left-4",
|
|
1631
|
-
"bottom-right": "bottom-4 right-4",
|
|
1632
|
-
"bottom-left": "bottom-4 left-4",
|
|
1633
|
-
"top-center": "top-4 left-1/2 -translate-x-1/2",
|
|
1634
|
-
"bottom-center": "bottom-4 left-1/2 -translate-x-1/2"
|
|
1635
|
-
};
|
|
1636
|
-
const titleHtml = title ? `<h4 class="font-semibold">${(0, import_utils2.escapeHtml)(title)}</h4>` : "";
|
|
1637
|
-
const autoDismissScript = duration > 0 ? `<script>
|
|
1638
|
-
setTimeout(() => {
|
|
1639
|
-
const toast = document.getElementById('${id}');
|
|
1640
|
-
if (toast) {
|
|
1641
|
-
toast.classList.add('opacity-0', 'translate-x-2');
|
|
1642
|
-
setTimeout(() => toast.remove(), 300);
|
|
1643
|
-
}
|
|
1644
|
-
}, ${duration});
|
|
1645
|
-
</script>` : "";
|
|
1646
|
-
return `<div
|
|
1647
|
-
id="${(0, import_utils2.escapeHtml)(id)}"
|
|
1648
|
-
class="fixed ${positionClasses[position]} z-50 min-w-[300px] max-w-md rounded-lg border shadow-lg ${variantClasses.container} transition-all duration-300 transform"
|
|
1649
|
-
role="alert"
|
|
1650
|
-
>
|
|
1651
|
-
<div class="flex gap-3 p-4">
|
|
1652
|
-
<div class="flex-shrink-0 ${variantClasses.icon}">
|
|
1653
|
-
${alertIcons[variant]}
|
|
1654
|
-
</div>
|
|
1655
|
-
<div class="flex-1">
|
|
1656
|
-
${titleHtml}
|
|
1657
|
-
<p class="${title ? "mt-1 text-sm opacity-90" : ""}">${(0, import_utils2.escapeHtml)(message)}</p>
|
|
1658
|
-
</div>
|
|
1659
|
-
<button
|
|
1660
|
-
type="button"
|
|
1661
|
-
class="flex-shrink-0 p-1 rounded hover:bg-black/5 transition-colors"
|
|
1662
|
-
onclick="this.closest('#${id}').remove()"
|
|
1663
|
-
aria-label="Close"
|
|
1664
|
-
>
|
|
1665
|
-
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1666
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
|
|
1667
|
-
</svg>
|
|
1668
|
-
</button>
|
|
1669
|
-
</div>
|
|
1670
|
-
</div>
|
|
1671
|
-
${autoDismissScript}`;
|
|
1672
|
-
}
|
|
1673
|
-
function toastContainer(position = "top-right", id = "toast-container") {
|
|
1674
|
-
const positionClasses = {
|
|
1675
|
-
"top-right": "top-4 right-4",
|
|
1676
|
-
"top-left": "top-4 left-4",
|
|
1677
|
-
"bottom-right": "bottom-4 right-4",
|
|
1678
|
-
"bottom-left": "bottom-4 left-4",
|
|
1679
|
-
"top-center": "top-4 left-1/2 -translate-x-1/2",
|
|
1680
|
-
"bottom-center": "bottom-4 left-1/2 -translate-x-1/2"
|
|
1681
|
-
};
|
|
1682
|
-
return `<div id="${(0, import_utils2.escapeHtml)(id)}" class="fixed ${positionClasses[position]} z-50 flex flex-col gap-2"></div>`;
|
|
254
|
+
);
|
|
1683
255
|
}
|
|
1684
256
|
|
|
1685
|
-
// libs/ui/src/components/
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
md: { container: "w-10 h-10", text: "text-sm", status: "w-3 h-3 border-2" },
|
|
1691
|
-
lg: { container: "w-12 h-12", text: "text-base", status: "w-3.5 h-3.5 border-2" },
|
|
1692
|
-
xl: { container: "w-16 h-16", text: "text-lg", status: "w-4 h-4 border-2" },
|
|
1693
|
-
"2xl": { container: "w-24 h-24", text: "text-2xl", status: "w-5 h-5 border-2" }
|
|
1694
|
-
};
|
|
1695
|
-
return sizes[size];
|
|
1696
|
-
}
|
|
1697
|
-
function getShapeClasses(shape) {
|
|
1698
|
-
const shapes = {
|
|
1699
|
-
circle: "rounded-full",
|
|
1700
|
-
square: "rounded-none",
|
|
1701
|
-
rounded: "rounded-lg"
|
|
1702
|
-
};
|
|
1703
|
-
return shapes[shape];
|
|
1704
|
-
}
|
|
1705
|
-
function getStatusClasses(status) {
|
|
1706
|
-
const statuses = {
|
|
1707
|
-
online: "bg-success",
|
|
1708
|
-
offline: "bg-gray-400",
|
|
1709
|
-
busy: "bg-danger",
|
|
1710
|
-
away: "bg-warning",
|
|
1711
|
-
none: ""
|
|
1712
|
-
};
|
|
1713
|
-
return statuses[status];
|
|
1714
|
-
}
|
|
1715
|
-
function generateInitials(name) {
|
|
1716
|
-
const parts = name.trim().split(/\s+/);
|
|
1717
|
-
if (parts.length === 1) {
|
|
1718
|
-
return parts[0].charAt(0).toUpperCase();
|
|
1719
|
-
}
|
|
1720
|
-
return (parts[0].charAt(0) + parts[parts.length - 1].charAt(0)).toUpperCase();
|
|
1721
|
-
}
|
|
1722
|
-
function generateBgColor(name) {
|
|
1723
|
-
const colors = [
|
|
1724
|
-
"bg-blue-500",
|
|
1725
|
-
"bg-green-500",
|
|
1726
|
-
"bg-yellow-500",
|
|
1727
|
-
"bg-purple-500",
|
|
1728
|
-
"bg-pink-500",
|
|
1729
|
-
"bg-indigo-500",
|
|
1730
|
-
"bg-red-500",
|
|
1731
|
-
"bg-orange-500",
|
|
1732
|
-
"bg-teal-500",
|
|
1733
|
-
"bg-cyan-500"
|
|
1734
|
-
];
|
|
1735
|
-
let hash = 0;
|
|
1736
|
-
for (let i = 0; i < name.length; i++) {
|
|
1737
|
-
hash = name.charCodeAt(i) + ((hash << 5) - hash);
|
|
1738
|
-
}
|
|
1739
|
-
return colors[Math.abs(hash) % colors.length];
|
|
1740
|
-
}
|
|
1741
|
-
function avatar(options) {
|
|
1742
|
-
const { src, alt, size = "md", shape = "circle", status = "none", className = "", href, initials, bgColor } = options;
|
|
1743
|
-
const sizeClasses = getSizeClasses4(size);
|
|
1744
|
-
const shapeClasses = getShapeClasses(shape);
|
|
1745
|
-
const statusColor = getStatusClasses(status);
|
|
1746
|
-
const displayInitials = initials || generateInitials(alt);
|
|
1747
|
-
const displayBgColor = bgColor || generateBgColor(alt);
|
|
1748
|
-
const containerClasses = [
|
|
1749
|
-
"relative inline-flex items-center justify-center",
|
|
1750
|
-
"overflow-hidden",
|
|
1751
|
-
sizeClasses.container,
|
|
1752
|
-
shapeClasses,
|
|
1753
|
-
className
|
|
1754
|
-
].filter(Boolean).join(" ");
|
|
1755
|
-
const contentHtml = src ? `<img src="${(0, import_utils2.escapeHtml)(src)}" alt="${(0, import_utils2.escapeHtml)(alt)}" class="w-full h-full object-cover">` : `<span class="font-medium text-white ${sizeClasses.text}">${(0, import_utils2.escapeHtml)(displayInitials)}</span>`;
|
|
1756
|
-
const bgClasses = src ? "bg-gray-200" : displayBgColor;
|
|
1757
|
-
const statusHtml = status !== "none" ? `<span class="absolute bottom-0 right-0 block ${sizeClasses.status} ${shapeClasses} ${statusColor} border-white"></span>` : "";
|
|
1758
|
-
const innerHtml = `
|
|
1759
|
-
<div class="${containerClasses} ${bgClasses}">
|
|
1760
|
-
${contentHtml}
|
|
1761
|
-
${statusHtml}
|
|
1762
|
-
</div>
|
|
1763
|
-
`;
|
|
1764
|
-
if (href) {
|
|
1765
|
-
return `<a href="${(0, import_utils2.escapeHtml)(href)}" class="inline-block">${innerHtml}</a>`;
|
|
1766
|
-
}
|
|
1767
|
-
return innerHtml;
|
|
1768
|
-
}
|
|
1769
|
-
function avatarGroup(avatars, options = {}) {
|
|
1770
|
-
const { max = 5, size = "md", spacing = "normal", className = "" } = options;
|
|
1771
|
-
const spacingClasses = {
|
|
1772
|
-
tight: "-space-x-3",
|
|
1773
|
-
normal: "-space-x-2",
|
|
1774
|
-
loose: "-space-x-1"
|
|
1775
|
-
};
|
|
1776
|
-
const visibleAvatars = avatars.slice(0, max);
|
|
1777
|
-
const remainingCount = avatars.length - max;
|
|
1778
|
-
const avatarsHtml = visibleAvatars.map((opts, index) => {
|
|
1779
|
-
const avatarHtml = avatar({ ...opts, size });
|
|
1780
|
-
return `<div class="relative ring-2 ring-white rounded-full" style="z-index: ${visibleAvatars.length - index}">
|
|
1781
|
-
${avatarHtml}
|
|
1782
|
-
</div>`;
|
|
1783
|
-
}).join("\n");
|
|
1784
|
-
const sizeClasses = getSizeClasses4(size);
|
|
1785
|
-
const overflowHtml = remainingCount > 0 ? `<div class="relative ring-2 ring-white rounded-full" style="z-index: 0">
|
|
1786
|
-
<div class="${sizeClasses.container} rounded-full bg-gray-200 flex items-center justify-center">
|
|
1787
|
-
<span class="${sizeClasses.text} font-medium text-gray-600">+${remainingCount}</span>
|
|
1788
|
-
</div>
|
|
1789
|
-
</div>` : "";
|
|
1790
|
-
return `<div class="flex ${spacingClasses[spacing]} ${className}">
|
|
1791
|
-
${avatarsHtml}
|
|
1792
|
-
${overflowHtml}
|
|
1793
|
-
</div>`;
|
|
1794
|
-
}
|
|
1795
|
-
function avatarWithText(options) {
|
|
1796
|
-
const { name, subtitle, align = "left", ...avatarOptions } = options;
|
|
1797
|
-
const avatarHtml = avatar({ ...avatarOptions, alt: avatarOptions.alt || name });
|
|
1798
|
-
const textHtml = `
|
|
1799
|
-
<div class="${align === "right" ? "text-right" : ""}">
|
|
1800
|
-
<div class="font-medium text-text-primary">${(0, import_utils2.escapeHtml)(name)}</div>
|
|
1801
|
-
${subtitle ? `<div class="text-sm text-text-secondary">${(0, import_utils2.escapeHtml)(subtitle)}</div>` : ""}
|
|
1802
|
-
</div>
|
|
1803
|
-
`;
|
|
1804
|
-
const flexDirection = align === "right" ? "flex-row-reverse" : "flex-row";
|
|
1805
|
-
return `<div class="flex items-center gap-3 ${flexDirection}">
|
|
1806
|
-
${avatarHtml}
|
|
1807
|
-
${textHtml}
|
|
1808
|
-
</div>`;
|
|
257
|
+
// libs/ui/src/components/Avatar/Avatar.tsx
|
|
258
|
+
var import_Avatar = __toESM(require("@mui/material/Avatar"));
|
|
259
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
260
|
+
function Avatar({ src, alt, children, size = 40, variant = "circular" }) {
|
|
261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Avatar.default, { src, alt, variant, sx: { width: size, height: size }, children });
|
|
1809
262
|
}
|
|
1810
263
|
|
|
1811
|
-
// libs/ui/src/components/
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
264
|
+
// libs/ui/src/components/Modal/Modal.tsx
|
|
265
|
+
var import_styles3 = require("@mui/material/styles");
|
|
266
|
+
var import_Dialog = __toESM(require("@mui/material/Dialog"));
|
|
267
|
+
var import_DialogTitle = __toESM(require("@mui/material/DialogTitle"));
|
|
268
|
+
var import_DialogContent = __toESM(require("@mui/material/DialogContent"));
|
|
269
|
+
var import_DialogActions = __toESM(require("@mui/material/DialogActions"));
|
|
270
|
+
var import_IconButton = __toESM(require("@mui/material/IconButton"));
|
|
271
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
272
|
+
var StyledDialogTitle = (0, import_styles3.styled)(import_DialogTitle.default, {
|
|
273
|
+
name: "Modal",
|
|
274
|
+
slot: "Title"
|
|
275
|
+
})(({ theme }) => ({
|
|
276
|
+
display: "flex",
|
|
277
|
+
alignItems: "center",
|
|
278
|
+
justifyContent: "space-between",
|
|
279
|
+
fontWeight: 600,
|
|
280
|
+
fontSize: theme.typography.h6.fontSize
|
|
281
|
+
}));
|
|
282
|
+
var StyledDialogContent = (0, import_styles3.styled)(import_DialogContent.default, {
|
|
283
|
+
name: "Modal",
|
|
284
|
+
slot: "Content"
|
|
285
|
+
})(({ theme }) => ({
|
|
286
|
+
paddingTop: `${theme.spacing(2)} !important`
|
|
287
|
+
}));
|
|
288
|
+
function Modal({
|
|
289
|
+
open,
|
|
290
|
+
onClose,
|
|
291
|
+
title,
|
|
292
|
+
actions,
|
|
293
|
+
maxWidth = "sm",
|
|
294
|
+
fullWidth = true,
|
|
295
|
+
slotProps,
|
|
296
|
+
children
|
|
297
|
+
}) {
|
|
298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_Dialog.default, { open, onClose, maxWidth, fullWidth, children: [
|
|
299
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(StyledDialogTitle, { ...slotProps?.title, children: [
|
|
300
|
+
title,
|
|
301
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_IconButton.default, { onClick: onClose, size: "small", "aria-label": "close", children: "\u2715" })
|
|
302
|
+
] }),
|
|
303
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StyledDialogContent, { ...slotProps?.content, children }),
|
|
304
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_DialogActions.default, { ...slotProps?.actions, children: actions })
|
|
305
|
+
] });
|
|
1830
306
|
}
|
|
1831
|
-
function modal(content, options) {
|
|
1832
|
-
const {
|
|
1833
|
-
id,
|
|
1834
|
-
title,
|
|
1835
|
-
size = "md",
|
|
1836
|
-
showClose = true,
|
|
1837
|
-
closeOnBackdrop = true,
|
|
1838
|
-
closeOnEscape = true,
|
|
1839
|
-
footer,
|
|
1840
|
-
className = "",
|
|
1841
|
-
open = false
|
|
1842
|
-
} = options;
|
|
1843
|
-
const sizeClasses = getSizeClasses5(size);
|
|
1844
|
-
const visibilityClasses = open ? "" : "hidden";
|
|
1845
|
-
const headerHtml = title || showClose ? `<div class="flex items-center justify-between p-4 border-b border-divider">
|
|
1846
|
-
${title ? `<h3 class="text-lg font-semibold text-text-primary">${(0, import_utils2.escapeHtml)(title)}</h3>` : "<div></div>"}
|
|
1847
|
-
${showClose ? `
|
|
1848
|
-
<button
|
|
1849
|
-
type="button"
|
|
1850
|
-
class="p-1 rounded-lg text-text-secondary hover:text-text-primary hover:bg-gray-100 transition-colors"
|
|
1851
|
-
onclick="document.getElementById('${(0, import_utils2.escapeHtml)(id)}').classList.add('hidden')"
|
|
1852
|
-
aria-label="Close"
|
|
1853
|
-
>
|
|
1854
|
-
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1855
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
|
|
1856
|
-
</svg>
|
|
1857
|
-
</button>
|
|
1858
|
-
` : ""}
|
|
1859
|
-
</div>` : "";
|
|
1860
|
-
const footerHtml = footer ? `<div class="flex items-center justify-end gap-3 p-4 border-t border-divider">
|
|
1861
|
-
${footer}
|
|
1862
|
-
</div>` : "";
|
|
1863
|
-
const backdropClickHandler = closeOnBackdrop ? `onclick="if (event.target === this) this.classList.add('hidden')"` : "";
|
|
1864
|
-
const escapeHandler = closeOnEscape ? `<script>
|
|
1865
|
-
document.addEventListener('keydown', function(e) {
|
|
1866
|
-
if (e.key === 'Escape') {
|
|
1867
|
-
document.getElementById('${(0, import_utils2.escapeHtml)(id)}')?.classList.add('hidden');
|
|
1868
|
-
}
|
|
1869
|
-
});
|
|
1870
|
-
</script>` : "";
|
|
1871
|
-
return `
|
|
1872
|
-
<div
|
|
1873
|
-
id="${(0, import_utils2.escapeHtml)(id)}"
|
|
1874
|
-
class="fixed inset-0 z-50 overflow-y-auto ${visibilityClasses}"
|
|
1875
|
-
${backdropClickHandler}
|
|
1876
|
-
role="dialog"
|
|
1877
|
-
aria-modal="true"
|
|
1878
|
-
aria-labelledby="${(0, import_utils2.escapeHtml)(id)}-title"
|
|
1879
|
-
>
|
|
1880
|
-
<!-- Backdrop -->
|
|
1881
|
-
<div class="fixed inset-0 bg-black/50 transition-opacity"></div>
|
|
1882
307
|
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
}
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
variant = "primary",
|
|
1916
|
-
icon,
|
|
1917
|
-
confirmHref
|
|
1918
|
-
} = options;
|
|
1919
|
-
const variantClasses = {
|
|
1920
|
-
primary: "bg-primary hover:bg-primary/90 text-white",
|
|
1921
|
-
danger: "bg-danger hover:bg-danger/90 text-white",
|
|
1922
|
-
warning: "bg-warning hover:bg-warning/90 text-white"
|
|
1923
|
-
};
|
|
1924
|
-
const iconColors = {
|
|
1925
|
-
primary: "text-primary bg-primary/10",
|
|
1926
|
-
danger: "text-danger bg-danger/10",
|
|
1927
|
-
warning: "text-warning bg-warning/10"
|
|
1928
|
-
};
|
|
1929
|
-
const defaultIcons = {
|
|
1930
|
-
primary: `<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1931
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
|
1932
|
-
</svg>`,
|
|
1933
|
-
danger: `<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1934
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"/>
|
|
1935
|
-
</svg>`,
|
|
1936
|
-
warning: `<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1937
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"/>
|
|
1938
|
-
</svg>`
|
|
1939
|
-
};
|
|
1940
|
-
const displayIcon = icon || defaultIcons[variant];
|
|
1941
|
-
const content = `
|
|
1942
|
-
<div class="text-center">
|
|
1943
|
-
<div class="mx-auto w-12 h-12 rounded-full ${iconColors[variant]} flex items-center justify-center mb-4">
|
|
1944
|
-
${displayIcon}
|
|
1945
|
-
</div>
|
|
1946
|
-
<h3 class="text-lg font-semibold text-text-primary mb-2">${(0, import_utils2.escapeHtml)(title)}</h3>
|
|
1947
|
-
<p class="text-text-secondary">${(0, import_utils2.escapeHtml)(message)}</p>
|
|
1948
|
-
</div>
|
|
1949
|
-
`;
|
|
1950
|
-
const confirmButton = confirmHref && isSafeUrl(confirmHref) ? `<a
|
|
1951
|
-
href="${(0, import_utils2.escapeHtml)(confirmHref)}"
|
|
1952
|
-
class="px-4 py-2 rounded-lg ${variantClasses[variant]} transition-colors"
|
|
1953
|
-
>
|
|
1954
|
-
${(0, import_utils2.escapeHtml)(confirmText)}
|
|
1955
|
-
</a>` : `<button
|
|
1956
|
-
type="button"
|
|
1957
|
-
class="px-4 py-2 rounded-lg ${variantClasses[variant]} transition-colors"
|
|
1958
|
-
onclick="document.getElementById('${(0, import_utils2.escapeHtml)(id)}').classList.add('hidden')"
|
|
1959
|
-
>
|
|
1960
|
-
${(0, import_utils2.escapeHtml)(confirmText)}
|
|
1961
|
-
</button>`;
|
|
1962
|
-
const footer = `
|
|
1963
|
-
<button
|
|
1964
|
-
type="button"
|
|
1965
|
-
class="px-4 py-2 rounded-lg border border-border text-text-primary hover:bg-gray-50 transition-colors"
|
|
1966
|
-
onclick="document.getElementById('${(0, import_utils2.escapeHtml)(id)}').classList.add('hidden')"
|
|
1967
|
-
>
|
|
1968
|
-
${(0, import_utils2.escapeHtml)(cancelText)}
|
|
1969
|
-
</button>
|
|
1970
|
-
${confirmButton}
|
|
1971
|
-
`;
|
|
1972
|
-
return modal(content, {
|
|
1973
|
-
id,
|
|
1974
|
-
size: "sm",
|
|
1975
|
-
showClose: false,
|
|
1976
|
-
footer
|
|
1977
|
-
});
|
|
308
|
+
// libs/ui/src/components/Table/Table.tsx
|
|
309
|
+
var import_styles4 = require("@mui/material/styles");
|
|
310
|
+
var import_Table = __toESM(require("@mui/material/Table"));
|
|
311
|
+
var import_TableBody = __toESM(require("@mui/material/TableBody"));
|
|
312
|
+
var import_TableCell = __toESM(require("@mui/material/TableCell"));
|
|
313
|
+
var import_TableContainer = __toESM(require("@mui/material/TableContainer"));
|
|
314
|
+
var import_TableHead = __toESM(require("@mui/material/TableHead"));
|
|
315
|
+
var import_TableRow = __toESM(require("@mui/material/TableRow"));
|
|
316
|
+
var import_Paper = __toESM(require("@mui/material/Paper"));
|
|
317
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
318
|
+
var StyledHeaderCell = (0, import_styles4.styled)(import_TableCell.default, {
|
|
319
|
+
name: "Table",
|
|
320
|
+
slot: "HeaderCell"
|
|
321
|
+
})(({ theme }) => ({
|
|
322
|
+
fontWeight: 600,
|
|
323
|
+
backgroundColor: theme.palette.mode === "dark" ? theme.palette.grey[900] : theme.palette.grey[50]
|
|
324
|
+
}));
|
|
325
|
+
var StyledBodyCell = (0, import_styles4.styled)(import_TableCell.default, {
|
|
326
|
+
name: "Table",
|
|
327
|
+
slot: "BodyCell"
|
|
328
|
+
})({});
|
|
329
|
+
function Table({
|
|
330
|
+
columns,
|
|
331
|
+
rows,
|
|
332
|
+
size = "small",
|
|
333
|
+
stickyHeader = false,
|
|
334
|
+
maxHeight
|
|
335
|
+
}) {
|
|
336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_TableContainer.default, { component: import_Paper.default, variant: "outlined", sx: maxHeight ? { maxHeight } : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_Table.default, { size, stickyHeader, children: [
|
|
337
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_TableHead.default, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_TableRow.default, { children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(StyledHeaderCell, { align: col.align ?? "left", children: col.label }, col.key)) }) }),
|
|
338
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_TableBody.default, { children: rows.map((row, idx) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_TableRow.default, { hover: true, children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(StyledBodyCell, { align: col.align ?? "left", children: String(row[col.key] ?? "") }, col.key)) }, idx)) })
|
|
339
|
+
] }) });
|
|
1978
340
|
}
|
|
1979
|
-
function drawer(content, options) {
|
|
1980
|
-
const {
|
|
1981
|
-
id,
|
|
1982
|
-
title,
|
|
1983
|
-
position = "right",
|
|
1984
|
-
size = "md",
|
|
1985
|
-
showClose = true,
|
|
1986
|
-
closeOnBackdrop = true,
|
|
1987
|
-
footer,
|
|
1988
|
-
className = "",
|
|
1989
|
-
open = false
|
|
1990
|
-
} = options;
|
|
1991
|
-
const sizeClasses = {
|
|
1992
|
-
left: { sm: "w-64", md: "w-80", lg: "w-96", xl: "w-[32rem]" },
|
|
1993
|
-
right: { sm: "w-64", md: "w-80", lg: "w-96", xl: "w-[32rem]" },
|
|
1994
|
-
top: { sm: "h-32", md: "h-48", lg: "h-64", xl: "h-96" },
|
|
1995
|
-
bottom: { sm: "h-32", md: "h-48", lg: "h-64", xl: "h-96" }
|
|
1996
|
-
};
|
|
1997
|
-
const positionClasses = {
|
|
1998
|
-
left: "inset-y-0 left-0",
|
|
1999
|
-
right: "inset-y-0 right-0",
|
|
2000
|
-
top: "inset-x-0 top-0",
|
|
2001
|
-
bottom: "inset-x-0 bottom-0"
|
|
2002
|
-
};
|
|
2003
|
-
const fullSizeClasses = {
|
|
2004
|
-
left: "h-full",
|
|
2005
|
-
right: "h-full",
|
|
2006
|
-
top: "w-full",
|
|
2007
|
-
bottom: "w-full"
|
|
2008
|
-
};
|
|
2009
|
-
const visibilityClasses = open ? "" : "hidden";
|
|
2010
|
-
const headerHtml = title || showClose ? `<div class="flex items-center justify-between p-4 border-b border-divider">
|
|
2011
|
-
${title ? `<h3 class="text-lg font-semibold text-text-primary">${(0, import_utils2.escapeHtml)(title)}</h3>` : "<div></div>"}
|
|
2012
|
-
${showClose ? `
|
|
2013
|
-
<button
|
|
2014
|
-
type="button"
|
|
2015
|
-
class="p-1 rounded-lg text-text-secondary hover:text-text-primary hover:bg-gray-100 transition-colors"
|
|
2016
|
-
onclick="document.getElementById('${(0, import_utils2.escapeHtml)(id)}').classList.add('hidden')"
|
|
2017
|
-
aria-label="Close"
|
|
2018
|
-
>
|
|
2019
|
-
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
2020
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
|
|
2021
|
-
</svg>
|
|
2022
|
-
</button>
|
|
2023
|
-
` : ""}
|
|
2024
|
-
</div>` : "";
|
|
2025
|
-
const footerHtml = footer ? `<div class="p-4 border-t border-divider">${footer}</div>` : "";
|
|
2026
|
-
const backdropClickHandler = closeOnBackdrop ? `onclick="if (event.target === this) this.classList.add('hidden')"` : "";
|
|
2027
|
-
return `
|
|
2028
|
-
<div
|
|
2029
|
-
id="${(0, import_utils2.escapeHtml)(id)}"
|
|
2030
|
-
class="fixed inset-0 z-50 ${visibilityClasses}"
|
|
2031
|
-
${backdropClickHandler}
|
|
2032
|
-
role="dialog"
|
|
2033
|
-
aria-modal="true"
|
|
2034
|
-
>
|
|
2035
|
-
<!-- Backdrop -->
|
|
2036
|
-
<div class="fixed inset-0 bg-black/50 transition-opacity"></div>
|
|
2037
341
|
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
342
|
+
// libs/ui/src/components/TextField/TextField.tsx
|
|
343
|
+
var import_TextField = __toESM(require("@mui/material/TextField"));
|
|
344
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
345
|
+
function TextField({
|
|
346
|
+
label,
|
|
347
|
+
placeholder,
|
|
348
|
+
value,
|
|
349
|
+
defaultValue,
|
|
350
|
+
onChange,
|
|
351
|
+
type = "text",
|
|
352
|
+
multiline = false,
|
|
353
|
+
rows,
|
|
354
|
+
error = false,
|
|
355
|
+
helperText,
|
|
356
|
+
disabled = false,
|
|
357
|
+
required = false,
|
|
358
|
+
fullWidth = true,
|
|
359
|
+
size = "small"
|
|
360
|
+
}) {
|
|
361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
362
|
+
import_TextField.default,
|
|
363
|
+
{
|
|
364
|
+
label,
|
|
365
|
+
placeholder,
|
|
366
|
+
value,
|
|
367
|
+
defaultValue,
|
|
368
|
+
onChange: onChange ? (e) => onChange(e.target.value) : void 0,
|
|
369
|
+
type,
|
|
370
|
+
multiline,
|
|
371
|
+
rows,
|
|
372
|
+
error,
|
|
373
|
+
helperText,
|
|
374
|
+
disabled,
|
|
375
|
+
required,
|
|
376
|
+
fullWidth,
|
|
377
|
+
size,
|
|
378
|
+
variant: "outlined"
|
|
379
|
+
}
|
|
380
|
+
);
|
|
2048
381
|
}
|
|
2049
382
|
|
|
2050
|
-
// libs/ui/src/components/
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
return `<th
|
|
2089
|
-
class="${paddingClass} ${alignClass} font-semibold text-text-primary ${sortableClasses} ${col.headerClass || ""}"
|
|
2090
|
-
${widthStyle}
|
|
2091
|
-
>
|
|
2092
|
-
${col.sortable ? `<span class="inline-flex items-center">${(0, import_utils2.escapeHtml)(col.header)}${buildSortIndicator(
|
|
2093
|
-
col.sortDirection || null
|
|
2094
|
-
)}</span>` : (0, import_utils2.escapeHtml)(col.header)}
|
|
2095
|
-
</th>`;
|
|
2096
|
-
}).join("\n");
|
|
2097
|
-
return `<thead class="bg-gray-50 border-b border-border">
|
|
2098
|
-
<tr>
|
|
2099
|
-
${selectAllCell}
|
|
2100
|
-
${headerCells}
|
|
2101
|
-
</tr>
|
|
2102
|
-
</thead>`;
|
|
2103
|
-
}
|
|
2104
|
-
function buildTableBody(data, columns, options) {
|
|
2105
|
-
const { selectable, hoverable, striped, bordered, compact, rowKey = "id", onRowClick } = options;
|
|
2106
|
-
const paddingClass = compact ? "px-3 py-2" : "px-4 py-3";
|
|
2107
|
-
if (data.length === 0) {
|
|
2108
|
-
const colspan = columns.length + (selectable ? 1 : 0);
|
|
2109
|
-
const emptyContent = options.emptyContent || `
|
|
2110
|
-
<div class="text-center py-8">
|
|
2111
|
-
<svg class="w-12 h-12 mx-auto text-gray-300 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
2112
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"/>
|
|
2113
|
-
</svg>
|
|
2114
|
-
<p class="text-text-secondary">${options.emptyMessage || "No data available"}</p>
|
|
2115
|
-
</div>
|
|
2116
|
-
`;
|
|
2117
|
-
return `<tbody>
|
|
2118
|
-
<tr>
|
|
2119
|
-
<td colspan="${colspan}">${emptyContent}</td>
|
|
2120
|
-
</tr>
|
|
2121
|
-
</tbody>`;
|
|
2122
|
-
}
|
|
2123
|
-
const rows = data.map((row, rowIndex) => {
|
|
2124
|
-
const rowId = String(row[rowKey] || rowIndex);
|
|
2125
|
-
const rowClasses = [
|
|
2126
|
-
hoverable ? "hover:bg-gray-50" : "",
|
|
2127
|
-
striped && rowIndex % 2 === 1 ? "bg-gray-50/50" : "",
|
|
2128
|
-
bordered ? "border-b border-border" : "",
|
|
2129
|
-
onRowClick ? "cursor-pointer" : ""
|
|
2130
|
-
].filter(Boolean).join(" ");
|
|
2131
|
-
const clickHandler = onRowClick ? `onclick="window.location.href='${(0, import_utils2.escapeHtml)(onRowClick.replace("{key}", rowId))}'"` : "";
|
|
2132
|
-
const selectCell = selectable ? `<td class="${paddingClass}" onclick="event.stopPropagation()">
|
|
2133
|
-
<input
|
|
2134
|
-
type="checkbox"
|
|
2135
|
-
class="w-4 h-4 rounded border-border text-primary focus:ring-primary/20"
|
|
2136
|
-
name="selected[]"
|
|
2137
|
-
value="${(0, import_utils2.escapeHtml)(rowId)}"
|
|
2138
|
-
aria-label="Select row"
|
|
2139
|
-
>
|
|
2140
|
-
</td>` : "";
|
|
2141
|
-
const cells = columns.map((col) => {
|
|
2142
|
-
const value = row[col.key];
|
|
2143
|
-
const alignClass = getAlignClasses(col.align);
|
|
2144
|
-
const cellContent = col.render ? col.render(value, row, rowIndex) : (0, import_utils2.escapeHtml)(String(value ?? ""));
|
|
2145
|
-
return `<td class="${paddingClass} ${alignClass} ${col.cellClass || ""}">${cellContent}</td>`;
|
|
2146
|
-
}).join("\n");
|
|
2147
|
-
return `<tr class="${rowClasses}" ${clickHandler}>
|
|
2148
|
-
${selectCell}
|
|
2149
|
-
${cells}
|
|
2150
|
-
</tr>`;
|
|
2151
|
-
}).join("\n");
|
|
2152
|
-
return `<tbody class="divide-y divide-border">${rows}</tbody>`;
|
|
2153
|
-
}
|
|
2154
|
-
function buildLoadingOverlay() {
|
|
2155
|
-
return `<div class="absolute inset-0 bg-white/70 flex items-center justify-center">
|
|
2156
|
-
<svg class="animate-spin w-8 h-8 text-primary" fill="none" viewBox="0 0 24 24">
|
|
2157
|
-
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
|
2158
|
-
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
|
2159
|
-
</svg>
|
|
2160
|
-
</div>`;
|
|
2161
|
-
}
|
|
2162
|
-
function table(data, options) {
|
|
2163
|
-
const { id, bordered, stickyHeader, className = "", loading = false } = options;
|
|
2164
|
-
const tableClasses = ["w-full", bordered ? "border border-border" : "", "text-sm"].filter(Boolean).join(" ");
|
|
2165
|
-
const wrapperClasses = ["relative overflow-x-auto", stickyHeader ? "max-h-96 overflow-y-auto" : "", className].filter(Boolean).join(" ");
|
|
2166
|
-
const idAttr = id ? `id="${(0, import_utils2.escapeHtml)(id)}"` : "";
|
|
2167
|
-
const header = buildTableHeader(options.columns, options);
|
|
2168
|
-
const body = buildTableBody(data, options.columns, options);
|
|
2169
|
-
const loadingOverlay = loading ? buildLoadingOverlay() : "";
|
|
2170
|
-
return `<div class="${wrapperClasses}" ${idAttr}>
|
|
2171
|
-
<table class="${tableClasses}">
|
|
2172
|
-
${header}
|
|
2173
|
-
${body}
|
|
2174
|
-
</table>
|
|
2175
|
-
${loadingOverlay}
|
|
2176
|
-
</div>`;
|
|
2177
|
-
}
|
|
2178
|
-
function pagination(options) {
|
|
2179
|
-
const {
|
|
2180
|
-
page,
|
|
2181
|
-
totalPages,
|
|
2182
|
-
totalItems,
|
|
2183
|
-
pageSize = 10,
|
|
2184
|
-
showPageSize = false,
|
|
2185
|
-
pageSizeOptions = [10, 25, 50, 100],
|
|
2186
|
-
className = "",
|
|
2187
|
-
baseUrl = ""
|
|
2188
|
-
} = options;
|
|
2189
|
-
const buildPageLink = (pageNum, label, disabled, active) => {
|
|
2190
|
-
const baseClasses = "px-3 py-2 text-sm rounded-lg transition-colors";
|
|
2191
|
-
const stateClasses = disabled ? "text-gray-300 cursor-not-allowed" : active ? "bg-primary text-white" : "text-text-primary hover:bg-gray-100";
|
|
2192
|
-
if (disabled) {
|
|
2193
|
-
return `<span class="${baseClasses} ${stateClasses}">${label}</span>`;
|
|
2194
|
-
}
|
|
2195
|
-
const pageUrl = baseUrl ? `${baseUrl}${baseUrl.includes("?") ? "&" : "?"}page=${pageNum}` : `?page=${pageNum}`;
|
|
2196
|
-
return `<a href="${(0, import_utils2.escapeHtml)(pageUrl)}" class="${baseClasses} ${stateClasses}">${label}</a>`;
|
|
2197
|
-
};
|
|
2198
|
-
const pageNumbers = [];
|
|
2199
|
-
const maxVisible = 5;
|
|
2200
|
-
if (totalPages <= maxVisible) {
|
|
2201
|
-
for (let i = 1; i <= totalPages; i++) {
|
|
2202
|
-
pageNumbers.push(i);
|
|
2203
|
-
}
|
|
2204
|
-
} else {
|
|
2205
|
-
pageNumbers.push(1);
|
|
2206
|
-
let start = Math.max(2, page - 1);
|
|
2207
|
-
let end = Math.min(totalPages - 1, page + 1);
|
|
2208
|
-
if (page <= 2) {
|
|
2209
|
-
end = 4;
|
|
2210
|
-
} else if (page >= totalPages - 1) {
|
|
2211
|
-
start = totalPages - 3;
|
|
2212
|
-
}
|
|
2213
|
-
if (start > 2) {
|
|
2214
|
-
pageNumbers.push(-1);
|
|
383
|
+
// libs/ui/src/components/Select/Select.tsx
|
|
384
|
+
var import_TextField3 = __toESM(require("@mui/material/TextField"));
|
|
385
|
+
var import_MenuItem = __toESM(require("@mui/material/MenuItem"));
|
|
386
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
387
|
+
function Select({
|
|
388
|
+
label,
|
|
389
|
+
value,
|
|
390
|
+
defaultValue,
|
|
391
|
+
onChange,
|
|
392
|
+
options,
|
|
393
|
+
placeholder,
|
|
394
|
+
error = false,
|
|
395
|
+
helperText,
|
|
396
|
+
disabled = false,
|
|
397
|
+
required = false,
|
|
398
|
+
fullWidth = true,
|
|
399
|
+
size = "small"
|
|
400
|
+
}) {
|
|
401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
402
|
+
import_TextField3.default,
|
|
403
|
+
{
|
|
404
|
+
select: true,
|
|
405
|
+
label,
|
|
406
|
+
value,
|
|
407
|
+
defaultValue,
|
|
408
|
+
onChange: onChange ? (e) => onChange(e.target.value) : void 0,
|
|
409
|
+
error,
|
|
410
|
+
helperText,
|
|
411
|
+
disabled,
|
|
412
|
+
required,
|
|
413
|
+
fullWidth,
|
|
414
|
+
size,
|
|
415
|
+
variant: "outlined",
|
|
416
|
+
...placeholder ? { SelectProps: { displayEmpty: true } } : {},
|
|
417
|
+
children: [
|
|
418
|
+
placeholder && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_MenuItem.default, { value: "", disabled: true, children: placeholder }),
|
|
419
|
+
options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_MenuItem.default, { value: opt.value, children: opt.label }, opt.value))
|
|
420
|
+
]
|
|
2215
421
|
}
|
|
2216
|
-
|
|
2217
|
-
pageNumbers.push(i);
|
|
2218
|
-
}
|
|
2219
|
-
if (end < totalPages - 1) {
|
|
2220
|
-
pageNumbers.push(-1);
|
|
2221
|
-
}
|
|
2222
|
-
pageNumbers.push(totalPages);
|
|
2223
|
-
}
|
|
2224
|
-
const pagesHtml = pageNumbers.map((num) => {
|
|
2225
|
-
if (num === -1) {
|
|
2226
|
-
return '<span class="px-2 py-2 text-text-secondary">...</span>';
|
|
2227
|
-
}
|
|
2228
|
-
return buildPageLink(num, String(num), false, num === page);
|
|
2229
|
-
}).join("\n");
|
|
2230
|
-
const prevLink = buildPageLink(page - 1, "← Previous", page <= 1, false);
|
|
2231
|
-
const nextLink = buildPageLink(page + 1, "Next →", page >= totalPages, false);
|
|
2232
|
-
const infoHtml = totalItems !== void 0 ? `<span class="text-sm text-text-secondary">
|
|
2233
|
-
Showing ${(page - 1) * pageSize + 1} to ${Math.min(page * pageSize, totalItems)} of ${totalItems} results
|
|
2234
|
-
</span>` : "";
|
|
2235
|
-
const pageSizeHtml = showPageSize ? `<select
|
|
2236
|
-
class="ml-4 px-2 py-1 text-sm border border-border rounded-lg bg-white"
|
|
2237
|
-
onchange="window.location.href = '${baseUrl}${baseUrl.includes("?") ? "&" : "?"}page=1&pageSize=' + this.value"
|
|
2238
|
-
>
|
|
2239
|
-
${pageSizeOptions.map((size) => `<option value="${size}" ${size === pageSize ? "selected" : ""}>${size} per page</option>`).join("")}
|
|
2240
|
-
</select>` : "";
|
|
2241
|
-
return `<div class="flex items-center justify-between ${className}">
|
|
2242
|
-
<div class="flex items-center">
|
|
2243
|
-
${infoHtml}
|
|
2244
|
-
${pageSizeHtml}
|
|
2245
|
-
</div>
|
|
2246
|
-
<div class="flex items-center gap-1">
|
|
2247
|
-
${prevLink}
|
|
2248
|
-
${pagesHtml}
|
|
2249
|
-
${nextLink}
|
|
2250
|
-
</div>
|
|
2251
|
-
</div>`;
|
|
422
|
+
);
|
|
2252
423
|
}
|
|
2253
424
|
|
|
2254
|
-
// libs/ui/src/components/
|
|
2255
|
-
var
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
|
|
2275
|
-
</svg>`,
|
|
2276
|
-
default: `<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
2277
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"/>
|
|
2278
|
-
</svg>`
|
|
2279
|
-
};
|
|
2280
|
-
function getPermissionIcon(scope, customIcon) {
|
|
2281
|
-
if (customIcon) return customIcon;
|
|
2282
|
-
const scopeLower = scope.toLowerCase();
|
|
2283
|
-
if (scopeLower.includes("read")) return permissionIcons["read"];
|
|
2284
|
-
if (scopeLower.includes("write") || scopeLower.includes("create") || scopeLower.includes("update"))
|
|
2285
|
-
return permissionIcons["write"];
|
|
2286
|
-
if (scopeLower.includes("delete")) return permissionIcons["delete"];
|
|
2287
|
-
if (scopeLower.includes("profile")) return permissionIcons["profile"];
|
|
2288
|
-
if (scopeLower.includes("email")) return permissionIcons["email"];
|
|
2289
|
-
if (scopeLower.includes("settings") || scopeLower.includes("config")) return permissionIcons["settings"];
|
|
2290
|
-
return permissionIcons["default"];
|
|
2291
|
-
}
|
|
2292
|
-
function permissionList(permissions, options = {}) {
|
|
2293
|
-
const { id, checkable = false, inputName = "scopes", title, className = "" } = options;
|
|
2294
|
-
const titleHtml = title ? `<h4 class="font-medium text-text-primary mb-3">${(0, import_utils2.escapeHtml)(title)}</h4>` : "";
|
|
2295
|
-
const itemsHtml = permissions.map((perm, index) => {
|
|
2296
|
-
const icon = getPermissionIcon(perm.scope, perm.icon);
|
|
2297
|
-
const sensitiveClasses = perm.sensitive ? "border-warning/30 bg-warning/5" : "border-border";
|
|
2298
|
-
const sensitiveLabel = perm.sensitive ? '<span class="text-xs text-warning font-medium ml-2">Sensitive</span>' : "";
|
|
2299
|
-
const checkboxHtml = checkable ? `<input
|
|
2300
|
-
type="checkbox"
|
|
2301
|
-
name="${(0, import_utils2.escapeHtml)(inputName)}[]"
|
|
2302
|
-
value="${(0, import_utils2.escapeHtml)(perm.scope)}"
|
|
2303
|
-
class="w-4 h-4 rounded border-border text-primary focus:ring-primary/20"
|
|
2304
|
-
${perm.checked || perm.required ? "checked" : ""}
|
|
2305
|
-
${perm.required ? "disabled" : ""}
|
|
2306
|
-
id="${id ? (0, import_utils2.escapeHtml)(id) : "perm"}-${index}"
|
|
2307
|
-
>` : `<div class="w-5 h-5 rounded-full bg-success/10 text-success flex items-center justify-center">
|
|
2308
|
-
<svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
2309
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M5 13l4 4L19 7"/>
|
|
2310
|
-
</svg>
|
|
2311
|
-
</div>`;
|
|
2312
|
-
return `<div class="flex items-start gap-3 p-3 border ${sensitiveClasses} rounded-lg">
|
|
2313
|
-
<div class="flex-shrink-0 mt-0.5 text-text-secondary">
|
|
2314
|
-
${icon}
|
|
2315
|
-
</div>
|
|
2316
|
-
<div class="flex-1 min-w-0">
|
|
2317
|
-
<div class="flex items-center">
|
|
2318
|
-
<span class="font-medium text-text-primary">${(0, import_utils2.escapeHtml)(perm.name)}</span>
|
|
2319
|
-
${perm.required ? '<span class="text-xs text-text-secondary ml-2">(Required)</span>' : ""}
|
|
2320
|
-
${sensitiveLabel}
|
|
2321
|
-
</div>
|
|
2322
|
-
${perm.description ? `<p class="text-sm text-text-secondary mt-0.5">${(0, import_utils2.escapeHtml)(perm.description)}</p>` : ""}
|
|
2323
|
-
</div>
|
|
2324
|
-
<div class="flex-shrink-0">
|
|
2325
|
-
${checkboxHtml}
|
|
2326
|
-
</div>
|
|
2327
|
-
</div>`;
|
|
2328
|
-
}).join("\n");
|
|
2329
|
-
const idAttr = id ? `id="${(0, import_utils2.escapeHtml)(id)}"` : "";
|
|
2330
|
-
return `<div class="permission-list ${className}" ${idAttr}>
|
|
2331
|
-
${titleHtml}
|
|
2332
|
-
<div class="space-y-2">
|
|
2333
|
-
${itemsHtml}
|
|
2334
|
-
</div>
|
|
2335
|
-
</div>`;
|
|
425
|
+
// libs/ui/src/components/List/List.tsx
|
|
426
|
+
var import_react3 = __toESM(require("react"));
|
|
427
|
+
var import_List = __toESM(require("@mui/material/List"));
|
|
428
|
+
var import_ListItem = __toESM(require("@mui/material/ListItem"));
|
|
429
|
+
var import_ListItemButton = __toESM(require("@mui/material/ListItemButton"));
|
|
430
|
+
var import_ListItemIcon = __toESM(require("@mui/material/ListItemIcon"));
|
|
431
|
+
var import_ListItemText = __toESM(require("@mui/material/ListItemText"));
|
|
432
|
+
var import_Divider = __toESM(require("@mui/material/Divider"));
|
|
433
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
434
|
+
function List({ items, dense = false }) {
|
|
435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_List.default, { dense, children: items.map((item) => {
|
|
436
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
437
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ListItemIcon.default, { children: item.icon }),
|
|
438
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ListItemText.default, { primary: item.primary, secondary: item.secondary })
|
|
439
|
+
] });
|
|
440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react3.default.Fragment, { children: [
|
|
441
|
+
item.onClick ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ListItemButton.default, { onClick: item.onClick, children: content }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ListItem.default, { children: content }),
|
|
442
|
+
item.divider && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_Divider.default, {})
|
|
443
|
+
] }, item.id);
|
|
444
|
+
}) });
|
|
2336
445
|
}
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
${feature.description ? `<p class="text-sm text-text-secondary">${(0, import_utils2.escapeHtml)(feature.description)}</p>` : ""}
|
|
2361
|
-
</div>
|
|
2362
|
-
</li>`;
|
|
2363
|
-
}).join("\n");
|
|
2364
|
-
return `<ul class="space-y-3 ${className}">${itemsHtml}</ul>`;
|
|
446
|
+
|
|
447
|
+
// libs/ui/src/components/Loader/Loader.tsx
|
|
448
|
+
var import_Box = __toESM(require("@mui/material/Box"));
|
|
449
|
+
var import_CircularProgress2 = __toESM(require("@mui/material/CircularProgress"));
|
|
450
|
+
var import_LinearProgress = __toESM(require("@mui/material/LinearProgress"));
|
|
451
|
+
var import_Skeleton = __toESM(require("@mui/material/Skeleton"));
|
|
452
|
+
var import_Backdrop = __toESM(require("@mui/material/Backdrop"));
|
|
453
|
+
var import_Typography = __toESM(require("@mui/material/Typography"));
|
|
454
|
+
var import_styles5 = require("@mui/material/styles");
|
|
455
|
+
|
|
456
|
+
// libs/ui/src/components/Loader/LoaderContext.tsx
|
|
457
|
+
var import_react4 = require("react");
|
|
458
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
459
|
+
var LoaderContext = (0, import_react4.createContext)({});
|
|
460
|
+
function LoaderProvider({
|
|
461
|
+
custom,
|
|
462
|
+
children
|
|
463
|
+
}) {
|
|
464
|
+
const value = (0, import_react4.useMemo)(() => ({ customLoader: custom }), [custom]);
|
|
465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(LoaderContext.Provider, { value, children });
|
|
466
|
+
}
|
|
467
|
+
function useLoaderContext() {
|
|
468
|
+
return (0, import_react4.useContext)(LoaderContext);
|
|
2365
469
|
}
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
}).join("\n");
|
|
2414
|
-
return `<dl class="grid grid-cols-2 gap-4 ${className}">${itemsHtml2}</dl>${hasCopyable ? copyScript : ""}`;
|
|
470
|
+
|
|
471
|
+
// libs/ui/src/components/Loader/Loader.tsx
|
|
472
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
473
|
+
var LoaderRoot = (0, import_styles5.styled)(import_Box.default, {
|
|
474
|
+
name: "FrontMcpLoader",
|
|
475
|
+
slot: "Root"
|
|
476
|
+
})({
|
|
477
|
+
display: "inline-flex",
|
|
478
|
+
flexDirection: "column",
|
|
479
|
+
alignItems: "center",
|
|
480
|
+
gap: 8
|
|
481
|
+
});
|
|
482
|
+
var BarRoot = (0, import_styles5.styled)(import_Box.default, {
|
|
483
|
+
name: "FrontMcpLoader",
|
|
484
|
+
slot: "Bar"
|
|
485
|
+
})({
|
|
486
|
+
width: "100%",
|
|
487
|
+
display: "flex",
|
|
488
|
+
flexDirection: "column",
|
|
489
|
+
gap: 4
|
|
490
|
+
});
|
|
491
|
+
var OverlayRoot = (0, import_styles5.styled)(import_Box.default, {
|
|
492
|
+
name: "FrontMcpLoader",
|
|
493
|
+
slot: "Overlay"
|
|
494
|
+
})({
|
|
495
|
+
position: "relative"
|
|
496
|
+
});
|
|
497
|
+
function Loader({
|
|
498
|
+
variant = "spinner",
|
|
499
|
+
determinate = false,
|
|
500
|
+
value,
|
|
501
|
+
size = 40,
|
|
502
|
+
color = "primary",
|
|
503
|
+
label,
|
|
504
|
+
skeletonShape = "text",
|
|
505
|
+
skeletonWidth,
|
|
506
|
+
skeletonHeight,
|
|
507
|
+
skeletonLines = 1,
|
|
508
|
+
open = true,
|
|
509
|
+
contained = false,
|
|
510
|
+
children,
|
|
511
|
+
custom
|
|
512
|
+
}) {
|
|
513
|
+
const { customLoader } = useLoaderContext();
|
|
514
|
+
const renderFn = custom ?? customLoader;
|
|
515
|
+
if (renderFn) {
|
|
516
|
+
return renderFn({ variant, label, value });
|
|
2415
517
|
}
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
const contentHtml = `
|
|
2442
|
-
${iconHtml}
|
|
2443
|
-
<div class="flex-1 min-w-0">
|
|
2444
|
-
<div class="font-medium ${item.destructive ? "text-danger" : "text-text-primary"}">${(0, import_utils2.escapeHtml)(
|
|
2445
|
-
item.label
|
|
2446
|
-
)}</div>
|
|
2447
|
-
${item.description ? `<p class="text-sm text-text-secondary">${(0, import_utils2.escapeHtml)(item.description)}</p>` : ""}
|
|
2448
|
-
</div>
|
|
2449
|
-
<svg class="w-5 h-5 text-text-secondary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
2450
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
|
|
2451
|
-
</svg>
|
|
2452
|
-
`;
|
|
2453
|
-
if (item.disabled) {
|
|
2454
|
-
return `<div class="${baseClasses}">${contentHtml}</div>`;
|
|
2455
|
-
}
|
|
2456
|
-
if (item.href) {
|
|
2457
|
-
return `<a href="${(0, import_utils2.escapeHtml)(item.href)}" class="${baseClasses}">${contentHtml}</a>`;
|
|
518
|
+
switch (variant) {
|
|
519
|
+
case "bar":
|
|
520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(BarRoot, { children: [
|
|
521
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
522
|
+
import_LinearProgress.default,
|
|
523
|
+
{
|
|
524
|
+
variant: determinate ? "determinate" : "indeterminate",
|
|
525
|
+
value: determinate ? value : void 0,
|
|
526
|
+
color
|
|
527
|
+
}
|
|
528
|
+
),
|
|
529
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_Typography.default, { variant: "caption", color: "text.secondary", children: label })
|
|
530
|
+
] });
|
|
531
|
+
case "skeleton": {
|
|
532
|
+
const lines = Math.max(1, skeletonLines);
|
|
533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_Box.default, { children: Array.from({ length: lines }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
534
|
+
import_Skeleton.default,
|
|
535
|
+
{
|
|
536
|
+
variant: skeletonShape,
|
|
537
|
+
width: skeletonWidth ?? (skeletonShape === "circular" ? 40 : "100%"),
|
|
538
|
+
height: skeletonHeight ?? (skeletonShape === "circular" ? 40 : void 0),
|
|
539
|
+
animation: "wave"
|
|
540
|
+
},
|
|
541
|
+
i
|
|
542
|
+
)) });
|
|
2458
543
|
}
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
544
|
+
case "overlay":
|
|
545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(OverlayRoot, { children: [
|
|
546
|
+
children,
|
|
547
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
548
|
+
import_Backdrop.default,
|
|
549
|
+
{
|
|
550
|
+
open,
|
|
551
|
+
sx: {
|
|
552
|
+
position: contained ? "absolute" : "fixed",
|
|
553
|
+
zIndex: (theme) => theme.zIndex.drawer + 1,
|
|
554
|
+
color: "#fff",
|
|
555
|
+
flexDirection: "column",
|
|
556
|
+
gap: 1
|
|
557
|
+
},
|
|
558
|
+
children: [
|
|
559
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_CircularProgress2.default, { color: "inherit", size }),
|
|
560
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_Typography.default, { variant: "body2", color: "inherit", children: label })
|
|
561
|
+
]
|
|
562
|
+
}
|
|
563
|
+
)
|
|
564
|
+
] });
|
|
565
|
+
case "spinner":
|
|
566
|
+
default:
|
|
567
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(LoaderRoot, { children: [
|
|
568
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
569
|
+
import_CircularProgress2.default,
|
|
570
|
+
{
|
|
571
|
+
variant: determinate ? "determinate" : "indeterminate",
|
|
572
|
+
value: determinate ? value : void 0,
|
|
573
|
+
size,
|
|
574
|
+
color
|
|
575
|
+
}
|
|
576
|
+
),
|
|
577
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_Typography.default, { variant: "caption", color: "text.secondary", children: label })
|
|
578
|
+
] });
|
|
579
|
+
}
|
|
2462
580
|
}
|
|
2463
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
2464
|
-
0 && (module.exports = {
|
|
2465
|
-
ActionItemSchema,
|
|
2466
|
-
ActionListOptionsSchema,
|
|
2467
|
-
AlertOptionsSchema,
|
|
2468
|
-
AlertVariantSchema,
|
|
2469
|
-
AvatarGroupOptionsSchema,
|
|
2470
|
-
AvatarOptionsSchema,
|
|
2471
|
-
AvatarShapeSchema,
|
|
2472
|
-
AvatarSizeSchema,
|
|
2473
|
-
AvatarSpacingSchema,
|
|
2474
|
-
AvatarStatusSchema,
|
|
2475
|
-
AvatarWithTextOptionsSchema,
|
|
2476
|
-
BadgeGroupOptionsSchema,
|
|
2477
|
-
BadgeOptionsSchema,
|
|
2478
|
-
BadgeSizeSchema,
|
|
2479
|
-
BadgeVariantSchema,
|
|
2480
|
-
ButtonGroupOptionsSchema,
|
|
2481
|
-
ButtonOptionsSchema,
|
|
2482
|
-
ButtonSizeSchema,
|
|
2483
|
-
ButtonVariantSchema,
|
|
2484
|
-
CardGroupOptionsSchema,
|
|
2485
|
-
CardOptionsSchema,
|
|
2486
|
-
CardSizeSchema,
|
|
2487
|
-
CardVariantSchema,
|
|
2488
|
-
CheckboxOptionsSchema,
|
|
2489
|
-
ConfirmModalOptionsSchema,
|
|
2490
|
-
ConfirmModalVariantSchema,
|
|
2491
|
-
DescriptionItemSchema,
|
|
2492
|
-
DescriptionListOptionsSchema,
|
|
2493
|
-
DrawerOptionsSchema,
|
|
2494
|
-
DrawerPositionSchema,
|
|
2495
|
-
FeatureItemSchema,
|
|
2496
|
-
FeatureListOptionsSchema,
|
|
2497
|
-
FormActionsOptionsSchema,
|
|
2498
|
-
FormEnctypeSchema,
|
|
2499
|
-
FormMethodSchema,
|
|
2500
|
-
FormOptionsSchema,
|
|
2501
|
-
FormRowOptionsSchema,
|
|
2502
|
-
FormSectionOptionsSchema,
|
|
2503
|
-
InputOptionsSchema,
|
|
2504
|
-
InputSizeSchema,
|
|
2505
|
-
InputStateSchema,
|
|
2506
|
-
InputTypeSchema,
|
|
2507
|
-
ModalOptionsSchema,
|
|
2508
|
-
ModalSizeSchema,
|
|
2509
|
-
ModalTriggerOptionsSchema,
|
|
2510
|
-
PaginationOptionsSchema,
|
|
2511
|
-
PermissionItemSchema,
|
|
2512
|
-
PermissionListOptionsSchema,
|
|
2513
|
-
RadioGroupOptionsSchema,
|
|
2514
|
-
RadioOptionItemSchema,
|
|
2515
|
-
SelectOptionItemSchema,
|
|
2516
|
-
SelectOptionsSchema,
|
|
2517
|
-
TableAlignSchema,
|
|
2518
|
-
TableColumnSchema,
|
|
2519
|
-
TableOptionsSchema,
|
|
2520
|
-
TableSortDirectionSchema,
|
|
2521
|
-
TextareaOptionsSchema,
|
|
2522
|
-
TextareaResizeSchema,
|
|
2523
|
-
ToastOptionsSchema,
|
|
2524
|
-
ToastPositionSchema,
|
|
2525
|
-
actionList,
|
|
2526
|
-
activeBadge,
|
|
2527
|
-
alert,
|
|
2528
|
-
avatar,
|
|
2529
|
-
avatarGroup,
|
|
2530
|
-
avatarWithText,
|
|
2531
|
-
awayDot,
|
|
2532
|
-
badge,
|
|
2533
|
-
badgeGroup,
|
|
2534
|
-
betaBadge,
|
|
2535
|
-
busyDot,
|
|
2536
|
-
button,
|
|
2537
|
-
buttonGroup,
|
|
2538
|
-
card,
|
|
2539
|
-
cardGroup,
|
|
2540
|
-
checkbox,
|
|
2541
|
-
confirmModal,
|
|
2542
|
-
csrfInput,
|
|
2543
|
-
dangerAlert,
|
|
2544
|
-
dangerButton,
|
|
2545
|
-
descriptionList,
|
|
2546
|
-
drawer,
|
|
2547
|
-
errorBadge,
|
|
2548
|
-
featureList,
|
|
2549
|
-
form,
|
|
2550
|
-
formActions,
|
|
2551
|
-
formRow,
|
|
2552
|
-
formSection,
|
|
2553
|
-
ghostButton,
|
|
2554
|
-
hiddenInput,
|
|
2555
|
-
inactiveBadge,
|
|
2556
|
-
infoAlert,
|
|
2557
|
-
input,
|
|
2558
|
-
linkButton,
|
|
2559
|
-
modal,
|
|
2560
|
-
modalTrigger,
|
|
2561
|
-
newBadge,
|
|
2562
|
-
offlineDot,
|
|
2563
|
-
onlineDot,
|
|
2564
|
-
outlineButton,
|
|
2565
|
-
pagination,
|
|
2566
|
-
pendingBadge,
|
|
2567
|
-
permissionList,
|
|
2568
|
-
primaryButton,
|
|
2569
|
-
radioGroup,
|
|
2570
|
-
secondaryButton,
|
|
2571
|
-
select,
|
|
2572
|
-
successAlert,
|
|
2573
|
-
table,
|
|
2574
|
-
textarea,
|
|
2575
|
-
toast,
|
|
2576
|
-
toastContainer,
|
|
2577
|
-
warningAlert
|
|
2578
|
-
});
|