myoperator-ui 0.0.214 → 0.0.215

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 (2) hide show
  1. package/dist/index.js +5 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -13091,7 +13091,7 @@ const BOT_TYPE_OPTIONS: BotTypeOption[] = [
13091
13091
  export const CreateBotModal = React.forwardRef<
13092
13092
  HTMLDivElement,
13093
13093
  CreateBotModalProps
13094
- >(({ open, onOpenChange, onSubmit, className }, ref) => {
13094
+ >(({ open, onOpenChange, onSubmit, isLoading, className }, ref) => {
13095
13095
  const [name, setName] = React.useState("");
13096
13096
  const [selectedType, setSelectedType] = React.useState<BotType>("chatbot");
13097
13097
 
@@ -13212,7 +13212,8 @@ export const CreateBotModal = React.forwardRef<
13212
13212
  <Button
13213
13213
  variant="default"
13214
13214
  onClick={handleSubmit}
13215
- disabled={!name.trim()}
13215
+ disabled={!name.trim() || isLoading}
13216
+ loading={isLoading}
13216
13217
  >
13217
13218
  Create
13218
13219
  </Button>
@@ -13725,6 +13726,8 @@ export interface CreateBotModalProps {
13725
13726
  onOpenChange: (open: boolean) => void;
13726
13727
  /** Called with name and BOT_TYPE (CHAT = 1, VOICE = 2) when user submits */
13727
13728
  onSubmit?: (data: { name: string; type: BOT_TYPE }) => void;
13729
+ /** Shows loading spinner on Create button and disables it (e.g. while API call is in flight) */
13730
+ isLoading?: boolean;
13728
13731
  className?: string;
13729
13732
  }
13730
13733
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-ui",
3
- "version": "0.0.214",
3
+ "version": "0.0.215",
4
4
  "description": "CLI for adding myOperator UI components to your project",
5
5
  "type": "module",
6
6
  "exports": "./dist/index.js",