myoperator-ui 0.0.228 → 0.0.230

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 +106 -100
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7968,7 +7968,7 @@ export interface PageHeaderProps
7968
7968
  actions?: React.ReactNode;
7969
7969
  /** Show bottom border (default: true) */
7970
7970
  showBorder?: boolean;
7971
- /** Layout mode: 'horizontal' (single row), 'vertical' (stacked), 'responsive' (auto based on screen size, default) */
7971
+ /** Layout mode: 'horizontal' (row on sm+, stacked on narrow), 'vertical' (stacked), 'responsive' (same as horizontal, default) */
7972
7972
  layout?: "horizontal" | "vertical" | "responsive";
7973
7973
  /** Max actions to show on mobile before overflow (default: 2) */
7974
7974
  mobileOverflowLimit?: number;
@@ -8048,13 +8048,13 @@ const PageHeader = React.forwardRef(
8048
8048
 
8049
8049
  // Layout classes based on prop
8050
8050
  const layoutClasses = {
8051
- horizontal: "flex-row items-center",
8051
+ horizontal: "flex-col sm:flex-row sm:items-center",
8052
8052
  vertical: "flex-col",
8053
8053
  responsive: "flex-col sm:flex-row sm:items-center",
8054
8054
  };
8055
8055
 
8056
8056
  const heightClasses = {
8057
- horizontal: "h-[76px]",
8057
+ horizontal: "min-h-[76px] py-4 lg:py-0 lg:h-[76px]",
8058
8058
  vertical: "min-h-[76px] py-4",
8059
8059
  responsive: "min-h-[76px] py-4 lg:py-0 lg:h-[76px]",
8060
8060
  };
@@ -8117,27 +8117,14 @@ const PageHeader = React.forwardRef(
8117
8117
  );
8118
8118
  };
8119
8119
 
8120
- // For horizontal layout, always show all actions inline
8121
- const renderHorizontalActions = () => (
8122
- <div className="flex items-center gap-2 ml-4">
8123
- {actionsArray.map((action, index) => (
8124
- <React.Fragment key={index}>{action}</React.Fragment>
8125
- ))}
8126
- </div>
8127
- );
8128
-
8129
8120
  const renderActions = () => {
8130
8121
  if (!actions) return null;
8131
8122
 
8132
- if (layout === "horizontal") {
8133
- return renderHorizontalActions();
8134
- }
8135
-
8136
8123
  if (layout === "vertical") {
8137
8124
  return renderExpandableActions("mt-3");
8138
8125
  }
8139
8126
 
8140
- // Responsive: render both, CSS handles visibility
8127
+ // horizontal + responsive: stack actions below title on small screens
8141
8128
  return (
8142
8129
  <>
8143
8130
  {renderDesktopActions()}
@@ -8174,7 +8161,7 @@ const PageHeader = React.forwardRef(
8174
8161
 
8175
8162
  {/* Content Section: Title + Description */}
8176
8163
  <div className="flex-1 min-w-0">
8177
- <div className="flex min-h-10 items-center gap-2">
8164
+ <div className="flex h-auto items-center gap-2 sm:min-h-10">
8178
8165
  <h1 className="m-0 text-lg font-semibold leading-none text-semantic-text-primary truncate">
8179
8166
  {title}
8180
8167
  </h1>
@@ -12025,80 +12012,88 @@ const PlanDetailModal = React.forwardRef(
12025
12012
  <DialogContent
12026
12013
  size="lg"
12027
12014
  hideCloseButton
12028
- className="p-0 gap-0 overflow-hidden"
12015
+ className={cn(
12016
+ "flex max-h-[min(90vh,calc(100dvh-2rem))] min-w-0 flex-col gap-0 overflow-hidden rounded-xl",
12017
+ "w-full max-w-[min(42rem,calc(100vw-2rem))] p-3 sm:p-4 md:p-6"
12018
+ )}
12029
12019
  >
12020
+ <DialogDescription className="sr-only">
12021
+ Plan features, free allowances, and rates for this subscription.
12022
+ </DialogDescription>
12030
12023
  <div
12031
12024
  ref={ref}
12032
- className={cn("flex flex-col", className)}
12025
+ className={cn("flex min-h-0 flex-1 flex-col", className)}
12033
12026
  {...props}
12034
12027
  >
12035
- {/* Header */}
12036
- <div className="flex items-center justify-between px-8 py-4 border-b border-solid border-semantic-border-layout">
12037
- <DialogTitle className="text-lg font-semibold text-semantic-text-primary leading-none m-0">
12028
+ {/* Header \u2014 matches other custom modals (e.g. plan-upgrade-summary) */}
12029
+ <div className="flex shrink-0 items-start justify-between gap-3 border-b border-solid border-semantic-border-layout pb-3 sm:gap-4 sm:pb-4">
12030
+ <DialogTitle className="m-0 min-w-0 flex-1 pr-2 text-base font-semibold leading-normal text-semantic-text-primary sm:text-lg">
12038
12031
  {title}
12039
12032
  </DialogTitle>
12040
12033
  <button
12041
12034
  type="button"
12042
12035
  onClick={handleClose}
12043
12036
  aria-label="Close"
12044
- className="flex items-center justify-center size-6 rounded text-semantic-text-muted hover:text-semantic-text-primary hover:bg-semantic-bg-hover transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-focus"
12037
+ className="shrink-0 text-semantic-text-muted transition-colors hover:text-semantic-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-focus focus-visible:ring-offset-2"
12045
12038
  >
12046
- <X className="size-3" aria-hidden="true" />
12039
+ <X className="size-6" aria-hidden="true" />
12047
12040
  </button>
12048
12041
  </div>
12049
12042
 
12050
- {/* Body */}
12051
- <DialogDescription asChild>
12052
- <div className="flex flex-col gap-2.5 px-8 py-5 overflow-y-auto max-h-[70vh]">
12053
- <p className="m-0 text-base font-semibold text-semantic-text-primary leading-none">
12054
- Features
12055
- </p>
12056
- <div className="w-full overflow-x-auto rounded border border-solid border-semantic-border-layout">
12057
- <table className="w-full border-collapse text-sm">
12058
- <thead>
12059
- <tr className="bg-semantic-bg-ui">
12060
- <th className="px-3 py-[11px] text-left font-semibold text-semantic-text-primary border-b border-solid border-semantic-border-layout w-[44%]">
12061
- Feature
12062
- </th>
12063
- <th className="px-3 py-[11px] text-left font-semibold text-semantic-text-primary border-b border-solid border-semantic-border-layout w-[28%]">
12064
- Free
12065
- </th>
12066
- <th className="px-3 py-[11px] text-left font-semibold text-semantic-text-primary border-b border-solid border-semantic-border-layout w-[28%]">
12067
- Rate
12068
- </th>
12043
+ {/* Features label fixed; only the table region scrolls */}
12044
+ <div className="flex min-h-0 flex-1 flex-col gap-2 pt-3 sm:gap-2.5 sm:pt-4">
12045
+ <p className="m-0 shrink-0 text-sm font-semibold leading-none text-semantic-text-primary sm:text-base">
12046
+ Features
12047
+ </p>
12048
+ <div className="min-h-0 flex-1 overflow-y-auto overflow-x-auto rounded border border-solid border-semantic-border-layout">
12049
+ <table className="w-full min-w-0 border-collapse text-sm">
12050
+ <thead>
12051
+ <tr className="bg-semantic-bg-ui">
12052
+ <th className="w-[40%] px-2 py-2 text-left text-xs font-semibold text-semantic-text-primary border-b border-solid border-semantic-border-layout sm:w-[44%] sm:px-3 sm:py-[11px] sm:text-sm">
12053
+ Feature
12054
+ </th>
12055
+ <th className="w-[30%] px-2 py-2 text-left text-xs font-semibold text-semantic-text-primary border-b border-solid border-semantic-border-layout sm:w-[28%] sm:px-3 sm:py-[11px] sm:text-sm">
12056
+ Free
12057
+ </th>
12058
+ <th className="w-[30%] px-2 py-2 text-left text-xs font-semibold text-semantic-text-primary border-b border-solid border-semantic-border-layout sm:w-[28%] sm:px-3 sm:py-[11px] sm:text-sm">
12059
+ Rate
12060
+ </th>
12061
+ </tr>
12062
+ </thead>
12063
+ <tbody>
12064
+ {features.map((feature, index) => (
12065
+ <tr
12066
+ key={feature.name}
12067
+ className={cn(
12068
+ index % 2 === 0
12069
+ ? "bg-semantic-bg-primary"
12070
+ : "bg-semantic-bg-ui"
12071
+ )}
12072
+ >
12073
+ <td className="px-2 py-2 text-xs text-semantic-text-secondary border-b border-solid border-semantic-border-layout sm:px-3 sm:py-[11px] sm:text-sm">
12074
+ <p className="m-0 leading-snug sm:leading-none">{feature.name}</p>
12075
+ </td>
12076
+ <td className="px-2 py-2 text-xs text-semantic-text-secondary border-b border-solid border-semantic-border-layout sm:px-3 sm:py-[11px] sm:text-sm">
12077
+ <p className="m-0 leading-snug sm:leading-none">{feature.free}</p>
12078
+ </td>
12079
+ <td className="px-2 py-2 text-xs text-semantic-text-secondary border-b border-solid border-semantic-border-layout sm:px-3 sm:py-[11px] sm:text-sm">
12080
+ <p className="m-0 leading-snug sm:leading-none">{feature.rate}</p>
12081
+ </td>
12069
12082
  </tr>
12070
- </thead>
12071
- <tbody>
12072
- {features.map((feature, index) => (
12073
- <tr
12074
- key={feature.name}
12075
- className={cn(
12076
- index % 2 === 0
12077
- ? "bg-semantic-bg-primary"
12078
- : "bg-semantic-bg-ui"
12079
- )}
12080
- >
12081
- <td className="px-3 py-[11px] text-semantic-text-secondary border-b border-solid border-semantic-border-layout">
12082
- <p className="m-0 leading-none">{feature.name}</p>
12083
- </td>
12084
- <td className="px-3 py-[11px] text-semantic-text-secondary border-b border-solid border-semantic-border-layout">
12085
- <p className="m-0 leading-none">{feature.free}</p>
12086
- </td>
12087
- <td className="px-3 py-[11px] text-semantic-text-secondary border-b border-solid border-semantic-border-layout">
12088
- <p className="m-0 leading-none">{feature.rate}</p>
12089
- </td>
12090
- </tr>
12091
- ))}
12092
- </tbody>
12093
- </table>
12094
- </div>
12083
+ ))}
12084
+ </tbody>
12085
+ </table>
12095
12086
  </div>
12096
- </DialogDescription>
12087
+ </div>
12097
12088
 
12098
12089
  {/* Footer */}
12099
12090
  {planPrice && (
12100
- <div className="flex items-center px-8 py-4 border-t border-solid border-semantic-border-layout">
12101
- <p className="m-0 text-base text-semantic-text-primary">
12091
+ <div
12092
+ className={cn(
12093
+ "flex shrink-0 items-center border-t border-solid border-semantic-border-layout pt-3 sm:pt-4"
12094
+ )}
12095
+ >
12096
+ <p className="m-0 text-sm text-semantic-text-primary sm:text-base">
12102
12097
  <span className="font-semibold">Plan price </span>
12103
12098
  <span className="font-normal">{planPrice}</span>
12104
12099
  </p>
@@ -12185,11 +12180,11 @@ import { Dialog, DialogContent, DialogDescription, DialogTitle } from "../dialog
12185
12180
  import type { BillingCycleOption, PlanUpgradeModalProps } from "./types";
12186
12181
 
12187
12182
  const modalRootVariants = cva(
12188
- "flex flex-col gap-6 rounded-lg border border-solid border-semantic-border-layout bg-semantic-bg-primary p-9"
12183
+ "flex min-h-0 max-h-[min(90vh,calc(100dvh-2rem))] flex-col gap-4 overflow-y-auto overflow-x-hidden rounded-lg border border-solid border-semantic-border-layout bg-semantic-bg-primary p-3 pt-4 pb-[calc(1rem+env(safe-area-inset-bottom,0px))] sm:gap-6 sm:p-6 sm:pb-[calc(1.5rem+env(safe-area-inset-bottom,0px))] md:gap-8 md:p-9 md:pb-[calc(2.25rem+env(safe-area-inset-bottom,0px))]"
12189
12184
  );
12190
12185
 
12191
12186
  const billingCycleOptionVariants = cva(
12192
- "flex w-full items-center gap-2.5 rounded-lg border border-solid bg-semantic-bg-primary p-3 text-left transition-colors",
12187
+ "flex w-full min-h-[44px] items-center gap-2.5 rounded-lg border border-solid bg-semantic-bg-primary p-3 text-left transition-colors sm:min-h-0",
12193
12188
  {
12194
12189
  variants: {
12195
12190
  selected: {
@@ -12279,12 +12274,12 @@ const PlanUpgradeModal = React.forwardRef(
12279
12274
  <DialogContent
12280
12275
  size="default"
12281
12276
  hideCloseButton
12282
- className="w-full max-w-[480px] border-none bg-transparent p-0 shadow-none"
12277
+ className="min-w-0 w-full max-w-[min(30rem,calc(100vw-1rem-env(safe-area-inset-left,0px)-env(safe-area-inset-right,0px)))] border-none bg-transparent p-0 shadow-none sm:max-w-[min(30rem,calc(100vw-2rem-env(safe-area-inset-left,0px)-env(safe-area-inset-right,0px)))]"
12283
12278
  >
12284
12279
  <div ref={ref} className={cn(modalRootVariants(), className)} {...props}>
12285
- <div className="flex items-start justify-between gap-4">
12286
- <div className="flex flex-col gap-2">
12287
- <DialogTitle className="m-0 text-lg font-semibold leading-normal text-semantic-text-primary">
12280
+ <div className="flex items-start justify-between gap-3 sm:gap-4">
12281
+ <div className="flex min-w-0 flex-1 flex-col gap-2">
12282
+ <DialogTitle className="m-0 break-words text-base font-semibold leading-normal text-semantic-text-primary sm:text-lg">
12288
12283
  {title}
12289
12284
  </DialogTitle>
12290
12285
  <DialogDescription className="m-0 text-sm tracking-[0.035px] text-semantic-text-muted">
@@ -12294,10 +12289,10 @@ const PlanUpgradeModal = React.forwardRef(
12294
12289
  <button
12295
12290
  type="button"
12296
12291
  onClick={handleClose}
12297
- className="shrink-0 text-semantic-text-muted transition-colors hover:text-semantic-text-primary"
12292
+ className="shrink-0 text-semantic-text-muted transition-colors hover:text-semantic-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-focus focus-visible:ring-offset-2"
12298
12293
  aria-label="Close plan upgrade modal"
12299
12294
  >
12300
- <X className="size-5" />
12295
+ <X className="size-6" aria-hidden="true" />
12301
12296
  </button>
12302
12297
  </div>
12303
12298
 
@@ -12313,7 +12308,7 @@ const PlanUpgradeModal = React.forwardRef(
12313
12308
  aria-pressed={isSelected}
12314
12309
  >
12315
12310
  <span className={iconContainerVariants()}>{renderOptionIcon(option.icon)}</span>
12316
- <span className="text-sm leading-normal tracking-[0.035px] text-semantic-text-primary">
12311
+ <span className="min-w-0 flex-1 text-left text-sm leading-normal tracking-[0.035px] text-semantic-text-primary">
12317
12312
  {option.label}
12318
12313
  </span>
12319
12314
  </button>
@@ -12321,13 +12316,13 @@ const PlanUpgradeModal = React.forwardRef(
12321
12316
  })}
12322
12317
  </div>
12323
12318
 
12324
- <div className="flex justify-end">
12319
+ <div className="flex justify-stretch sm:justify-end">
12325
12320
  <Button
12326
12321
  variant="default"
12327
12322
  onClick={handleNext}
12328
12323
  disabled={!activeOptionId}
12329
12324
  loading={loading}
12330
- className="min-w-[95px]"
12325
+ className="w-full min-w-0 sm:w-auto sm:min-w-[95px]"
12331
12326
  >
12332
12327
  {nextLabel}
12333
12328
  </Button>
@@ -12434,11 +12429,11 @@ import type {
12434
12429
  } from "./types";
12435
12430
 
12436
12431
  const modalRootVariants = cva(
12437
- "flex flex-col gap-8 rounded-lg border border-solid border-semantic-border-layout bg-semantic-bg-primary p-9"
12432
+ "flex max-h-[min(90vh,calc(100dvh-2rem))] flex-col gap-4 overflow-y-auto rounded-lg border border-solid border-semantic-border-layout bg-semantic-bg-primary p-4 sm:gap-6 sm:p-6 md:gap-8 md:p-9"
12438
12433
  );
12439
12434
 
12440
12435
  const summaryPanelVariants = cva(
12441
- "flex flex-col gap-5 rounded border border-solid border-semantic-border-layout bg-semantic-bg-ui p-4"
12436
+ "flex flex-col gap-4 rounded border border-solid border-semantic-border-layout bg-semantic-bg-ui p-3 sm:gap-5 sm:p-4"
12442
12437
  );
12443
12438
 
12444
12439
  const statusTitleVariants = cva("m-0 text-sm font-semibold leading-5 tracking-[0.014px]", {
@@ -12566,12 +12561,12 @@ const PlanUpgradeSummaryModal = React.forwardRef(
12566
12561
  <DialogContent
12567
12562
  size="default"
12568
12563
  hideCloseButton
12569
- className="w-full max-w-[660px] border-none bg-transparent p-0 shadow-none"
12564
+ className="min-w-0 w-full max-w-[min(41.25rem,calc(100vw-2rem))] border-none bg-transparent p-0 shadow-none"
12570
12565
  >
12571
12566
  <div ref={ref} className={cn(modalRootVariants(), className)} {...props}>
12572
- <div className="flex items-start justify-between gap-4">
12573
- <div className="flex flex-col gap-2">
12574
- <DialogTitle className="m-0 text-lg font-semibold leading-normal text-semantic-text-primary">
12567
+ <div className="flex items-start justify-between gap-3 sm:gap-4">
12568
+ <div className="flex min-w-0 flex-1 flex-col gap-2">
12569
+ <DialogTitle className="m-0 text-base font-semibold leading-normal text-semantic-text-primary sm:text-lg">
12575
12570
  {resolvedTitle}
12576
12571
  </DialogTitle>
12577
12572
  <DialogDescription className="m-0 text-sm tracking-[0.035px] text-semantic-text-muted">
@@ -12581,7 +12576,7 @@ const PlanUpgradeSummaryModal = React.forwardRef(
12581
12576
  <button
12582
12577
  type="button"
12583
12578
  onClick={handleClose}
12584
- className="shrink-0 text-semantic-text-muted transition-colors hover:text-semantic-text-primary"
12579
+ className="shrink-0 text-semantic-text-muted transition-colors hover:text-semantic-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-focus focus-visible:ring-offset-2"
12585
12580
  aria-label={closeAriaLabel}
12586
12581
  >
12587
12582
  <X className="size-6" />
@@ -12589,9 +12584,9 @@ const PlanUpgradeSummaryModal = React.forwardRef(
12589
12584
  </div>
12590
12585
 
12591
12586
  <div className={summaryPanelVariants()}>
12592
- <div className="flex items-start gap-4">
12587
+ <div className="flex flex-col gap-3 sm:flex-row sm:items-start sm:gap-4">
12593
12588
  <span className="shrink-0">{getStatusIcon(resolvedTone)}</span>
12594
- <div className="flex flex-col gap-1">
12589
+ <div className="flex min-w-0 flex-col gap-1">
12595
12590
  <p className={statusTitleVariants({ tone: resolvedTone })}>
12596
12591
  {resolvedStatus.title}
12597
12592
  </p>
@@ -12607,33 +12602,43 @@ const PlanUpgradeSummaryModal = React.forwardRef(
12607
12602
  {resolvedRows.map((row) => (
12608
12603
  <div
12609
12604
  key={\`\${row.label}-\${row.value}\`}
12610
- className="flex items-center justify-between gap-6"
12605
+ className="flex flex-col gap-1 sm:flex-row sm:items-center sm:justify-between sm:gap-6"
12611
12606
  >
12612
- <span className="text-sm tracking-[0.035px] text-semantic-text-secondary">
12607
+ <span className="min-w-0 text-sm tracking-[0.035px] text-semantic-text-secondary">
12613
12608
  {row.label}
12614
12609
  </span>
12615
- <span className="text-sm tracking-[0.035px] text-semantic-text-primary">
12610
+ <span className="min-w-0 shrink-0 text-left text-sm tracking-[0.035px] text-semantic-text-primary sm:text-right">
12616
12611
  {row.value}
12617
12612
  </span>
12618
12613
  </div>
12619
12614
  ))}
12620
12615
  </div>
12621
12616
 
12622
- <div className="flex items-center justify-between gap-6 border-t border-solid border-semantic-border-layout pt-3">
12617
+ <div className="flex flex-col gap-1 border-t border-solid border-semantic-border-layout pt-3 sm:flex-row sm:items-center sm:justify-between sm:gap-6">
12623
12618
  <span className="text-sm font-semibold tracking-[0.014px] text-semantic-text-secondary">
12624
12619
  {totalLabel}
12625
12620
  </span>
12626
- <span className="text-sm font-semibold tracking-[0.014px] text-semantic-text-primary">
12621
+ <span className="text-sm font-semibold tracking-[0.014px] text-semantic-text-primary sm:text-right">
12627
12622
  {resolvedTotalValue}
12628
12623
  </span>
12629
12624
  </div>
12630
12625
  </div>
12631
12626
 
12632
- <div className="flex justify-end gap-2.5">
12633
- <Button variant="outline" onClick={handleCancel}>
12627
+ <div className="flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:gap-2.5">
12628
+ <Button
12629
+ variant="outline"
12630
+ onClick={handleCancel}
12631
+ className="w-full sm:w-auto"
12632
+ >
12634
12633
  {cancelLabel}
12635
12634
  </Button>
12636
- <Button variant="primary" onClick={onPrimaryAction} loading={loading} disabled={disabled}>
12635
+ <Button
12636
+ variant="primary"
12637
+ onClick={onPrimaryAction}
12638
+ loading={loading}
12639
+ disabled={disabled}
12640
+ className="w-full sm:w-auto"
12641
+ >
12637
12642
  {resolvedPrimaryActionLabel}
12638
12643
  </Button>
12639
12644
  </div>
@@ -20458,6 +20463,7 @@ const BotIdentityCard = React.forwardRef(
20458
20463
 
20459
20464
  <Field
20460
20465
  label="Primary Role"
20466
+ helperText="Defines what the bot does. Choose from the list or type a custom role."
20461
20467
  characterCount={{
20462
20468
  current: (data.primaryRole ?? "").length,
20463
20469
  max: PRIMARY_ROLE_MAX_LENGTH,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-ui",
3
- "version": "0.0.228",
3
+ "version": "0.0.230",
4
4
  "description": "CLI for adding myOperator UI components to your project",
5
5
  "type": "module",
6
6
  "exports": "./dist/index.js",