@rebasepro/core 0.6.0 → 0.6.1
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/index.es.js +215 -345
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +214 -344
- package/dist/index.umd.js.map +1 -1
- package/package.json +6 -6
- package/src/components/Debug/UIReferenceView.tsx +109 -201
- package/src/components/LoginView/LoginView.tsx +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -2964,70 +2964,79 @@
|
|
|
2964
2964
|
var SECTIONS = [
|
|
2965
2965
|
{
|
|
2966
2966
|
id: "drawer",
|
|
2967
|
-
label: "Drawer"
|
|
2967
|
+
label: "Drawer",
|
|
2968
|
+
icon: _rebasepro_ui.PanelLeftIcon
|
|
2968
2969
|
},
|
|
2969
2970
|
{
|
|
2970
2971
|
id: "appbar",
|
|
2971
|
-
label: "App Bar"
|
|
2972
|
+
label: "App Bar",
|
|
2973
|
+
icon: _rebasepro_ui.AppWindow
|
|
2972
2974
|
},
|
|
2973
2975
|
{
|
|
2974
2976
|
id: "tabs",
|
|
2975
|
-
label: "Tabs"
|
|
2977
|
+
label: "Tabs",
|
|
2978
|
+
icon: _rebasepro_ui.ListIcon
|
|
2976
2979
|
},
|
|
2977
2980
|
{
|
|
2978
2981
|
id: "editor-sidebar",
|
|
2979
|
-
label: "Editor Sidebar"
|
|
2982
|
+
label: "Editor Sidebar",
|
|
2983
|
+
icon: _rebasepro_ui.ColumnsIcon
|
|
2980
2984
|
},
|
|
2981
2985
|
{
|
|
2982
2986
|
id: "empty-states",
|
|
2983
|
-
label: "Empty States"
|
|
2987
|
+
label: "Empty States",
|
|
2988
|
+
icon: _rebasepro_ui.FileIcon
|
|
2984
2989
|
},
|
|
2985
2990
|
{
|
|
2986
2991
|
id: "typography",
|
|
2987
|
-
label: "Typography"
|
|
2992
|
+
label: "Typography",
|
|
2993
|
+
icon: _rebasepro_ui.TypeIcon
|
|
2988
2994
|
},
|
|
2989
2995
|
{
|
|
2990
2996
|
id: "buttons",
|
|
2991
|
-
label: "Buttons"
|
|
2997
|
+
label: "Buttons",
|
|
2998
|
+
icon: _rebasepro_ui.PlusIcon
|
|
2992
2999
|
},
|
|
2993
3000
|
{
|
|
2994
3001
|
id: "inputs",
|
|
2995
|
-
label: "Form Inputs"
|
|
3002
|
+
label: "Form Inputs",
|
|
3003
|
+
icon: _rebasepro_ui.FileTextIcon
|
|
2996
3004
|
},
|
|
2997
3005
|
{
|
|
2998
3006
|
id: "chips-alerts",
|
|
2999
|
-
label: "Chips & Alerts"
|
|
3007
|
+
label: "Chips & Alerts",
|
|
3008
|
+
icon: _rebasepro_ui.AlertCircleIcon
|
|
3000
3009
|
},
|
|
3001
3010
|
{
|
|
3002
3011
|
id: "users",
|
|
3003
|
-
label: "Users View"
|
|
3012
|
+
label: "Users View",
|
|
3013
|
+
icon: _rebasepro_ui.UserIcon
|
|
3004
3014
|
},
|
|
3005
3015
|
{
|
|
3006
3016
|
id: "user-dialog",
|
|
3007
|
-
label: "User Dialog"
|
|
3008
|
-
|
|
3009
|
-
{
|
|
3010
|
-
id: "roles",
|
|
3011
|
-
label: "Roles View"
|
|
3012
|
-
},
|
|
3013
|
-
{
|
|
3014
|
-
id: "role-dialog",
|
|
3015
|
-
label: "Role Dialog"
|
|
3017
|
+
label: "User Dialog",
|
|
3018
|
+
icon: _rebasepro_ui.CircleUserIcon
|
|
3016
3019
|
}
|
|
3017
3020
|
];
|
|
3018
3021
|
function UIReferenceView() {
|
|
3019
3022
|
const [activeSection, setActiveSection] = (0, react.useState)("drawer");
|
|
3023
|
+
const scrollContainerRef = react.default.useRef(null);
|
|
3020
3024
|
const scrollTo = (id) => {
|
|
3021
|
-
document.getElementById(id)
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
+
const el = document.getElementById(id);
|
|
3026
|
+
const container = scrollContainerRef.current;
|
|
3027
|
+
if (el && container) {
|
|
3028
|
+
const offsetTop = el.offsetTop - container.offsetTop;
|
|
3029
|
+
container.scrollTo({
|
|
3030
|
+
top: offsetTop,
|
|
3031
|
+
behavior: "smooth"
|
|
3032
|
+
});
|
|
3033
|
+
}
|
|
3025
3034
|
setActiveSection(id);
|
|
3026
3035
|
};
|
|
3027
3036
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3028
|
-
className: "flex
|
|
3037
|
+
className: "flex w-full",
|
|
3029
3038
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3030
|
-
className: (0, _rebasepro_ui.cls)("flex flex-col h-
|
|
3039
|
+
className: (0, _rebasepro_ui.cls)("flex flex-col sticky top-0 h-screen grow-0 shrink-0 w-[200px] border-r", _rebasepro_ui.defaultBorderMixin),
|
|
3031
3040
|
children: [
|
|
3032
3041
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3033
3042
|
className: "flex flex-row items-center shrink-0 pt-4 pb-2 px-2",
|
|
@@ -3061,17 +3070,20 @@
|
|
|
3061
3070
|
})]
|
|
3062
3071
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3063
3072
|
className: "overflow-hidden bg-surface-50 dark:bg-surface-950/30 rounded-b-lg",
|
|
3064
|
-
children: SECTIONS.map((s) =>
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
className: "
|
|
3069
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3073
|
+
children: SECTIONS.map((s) => {
|
|
3074
|
+
const IconComponent = s.icon;
|
|
3075
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3076
|
+
onClick: () => scrollTo(s.id),
|
|
3077
|
+
className: (0, _rebasepro_ui.cls)("rounded-lg truncate group/nav", "hover:bg-primary/5 dark:hover:bg-primary/5 text-text-primary dark:text-surface-200 hover:text-surface-900 dark:hover:text-white", "flex flex-row items-center", "pr-4 h-10", "font-medium text-xs cursor-pointer", activeSection === s.id ? "bg-primary/8 dark:bg-primary/10 text-primary dark:text-primary" : ""),
|
|
3078
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3079
|
+
className: (0, _rebasepro_ui.cls)("shrink-0 flex items-center justify-center w-[56px] h-[40px] text-surface-500 dark:text-text-secondary-dark transition-colors duration-150 group-hover/nav:text-primary", activeSection === s.id && "text-primary dark:text-primary"),
|
|
3080
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconComponent, { size: _rebasepro_ui.iconSize.small })
|
|
3081
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3082
|
+
className: "text-text-primary dark:text-surface-200 opacity-100 font-inherit truncate space-x-2",
|
|
3083
|
+
children: s.label.toUpperCase()
|
|
3084
|
+
})]
|
|
3085
|
+
}) }, s.id);
|
|
3086
|
+
})
|
|
3075
3087
|
})]
|
|
3076
3088
|
})
|
|
3077
3089
|
}),
|
|
@@ -3091,7 +3103,8 @@
|
|
|
3091
3103
|
})
|
|
3092
3104
|
]
|
|
3093
3105
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3094
|
-
|
|
3106
|
+
ref: scrollContainerRef,
|
|
3107
|
+
className: "flex-1",
|
|
3095
3108
|
children: [
|
|
3096
3109
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SectionBlock, {
|
|
3097
3110
|
id: "drawer",
|
|
@@ -3126,7 +3139,7 @@
|
|
|
3126
3139
|
className: "block mb-1",
|
|
3127
3140
|
children: "Collapsed (72px)"
|
|
3128
3141
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3129
|
-
className: (0, _rebasepro_ui.cls)("flex flex-col h-72 relative w-[72px] border rounded-lg overflow-hidden", _rebasepro_ui.defaultBorderMixin),
|
|
3142
|
+
className: (0, _rebasepro_ui.cls)("flex flex-col h-72 relative w-[72px] border rounded-lg overflow-hidden bg-white dark:bg-surface-900", _rebasepro_ui.defaultBorderMixin),
|
|
3130
3143
|
children: [
|
|
3131
3144
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3132
3145
|
className: "flex flex-row items-center shrink-0 pt-4 pb-2 px-2",
|
|
@@ -3149,7 +3162,7 @@
|
|
|
3149
3162
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.UserIcon, { size: _rebasepro_ui.iconSize.small }, "user"),
|
|
3150
3163
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.TagIcon, { size: _rebasepro_ui.iconSize.small }, "tag")
|
|
3151
3164
|
].map((icon, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3152
|
-
className: "rounded-lg truncate hover:bg-
|
|
3165
|
+
className: "rounded-lg truncate hover:bg-primary/5 dark:hover:bg-primary/5 flex flex-row items-center h-10",
|
|
3153
3166
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3154
3167
|
className: "shrink-0 flex items-center justify-center w-[56px] h-[40px] text-text-secondary dark:text-text-secondary-dark",
|
|
3155
3168
|
children: icon
|
|
@@ -3175,7 +3188,7 @@
|
|
|
3175
3188
|
className: "block mb-1",
|
|
3176
3189
|
children: "Expanded (280px)"
|
|
3177
3190
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3178
|
-
className: (0, _rebasepro_ui.cls)("flex flex-col h-72 relative w-[280px] border rounded-lg overflow-hidden", _rebasepro_ui.defaultBorderMixin),
|
|
3191
|
+
className: (0, _rebasepro_ui.cls)("flex flex-col h-72 relative w-[280px] border rounded-lg overflow-hidden bg-white dark:bg-surface-900", _rebasepro_ui.defaultBorderMixin),
|
|
3179
3192
|
children: [
|
|
3180
3193
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3181
3194
|
className: "flex flex-row items-center shrink-0 pt-4 pb-2 px-2",
|
|
@@ -3229,9 +3242,9 @@
|
|
|
3229
3242
|
active: false
|
|
3230
3243
|
}
|
|
3231
3244
|
].map(({ label, icon, active }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3232
|
-
className: (0, _rebasepro_ui.cls)("rounded-lg truncate hover:bg-
|
|
3245
|
+
className: (0, _rebasepro_ui.cls)("rounded-lg truncate hover:bg-primary/5 dark:hover:bg-primary/5 text-text-primary dark:text-surface-200 hover:text-surface-900 dark:hover:text-white flex flex-row items-center pr-4 h-10 font-medium text-xs cursor-pointer", active ? "bg-primary/8 dark:bg-primary/10 text-primary dark:text-primary" : ""),
|
|
3233
3246
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3234
|
-
className: "shrink-0 flex items-center justify-center w-[56px] h-[40px] text-text-
|
|
3247
|
+
className: (0, _rebasepro_ui.cls)("shrink-0 flex items-center justify-center w-[56px] h-[40px] transition-colors duration-150", active ? "text-primary dark:text-primary" : "text-surface-500 dark:text-text-secondary-dark"),
|
|
3235
3248
|
children: icon
|
|
3236
3249
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3237
3250
|
className: "text-text-primary dark:text-surface-200 font-inherit truncate",
|
|
@@ -3982,29 +3995,70 @@
|
|
|
3982
3995
|
variant: "caption",
|
|
3983
3996
|
color: "secondary",
|
|
3984
3997
|
className: "block mb-2 font-mono",
|
|
3985
|
-
children: "IconButton"
|
|
3998
|
+
children: "IconButton — sizes"
|
|
3986
3999
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3987
4000
|
className: "flex flex-wrap gap-3 items-center",
|
|
3988
4001
|
children: [
|
|
3989
4002
|
[
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4003
|
+
{
|
|
4004
|
+
s: "smallest",
|
|
4005
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.PencilIcon, { size: 14 })
|
|
4006
|
+
},
|
|
4007
|
+
{
|
|
4008
|
+
s: "small",
|
|
4009
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.PencilIcon, { size: 16 })
|
|
4010
|
+
},
|
|
4011
|
+
{
|
|
4012
|
+
s: "medium",
|
|
4013
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.PencilIcon, { size: 20 })
|
|
4014
|
+
},
|
|
4015
|
+
{
|
|
4016
|
+
s: "large",
|
|
4017
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.PencilIcon, { size: 24 })
|
|
4018
|
+
}
|
|
4019
|
+
].map(({ s, icon }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4020
|
+
className: "flex flex-col items-center gap-1",
|
|
4021
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.IconButton, {
|
|
4022
|
+
size: s,
|
|
4023
|
+
children: icon
|
|
4024
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Typography, {
|
|
4025
|
+
variant: "caption",
|
|
4026
|
+
color: "secondary",
|
|
4027
|
+
children: s
|
|
4028
|
+
})]
|
|
4004
4029
|
}, s)),
|
|
4005
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
4006
|
-
|
|
4007
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.
|
|
4030
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4031
|
+
className: "flex flex-col items-center gap-1",
|
|
4032
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.IconButton, {
|
|
4033
|
+
disabled: true,
|
|
4034
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Trash2Icon, { size: 20 })
|
|
4035
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Typography, {
|
|
4036
|
+
variant: "caption",
|
|
4037
|
+
color: "secondary",
|
|
4038
|
+
children: "disabled"
|
|
4039
|
+
})]
|
|
4040
|
+
}),
|
|
4041
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4042
|
+
className: "flex flex-col items-center gap-1",
|
|
4043
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.IconButton, {
|
|
4044
|
+
variant: "filled",
|
|
4045
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.PlusIcon, { size: 20 })
|
|
4046
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Typography, {
|
|
4047
|
+
variant: "caption",
|
|
4048
|
+
color: "secondary",
|
|
4049
|
+
children: "filled"
|
|
4050
|
+
})]
|
|
4051
|
+
}),
|
|
4052
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4053
|
+
className: "flex flex-col items-center gap-1",
|
|
4054
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.IconButton, {
|
|
4055
|
+
shape: "square",
|
|
4056
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.SettingsIcon, { size: 20 })
|
|
4057
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Typography, {
|
|
4058
|
+
variant: "caption",
|
|
4059
|
+
color: "secondary",
|
|
4060
|
+
children: "square"
|
|
4061
|
+
})]
|
|
4008
4062
|
})
|
|
4009
4063
|
]
|
|
4010
4064
|
})] }),
|
|
@@ -4209,42 +4263,123 @@
|
|
|
4209
4263
|
variant: "caption",
|
|
4210
4264
|
color: "secondary",
|
|
4211
4265
|
className: "block mb-2 font-mono",
|
|
4212
|
-
children: "Chip — colorScheme
|
|
4266
|
+
children: "Chip — colorScheme"
|
|
4213
4267
|
}),
|
|
4214
4268
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4215
4269
|
className: "flex flex-wrap gap-2 mb-4",
|
|
4216
4270
|
children: [
|
|
4217
|
-
"
|
|
4218
|
-
"
|
|
4219
|
-
"
|
|
4220
|
-
"
|
|
4221
|
-
"
|
|
4222
|
-
"
|
|
4223
|
-
"
|
|
4224
|
-
"
|
|
4225
|
-
"
|
|
4226
|
-
"
|
|
4227
|
-
"
|
|
4228
|
-
"
|
|
4229
|
-
"
|
|
4271
|
+
"blue",
|
|
4272
|
+
"teal",
|
|
4273
|
+
"red",
|
|
4274
|
+
"green",
|
|
4275
|
+
"yellow",
|
|
4276
|
+
"orange",
|
|
4277
|
+
"purple",
|
|
4278
|
+
"pink",
|
|
4279
|
+
"cyan",
|
|
4280
|
+
"indigo",
|
|
4281
|
+
"violet",
|
|
4282
|
+
"fuchsia",
|
|
4283
|
+
"rose",
|
|
4284
|
+
"emerald",
|
|
4285
|
+
"gray"
|
|
4230
4286
|
].map((s) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Chip, {
|
|
4231
4287
|
colorScheme: s,
|
|
4232
|
-
size: "small",
|
|
4233
4288
|
children: s
|
|
4234
4289
|
}, s))
|
|
4235
4290
|
}),
|
|
4291
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Typography, {
|
|
4292
|
+
variant: "caption",
|
|
4293
|
+
color: "secondary",
|
|
4294
|
+
className: "block mb-2 font-mono",
|
|
4295
|
+
children: "Chip — sizes"
|
|
4296
|
+
}),
|
|
4236
4297
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4237
|
-
className: "flex flex-wrap gap-2 mb-
|
|
4298
|
+
className: "flex flex-wrap gap-2 items-center mb-4",
|
|
4238
4299
|
children: [
|
|
4239
4300
|
"smallest",
|
|
4240
4301
|
"small",
|
|
4241
|
-
"medium"
|
|
4302
|
+
"medium",
|
|
4303
|
+
"large"
|
|
4242
4304
|
].map((sz) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Chip, {
|
|
4243
|
-
colorScheme: "
|
|
4305
|
+
colorScheme: "blue",
|
|
4244
4306
|
size: sz,
|
|
4245
4307
|
children: sz
|
|
4246
4308
|
}, sz))
|
|
4247
4309
|
}),
|
|
4310
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Typography, {
|
|
4311
|
+
variant: "caption",
|
|
4312
|
+
color: "secondary",
|
|
4313
|
+
className: "block mb-2 font-mono",
|
|
4314
|
+
children: "Chip — outlined, error, clickable, icon"
|
|
4315
|
+
}),
|
|
4316
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4317
|
+
className: "flex flex-wrap gap-2 items-center mb-4",
|
|
4318
|
+
children: [
|
|
4319
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Chip, {
|
|
4320
|
+
colorScheme: "red",
|
|
4321
|
+
outlined: true,
|
|
4322
|
+
children: "Outlined Red"
|
|
4323
|
+
}),
|
|
4324
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Chip, {
|
|
4325
|
+
colorScheme: "blue",
|
|
4326
|
+
outlined: true,
|
|
4327
|
+
children: "Outlined Blue"
|
|
4328
|
+
}),
|
|
4329
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Chip, {
|
|
4330
|
+
error: true,
|
|
4331
|
+
children: "Error"
|
|
4332
|
+
}),
|
|
4333
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Chip, {
|
|
4334
|
+
error: true,
|
|
4335
|
+
outlined: true,
|
|
4336
|
+
children: "Error Outlined"
|
|
4337
|
+
}),
|
|
4338
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Chip, {
|
|
4339
|
+
onClick: () => {},
|
|
4340
|
+
children: "Clickable"
|
|
4341
|
+
}),
|
|
4342
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Chip, {
|
|
4343
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.TagIcon, { size: 12 }),
|
|
4344
|
+
colorScheme: "teal",
|
|
4345
|
+
children: "With Icon"
|
|
4346
|
+
}),
|
|
4347
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Chip, { children: "Default (no scheme)" }),
|
|
4348
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Chip, {
|
|
4349
|
+
outlined: true,
|
|
4350
|
+
children: "Default Outlined"
|
|
4351
|
+
})
|
|
4352
|
+
]
|
|
4353
|
+
}),
|
|
4354
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Typography, {
|
|
4355
|
+
variant: "caption",
|
|
4356
|
+
color: "secondary",
|
|
4357
|
+
className: "block mb-2 font-mono",
|
|
4358
|
+
children: "FilterChip"
|
|
4359
|
+
}),
|
|
4360
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4361
|
+
className: "flex flex-wrap gap-2 items-center mb-6",
|
|
4362
|
+
children: [
|
|
4363
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.FilterChip, {
|
|
4364
|
+
active: true,
|
|
4365
|
+
children: "Active"
|
|
4366
|
+
}),
|
|
4367
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.FilterChip, { children: "Inactive" }),
|
|
4368
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.FilterChip, {
|
|
4369
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.FilterIcon, { size: 12 }),
|
|
4370
|
+
active: true,
|
|
4371
|
+
children: "With Icon"
|
|
4372
|
+
}),
|
|
4373
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.FilterChip, {
|
|
4374
|
+
size: "small",
|
|
4375
|
+
children: "Small"
|
|
4376
|
+
}),
|
|
4377
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.FilterChip, {
|
|
4378
|
+
disabled: true,
|
|
4379
|
+
children: "Disabled"
|
|
4380
|
+
})
|
|
4381
|
+
]
|
|
4382
|
+
}),
|
|
4248
4383
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Typography, {
|
|
4249
4384
|
variant: "caption",
|
|
4250
4385
|
color: "secondary",
|
|
@@ -4542,271 +4677,6 @@
|
|
|
4542
4677
|
})
|
|
4543
4678
|
]
|
|
4544
4679
|
})]
|
|
4545
|
-
}),
|
|
4546
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SectionBlock, {
|
|
4547
|
-
id: "roles",
|
|
4548
|
-
title: "Roles View — RolesView.tsx",
|
|
4549
|
-
children: [
|
|
4550
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_rebasepro_ui.Typography, {
|
|
4551
|
-
variant: "body2",
|
|
4552
|
-
color: "secondary",
|
|
4553
|
-
className: "mb-4",
|
|
4554
|
-
children: [
|
|
4555
|
-
"Layout from ",
|
|
4556
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
4557
|
-
className: "font-mono text-xs",
|
|
4558
|
-
children: "RolesView"
|
|
4559
|
-
}),
|
|
4560
|
-
": same header pattern, table, and ",
|
|
4561
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
4562
|
-
className: "font-mono text-xs",
|
|
4563
|
-
children: "CollectionPermissionsMatrix"
|
|
4564
|
-
}),
|
|
4565
|
-
" with ",
|
|
4566
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
4567
|
-
className: "font-mono text-xs",
|
|
4568
|
-
children: "defaultBorderMixin"
|
|
4569
|
-
}),
|
|
4570
|
-
"."
|
|
4571
|
-
]
|
|
4572
|
-
}),
|
|
4573
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4574
|
-
className: "flex items-center mt-12",
|
|
4575
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Typography, {
|
|
4576
|
-
gutterBottom: true,
|
|
4577
|
-
variant: "h4",
|
|
4578
|
-
className: "grow",
|
|
4579
|
-
component: "h4",
|
|
4580
|
-
children: "Roles"
|
|
4581
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Button, {
|
|
4582
|
-
startIcon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.PlusIcon, {}),
|
|
4583
|
-
children: "Add role"
|
|
4584
|
-
})]
|
|
4585
|
-
}),
|
|
4586
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4587
|
-
className: "w-full overflow-auto",
|
|
4588
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_rebasepro_ui.Table, {
|
|
4589
|
-
className: "w-full",
|
|
4590
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_rebasepro_ui.TableHeader, { children: [
|
|
4591
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.TableCell, {
|
|
4592
|
-
header: true,
|
|
4593
|
-
className: "w-16"
|
|
4594
|
-
}),
|
|
4595
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.TableCell, {
|
|
4596
|
-
header: true,
|
|
4597
|
-
children: "Role"
|
|
4598
|
-
}),
|
|
4599
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.TableCell, {
|
|
4600
|
-
header: true,
|
|
4601
|
-
className: "items-center",
|
|
4602
|
-
children: "Is Admin"
|
|
4603
|
-
})
|
|
4604
|
-
] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.TableBody, { children: [
|
|
4605
|
-
{
|
|
4606
|
-
id: "admin",
|
|
4607
|
-
name: "Admin",
|
|
4608
|
-
isAdmin: true
|
|
4609
|
-
},
|
|
4610
|
-
{
|
|
4611
|
-
id: "editor",
|
|
4612
|
-
name: "Editor",
|
|
4613
|
-
isAdmin: false
|
|
4614
|
-
},
|
|
4615
|
-
{
|
|
4616
|
-
id: "viewer",
|
|
4617
|
-
name: "Viewer",
|
|
4618
|
-
isAdmin: false
|
|
4619
|
-
}
|
|
4620
|
-
].map((role) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_rebasepro_ui.TableRow, { children: [
|
|
4621
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.TableCell, {
|
|
4622
|
-
style: { width: "64px" },
|
|
4623
|
-
children: !role.isAdmin && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Tooltip, {
|
|
4624
|
-
asChild: true,
|
|
4625
|
-
title: "Delete this role",
|
|
4626
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.IconButton, {
|
|
4627
|
-
size: "small",
|
|
4628
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Trash2Icon, {})
|
|
4629
|
-
})
|
|
4630
|
-
})
|
|
4631
|
-
}),
|
|
4632
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.TableCell, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Chip, {
|
|
4633
|
-
colorScheme: role.isAdmin ? "purpleDark" : "blueDark",
|
|
4634
|
-
size: "small",
|
|
4635
|
-
children: role.name
|
|
4636
|
-
}) }),
|
|
4637
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.TableCell, {
|
|
4638
|
-
className: "items-center",
|
|
4639
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Checkbox, {
|
|
4640
|
-
checked: role.isAdmin ?? false,
|
|
4641
|
-
disabled: true
|
|
4642
|
-
})
|
|
4643
|
-
})
|
|
4644
|
-
] }, role.id)) })]
|
|
4645
|
-
})
|
|
4646
|
-
}),
|
|
4647
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4648
|
-
className: "mt-4",
|
|
4649
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Typography, {
|
|
4650
|
-
variant: "label",
|
|
4651
|
-
className: "mb-2 block text-surface-500 dark:text-surface-400 uppercase tracking-wide text-xs",
|
|
4652
|
-
children: "Collection permissions"
|
|
4653
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4654
|
-
className: `rounded-lg overflow-hidden border w-full ${_rebasepro_ui.defaultBorderMixin}`,
|
|
4655
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_rebasepro_ui.Table, {
|
|
4656
|
-
className: "w-full",
|
|
4657
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_rebasepro_ui.TableHeader, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.TableCell, {
|
|
4658
|
-
header: true,
|
|
4659
|
-
children: "Collection"
|
|
4660
|
-
}), [
|
|
4661
|
-
"Read",
|
|
4662
|
-
"Create",
|
|
4663
|
-
"Edit",
|
|
4664
|
-
"Delete"
|
|
4665
|
-
].map((op) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.TableCell, {
|
|
4666
|
-
header: true,
|
|
4667
|
-
align: "center",
|
|
4668
|
-
className: "w-20",
|
|
4669
|
-
children: op
|
|
4670
|
-
}, op))] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.TableBody, { children: [{
|
|
4671
|
-
name: "Posts",
|
|
4672
|
-
slug: "posts"
|
|
4673
|
-
}, {
|
|
4674
|
-
name: "Authors",
|
|
4675
|
-
slug: "authors"
|
|
4676
|
-
}].map((col) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_rebasepro_ui.TableRow, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_rebasepro_ui.TableCell, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4677
|
-
className: "flex items-center gap-1.5",
|
|
4678
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4679
|
-
className: "font-medium",
|
|
4680
|
-
children: col.name
|
|
4681
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Tooltip, {
|
|
4682
|
-
title: "No security rules defined — all operations unrestricted",
|
|
4683
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Chip, {
|
|
4684
|
-
size: "smallest",
|
|
4685
|
-
colorScheme: "gray",
|
|
4686
|
-
children: "no rules"
|
|
4687
|
-
})
|
|
4688
|
-
})]
|
|
4689
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4690
|
-
className: "text-xs text-surface-400 font-mono",
|
|
4691
|
-
children: col.slug
|
|
4692
|
-
})] }), [
|
|
4693
|
-
"select",
|
|
4694
|
-
"insert",
|
|
4695
|
-
"update",
|
|
4696
|
-
"delete"
|
|
4697
|
-
].map((op) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.TableCell, {
|
|
4698
|
-
align: "center",
|
|
4699
|
-
className: "w-20",
|
|
4700
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4701
|
-
className: "text-green-500 dark:text-green-400 font-bold",
|
|
4702
|
-
children: "✓"
|
|
4703
|
-
})
|
|
4704
|
-
}, op))] }, col.slug)) })]
|
|
4705
|
-
})
|
|
4706
|
-
})]
|
|
4707
|
-
})
|
|
4708
|
-
]
|
|
4709
|
-
}),
|
|
4710
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SectionBlock, {
|
|
4711
|
-
id: "role-dialog",
|
|
4712
|
-
title: "Role Dialog — RoleDetailsForm",
|
|
4713
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_rebasepro_ui.Typography, {
|
|
4714
|
-
variant: "body2",
|
|
4715
|
-
color: "secondary",
|
|
4716
|
-
className: "mb-4",
|
|
4717
|
-
children: [
|
|
4718
|
-
"Exact structure of ",
|
|
4719
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
4720
|
-
className: "font-mono text-xs",
|
|
4721
|
-
children: "RoleDetailsForm"
|
|
4722
|
-
}),
|
|
4723
|
-
": ",
|
|
4724
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
4725
|
-
className: "font-mono text-xs",
|
|
4726
|
-
children: "col-span-4"
|
|
4727
|
-
}),
|
|
4728
|
-
" grid, Role ID + Name + Is Admin checkbox."
|
|
4729
|
-
]
|
|
4730
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4731
|
-
className: `rounded-lg border w-full max-w-xl ${_rebasepro_ui.defaultBorderMixin}`,
|
|
4732
|
-
children: [
|
|
4733
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4734
|
-
className: "px-6 pt-6 pb-2",
|
|
4735
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Typography, {
|
|
4736
|
-
variant: "h4",
|
|
4737
|
-
children: "Role"
|
|
4738
|
-
})
|
|
4739
|
-
}),
|
|
4740
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4741
|
-
className: "px-6 py-4",
|
|
4742
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4743
|
-
className: "grid grid-cols-12 gap-4",
|
|
4744
|
-
children: [
|
|
4745
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4746
|
-
className: "col-span-12 sm:col-span-4",
|
|
4747
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.TextField, {
|
|
4748
|
-
name: "id",
|
|
4749
|
-
required: true,
|
|
4750
|
-
value: "editor",
|
|
4751
|
-
onChange: () => {},
|
|
4752
|
-
label: "Role ID",
|
|
4753
|
-
disabled: true
|
|
4754
|
-
})
|
|
4755
|
-
}),
|
|
4756
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4757
|
-
className: "col-span-12 sm:col-span-4",
|
|
4758
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.TextField, {
|
|
4759
|
-
name: "name",
|
|
4760
|
-
required: true,
|
|
4761
|
-
value: "Editor",
|
|
4762
|
-
onChange: () => {},
|
|
4763
|
-
label: "Role Name"
|
|
4764
|
-
})
|
|
4765
|
-
}),
|
|
4766
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4767
|
-
className: "col-span-12 sm:col-span-4 flex items-start pt-2",
|
|
4768
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
4769
|
-
className: "flex items-center gap-2 cursor-pointer mt-3",
|
|
4770
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Checkbox, {
|
|
4771
|
-
checked: false,
|
|
4772
|
-
onCheckedChange: () => {}
|
|
4773
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4774
|
-
className: "font-medium",
|
|
4775
|
-
children: "Is Admin"
|
|
4776
|
-
})]
|
|
4777
|
-
})
|
|
4778
|
-
})
|
|
4779
|
-
]
|
|
4780
|
-
})
|
|
4781
|
-
}),
|
|
4782
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4783
|
-
className: "flex items-center justify-end gap-2 px-6 pb-6",
|
|
4784
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.Button, {
|
|
4785
|
-
variant: "text",
|
|
4786
|
-
children: "Cancel"
|
|
4787
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_rebasepro_ui.LoadingButton, {
|
|
4788
|
-
variant: "filled",
|
|
4789
|
-
loading: false,
|
|
4790
|
-
children: "Update"
|
|
4791
|
-
})]
|
|
4792
|
-
})
|
|
4793
|
-
]
|
|
4794
|
-
})]
|
|
4795
|
-
}),
|
|
4796
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4797
|
-
className: "px-6 py-8",
|
|
4798
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_rebasepro_ui.Typography, {
|
|
4799
|
-
variant: "caption",
|
|
4800
|
-
color: "secondary",
|
|
4801
|
-
children: [
|
|
4802
|
-
"Hidden debug reference — ",
|
|
4803
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
4804
|
-
className: "font-mono text-xs",
|
|
4805
|
-
children: "/debug/ui"
|
|
4806
|
-
}),
|
|
4807
|
-
". Not linked from sidebar."
|
|
4808
|
-
]
|
|
4809
|
-
})
|
|
4810
4680
|
})
|
|
4811
4681
|
]
|
|
4812
4682
|
})]
|
|
@@ -5684,7 +5554,7 @@
|
|
|
5684
5554
|
})
|
|
5685
5555
|
] })]
|
|
5686
5556
|
}),
|
|
5687
|
-
additionalComponent && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5557
|
+
additionalComponent && mode === "buttons" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5688
5558
|
className: "w-full",
|
|
5689
5559
|
children: additionalComponent
|
|
5690
5560
|
})
|