myoperator-ui 0.0.218 → 0.0.220
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.js +23 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4011,6 +4011,7 @@ const MultiSelect = React.forwardRef(
|
|
|
4011
4011
|
// Generate unique IDs for accessibility
|
|
4012
4012
|
const generatedId = React.useId();
|
|
4013
4013
|
const selectId = id || generatedId;
|
|
4014
|
+
const listboxId = \`\${selectId}-listbox\`;
|
|
4014
4015
|
const helperId = \`\${selectId}-helper\`;
|
|
4015
4016
|
const errorId = \`\${selectId}-error\`;
|
|
4016
4017
|
|
|
@@ -4124,6 +4125,7 @@ const MultiSelect = React.forwardRef(
|
|
|
4124
4125
|
role="combobox"
|
|
4125
4126
|
aria-expanded={isOpen}
|
|
4126
4127
|
aria-haspopup="listbox"
|
|
4128
|
+
aria-controls={listboxId}
|
|
4127
4129
|
aria-invalid={!!error}
|
|
4128
4130
|
aria-describedby={ariaDescribedBy}
|
|
4129
4131
|
disabled={disabled || loading}
|
|
@@ -4203,6 +4205,7 @@ const MultiSelect = React.forwardRef(
|
|
|
4203
4205
|
{/* Dropdown */}
|
|
4204
4206
|
{isOpen && (
|
|
4205
4207
|
<div
|
|
4208
|
+
id={listboxId}
|
|
4206
4209
|
className={cn(
|
|
4207
4210
|
"absolute z-50 mt-1 w-full rounded bg-semantic-bg-primary border border-semantic-border-layout shadow-md",
|
|
4208
4211
|
"top-full"
|
|
@@ -4394,6 +4397,7 @@ const CreatableSelect = React.forwardRef(
|
|
|
4394
4397
|
const containerRef = React.useRef<HTMLDivElement>(null)
|
|
4395
4398
|
const inputRef = React.useRef<HTMLInputElement>(null)
|
|
4396
4399
|
const listRef = React.useRef<HTMLDivElement>(null)
|
|
4400
|
+
const listboxId = React.useId()
|
|
4397
4401
|
|
|
4398
4402
|
// Merge forwarded ref with internal ref
|
|
4399
4403
|
React.useImperativeHandle(ref, () => containerRef.current!)
|
|
@@ -4536,6 +4540,7 @@ const CreatableSelect = React.forwardRef(
|
|
|
4536
4540
|
placeholder={selectedLabel || placeholder}
|
|
4537
4541
|
aria-expanded="true"
|
|
4538
4542
|
aria-haspopup="listbox"
|
|
4543
|
+
aria-controls={listboxId}
|
|
4539
4544
|
role="combobox"
|
|
4540
4545
|
aria-autocomplete="list"
|
|
4541
4546
|
/>
|
|
@@ -4552,6 +4557,7 @@ const CreatableSelect = React.forwardRef(
|
|
|
4552
4557
|
)}
|
|
4553
4558
|
aria-haspopup="listbox"
|
|
4554
4559
|
aria-expanded="false"
|
|
4560
|
+
aria-controls={listboxId}
|
|
4555
4561
|
>
|
|
4556
4562
|
<span
|
|
4557
4563
|
className={cn(
|
|
@@ -4581,6 +4587,7 @@ const CreatableSelect = React.forwardRef(
|
|
|
4581
4587
|
{/* Options list */}
|
|
4582
4588
|
<div
|
|
4583
4589
|
ref={listRef}
|
|
4590
|
+
id={listboxId}
|
|
4584
4591
|
role="listbox"
|
|
4585
4592
|
className="max-h-60 overflow-y-auto p-1"
|
|
4586
4593
|
>
|
|
@@ -4739,6 +4746,7 @@ const CreatableMultiSelect = React.forwardRef(
|
|
|
4739
4746
|
const [inputValue, setInputValue] = React.useState("")
|
|
4740
4747
|
const containerRef = React.useRef<HTMLDivElement>(null)
|
|
4741
4748
|
const inputRef = React.useRef<HTMLInputElement>(null)
|
|
4749
|
+
const listboxId = React.useId()
|
|
4742
4750
|
|
|
4743
4751
|
React.useImperativeHandle(ref, () => containerRef.current!)
|
|
4744
4752
|
|
|
@@ -4876,6 +4884,7 @@ const CreatableMultiSelect = React.forwardRef(
|
|
|
4876
4884
|
className="flex-1 min-w-[100px] text-base bg-transparent outline-none text-semantic-text-primary placeholder:text-semantic-text-muted"
|
|
4877
4885
|
role="combobox"
|
|
4878
4886
|
aria-expanded={isOpen}
|
|
4887
|
+
aria-controls={listboxId}
|
|
4879
4888
|
aria-haspopup="listbox"
|
|
4880
4889
|
/>
|
|
4881
4890
|
|
|
@@ -4889,7 +4898,7 @@ const CreatableMultiSelect = React.forwardRef(
|
|
|
4889
4898
|
|
|
4890
4899
|
{/* Dropdown panel */}
|
|
4891
4900
|
{isOpen && (
|
|
4892
|
-
<div className="absolute z-[9999] top-full mt-1 w-full bg-semantic-bg-primary border border-semantic-border-layout rounded shadow-md animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-200">
|
|
4901
|
+
<div id={listboxId} role="listbox" className="absolute z-[9999] top-full mt-1 w-full bg-semantic-bg-primary border border-semantic-border-layout rounded shadow-md animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-200">
|
|
4893
4902
|
{/* Creatable hint \u2014 Enter key */}
|
|
4894
4903
|
<div className="flex items-center justify-between px-4 py-2 border-b border-semantic-border-layout">
|
|
4895
4904
|
<span className="text-sm text-semantic-text-muted">
|
|
@@ -6708,12 +6717,14 @@ Alert.displayName = "Alert";
|
|
|
6708
6717
|
/**
|
|
6709
6718
|
* Alert title component for the heading text.
|
|
6710
6719
|
*/
|
|
6711
|
-
const AlertTitle = React.forwardRef(({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>, ref: React.Ref<HTMLHeadingElement>) => (
|
|
6720
|
+
const AlertTitle = React.forwardRef(({ className, children, ...props }: React.HTMLAttributes<HTMLHeadingElement>, ref: React.Ref<HTMLHeadingElement>) => (
|
|
6712
6721
|
<h5
|
|
6713
6722
|
ref={ref}
|
|
6714
6723
|
className={cn("font-semibold leading-tight tracking-tight", className)}
|
|
6715
6724
|
{...props}
|
|
6716
|
-
|
|
6725
|
+
>
|
|
6726
|
+
{children}
|
|
6727
|
+
</h5>
|
|
6717
6728
|
));
|
|
6718
6729
|
AlertTitle.displayName = "AlertTitle";
|
|
6719
6730
|
|
|
@@ -14406,6 +14417,7 @@ export const BotCard = React.forwardRef(
|
|
|
14406
14417
|
className={cn(
|
|
14407
14418
|
"relative bg-semantic-bg-primary border border-semantic-border-layout rounded-[5px] min-w-0 max-w-full overflow-hidden flex flex-col",
|
|
14408
14419
|
"shadow-[0px_4px_15.1px_0px_rgba(0,0,0,0.06)] p-3 sm:p-4 md:p-5",
|
|
14420
|
+
"min-h-[180px] sm:min-h-[207px] h-full shrink-0",
|
|
14409
14421
|
onEdit && "cursor-pointer",
|
|
14410
14422
|
className
|
|
14411
14423
|
)}
|
|
@@ -15109,8 +15121,9 @@ export const BotListGrid = React.forwardRef(
|
|
|
15109
15121
|
<div
|
|
15110
15122
|
ref={ref}
|
|
15111
15123
|
className={cn(
|
|
15112
|
-
"grid w-full min-w-0 max-w-full
|
|
15124
|
+
"grid w-full min-w-0 max-w-full content-start gap-3 sm:gap-5 md:gap-6",
|
|
15113
15125
|
"grid-cols-[repeat(auto-fill,minmax(min(100%,280px),1fr))]",
|
|
15126
|
+
"auto-rows-auto items-stretch",
|
|
15114
15127
|
className
|
|
15115
15128
|
)}
|
|
15116
15129
|
{...props}
|
|
@@ -17966,6 +17979,7 @@ function VarPopup({
|
|
|
17966
17979
|
key={v}
|
|
17967
17980
|
type="button"
|
|
17968
17981
|
role="option"
|
|
17982
|
+
aria-selected={false}
|
|
17969
17983
|
onMouseDown={(e) => { e.preventDefault(); onSelect(v); }}
|
|
17970
17984
|
className="relative flex w-full cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-semantic-bg-ui"
|
|
17971
17985
|
>
|
|
@@ -18024,6 +18038,7 @@ function VarPopup({
|
|
|
18024
18038
|
<button
|
|
18025
18039
|
type="button"
|
|
18026
18040
|
role="option"
|
|
18041
|
+
aria-selected={false}
|
|
18027
18042
|
onMouseDown={(e) => { e.preventDefault(); onSelect(insertValue); }}
|
|
18028
18043
|
className="relative flex flex-1 min-w-0 cursor-pointer select-none items-center px-2 py-1.5 text-sm outline-none"
|
|
18029
18044
|
>
|
|
@@ -19803,6 +19818,7 @@ function VarPopup({
|
|
|
19803
19818
|
key={v}
|
|
19804
19819
|
type="button"
|
|
19805
19820
|
role="option"
|
|
19821
|
+
aria-selected={false}
|
|
19806
19822
|
onMouseDown={(e) => {
|
|
19807
19823
|
e.preventDefault(); // keep textarea focused so blur doesn't close popup first
|
|
19808
19824
|
onSelect(v);
|
|
@@ -20041,7 +20057,7 @@ import {
|
|
|
20041
20057
|
TooltipTrigger,
|
|
20042
20058
|
} from "../tooltip";
|
|
20043
20059
|
import { BOT_KNOWLEDGE_STATUS } from "./types";
|
|
20044
|
-
import type { KnowledgeBaseFile } from "./types";
|
|
20060
|
+
import type { KnowledgeBaseFile, KnowledgeFileStatus } from "./types";
|
|
20045
20061
|
|
|
20046
20062
|
// \u2500\u2500\u2500 Types \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
20047
20063
|
|
|
@@ -20075,7 +20091,7 @@ export interface KnowledgeBaseCardProps {
|
|
|
20075
20091
|
// \u2500\u2500\u2500 Status config \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
20076
20092
|
|
|
20077
20093
|
type BadgeVariant = "default" | "active" | "destructive";
|
|
20078
|
-
const STATUS_CONFIG: Record<
|
|
20094
|
+
const STATUS_CONFIG: Record<KnowledgeFileStatus, { label: string; variant: BadgeVariant }> = {
|
|
20079
20095
|
[BOT_KNOWLEDGE_STATUS.PENDING]: { label: "Pending", variant: "default" },
|
|
20080
20096
|
[BOT_KNOWLEDGE_STATUS.READY]: { label: "Ready", variant: "active" },
|
|
20081
20097
|
[BOT_KNOWLEDGE_STATUS.PROCESSING]: { label: "Processing", variant: "active" },
|
|
@@ -20871,9 +20887,7 @@ export const BOT_KNOWLEDGE_STATUS = {
|
|
|
20871
20887
|
FAILED: "failed",
|
|
20872
20888
|
} as const;
|
|
20873
20889
|
|
|
20874
|
-
export type
|
|
20875
|
-
|
|
20876
|
-
export type KnowledgeFileStatus = BOT_KNOWLEDGE_STATUS;
|
|
20890
|
+
export type KnowledgeFileStatus = typeof BOT_KNOWLEDGE_STATUS[keyof typeof BOT_KNOWLEDGE_STATUS];
|
|
20877
20891
|
|
|
20878
20892
|
export interface KeyValuePair {
|
|
20879
20893
|
id: string;
|