@mieweb/ui 0.11.0-dev.8 → 0.11.0-dev.9

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.
@@ -1107,6 +1107,7 @@ function ComposerSelector({
1107
1107
  options,
1108
1108
  value,
1109
1109
  onChange,
1110
+ actions,
1110
1111
  label,
1111
1112
  triggerLabel,
1112
1113
  icon,
@@ -1116,7 +1117,7 @@ function ComposerSelector({
1116
1117
  const [open, setOpen] = React__namespace.useState(false);
1117
1118
  if (disabled && open) setOpen(false);
1118
1119
  const selected = options.find((option) => option.id === value) ?? null;
1119
- return /* @__PURE__ */ jsxRuntime.jsx(
1120
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1120
1121
  chunkPINIBEIU_cjs.Dropdown,
1121
1122
  {
1122
1123
  placement: "top-start",
@@ -1138,32 +1139,49 @@ function ComposerSelector({
1138
1139
  ]
1139
1140
  }
1140
1141
  ),
1141
- children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
1142
- chunkPINIBEIU_cjs.DropdownItem,
1143
- {
1144
- icon: option.icon,
1145
- role: "menuitemradio",
1146
- "aria-checked": option.id === value,
1147
- onClick: () => {
1148
- setOpen(false);
1149
- onChange?.(option.id);
1142
+ children: [
1143
+ options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
1144
+ chunkPINIBEIU_cjs.DropdownItem,
1145
+ {
1146
+ icon: option.icon,
1147
+ role: "menuitemradio",
1148
+ "aria-checked": option.id === value,
1149
+ onClick: () => {
1150
+ setOpen(false);
1151
+ onChange?.(option.id);
1152
+ },
1153
+ children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex w-full items-center justify-between gap-2", children: [
1154
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0", children: [
1155
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate", children: option.label }),
1156
+ option.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate text-xs text-neutral-500 dark:text-neutral-400", children: option.description })
1157
+ ] }),
1158
+ option.id === value && /* @__PURE__ */ jsxRuntime.jsx(
1159
+ chunkL7L5S2HO_cjs.Check,
1160
+ {
1161
+ className: "text-primary-600 dark:text-primary-400 h-4 w-4 shrink-0",
1162
+ "aria-hidden": "true"
1163
+ }
1164
+ )
1165
+ ] })
1150
1166
  },
1151
- children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex w-full items-center justify-between gap-2", children: [
1152
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0", children: [
1153
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate", children: option.label }),
1154
- option.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate text-xs text-neutral-500 dark:text-neutral-400", children: option.description })
1155
- ] }),
1156
- option.id === value && /* @__PURE__ */ jsxRuntime.jsx(
1157
- chunkL7L5S2HO_cjs.Check,
1158
- {
1159
- className: "text-primary-600 dark:text-primary-400 h-4 w-4 shrink-0",
1160
- "aria-hidden": "true"
1161
- }
1162
- )
1163
- ] })
1164
- },
1165
- option.id
1166
- ))
1167
+ option.id
1168
+ )),
1169
+ actions && actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1170
+ /* @__PURE__ */ jsxRuntime.jsx(chunkPINIBEIU_cjs.DropdownSeparator, {}),
1171
+ actions.map((action) => /* @__PURE__ */ jsxRuntime.jsx(
1172
+ chunkPINIBEIU_cjs.DropdownItem,
1173
+ {
1174
+ icon: action.icon,
1175
+ onClick: () => {
1176
+ setOpen(false);
1177
+ action.onSelect();
1178
+ },
1179
+ children: action.label
1180
+ },
1181
+ action.id
1182
+ ))
1183
+ ] })
1184
+ ]
1167
1185
  }
1168
1186
  );
1169
1187
  }
@@ -2028,6 +2046,7 @@ exports.AttachmentPreviewItem = AttachmentPreviewItem;
2028
2046
  exports.CameraButton = CameraButton;
2029
2047
  exports.ChatComposer = ChatComposer;
2030
2048
  exports.ComposerModelSelector = ComposerModelSelector;
2049
+ exports.ComposerSelector = ComposerSelector;
2031
2050
  exports.DEFAULT_ACCEPTED_FILE_TYPES = DEFAULT_ACCEPTED_FILE_TYPES;
2032
2051
  exports.DEFAULT_MAX_FILE_SIZE = DEFAULT_MAX_FILE_SIZE;
2033
2052
  exports.DragDropZone = DragDropZone;
@@ -2035,5 +2054,5 @@ exports.generateAttachmentId = generateAttachmentId;
2035
2054
  exports.getFileType = getFileType;
2036
2055
  exports.notifyComposerMigrationOnce = notifyComposerMigrationOnce;
2037
2056
  exports.validateFile = validateFile;
2038
- //# sourceMappingURL=chunk-WGXJNCRG.cjs.map
2039
- //# sourceMappingURL=chunk-WGXJNCRG.cjs.map
2057
+ //# sourceMappingURL=chunk-2GBVJHWN.cjs.map
2058
+ //# sourceMappingURL=chunk-2GBVJHWN.cjs.map