@dxos/shell 0.8.0 → 0.8.1-main.303c73a
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/bundle/shell.js +2708 -2706
- package/dist/bundle/shell.js.map +1 -1
- package/dist/bundle/shell.umd.cjs +59 -59
- package/dist/bundle/shell.umd.cjs.map +1 -1
- package/dist/types/src/components/AgentConfig.d.ts +2 -1
- package/dist/types/src/components/AgentConfig.d.ts.map +1 -1
- package/dist/types/src/components/AgentConfig.js +38 -15
- package/dist/types/src/components/AgentConfig.js.map +1 -1
- package/dist/types/src/components/AuthCode.d.ts +2 -2
- package/dist/types/src/components/AuthCode.d.ts.map +1 -1
- package/dist/types/src/components/AuthCode.js +4 -3
- package/dist/types/src/components/AuthCode.js.map +1 -1
- package/dist/types/src/components/CompoundButton/CompoundButton.d.ts +2 -2
- package/dist/types/src/components/CompoundButton/CompoundButton.d.ts.map +1 -1
- package/dist/types/src/components/CompoundButton/CompoundButton.js +10 -2
- package/dist/types/src/components/CompoundButton/CompoundButton.js.map +1 -1
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.d.ts +8 -7
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.d.ts.map +1 -1
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.js +9 -7
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.js.map +1 -1
- package/dist/types/src/components/DeviceList/DeviceList.d.ts +2 -1
- package/dist/types/src/components/DeviceList/DeviceList.d.ts.map +1 -1
- package/dist/types/src/components/DeviceList/DeviceList.js +11 -4
- package/dist/types/src/components/DeviceList/DeviceList.js.map +1 -1
- package/dist/types/src/components/DeviceList/DeviceListItem.js +23 -4
- package/dist/types/src/components/DeviceList/DeviceListItem.js.map +1 -1
- package/dist/types/src/components/IdentityList/IdentityListItem.js +6 -3
- package/dist/types/src/components/IdentityList/IdentityListItem.js.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.d.ts +3 -2
- package/dist/types/src/components/IdentityList/SpaceMemberList.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.js +6 -6
- package/dist/types/src/components/IdentityList/SpaceMemberList.js.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.d.ts +3 -2
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.js +2 -2
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.js.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationList.d.ts +2 -2
- package/dist/types/src/components/InvitationList/InvitationList.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationList.js +8 -5
- package/dist/types/src/components/InvitationList/InvitationList.js.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationList.stories.d.ts +3 -2
- package/dist/types/src/components/InvitationList/InvitationList.stories.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationList.stories.js +2 -2
- package/dist/types/src/components/InvitationList/InvitationList.stories.js.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListContainer.d.ts +2 -1
- package/dist/types/src/components/InvitationList/InvitationListContainer.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListContainer.js +2 -3
- package/dist/types/src/components/InvitationList/InvitationListContainer.js.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListItem.d.ts +3 -3
- package/dist/types/src/components/InvitationList/InvitationListItem.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListItem.js +34 -5
- package/dist/types/src/components/InvitationList/InvitationListItem.js.map +1 -1
- package/dist/types/src/components/Panel/Action.js +23 -6
- package/dist/types/src/components/Panel/Action.js.map +1 -1
- package/dist/types/src/components/Panel/Actions.js +2 -3
- package/dist/types/src/components/Panel/Actions.js.map +1 -1
- package/dist/types/src/components/Panel/CloseButton.d.ts +2 -1
- package/dist/types/src/components/Panel/CloseButton.d.ts.map +1 -1
- package/dist/types/src/components/Panel/CloseButton.js +4 -2
- package/dist/types/src/components/Panel/CloseButton.js.map +1 -1
- package/dist/types/src/components/Panel/Emoji.d.ts +3 -3
- package/dist/types/src/components/Panel/Emoji.d.ts.map +1 -1
- package/dist/types/src/components/Panel/Emoji.js +8 -3
- package/dist/types/src/components/Panel/Emoji.js.map +1 -1
- package/dist/types/src/components/Panel/Heading.js +6 -3
- package/dist/types/src/components/Panel/Heading.js.map +1 -1
- package/dist/types/src/components/Panel/Input.d.ts +2 -2
- package/dist/types/src/components/Panel/Input.d.ts.map +1 -1
- package/dist/types/src/components/Panel/Input.js +8 -2
- package/dist/types/src/components/Panel/Input.js.map +1 -1
- package/dist/types/src/components/Panel/Label.d.ts +2 -2
- package/dist/types/src/components/Panel/Label.d.ts.map +1 -1
- package/dist/types/src/components/Panel/Label.js +5 -2
- package/dist/types/src/components/Panel/Label.js.map +1 -1
- package/dist/types/src/components/Panel/Panel.stories.d.ts +4 -3
- package/dist/types/src/components/Panel/Panel.stories.d.ts.map +1 -1
- package/dist/types/src/components/Panel/Panel.stories.js +15 -3
- package/dist/types/src/components/Panel/Panel.stories.js.map +1 -1
- package/dist/types/src/components/Panel/StepHeading.js +2 -3
- package/dist/types/src/components/Panel/StepHeading.js.map +1 -1
- package/dist/types/src/components/SpaceListItem.js +6 -3
- package/dist/types/src/components/SpaceListItem.js.map +1 -1
- package/dist/types/src/components/StorybookDialog.d.ts +2 -2
- package/dist/types/src/components/StorybookDialog.d.ts.map +1 -1
- package/dist/types/src/components/StorybookDialog.js +8 -2
- package/dist/types/src/components/StorybookDialog.js.map +1 -1
- package/dist/types/src/components/Viewport/Viewport.d.ts +2 -2
- package/dist/types/src/components/Viewport/Viewport.js +5 -5
- package/dist/types/src/components/Viewport/Viewport.js.map +1 -1
- package/dist/types/src/components/Viewport/Viewport.stories.d.ts +2 -1
- package/dist/types/src/components/Viewport/Viewport.stories.d.ts.map +1 -1
- package/dist/types/src/components/Viewport/Viewport.stories.js +22 -3
- package/dist/types/src/components/Viewport/Viewport.stories.js.map +1 -1
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.d.ts +2 -1
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.d.ts.map +1 -1
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.js +11 -3
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.js.map +1 -1
- package/dist/types/src/composites/JoinDialog/JoinDialog.d.ts +2 -1
- package/dist/types/src/composites/JoinDialog/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/composites/JoinDialog/JoinDialog.js +11 -4
- package/dist/types/src/composites/JoinDialog/JoinDialog.js.map +1 -1
- package/dist/types/src/composites/Shell/Shell.d.ts +2 -1
- package/dist/types/src/composites/Shell/Shell.d.ts.map +1 -1
- package/dist/types/src/composites/Shell/Shell.js +6 -7
- package/dist/types/src/composites/Shell/Shell.js.map +1 -1
- package/dist/types/src/composites/Shell/ShellContext.d.ts +2 -2
- package/dist/types/src/composites/Shell/ShellContext.d.ts.map +1 -1
- package/dist/types/src/composites/Shell/ShellContext.js +5 -3
- package/dist/types/src/composites/Shell/ShellContext.js.map +1 -1
- package/dist/types/src/composites/Shell/run-shell.js +17 -5
- package/dist/types/src/composites/Shell/run-shell.js.map +1 -1
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.d.ts +2 -1
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.d.ts.map +1 -1
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.js +11 -3
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.js.map +1 -1
- package/dist/types/src/composites/StatusDialog/StatusDialog.d.ts +2 -1
- package/dist/types/src/composites/StatusDialog/StatusDialog.d.ts.map +1 -1
- package/dist/types/src/composites/StatusDialog/StatusDialog.js +9 -2
- package/dist/types/src/composites/StatusDialog/StatusDialog.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts +3 -2
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js +56 -14
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts +11 -10
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js +5 -3
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts +3 -2
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js +8 -3
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts +2 -1
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js +20 -11
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinHeading.js +5 -4
- package/dist/types/src/panels/JoinPanel/JoinHeading.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts +3 -2
- package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.js +28 -4
- package/dist/types/src/panels/JoinPanel/JoinPanel.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts +15 -14
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js +16 -15
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.d.ts +2 -1
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.js +8 -3
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.d.ts +2 -1
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.js +11 -4
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.d.ts +3 -2
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.js +7 -4
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.d.ts +2 -2
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.js +6 -4
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.d.ts +2 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.js +28 -14
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.d.ts +2 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.js +14 -10
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.d.ts +2 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.js +24 -8
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.js.map +1 -1
- package/dist/types/src/panels/Panels.stories.d.ts +3 -3
- package/dist/types/src/panels/Panels.stories.d.ts.map +1 -1
- package/dist/types/src/panels/Panels.stories.js +8 -3
- package/dist/types/src/panels/Panels.stories.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.d.ts +3 -2
- package/dist/types/src/panels/SpacePanel/SpacePanel.d.ts.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.js +15 -6
- package/dist/types/src/panels/SpacePanel/SpacePanel.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.d.ts +18 -17
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.d.ts.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.js +38 -30
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.d.ts +3 -3
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.d.ts.map +1 -1
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js +14 -4
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js.map +1 -1
- package/dist/types/src/panels/StatusPanel/StatusPanel.d.ts +2 -1
- package/dist/types/src/panels/StatusPanel/StatusPanel.d.ts.map +1 -1
- package/dist/types/src/panels/StatusPanel/StatusPanel.js +7 -2
- package/dist/types/src/panels/StatusPanel/StatusPanel.js.map +1 -1
- package/dist/types/src/steps/ConfirmReset.d.ts +3 -2
- package/dist/types/src/steps/ConfirmReset.d.ts.map +1 -1
- package/dist/types/src/steps/ConfirmReset.js +19 -10
- package/dist/types/src/steps/ConfirmReset.js.map +1 -1
- package/dist/types/src/steps/InvitationManager.d.ts +2 -1
- package/dist/types/src/steps/InvitationManager.d.ts.map +1 -1
- package/dist/types/src/steps/InvitationManager.js +21 -4
- package/dist/types/src/steps/InvitationManager.js.map +1 -1
- package/dist/types/src/stories/Invitations.e2e-stories.d.ts +2 -1
- package/dist/types/src/stories/Invitations.e2e-stories.d.ts.map +1 -1
- package/dist/types/src/stories/Invitations.e2e-stories.js +40 -13
- package/dist/types/src/stories/Invitations.e2e-stories.js.map +1 -1
- package/package.json +26 -26
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type AgentFormProps } from './DeviceList';
|
|
2
|
-
export declare const AgentConfig: ({ agentStatus, validationMessage, onAgentDestroy, onAgentCreate, onAgentRefresh, }: Omit<AgentFormProps, "agentHostingEnabled">) =>
|
|
3
|
+
export declare const AgentConfig: ({ agentStatus, validationMessage, onAgentDestroy, onAgentCreate, onAgentRefresh, }: Omit<AgentFormProps, "agentHostingEnabled">) => React.JSX.Element;
|
|
3
4
|
//# sourceMappingURL=AgentConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/AgentConfig.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AgentConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/AgentConfig.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,eAAO,MAAM,WAAW,uFAMrB,IAAI,CAAC,cAAc,EAAE,qBAAqB,CAAC,sBA4G7C,CAAC"}
|
|
@@ -1,25 +1,48 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2024 DXOS.org
|
|
4
3
|
//
|
|
5
4
|
import { ArrowsClockwise, Database, Plus, Power } from '@phosphor-icons/react';
|
|
5
|
+
import React from 'react';
|
|
6
6
|
import { Avatar, Button, Link, Tooltip, Trans, useTranslation } from '@dxos/react-ui';
|
|
7
7
|
import { descriptionText, getSize, mx, valenceColorText } from '@dxos/react-ui-theme';
|
|
8
8
|
export const AgentConfig = ({ agentStatus, validationMessage, onAgentDestroy, onAgentCreate, onAgentRefresh, }) => {
|
|
9
9
|
const { t } = useTranslation('os');
|
|
10
|
-
return (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
return (React.createElement("div", { role: 'none', className: 'p-1' },
|
|
11
|
+
React.createElement("h2", { className: mx(descriptionText, 'text-center mbs-2') }, t('agent heading')),
|
|
12
|
+
validationMessage && (React.createElement("p", { role: 'alert', className: mx(valenceColorText('error'), 'mlb-2') }, validationMessage)),
|
|
13
|
+
agentStatus === 'created' ||
|
|
14
|
+
agentStatus === 'creating' ||
|
|
15
|
+
agentStatus === 'getting' ||
|
|
16
|
+
agentStatus === 'destroying' ? (React.createElement(React.Fragment, null,
|
|
17
|
+
React.createElement("div", { role: 'group', className: 'mlb-2 flex gap-2 items-center', "aria-describedby": 'devices-panel.create-agent.description' },
|
|
18
|
+
React.createElement(Avatar.Root, { status: agentStatus === 'created' ? 'warning' : 'inactive', variant: 'square' },
|
|
19
|
+
React.createElement(Avatar.Frame, { classNames: 'place-self-center' },
|
|
20
|
+
React.createElement(Database, { weight: 'duotone', width: 24, height: 24, x: 8, y: 8, ...(agentStatus !== 'created' && { className: 'opacity-50' }) })),
|
|
21
|
+
React.createElement(Avatar.Label, { classNames: 'flex-1 text-sm truncate' }, t(agentStatus === 'created'
|
|
22
|
+
? 'agent requested label'
|
|
23
|
+
: agentStatus === 'creating'
|
|
24
|
+
? 'creating agent label'
|
|
25
|
+
: agentStatus === 'destroying'
|
|
26
|
+
? 'destroying agent label'
|
|
27
|
+
: 'getting agent label'))),
|
|
28
|
+
agentStatus === 'created' && (React.createElement(Tooltip.Root, null,
|
|
29
|
+
React.createElement(Tooltip.Trigger, { asChild: true },
|
|
30
|
+
React.createElement(Button, { variant: 'ghost', classNames: 'pli-0 is-[--rail-action] bs-[--rail-action]', "data-testid": 'agent.destroy', onClick: onAgentDestroy },
|
|
31
|
+
React.createElement("span", { className: 'sr-only' }, t('destroy agent label')),
|
|
32
|
+
React.createElement(Power, { className: getSize(5) }))),
|
|
33
|
+
React.createElement(Tooltip.Portal, null,
|
|
34
|
+
React.createElement(Tooltip.Content, { side: 'bottom' }, t('destroy agent label')))))),
|
|
35
|
+
agentStatus === 'created' && (React.createElement("p", { id: 'devices-panel.create-agent.description', className: mx(descriptionText, 'mlb-2') }, t('agent requested description'))))) : (React.createElement(React.Fragment, null,
|
|
36
|
+
React.createElement(Button, { variant: 'ghost', classNames: 'mlb-2 is-full justify-start gap-2 pis-0 pie-3', "data-testid": agentStatus === 'creatable' ? 'devices-panel.create-agent' : 'devices-panel.agent-error', onClick: agentStatus === 'creatable' ? onAgentCreate : onAgentRefresh, "aria-describedby": 'devices-panel.create-agent.description' },
|
|
37
|
+
React.createElement("div", { role: 'img', className: mx(getSize(8), 'm-1 rounded-sm bg-input grid place-items-center') }, agentStatus === 'creatable' ? (React.createElement(Plus, { weight: 'light', className: getSize(6) })) : (React.createElement(ArrowsClockwise, { weight: 'light', className: getSize(6) }))),
|
|
38
|
+
React.createElement("span", { className: 'grow font-medium text-start' }, t(agentStatus === 'creatable' ? 'create agent label' : ''))),
|
|
39
|
+
agentStatus === 'creatable' && (React.createElement("div", { role: 'none', className: 'space-y-2', id: 'devices-panel.create-agent.description' },
|
|
40
|
+
React.createElement("p", { className: descriptionText },
|
|
41
|
+
React.createElement(Trans, { t,
|
|
42
|
+
i18nKey: 'create agent clickwrap',
|
|
43
|
+
components: {
|
|
44
|
+
tosLink: React.createElement(Link, { target: '_blank', rel: 'noreferrer' }),
|
|
45
|
+
} })),
|
|
46
|
+
React.createElement("p", { className: descriptionText }, t('create agent description'))))))));
|
|
24
47
|
};
|
|
25
48
|
//# sourceMappingURL=AgentConfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentConfig.js","sourceRoot":"","sources":["../../../../src/components/AgentConfig.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AgentConfig.js","sourceRoot":"","sources":["../../../../src/components/AgentConfig.tsx"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,EAAE,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAItF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC1B,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,GAC8B,EAAE,EAAE;IAChD,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IACnC,OAAO,CACL,6BAAK,IAAI,EAAC,MAAM,EAAC,SAAS,EAAC,KAAK;QAC9B,4BAAI,SAAS,EAAE,EAAE,CAAC,eAAe,EAAE,mBAAmB,CAAC,IAAG,CAAC,CAAC,eAAe,CAAC,CAAM;QACjF,iBAAiB,IAAI,CACpB,2BAAG,IAAI,EAAC,OAAO,EAAC,SAAS,EAAE,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,IAC9D,iBAAiB,CAChB,CACL;QACA,WAAW,KAAK,SAAS;YAC1B,WAAW,KAAK,UAAU;YAC1B,WAAW,KAAK,SAAS;YACzB,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,CAC7B;YACE,6BACE,IAAI,EAAC,OA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;4BACV,OAAO,EAAE,oBAAC,IAAI,IAAC,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,YAAY,GAAG;yBACnD,GAEH,CACA;gBACJ,2BAAG,SAAS,EAAE,eAAe,IAAG,CAAC,CAAC,0BAA0B,CAAC,CAAK,CAC9D,CACP,CACA,CACJ,CACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type ComponentPropsWithoutRef, type PropsWithChildren } from 'react';
|
|
1
|
+
import React, { type ComponentPropsWithoutRef, type PropsWithChildren } from 'react';
|
|
2
2
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
3
3
|
export type AuthCodeProps = ThemedClassName<ComponentPropsWithoutRef<'span'>> & {
|
|
4
4
|
code?: string;
|
|
5
5
|
large?: boolean;
|
|
6
6
|
};
|
|
7
|
-
export declare const AuthCode: (props: PropsWithChildren<AuthCodeProps>) =>
|
|
7
|
+
export declare const AuthCode: (props: PropsWithChildren<AuthCodeProps>) => React.JSX.Element;
|
|
8
8
|
//# sourceMappingURL=AuthCode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthCode.d.ts","sourceRoot":"","sources":["../../../../src/components/AuthCode.tsx"],"names":[],"mappings":"AAKA,
|
|
1
|
+
{"version":3,"file":"AuthCode.d.ts","sourceRoot":"","sources":["../../../../src/components/AuthCode.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,wBAAwB,EAAE,KAAK,iBAAiB,EAAU,MAAM,OAAO,CAAC;AAE7F,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,MAAM,MAAM,aAAa,GAAG,eAAe,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAC,GAAG;IAC9E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,QAAQ,UAAW,iBAAiB,CAAC,aAAa,CAAC,sBA0B/D,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2023 DXOS.org
|
|
4
3
|
//
|
|
5
4
|
//
|
|
6
|
-
import { useRef } from 'react';
|
|
5
|
+
import React, { useRef } from 'react';
|
|
7
6
|
import { mx } from '@dxos/react-ui-theme';
|
|
8
7
|
export const AuthCode = (props) => {
|
|
9
8
|
var _a;
|
|
@@ -22,6 +21,8 @@ export const AuthCode = (props) => {
|
|
|
22
21
|
}
|
|
23
22
|
void navigator.clipboard.writeText(code !== null && code !== void 0 ? code : '');
|
|
24
23
|
};
|
|
25
|
-
return (
|
|
24
|
+
return (React.createElement("span", { className: mx(large ? 'text-6xl' : 'text-2xl', 'font-mono pli-2.5 rounded cursor-pointer', classNames), onClick: handleClick, ref: codeRef },
|
|
25
|
+
React.createElement("span", { className: 'mie-[0.4em]' }, left),
|
|
26
|
+
React.createElement("span", null, right)));
|
|
26
27
|
};
|
|
27
28
|
//# sourceMappingURL=AuthCode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthCode.js","sourceRoot":"","sources":["../../../../src/components/AuthCode.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthCode.js","sourceRoot":"","sources":["../../../../src/components/AuthCode.tsx"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AACF,EAAE;AAEF,OAAO,KAAK,EAAE,EAAyD,MAAM,EAAE,MAAM,OAAO,CAAC;AAG7F,OAAO,EAAE,EAAE,EAAE,MAAM,sBAAsB,CAAC;AAO1C,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAuC,EAAE,EAAE;;IAClE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAC1C,MAAM,CAAC,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Ref, type ReactNode } from 'react';
|
|
1
|
+
import React, { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
2
2
|
import { type ButtonProps } from '@dxos/react-ui';
|
|
3
3
|
export interface CompoundButtonSlots {
|
|
4
4
|
root: ComponentPropsWithoutRef<'button'>;
|
|
@@ -13,5 +13,5 @@ export interface CompoundButtonProps extends ButtonProps {
|
|
|
13
13
|
after?: ReactNode;
|
|
14
14
|
slots?: Partial<CompoundButtonSlots>;
|
|
15
15
|
}
|
|
16
|
-
export declare const CompoundButton: ({ children, description, before, after, variant, elevation: propsElevation, slots, ...buttonProps }: Omit<CompoundButtonProps, "density">) =>
|
|
16
|
+
export declare const CompoundButton: ({ children, description, before, after, variant, elevation: propsElevation, slots, ...buttonProps }: Omit<CompoundButtonProps, "density">) => React.JSX.Element;
|
|
17
17
|
//# sourceMappingURL=CompoundButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompoundButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/CompoundButton/CompoundButton.tsx"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"CompoundButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/CompoundButton/CompoundButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,wBAAwB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7E,OAAO,EAA0B,KAAK,WAAW,EAAuB,MAAM,gBAAgB,CAAC;AAG/F,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,wBAAwB,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,EAAE,wBAAwB,CAAC,KAAK,CAAC,CAAC;IACxC,KAAK,EAAE,wBAAwB,CAAC,GAAG,CAAC,CAAC;IACrC,WAAW,EAAE,wBAAwB,CAAC,GAAG,CAAC,CAAC;CAC5C;AAED,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACtD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACtC;AAED,eAAO,MAAM,cAAc,wGASxB,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,sBAuDtC,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
import React from 'react';
|
|
2
5
|
import { useId, useThemeContext, useElevationContext } from '@dxos/react-ui';
|
|
3
6
|
import { descriptionText, descriptionTextPrimary, mx } from '@dxos/react-ui-theme';
|
|
4
7
|
export const CompoundButton = ({ children, description, before, after, variant = 'default', elevation: propsElevation, slots = {}, ...buttonProps }) => {
|
|
@@ -9,6 +12,11 @@ export const CompoundButton = ({ children, description, before, after, variant =
|
|
|
9
12
|
const elevation = useElevationContext(propsElevation);
|
|
10
13
|
const styleProps = { ...buttonProps, variant, elevation, textWrap: true };
|
|
11
14
|
const buttonClassName = tx('button.root', 'button button--compound', styleProps, 'flex items-center gap-4 plb-2.5', (_a = slots.root) === null || _a === void 0 ? void 0 : _a.className);
|
|
12
|
-
return (
|
|
15
|
+
return (React.createElement("button", { ...buttonProps, ...slots.root, className: buttonClassName, "aria-labelledby": labelId, ...(description && { 'aria-describedby': descriptionId }) },
|
|
16
|
+
before && (React.createElement("div", { role: 'none', className: 'grow-0' }, before)),
|
|
17
|
+
React.createElement("div", { role: 'none', ...slots.middle, className: mx('grow whitespace-normal flex flex-col gap-1 text-left', (_b = slots.middle) === null || _b === void 0 ? void 0 : _b.className) },
|
|
18
|
+
React.createElement("p", { ...slots.label, id: labelId, className: mx((_c = slots.label) === null || _c === void 0 ? void 0 : _c.className) }, children),
|
|
19
|
+
description && (React.createElement("p", { id: descriptionId, ...slots.description, className: mx('text-xs mbe-1 font-normal', variant === 'primary' ? descriptionTextPrimary : descriptionText, (_d = slots.description) === null || _d === void 0 ? void 0 : _d.className) }, description))),
|
|
20
|
+
after && (React.createElement("div", { role: 'none', className: 'grow-0' }, after))));
|
|
13
21
|
};
|
|
14
22
|
//# sourceMappingURL=CompoundButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompoundButton.js","sourceRoot":"","sources":["../../../../../src/components/CompoundButton/CompoundButton.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CompoundButton.js","sourceRoot":"","sources":["../../../../../src/components/CompoundButton/CompoundButton.tsx"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,KAAwD,MAAM,OAAO,CAAC;AAE7E,OAAO,EAAE,KAAK,EAAE,eAAe,EAAoB,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,sBAAsB,CAAC;AAiBnF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,QAAQ,EACR,WAAW,EACX,MAAM,EACN,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,SAAS,EAAE,cAAc,EACzB,KAAK,GAAG,EAAE,EACV,GAAG,WAAW,EACuB,EAAE,EAAE;;IACzC,MAAM,OAAO,GAAG,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC9C,MAAM,aAAa,GAAG,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAC1D,MAAM,EAAE,EAAE,EAAE,GAAG,eAAe,EAAE,CAAC;IACjC,MAAM,SAAS,GAAG,mBAAmB,CAAC,cAAc,CAAC,CAAC;IACtD,MAAM,UAAU,GAAG,EAAE,GAAG,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC1E,MAAM,eAAe,GAAG,EAAE,CACxB,aAAa,EACb,yBAAyB,EACzB,UAAU,EACV,iCAAiC,EACjC,MAAA,KAAK,CAAC,IAAI,0CAAE,SAAS,CACtB,CAAC;IACF,OAAO,CACL,mCACM,WAAW,KACX,KAAK,CAAC,IAAI,EACd,SAAS,EAAE,eAAe,qBACT,OAAO,KACpB,CAAC,WAAW,IAAI,EAAE,kBAAkB,EAAE,aAAa,EAAE,CAAC;QAEzD,MAAM,IAAI,CACT,6BAAK,IAAI,EAAC,MAAM,EAAC,SAAS,EAAC,QAAQ,IAChC,MAAM,CACH,CACP;QACD,6BACE,IAAI,EAAC,MAAM,KACP,KAAK,CAAC,MAAM,EAChB,SAAS,EAAE,EAAE,CAAC,sDAAsD,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,SAAS,CAAC;YAE9F,8BAAO,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,CAAC,MAAA,KAAK,CAAC,KAAK,0CAAE,SAAS,CAAC,IACnE,QAAQ,CACP;YACH,WAAW,IAAI,CACd,2BACE,EAAE,EAAE,aAAa,KACb,KAAK,CAAC,WAAW,EACrB,SAAS,EAAE,EAAE,CACX,2BAA2B,EAC3B,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,eAAe,EAChE,MAAA,KAAK,CAAC,WAAW,0CAAE,SAAS,CAC7B,IAEA,WAAW,CACV,CACL,CACG;QACL,KAAK,IAAI,CACR,6BAAK,IAAI,EAAC,MAAM,EAAC,SAAS,EAAC,QAAQ,IAChC,KAAK,CACF,CACP,CACM,CACV,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import { type CompoundButtonProps } from './CompoundButton';
|
|
3
4
|
declare const _default: {
|
|
4
5
|
title: string;
|
|
5
|
-
component: ({ children, description, before, after, variant, elevation: propsElevation, slots, ...buttonProps }: Omit<CompoundButtonProps, "density">) =>
|
|
6
|
+
component: ({ children, description, before, after, variant, elevation: propsElevation, slots, ...buttonProps }: Omit<CompoundButtonProps, "density">) => React.JSX.Element;
|
|
6
7
|
decorators: import("@storybook/react").Decorator[];
|
|
7
8
|
parameters: {
|
|
8
9
|
chromatic: {
|
|
@@ -12,12 +13,12 @@ declare const _default: {
|
|
|
12
13
|
};
|
|
13
14
|
export default _default;
|
|
14
15
|
export declare const Default: {
|
|
15
|
-
render: (args: Omit<CompoundButtonProps, "ref">) =>
|
|
16
|
+
render: (args: Omit<CompoundButtonProps, "ref">) => React.JSX.Element;
|
|
16
17
|
args: {
|
|
17
18
|
children: string;
|
|
18
19
|
description: string;
|
|
19
|
-
before:
|
|
20
|
-
after:
|
|
20
|
+
before: React.JSX.Element;
|
|
21
|
+
after: React.JSX.Element;
|
|
21
22
|
disabled: boolean;
|
|
22
23
|
};
|
|
23
24
|
};
|
|
@@ -25,11 +26,11 @@ export declare const Primary: {
|
|
|
25
26
|
args: {
|
|
26
27
|
children: string;
|
|
27
28
|
description: string;
|
|
28
|
-
before:
|
|
29
|
-
after:
|
|
29
|
+
before: React.JSX.Element;
|
|
30
|
+
after: React.JSX.Element;
|
|
30
31
|
disabled: boolean;
|
|
31
32
|
variant: string;
|
|
32
33
|
};
|
|
33
|
-
render: (args: Omit<CompoundButtonProps, "ref">) =>
|
|
34
|
+
render: (args: Omit<CompoundButtonProps, "ref">) => React.JSX.Element;
|
|
34
35
|
};
|
|
35
36
|
//# sourceMappingURL=CompoundButton.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompoundButton.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/CompoundButton/CompoundButton.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"CompoundButton.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/CompoundButton/CompoundButton.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAiC,MAAM,OAAO,CAAC;AAItD,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;;;;;;;;;;;AAE5E,wBAKE;AAIF,eAAO,MAAM,OAAO;mBACH,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC;;;;;;;;CAahD,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;;;mBAfH,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC;CAyBhD,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2022 DXOS.org
|
|
4
3
|
//
|
|
5
4
|
import '@dxos-theme';
|
|
6
5
|
import { ArrowRight, ClockCounterClockwise } from '@phosphor-icons/react';
|
|
6
|
+
import React from 'react';
|
|
7
7
|
import { withTheme } from '@dxos/storybook-utils';
|
|
8
8
|
import { CompoundButton } from './CompoundButton';
|
|
9
9
|
export default {
|
|
@@ -12,14 +12,16 @@ export default {
|
|
|
12
12
|
decorators: [withTheme],
|
|
13
13
|
parameters: { chromatic: { disableSnapshot: false } },
|
|
14
14
|
};
|
|
15
|
-
const Container = ({ children }) =>
|
|
15
|
+
const Container = ({ children }) => React.createElement("div", { className: 'flex gap-4' }, children);
|
|
16
16
|
export const Default = {
|
|
17
|
-
render: (args) => (
|
|
17
|
+
render: (args) => (React.createElement(Container, null,
|
|
18
|
+
React.createElement(CompoundButton, { ...args }),
|
|
19
|
+
React.createElement(CompoundButton, { ...args, disabled: true }))),
|
|
18
20
|
args: {
|
|
19
21
|
children: 'Hello',
|
|
20
22
|
description: 'This is a compound button',
|
|
21
|
-
before:
|
|
22
|
-
after:
|
|
23
|
+
before: React.createElement(ClockCounterClockwise, { className: 'w-5 h-5' }),
|
|
24
|
+
after: React.createElement(ArrowRight, { className: 'w-5 h-5' }),
|
|
23
25
|
disabled: false,
|
|
24
26
|
},
|
|
25
27
|
};
|
|
@@ -28,8 +30,8 @@ export const Primary = {
|
|
|
28
30
|
args: {
|
|
29
31
|
children: 'Hello',
|
|
30
32
|
description: 'This is a compound button',
|
|
31
|
-
before:
|
|
32
|
-
after:
|
|
33
|
+
before: React.createElement(ClockCounterClockwise, { className: 'w-5 h-5' }),
|
|
34
|
+
after: React.createElement(ArrowRight, { className: 'w-5 h-5' }),
|
|
33
35
|
disabled: false,
|
|
34
36
|
variant: 'primary',
|
|
35
37
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompoundButton.stories.js","sourceRoot":"","sources":["../../../../../src/components/CompoundButton/CompoundButton.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CompoundButton.stories.js","sourceRoot":"","sources":["../../../../../src/components/CompoundButton/CompoundButton.stories.tsx"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,KAAiC,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,cAAc,EAA4B,MAAM,kBAAkB,CAAC;AAE5E,eAAe;IACb,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,cAAc;IACzB,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,UAAU,EAAE,EAAE,SAAS,EAAE,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE;CACtD,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,EAAE,QAAQ,EAAyB,EAAE,EAAE,CAAC,6BAAK,SAAS,EAAC,YAAY,IAAE,QAAQ,CAAO,CAAC;AAExG,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,CAAC,IAAsC,EAAE,EAAE,CAAC,CAClD,oBAAC,SAAS;QACR,oBAAC,cAAc,OAAK,IAAI,GAAI;QAC5B,oBAAC,cAAc,OAAK,IAAI,EAAE,QAAQ,SAAG,CAC3B,CACb;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,OAAO;QACjB,WAAW,EAAE,2BAA2B;QACxC,MAAM,EAAE,oBAAC,qBAAqB,IAAC,SAAS,EAAC,SAAS,GAAG;QACrD,KAAK,EAAE,oBAAC,UAAU,IAAC,SAAS,EAAC,SAAS,GAAG;QACzC,QAAQ,EAAE,KAAK;KAChB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,GAAG,OAAO;IACV,IAAI,EAAE;QACJ,QAAQ,EAAE,OAAO;QACjB,WAAW,EAAE,2BAA2B;QACxC,MAAM,EAAE,oBAAC,qBAAqB,IAAC,SAAS,EAAC,SAAS,GAAG;QACrD,KAAK,EAAE,oBAAC,UAAU,IAAC,SAAS,EAAC,SAAS,GAAG;QACzC,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,SAAS;KACnB;CACF,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type AgentFormProps, type DeviceListProps } from './DeviceListProps';
|
|
2
|
-
export declare const DeviceList: ({ devices, connectionState, onClickAdd, onClickEdit, onClickReset, onClickRecover, onClickJoinExisting, onAgentDestroy, }: DeviceListProps & Pick<AgentFormProps, "onAgentDestroy">) =>
|
|
3
|
+
export declare const DeviceList: ({ devices, connectionState, onClickAdd, onClickEdit, onClickReset, onClickRecover, onClickJoinExisting, onAgentDestroy, }: DeviceListProps & Pick<AgentFormProps, "onAgentDestroy">) => React.JSX.Element;
|
|
3
4
|
//# sourceMappingURL=DeviceList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceList.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeviceList/DeviceList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeviceList.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeviceList/DeviceList.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE9E,eAAO,MAAM,UAAU,8HASpB,eAAe,GAAG,IAAI,CAAC,cAAc,EAAE,gBAAgB,CAAC,sBAiC1D,CAAC"}
|
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2023 DXOS.org
|
|
4
3
|
//
|
|
5
4
|
import { CaretRight, Plus } from '@phosphor-icons/react';
|
|
5
|
+
import React from 'react';
|
|
6
6
|
import { Button, List, useTranslation } from '@dxos/react-ui';
|
|
7
7
|
import { descriptionText, getSize, mx } from '@dxos/react-ui-theme';
|
|
8
8
|
import { DeviceListItem } from './DeviceListItem';
|
|
9
9
|
export const DeviceList = ({ devices, connectionState, onClickAdd, onClickEdit, onClickReset, onClickRecover, onClickJoinExisting, onAgentDestroy, }) => {
|
|
10
10
|
const { t } = useTranslation('os');
|
|
11
|
-
return (
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
return (React.createElement("div", { role: 'none', className: 'p-1' },
|
|
12
|
+
React.createElement("h2", { className: mx(descriptionText, 'text-center mbs-2') }, t('devices heading')),
|
|
13
|
+
devices.length > 0 && (React.createElement(List, null, devices.map((device) => {
|
|
14
|
+
return (React.createElement(DeviceListItem, { key: device.deviceKey.toHex(), device: device, onClickEdit: () => onClickEdit === null || onClickEdit === void 0 ? void 0 : onClickEdit(device), onClickReset, onClickRecover, onClickJoinExisting, connectionState, onAgentDestroy }));
|
|
15
|
+
}))),
|
|
16
|
+
React.createElement(Button, { variant: 'ghost', classNames: 'justify-start gap-2 pis-0 pie-3 is-full', "data-testid": 'devices-panel.create-invitation', onClick: onClickAdd },
|
|
17
|
+
React.createElement("div", { role: 'img', className: mx(getSize(8), 'm-1 rounded-sm bg-input grid place-items-center') },
|
|
18
|
+
React.createElement(Plus, { weight: 'light', className: getSize(6) })),
|
|
19
|
+
React.createElement("span", { className: 'grow font-medium text-start' }, t('choose add device label')),
|
|
20
|
+
React.createElement(CaretRight, { weight: 'bold', className: getSize(4) }))));
|
|
14
21
|
};
|
|
15
22
|
//# sourceMappingURL=DeviceList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceList.js","sourceRoot":"","sources":["../../../../../src/components/DeviceList/DeviceList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeviceList.js","sourceRoot":"","sources":["../../../../../src/components/DeviceList/DeviceList.tsx"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,sBAAsB,CAAC;AAEpE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,OAAO,EACP,eAAe,EACf,UAAU,EACV,WAAW,EACX,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,cAAc,GAC2C,EAAE,EAAE;IAC7D,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IACnC,OAAO,CACL,6BAAK,IAAI,EAAC,MAAM,EAAC,SAAS,EAAC,KAAK;QAC9B,4BAAI,SAAS,EAAE,EAAE,CAAC,eAAe,EAAE,mBAAmB,CAAC,IAAG,CAAC,CAAC,iBAAiB,CAAC,CAAM;QACnF,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CACrB,oBAAC,IAAI,QACF,OAAO,CAAC,GAAG,CAAC,CAAC,MAAc,EAAE,EAAE;YAC9B,OAAO,CACL,oBAAC,cAAc,IACb,GAAG,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,EAC7B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,GAAG,EAAE,CAAC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,MAAM,CAAC,EAClC,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,GACxF,CACH,CAAC;QACJ,CAAC,CAAC,CACG,CACR;QACD,oBAAC,MAAM,IACL,OAAO,EAAC,OAAO,EACf,UAAU,EAAC,yCAAyC,iBACxC,iCAAiC,EAC7C,OAAO,EAAE,UAAU;YAEnB,6BAAK,IAAI,EAAC,KAAK,EAAC,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,iDAAiD,CAAC;gBAC1F,oBAAC,IAAI,IAAC,MAAM,EAAC,OAAO,EAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,GAAI,CAC1C;YACN,8BAAM,SAAS,EAAC,6BAA6B,IAAE,CAAC,CAAC,yBAAyB,CAAC,CAAQ;YACnF,oBAAC,UAAU,IAAC,MAAM,EAAC,MAAM,EAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,GAAI,CAC5C,CACL,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2023 DXOS.org
|
|
4
3
|
//
|
|
5
4
|
import { Compass, Desktop, DeviceMobile, Devices, DotsThree, ShareFat, Power, Robot, Database, FirstAidKit, } from '@phosphor-icons/react';
|
|
6
|
-
import { forwardRef } from 'react';
|
|
5
|
+
import React, { forwardRef } from 'react';
|
|
7
6
|
import { generateName } from '@dxos/display-name';
|
|
8
7
|
import { Device, DeviceType, DeviceKind } from '@dxos/react-client/halo';
|
|
9
8
|
import { ConnectionState } from '@dxos/react-client/mesh';
|
|
@@ -26,10 +25,30 @@ export const DeviceListItem = forwardRef(({ device, onClickAdd, onClickEdit, onC
|
|
|
26
25
|
? t('device name placeholder', { os: device.profile.os, platform: device.profile.platform })
|
|
27
26
|
: generateName(device.deviceKey.toHex());
|
|
28
27
|
const isCurrent = device.kind === DeviceKind.CURRENT;
|
|
29
|
-
return (
|
|
28
|
+
return (React.createElement(ListItem.Root, { ...props, classNames: ['flex gap-2 items-center mlb-2', classNames], "data-testid": `device-list-item${isCurrent ? '-current' : ''}`, labelId: labelId, ref: forwardedRef },
|
|
29
|
+
React.createElement(Avatar.Root, { status: isCurrent && connectionState === ConnectionState.OFFLINE
|
|
30
30
|
? 'error'
|
|
31
31
|
: device.presence === Device.PresenceState.ONLINE
|
|
32
32
|
? 'active'
|
|
33
|
-
: 'inactive', labelId: labelId, hue: fallbackValue.hue, variant: 'square'
|
|
33
|
+
: 'inactive', labelId: labelId, hue: fallbackValue.hue, variant: 'square' },
|
|
34
|
+
React.createElement(Avatar.Frame, { classNames: 'place-self-center' }, ((_a = device.profile) === null || _a === void 0 ? void 0 : _a.type) ? (device.profile.type === DeviceType.AGENT_MANAGED ? (React.createElement(Database, { ...iconProps })) : device.profile.type === DeviceType.BROWSER ? (React.createElement(Compass, { ...iconProps })) : device.profile.type === DeviceType.NATIVE ? (React.createElement(Desktop, { ...iconProps })) : [DeviceType.AGENT, DeviceType.AGENT_MANAGED].includes(device.profile.type) ? (React.createElement(Robot, { ...iconProps })) : device.profile.type === DeviceType.MOBILE ? (React.createElement(DeviceMobile, { ...iconProps })) : (React.createElement(Devices, { ...iconProps }))) : (React.createElement(Avatar.Fallback, { text: fallbackValue.emoji }))),
|
|
35
|
+
React.createElement(Avatar.Label, { classNames: 'flex-1 text-sm truncate' }, displayName),
|
|
36
|
+
isCurrent && React.createElement(Tag, { color: 'primary' }, t('current device tag label')),
|
|
37
|
+
device.kind === DeviceKind.CURRENT && (React.createElement(DropdownMenu.Root, null,
|
|
38
|
+
React.createElement(DropdownMenu.Trigger, { asChild: true },
|
|
39
|
+
React.createElement(Button, { variant: 'ghost', classNames: 'pli-0 is-[--rail-action] bs-[--rail-action]', "data-testid": `device-list-item${isCurrent ? '-current' : ''}.options` },
|
|
40
|
+
React.createElement("span", { className: 'sr-only' }, t('more options label')),
|
|
41
|
+
React.createElement(DotsThree, { className: getSize(5) }))),
|
|
42
|
+
React.createElement(DropdownMenu.Content, null,
|
|
43
|
+
React.createElement(DropdownMenu.Viewport, null,
|
|
44
|
+
React.createElement(DropdownMenu.Item, { "data-testid": 'device-list-item-current.join-existing', onClick: onClickJoinExisting },
|
|
45
|
+
React.createElement(ShareFat, { className: getSize(5) }),
|
|
46
|
+
t('choose join new identity label')),
|
|
47
|
+
onClickRecover && (React.createElement(DropdownMenu.Item, { "data-testid": 'device-list-item-current.recover', onClick: onClickRecover },
|
|
48
|
+
React.createElement(FirstAidKit, { className: getSize(5) }),
|
|
49
|
+
t('choose recover identity label'))),
|
|
50
|
+
React.createElement(DropdownMenu.Item, { "data-testid": 'device-list-item-current.reset', onClick: onClickReset },
|
|
51
|
+
React.createElement(Power, { className: getSize(5) }),
|
|
52
|
+
t('reset device label')))))))));
|
|
34
53
|
});
|
|
35
54
|
//# sourceMappingURL=DeviceListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceListItem.js","sourceRoot":"","sources":["../../../../../src/components/DeviceList/DeviceListItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeviceListItem.js","sourceRoot":"","sources":["../../../../../src/components/DeviceList/DeviceListItem.tsx"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAEL,OAAO,EACP,OAAO,EACP,YAAY,EACZ,OAAO,EACP,SAAS,EACT,QAAQ,EACR,KAAK,EACL,KAAK,EACL,QAAQ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EAAC,OAAO,EAAE,mBAAmB;4BAClG,oBAAC,QAAQ,IAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,GAAI;4BAClC,CAAC,CAAC,gCAAgC,CAAC,CAClB;wBACnB,cAAc,IAAI,CACjB,oBAAC,YAAY,CAAC,IAAI,mBAAa,kCAAkC,EAAC,OAAO,EAAE,cAAc;4BACvF,oBAAC,WAAW,IAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,GAAI;4BACrC,CAAC,CAAC,+BAA+B,CAAC,CACjB,CACrB;wBACD,oBAAC,YAAY,CAAC,IAAI,mBAAa,gCAAgC,EAAC,OAAO,EAAE,YAAY;4BACnF,oBAAC,KAAK,IAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,GAAI;4BAC/B,CAAC,CAAC,oBAAoB,CAAC,CACN,CACE,CACH,CACL,CACrB,CACW,CACA,CACjB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2023 DXOS.org
|
|
4
3
|
//
|
|
5
|
-
import { forwardRef } from 'react';
|
|
4
|
+
import React, { forwardRef } from 'react';
|
|
6
5
|
import { generateName } from '@dxos/display-name';
|
|
7
6
|
import { SpaceMember } from '@dxos/react-client/echo';
|
|
8
7
|
import { ListItem, Avatar, useId } from '@dxos/react-ui';
|
|
@@ -13,6 +12,10 @@ export const IdentityListItem = forwardRef(({ identity, presence, onClick, class
|
|
|
13
12
|
const fallbackValue = keyToFallback(identity.identityKey);
|
|
14
13
|
const labelId = useId('identityListItem__label');
|
|
15
14
|
const displayName = (_b = (_a = identity.profile) === null || _a === void 0 ? void 0 : _a.displayName) !== null && _b !== void 0 ? _b : generateName(identity.identityKey.toHex());
|
|
16
|
-
return (
|
|
15
|
+
return (React.createElement(ListItem.Root, { ...props, classNames: mx('flex gap-2 pis-3 pie-1 items-center', onClick && 'cursor-pointer', classNames), onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(), "data-testid": 'identity-list-item', labelId: labelId, ref: forwardedRef },
|
|
16
|
+
React.createElement(Avatar.Root, { status: presence === SpaceMember.PresenceState.ONLINE ? 'active' : 'inactive', labelId: labelId, hue: ((_d = (_c = identity.profile) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.hue) || fallbackValue.hue },
|
|
17
|
+
React.createElement(Avatar.Frame, { classNames: 'place-self-center' },
|
|
18
|
+
React.createElement(Avatar.Fallback, { text: ((_f = (_e = identity.profile) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.emoji) || fallbackValue.emoji })),
|
|
19
|
+
React.createElement(Avatar.Label, { classNames: 'text-sm truncate pli-2' }, displayName))));
|
|
17
20
|
});
|
|
18
21
|
//# sourceMappingURL=IdentityListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityListItem.js","sourceRoot":"","sources":["../../../../../src/components/IdentityList/IdentityListItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IdentityListItem.js","sourceRoot":"","sources":["../../../../../src/components/IdentityList/IdentityListItem.tsx"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,KAAK,EAAE,EAAiC,UAAU,EAAE,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAwB,MAAM,gBAAgB,CAAC;AAC/E,OAAO,EAAE,EAAE,EAAE,MAAM,sBAAsB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAQ3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAGxC,CAAC,EAA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CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type PublicKey } from '@dxos/react-client';
|
|
2
3
|
import type { SpaceMember } from '@dxos/react-client/echo';
|
|
3
4
|
export interface SpaceMemberListImplProps {
|
|
@@ -8,6 +9,6 @@ export interface SpaceMemberListProps extends Partial<SpaceMemberListImplProps>
|
|
|
8
9
|
spaceKey: PublicKey;
|
|
9
10
|
includeSelf?: boolean;
|
|
10
11
|
}
|
|
11
|
-
export declare const SpaceMemberList: ({ spaceKey, includeSelf, onSelect }: SpaceMemberListProps) =>
|
|
12
|
-
export declare const SpaceMemberListImpl: ({ members, onSelect }: SpaceMemberListImplProps) =>
|
|
12
|
+
export declare const SpaceMemberList: ({ spaceKey, includeSelf, onSelect }: SpaceMemberListProps) => React.JSX.Element;
|
|
13
|
+
export declare const SpaceMemberListImpl: ({ members, onSelect }: SpaceMemberListImplProps) => React.JSX.Element;
|
|
13
14
|
//# sourceMappingURL=SpaceMemberList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpaceMemberList.d.ts","sourceRoot":"","sources":["../../../../../src/components/IdentityList/SpaceMemberList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SpaceMemberList.d.ts","sourceRoot":"","sources":["../../../../../src/components/IdentityList/SpaceMemberList.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAS3D,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CAC1C;AAED,MAAM,WAAW,oBAAqB,SAAQ,OAAO,CAAC,wBAAwB,CAAC;IAC7E,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,eAAe,wCAAyC,oBAAoB,sBAexF,CAAC;AAEF,eAAO,MAAM,mBAAmB,0BAA2B,wBAAwB,sBAqBlF,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2023 DXOS.org
|
|
4
3
|
//
|
|
5
|
-
import { useMemo } from 'react';
|
|
4
|
+
import React, { useMemo } from 'react';
|
|
6
5
|
import { useClient } from '@dxos/react-client';
|
|
7
6
|
import { useMembers } from '@dxos/react-client/echo';
|
|
8
7
|
import { useTranslation, List } from '@dxos/react-ui';
|
|
@@ -14,13 +13,14 @@ export const SpaceMemberList = ({ spaceKey, includeSelf, onSelect }) => {
|
|
|
14
13
|
const members = useMemo(() => includeSelf
|
|
15
14
|
? allUnsortedMembers.sort((member) => member.identity.identityKey.equals(client.halo.identity.get().identityKey) ? -1 : 1)
|
|
16
15
|
: allUnsortedMembers.filter((member) => !member.identity.identityKey.equals(client.halo.identity.get().identityKey)), [allUnsortedMembers]);
|
|
17
|
-
return
|
|
16
|
+
return React.createElement(SpaceMemberListImpl, { members: members, onSelect: onSelect });
|
|
18
17
|
};
|
|
19
18
|
export const SpaceMemberListImpl = ({ members, onSelect }) => {
|
|
20
19
|
const { t } = useTranslation('os');
|
|
21
20
|
const visibleMembers = members.filter((member) => member.identity);
|
|
22
|
-
return visibleMembers.length > 0 ? (
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
return visibleMembers.length > 0 ? (React.createElement(List, { classNames: 'flex flex-col gap-2', "data-testid": 'space-members-list' }, visibleMembers.map((member) => {
|
|
22
|
+
return (React.createElement(IdentityListItem, { key: member.identity.identityKey.toHex(), identity: member.identity, presence: member.presence, onClick: onSelect && (() => onSelect(member)) }));
|
|
23
|
+
}))) : (React.createElement("div", { role: 'none', className: 'grow flex items-center p-2' },
|
|
24
|
+
React.createElement("p", { className: mx(descriptionText, 'text-center is-full mlb-2') }, t('empty space members message'))));
|
|
25
25
|
};
|
|
26
26
|
//# sourceMappingURL=SpaceMemberList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpaceMemberList.js","sourceRoot":"","sources":["../../../../../src/components/IdentityList/SpaceMemberList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SpaceMemberList.js","sourceRoot":"","sources":["../../../../../src/components/IdentityList/SpaceMemberList.tsx"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAkB,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,EAAE,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AActD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAwB,EAAE,EAAE;IAC3F,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,kBAAkB,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;IAChD,MAAM,OAAO,GAAG,OAAO,CACrB,GAAG,EAAE,CACH,WAAW;QACT,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CACjC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,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EAAE,2BAA2B,CAAC,IAAG,CAAC,CAAC,6BAA6B,CAAC,CAAK,CAClG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
declare const _default: {
|
|
3
4
|
title: string;
|
|
4
|
-
component: ({ members, onSelect }: import("./SpaceMemberList").SpaceMemberListImplProps) =>
|
|
5
|
+
component: ({ members, onSelect }: import("./SpaceMemberList").SpaceMemberListImplProps) => React.JSX.Element;
|
|
5
6
|
decorators: import("@storybook/react").Decorator[];
|
|
6
7
|
parameters: {
|
|
7
8
|
chromatic: {
|
|
@@ -10,5 +11,5 @@ declare const _default: {
|
|
|
10
11
|
};
|
|
11
12
|
};
|
|
12
13
|
export default _default;
|
|
13
|
-
export declare const Default: (props: any) =>
|
|
14
|
+
export declare const Default: (props: any) => React.JSX.Element;
|
|
14
15
|
//# sourceMappingURL=SpaceMemberList.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpaceMemberList.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/IdentityList/SpaceMemberList.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"SpaceMemberList.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/IdentityList/SpaceMemberList.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;;;;;AAO1B,wBAKE;AAEF,eAAO,MAAM,OAAO,UAAW,GAAG,sBAEjC,CAAC"}
|