@dxos/react-ui 0.3.9-main.c2ac8a5 → 0.3.9-main.c7cd0ec
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/lib/browser/index.mjs +270 -385
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/components/AnchoredOverflow/AnchoredOverflow.d.ts.map +1 -1
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts +1 -0
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts +1 -0
- package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts.map +1 -1
- package/dist/types/src/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts +1 -0
- package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
- package/dist/types/src/components/Buttons/Button.stories.d.ts +1 -0
- package/dist/types/src/components/Buttons/Button.stories.d.ts.map +1 -1
- package/dist/types/src/components/Buttons/Toggle.stories.d.ts +1 -0
- package/dist/types/src/components/Buttons/Toggle.stories.d.ts.map +1 -1
- package/dist/types/src/components/Buttons/ToggleGroup.stories.d.ts +1 -0
- package/dist/types/src/components/Buttons/ToggleGroup.stories.d.ts.map +1 -1
- package/dist/types/src/components/Dialogs/AlertDialog.stories.d.ts +1 -0
- package/dist/types/src/components/Dialogs/AlertDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/Dialogs/Dialog.stories.d.ts +1 -0
- package/dist/types/src/components/Dialogs/Dialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/DropdownMenu/DropdownMenu.stories.d.ts +1 -0
- package/dist/types/src/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.d.ts +2 -2
- package/dist/types/src/components/Input/Input.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.stories.d.ts +2 -1
- package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
- package/dist/types/src/components/Link/Link.stories.d.ts.map +1 -1
- package/dist/types/src/components/Lists/List.d.ts.map +1 -0
- package/dist/types/src/components/{List → Lists}/List.stories.d.ts +1 -0
- package/dist/types/src/components/Lists/List.stories.d.ts.map +1 -0
- package/dist/types/src/components/Lists/Tree.d.ts.map +1 -0
- package/dist/types/src/components/{List → Lists}/Tree.stories.d.ts +1 -0
- package/dist/types/src/components/Lists/Tree.stories.d.ts.map +1 -0
- package/dist/types/src/components/Lists/index.d.ts.map +1 -0
- package/dist/types/src/components/Main/Main.d.ts +2 -2
- package/dist/types/src/components/Main/Main.stories.d.ts +1 -0
- package/dist/types/src/components/Main/Main.stories.d.ts.map +1 -1
- package/dist/types/src/components/Message/Message.stories.d.ts +1 -0
- package/dist/types/src/components/Message/Message.stories.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.stories.d.ts +6 -0
- package/dist/types/src/components/Popover/Popover.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts +6 -0
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -1
- package/dist/types/src/components/Select/Select.stories.d.ts +6 -0
- package/dist/types/src/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/types/src/components/Status/Status.d.ts +10 -0
- package/dist/types/src/components/Status/Status.d.ts.map +1 -0
- package/dist/types/src/components/Status/Status.stories.d.ts +18 -0
- package/dist/types/src/components/Status/Status.stories.d.ts.map +1 -0
- package/dist/types/src/components/Status/index.d.ts +2 -0
- package/dist/types/src/components/Status/index.d.ts.map +1 -0
- package/dist/types/src/components/Tag/Tag.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toast/Toast.stories.d.ts +6 -0
- package/dist/types/src/components/Toast/Toast.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +6 -0
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts +6 -0
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/playground/Controls.stories.d.ts +6 -0
- package/dist/types/src/playground/Controls.stories.d.ts.map +1 -1
- package/dist/types/src/playground/Surfaces.stories.d.ts +6 -0
- package/dist/types/src/playground/Surfaces.stories.d.ts.map +1 -1
- package/dist/types/src/testing/decorators/index.d.ts +2 -0
- package/dist/types/src/testing/decorators/index.d.ts.map +1 -0
- package/dist/types/src/testing/decorators/with-theme.d.ts +3 -0
- package/dist/types/src/testing/decorators/with-theme.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/package.json +8 -14
- package/src/components/AnchoredOverflow/AnchoredOverflow.tsx +12 -2
- package/src/components/Avatars/Avatar.stories.tsx +2 -0
- package/src/components/Avatars/AvatarGroup.stories.tsx +2 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +2 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +9 -1
- package/src/components/Buttons/Button.stories.tsx +2 -0
- package/src/components/Buttons/Toggle.stories.tsx +2 -0
- package/src/components/Buttons/ToggleGroup.stories.tsx +2 -0
- package/src/components/Dialogs/AlertDialog.stories.tsx +2 -0
- package/src/components/Dialogs/Dialog.stories.tsx +2 -0
- package/src/components/DropdownMenu/DropdownMenu.stories.tsx +2 -0
- package/src/components/Input/Input.stories.tsx +21 -2
- package/src/components/Input/Input.tsx +3 -1
- package/src/components/Link/Link.stories.tsx +2 -0
- package/src/components/{List → Lists}/List.stories.tsx +2 -0
- package/src/components/{List → Lists}/Tree.stories.tsx +2 -0
- package/src/components/Main/Main.stories.tsx +5 -1
- package/src/components/Message/Message.stories.tsx +2 -0
- package/src/components/Popover/Popover.stories.tsx +3 -0
- package/src/components/ScrollArea/ScrollArea.stories.tsx +3 -0
- package/src/components/Select/Select.stories.tsx +3 -0
- package/src/components/Status/Status.stories.tsx +36 -0
- package/src/components/Status/Status.tsx +38 -0
- package/src/components/{Card → Status}/index.ts +1 -1
- package/src/components/Tag/Tag.stories.tsx +3 -0
- package/src/components/Toast/Toast.stories.tsx +3 -0
- package/src/components/Toolbar/Toolbar.stories.tsx +3 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +3 -0
- package/src/components/index.ts +2 -4
- package/src/playground/Controls.stories.tsx +3 -0
- package/src/playground/Surfaces.stories.tsx +4 -0
- package/src/{components/Center → testing/decorators}/index.ts +1 -1
- package/src/testing/decorators/with-theme.ts +22 -0
- package/src/{components/ProgressBar → testing}/index.ts +1 -1
- package/dist/types/src/components/Card/Card.d.ts +0 -52
- package/dist/types/src/components/Card/Card.d.ts.map +0 -1
- package/dist/types/src/components/Card/Card.stories.d.ts +0 -56
- package/dist/types/src/components/Card/Card.stories.d.ts.map +0 -1
- package/dist/types/src/components/Card/index.d.ts +0 -2
- package/dist/types/src/components/Card/index.d.ts.map +0 -1
- package/dist/types/src/components/Center/Center.d.ts +0 -4
- package/dist/types/src/components/Center/Center.d.ts.map +0 -1
- package/dist/types/src/components/Center/Center.stories.d.ts +0 -11
- package/dist/types/src/components/Center/Center.stories.d.ts.map +0 -1
- package/dist/types/src/components/Center/index.d.ts +0 -2
- package/dist/types/src/components/Center/index.d.ts.map +0 -1
- package/dist/types/src/components/List/List.d.ts.map +0 -1
- package/dist/types/src/components/List/List.stories.d.ts.map +0 -1
- package/dist/types/src/components/List/Tree.d.ts.map +0 -1
- package/dist/types/src/components/List/Tree.stories.d.ts.map +0 -1
- package/dist/types/src/components/List/index.d.ts.map +0 -1
- package/dist/types/src/components/ProgressBar/ProgressBar.d.ts +0 -7
- package/dist/types/src/components/ProgressBar/ProgressBar.d.ts.map +0 -1
- package/dist/types/src/components/ProgressBar/ProgressBar.stories.d.ts +0 -12
- package/dist/types/src/components/ProgressBar/ProgressBar.stories.d.ts.map +0 -1
- package/dist/types/src/components/ProgressBar/index.d.ts +0 -2
- package/dist/types/src/components/ProgressBar/index.d.ts.map +0 -1
- package/src/components/Card/Card.stories.tsx +0 -220
- package/src/components/Card/Card.tsx +0 -147
- package/src/components/Center/Center.stories.tsx +0 -18
- package/src/components/Center/Center.tsx +0 -16
- package/src/components/ProgressBar/ProgressBar.stories.tsx +0 -33
- package/src/components/ProgressBar/ProgressBar.tsx +0 -29
- /package/dist/types/src/components/{List → Lists}/List.d.ts +0 -0
- /package/dist/types/src/components/{List → Lists}/Tree.d.ts +0 -0
- /package/dist/types/src/components/{List → Lists}/index.d.ts +0 -0
- /package/src/components/{List → Lists}/List.tsx +0 -0
- /package/src/components/{List → Lists}/Tree.tsx +0 -0
- /package/src/components/{List → Lists}/index.ts +0 -0
package/src/components/index.ts
CHANGED
|
@@ -6,17 +6,15 @@ export * from './AnchoredOverflow';
|
|
|
6
6
|
export * from './Avatars';
|
|
7
7
|
export * from './Breadcrumb';
|
|
8
8
|
export * from './Buttons';
|
|
9
|
-
export * from './Card';
|
|
10
|
-
export * from './Center';
|
|
11
9
|
export * from './Dialogs';
|
|
12
10
|
export * from './DropdownMenu';
|
|
13
11
|
export * from './Input';
|
|
14
12
|
export * from './Link';
|
|
15
|
-
export * from './
|
|
13
|
+
export * from './Lists';
|
|
16
14
|
export * from './Main';
|
|
17
15
|
export * from './Message';
|
|
18
16
|
export * from './Popover';
|
|
19
|
-
export * from './
|
|
17
|
+
export * from './Status';
|
|
20
18
|
export * from './ScrollArea';
|
|
21
19
|
export * from './Select';
|
|
22
20
|
export * from './Separator';
|
|
@@ -9,6 +9,7 @@ import React, { useState } from 'react';
|
|
|
9
9
|
|
|
10
10
|
import { createScenarios } from './helpers';
|
|
11
11
|
import { Input, Select, Toggle, Toolbar } from '../components';
|
|
12
|
+
import { withTheme } from '../testing';
|
|
12
13
|
|
|
13
14
|
const Story = () => {
|
|
14
15
|
const [checked, setChecked] = useState<boolean>(false);
|
|
@@ -83,6 +84,8 @@ const Story = () => {
|
|
|
83
84
|
|
|
84
85
|
export default {
|
|
85
86
|
component: Story,
|
|
87
|
+
decorators: [withTheme],
|
|
88
|
+
parameters: { chromatic: { disableSnapshot: false } },
|
|
86
89
|
};
|
|
87
90
|
|
|
88
91
|
export const Default = {
|
|
@@ -17,6 +17,8 @@ import {
|
|
|
17
17
|
inputSurface,
|
|
18
18
|
} from '@dxos/react-ui-theme';
|
|
19
19
|
|
|
20
|
+
import { withTheme } from '../testing';
|
|
21
|
+
|
|
20
22
|
const Surface = ({
|
|
21
23
|
children,
|
|
22
24
|
level,
|
|
@@ -57,6 +59,8 @@ const SurfacesStory = () => {
|
|
|
57
59
|
|
|
58
60
|
export default {
|
|
59
61
|
component: SurfacesStory,
|
|
62
|
+
decorators: [withTheme],
|
|
63
|
+
parameters: { chromatic: { disableSnapshot: false } },
|
|
60
64
|
};
|
|
61
65
|
|
|
62
66
|
export const Default = {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Decorator } from '@storybook/react';
|
|
6
|
+
import { useEffect, createElement } from 'react';
|
|
7
|
+
|
|
8
|
+
import { defaultTx } from '@dxos/react-ui-theme';
|
|
9
|
+
|
|
10
|
+
import { ThemeProvider } from '../../components';
|
|
11
|
+
|
|
12
|
+
export const withTheme: Decorator = (StoryFn, context) => {
|
|
13
|
+
const theme = context?.parameters?.theme || context?.globals?.theme;
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
document.documentElement.classList[theme === 'dark' ? 'add' : 'remove']('dark');
|
|
16
|
+
}, [theme]);
|
|
17
|
+
|
|
18
|
+
return createElement(ThemeProvider, {
|
|
19
|
+
children: createElement(StoryFn),
|
|
20
|
+
tx: defaultTx,
|
|
21
|
+
});
|
|
22
|
+
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { type Icon } from '@phosphor-icons/react';
|
|
2
|
-
import { type Primitive } from '@radix-ui/react-primitive';
|
|
3
|
-
import React, { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type FC } from 'react';
|
|
4
|
-
import { type ThemedClassName } from '../../util';
|
|
5
|
-
type CardRootProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {
|
|
6
|
-
grow?: boolean;
|
|
7
|
-
square?: boolean;
|
|
8
|
-
noPadding?: boolean;
|
|
9
|
-
};
|
|
10
|
-
type CardHeaderProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {
|
|
11
|
-
floating?: boolean;
|
|
12
|
-
};
|
|
13
|
-
export declare const CardHeader: FC<CardHeaderProps>;
|
|
14
|
-
type CardTitleProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {
|
|
15
|
-
center?: boolean;
|
|
16
|
-
title?: string;
|
|
17
|
-
};
|
|
18
|
-
export declare const CardTitle: FC<CardTitleProps>;
|
|
19
|
-
type CardDragHandleProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {
|
|
20
|
-
position?: 'left' | 'right';
|
|
21
|
-
};
|
|
22
|
-
type CardEndcapProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {
|
|
23
|
-
Icon: Icon;
|
|
24
|
-
position?: 'left' | 'right';
|
|
25
|
-
};
|
|
26
|
-
type CardBodyProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {
|
|
27
|
-
gutter?: boolean;
|
|
28
|
-
};
|
|
29
|
-
export declare const CardBody: FC<CardBodyProps>;
|
|
30
|
-
type CardMediaProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {
|
|
31
|
-
src?: string;
|
|
32
|
-
contain?: boolean;
|
|
33
|
-
};
|
|
34
|
-
export declare const CardMedia: FC<CardMediaProps>;
|
|
35
|
-
export declare const Card: {
|
|
36
|
-
Root: React.ForwardRefExoticComponent<Pick<CardRootProps, "children" | "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "asChild" | "classNames" | "square" | "grow" | "noPadding"> & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
-
Header: React.FC<CardHeaderProps>;
|
|
38
|
-
DragHandle: React.FC<CardDragHandleProps>;
|
|
39
|
-
Endcap: React.FC<CardEndcapProps>;
|
|
40
|
-
Menu: React.ForwardRefExoticComponent<Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "className"> & {
|
|
41
|
-
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
42
|
-
} & {
|
|
43
|
-
position?: "right" | "left" | undefined;
|
|
44
|
-
} & {
|
|
45
|
-
children?: React.ReactNode;
|
|
46
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
47
|
-
Title: React.FC<CardTitleProps>;
|
|
48
|
-
Body: React.FC<CardBodyProps>;
|
|
49
|
-
Media: React.FC<CardMediaProps>;
|
|
50
|
-
};
|
|
51
|
-
export type { CardRootProps };
|
|
52
|
-
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAsC,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,EACZ,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,EAAE,EAGR,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,KAAK,aAAa,GAAG,eAAe,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG;IAClF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAcF,KAAK,eAAe,GAAG,eAAe,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEjG,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAO1C,CAAC;AAEF,KAAK,cAAc,GAAG,eAAe,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,GAAG;IACvE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAOxC,CAAC;AAGF,KAAK,mBAAmB,GAAG,eAAe,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC;AAY9G,KAAK,eAAe,GAAG,eAAe,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,GAAG;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC;AAqCtH,KAAK,aAAa,GAAG,eAAe,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE7F,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAQtC,CAAC;AAEF,KAAK,cAAc,GAAG,eAAe,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAG7G,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAOxC,CAAC;AAEF,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;CAShB,CAAC;AAEF,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import '@dxosTheme';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
component: {
|
|
5
|
-
Root: React.ForwardRefExoticComponent<Pick<import("./Card").CardRootProps, "children" | "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "asChild" | "classNames" | "square" | "grow" | "noPadding"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
Header: React.FC<Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "className"> & {
|
|
7
|
-
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
8
|
-
} & {
|
|
9
|
-
floating?: boolean | undefined;
|
|
10
|
-
}>;
|
|
11
|
-
DragHandle: React.FC<Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "className"> & {
|
|
12
|
-
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
13
|
-
} & {
|
|
14
|
-
position?: "right" | "left" | undefined;
|
|
15
|
-
}>;
|
|
16
|
-
Endcap: React.FC<Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "className"> & {
|
|
17
|
-
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
18
|
-
} & {
|
|
19
|
-
Icon: import("@phosphor-icons/react").Icon;
|
|
20
|
-
position?: "right" | "left" | undefined;
|
|
21
|
-
}>;
|
|
22
|
-
Menu: React.ForwardRefExoticComponent<Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "className"> & {
|
|
23
|
-
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
24
|
-
} & {
|
|
25
|
-
position?: "right" | "left" | undefined;
|
|
26
|
-
} & {
|
|
27
|
-
children?: React.ReactNode;
|
|
28
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
-
Title: React.FC<Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "className"> & {
|
|
30
|
-
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
31
|
-
} & {
|
|
32
|
-
center?: boolean | undefined;
|
|
33
|
-
title?: string | undefined;
|
|
34
|
-
}>;
|
|
35
|
-
Body: React.FC<Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "className"> & {
|
|
36
|
-
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
37
|
-
} & {
|
|
38
|
-
gutter?: boolean | undefined;
|
|
39
|
-
}>;
|
|
40
|
-
Media: React.FC<Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "className"> & {
|
|
41
|
-
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
42
|
-
} & {
|
|
43
|
-
src?: string | undefined;
|
|
44
|
-
contain?: boolean | undefined;
|
|
45
|
-
}>;
|
|
46
|
-
};
|
|
47
|
-
decorators: ((Story: any) => JSX.Element)[];
|
|
48
|
-
parameters: {
|
|
49
|
-
layout: string;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
export default _default;
|
|
53
|
-
export declare const Draggable: () => JSX.Element;
|
|
54
|
-
export declare const ReadOnly: () => JSX.Element;
|
|
55
|
-
export declare const Editable: () => JSX.Element;
|
|
56
|
-
//# sourceMappingURL=Card.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Card/Card.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAMpB,OAAO,KAAoD,MAAM,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA+L7D,GAAG;;;;;AAHf,wBAiBE;AAEF,eAAO,MAAM,SAAS,mBAA2B,CAAC;AAClD,eAAO,MAAM,QAAQ,mBAA8B,CAAC;AACpD,eAAO,MAAM,QAAQ,mBAA8B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Card/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type DetailedHTMLProps, type PropsWithChildren, type HTMLAttributes } from 'react';
|
|
2
|
-
export type CenterProps = PropsWithChildren<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
3
|
-
export declare const Center: (props: CenterProps) => JSX.Element;
|
|
4
|
-
//# sourceMappingURL=Center.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Center.d.ts","sourceRoot":"","sources":["../../../../../src/components/Center/Center.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAEnG,MAAM,MAAM,WAAW,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC;AAE/G,eAAO,MAAM,MAAM,UAAW,WAAW,gBAOxC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import '@dxosTheme';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
component: (props: import("./Center").CenterProps) => JSX.Element;
|
|
5
|
-
actions: {
|
|
6
|
-
argTypesRegex: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|
|
10
|
-
export declare const Normal: (props: any) => JSX.Element;
|
|
11
|
-
//# sourceMappingURL=Center.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Center.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Center/Center.stories.tsx"],"names":[],"mappings":";AAIA,OAAO,YAAY,CAAC;;;;;;;AAMpB,wBAGE;AAEF,eAAO,MAAM,MAAM,UAAW,GAAG,gBAEhC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Center/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/List.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,KAAK,wBAAwB,EAAE,KAAK,EAAE,EAAc,KAAK,yBAAyB,EAAE,MAAM,OAAO,CAAC;AAElH,OAAO,EAEL,KAAK,SAAS,IAAI,kBAAkB,EACpC,KAAK,eAAe,EAEpB,KAAK,oBAAoB,IAAI,6BAA6B,EAE1D,KAAK,wBAAwB,IAAI,iCAAiC,EAElE,KAAK,+BAA+B,EAEpC,KAAK,aAAa,IAAI,sBAAsB,EAC5C,KAAK,mBAAmB,EACxB,SAAS,EACT,cAAc,EACd,cAAc,EACd,kBAAkB,EACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAGpD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,KAAK,SAAS,GAAG,eAAe,CAAC,kBAAkB,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE7E,QAAA,MAAM,IAAI,krJAWR,CAAC;AAEH,KAAK,mBAAmB,GAAG,eAAe,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAmCpG,KAAK,oBAAoB,GAAG,eAAe,CAAC,6BAA6B,CAAC,CAAC;AAkB3E,KAAK,wBAAwB,GAAG,eAAe,CAAC,iCAAiC,CAAC,CAAC;AA2BnF,KAAK,iBAAiB,GAAG,eAAe,CAAC,sBAAsB,CAAC,CAAC;AAkBjE,eAAO,MAAM,QAAQ,EAAE;IACrB,IAAI,EAAE,yBAAyB,CAAC,iBAAiB,CAAC,CAAC;IACnD,MAAM,EAAE,yBAAyB,CAAC,mBAAmB,CAAC,CAAC;IACvD,OAAO,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,CAAC;IACzD,WAAW,EAAE,yBAAyB,CAAC,wBAAwB,CAAC,CAAC;IACjE,kBAAkB,EAAE,yBAAyB,CAAC,+BAA+B,CAAC,CAAC;IAC/E,eAAe,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;CAQzF,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,kBAAkB,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;AAE/E,YAAY,EACV,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,+BAA+B,GAChC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"List.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/List.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAMpB,OAAO,KAA4C,MAAM,OAAO,CAAC;AAIjE,OAAO,EAAkB,KAAK,SAAS,EAAwB,MAAM,QAAQ,CAAC;;;;AAE9E,wBAEE;AAuBF,eAAO,MAAM,oBAAoB;;;;;CAgChC,CAAC;AA+BF,eAAO,MAAM,kBAAkB;;;;;CA8C9B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;CA+BvB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tree.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/Tree.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,wBAAwB,EAAE,KAAK,EAAE,EAAc,KAAK,yBAAyB,EAAE,MAAM,OAAO,CAAC;AAElH,OAAO,EAIL,KAAK,+BAA+B,EACpC,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAGf,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,KAAK,aAAa,GAAG,SAAS,CAAC;AAE/B,KAAK,aAAa,GAAG,iBAAiB,CAAC;AAwBvC,KAAK,oBAAoB,GAAG,oBAAoB,CAAC;AAIjD,KAAK,wBAAwB,GAAG,wBAAwB,CAAC;AAMzD,KAAK,iBAAiB,GAAG,+BAA+B,CAAC;AAIzD,eAAO,MAAM,IAAI;;;CAAyC,CAAC;AAC3D,eAAO,MAAM,QAAQ,EAAE;IACrB,IAAI,EAAE,yBAAyB,CAAC,aAAa,CAAC,CAAC;IAC/C,OAAO,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,CAAC;IACzD,IAAI,EAAE,yBAAyB,CAAC,iBAAiB,CAAC,CAAC;IACnD,WAAW,EAAE,yBAAyB,CAAC,wBAAwB,CAAC,CAAC;IACjE,eAAe,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;CAOzF,CAAC;AAEF,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tree.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/Tree.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAMpB,KAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,GAAG,CAAC;CACX,CAAC;;;;AA4CF,wBAEE;AAEF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;CAmBnB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/ProgressBar/ProgressBar.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,gBAAgB,gBAgBlD,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import '@dxosTheme';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
component: (props: import("./ProgressBar").ProgressBarProps) => JSX.Element;
|
|
5
|
-
actions: {
|
|
6
|
-
argTypesRegex: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|
|
10
|
-
export declare const Normal: (props: any) => JSX.Element;
|
|
11
|
-
export declare const Indeterminate: (props: any) => JSX.Element;
|
|
12
|
-
//# sourceMappingURL=ProgressBar.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ProgressBar/ProgressBar.stories.tsx"],"names":[],"mappings":";AAIA,OAAO,YAAY,CAAC;;;;;;;AAMpB,wBAGE;AAEF,eAAO,MAAM,MAAM,UAAW,GAAG,gBAShC,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,GAAG,gBAMvC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ProgressBar/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC"}
|
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import '@dxosTheme';
|
|
6
|
-
|
|
7
|
-
import { DndContext, type DragEndEvent } from '@dnd-kit/core';
|
|
8
|
-
import { arrayMove, SortableContext, useSortable, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
9
|
-
import { CSS } from '@dnd-kit/utilities';
|
|
10
|
-
import { faker } from '@faker-js/faker';
|
|
11
|
-
import React, { type FC, type PropsWithChildren, useState } from 'react';
|
|
12
|
-
|
|
13
|
-
import { chromeSurface, mx } from '@dxos/react-ui-theme';
|
|
14
|
-
|
|
15
|
-
import { Card } from './Card';
|
|
16
|
-
import { DensityProvider } from '../DensityProvider';
|
|
17
|
-
import { DropdownMenu } from '../DropdownMenu';
|
|
18
|
-
import { Input } from '../Input';
|
|
19
|
-
import { ScrollArea } from '../ScrollArea';
|
|
20
|
-
|
|
21
|
-
faker.seed(1);
|
|
22
|
-
|
|
23
|
-
// https://unsplash.com
|
|
24
|
-
// TODO(burdon): Use https://picsum.photos
|
|
25
|
-
const testImages = [
|
|
26
|
-
'https://images.unsplash.com/photo-1616394158624-a2ba9cfe2994',
|
|
27
|
-
'https://images.unsplash.com/photo-1507941097613-9f2157b69235',
|
|
28
|
-
'https://images.unsplash.com/photo-1431274172761-fca41d930114',
|
|
29
|
-
'https://images.unsplash.com/photo-1513635269975-59663e0ac1ad',
|
|
30
|
-
'https://images.unsplash.com/photo-1564221710304-0b37c8b9d729',
|
|
31
|
-
'https://images.unsplash.com/photo-1605425183435-25b7e99104a4',
|
|
32
|
-
];
|
|
33
|
-
|
|
34
|
-
type CardData = {
|
|
35
|
-
id: string;
|
|
36
|
-
title: string;
|
|
37
|
-
body: string;
|
|
38
|
-
image?: string;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const DraggableCard: FC<{ data: CardData; onDelete: (id: string) => void }> = ({
|
|
42
|
-
data: { id, title, body, image },
|
|
43
|
-
onDelete,
|
|
44
|
-
}) => {
|
|
45
|
-
const { attributes, listeners, setNodeRef, transform } = useSortable({ id });
|
|
46
|
-
const t = transform ? Object.assign(transform, { scaleY: 1 }) : null;
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<Card.Root ref={setNodeRef} style={{ transform: CSS.Transform.toString(t) }}>
|
|
50
|
-
<Card.Header>
|
|
51
|
-
<Card.DragHandle {...listeners} {...attributes} />
|
|
52
|
-
<Card.Title title={title} />
|
|
53
|
-
<DropdownMenu.Root>
|
|
54
|
-
<DropdownMenu.Trigger asChild>
|
|
55
|
-
<Card.Menu />
|
|
56
|
-
</DropdownMenu.Trigger>
|
|
57
|
-
<DropdownMenu.Content>
|
|
58
|
-
<DropdownMenu.Viewport>
|
|
59
|
-
<DropdownMenu.Item onClick={() => onDelete(id)}>Delete</DropdownMenu.Item>
|
|
60
|
-
</DropdownMenu.Viewport>
|
|
61
|
-
</DropdownMenu.Content>
|
|
62
|
-
</DropdownMenu.Root>
|
|
63
|
-
</Card.Header>
|
|
64
|
-
<Card.Body classNames={'text-sm'} gutter>
|
|
65
|
-
<p>{body}</p>
|
|
66
|
-
</Card.Body>
|
|
67
|
-
{image && <Card.Media src={image} classNames={'h-[160px]'} />}
|
|
68
|
-
</Card.Root>
|
|
69
|
-
);
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
const DraggableStory: FC<PropsWithChildren> = ({ children }) => {
|
|
73
|
-
const [cards, setCards] = useState<CardData[]>(
|
|
74
|
-
Array.from({ length: 7 }).map(() => ({
|
|
75
|
-
id: faker.string.uuid(),
|
|
76
|
-
title: faker.lorem.sentence(3),
|
|
77
|
-
body: faker.lorem.sentences(),
|
|
78
|
-
image: faker.datatype.boolean() ? faker.helpers.arrayElement(testImages) : undefined,
|
|
79
|
-
})),
|
|
80
|
-
);
|
|
81
|
-
|
|
82
|
-
const handleDelete = (id: string) => {
|
|
83
|
-
setCards((cards) => cards.filter((card) => card.id !== id));
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
const handleDragEnd = (event: DragEndEvent) => {
|
|
87
|
-
const { active, over } = event;
|
|
88
|
-
if (active.id !== over?.id) {
|
|
89
|
-
setCards((cards) => {
|
|
90
|
-
const oldIndex = cards.findIndex((card) => card.id === active.id);
|
|
91
|
-
const newIndex = cards.findIndex((card) => card.id === over?.id);
|
|
92
|
-
return arrayMove(cards, oldIndex, newIndex);
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
return (
|
|
98
|
-
<DndContext onDragEnd={handleDragEnd}>
|
|
99
|
-
<SortableContext items={cards.map(({ id }) => id)} strategy={verticalListSortingStrategy}>
|
|
100
|
-
<div className='flex flex-col overflow-y-scroll'>
|
|
101
|
-
<div className='flex flex-col gap-4'>
|
|
102
|
-
{cards.map((card) => (
|
|
103
|
-
<DraggableCard key={card.id} data={card} onDelete={handleDelete} />
|
|
104
|
-
))}
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
</SortableContext>
|
|
108
|
-
</DndContext>
|
|
109
|
-
);
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
const ReadonlyCardStory = () => {
|
|
113
|
-
return (
|
|
114
|
-
<div className='flex flex-col overflow-y-scroll'>
|
|
115
|
-
<div className='flex flex-col gap-4'>
|
|
116
|
-
<Card.Root square noPadding>
|
|
117
|
-
<Card.Header floating>
|
|
118
|
-
<Card.DragHandle position='left' />
|
|
119
|
-
<Card.Menu position='right' />
|
|
120
|
-
</Card.Header>
|
|
121
|
-
<Card.Media src={testImages[1]} />
|
|
122
|
-
</Card.Root>
|
|
123
|
-
|
|
124
|
-
<Card.Root>
|
|
125
|
-
<Card.Header>
|
|
126
|
-
<Card.Title title={faker.lorem.sentence(3)} />
|
|
127
|
-
</Card.Header>
|
|
128
|
-
</Card.Root>
|
|
129
|
-
|
|
130
|
-
<Card.Root>
|
|
131
|
-
<Card.Body classNames={'text-sm font-thin h-[100px]'}>
|
|
132
|
-
<ScrollArea.Root>
|
|
133
|
-
<ScrollArea.Viewport>{faker.lorem.sentences(16)}</ScrollArea.Viewport>
|
|
134
|
-
<ScrollArea.Scrollbar orientation='vertical'>
|
|
135
|
-
<ScrollArea.Thumb />
|
|
136
|
-
</ScrollArea.Scrollbar>
|
|
137
|
-
</ScrollArea.Root>
|
|
138
|
-
</Card.Body>
|
|
139
|
-
</Card.Root>
|
|
140
|
-
|
|
141
|
-
<Card.Root>
|
|
142
|
-
<Card.Header>
|
|
143
|
-
<Card.Title center title={faker.lorem.sentence(3)} />
|
|
144
|
-
</Card.Header>
|
|
145
|
-
<Card.Body classNames={'text-sm font-thin'}>{faker.lorem.sentences(3)}</Card.Body>
|
|
146
|
-
</Card.Root>
|
|
147
|
-
|
|
148
|
-
<Card.Root>
|
|
149
|
-
<Card.Header>
|
|
150
|
-
<Card.DragHandle />
|
|
151
|
-
<Card.Title title={faker.lorem.sentence(8)} />
|
|
152
|
-
{/* TODO(burdon): Menu util. */}
|
|
153
|
-
<Card.Menu />
|
|
154
|
-
</Card.Header>
|
|
155
|
-
<Card.Body gutter classNames={'gap-2 text-sm font-thin'}>
|
|
156
|
-
<p>Content with gutter</p>
|
|
157
|
-
<p className='line-clamp-3'>{faker.lorem.sentences(3)}</p>
|
|
158
|
-
</Card.Body>
|
|
159
|
-
</Card.Root>
|
|
160
|
-
|
|
161
|
-
<Card.Root>
|
|
162
|
-
<Card.Header>
|
|
163
|
-
<Card.DragHandle />
|
|
164
|
-
<Card.Title title={faker.lorem.sentence(3)} />
|
|
165
|
-
<Card.Menu />
|
|
166
|
-
</Card.Header>
|
|
167
|
-
<Card.Body gutter classNames={'text-sm gap-2 font-thin'}>
|
|
168
|
-
<p className='line-clamp-3'>{faker.lorem.sentences(1)}</p>
|
|
169
|
-
</Card.Body>
|
|
170
|
-
<Card.Media classNames={'h-[200px] grayscale'} src={testImages[0]} />
|
|
171
|
-
<Card.Body gutter classNames={'text-sm gap-2 font-thin'}>
|
|
172
|
-
<p className='line-clamp-3'>{faker.lorem.sentences(3)}</p>
|
|
173
|
-
</Card.Body>
|
|
174
|
-
</Card.Root>
|
|
175
|
-
</div>
|
|
176
|
-
</div>
|
|
177
|
-
);
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
const EditableCardStory = () => {
|
|
181
|
-
return (
|
|
182
|
-
<div className='flex flex-col h-full justify-center'>
|
|
183
|
-
<Card.Root>
|
|
184
|
-
<Card.Header>
|
|
185
|
-
<Card.DragHandle />
|
|
186
|
-
<Input.Root>
|
|
187
|
-
<Input.TextInput classNames={'-mx-2 px-2'} variant='subdued' placeholder={'Title'} />
|
|
188
|
-
</Input.Root>
|
|
189
|
-
<Card.Menu />
|
|
190
|
-
</Card.Header>
|
|
191
|
-
<Card.Body gutter classNames={'gap-2 text-sm font-thin'}>
|
|
192
|
-
{faker.lorem.sentences()}
|
|
193
|
-
</Card.Body>
|
|
194
|
-
</Card.Root>
|
|
195
|
-
</div>
|
|
196
|
-
);
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
export default {
|
|
200
|
-
component: Card,
|
|
201
|
-
decorators: [
|
|
202
|
-
(Story: any) => (
|
|
203
|
-
<div className={mx('flex h-screen w-full justify-center overflow-hidden', chromeSurface)}>
|
|
204
|
-
<div className='flex flex-col w-[360px] overflow-hidden'>
|
|
205
|
-
{/* TODO(burdon): Story for different densities. */}
|
|
206
|
-
<DensityProvider density='fine'>
|
|
207
|
-
<Story />
|
|
208
|
-
</DensityProvider>
|
|
209
|
-
</div>
|
|
210
|
-
</div>
|
|
211
|
-
),
|
|
212
|
-
],
|
|
213
|
-
parameters: {
|
|
214
|
-
layout: 'fullscreen',
|
|
215
|
-
},
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
export const Draggable = () => <DraggableStory />;
|
|
219
|
-
export const ReadOnly = () => <ReadonlyCardStory />;
|
|
220
|
-
export const Editable = () => <EditableCardStory />;
|