@questpie/admin 3.2.3 → 3.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/blocks/block-renderer.d.mts +2 -2
- package/dist/client/blocks/block-renderer.mjs +164 -339
- package/dist/client/components/actions/action-button.mjs +9 -9
- package/dist/client/components/actions/action-dialog.mjs +195 -493
- package/dist/client/components/actions/confirmation-dialog.mjs +44 -159
- package/dist/client/components/actions/header-actions.mjs +73 -165
- package/dist/client/components/admin-link.d.mts +2 -2
- package/dist/client/components/admin-link.mjs +40 -126
- package/dist/client/components/auth/auth-loading.mjs +9 -44
- package/dist/client/components/blocks/block-canvas.mjs +31 -95
- package/dist/client/components/blocks/block-editor-context.mjs +13 -57
- package/dist/client/components/blocks/block-editor-layout.mjs +72 -166
- package/dist/client/components/blocks/block-editor-provider.mjs +184 -245
- package/dist/client/components/blocks/block-fields-renderer.mjs +54 -229
- package/dist/client/components/blocks/block-insert-button.mjs +49 -165
- package/dist/client/components/blocks/block-item-menu.mjs +102 -301
- package/dist/client/components/blocks/block-item.mjs +136 -370
- package/dist/client/components/blocks/block-library-sidebar.mjs +106 -220
- package/dist/client/components/blocks/block-tree.mjs +12 -68
- package/dist/client/components/blocks/block-type-icon.mjs +14 -56
- package/dist/client/components/brand-logo.mjs +35 -149
- package/dist/client/components/component-renderer.mjs +42 -118
- package/dist/client/components/error-boundary.mjs +14 -58
- package/dist/client/components/fields/array-field.mjs +209 -521
- package/dist/client/components/fields/asset-preview-field.mjs +41 -141
- package/dist/client/components/fields/blocks-field/blocks-field.mjs +60 -156
- package/dist/client/components/fields/boolean-field.mjs +29 -59
- package/dist/client/components/fields/date-field.mjs +7 -37
- package/dist/client/components/fields/datetime-field.mjs +7 -38
- package/dist/client/components/fields/email-field.mjs +25 -54
- package/dist/client/components/fields/field-wrapper.mjs +30 -105
- package/dist/client/components/fields/json-field.mjs +107 -313
- package/dist/client/components/fields/locale-badge.mjs +6 -15
- package/dist/client/components/fields/number-field.mjs +27 -60
- package/dist/client/components/fields/object-array-field.mjs +283 -659
- package/dist/client/components/fields/object-field.mjs +165 -633
- package/dist/client/components/fields/relation/displays/cards-display.mjs +106 -220
- package/dist/client/components/fields/relation/displays/chips-display.mjs +78 -150
- package/dist/client/components/fields/relation/displays/grid-display.mjs +92 -186
- package/dist/client/components/fields/relation/displays/list-display.mjs +122 -239
- package/dist/client/components/fields/relation/displays/table-display.mjs +70 -244
- package/dist/client/components/fields/relation/relation-items-display.mjs +30 -126
- package/dist/client/components/fields/relation-field.mjs +10 -66
- package/dist/client/components/fields/relation-picker.mjs +18 -18
- package/dist/client/components/fields/relation-select.mjs +12 -12
- package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +80 -182
- package/dist/client/components/fields/rich-text-editor/image-popover.mjs +8 -19
- package/dist/client/components/fields/rich-text-editor/image-upload.mjs +13 -29
- package/dist/client/components/fields/rich-text-editor/index.mjs +196 -530
- package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +61 -111
- package/dist/client/components/fields/rich-text-editor/table-controls.mjs +105 -415
- package/dist/client/components/fields/rich-text-editor/toolbar.mjs +256 -511
- package/dist/client/components/fields/rich-text-field.mjs +14 -53
- package/dist/client/components/fields/select-field.mjs +39 -74
- package/dist/client/components/fields/text-field.mjs +26 -59
- package/dist/client/components/fields/textarea-field.mjs +26 -58
- package/dist/client/components/fields/time-field.mjs +7 -35
- package/dist/client/components/fields/upload-field.mjs +47 -165
- package/dist/client/components/filter-builder/columns-tab.mjs +80 -280
- package/dist/client/components/filter-builder/filter-builder-sheet.mjs +197 -540
- package/dist/client/components/filter-builder/filters-tab.mjs +96 -386
- package/dist/client/components/filter-builder/saved-views-tab.mjs +133 -351
- package/dist/client/components/history-sidebar.mjs +306 -611
- package/dist/client/components/layout/field-layout-renderer.mjs +106 -254
- package/dist/client/components/locale-switcher.mjs +106 -228
- package/dist/client/components/media/media-grid.mjs +84 -273
- package/dist/client/components/media/media-picker-dialog.mjs +177 -494
- package/dist/client/components/preview/live-preview-mode.mjs +240 -438
- package/dist/client/components/preview/preview-pane.mjs +22 -22
- package/dist/client/components/primitives/asset-preview.mjs +290 -666
- package/dist/client/components/primitives/checkbox-input.mjs +9 -35
- package/dist/client/components/primitives/date-input.mjs +109 -327
- package/dist/client/components/primitives/dropzone.mjs +209 -336
- package/dist/client/components/primitives/field-select-control.mjs +12 -80
- package/dist/client/components/primitives/number-input.mjs +4 -4
- package/dist/client/components/primitives/select-multi.mjs +200 -559
- package/dist/client/components/primitives/select-single.mjs +165 -499
- package/dist/client/components/primitives/time-input.mjs +43 -117
- package/dist/client/components/primitives/toggle-input.mjs +9 -29
- package/dist/client/components/sheets/resource-sheet.mjs +61 -70
- package/dist/client/components/ui/accordion.mjs +35 -155
- package/dist/client/components/ui/alert.mjs +13 -68
- package/dist/client/components/ui/badge.mjs +9 -51
- package/dist/client/components/ui/button.mjs +8 -54
- package/dist/client/components/ui/card.mjs +37 -193
- package/dist/client/components/ui/checkbox.mjs +12 -68
- package/dist/client/components/ui/command.mjs +48 -219
- package/dist/client/components/ui/dialog.mjs +50 -262
- package/dist/client/components/ui/drawer.mjs +55 -259
- package/dist/client/components/ui/dropdown-menu.mjs +86 -427
- package/dist/client/components/ui/empty-state.mjs +28 -98
- package/dist/client/components/ui/field.mjs +73 -309
- package/dist/client/components/ui/input-group.mjs +42 -167
- package/dist/client/components/ui/input.mjs +7 -37
- package/dist/client/components/ui/kbd.mjs +6 -36
- package/dist/client/components/ui/label.mjs +7 -37
- package/dist/client/components/ui/popover.mjs +34 -169
- package/dist/client/components/ui/responsive-dialog.mjs +67 -273
- package/dist/client/components/ui/scroll-fade.mjs +63 -158
- package/dist/client/components/ui/search-input.mjs +33 -100
- package/dist/client/components/ui/select.mjs +72 -393
- package/dist/client/components/ui/separator.mjs +7 -38
- package/dist/client/components/ui/sheet.mjs +49 -269
- package/dist/client/components/ui/sidebar.mjs +171 -690
- package/dist/client/components/ui/skeleton.mjs +7 -38
- package/dist/client/components/ui/sonner.mjs +11 -42
- package/dist/client/components/ui/switch.mjs +9 -45
- package/dist/client/components/ui/table.mjs +48 -266
- package/dist/client/components/ui/tabs.mjs +26 -139
- package/dist/client/components/ui/textarea.mjs +6 -32
- package/dist/client/components/ui/tooltip.mjs +27 -129
- package/dist/client/components/widgets/chart-widget.mjs +174 -522
- package/dist/client/components/widgets/progress-widget.mjs +66 -172
- package/dist/client/components/widgets/quick-actions-widget.mjs +102 -261
- package/dist/client/components/widgets/recent-items-widget.mjs +69 -195
- package/dist/client/components/widgets/stats-widget.mjs +41 -175
- package/dist/client/components/widgets/table-widget.mjs +9 -9
- package/dist/client/components/widgets/timeline-widget.mjs +86 -226
- package/dist/client/components/widgets/value-widget.mjs +74 -381
- package/dist/client/components/widgets/widget-empty-state.mjs +26 -76
- package/dist/client/components/widgets/widget-skeletons.mjs +138 -421
- package/dist/client/contexts/focus-context.d.mts +4 -0
- package/dist/client/contexts/focus-context.mjs +87 -150
- package/dist/client/hooks/typed-hooks.mjs +241 -701
- package/dist/client/hooks/use-action.mjs +62 -198
- package/dist/client/hooks/use-admin-config.mjs +5 -35
- package/dist/client/hooks/use-admin-preferences.mjs +16 -88
- package/dist/client/hooks/use-admin-routes.mjs +22 -56
- package/dist/client/hooks/use-audit-history.mjs +21 -69
- package/dist/client/hooks/use-brand.mjs +1 -9
- package/dist/client/hooks/use-collection-fields.mjs +17 -57
- package/dist/client/hooks/use-collection-meta.mjs +12 -44
- package/dist/client/hooks/use-collection-schema.mjs +10 -33
- package/dist/client/hooks/use-collection-validation.mjs +23 -53
- package/dist/client/hooks/use-collection.mjs +194 -614
- package/dist/client/hooks/use-current-user.mjs +0 -1
- package/dist/client/hooks/use-field-hooks.mjs +10 -10
- package/dist/client/hooks/use-field-options.mjs +61 -202
- package/dist/client/hooks/use-global-fields.mjs +14 -46
- package/dist/client/hooks/use-global-meta.mjs +9 -30
- package/dist/client/hooks/use-global-schema.mjs +9 -30
- package/dist/client/hooks/use-global.mjs +63 -219
- package/dist/client/hooks/use-locks.mjs +117 -325
- package/dist/client/hooks/use-media-query.mjs +16 -36
- package/dist/client/hooks/use-prefill-params.mjs +0 -1
- package/dist/client/hooks/use-questpie-query-options.mjs +12 -29
- package/dist/client/hooks/use-reactive-fields.mjs +1 -1
- package/dist/client/hooks/use-reactive-prop.mjs +65 -223
- package/dist/client/hooks/use-realtime-highlight.mjs +51 -114
- package/dist/client/hooks/use-saved-views.mjs +22 -103
- package/dist/client/hooks/use-search-param-toggle.mjs +28 -79
- package/dist/client/hooks/use-search.mjs +31 -143
- package/dist/client/hooks/use-server-actions.mjs +18 -50
- package/dist/client/hooks/use-server-validation.mjs +72 -166
- package/dist/client/hooks/use-server-widget-data.mjs +7 -33
- package/dist/client/hooks/use-setup-status.mjs +12 -25
- package/dist/client/hooks/use-sidebar-search-param.mjs +33 -78
- package/dist/client/hooks/use-transition-stage.mjs +8 -38
- package/dist/client/hooks/use-upload.mjs +54 -152
- package/dist/client/hooks/use-validation-error-map.mjs +6 -26
- package/dist/client/hooks/use-view-state.mjs +187 -437
- package/dist/client/i18n/hooks.mjs +65 -197
- package/dist/client/lib/render-profiler.mjs +14 -41
- package/dist/client/preview/block-scope-context.d.mts +2 -2
- package/dist/client/preview/block-scope-context.mjs +14 -36
- package/dist/client/preview/diff.mjs +110 -0
- package/dist/client/preview/preview-banner.mjs +42 -108
- package/dist/client/preview/preview-field.d.mts +4 -4
- package/dist/client/preview/preview-field.mjs +166 -409
- package/dist/client/preview/use-collection-preview.mjs +135 -201
- package/dist/client/runtime/content-locales-provider.mjs +31 -83
- package/dist/client/runtime/locale-scope.mjs +22 -63
- package/dist/client/runtime/provider.mjs +100 -255
- package/dist/client/runtime/translations-provider.mjs +41 -107
- package/dist/client/scope/picker.d.mts +2 -2
- package/dist/client/scope/picker.mjs +86 -321
- package/dist/client/scope/provider.d.mts +2 -2
- package/dist/client/scope/provider.mjs +8 -17
- package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
- package/dist/client/views/auth/accept-invite-form.mjs +121 -412
- package/dist/client/views/auth/auth-layout.d.mts +3 -3
- package/dist/client/views/auth/auth-layout.mjs +104 -284
- package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
- package/dist/client/views/auth/forgot-password-form.mjs +94 -325
- package/dist/client/views/auth/invite-form.mjs +107 -442
- package/dist/client/views/auth/login-form.d.mts +2 -2
- package/dist/client/views/auth/login-form.mjs +116 -337
- package/dist/client/views/auth/reset-password-form.mjs +128 -453
- package/dist/client/views/auth/setup-form.mjs +140 -478
- package/dist/client/views/collection/auto-form-fields.mjs +243 -615
- package/dist/client/views/collection/bulk-action-toolbar.mjs +212 -400
- package/dist/client/views/collection/cells/complex-cells.mjs +183 -611
- package/dist/client/views/collection/cells/primitive-cells.mjs +109 -363
- package/dist/client/views/collection/cells/relation-cells.mjs +86 -233
- package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +142 -371
- package/dist/client/views/collection/cells/shared/relation-chip.mjs +35 -131
- package/dist/client/views/collection/cells/upload-cells.mjs +60 -177
- package/dist/client/views/collection/columns/build-columns.mjs +8 -48
- package/dist/client/views/collection/field-renderer.mjs +11 -24
- package/dist/client/views/collection/form-view.mjs +288 -560
- package/dist/client/views/collection/table-view.mjs +239 -469
- package/dist/client/views/collection/view-skeletons.mjs +112 -237
- package/dist/client/views/common/global-search.mjs +241 -543
- package/dist/client/views/dashboard/dashboard-grid.mjs +256 -775
- package/dist/client/views/dashboard/dashboard-widget.mjs +38 -126
- package/dist/client/views/dashboard/widget-card.mjs +61 -269
- package/dist/client/views/globals/global-form-view.mjs +478 -1298
- package/dist/client/views/layout/admin-layout-provider.mjs +28 -88
- package/dist/client/views/layout/admin-layout.mjs +83 -246
- package/dist/client/views/layout/admin-router.mjs +457 -1289
- package/dist/client/views/layout/admin-sidebar.mjs +510 -1292
- package/dist/client/views/layout/admin-theme.mjs +30 -64
- package/dist/client/views/layout/admin-view-layout.mjs +40 -144
- package/dist/client/views/pages/accept-invite-page.mjs +95 -290
- package/dist/client/views/pages/dashboard-page.mjs +11 -57
- package/dist/client/views/pages/forgot-password-page.mjs +31 -83
- package/dist/client/views/pages/invite-page.mjs +35 -90
- package/dist/client/views/pages/login-page.mjs +41 -121
- package/dist/client/views/pages/reset-password-page.d.mts +2 -2
- package/dist/client/views/pages/reset-password-page.mjs +46 -173
- package/dist/client/views/pages/setup-page.d.mts +2 -2
- package/dist/client/views/pages/setup-page.mjs +33 -95
- package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
- package/dist/components/rich-text/rich-text-renderer.mjs +9 -33
- package/dist/server/modules/admin/collections/account.d.mts +50 -50
- package/dist/server/modules/admin/collections/admin-locks.d.mts +54 -54
- package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
- package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
- package/dist/server/modules/admin/collections/apikey.d.mts +68 -68
- package/dist/server/modules/admin/collections/assets.d.mts +34 -34
- package/dist/server/modules/admin/collections/session.d.mts +42 -42
- package/dist/server/modules/admin/collections/user.d.mts +53 -53
- package/dist/server/modules/admin/collections/verification.d.mts +36 -36
- package/dist/server/modules/admin/index.d.mts +21 -20
- package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
- package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
- package/dist/server/modules/admin/routes/locales.d.mts +2 -2
- package/dist/server/modules/admin/routes/preview.d.mts +11 -11
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/setup.d.mts +7 -7
- package/dist/server/modules/admin/routes/translations.d.mts +4 -4
- package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +27 -27
- package/package.json +3 -5
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { useResolveText } from "../../i18n/hooks.mjs";
|
|
4
4
|
import { cn } from "../../lib/utils.mjs";
|
|
5
|
-
import { c } from "react/compiler-runtime";
|
|
6
5
|
import { Icon } from "@iconify/react";
|
|
7
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
|
|
@@ -22,123 +21,50 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
22
21
|
* />
|
|
23
22
|
* ```
|
|
24
23
|
*/
|
|
25
|
-
function TimeInput(
|
|
26
|
-
const $ = c(29);
|
|
27
|
-
const { value, onChange, precision: t1, placeholder: t2, disabled, className, id, "aria-invalid": ariaInvalid } = t0;
|
|
28
|
-
const precision = t1 === void 0 ? "minute" : t1;
|
|
29
|
-
const placeholder = t2 === void 0 ? "Select time" : t2;
|
|
24
|
+
function TimeInput({ value, onChange, precision = "minute", placeholder = "Select time", disabled, className, id, "aria-invalid": ariaInvalid }) {
|
|
30
25
|
const resolveText = useResolveText();
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if ($[9] !== placeholder || $[10] !== resolveText) {
|
|
74
|
-
t11 = resolveText(placeholder);
|
|
75
|
-
$[9] = placeholder;
|
|
76
|
-
$[10] = resolveText;
|
|
77
|
-
$[11] = t11;
|
|
78
|
-
} else t11 = $[11];
|
|
79
|
-
let t12;
|
|
80
|
-
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
81
|
-
t12 = cn("flex-1 bg-transparent outline-none", "placeholder:text-muted-foreground", "disabled:cursor-not-allowed", "[&::-webkit-calendar-picker-indicator]:hidden");
|
|
82
|
-
$[12] = t12;
|
|
83
|
-
} else t12 = $[12];
|
|
84
|
-
let t13;
|
|
85
|
-
if ($[13] !== ariaInvalid || $[14] !== disabled || $[15] !== handleChange || $[16] !== id || $[17] !== t10 || $[18] !== t11 || $[19] !== t9) {
|
|
86
|
-
t13 = /* @__PURE__ */ jsx("input", {
|
|
87
|
-
type: "time",
|
|
88
|
-
id,
|
|
89
|
-
value: t9,
|
|
90
|
-
onChange: handleChange,
|
|
91
|
-
step: t10,
|
|
92
|
-
disabled,
|
|
93
|
-
"aria-invalid": ariaInvalid,
|
|
94
|
-
placeholder: t11,
|
|
95
|
-
className: t12
|
|
96
|
-
});
|
|
97
|
-
$[13] = ariaInvalid;
|
|
98
|
-
$[14] = disabled;
|
|
99
|
-
$[15] = handleChange;
|
|
100
|
-
$[16] = id;
|
|
101
|
-
$[17] = t10;
|
|
102
|
-
$[18] = t11;
|
|
103
|
-
$[19] = t9;
|
|
104
|
-
$[20] = t13;
|
|
105
|
-
} else t13 = $[20];
|
|
106
|
-
let t14;
|
|
107
|
-
if ($[21] !== disabled || $[22] !== handleClear || $[23] !== value) {
|
|
108
|
-
t14 = value && !disabled && /* @__PURE__ */ jsx("button", {
|
|
109
|
-
type: "button",
|
|
110
|
-
onClick: handleClear,
|
|
111
|
-
className: "text-muted-foreground hover:text-foreground",
|
|
112
|
-
tabIndex: -1,
|
|
113
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
114
|
-
icon: "ph:x",
|
|
115
|
-
className: "size-4"
|
|
116
|
-
})
|
|
117
|
-
});
|
|
118
|
-
$[21] = disabled;
|
|
119
|
-
$[22] = handleClear;
|
|
120
|
-
$[23] = value;
|
|
121
|
-
$[24] = t14;
|
|
122
|
-
} else t14 = $[24];
|
|
123
|
-
let t15;
|
|
124
|
-
if ($[25] !== t13 || $[26] !== t14 || $[27] !== t7) {
|
|
125
|
-
t15 = /* @__PURE__ */ jsx("div", {
|
|
126
|
-
className: "qa-time-input relative",
|
|
127
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
128
|
-
className: t7,
|
|
129
|
-
children: [
|
|
130
|
-
t8,
|
|
131
|
-
t13,
|
|
132
|
-
t14
|
|
133
|
-
]
|
|
134
|
-
})
|
|
135
|
-
});
|
|
136
|
-
$[25] = t13;
|
|
137
|
-
$[26] = t14;
|
|
138
|
-
$[27] = t7;
|
|
139
|
-
$[28] = t15;
|
|
140
|
-
} else t15 = $[28];
|
|
141
|
-
return t15;
|
|
26
|
+
const handleChange = (e) => {
|
|
27
|
+
const timeValue = e.target.value;
|
|
28
|
+
onChange(timeValue || null);
|
|
29
|
+
};
|
|
30
|
+
const handleClear = (e) => {
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
e.stopPropagation();
|
|
33
|
+
onChange(null);
|
|
34
|
+
};
|
|
35
|
+
return /* @__PURE__ */ jsx("div", {
|
|
36
|
+
className: "qa-time-input relative",
|
|
37
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
38
|
+
className: cn("control-surface font-chrome flex w-full items-center gap-2 px-3 py-2 text-sm", "focus-within:border-border-strong focus-within:ring-ring/20 focus-within:ring-3", disabled && "cursor-not-allowed opacity-50", ariaInvalid && "border-border-strong", className),
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
41
|
+
icon: "ph:clock",
|
|
42
|
+
className: "text-muted-foreground size-4"
|
|
43
|
+
}),
|
|
44
|
+
/* @__PURE__ */ jsx("input", {
|
|
45
|
+
type: "time",
|
|
46
|
+
id,
|
|
47
|
+
value: value ?? "",
|
|
48
|
+
onChange: handleChange,
|
|
49
|
+
step: precision === "second" ? 1 : 60,
|
|
50
|
+
disabled,
|
|
51
|
+
"aria-invalid": ariaInvalid,
|
|
52
|
+
placeholder: resolveText(placeholder),
|
|
53
|
+
className: cn("flex-1 bg-transparent outline-none", "placeholder:text-muted-foreground", "disabled:cursor-not-allowed", "[&::-webkit-calendar-picker-indicator]:hidden")
|
|
54
|
+
}),
|
|
55
|
+
value && !disabled && /* @__PURE__ */ jsx("button", {
|
|
56
|
+
type: "button",
|
|
57
|
+
onClick: handleClear,
|
|
58
|
+
className: "text-muted-foreground hover:text-foreground",
|
|
59
|
+
tabIndex: -1,
|
|
60
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
61
|
+
icon: "ph:x",
|
|
62
|
+
className: "size-4"
|
|
63
|
+
})
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
})
|
|
67
|
+
});
|
|
142
68
|
}
|
|
143
69
|
|
|
144
70
|
//#endregion
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { cn } from "../../lib/utils.mjs";
|
|
2
2
|
import { Switch } from "../ui/switch.mjs";
|
|
3
|
-
import { c } from "react/compiler-runtime";
|
|
4
3
|
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
|
|
6
5
|
//#region src/client/components/primitives/toggle-input.tsx
|
|
@@ -17,34 +16,15 @@ import { jsx } from "react/jsx-runtime";
|
|
|
17
16
|
* />
|
|
18
17
|
* ```
|
|
19
18
|
*/
|
|
20
|
-
function ToggleInput(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
let t2;
|
|
30
|
-
if ($[2] !== ariaInvalid || $[3] !== disabled || $[4] !== id || $[5] !== onChange || $[6] !== t1 || $[7] !== value) {
|
|
31
|
-
t2 = /* @__PURE__ */ jsx(Switch, {
|
|
32
|
-
id,
|
|
33
|
-
checked: value,
|
|
34
|
-
onCheckedChange: onChange,
|
|
35
|
-
disabled,
|
|
36
|
-
"aria-invalid": ariaInvalid,
|
|
37
|
-
className: t1
|
|
38
|
-
});
|
|
39
|
-
$[2] = ariaInvalid;
|
|
40
|
-
$[3] = disabled;
|
|
41
|
-
$[4] = id;
|
|
42
|
-
$[5] = onChange;
|
|
43
|
-
$[6] = t1;
|
|
44
|
-
$[7] = value;
|
|
45
|
-
$[8] = t2;
|
|
46
|
-
} else t2 = $[8];
|
|
47
|
-
return t2;
|
|
19
|
+
function ToggleInput({ value, onChange, disabled, className, id, "aria-invalid": ariaInvalid }) {
|
|
20
|
+
return /* @__PURE__ */ jsx(Switch, {
|
|
21
|
+
id,
|
|
22
|
+
checked: value,
|
|
23
|
+
onCheckedChange: onChange,
|
|
24
|
+
disabled,
|
|
25
|
+
"aria-invalid": ariaInvalid,
|
|
26
|
+
className: cn("qa-toggle-input", className)
|
|
27
|
+
});
|
|
48
28
|
}
|
|
49
29
|
|
|
50
30
|
//#endregion
|
|
@@ -3,85 +3,76 @@ import { LocaleScopeProvider } from "../../runtime/locale-scope.mjs";
|
|
|
3
3
|
import { Sheet, SheetContent } from "../ui/sheet.mjs";
|
|
4
4
|
import FormView from "../../views/collection/form-view.mjs";
|
|
5
5
|
import GlobalFormView from "../../views/globals/global-form-view.mjs";
|
|
6
|
-
import
|
|
7
|
-
import "react";
|
|
6
|
+
import * as React from "react";
|
|
8
7
|
import { jsx } from "react/jsx-runtime";
|
|
9
8
|
|
|
10
9
|
//#region src/client/components/sheets/resource-sheet.tsx
|
|
10
|
+
/**
|
|
11
|
+
* ResourceSheet Component
|
|
12
|
+
*
|
|
13
|
+
* Universal sheet component for viewing/editing collections and globals.
|
|
14
|
+
* Uses FormView/GlobalFormView internally for consistent UI and behavior.
|
|
15
|
+
* Container queries provide automatic responsive layout.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* // Collection usage
|
|
20
|
+
* <ResourceSheet
|
|
21
|
+
* type="collection"
|
|
22
|
+
* collection="posts"
|
|
23
|
+
* itemId="123"
|
|
24
|
+
* open={isOpen}
|
|
25
|
+
* onOpenChange={setIsOpen}
|
|
26
|
+
* onSave={(data) => console.log('Saved:', data)}
|
|
27
|
+
* />
|
|
28
|
+
*
|
|
29
|
+
* // Global usage
|
|
30
|
+
* <ResourceSheet
|
|
31
|
+
* type="global"
|
|
32
|
+
* global="siteSettings"
|
|
33
|
+
* open={isOpen}
|
|
34
|
+
* onOpenChange={setIsOpen}
|
|
35
|
+
* onSave={(data) => console.log('Saved:', data)}
|
|
36
|
+
* />
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
11
39
|
function ResourceSheet(props) {
|
|
12
|
-
const
|
|
13
|
-
const { open, onOpenChange, onSave, side: t0 } = props;
|
|
14
|
-
const side = t0 === void 0 ? "right" : t0;
|
|
40
|
+
const { open, onOpenChange, onSave, side = "right" } = props;
|
|
15
41
|
const navigate = useAdminStore(selectNavigate);
|
|
16
42
|
const basePath = useAdminStore(selectBasePath);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
} else t1 = $[2];
|
|
27
|
-
const handleSuccess = t1;
|
|
28
|
-
let t2;
|
|
29
|
-
if ($[3] !== basePath || $[4] !== handleSuccess || $[5] !== navigate || $[6] !== props.collection || $[7] !== props.defaultValues || $[8] !== props.global || $[9] !== props.itemId || $[10] !== props.type) {
|
|
30
|
-
t2 = /* @__PURE__ */ jsx(LocaleScopeProvider, { children: props.type === "collection" ? /* @__PURE__ */ jsx(FormView, {
|
|
31
|
-
collection: props.collection,
|
|
32
|
-
id: props.itemId,
|
|
33
|
-
defaultValues: props.defaultValues,
|
|
34
|
-
config: void 0,
|
|
35
|
-
allCollectionsConfig: void 0,
|
|
36
|
-
navigate,
|
|
37
|
-
basePath,
|
|
38
|
-
onSuccess: handleSuccess,
|
|
39
|
-
showMeta: false
|
|
40
|
-
}) : /* @__PURE__ */ jsx(GlobalFormView, {
|
|
41
|
-
global: props.global,
|
|
42
|
-
config: void 0,
|
|
43
|
-
allGlobalsConfig: void 0,
|
|
44
|
-
navigate,
|
|
45
|
-
basePath,
|
|
46
|
-
onSuccess: handleSuccess,
|
|
47
|
-
showMeta: false
|
|
48
|
-
}) });
|
|
49
|
-
$[3] = basePath;
|
|
50
|
-
$[4] = handleSuccess;
|
|
51
|
-
$[5] = navigate;
|
|
52
|
-
$[6] = props.collection;
|
|
53
|
-
$[7] = props.defaultValues;
|
|
54
|
-
$[8] = props.global;
|
|
55
|
-
$[9] = props.itemId;
|
|
56
|
-
$[10] = props.type;
|
|
57
|
-
$[11] = t2;
|
|
58
|
-
} else t2 = $[11];
|
|
59
|
-
let t3;
|
|
60
|
-
if ($[12] !== side || $[13] !== t2) {
|
|
61
|
-
t3 = /* @__PURE__ */ jsx(SheetContent, {
|
|
43
|
+
const handleSuccess = React.useCallback((data) => {
|
|
44
|
+
onSave?.(data);
|
|
45
|
+
onOpenChange(false);
|
|
46
|
+
}, [onSave, onOpenChange]);
|
|
47
|
+
return /* @__PURE__ */ jsx(Sheet, {
|
|
48
|
+
open,
|
|
49
|
+
onOpenChange,
|
|
50
|
+
modal: false,
|
|
51
|
+
children: /* @__PURE__ */ jsx(SheetContent, {
|
|
62
52
|
side,
|
|
63
53
|
showOverlay: false,
|
|
64
54
|
className: "qa-resource-sheet overflow-y-auto p-6 pt-12",
|
|
65
|
-
children:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
55
|
+
children: /* @__PURE__ */ jsx(LocaleScopeProvider, { children: props.type === "collection" ? /* @__PURE__ */ jsx(FormView, {
|
|
56
|
+
collection: props.collection,
|
|
57
|
+
id: props.itemId,
|
|
58
|
+
defaultValues: props.defaultValues,
|
|
59
|
+
config: void 0,
|
|
60
|
+
allCollectionsConfig: void 0,
|
|
61
|
+
navigate,
|
|
62
|
+
basePath,
|
|
63
|
+
onSuccess: handleSuccess,
|
|
64
|
+
showMeta: false
|
|
65
|
+
}) : /* @__PURE__ */ jsx(GlobalFormView, {
|
|
66
|
+
global: props.global,
|
|
67
|
+
config: void 0,
|
|
68
|
+
allGlobalsConfig: void 0,
|
|
69
|
+
navigate,
|
|
70
|
+
basePath,
|
|
71
|
+
onSuccess: handleSuccess,
|
|
72
|
+
showMeta: false
|
|
73
|
+
}) })
|
|
74
|
+
})
|
|
75
|
+
});
|
|
85
76
|
}
|
|
86
77
|
|
|
87
78
|
//#endregion
|
|
@@ -1,168 +1,48 @@
|
|
|
1
1
|
import { cn } from "../../lib/utils.mjs";
|
|
2
|
-
import { c } from "react/compiler-runtime";
|
|
3
2
|
import { Icon } from "@iconify/react";
|
|
4
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { Accordion } from "@base-ui/react/accordion";
|
|
6
5
|
|
|
7
6
|
//#region src/client/components/ui/accordion.tsx
|
|
8
|
-
function Accordion$1(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
$[0] = t0;
|
|
15
|
-
$[1] = className;
|
|
16
|
-
$[2] = props;
|
|
17
|
-
} else {
|
|
18
|
-
className = $[1];
|
|
19
|
-
props = $[2];
|
|
20
|
-
}
|
|
21
|
-
let t1;
|
|
22
|
-
if ($[3] !== className) {
|
|
23
|
-
t1 = cn("qa-accordion border-border bg-card flex w-full flex-col overflow-hidden border", className);
|
|
24
|
-
$[3] = className;
|
|
25
|
-
$[4] = t1;
|
|
26
|
-
} else t1 = $[4];
|
|
27
|
-
let t2;
|
|
28
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
29
|
-
t2 = /* @__PURE__ */ jsx(Accordion.Root, {
|
|
30
|
-
"data-slot": "accordion",
|
|
31
|
-
className: t1,
|
|
32
|
-
...props
|
|
33
|
-
});
|
|
34
|
-
$[5] = props;
|
|
35
|
-
$[6] = t1;
|
|
36
|
-
$[7] = t2;
|
|
37
|
-
} else t2 = $[7];
|
|
38
|
-
return t2;
|
|
7
|
+
function Accordion$1({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Accordion.Root, {
|
|
9
|
+
"data-slot": "accordion",
|
|
10
|
+
className: cn("qa-accordion border-border bg-card flex w-full flex-col overflow-hidden border", className),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
39
13
|
}
|
|
40
|
-
function AccordionItem(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
$[0] = t0;
|
|
47
|
-
$[1] = className;
|
|
48
|
-
$[2] = props;
|
|
49
|
-
} else {
|
|
50
|
-
className = $[1];
|
|
51
|
-
props = $[2];
|
|
52
|
-
}
|
|
53
|
-
let t1;
|
|
54
|
-
if ($[3] !== className) {
|
|
55
|
-
t1 = cn("qa-accordion__item data-open:bg-muted border-border transition-colors not-last:border-b", className);
|
|
56
|
-
$[3] = className;
|
|
57
|
-
$[4] = t1;
|
|
58
|
-
} else t1 = $[4];
|
|
59
|
-
let t2;
|
|
60
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
61
|
-
t2 = /* @__PURE__ */ jsx(Accordion.Item, {
|
|
62
|
-
"data-slot": "accordion-item",
|
|
63
|
-
className: t1,
|
|
64
|
-
...props
|
|
65
|
-
});
|
|
66
|
-
$[5] = props;
|
|
67
|
-
$[6] = t1;
|
|
68
|
-
$[7] = t2;
|
|
69
|
-
} else t2 = $[7];
|
|
70
|
-
return t2;
|
|
14
|
+
function AccordionItem({ className, ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(Accordion.Item, {
|
|
16
|
+
"data-slot": "accordion-item",
|
|
17
|
+
className: cn("qa-accordion__item data-open:bg-muted border-border transition-colors not-last:border-b", className),
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
71
20
|
}
|
|
72
|
-
function AccordionTrigger(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
props = $[3];
|
|
87
|
-
}
|
|
88
|
-
let t1;
|
|
89
|
-
if ($[4] !== className) {
|
|
90
|
-
t1 = cn("qa-accordion__trigger **:data-[slot=accordion-trigger-icon]:text-muted-foreground hover:bg-muted group/accordion-trigger relative flex min-h-10 flex-1 items-center justify-between gap-4 px-4 py-3 text-left text-sm font-medium transition-[background-color,color,transform] duration-[var(--motion-duration-base)] ease-[var(--motion-ease-standard)] outline-none active:scale-[0.96] disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 motion-reduce:transition-none motion-reduce:active:scale-100", className);
|
|
91
|
-
$[4] = className;
|
|
92
|
-
$[5] = t1;
|
|
93
|
-
} else t1 = $[5];
|
|
94
|
-
let t2;
|
|
95
|
-
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
96
|
-
t2 = /* @__PURE__ */ jsx(Icon, {
|
|
97
|
-
icon: "ph:caret-down",
|
|
98
|
-
"data-slot": "accordion-trigger-icon",
|
|
99
|
-
className: "pointer-events-none shrink-0 transition-transform duration-[var(--motion-duration-base)] ease-[var(--motion-ease-standard)] group-aria-expanded/accordion-trigger:rotate-180 motion-reduce:transition-none"
|
|
100
|
-
});
|
|
101
|
-
$[6] = t2;
|
|
102
|
-
} else t2 = $[6];
|
|
103
|
-
let t3;
|
|
104
|
-
if ($[7] !== children || $[8] !== props || $[9] !== t1) {
|
|
105
|
-
t3 = /* @__PURE__ */ jsx(Accordion.Header, {
|
|
106
|
-
className: "flex",
|
|
107
|
-
children: /* @__PURE__ */ jsxs(Accordion.Trigger, {
|
|
108
|
-
"data-slot": "accordion-trigger",
|
|
109
|
-
className: t1,
|
|
110
|
-
...props,
|
|
111
|
-
children: [children, t2]
|
|
112
|
-
})
|
|
113
|
-
});
|
|
114
|
-
$[7] = children;
|
|
115
|
-
$[8] = props;
|
|
116
|
-
$[9] = t1;
|
|
117
|
-
$[10] = t3;
|
|
118
|
-
} else t3 = $[10];
|
|
119
|
-
return t3;
|
|
21
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(Accordion.Header, {
|
|
23
|
+
className: "flex",
|
|
24
|
+
children: /* @__PURE__ */ jsxs(Accordion.Trigger, {
|
|
25
|
+
"data-slot": "accordion-trigger",
|
|
26
|
+
className: cn("qa-accordion__trigger **:data-[slot=accordion-trigger-icon]:text-muted-foreground hover:bg-muted group/accordion-trigger relative flex min-h-10 flex-1 items-center justify-between gap-4 px-4 py-3 text-left text-sm font-medium transition-[background-color,color,transform] duration-[var(--motion-duration-base)] ease-[var(--motion-ease-standard)] outline-none active:scale-[0.96] disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 motion-reduce:transition-none motion-reduce:active:scale-100", className),
|
|
27
|
+
...props,
|
|
28
|
+
children: [children, /* @__PURE__ */ jsx(Icon, {
|
|
29
|
+
icon: "ph:caret-down",
|
|
30
|
+
"data-slot": "accordion-trigger-icon",
|
|
31
|
+
className: "pointer-events-none shrink-0 transition-transform duration-[var(--motion-duration-base)] ease-[var(--motion-ease-standard)] group-aria-expanded/accordion-trigger:rotate-180 motion-reduce:transition-none"
|
|
32
|
+
})]
|
|
33
|
+
})
|
|
34
|
+
});
|
|
120
35
|
}
|
|
121
|
-
function AccordionContent(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
$[0] = t0;
|
|
129
|
-
$[1] = children;
|
|
130
|
-
$[2] = className;
|
|
131
|
-
$[3] = props;
|
|
132
|
-
} else {
|
|
133
|
-
children = $[1];
|
|
134
|
-
className = $[2];
|
|
135
|
-
props = $[3];
|
|
136
|
-
}
|
|
137
|
-
let t1;
|
|
138
|
-
if ($[4] !== className) {
|
|
139
|
-
t1 = cn("[&_a]:hover:text-foreground h-(--accordion-panel-height) px-4 pt-0 pb-4 text-sm opacity-100 transition-[height,opacity] duration-[var(--motion-duration-slow)] ease-[var(--motion-ease-enter)] data-ending-style:h-0 data-ending-style:opacity-0 data-starting-style:h-0 data-starting-style:opacity-0 motion-reduce:transition-none [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4", className);
|
|
140
|
-
$[4] = className;
|
|
141
|
-
$[5] = t1;
|
|
142
|
-
} else t1 = $[5];
|
|
143
|
-
let t2;
|
|
144
|
-
if ($[6] !== children || $[7] !== t1) {
|
|
145
|
-
t2 = /* @__PURE__ */ jsx("div", {
|
|
146
|
-
className: t1,
|
|
36
|
+
function AccordionContent({ className, children, ...props }) {
|
|
37
|
+
return /* @__PURE__ */ jsx(Accordion.Panel, {
|
|
38
|
+
"data-slot": "accordion-content",
|
|
39
|
+
className: "qa-accordion__content overflow-hidden",
|
|
40
|
+
...props,
|
|
41
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
42
|
+
className: cn("[&_a]:hover:text-foreground h-(--accordion-panel-height) px-4 pt-0 pb-4 text-sm opacity-100 transition-[height,opacity] duration-[var(--motion-duration-slow)] ease-[var(--motion-ease-enter)] data-ending-style:h-0 data-ending-style:opacity-0 data-starting-style:h-0 data-starting-style:opacity-0 motion-reduce:transition-none [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4", className),
|
|
147
43
|
children
|
|
148
|
-
})
|
|
149
|
-
|
|
150
|
-
$[7] = t1;
|
|
151
|
-
$[8] = t2;
|
|
152
|
-
} else t2 = $[8];
|
|
153
|
-
let t3;
|
|
154
|
-
if ($[9] !== props || $[10] !== t2) {
|
|
155
|
-
t3 = /* @__PURE__ */ jsx(Accordion.Panel, {
|
|
156
|
-
"data-slot": "accordion-content",
|
|
157
|
-
className: "qa-accordion__content overflow-hidden",
|
|
158
|
-
...props,
|
|
159
|
-
children: t2
|
|
160
|
-
});
|
|
161
|
-
$[9] = props;
|
|
162
|
-
$[10] = t2;
|
|
163
|
-
$[11] = t3;
|
|
164
|
-
} else t3 = $[11];
|
|
165
|
-
return t3;
|
|
44
|
+
})
|
|
45
|
+
});
|
|
166
46
|
}
|
|
167
47
|
|
|
168
48
|
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { cn } from "../../lib/utils.mjs";
|
|
2
|
-
import { c } from "react/compiler-runtime";
|
|
3
2
|
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { cva } from "class-variance-authority";
|
|
5
4
|
|
|
@@ -11,74 +10,20 @@ const alertVariants = cva("qa-alert group/alert border-border-subtle bg-card tex
|
|
|
11
10
|
} },
|
|
12
11
|
defaultVariants: { variant: "default" }
|
|
13
12
|
});
|
|
14
|
-
function Alert(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
$[0] = t0;
|
|
22
|
-
$[1] = className;
|
|
23
|
-
$[2] = props;
|
|
24
|
-
$[3] = variant;
|
|
25
|
-
} else {
|
|
26
|
-
className = $[1];
|
|
27
|
-
props = $[2];
|
|
28
|
-
variant = $[3];
|
|
29
|
-
}
|
|
30
|
-
let t1;
|
|
31
|
-
if ($[4] !== className || $[5] !== variant) {
|
|
32
|
-
t1 = cn(alertVariants({ variant }), className);
|
|
33
|
-
$[4] = className;
|
|
34
|
-
$[5] = variant;
|
|
35
|
-
$[6] = t1;
|
|
36
|
-
} else t1 = $[6];
|
|
37
|
-
let t2;
|
|
38
|
-
if ($[7] !== props || $[8] !== t1) {
|
|
39
|
-
t2 = /* @__PURE__ */ jsx("div", {
|
|
40
|
-
"data-slot": "alert",
|
|
41
|
-
role: "alert",
|
|
42
|
-
className: t1,
|
|
43
|
-
...props
|
|
44
|
-
});
|
|
45
|
-
$[7] = props;
|
|
46
|
-
$[8] = t1;
|
|
47
|
-
$[9] = t2;
|
|
48
|
-
} else t2 = $[9];
|
|
49
|
-
return t2;
|
|
13
|
+
function Alert({ className, variant, ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx("div", {
|
|
15
|
+
"data-slot": "alert",
|
|
16
|
+
role: "alert",
|
|
17
|
+
className: cn(alertVariants({ variant }), className),
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
50
20
|
}
|
|
51
|
-
function AlertDescription(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
$[0] = t0;
|
|
58
|
-
$[1] = className;
|
|
59
|
-
$[2] = props;
|
|
60
|
-
} else {
|
|
61
|
-
className = $[1];
|
|
62
|
-
props = $[2];
|
|
63
|
-
}
|
|
64
|
-
let t1;
|
|
65
|
-
if ($[3] !== className) {
|
|
66
|
-
t1 = cn("qa-alert__description text-muted-foreground [&_a]:hover:text-foreground text-xs/relaxed text-balance md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4", className);
|
|
67
|
-
$[3] = className;
|
|
68
|
-
$[4] = t1;
|
|
69
|
-
} else t1 = $[4];
|
|
70
|
-
let t2;
|
|
71
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
72
|
-
t2 = /* @__PURE__ */ jsx("div", {
|
|
73
|
-
"data-slot": "alert-description",
|
|
74
|
-
className: t1,
|
|
75
|
-
...props
|
|
76
|
-
});
|
|
77
|
-
$[5] = props;
|
|
78
|
-
$[6] = t1;
|
|
79
|
-
$[7] = t2;
|
|
80
|
-
} else t2 = $[7];
|
|
81
|
-
return t2;
|
|
21
|
+
function AlertDescription({ className, ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx("div", {
|
|
23
|
+
"data-slot": "alert-description",
|
|
24
|
+
className: cn("qa-alert__description text-muted-foreground [&_a]:hover:text-foreground text-xs/relaxed text-balance md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4", className),
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
82
27
|
}
|
|
83
28
|
|
|
84
29
|
//#endregion
|