@byline/admin 4.11.0 → 4.11.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.
Files changed (97) hide show
  1. package/dist/fields/array/array-field.js +10 -10
  2. package/dist/fields/blocks/blocks-field.js +15 -15
  3. package/dist/fields/code/code-field.js +3 -3
  4. package/dist/fields/datetime/datetime-field.js +2 -2
  5. package/dist/fields/draggable-context-menu.js +9 -9
  6. package/dist/fields/field-renderer.js +3 -3
  7. package/dist/fields/file/file-field.js +21 -21
  8. package/dist/fields/file/file-upload-field.js +8 -8
  9. package/dist/fields/group/group-field.js +6 -6
  10. package/dist/fields/image/image-field.js +23 -23
  11. package/dist/fields/image/image-upload-field.js +11 -11
  12. package/dist/fields/locale-badge.js +2 -2
  13. package/dist/fields/relation/relation-display.js +2 -2
  14. package/dist/fields/relation/relation-field.js +7 -7
  15. package/dist/fields/relation/relation-many-field.js +12 -12
  16. package/dist/fields/relation/relation-picker.js +19 -19
  17. package/dist/fields/relation/relation-summary.js +9 -9
  18. package/dist/fields/select/select-field.js +3 -3
  19. package/dist/fields/sortable-item.js +9 -9
  20. package/dist/fields/text/text-field.js +2 -2
  21. package/dist/fields/text-area/text-area-field.js +2 -2
  22. package/dist/forms/available-locales-widget.js +4 -4
  23. package/dist/forms/document-actions.js +40 -40
  24. package/dist/forms/form-modals.js +12 -12
  25. package/dist/forms/form-renderer.js +17 -17
  26. package/dist/forms/form-status-display.js +15 -15
  27. package/dist/forms/path-widget.js +4 -4
  28. package/dist/forms/tree-placement-widget.js +10 -10
  29. package/dist/modules/admin-account/components/change-password.js +6 -6
  30. package/dist/modules/admin-account/components/container.js +28 -28
  31. package/dist/modules/admin-account/components/preferences.js +9 -9
  32. package/dist/modules/admin-account/components/theme-switch.js +4 -4
  33. package/dist/modules/admin-account/components/update.js +6 -6
  34. package/dist/modules/admin-permissions/components/inspector.js +31 -31
  35. package/dist/modules/admin-roles/components/create.js +6 -6
  36. package/dist/modules/admin-roles/components/permissions.js +25 -25
  37. package/dist/modules/admin-roles/components/update.js +6 -6
  38. package/dist/modules/admin-users/components/create.js +8 -8
  39. package/dist/modules/admin-users/components/roles.js +15 -15
  40. package/dist/modules/admin-users/components/set-password.js +6 -6
  41. package/dist/modules/admin-users/components/update.js +7 -7
  42. package/dist/modules/auth/components/sign-in-form.js +8 -8
  43. package/dist/presentation/group.js +3 -3
  44. package/dist/presentation/row.js +2 -2
  45. package/dist/presentation/tabs.js +5 -5
  46. package/dist/widgets/diff-viewer/diff-modal.js +10 -10
  47. package/dist/widgets/source-locale-badge/source-locale-badge.js +2 -2
  48. package/dist/widgets/status-badge/status-badge.js +4 -4
  49. package/package.json +6 -6
  50. package/src/fields/array/array-field.tsx +1 -1
  51. package/src/fields/blocks/blocks-field.tsx +1 -1
  52. package/src/fields/code/code-field.tsx +1 -1
  53. package/src/fields/datetime/datetime-field.tsx +1 -1
  54. package/src/fields/draggable-context-menu.tsx +1 -1
  55. package/src/fields/field-renderer.tsx +1 -1
  56. package/src/fields/file/file-field.tsx +1 -1
  57. package/src/fields/file/file-upload-field.tsx +1 -1
  58. package/src/fields/group/group-field.tsx +1 -1
  59. package/src/fields/image/image-field.tsx +1 -1
  60. package/src/fields/image/image-upload-field.tsx +1 -1
  61. package/src/fields/locale-badge.tsx +1 -1
  62. package/src/fields/relation/relation-display.tsx +1 -1
  63. package/src/fields/relation/relation-field.tsx +1 -1
  64. package/src/fields/relation/relation-many-field.tsx +1 -1
  65. package/src/fields/relation/relation-picker.tsx +1 -1
  66. package/src/fields/relation/relation-summary.tsx +1 -1
  67. package/src/fields/select/select-field.tsx +1 -1
  68. package/src/fields/sortable-item.tsx +1 -1
  69. package/src/fields/text/text-field.tsx +1 -1
  70. package/src/fields/text-area/text-area-field.tsx +1 -1
  71. package/src/forms/available-locales-widget.tsx +1 -1
  72. package/src/forms/document-actions.tsx +1 -1
  73. package/src/forms/form-modals.tsx +1 -1
  74. package/src/forms/form-renderer.tsx +1 -1
  75. package/src/forms/form-status-display.tsx +1 -1
  76. package/src/forms/path-widget.tsx +1 -1
  77. package/src/forms/tree-placement-widget.tsx +1 -1
  78. package/src/modules/admin-account/components/change-password.tsx +1 -1
  79. package/src/modules/admin-account/components/container.tsx +1 -1
  80. package/src/modules/admin-account/components/preferences.tsx +1 -1
  81. package/src/modules/admin-account/components/theme-switch.tsx +1 -1
  82. package/src/modules/admin-account/components/update.tsx +1 -1
  83. package/src/modules/admin-permissions/components/inspector.tsx +1 -1
  84. package/src/modules/admin-roles/components/create.tsx +1 -1
  85. package/src/modules/admin-roles/components/permissions.tsx +1 -1
  86. package/src/modules/admin-roles/components/update.tsx +1 -1
  87. package/src/modules/admin-users/components/create.tsx +1 -1
  88. package/src/modules/admin-users/components/roles.tsx +1 -1
  89. package/src/modules/admin-users/components/set-password.tsx +1 -1
  90. package/src/modules/admin-users/components/update.tsx +1 -1
  91. package/src/modules/auth/components/sign-in-form.tsx +1 -1
  92. package/src/presentation/group.tsx +1 -1
  93. package/src/presentation/row.tsx +1 -1
  94. package/src/presentation/tabs.tsx +1 -1
  95. package/src/widgets/diff-viewer/diff-modal.tsx +1 -1
  96. package/src/widgets/source-locale-badge/source-locale-badge.tsx +1 -1
  97. package/src/widgets/status-badge/status-badge.tsx +1 -1
@@ -5,7 +5,7 @@ import { revalidateLogic, useForm } from "@tanstack/react-form-start";
5
5
  import { getClientConfig } from "@byline/core";
6
6
  import { useTranslation } from "@byline/i18n/react";
7
7
  import { Alert, Button, LoaderEllipsis, Select } from "@byline/ui/react";
8
- import classnames from "classnames";
8
+ import clsx from "clsx";
9
9
  import { z } from "zod";
10
10
  import { useBylineAdminServices } from "../../../services/admin-services-context.js";
11
11
  import preferences_module from "./preferences.module.js";
@@ -73,7 +73,7 @@ function Preferences({ account, onClose, onSuccess }) {
73
73
  }
74
74
  });
75
75
  return /*#__PURE__*/ jsx("div", {
76
- className: classnames('byline-account-preferences-wrap', preferences_module.wrap),
76
+ className: clsx('byline-account-preferences-wrap', preferences_module.wrap),
77
77
  children: /*#__PURE__*/ jsxs("form", {
78
78
  method: "post",
79
79
  noValidate: true,
@@ -82,7 +82,7 @@ function Preferences({ account, onClose, onSuccess }) {
82
82
  event.stopPropagation();
83
83
  form.handleSubmit();
84
84
  },
85
- className: classnames('byline-account-preferences-form', preferences_module.form),
85
+ className: clsx('byline-account-preferences-form', preferences_module.form),
86
86
  children: [
87
87
  formError ? /*#__PURE__*/ jsx(Alert, {
88
88
  intent: "danger",
@@ -95,11 +95,11 @@ function Preferences({ account, onClose, onSuccess }) {
95
95
  /*#__PURE__*/ jsx(form.Field, {
96
96
  name: "locale",
97
97
  children: (field)=>/*#__PURE__*/ jsxs("div", {
98
- className: classnames('byline-account-preferences-row', preferences_module.row),
98
+ className: clsx('byline-account-preferences-row', preferences_module.row),
99
99
  children: [
100
100
  /*#__PURE__*/ jsx("label", {
101
101
  htmlFor: "preferences-locale-select",
102
- className: classnames('byline-account-preferences-label', preferences_module.label),
102
+ className: clsx('byline-account-preferences-label', preferences_module.label),
103
103
  children: t('account.preferences.languageLabel')
104
104
  }),
105
105
  /*#__PURE__*/ jsx(Select, {
@@ -113,21 +113,21 @@ function Preferences({ account, onClose, onSuccess }) {
113
113
  }
114
114
  }),
115
115
  /*#__PURE__*/ jsx("p", {
116
- className: classnames('muted', 'byline-account-preferences-help', preferences_module.help),
116
+ className: clsx('muted', 'byline-account-preferences-help', preferences_module.help),
117
117
  children: t('account.preferences.languageHelp')
118
118
  })
119
119
  ]
120
120
  })
121
121
  }),
122
122
  /*#__PURE__*/ jsxs("div", {
123
- className: classnames('byline-account-preferences-actions', preferences_module.actions),
123
+ className: clsx('byline-account-preferences-actions', preferences_module.actions),
124
124
  children: [
125
125
  /*#__PURE__*/ jsx(Button, {
126
126
  type: "button",
127
127
  intent: "secondary",
128
128
  size: "sm",
129
129
  onClick: onClose,
130
- className: classnames('byline-account-preferences-action', preferences_module.action),
130
+ className: clsx('byline-account-preferences-action', preferences_module.action),
131
131
  children: successMessage ? t('common.actions.close') : t('common.actions.cancel')
132
132
  }),
133
133
  /*#__PURE__*/ jsx(form.Subscribe, {
@@ -140,7 +140,7 @@ function Preferences({ account, onClose, onSuccess }) {
140
140
  intent: "primary",
141
141
  type: "submit",
142
142
  disabled: !canSubmit || isSubmitting,
143
- className: classnames('byline-account-preferences-action', preferences_module.action),
143
+ className: clsx('byline-account-preferences-action', preferences_module.action),
144
144
  children: true === isSubmitting ? /*#__PURE__*/ jsx(LoaderEllipsis, {
145
145
  size: 42
146
146
  }) : t('common.actions.save')
@@ -3,7 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useEffect, useState } from "react";
4
4
  import { useTranslation } from "@byline/i18n/react";
5
5
  import { ButtonGroup, ButtonGroupItem } from "@byline/ui/react";
6
- import classnames from "classnames";
6
+ import clsx from "clsx";
7
7
  import { getThemeMode, setThemeMode } from "./theme.js";
8
8
  import theme_switch_module from "./theme-switch.module.js";
9
9
  function ThemeSwitch() {
@@ -19,7 +19,7 @@ function ThemeSwitch() {
19
19
  setThemeMode(next);
20
20
  };
21
21
  return /*#__PURE__*/ jsxs("div", {
22
- className: classnames('byline-account-theme-switch', theme_switch_module.wrap),
22
+ className: clsx('byline-account-theme-switch', theme_switch_module.wrap),
23
23
  children: [
24
24
  /*#__PURE__*/ jsxs(ButtonGroup, {
25
25
  type: "single",
@@ -28,7 +28,7 @@ function ThemeSwitch() {
28
28
  value: mode,
29
29
  onValueChange: handleChange,
30
30
  "aria-label": t('account.appearance.colorTheme'),
31
- className: classnames('byline-account-theme-group', theme_switch_module.group),
31
+ className: clsx('byline-account-theme-group', theme_switch_module.group),
32
32
  children: [
33
33
  /*#__PURE__*/ jsx(ButtonGroupItem, {
34
34
  value: "light",
@@ -45,7 +45,7 @@ function ThemeSwitch() {
45
45
  ]
46
46
  }),
47
47
  /*#__PURE__*/ jsx("p", {
48
- className: classnames('muted', 'byline-account-theme-help', theme_switch_module.help),
48
+ className: clsx('muted', 'byline-account-theme-help', theme_switch_module.help),
49
49
  children: t('account.appearance.help')
50
50
  })
51
51
  ]
@@ -4,7 +4,7 @@ import { useMemo, useState } from "react";
4
4
  import { revalidateLogic, useForm } from "@tanstack/react-form-start";
5
5
  import { useTranslation } from "@byline/i18n/react";
6
6
  import { Alert, Button, Input, LoaderEllipsis } from "@byline/ui/react";
7
- import classnames from "classnames";
7
+ import clsx from "clsx";
8
8
  import { z } from "zod";
9
9
  import { useBylineAdminServices } from "../../../services/admin-services-context.js";
10
10
  import update_module from "./update.module.js";
@@ -100,7 +100,7 @@ function UpdateAccount({ account, onClose, onSuccess }) {
100
100
  }
101
101
  });
102
102
  return /*#__PURE__*/ jsx("div", {
103
- className: classnames('byline-account-update-wrap', update_module.wrap),
103
+ className: clsx('byline-account-update-wrap', update_module.wrap),
104
104
  children: /*#__PURE__*/ jsxs("form", {
105
105
  method: "post",
106
106
  noValidate: true,
@@ -109,7 +109,7 @@ function UpdateAccount({ account, onClose, onSuccess }) {
109
109
  event.stopPropagation();
110
110
  form.handleSubmit();
111
111
  },
112
- className: classnames('byline-account-update-form', update_module.form),
112
+ className: clsx('byline-account-update-form', update_module.form),
113
113
  children: [
114
114
  formError ? /*#__PURE__*/ jsx(Alert, {
115
115
  intent: "danger",
@@ -179,14 +179,14 @@ function UpdateAccount({ account, onClose, onSuccess }) {
179
179
  })
180
180
  }),
181
181
  /*#__PURE__*/ jsxs("div", {
182
- className: classnames('byline-account-update-actions', update_module.actions),
182
+ className: clsx('byline-account-update-actions', update_module.actions),
183
183
  children: [
184
184
  /*#__PURE__*/ jsx(Button, {
185
185
  type: "button",
186
186
  intent: "secondary",
187
187
  size: "sm",
188
188
  onClick: onClose,
189
- className: classnames('byline-account-update-action', update_module.action),
189
+ className: clsx('byline-account-update-action', update_module.action),
190
190
  children: successMessage ? t('common.actions.close') : t('common.actions.cancel')
191
191
  }),
192
192
  /*#__PURE__*/ jsx(form.Subscribe, {
@@ -200,7 +200,7 @@ function UpdateAccount({ account, onClose, onSuccess }) {
200
200
  intent: "primary",
201
201
  type: "submit",
202
202
  disabled: !canSubmit || isSubmitting,
203
- className: classnames('byline-account-update-action', update_module.action),
203
+ className: clsx('byline-account-update-action', update_module.action),
204
204
  children: true === isSubmitting ? /*#__PURE__*/ jsx(LoaderEllipsis, {
205
205
  size: 42
206
206
  }) : t('common.actions.save')
@@ -3,7 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useState } from "react";
4
4
  import { useTranslation } from "@byline/i18n/react";
5
5
  import { Button, Container, LoaderRing, Section } from "@byline/ui/react";
6
- import classnames from "classnames";
6
+ import clsx from "clsx";
7
7
  import { useBylineAdminServices } from "../../../services/admin-services-context.js";
8
8
  import inspector_module from "./inspector.module.js";
9
9
  function sourceVariant(source) {
@@ -45,26 +45,26 @@ function displayUser(user) {
45
45
  function MatrixPanel({ matrix }) {
46
46
  const { t } = useTranslation('byline-admin');
47
47
  return /*#__PURE__*/ jsxs("div", {
48
- className: classnames('byline-inspector-matrix', inspector_module.matrix),
48
+ className: clsx('byline-inspector-matrix', inspector_module.matrix),
49
49
  children: [
50
50
  /*#__PURE__*/ jsxs("div", {
51
51
  children: [
52
52
  /*#__PURE__*/ jsx("h4", {
53
- className: classnames('byline-inspector-matrix-title', inspector_module["matrix-title"]),
53
+ className: clsx('byline-inspector-matrix-title', inspector_module["matrix-title"]),
54
54
  children: t('adminPermissions.matrix.rolesTitle', {
55
55
  count: matrix.roles.length
56
56
  })
57
57
  }),
58
58
  0 === matrix.roles.length ? /*#__PURE__*/ jsx("p", {
59
- className: classnames('muted', 'byline-inspector-matrix-empty', inspector_module["matrix-empty"]),
59
+ className: clsx('muted', 'byline-inspector-matrix-empty', inspector_module["matrix-empty"]),
60
60
  children: t('adminPermissions.matrix.rolesEmpty')
61
61
  }) : /*#__PURE__*/ jsx("ul", {
62
- className: classnames('byline-inspector-matrix-list', inspector_module["matrix-list"]),
62
+ className: clsx('byline-inspector-matrix-list', inspector_module["matrix-list"]),
63
63
  children: matrix.roles.map((role)=>/*#__PURE__*/ jsxs("li", {
64
- className: classnames('byline-inspector-matrix-item', inspector_module["matrix-item"]),
64
+ className: clsx('byline-inspector-matrix-item', inspector_module["matrix-item"]),
65
65
  children: [
66
66
  /*#__PURE__*/ jsx("span", {
67
- className: classnames('byline-inspector-matrix-name', inspector_module["matrix-name"]),
67
+ className: clsx('byline-inspector-matrix-name', inspector_module["matrix-name"]),
68
68
  children: role.name
69
69
  }),
70
70
  /*#__PURE__*/ jsxs("span", {
@@ -82,18 +82,18 @@ function MatrixPanel({ matrix }) {
82
82
  /*#__PURE__*/ jsxs("div", {
83
83
  children: [
84
84
  /*#__PURE__*/ jsx("h4", {
85
- className: classnames('byline-inspector-matrix-title', inspector_module["matrix-title"]),
85
+ className: clsx('byline-inspector-matrix-title', inspector_module["matrix-title"]),
86
86
  children: t('adminPermissions.matrix.usersTitle', {
87
87
  count: matrix.users.length
88
88
  })
89
89
  }),
90
90
  0 === matrix.users.length ? /*#__PURE__*/ jsx("p", {
91
- className: classnames('muted', 'byline-inspector-matrix-empty', inspector_module["matrix-empty"]),
91
+ className: clsx('muted', 'byline-inspector-matrix-empty', inspector_module["matrix-empty"]),
92
92
  children: t('adminPermissions.matrix.usersEmpty')
93
93
  }) : /*#__PURE__*/ jsx("ul", {
94
- className: classnames('byline-inspector-matrix-list', inspector_module["matrix-list"]),
94
+ className: clsx('byline-inspector-matrix-list', inspector_module["matrix-list"]),
95
95
  children: matrix.users.map((user)=>/*#__PURE__*/ jsx("li", {
96
- className: classnames('byline-inspector-matrix-item', inspector_module["matrix-item"]),
96
+ className: clsx('byline-inspector-matrix-item', inspector_module["matrix-item"]),
97
97
  children: displayUser(user)
98
98
  }, user.id))
99
99
  })
@@ -107,33 +107,33 @@ function AbilityRow({ ability, matrix, loading, onToggle, expanded }) {
107
107
  const sv = sourceVariant(ability.source);
108
108
  const sourceKey = ability.source ?? 'unknown';
109
109
  return /*#__PURE__*/ jsxs("div", {
110
- className: classnames('byline-inspector-row', inspector_module.row),
110
+ className: clsx('byline-inspector-row', inspector_module.row),
111
111
  children: [
112
112
  /*#__PURE__*/ jsxs("div", {
113
- className: classnames('byline-inspector-row-head', inspector_module["row-head"]),
113
+ className: clsx('byline-inspector-row-head', inspector_module["row-head"]),
114
114
  children: [
115
115
  /*#__PURE__*/ jsxs("div", {
116
- className: classnames('byline-inspector-row-info', inspector_module["row-info"]),
116
+ className: clsx('byline-inspector-row-info', inspector_module["row-info"]),
117
117
  children: [
118
118
  /*#__PURE__*/ jsxs("div", {
119
- className: classnames('byline-inspector-row-meta', inspector_module["row-meta"]),
119
+ className: clsx('byline-inspector-row-meta', inspector_module["row-meta"]),
120
120
  children: [
121
121
  /*#__PURE__*/ jsx("code", {
122
- className: classnames('byline-inspector-row-key', inspector_module["row-key"]),
122
+ className: clsx('byline-inspector-row-key', inspector_module["row-key"]),
123
123
  children: ability.key
124
124
  }),
125
125
  /*#__PURE__*/ jsx("span", {
126
- className: classnames('byline-inspector-row-source', inspector_module["row-source"], sv.global, sv.local),
126
+ className: clsx('byline-inspector-row-source', inspector_module["row-source"], sv.global, sv.local),
127
127
  children: t(`adminPermissions.source.${sourceKey}`)
128
128
  })
129
129
  ]
130
130
  }),
131
131
  /*#__PURE__*/ jsx("p", {
132
- className: classnames('byline-inspector-row-label', inspector_module["row-label"]),
132
+ className: clsx('byline-inspector-row-label', inspector_module["row-label"]),
133
133
  children: ability.label
134
134
  }),
135
135
  ability.description ? /*#__PURE__*/ jsx("p", {
136
- className: classnames('muted', "byline-inspector-row-description", inspector_module["row-description"]),
136
+ className: clsx('muted', "byline-inspector-row-description", inspector_module["row-description"]),
137
137
  children: ability.description
138
138
  }) : null
139
139
  ]
@@ -147,7 +147,7 @@ function AbilityRow({ ability, matrix, loading, onToggle, expanded }) {
147
147
  ]
148
148
  }),
149
149
  expanded ? loading ? /*#__PURE__*/ jsxs("div", {
150
- className: classnames('byline-inspector-loader', inspector_module.loader),
150
+ className: clsx('byline-inspector-loader', inspector_module.loader),
151
151
  children: [
152
152
  /*#__PURE__*/ jsx(LoaderRing, {
153
153
  size: 20,
@@ -168,17 +168,17 @@ function GroupSection({ group, matrices, loading, expanded, onToggle }) {
168
168
  const { t } = useTranslation('byline-admin');
169
169
  return /*#__PURE__*/ jsxs("details", {
170
170
  open: true,
171
- className: classnames('byline-inspector-group', inspector_module.group),
171
+ className: clsx('byline-inspector-group', inspector_module.group),
172
172
  children: [
173
173
  /*#__PURE__*/ jsxs("summary", {
174
- className: classnames('byline-inspector-group-summary', inspector_module["group-summary"]),
174
+ className: clsx('byline-inspector-group-summary', inspector_module["group-summary"]),
175
175
  children: [
176
176
  /*#__PURE__*/ jsx("span", {
177
- className: classnames('byline-inspector-group-name', inspector_module["group-name"]),
177
+ className: clsx('byline-inspector-group-name', inspector_module["group-name"]),
178
178
  children: group.group
179
179
  }),
180
180
  /*#__PURE__*/ jsx("span", {
181
- className: classnames('muted', 'byline-inspector-group-count', inspector_module["group-count"]),
181
+ className: clsx('muted', 'byline-inspector-group-count', inspector_module["group-count"]),
182
182
  children: t('adminPermissions.group.abilitiesCount', {
183
183
  count: group.abilities.length
184
184
  })
@@ -186,7 +186,7 @@ function GroupSection({ group, matrices, loading, expanded, onToggle }) {
186
186
  ]
187
187
  }),
188
188
  /*#__PURE__*/ jsx("div", {
189
- className: classnames('byline-inspector-group-body', inspector_module["group-body"]),
189
+ className: clsx('byline-inspector-group-body', inspector_module["group-body"]),
190
190
  children: group.abilities.map((ability)=>/*#__PURE__*/ jsx(AbilityRow, {
191
191
  ability: ability,
192
192
  matrix: matrices[ability.key],
@@ -236,14 +236,14 @@ function AbilitiesInspector({ data }) {
236
236
  children: /*#__PURE__*/ jsxs(Container, {
237
237
  children: [
238
238
  /*#__PURE__*/ jsxs("div", {
239
- className: classnames('byline-inspector-head', inspector_module.head),
239
+ className: clsx('byline-inspector-head', inspector_module.head),
240
240
  children: [
241
241
  /*#__PURE__*/ jsx("h1", {
242
- className: classnames('byline-inspector-title', inspector_module.title),
242
+ className: clsx('byline-inspector-title', inspector_module.title),
243
243
  children: t('adminPermissions.title')
244
244
  }),
245
245
  /*#__PURE__*/ jsx("span", {
246
- className: classnames('byline-inspector-count-pill', inspector_module["count-pill"]),
246
+ className: clsx('byline-inspector-count-pill', inspector_module["count-pill"]),
247
247
  children: t('adminPermissions.countPill', {
248
248
  count: data.total
249
249
  })
@@ -251,14 +251,14 @@ function AbilitiesInspector({ data }) {
251
251
  ]
252
252
  }),
253
253
  /*#__PURE__*/ jsx("p", {
254
- className: classnames('muted', 'byline-inspector-lead', inspector_module.lead),
254
+ className: clsx('muted', 'byline-inspector-lead', inspector_module.lead),
255
255
  children: t('adminPermissions.lead')
256
256
  }),
257
257
  0 === data.groups.length ? /*#__PURE__*/ jsx("p", {
258
- className: classnames('muted', 'byline-inspector-empty', inspector_module.empty),
258
+ className: clsx('muted', 'byline-inspector-empty', inspector_module.empty),
259
259
  children: t('adminPermissions.empty')
260
260
  }) : /*#__PURE__*/ jsx("div", {
261
- className: classnames('byline-inspector-groups', inspector_module.groups),
261
+ className: clsx('byline-inspector-groups', inspector_module.groups),
262
262
  children: data.groups.map((group)=>/*#__PURE__*/ jsx(GroupSection, {
263
263
  group: group,
264
264
  matrices: matrices,
@@ -4,7 +4,7 @@ import { useMemo, useState } from "react";
4
4
  import { revalidateLogic, useForm } from "@tanstack/react-form-start";
5
5
  import { useTranslation } from "@byline/i18n/react";
6
6
  import { Alert, Button, Input, LoaderEllipsis, TextArea } from "@byline/ui/react";
7
- import classnames from "classnames";
7
+ import clsx from "clsx";
8
8
  import { z } from "zod";
9
9
  import { useBylineAdminServices } from "../../../services/admin-services-context.js";
10
10
  import create_module from "./create.module.js";
@@ -80,7 +80,7 @@ function CreateAdminRole({ onClose, onSuccess }) {
80
80
  }
81
81
  });
82
82
  return /*#__PURE__*/ jsx("div", {
83
- className: classnames('byline-role-create-wrap', create_module.wrap),
83
+ className: clsx('byline-role-create-wrap', create_module.wrap),
84
84
  children: /*#__PURE__*/ jsxs("form", {
85
85
  method: "post",
86
86
  noValidate: true,
@@ -89,7 +89,7 @@ function CreateAdminRole({ onClose, onSuccess }) {
89
89
  event.stopPropagation();
90
90
  form.handleSubmit();
91
91
  },
92
- className: classnames('byline-role-create-form', create_module.form),
92
+ className: clsx('byline-role-create-form', create_module.form),
93
93
  children: [
94
94
  formError ? /*#__PURE__*/ jsx(Alert, {
95
95
  intent: "danger",
@@ -140,14 +140,14 @@ function CreateAdminRole({ onClose, onSuccess }) {
140
140
  })
141
141
  }),
142
142
  /*#__PURE__*/ jsxs("div", {
143
- className: classnames('byline-role-create-actions', create_module.actions),
143
+ className: clsx('byline-role-create-actions', create_module.actions),
144
144
  children: [
145
145
  /*#__PURE__*/ jsx(Button, {
146
146
  type: "button",
147
147
  intent: "secondary",
148
148
  size: "sm",
149
149
  onClick: onClose,
150
- className: classnames('byline-role-create-action', create_module.action),
150
+ className: clsx('byline-role-create-action', create_module.action),
151
151
  children: t('common.actions.cancel')
152
152
  }),
153
153
  /*#__PURE__*/ jsx(form.Subscribe, {
@@ -160,7 +160,7 @@ function CreateAdminRole({ onClose, onSuccess }) {
160
160
  intent: "primary",
161
161
  type: "submit",
162
162
  disabled: !canSubmit || isSubmitting,
163
- className: classnames('byline-role-create-action', create_module.action),
163
+ className: clsx('byline-role-create-action', create_module.action),
164
164
  children: true === isSubmitting ? /*#__PURE__*/ jsx(LoaderEllipsis, {
165
165
  size: 42
166
166
  }) : t('common.actions.save')
@@ -3,7 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useMemo, useState } from "react";
4
4
  import { useTranslation } from "@byline/i18n/react";
5
5
  import { Alert, Button, Checkbox, LoaderEllipsis } from "@byline/ui/react";
6
- import classnames from "classnames";
6
+ import clsx from "clsx";
7
7
  import { useBylineAdminServices } from "../../../services/admin-services-context.js";
8
8
  import permissions_module from "./permissions.module.js";
9
9
  function setsEqual(a, b) {
@@ -19,19 +19,19 @@ function GroupSection({ group, selected, mode, saving, onToggle, onSelectAll, on
19
19
  const selectedInGroup = groupKeys.filter((key)=>selected.has(key)).length;
20
20
  const isEdit = 'edit' === mode;
21
21
  return /*#__PURE__*/ jsxs("div", {
22
- className: classnames('byline-role-permissions-group', permissions_module.group),
22
+ className: clsx('byline-role-permissions-group', permissions_module.group),
23
23
  children: [
24
24
  /*#__PURE__*/ jsxs("div", {
25
- className: classnames('byline-role-permissions-group-head', permissions_module["group-head"]),
25
+ className: clsx('byline-role-permissions-group-head', permissions_module["group-head"]),
26
26
  children: [
27
27
  /*#__PURE__*/ jsxs("div", {
28
28
  children: [
29
29
  /*#__PURE__*/ jsx("span", {
30
- className: classnames('byline-role-permissions-group-name', permissions_module["group-name"]),
30
+ className: clsx('byline-role-permissions-group-name', permissions_module["group-name"]),
31
31
  children: group.group
32
32
  }),
33
33
  /*#__PURE__*/ jsx("span", {
34
- className: classnames('muted', 'byline-role-permissions-group-count', permissions_module["group-count"]),
34
+ className: clsx('muted', 'byline-role-permissions-group-count', permissions_module["group-count"]),
35
35
  children: t('adminRoles.permissions.groupCount', {
36
36
  selected: selectedInGroup,
37
37
  total: group.abilities.length,
@@ -41,7 +41,7 @@ function GroupSection({ group, selected, mode, saving, onToggle, onSelectAll, on
41
41
  ]
42
42
  }),
43
43
  isEdit ? /*#__PURE__*/ jsxs("div", {
44
- className: classnames('byline-role-permissions-group-buttons', permissions_module["group-buttons"]),
44
+ className: clsx('byline-role-permissions-group-buttons', permissions_module["group-buttons"]),
45
45
  children: [
46
46
  /*#__PURE__*/ jsx(Button, {
47
47
  size: "xs",
@@ -64,9 +64,9 @@ function GroupSection({ group, selected, mode, saving, onToggle, onSelectAll, on
64
64
  ]
65
65
  }),
66
66
  /*#__PURE__*/ jsx("div", {
67
- className: classnames('byline-role-permissions-grid', permissions_module.grid),
67
+ className: clsx('byline-role-permissions-grid', permissions_module.grid),
68
68
  children: group.abilities.map((ability)=>/*#__PURE__*/ jsxs("div", {
69
- className: classnames('byline-role-permissions-row', permissions_module.row),
69
+ className: clsx('byline-role-permissions-row', permissions_module.row),
70
70
  children: [
71
71
  /*#__PURE__*/ jsx(Checkbox, {
72
72
  id: `ability-${ability.key}`,
@@ -74,31 +74,31 @@ function GroupSection({ group, selected, mode, saving, onToggle, onSelectAll, on
74
74
  checked: selected.has(ability.key),
75
75
  disabled: !isEdit || saving,
76
76
  onCheckedChange: (checked)=>onToggle(ability.key, true === checked),
77
- containerClasses: classnames('byline-role-permissions-checkbox-auto', permissions_module["checkbox-auto"]),
78
- componentClasses: classnames('byline-role-permissions-checkbox-auto', permissions_module["checkbox-auto"])
77
+ containerClasses: clsx('byline-role-permissions-checkbox-auto', permissions_module["checkbox-auto"]),
78
+ componentClasses: clsx('byline-role-permissions-checkbox-auto', permissions_module["checkbox-auto"])
79
79
  }),
80
80
  /*#__PURE__*/ jsxs("label", {
81
81
  htmlFor: `ability-${ability.key}`,
82
- className: classnames('byline-role-permissions-label', permissions_module.label, isEdit && [
82
+ className: clsx('byline-role-permissions-label', permissions_module.label, isEdit && [
83
83
  'byline-role-permissions-label-edit',
84
84
  permissions_module["label-edit"]
85
85
  ]),
86
86
  children: [
87
87
  /*#__PURE__*/ jsxs("div", {
88
- className: classnames('byline-role-permissions-label-head', permissions_module["label-head"]),
88
+ className: clsx('byline-role-permissions-label-head', permissions_module["label-head"]),
89
89
  children: [
90
90
  /*#__PURE__*/ jsx("span", {
91
- className: classnames('byline-role-permissions-label-name', permissions_module["label-name"]),
91
+ className: clsx('byline-role-permissions-label-name', permissions_module["label-name"]),
92
92
  children: ability.label
93
93
  }),
94
94
  /*#__PURE__*/ jsx("code", {
95
- className: classnames('byline-role-permissions-key', permissions_module.key),
95
+ className: clsx('byline-role-permissions-key', permissions_module.key),
96
96
  children: ability.key
97
97
  })
98
98
  ]
99
99
  }),
100
100
  ability.description ? /*#__PURE__*/ jsx("p", {
101
- className: classnames('muted', "byline-role-permissions-description", permissions_module.description),
101
+ className: clsx('muted', "byline-role-permissions-description", permissions_module.description),
102
102
  children: ability.description
103
103
  }) : null
104
104
  ]
@@ -181,10 +181,10 @@ function RolePermissions({ role, registered, initialAbilities, onSaved }) {
181
181
  }
182
182
  const isEdit = 'edit' === mode;
183
183
  return /*#__PURE__*/ jsxs("div", {
184
- className: classnames('byline-role-permissions-wrap', permissions_module.wrap),
184
+ className: clsx('byline-role-permissions-wrap', permissions_module.wrap),
185
185
  children: [
186
186
  /*#__PURE__*/ jsxs("div", {
187
- className: classnames('byline-role-permissions-toolbar', permissions_module.toolbar),
187
+ className: clsx('byline-role-permissions-toolbar', permissions_module.toolbar),
188
188
  children: [
189
189
  /*#__PURE__*/ jsx(ModeToggle, {
190
190
  mode: mode,
@@ -194,7 +194,7 @@ function RolePermissions({ role, registered, initialAbilities, onSaved }) {
194
194
  onEdit: handleEnterEdit
195
195
  }),
196
196
  /*#__PURE__*/ jsx("p", {
197
- className: classnames('muted', 'byline-role-permissions-counter', permissions_module.counter),
197
+ className: clsx('muted', 'byline-role-permissions-counter', permissions_module.counter),
198
198
  children: t('adminRoles.permissions.counter', {
199
199
  selected: totalSelected,
200
200
  total: registered.total,
@@ -203,7 +203,7 @@ function RolePermissions({ role, registered, initialAbilities, onSaved }) {
203
203
  })
204
204
  }),
205
205
  isEdit && isDirty ? /*#__PURE__*/ jsxs("div", {
206
- className: classnames('byline-role-permissions-actions', permissions_module.actions),
206
+ className: clsx('byline-role-permissions-actions', permissions_module.actions),
207
207
  children: [
208
208
  /*#__PURE__*/ jsx(Button, {
209
209
  type: "button",
@@ -211,7 +211,7 @@ function RolePermissions({ role, registered, initialAbilities, onSaved }) {
211
211
  size: "xs",
212
212
  onClick: handleCancel,
213
213
  disabled: saving,
214
- className: classnames('byline-role-permissions-action', permissions_module.action),
214
+ className: clsx('byline-role-permissions-action', permissions_module.action),
215
215
  children: t('common.actions.cancel')
216
216
  }),
217
217
  /*#__PURE__*/ jsx(Button, {
@@ -220,7 +220,7 @@ function RolePermissions({ role, registered, initialAbilities, onSaved }) {
220
220
  size: "xs",
221
221
  onClick: ()=>void handleSave(),
222
222
  disabled: saving,
223
- className: classnames('byline-role-permissions-action', permissions_module.action),
223
+ className: clsx('byline-role-permissions-action', permissions_module.action),
224
224
  children: saving ? /*#__PURE__*/ jsx(LoaderEllipsis, {
225
225
  size: 30
226
226
  }) : t('common.actions.save')
@@ -234,7 +234,7 @@ function RolePermissions({ role, registered, initialAbilities, onSaved }) {
234
234
  children: error
235
235
  }) : null,
236
236
  /*#__PURE__*/ jsx("div", {
237
- className: classnames('byline-role-permissions-groups', permissions_module.groups),
237
+ className: clsx('byline-role-permissions-groups', permissions_module.groups),
238
238
  children: registered.groups.map((group)=>/*#__PURE__*/ jsx(GroupSection, {
239
239
  group: group,
240
240
  selected: selected,
@@ -257,13 +257,13 @@ function ModeToggle({ mode, dirty, saving, onView, onEdit }) {
257
257
  return /*#__PURE__*/ jsxs("div", {
258
258
  role: "group",
259
259
  "aria-label": t('adminRoles.permissions.modeAriaLabel'),
260
- className: classnames('byline-role-permissions-mode-toggle', permissions_module["mode-toggle"]),
260
+ className: clsx('byline-role-permissions-mode-toggle', permissions_module["mode-toggle"]),
261
261
  children: [
262
262
  /*#__PURE__*/ jsx("button", {
263
263
  type: "button",
264
264
  onClick: onView,
265
265
  disabled: viewDisabled,
266
- className: classnames('byline-role-permissions-mode-button', permissions_module["mode-button"], isView && [
266
+ className: clsx('byline-role-permissions-mode-button', permissions_module["mode-button"], isView && [
267
267
  'byline-role-permissions-mode-button-active',
268
268
  permissions_module["mode-button-active"]
269
269
  ], viewDisabled && !isView && [
@@ -276,7 +276,7 @@ function ModeToggle({ mode, dirty, saving, onView, onEdit }) {
276
276
  type: "button",
277
277
  onClick: onEdit,
278
278
  disabled: editDisabled,
279
- className: classnames('byline-role-permissions-mode-button', 'byline-role-permissions-mode-button-divider', permissions_module["mode-button"], permissions_module["mode-button-divider"], isEdit && [
279
+ className: clsx('byline-role-permissions-mode-button', 'byline-role-permissions-mode-button-divider', permissions_module["mode-button"], permissions_module["mode-button-divider"], isEdit && [
280
280
  'byline-role-permissions-mode-button-active',
281
281
  permissions_module["mode-button-active"]
282
282
  ], editDisabled && !isEdit && [
@@ -4,7 +4,7 @@ import { useMemo, useState } from "react";
4
4
  import { revalidateLogic, useForm } from "@tanstack/react-form-start";
5
5
  import { useTranslation } from "@byline/i18n/react";
6
6
  import { Alert, Button, Input, LoaderEllipsis, TextArea } from "@byline/ui/react";
7
- import classnames from "classnames";
7
+ import clsx from "clsx";
8
8
  import { z } from "zod";
9
9
  import { useBylineAdminServices } from "../../../services/admin-services-context.js";
10
10
  import update_module from "./update.module.js";
@@ -73,7 +73,7 @@ function UpdateRole({ role, onClose, onSuccess }) {
73
73
  }
74
74
  });
75
75
  return /*#__PURE__*/ jsx("div", {
76
- className: classnames('byline-role-update-wrap', update_module.wrap),
76
+ className: clsx('byline-role-update-wrap', update_module.wrap),
77
77
  children: /*#__PURE__*/ jsxs("form", {
78
78
  method: "post",
79
79
  noValidate: true,
@@ -82,7 +82,7 @@ function UpdateRole({ role, onClose, onSuccess }) {
82
82
  event.stopPropagation();
83
83
  form.handleSubmit();
84
84
  },
85
- className: classnames('byline-role-update-form', update_module.form),
85
+ className: clsx('byline-role-update-form', update_module.form),
86
86
  children: [
87
87
  formError ? /*#__PURE__*/ jsx(Alert, {
88
88
  intent: "danger",
@@ -130,14 +130,14 @@ function UpdateRole({ role, onClose, onSuccess }) {
130
130
  })
131
131
  }),
132
132
  /*#__PURE__*/ jsxs("div", {
133
- className: classnames('byline-role-update-actions', update_module.actions),
133
+ className: clsx('byline-role-update-actions', update_module.actions),
134
134
  children: [
135
135
  /*#__PURE__*/ jsx(Button, {
136
136
  type: "button",
137
137
  intent: "secondary",
138
138
  size: "sm",
139
139
  onClick: onClose,
140
- className: classnames('byline-role-update-action', update_module.action),
140
+ className: clsx('byline-role-update-action', update_module.action),
141
141
  children: successMessage ? t('common.actions.close') : t('common.actions.cancel')
142
142
  }),
143
143
  /*#__PURE__*/ jsx(form.Subscribe, {
@@ -150,7 +150,7 @@ function UpdateRole({ role, onClose, onSuccess }) {
150
150
  intent: "primary",
151
151
  type: "submit",
152
152
  disabled: !canSubmit || isSubmitting,
153
- className: classnames('byline-role-update-action', update_module.action),
153
+ className: clsx('byline-role-update-action', update_module.action),
154
154
  children: true === isSubmitting ? /*#__PURE__*/ jsx(LoaderEllipsis, {
155
155
  size: 42
156
156
  }) : t('common.actions.save')