@box/box-ai-agent-selector 0.52.6 → 0.53.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.
@@ -1,10 +1,10 @@
1
1
  export default {
2
- "boxAI.agentSelector.agent": "⟦萬 Αĝĕйţ 國⟧",
3
- "boxAI.agentSelector.agentList": "⟦萬萬 Αĝеиť Ľîśŧ 國國⟧",
4
- "boxAI.agentSelector.defaultAgent": "⟦萬萬 Ďèƒáµľţ 國國⟧",
5
- "boxAI.agentSelector.defaultStatus": "⟦萬萬 ÐЕ₣ΑŮĽŤ 國國⟧",
6
- "boxAI.agentSelector.errorMessage": "⟦萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬 ₣ąĭĺėď ťŏ ļσǻď āνãĩľāьĺě āġęпŧѕ. Ýσú'ŗё сцŗŕєńŧľў ůѕιлĝ Уòµя ŏґĝäηίźãŧìŏń'ş ďęƒαŭĺť ǻğéпţ. Ĉļīçķ нėŕέ ťò ŕėťřУ. 國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國⟧",
7
- "boxAI.agentSelector.errorTooltip": "⟦萬萬萬萬萬萬萬萬萬萬萬萬 ₣äϊļёď ţö ļŏãď ǻναîļäьĺė ăĝèήťŝ. Ťѓý ǻğåìл. 國國國國國國國國國國國國⟧",
8
- "boxAI.agentSelector.loadingMessage": "⟦萬萬萬萬萬萬萬 Ļöάďïʼnġ ăνäϊĺǻвļĕ αġěʼnţѕ 國國國國國國國⟧",
9
- "boxAI.agentSelector.selectAgent": "⟦萬萬萬萬 Ѕёļêĉţ âņ Àğέлŧ 國國國國⟧"
2
+ "boxAI.agentSelector.agent": "⟦萬 Àġеήτ 國⟧",
3
+ "boxAI.agentSelector.agentList": "⟦萬萬 Äġéиť Ĺïśţ 國國⟧",
4
+ "boxAI.agentSelector.defaultAgent": "⟦萬萬 Ďεƒâũĺţ 國國⟧",
5
+ "boxAI.agentSelector.defaultStatus": "⟦萬萬 ĎΈ₣ÅÛĻŦ 國國⟧",
6
+ "boxAI.agentSelector.errorMessage": "⟦萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬 ₣ãïļėď ŧό ĺŏãď áνáïľâвľе άġεπťś. Ύοŭ'ŕę ¢цяґέйτľý üŝіňğ ỳøüя οřĝāпĭżάţïοη'ѕ ďęƒáûľţ âĝěпŧ. Çľĩĉκ нèяê ŧø ŕèŧŕγ. 國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國⟧",
7
+ "boxAI.agentSelector.errorTooltip": "⟦萬萬萬萬萬萬萬萬萬萬萬萬 ₣ǻìĺėď ŧö ĺøǻď ăνǻιĺâьĺê ǻğĕиŧş. Ťѓÿ ąġάīπ. 國國國國國國國國國國國國⟧",
8
+ "boxAI.agentSelector.loadingMessage": "⟦萬萬萬萬萬萬萬 Ľόǻďїиğ àναϊļάьļé ãğёņτş 國國國國國國國⟧",
9
+ "boxAI.agentSelector.selectAgent": "⟦萬萬萬萬 Şēĺëçţ ǻņ Âġейτ 國國國國⟧"
10
10
  }
@@ -1,16 +1,16 @@
1
1
  # AI agent label
2
- boxAI.agentSelector.agent = ⟦萬 Αĝĕйţ 國⟧
2
+ boxAI.agentSelector.agent = ⟦萬 Àġеήτ 國⟧
3
3
  # Aria Label for the list displaying the agents
4
- boxAI.agentSelector.agentList = ⟦萬萬 Αĝеиť Ľîśŧ 國國⟧
4
+ boxAI.agentSelector.agentList = ⟦萬萬 Äġéиť Ĺïśţ 國國⟧
5
5
  # Label for the default agent used when no other agents are available
6
- boxAI.agentSelector.defaultAgent = ⟦萬萬 Ďèƒáµľţ 國國⟧
6
+ boxAI.agentSelector.defaultAgent = ⟦萬萬 Ďεƒâũĺţ 國國⟧
7
7
  # Status indicator to define whether or not the agent on the list is the default for the enterprise
8
- boxAI.agentSelector.defaultStatus = ⟦萬萬 ÐЕ₣ΑŮĽŤ 國國⟧
8
+ boxAI.agentSelector.defaultStatus = ⟦萬萬 ĎΈ₣ÅÛĻŦ 國國⟧
9
9
  # Error message for retry option when the agents failed to load
10
- boxAI.agentSelector.errorMessage = ⟦萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬 ₣ąĭĺėď ťŏ ļσǻď āνãĩľāьĺě āġęпŧѕ. Ýσú'ŗё сцŗŕєńŧľў ůѕιлĝ Уòµя ŏґĝäηίźãŧìŏń'ş ďęƒαŭĺť ǻğéпţ. Ĉļīçķ нėŕέ ťò ŕėťřУ. 國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國⟧
10
+ boxAI.agentSelector.errorMessage = ⟦萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬 ₣ãïļėď ŧό ĺŏãď áνáïľâвľе άġεπťś. Ύοŭ'ŕę ¢цяґέйτľý üŝіňğ ỳøüя οřĝāпĭżάţïοη'ѕ ďęƒáûľţ âĝěпŧ. Çľĩĉκ нèяê ŧø ŕèŧŕγ. 國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國國⟧
11
11
  # Error tooltip content for agent selector when the agents failed to load
12
- boxAI.agentSelector.errorTooltip = ⟦萬萬萬萬萬萬萬萬萬萬萬萬 ₣äϊļёď ţö ļŏãď ǻναîļäьĺė ăĝèήťŝ. Ťѓý ǻğåìл. 國國國國國國國國國國國國⟧
12
+ boxAI.agentSelector.errorTooltip = ⟦萬萬萬萬萬萬萬萬萬萬萬萬 ₣ǻìĺėď ŧö ĺøǻď ăνǻιĺâьĺê ǻğĕиŧş. Ťѓÿ ąġάīπ. 國國國國國國國國國國國國⟧
13
13
  # Message for loading indicator while loading available agents
14
- boxAI.agentSelector.loadingMessage = ⟦萬萬萬萬萬萬萬 Ļöάďïʼnġ ăνäϊĺǻвļĕ αġěʼnţѕ 國國國國國國國⟧
14
+ boxAI.agentSelector.loadingMessage = ⟦萬萬萬萬萬萬萬 Ľόǻďїиğ àναϊļάьļé ãğёņτş 國國國國國國國⟧
15
15
  # Label for the AI agent selector when the user has not selected any agent
16
- boxAI.agentSelector.selectAgent = ⟦萬萬萬萬 Ѕёļêĉţ âņ Àğέлŧ 國國國國⟧
16
+ boxAI.agentSelector.selectAgent = ⟦萬萬萬萬 Şēĺëçţ ǻņ Âġейτ 國國國國⟧
@@ -1 +1 @@
1
- ._agentSelector_f2uiq_1{margin-inline-start:.75rem}._agentSelectorButton_f2uiq_4{background:transparent;border:0}._agentSelector_f2uiq_1 ._agentStatus_f2uiq_8{margin-inline-start:.5rem}._agentSelector_f2uiq_1 ._agentStatus_f2uiq_8>span{background:linear-gradient(#f4f4f4 0,#f4f4f4 0) padding-box,linear-gradient(135deg,#fe01da,#2486fc) border-box;border:.0625rem solid rgba(0,0,0,0)}._agentSelector_f2uiq_1 ._agentStatus_f2uiq_8>span span{color:transparent;text-transform:uppercase;background:linear-gradient(135deg,#fe01da,#2486fc);-webkit-background-clip:text;background-clip:text}._agentSelector_f2uiq_1 ._agentLoader_f2uiq_21{position:inherit}._agentSelector_f2uiq_1 ._agentError_f2uiq_24 path{fill:#d5324e}._agentSelector_f2uiq_1 ._triggerChip_f2uiq_27{display:flex;max-width:376px;text-align:start;background-color:#faf5fe}._agentSelector_f2uiq_1 ._triggerChip_f2uiq_27 ._agentLabel_f2uiq_33{flex-grow:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._agentSelector_f2uiq_1 ._triggerChip_f2uiq_27 ._dropdownIndicator_f2uiq_39{flex-shrink:0;margin-inline-start:0}._agentSelector_f2uiq_1 ._triggerChip_f2uiq_27 ._dropdownIndicator_f2uiq_39 svg{margin-inline-start:0}._agentSelector_f2uiq_1 ._triggerChip_f2uiq_27:disabled ._dropdownIndicator_f2uiq_39{opacity:.3}@media (max-width: 374px){._agentSelector_f2uiq_1 ._triggerChip_f2uiq_27{width:100%}}._agentSelector_f2uiq_1._sidebar_f2uiq_54{margin:0 .25rem 0 0;margin-inline-start:0}@media (max-width: 767px){._agentSelector_f2uiq_1._sidebar_f2uiq_54{width:100%}}._agentSelector_f2uiq_1._sidebar_f2uiq_54 ._triggerChip_f2uiq_27{max-width:246px}._agentListRetryButton_f2uiq_67[data-target-id]{max-width:320px;margin:.25rem;text-wrap:wrap}._agentListRetryButton_f2uiq_67[data-target-id]._sidebar_f2uiq_54{max-width:184px}._agentList_f2uiq_67{display:flex;flex-wrap:wrap;row-gap:var(--space-2)}._agentList_f2uiq_67:focus-visible{outline:0}._agentList_f2uiq_67>[role=option]{display:flex;width:100%;overflow:hidden;border-radius:var(--radius-4)}._agentList_f2uiq_67>[role=option][data-focus-visible],._agentList_f2uiq_67>[role=option][data-active-item]{background:var(--item-hover)}._agentList_f2uiq_67>[role=option][data-focus-visible]{--actions-opacity: 1;outline:var(--border-2) solid var(--outline-focus-on-light);outline-offset:calc(var(--border-4) * -1)}._agentListItemIcon_f2uiq_99{width:2rem;height:2rem}._agentListContainer_f2uiq_104{--item-hover: var(--surface-item-small-surface-hover);min-width:320px;max-width:376px;z-index:2;box-sizing:border-box;width:360px;padding:var(--space-3);overflow:hidden;background:var(--surface-card-surface);border-radius:var(--radius-4);box-shadow:var(--dropshadow-3);margin-block:var(--space-1)}@media (max-width: 376px){._agentListContainer_f2uiq_104{max-width:320px;margin-left:-.5rem}}._agentListContainer_f2uiq_104:focus-visible{outline:0}._agentListContainer_f2uiq_104>[role=listbox]{display:flex;width:100%;max-height:32.5rem;overflow:hidden auto;border-radius:var(--radius-4)}._agentListContainer_f2uiq_104>[role=listbox][data-focus-visible]{outline:0}._agentListContainer_f2uiq_104._sidebar_f2uiq_54{min-width:320px;max-width:360px;transform:translate(-6px)}@media (max-width: 360px){._agentListContainer_f2uiq_104._sidebar_f2uiq_54{max-width:320px;margin-left:-.5rem}}@media (max-width: 767px){._agentListContainer_f2uiq_104._sidebar_f2uiq_54{width:auto;max-width:unset}}
1
+ ._agentSelector_1x7bs_1._agentAlignmentLeft_1x7bs_1{margin-left:0}._agentSelector_1x7bs_1._agentAlignmentOffsetFromLeft_1x7bs_4{margin-inline-start:.75rem}._agentSelectorButton_1x7bs_7{background:transparent;border:0}._agentSelector_1x7bs_1 ._agentStatus_1x7bs_11{margin-inline-start:.5rem}._agentSelector_1x7bs_1 ._agentStatus_1x7bs_11>span{background:linear-gradient(#f4f4f4 0,#f4f4f4 0) padding-box,linear-gradient(135deg,#fe01da,#2486fc) border-box;border:.0625rem solid rgba(0,0,0,0)}._agentSelector_1x7bs_1 ._agentStatus_1x7bs_11>span span{color:transparent;text-transform:uppercase;background:linear-gradient(135deg,#fe01da,#2486fc);-webkit-background-clip:text;background-clip:text}._agentSelector_1x7bs_1 ._agentLoader_1x7bs_24{position:inherit}._agentSelector_1x7bs_1 ._agentError_1x7bs_27 path{fill:#d5324e}._agentSelector_1x7bs_1 ._triggerChip_1x7bs_30{display:flex;max-width:376px;text-align:start;background-color:#faf5fe}._agentSelector_1x7bs_1 ._triggerChip_1x7bs_30 ._agentLabel_1x7bs_36{flex-grow:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._agentSelector_1x7bs_1 ._triggerChip_1x7bs_30 ._dropdownIndicator_1x7bs_42{flex-shrink:0;margin-inline-start:0}._agentSelector_1x7bs_1 ._triggerChip_1x7bs_30 ._dropdownIndicator_1x7bs_42 svg{margin-inline-start:0}._agentSelector_1x7bs_1 ._triggerChip_1x7bs_30:disabled ._dropdownIndicator_1x7bs_42{opacity:.3}@media (max-width: 374px){._agentSelector_1x7bs_1 ._triggerChip_1x7bs_30{width:100%}}._agentSelector_1x7bs_1._sidebar_1x7bs_57{margin:0 .25rem 0 0;margin-inline-start:0}@media (max-width: 767px){._agentSelector_1x7bs_1._sidebar_1x7bs_57{width:100%}}._agentSelector_1x7bs_1._sidebar_1x7bs_57 ._triggerChip_1x7bs_30{max-width:246px}._agentListRetryButton_1x7bs_70[data-target-id]{max-width:320px;margin:.25rem;text-wrap:wrap}._agentListRetryButton_1x7bs_70[data-target-id]._sidebar_1x7bs_57{max-width:184px}._agentList_1x7bs_70{display:flex;flex-wrap:wrap;row-gap:var(--space-2)}._agentList_1x7bs_70:focus-visible{outline:0}._agentList_1x7bs_70>[role=option]{display:flex;width:100%;overflow:hidden;border-radius:var(--radius-4)}._agentList_1x7bs_70>[role=option][data-focus-visible],._agentList_1x7bs_70>[role=option][data-active-item]{background:var(--item-hover)}._agentList_1x7bs_70>[role=option][data-focus-visible]{--actions-opacity: 1;outline:var(--border-2) solid var(--outline-focus-on-light);outline-offset:calc(var(--border-4) * -1)}._agentListItemIcon_1x7bs_102{width:2rem;height:2rem}._agentListContainer_1x7bs_107{--item-hover: var(--surface-item-small-surface-hover);min-width:320px;max-width:376px;z-index:2;box-sizing:border-box;width:360px;padding:var(--space-3);overflow:hidden;background:var(--surface-card-surface);border-radius:var(--radius-4);box-shadow:var(--dropshadow-3);margin-block:var(--space-1)}@media (max-width: 376px){._agentListContainer_1x7bs_107{max-width:320px;margin-left:-.5rem}}._agentListContainer_1x7bs_107:focus-visible{outline:0}._agentListContainer_1x7bs_107>[role=listbox]{display:flex;width:100%;max-height:32.5rem;overflow:hidden auto;border-radius:var(--radius-4)}._agentListContainer_1x7bs_107>[role=listbox][data-focus-visible]{outline:0}._agentListContainer_1x7bs_107._sidebar_1x7bs_57{min-width:320px;max-width:360px;transform:translate(-6px)}@media (max-width: 360px){._agentListContainer_1x7bs_107._sidebar_1x7bs_57{max-width:320px;margin-left:-.5rem}}@media (max-width: 767px){._agentListContainer_1x7bs_107._sidebar_1x7bs_57{width:auto;max-width:unset}}
@@ -1,3 +1,3 @@
1
1
  import { BoxAiAgentSelectorWithApiProps } from './types';
2
- export declare function BoxAiAgentSelectorWithApiContainer({ fetcher, hostAppName, onSelectAgent, onSelectedAgentCallback, recordAction, requestState, disabled, shouldHideAgentSelectorOnLoad, triggerChipClassName, contentClassName, useAgentLocalStorage, }: BoxAiAgentSelectorWithApiProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function BoxAiAgentSelectorWithApiContainer({ fetcher, hostAppName, onSelectAgent, onSelectedAgentCallback, recordAction, requestState, disabled, selectorAlignment, shouldHideAgentSelectorOnLoad, triggerChipClassName, contentClassName, useAgentLocalStorage, }: BoxAiAgentSelectorWithApiProps): import("react/jsx-runtime").JSX.Element;
3
3
  export default BoxAiAgentSelectorWithApiContainer;
@@ -1,4 +1,4 @@
1
1
  import { BoxAiAgentSelectorWithApiProps } from './types';
2
- export declare function BoxAiAgentSelectorWithApi({ fetcher, hostAppName, onSelectAgent, onSelectedAgentCallback, recordAction, requestState: requestStateProp, disabled, onAgentsListOpen, shouldHideAgentSelectorOnLoad, triggerChipClassName, contentClassName, useAgentLocalStorage, // All non-Box AI Q&A experiences should pass in false
2
+ export declare function BoxAiAgentSelectorWithApi({ fetcher, hostAppName, onSelectAgent, onSelectedAgentCallback, recordAction, requestState: requestStateProp, disabled, onAgentsListOpen, selectorAlignment, shouldHideAgentSelectorOnLoad, triggerChipClassName, contentClassName, useAgentLocalStorage, // All non-Box AI Q&A experiences should pass in false
3
3
  variant, }: BoxAiAgentSelectorWithApiProps): import("react/jsx-runtime").JSX.Element | null;
4
4
  export default BoxAiAgentSelectorWithApi;
@@ -1,4 +1,4 @@
1
1
  import { BoxAiAgentSelectorProps } from './types';
2
- export declare function BoxAiAgentSelector({ agents, contentClassName, onErrorAction, recordAction, requestState, disabled, onAgentsListOpen, selectedAgent, triggerChipClassName, useAgentLocalStorage, // All non-Box AI Q&A experiences should pass in true
2
+ export declare function BoxAiAgentSelector({ agents, contentClassName, onErrorAction, recordAction, requestState, disabled, onAgentsListOpen, selectedAgent, selectorAlignment, triggerChipClassName, useAgentLocalStorage, // All non-Box AI Q&A experiences should pass in true
3
3
  variant, }: BoxAiAgentSelectorProps): import("react/jsx-runtime").JSX.Element;
4
4
  export default BoxAiAgentSelector;
@@ -18,6 +18,10 @@ export declare enum REQUEST_STATE {
18
18
  ERROR = "error",
19
19
  CANCELLED = "cancelled"
20
20
  }
21
+ export declare enum SELECTOR_ALIGNMENT {
22
+ LEFT = "left",
23
+ OFFSET_FROM_LEFT = "offset_from_left"
24
+ }
21
25
  export type AgentState = {
22
26
  agents: AgentType[];
23
27
  requestState: REQUEST_STATE;
@@ -77,6 +81,11 @@ export interface BoxAiAgentSelectorWithApiProps {
77
81
  disabled?: boolean;
78
82
  /** Callback function when user opens agents list */
79
83
  onAgentsListOpen?: () => void;
84
+ /**
85
+ * Alignment of the agent selector, either left or offset from left.
86
+ * @default SELECTOR_ALIGNMENT.OFFSET_FROM_LEFT
87
+ */
88
+ selectorAlignment?: SELECTOR_ALIGNMENT;
80
89
  /**
81
90
  * Determines whether the agent selector component should remain hidden
82
91
  * until the initial data fetch is complete.
@@ -120,6 +129,10 @@ export interface BoxAiAgentSelectorProps {
120
129
  * The currently selected agent, or null if no agent is selected.
121
130
  */
122
131
  selectedAgent: AgentType | null;
132
+ /**
133
+ * Alignment of the agent selector, either left or offset from left.
134
+ */
135
+ selectorAlignment?: SELECTOR_ALIGNMENT;
123
136
  triggerChipClassName?: string;
124
137
  useAgentLocalStorage?: boolean;
125
138
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/box-ai-agent-selector",
3
- "version": "0.52.6",
3
+ "version": "0.53.1",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
6
  "@ariakit/react": "^0.4.15",
@@ -13,10 +13,10 @@
13
13
  "devDependencies": {
14
14
  "@ariakit/react": "^0.4.15",
15
15
  "@box/babel-plugin-target-attributes": "1.3.0",
16
- "@box/blueprint-web": "^12.59.1",
17
- "@box/blueprint-web-assets": "^4.63.0",
16
+ "@box/blueprint-web": "^12.59.2",
17
+ "@box/blueprint-web-assets": "^4.64.0",
18
18
  "@box/eslint-plugin-blueprint": "^1.0.3",
19
- "@box/storybook-utils": "^0.13.18",
19
+ "@box/storybook-utils": "^0.13.19",
20
20
  "@testing-library/react": "^15.0.6",
21
21
  "react-intl": "^6.4.2"
22
22
  },