@dxos/react-ui 0.9.1-main.c7dcc2e112 → 0.9.1-staging.ee54ba693a
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/{chunk-HFJYTGHU.mjs → chunk-CMHHVHX3.mjs} +4 -1
- package/dist/lib/browser/chunk-CMHHVHX3.mjs.map +7 -0
- package/dist/lib/browser/{chunk-F3PLXTDA.mjs → chunk-GTHV4WYK.mjs} +123 -232
- package/dist/lib/browser/chunk-GTHV4WYK.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1069 -976
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +5 -5
- package/dist/lib/browser/testing/index.mjs.map +2 -2
- package/dist/lib/browser/translations.mjs +1 -1
- package/dist/lib/node-esm/{chunk-LLVUYLAM.mjs → chunk-3VSKWNCQ.mjs} +123 -232
- package/dist/lib/node-esm/chunk-3VSKWNCQ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-OJYUPUCY.mjs → chunk-P4KFQGJI.mjs} +4 -1
- package/dist/lib/node-esm/chunk-P4KFQGJI.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1069 -976
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +5 -5
- package/dist/lib/node-esm/testing/index.mjs.map +2 -2
- package/dist/lib/node-esm/translations.mjs +1 -1
- package/dist/types/src/components/Avatars/Avatar.d.ts +1 -1
- package/dist/types/src/components/Avatars/Avatar.d.ts.map +1 -1
- package/dist/types/src/components/Breadcrumb/Breadcrumb.d.ts +3 -3
- package/dist/types/src/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/types/src/components/Button/Button.d.ts +2 -2
- package/dist/types/src/components/Button/Button.d.ts.map +1 -1
- package/dist/types/src/components/Button/IconButton.stories.d.ts +3 -0
- package/dist/types/src/components/Button/IconButton.stories.d.ts.map +1 -1
- package/dist/types/src/components/Button/MicButton.d.ts +24 -0
- package/dist/types/src/components/Button/MicButton.d.ts.map +1 -0
- package/dist/types/src/components/Button/MicButton.stories.d.ts +57 -0
- package/dist/types/src/components/Button/MicButton.stories.d.ts.map +1 -0
- package/dist/types/src/components/Button/SystemIconButton.d.ts +15 -2
- package/dist/types/src/components/Button/SystemIconButton.d.ts.map +1 -1
- package/dist/types/src/components/Button/SystemIconButton.stories.d.ts +51 -0
- package/dist/types/src/components/Button/SystemIconButton.stories.d.ts.map +1 -0
- package/dist/types/src/components/Button/ToggleGroup.d.ts +2 -2
- package/dist/types/src/components/Button/ToggleGroup.d.ts.map +1 -1
- package/dist/types/src/components/Button/index.d.ts +1 -0
- package/dist/types/src/components/Button/index.d.ts.map +1 -1
- package/dist/types/src/components/Calendar/Calendar.d.ts.map +1 -1
- package/dist/types/src/components/Calendar/Calendar.theme.d.ts.map +1 -1
- package/dist/types/src/components/Card/Card.d.ts +8 -8
- package/dist/types/src/components/Card/Card.d.ts.map +1 -1
- package/dist/types/src/components/Card/Card.stories.d.ts +2 -2
- package/dist/types/src/components/Card/Card.stories.d.ts.map +1 -1
- package/dist/types/src/components/Carousel/Carousel.d.ts +29 -6
- package/dist/types/src/components/Carousel/Carousel.d.ts.map +1 -1
- package/dist/types/src/components/Carousel/Carousel.stories.d.ts +48 -2
- package/dist/types/src/components/Carousel/Carousel.stories.d.ts.map +1 -1
- package/dist/types/src/components/Column/Column.d.ts +2 -2
- package/dist/types/src/components/Column/Column.d.ts.map +1 -1
- package/dist/types/src/components/Dialog/AlertDialog.d.ts +2 -2
- package/dist/types/src/components/Dialog/AlertDialog.d.ts.map +1 -1
- package/dist/types/src/components/Dialog/Dialog.d.ts +1 -1
- package/dist/types/src/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/types/src/components/Dialog/Dialog.stories.d.ts +2 -2
- package/dist/types/src/components/Dialog/Dialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/Icon/Icon.stories.d.ts +5 -0
- package/dist/types/src/components/Icon/Icon.stories.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.d.ts +4 -1
- package/dist/types/src/components/Input/Input.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.stories.d.ts +3 -3
- package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.theme.d.ts +10 -10
- package/dist/types/src/components/Input/Input.theme.d.ts.map +1 -1
- package/dist/types/src/components/Input/SegmentedInput.d.ts +8 -8
- package/dist/types/src/components/Input/SegmentedInput.d.ts.map +1 -1
- package/dist/types/src/components/Input/index.d.ts +0 -1
- package/dist/types/src/components/Input/index.d.ts.map +1 -1
- package/dist/types/src/components/Main/Main.d.ts +3 -3
- package/dist/types/src/components/Main/Main.d.ts.map +1 -1
- package/dist/types/src/components/Menu/ContextMenu.d.ts +1 -1
- package/dist/types/src/components/Menu/ContextMenu.d.ts.map +1 -1
- package/dist/types/src/components/Menu/DropdownMenu.d.ts +2 -2
- package/dist/types/src/components/Menu/DropdownMenu.d.ts.map +1 -1
- package/dist/types/src/components/Message/Message.d.ts +1 -1
- package/dist/types/src/components/Message/Message.d.ts.map +1 -1
- package/dist/types/src/components/Message/Message.stories.d.ts +2 -2
- package/dist/types/src/components/Message/Message.stories.d.ts.map +1 -1
- package/dist/types/src/components/Panel/Panel.d.ts +1 -1
- package/dist/types/src/components/Panel/Panel.d.ts.map +1 -1
- package/dist/types/src/components/Panel/Panel.theme.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.d.ts +2 -2
- package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
- package/dist/types/src/components/ScrollArea/ScrollArea.d.ts +2 -0
- package/dist/types/src/components/ScrollArea/ScrollArea.d.ts.map +1 -1
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts +1 -0
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts +1 -1
- package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts.map +1 -1
- package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts +2 -2
- package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/Select/Select.d.ts +1 -1
- package/dist/types/src/components/Select/Select.d.ts.map +1 -1
- package/dist/types/src/components/Select/Select.stories.d.ts +2 -2
- package/dist/types/src/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/types/src/components/Separator/Separator.d.ts.map +1 -1
- package/dist/types/src/components/Splitter/Splitter.d.ts +30 -16
- package/dist/types/src/components/Splitter/Splitter.d.ts.map +1 -1
- package/dist/types/src/components/Splitter/Splitter.stories.d.ts +6 -1
- package/dist/types/src/components/Splitter/Splitter.stories.d.ts.map +1 -1
- package/dist/types/src/components/Splitter/Splitter.theme.d.ts +3 -1
- package/dist/types/src/components/Splitter/Splitter.theme.d.ts.map +1 -1
- package/dist/types/src/components/Tag/Tag.d.ts +1 -1
- package/dist/types/src/components/Tag/Tag.d.ts.map +1 -1
- package/dist/types/src/components/Tag/Tag.theme.d.ts +1 -1
- package/dist/types/src/components/Tag/Tag.theme.d.ts.map +1 -1
- package/dist/types/src/components/Toast/Toast.d.ts +1 -1
- package/dist/types/src/components/Toast/Toast.d.ts.map +1 -1
- package/dist/types/src/components/Toast/Toast.theme.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.d.ts +3 -3
- package/dist/types/src/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts +2 -2
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/primitives/ThemeProvider/TranslationsProvider.d.ts +1 -8
- package/dist/types/src/primitives/ThemeProvider/TranslationsProvider.d.ts.map +1 -1
- package/dist/types/src/theme/defaultTheme.d.ts.map +1 -1
- package/dist/types/src/theme/index.d.ts +0 -2
- package/dist/types/src/theme/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +3 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/util/slots.d.ts +1 -1
- package/dist/types/src/util/slots.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +22 -21
- package/src/components/Avatars/Avatar.stories.tsx +2 -2
- package/src/components/Avatars/Avatar.theme.ts +1 -1
- package/src/components/Avatars/Avatar.tsx +3 -3
- package/src/components/Breadcrumb/Breadcrumb.tsx +6 -6
- package/src/components/Button/Button.tsx +2 -2
- package/src/components/Button/MicButton.stories.tsx +60 -0
- package/src/components/Button/MicButton.tsx +117 -0
- package/src/components/Button/SystemIconButton.stories.tsx +91 -0
- package/src/components/Button/SystemIconButton.tsx +113 -2
- package/src/components/Button/ToggleGroup.tsx +2 -2
- package/src/components/Button/index.ts +1 -0
- package/src/components/Calendar/Calendar.theme.ts +2 -0
- package/src/components/Calendar/Calendar.tsx +3 -3
- package/src/components/Card/Card.stories.tsx +2 -2
- package/src/components/Card/Card.tsx +11 -11
- package/src/components/Carousel/Carousel.stories.tsx +42 -18
- package/src/components/Carousel/Carousel.tsx +169 -33
- package/src/components/Column/Column.tsx +4 -7
- package/src/components/Dialog/AlertDialog.stories.tsx +2 -2
- package/src/components/Dialog/AlertDialog.tsx +13 -13
- package/src/components/Dialog/Dialog.stories.tsx +3 -4
- package/src/components/Dialog/Dialog.theme.ts +1 -1
- package/src/components/Dialog/Dialog.tsx +12 -12
- package/src/components/Icon/Icon.stories.tsx +23 -0
- package/src/components/Icon/Icon.theme.ts +1 -1
- package/src/components/Input/Input.stories.tsx +13 -5
- package/src/components/Input/Input.theme.ts +17 -39
- package/src/components/Input/Input.tsx +30 -13
- package/src/components/Input/SegmentedInput.tsx +50 -41
- package/src/components/Input/index.ts +0 -1
- package/src/components/Main/Main.tsx +3 -3
- package/src/components/MediaPlayer/MediaPlayer.tsx +4 -4
- package/src/components/Menu/ContextMenu.tsx +8 -8
- package/src/components/Menu/DropdownMenu.tsx +12 -13
- package/src/components/Message/Message.stories.tsx +2 -2
- package/src/components/Message/Message.theme.ts +1 -1
- package/src/components/Message/Message.tsx +2 -2
- package/src/components/Panel/Panel.theme.ts +2 -1
- package/src/components/Panel/Panel.tsx +1 -1
- package/src/components/Popover/Popover.tsx +9 -9
- package/src/components/ScrollArea/ScrollArea.tsx +7 -4
- package/src/components/ScrollContainer/ScrollContainer.stories.tsx +2 -2
- package/src/components/ScrollContainer/ScrollContainer.tsx +2 -2
- package/src/components/Select/Select.stories.tsx +2 -2
- package/src/components/Select/Select.theme.ts +1 -1
- package/src/components/Select/Select.tsx +14 -14
- package/src/components/Separator/Separator.tsx +1 -0
- package/src/components/Splitter/Splitter.stories.tsx +84 -20
- package/src/components/Splitter/Splitter.theme.ts +20 -3
- package/src/components/Splitter/Splitter.tsx +320 -47
- package/src/components/Tag/Tag.stories.tsx +1 -1
- package/src/components/Tag/Tag.theme.ts +1 -1
- package/src/components/Tag/Tag.tsx +3 -5
- package/src/components/Toast/Toast.theme.ts +3 -2
- package/src/components/Toast/Toast.tsx +5 -5
- package/src/components/Toolbar/Toolbar.tsx +10 -10
- package/src/components/Tooltip/Tooltip.stories.tsx +2 -2
- package/src/components/Tooltip/Tooltip.tsx +3 -3
- package/src/components/index.ts +0 -1
- package/src/exemplars/tabster.stories.tsx +1 -1
- package/src/index.ts +1 -1
- package/src/primitives/ThemeProvider/TranslationsProvider.tsx +10 -30
- package/src/testing/decorators/withLayout.tsx +4 -4
- package/src/theme/defaultTheme.ts +0 -4
- package/src/theme/index.ts +0 -2
- package/src/translations.ts +8 -0
- package/src/util/slots.ts +5 -5
- package/dist/lib/browser/chunk-F3PLXTDA.mjs.map +0 -7
- package/dist/lib/browser/chunk-HFJYTGHU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-LLVUYLAM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OJYUPUCY.mjs.map +0 -7
- package/dist/types/src/components/Input/constants.d.ts +0 -5
- package/dist/types/src/components/Input/constants.d.ts.map +0 -1
- package/dist/types/src/components/List/List.d.ts +0 -29
- package/dist/types/src/components/List/List.d.ts.map +0 -1
- package/dist/types/src/components/List/List.stories.d.ts +0 -16
- package/dist/types/src/components/List/List.stories.d.ts.map +0 -1
- package/dist/types/src/components/List/List.theme.d.ts +0 -7
- package/dist/types/src/components/List/List.theme.d.ts.map +0 -1
- package/dist/types/src/components/List/ListDropIndicator.d.ts +0 -13
- package/dist/types/src/components/List/ListDropIndicator.d.ts.map +0 -1
- package/dist/types/src/components/List/Tree.d.ts +0 -23
- package/dist/types/src/components/List/Tree.d.ts.map +0 -1
- package/dist/types/src/components/List/Tree.stories.d.ts +0 -15
- package/dist/types/src/components/List/Tree.stories.d.ts.map +0 -1
- package/dist/types/src/components/List/TreeDropIndicator.d.ts +0 -8
- package/dist/types/src/components/List/TreeDropIndicator.d.ts.map +0 -1
- package/dist/types/src/components/List/Treegrid.d.ts +0 -33
- package/dist/types/src/components/List/Treegrid.d.ts.map +0 -1
- package/dist/types/src/components/List/Treegrid.stories.d.ts +0 -12
- package/dist/types/src/components/List/Treegrid.stories.d.ts.map +0 -1
- package/dist/types/src/components/List/Treegrid.theme.d.ts +0 -7
- package/dist/types/src/components/List/Treegrid.theme.d.ts.map +0 -1
- package/dist/types/src/components/List/index.d.ts +0 -4
- package/dist/types/src/components/List/index.d.ts.map +0 -1
- package/src/components/Input/constants.ts +0 -8
- package/src/components/List/List.stories.tsx +0 -234
- package/src/components/List/List.theme.ts +0 -47
- package/src/components/List/List.tsx +0 -171
- package/src/components/List/ListDropIndicator.tsx +0 -69
- package/src/components/List/Tree.stories.tsx +0 -87
- package/src/components/List/Tree.tsx +0 -74
- package/src/components/List/TreeDropIndicator.tsx +0 -70
- package/src/components/List/Treegrid.stories.tsx +0 -156
- package/src/components/List/Treegrid.theme.ts +0 -35
- package/src/components/List/Treegrid.tsx +0 -187
- package/src/components/List/index.ts +0 -7
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
Tooltip,
|
|
6
6
|
defaultTx,
|
|
7
7
|
parseCaptureOwnerStack
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-3VSKWNCQ.mjs";
|
|
9
9
|
|
|
10
10
|
// src/testing/decorators/withLayout.tsx
|
|
11
11
|
import React, { memo } from "react";
|
|
@@ -31,14 +31,14 @@ var layouts = {
|
|
|
31
31
|
className: mx("fixed inset-0 flex overflow-hidden bg-black", classNames)
|
|
32
32
|
}, children),
|
|
33
33
|
centered: ({ classNames, children }) => /* @__PURE__ */ React.createElement("div", {
|
|
34
|
-
className: mx("fixed inset-0 grid overflow-hidden place-items-center bg-
|
|
34
|
+
className: mx("fixed inset-0 grid overflow-hidden place-items-center bg-trim-surface")
|
|
35
35
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
36
|
-
className: mx("flex flex-col
|
|
36
|
+
className: mx("flex flex-col bg-base-surface", classNames)
|
|
37
37
|
}, children)),
|
|
38
38
|
column: ({ classNames, children }) => /* @__PURE__ */ React.createElement("div", {
|
|
39
|
-
className: "fixed inset-0 flex overflow-hidden justify-center bg-
|
|
39
|
+
className: "fixed inset-0 flex overflow-hidden justify-center bg-trim-surface"
|
|
40
40
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
41
|
-
className: mx("flex flex-col w-[40rem]
|
|
41
|
+
className: mx("flex flex-col w-[40rem] bg-base-surface", classNames)
|
|
42
42
|
}, children))
|
|
43
43
|
};
|
|
44
44
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/testing/decorators/withLayout.tsx", "../../../../src/testing/decorators/withLayoutVariants.tsx", "../../../../src/testing/decorators/withTheme.tsx", "../../../../src/testing/Loading.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react';\nimport React, { type FC, type PropsWithChildren, memo } from 'react';\n\nimport { type ClassNameValue, type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/ui-theme';\n\nexport type ContainerProps = ThemedClassName<PropsWithChildren>;\n\nexport type ContainerType = 'default' | 'fullscreen' | 'centered' | 'column';\n\nexport type WithLayoutProps =\n | FC<ContainerProps>\n | {\n classNames?: ClassNameValue;\n layout?: ContainerType;\n scroll?: boolean;\n };\n\n/**\n * Adds layout container.\n */\nexport const withLayout =\n (props: WithLayoutProps = {}): Decorator =>\n (Story) => {\n // Prevent re-rendering of the story.\n const MemoizedStory = memo(Story);\n if (typeof props === 'function') {\n const Container = props;\n return (\n <Container>\n <MemoizedStory />\n </Container>\n );\n } else {\n const { layout = 'default', classNames, scroll } = props;\n const Container = layouts[layout] ?? layouts.fullscreen;\n return (\n <Container classNames={mx(scroll ? 'overflow-y-auto' : 'overflow-hidden', classNames)}>\n <MemoizedStory />\n </Container>\n );\n }\n };\n\nconst layouts: Record<ContainerType, FC<ContainerProps>> = {\n default: ({ classNames, children }: ContainerProps) => <div className={mx('p-4', classNames)}>{children}</div>,\n\n fullscreen: ({ classNames, children }: ContainerProps) => (\n <div className={mx('fixed inset-0 flex overflow-hidden bg-black', classNames)}>{children}</div>\n ),\n\n centered: ({ classNames, children }: ContainerProps) => (\n <div className={mx('fixed inset-0 grid overflow-hidden place-items-center bg-
|
|
5
|
-
"mappings": ";;;;;;;;;;AAKA,OAAOA,SAA0CC,YAAY;AAG7D,SAASC,UAAU;AAiBZ,IAAMC,aACX,CAACC,QAAyB,CAAC,MAC3B,CAACC,UAAAA;AAEC,QAAMC,gBAAgBL,qBAAKI,KAAAA;AAC3B,MAAI,OAAOD,UAAU,YAAY;AAC/B,UAAMG,aAAYH;AAClB,WACE,sBAAA,cAACG,YAAAA,MACC,sBAAA,cAACD,eAAAA,IAAAA,CAAAA;EAGP,OAAO;AACL,UAAM,EAAEE,SAAS,WAAWC,YAAYC,OAAM,IAAKN;AACnD,UAAMG,aAAYI,QAAQH,MAAAA,KAAWG,QAAQC;AAC7C,WACE,sBAAA,cAACL,YAAAA;MAAUE,YAAYP,GAAGQ,SAAS,oBAAoB,mBAAmBD,UAAAA;OACxE,sBAAA,cAACH,eAAAA,IAAAA,CAAAA;EAGP;AACF;AAEF,IAAMK,UAAqD;EACzDE,SAAS,CAAC,EAAEJ,YAAYK,SAAQ,MAAuB,sBAAA,cAACC,OAAAA;IAAIC,WAAWd,GAAG,OAAOO,UAAAA;KAAcK,QAAAA;EAE/FF,YAAY,CAAC,EAAEH,YAAYK,SAAQ,MACjC,sBAAA,cAACC,OAAAA;IAAIC,WAAWd,GAAG,+CAA+CO,UAAAA;KAAcK,QAAAA;EAGlFG,UAAU,CAAC,EAAER,YAAYK,SAAQ,MAC/B,sBAAA,cAACC,OAAAA;IAAIC,WAAWd,GAAG,
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react';\nimport React, { type FC, type PropsWithChildren, memo } from 'react';\n\nimport { type ClassNameValue, type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/ui-theme';\n\nexport type ContainerProps = ThemedClassName<PropsWithChildren>;\n\nexport type ContainerType = 'default' | 'fullscreen' | 'centered' | 'column';\n\nexport type WithLayoutProps =\n | FC<ContainerProps>\n | {\n classNames?: ClassNameValue;\n layout?: ContainerType;\n scroll?: boolean;\n };\n\n/**\n * Adds layout container.\n */\nexport const withLayout =\n (props: WithLayoutProps = {}): Decorator =>\n (Story) => {\n // Prevent re-rendering of the story.\n const MemoizedStory = memo(Story);\n if (typeof props === 'function') {\n const Container = props;\n return (\n <Container>\n <MemoizedStory />\n </Container>\n );\n } else {\n const { layout = 'default', classNames, scroll } = props;\n const Container = layouts[layout] ?? layouts.fullscreen;\n return (\n <Container classNames={mx(scroll ? 'overflow-y-auto' : 'overflow-hidden', classNames)}>\n <MemoizedStory />\n </Container>\n );\n }\n };\n\nconst layouts: Record<ContainerType, FC<ContainerProps>> = {\n default: ({ classNames, children }: ContainerProps) => <div className={mx('p-4', classNames)}>{children}</div>,\n\n fullscreen: ({ classNames, children }: ContainerProps) => (\n <div className={mx('fixed inset-0 flex overflow-hidden bg-black', classNames)}>{children}</div>\n ),\n\n centered: ({ classNames, children }: ContainerProps) => (\n <div className={mx('fixed inset-0 grid overflow-hidden place-items-center bg-trim-surface')}>\n <div className={mx('flex flex-col bg-base-surface', classNames)}>{children}</div>\n </div>\n ),\n\n column: ({ classNames, children }: ContainerProps) => (\n <div className='fixed inset-0 flex overflow-hidden justify-center bg-trim-surface'>\n <div className={mx('flex flex-col w-[40rem] bg-base-surface', classNames)}>{children}</div>\n </div>\n ),\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react';\nimport React, { type ComponentType, type PropsWithChildren } from 'react';\n\nimport { mx, surfaceShadow } from '@dxos/ui-theme';\nimport { type Density, type Elevation } from '@dxos/ui-types';\n\ntype Config = {\n elevations?: { elevation: Elevation; surface?: string }[];\n densities?: Density[];\n};\n\nconst Container = ({ children, elevation, surface }: PropsWithChildren<{ elevation: Elevation; surface?: string }>) => (\n <div className={mx('p-4 rounded-sm', surface, surfaceShadow({ elevation }))}>{children}</div>\n);\n\nconst Panel = ({\n Story,\n elevations,\n densities,\n className,\n}: { Story: ComponentType } & Config & { className?: string }) => {\n return (\n <div className={mx('flex flex-col h-full p-8 gap-8', className)}>\n {elevations?.map(({ elevation, surface }) =>\n densities?.map((density) => (\n <Container key={`${elevation}--${density}`} surface={surface} elevation={elevation}>\n <Story />\n </Container>\n )),\n )}\n </div>\n );\n};\n\nexport const withLayoutVariants = ({\n elevations = [\n { elevation: 'dialog', surface: 'bg-modal-surface' },\n { elevation: 'positioned', surface: 'bg-card-surface' },\n { elevation: 'base', surface: 'bg-base-surface' },\n ],\n densities = ['md'],\n}: Config = {}): Decorator => {\n return (Story) => <Panel Story={Story} elevations={elevations} densities={densities} />;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react';\nimport React from 'react';\nimport { I18nProvider } from 'react-aria-components';\n\nimport { type ThemeMode } from '@dxos/ui-types';\n\nimport { Tooltip } from '../../components';\nimport { type ThemeContextValue, ThemeProvider } from '../../primitives';\nimport { defaultTx } from '../../theme';\n\n/**\n * Adds theme decorator.\n *\n * `I18nProvider` is included so react-aria-components-backed widgets (DateField, Calendar, …)\n * have a guaranteed locale in headless test environments where `navigator.language` may be\n * empty.\n */\nexport const withTheme =\n ({ tx = defaultTx, noCache, platform }: Partial<ThemeContextValue> = {}): Decorator =>\n (Story, context) => {\n const {\n globals: { theme },\n parameters: { translations },\n } = context;\n\n return (\n <I18nProvider locale='en-US'>\n <ThemeProvider\n tx={tx}\n themeMode={(theme as ThemeMode) || 'dark'}\n resourceExtensions={translations}\n noCache={noCache}\n platform={platform}\n >\n <Tooltip.Provider>\n <Story />\n </Tooltip.Provider>\n </ThemeProvider>\n </I18nProvider>\n );\n };\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { captureOwnerStack, useEffect, useState } from 'react';\n\nimport { mx } from '@dxos/ui-theme';\nimport { safeStringify } from '@dxos/util';\n\nimport { ErrorStack, parseCaptureOwnerStack } from '../components';\n\nexport type LoadingProps = { data?: any };\n\n/**\n * Storybook loading component.\n */\nexport const Loading = ({ data }: LoadingProps) => {\n const [visible, setVisible] = useState(false);\n const ownerFrames = parseCaptureOwnerStack(captureOwnerStack());\n\n useEffect(() => {\n const t = setTimeout(() => setVisible(true), 500);\n return () => clearTimeout(t);\n }, []);\n\n return (\n <div className='grid p-2'>\n <div\n className={mx(\n 'flex flex-col w-full p-2 border-2 border-teal-500 rounded-md',\n 'opacity-0 transition delay-1000 duration-1000',\n 'overflow-auto',\n visible && 'opacity-100',\n )}\n >\n <h2 className='uppercase capitalize text-xs'>Loading State</h2>\n <pre className='text-sm text-description'>{safeStringify(data, undefined, 2)}</pre>\n\n <h3 className='uppercase capitalize text-xs mt-2'>Owner stack</h3>\n {ownerFrames && ownerFrames.length > 0 ? (\n <ErrorStack frames={ownerFrames} />\n ) : (\n <p className='text-xs text-subdued'>No owner stack (production build or unsupported context).</p>\n )}\n </div>\n </div>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;AAKA,OAAOA,SAA0CC,YAAY;AAG7D,SAASC,UAAU;AAiBZ,IAAMC,aACX,CAACC,QAAyB,CAAC,MAC3B,CAACC,UAAAA;AAEC,QAAMC,gBAAgBL,qBAAKI,KAAAA;AAC3B,MAAI,OAAOD,UAAU,YAAY;AAC/B,UAAMG,aAAYH;AAClB,WACE,sBAAA,cAACG,YAAAA,MACC,sBAAA,cAACD,eAAAA,IAAAA,CAAAA;EAGP,OAAO;AACL,UAAM,EAAEE,SAAS,WAAWC,YAAYC,OAAM,IAAKN;AACnD,UAAMG,aAAYI,QAAQH,MAAAA,KAAWG,QAAQC;AAC7C,WACE,sBAAA,cAACL,YAAAA;MAAUE,YAAYP,GAAGQ,SAAS,oBAAoB,mBAAmBD,UAAAA;OACxE,sBAAA,cAACH,eAAAA,IAAAA,CAAAA;EAGP;AACF;AAEF,IAAMK,UAAqD;EACzDE,SAAS,CAAC,EAAEJ,YAAYK,SAAQ,MAAuB,sBAAA,cAACC,OAAAA;IAAIC,WAAWd,GAAG,OAAOO,UAAAA;KAAcK,QAAAA;EAE/FF,YAAY,CAAC,EAAEH,YAAYK,SAAQ,MACjC,sBAAA,cAACC,OAAAA;IAAIC,WAAWd,GAAG,+CAA+CO,UAAAA;KAAcK,QAAAA;EAGlFG,UAAU,CAAC,EAAER,YAAYK,SAAQ,MAC/B,sBAAA,cAACC,OAAAA;IAAIC,WAAWd,GAAG,uEAA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IAAEV,WAAU;KAAuB,2DAAA,CAAA,CAAA;AAK9C;",
|
|
6
6
|
"names": ["React", "memo", "mx", "withLayout", "props", "Story", "MemoizedStory", "Container", "layout", "classNames", "scroll", "layouts", "fullscreen", "default", "children", "div", "className", "centered", "column", "React", "mx", "surfaceShadow", "Container", "children", "elevation", "surface", "div", "className", "Panel", "Story", "elevations", "densities", "map", "density", "key", "withLayoutVariants", "React", "I18nProvider", "withTheme", "tx", "defaultTx", "noCache", "platform", "Story", "context", "globals", "theme", "parameters", "translations", "React", "I18nProvider", "locale", "ThemeProvider", "themeMode", "resourceExtensions", "Tooltip", "Provider", "React", "captureOwnerStack", "useEffect", "useState", "mx", "safeStringify", "Loading", "data", "visible", "setVisible", "useState", "ownerFrames", "parseCaptureOwnerStack", "captureOwnerStack", "useEffect", "t", "setTimeout", "clearTimeout", "React", "div", "className", "mx", "h2", "pre", "safeStringify", "undefined", "h3", "length", "ErrorStack", "frames", "p"]
|
|
7
7
|
}
|
|
@@ -26,5 +26,5 @@ export declare const Avatar: {
|
|
|
26
26
|
Description: React.ForwardRefExoticComponent<Omit<AvatarDescriptionProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
27
27
|
};
|
|
28
28
|
export { useAvatarContext };
|
|
29
|
-
export type {
|
|
29
|
+
export type { AvatarAnimation, AvatarContentProps, AvatarDescriptionProps, AvatarLabelProps, AvatarStatus, AvatarVariant, NaturalDxAvatar as DxAvatar, };
|
|
30
30
|
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Avatars/Avatar.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,KAAK,qBAAqB,EAAE,KAAK,iBAAiB,EAAc,MAAM,OAAO,CAAC;AAEnH,OAAO,6BAA6B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DsF,eAAe;IA8DzG,OAAO;IACP,KAAK;IACL,WAAW;CACZ,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,eAAe,IAAI,QAAQ,GAC5B,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
2
|
-
import React, { type
|
|
2
|
+
import React, { type ComponentPropsWithoutRef, type ComponentPropsWithRef } from 'react';
|
|
3
3
|
import { type ThemedClassName } from '../../util';
|
|
4
4
|
import { type LinkProps } from '../Link';
|
|
5
5
|
type BreadcrumbRootProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {
|
|
6
6
|
'aria-label': string;
|
|
7
|
-
asChild?: boolean;
|
|
7
|
+
'asChild'?: boolean;
|
|
8
8
|
};
|
|
9
9
|
type BreadcrumbListProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.ol>> & {
|
|
10
10
|
asChild?: boolean;
|
|
@@ -29,5 +29,5 @@ export declare const Breadcrumb: {
|
|
|
29
29
|
Current: React.ForwardRefExoticComponent<Omit<BreadcrumbCurrentProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
30
30
|
Separator: typeof BreadcrumbSeparator;
|
|
31
31
|
};
|
|
32
|
-
export type {
|
|
32
|
+
export type { BreadcrumbCurrentProps, BreadcrumbLinkProps, BreadcrumbListItemProps, BreadcrumbListProps, BreadcrumbRootProps, BreadcrumbSeparatorProps, };
|
|
33
33
|
//# sourceMappingURL=Breadcrumb.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../../../../../src/components/Breadcrumb/Breadcrumb.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,K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ACrB,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,IAAI;IACJ,OAAO;IACP,SAAS;CACV,CAAC;AAEF,YAAY,EACV,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,GACzB,CAAC"}
|
|
@@ -21,6 +21,6 @@ type ButtonGroupProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.d
|
|
|
21
21
|
asChild?: boolean;
|
|
22
22
|
};
|
|
23
23
|
declare const ButtonGroup: React.ForwardRefExoticComponent<Omit<ButtonGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
-
export { Button,
|
|
25
|
-
export type {
|
|
24
|
+
export { Button, BUTTON_GROUP_NAME, ButtonGroup, useButtonGroupContext };
|
|
25
|
+
export type { ButtonGroupProps, ButtonProps };
|
|
26
26
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAoB,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG9D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,KAAK,WAAW,GAAG,eAAe,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG;IACnF,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,GAAG,SAAS,CAAC;IAClF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IACl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IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAErD,QAAA,MAAM,iBAAiB,gBAAgB,CAAC;AAGxC,QAAA,MAA4B,qBAAqB,mDAE/C,CAAC;AAEH,QAAA,MAAM,MAAM,+FAsDX,CAAC;AAIF,KAAK,gBAAgB,GAAG,eAAe,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG;IACrF,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,QAAA,MAAM,WAAW,sGAWhB,CAAC;AAIF,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;AAEzE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -25,6 +25,9 @@ declare const meta: {
|
|
|
25
25
|
readonly 'system-button.delete.label': 'Delete';
|
|
26
26
|
readonly 'system-button.edit.label': 'Edit';
|
|
27
27
|
readonly 'system-button.close.label': 'Close';
|
|
28
|
+
readonly 'system-button.upload.label': 'Upload';
|
|
29
|
+
readonly 'system-button.download.label': 'Download';
|
|
30
|
+
readonly 'system-button.clipboard.label': 'Copy';
|
|
28
31
|
readonly 'carousel-viewport.label': 'Carousel';
|
|
29
32
|
readonly 'carousel-prev.label': 'Previous slide';
|
|
30
33
|
readonly 'carousel-next.label': 'Next slide';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/IconButton.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmC,MAAM,OAAO,CAAC;AAQxD,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAyHhE,QAAA,MAAM,IAAI;;;YAGgB,GAAG
|
|
1
|
+
{"version":3,"file":"IconButton.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/IconButton.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmC,MAAM,OAAO,CAAC;AAQxD,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAyHhE,QAAA,MAAM,IAAI;;;YAGgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMM,CAAC;eAErB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAOnB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAKpB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type IconButtonProps } from './IconButton';
|
|
3
|
+
export type MicButtonMode = 'toggle' | 'hold';
|
|
4
|
+
export type MicButtonProps = Omit<IconButtonProps, 'icon' | 'onClick'> & {
|
|
5
|
+
/** Defaults to a microphone glyph. */
|
|
6
|
+
icon?: IconButtonProps['icon'];
|
|
7
|
+
/** `toggle`: click flips recording. `hold`: records only while held (push-to-talk). */
|
|
8
|
+
mode?: MicButtonMode;
|
|
9
|
+
/** Whether recording is active; drives the active (recording) styling. */
|
|
10
|
+
recording?: boolean;
|
|
11
|
+
/** Fired in `toggle` mode on click. */
|
|
12
|
+
onToggle?: () => void;
|
|
13
|
+
/** Fired in `hold` mode when the press begins. */
|
|
14
|
+
onPressStart?: () => void;
|
|
15
|
+
/** Fired in `hold` mode when the press ends (release, cancel, or lost capture). */
|
|
16
|
+
onPressEnd?: () => void;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Microphone record button. In `toggle` mode a click flips recording; in `hold` mode recording is
|
|
20
|
+
* active only while the button is held (push-to-talk), using pointer capture so the release still
|
|
21
|
+
* fires if the pointer leaves the button. Presentational — the caller owns recording state.
|
|
22
|
+
*/
|
|
23
|
+
export declare const MicButton: React.ForwardRefExoticComponent<Omit<MicButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
24
|
+
//# sourceMappingURL=MicButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MicButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/MicButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAiF,MAAM,OAAO,CAAC;AAEtG,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhE,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE9C,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG;IACvE,sCAAsC;IACtC,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC/B,uFAAuF;IACvF,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,kDAAkD;IAClD,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,mFAAmF;IACnF,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,uGAsFrB,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { type MicButtonProps } from './MicButton';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
decorators: import("@storybook/react").Decorator[];
|
|
7
|
+
component: React.ForwardRefExoticComponent<Omit<MicButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
render: ({ mode, ...props }: MicButtonProps) => React.JSX.Element;
|
|
9
|
+
args: {
|
|
10
|
+
label: string;
|
|
11
|
+
mode: "toggle";
|
|
12
|
+
};
|
|
13
|
+
parameters: {
|
|
14
|
+
layout: string;
|
|
15
|
+
translations: [{
|
|
16
|
+
readonly 'en-US': {
|
|
17
|
+
readonly "@dxos/react-ui": {
|
|
18
|
+
readonly 'toolbar-menu.label': 'Action menu';
|
|
19
|
+
readonly 'toolbar-drag-handle.label': 'Drag to rearrange';
|
|
20
|
+
readonly 'toolbar-close.label': 'Close';
|
|
21
|
+
readonly 'toolbar-delete.label': 'Delete';
|
|
22
|
+
readonly 'system-button.star.label': 'Star';
|
|
23
|
+
readonly 'system-button.unstar.label': 'Unstar';
|
|
24
|
+
readonly 'system-button.bookmark.label': 'Bookmark';
|
|
25
|
+
readonly 'system-button.unbookmark.label': 'Remove bookmark';
|
|
26
|
+
readonly 'system-button.expand.label': 'Expand';
|
|
27
|
+
readonly 'system-button.collapse.label': 'Collapse';
|
|
28
|
+
readonly 'system-button.add.label': 'Add';
|
|
29
|
+
readonly 'system-button.delete.label': 'Delete';
|
|
30
|
+
readonly 'system-button.edit.label': 'Edit';
|
|
31
|
+
readonly 'system-button.close.label': 'Close';
|
|
32
|
+
readonly 'system-button.upload.label': 'Upload';
|
|
33
|
+
readonly 'system-button.download.label': 'Download';
|
|
34
|
+
readonly 'system-button.clipboard.label': 'Copy';
|
|
35
|
+
readonly 'carousel-viewport.label': 'Carousel';
|
|
36
|
+
readonly 'carousel-prev.label': 'Previous slide';
|
|
37
|
+
readonly 'carousel-next.label': 'Next slide';
|
|
38
|
+
readonly 'carousel-indicators.label': 'Carousel slides';
|
|
39
|
+
readonly 'carousel-go-to.label': 'Go to slide {{index}}';
|
|
40
|
+
readonly 'date-picker.placeholder.single.label': 'Pick a date';
|
|
41
|
+
readonly 'date-picker.placeholder.range.label': 'Pick a date range';
|
|
42
|
+
readonly 'date-picker.placeholder.multiple.label': 'Pick dates';
|
|
43
|
+
readonly 'date-picker.clear.label': 'Clear';
|
|
44
|
+
readonly 'calendar.nav.previous.label': 'Previous month';
|
|
45
|
+
readonly 'calendar.nav.next.label': 'Next month';
|
|
46
|
+
readonly 'calendar.footer.today.label': 'Today';
|
|
47
|
+
readonly 'trigger-button.label': 'Open';
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
}];
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export default meta;
|
|
54
|
+
type Story = StoryObj<typeof meta>;
|
|
55
|
+
export declare const Toggle: Story;
|
|
56
|
+
export declare const Hold: Story;
|
|
57
|
+
//# sourceMappingURL=MicButton.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MicButton.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/MicButton.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAuB7D,QAAA,MAAM,IAAI;;;;iCArB2C,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BjC,CAAC;eAEpB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,MAAM,EAAE,KAIpB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAIlB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { InputHTMLAttributes } from 'react';
|
|
2
2
|
import { type IconButtonProps } from './IconButton';
|
|
3
3
|
import { type ToggleIconButtonProps } from './ToggleIconButton';
|
|
4
4
|
type StaticPresetProps = Omit<IconButtonProps, 'icon' | 'label'> & {
|
|
@@ -7,6 +7,16 @@ type StaticPresetProps = Omit<IconButtonProps, 'icon' | 'label'> & {
|
|
|
7
7
|
type TogglePresetProps = Omit<ToggleIconButtonProps, 'icon' | 'activeIcon' | 'label'> & {
|
|
8
8
|
label?: string;
|
|
9
9
|
};
|
|
10
|
+
type ClipboardIconButtonProps = StaticPresetProps & {
|
|
11
|
+
onCopy: () => string;
|
|
12
|
+
};
|
|
13
|
+
type UploadIconButtonProps = StaticPresetProps & Pick<InputHTMLAttributes<HTMLInputElement>, 'accept'> & {
|
|
14
|
+
onFileChange?: InputHTMLAttributes<HTMLInputElement>['onChange'];
|
|
15
|
+
};
|
|
16
|
+
type DownloadIconButtonProps = StaticPresetProps & {
|
|
17
|
+
filename: string;
|
|
18
|
+
onDownload: () => Blob | null;
|
|
19
|
+
};
|
|
10
20
|
export declare const SystemIconButton: {
|
|
11
21
|
Star: React.ForwardRefExoticComponent<Omit<TogglePresetProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
12
22
|
Bookmark: React.ForwardRefExoticComponent<Omit<TogglePresetProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -15,6 +25,9 @@ export declare const SystemIconButton: {
|
|
|
15
25
|
Delete: React.ForwardRefExoticComponent<Omit<StaticPresetProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
16
26
|
Edit: React.ForwardRefExoticComponent<Omit<StaticPresetProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
17
27
|
Close: React.ForwardRefExoticComponent<Omit<StaticPresetProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
28
|
+
Clipboard: React.ForwardRefExoticComponent<Omit<ClipboardIconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
29
|
+
Upload: React.ForwardRefExoticComponent<Omit<UploadIconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
30
|
+
Download: React.ForwardRefExoticComponent<Omit<DownloadIconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
18
31
|
};
|
|
19
|
-
export type { StaticPresetProps, TogglePresetProps };
|
|
32
|
+
export type { ClipboardIconButtonProps, DownloadIconButtonProps, StaticPresetProps, TogglePresetProps, UploadIconButtonProps, };
|
|
20
33
|
//# sourceMappingURL=SystemIconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SystemIconButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/SystemIconButton.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"SystemIconButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/SystemIconButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,mBAAmB,EAAmC,MAAM,OAAO,CAAC;AAKpF,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAGlF,KAAK,iBAAiB,GAAG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAGtF,KAAK,iBAAiB,GAAG,IAAI,CAAC,qBAAqB,EAAE,MAAM,GAAG,YAAY,GAAG,OAAO,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AA8H3G,KAAK,wBAAwB,GAAG,iBAAiB,GAAG;IAClD,MAAM,EAAE,MAAM,MAAM,CAAC;CACtB,CAAC;AA6BF,KAAK,qBAAqB,GAAG,iBAAiB,GAC5C,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,QAAQ,CAAC,GAAG;IACtD,YAAY,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,UAAU,CAAC,CAAC;CAClE,CAAC;AA2BJ,KAAK,uBAAuB,GAAG,iBAAiB,GAAG;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;CAC/B,CAAC;AAsCF,eAAO,MAAM,gBAAgB;IAC3B,IAAI;IACJ,QAAQ;IACR,QAAQ;IACR,GAAG;IACH,MAAM;IACN,IAAI;IACJ,KAAK;IACL,SAAS;IACT,MAAM;IACN,QAAQ;CACT,CAAC;AAEF,YAAY,EACV,wBAAwB,EACxB,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,GACtB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<Omit<import("./SystemIconButton").StaticPresetProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
render: () => React.JSX.Element;
|
|
7
|
+
decorators: import("@storybook/react").Decorator[];
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
translations: [{
|
|
11
|
+
readonly 'en-US': {
|
|
12
|
+
readonly "@dxos/react-ui": {
|
|
13
|
+
readonly 'toolbar-menu.label': 'Action menu';
|
|
14
|
+
readonly 'toolbar-drag-handle.label': 'Drag to rearrange';
|
|
15
|
+
readonly 'toolbar-close.label': 'Close';
|
|
16
|
+
readonly 'toolbar-delete.label': 'Delete';
|
|
17
|
+
readonly 'system-button.star.label': 'Star';
|
|
18
|
+
readonly 'system-button.unstar.label': 'Unstar';
|
|
19
|
+
readonly 'system-button.bookmark.label': 'Bookmark';
|
|
20
|
+
readonly 'system-button.unbookmark.label': 'Remove bookmark';
|
|
21
|
+
readonly 'system-button.expand.label': 'Expand';
|
|
22
|
+
readonly 'system-button.collapse.label': 'Collapse';
|
|
23
|
+
readonly 'system-button.add.label': 'Add';
|
|
24
|
+
readonly 'system-button.delete.label': 'Delete';
|
|
25
|
+
readonly 'system-button.edit.label': 'Edit';
|
|
26
|
+
readonly 'system-button.close.label': 'Close';
|
|
27
|
+
readonly 'system-button.upload.label': 'Upload';
|
|
28
|
+
readonly 'system-button.download.label': 'Download';
|
|
29
|
+
readonly 'system-button.clipboard.label': 'Copy';
|
|
30
|
+
readonly 'carousel-viewport.label': 'Carousel';
|
|
31
|
+
readonly 'carousel-prev.label': 'Previous slide';
|
|
32
|
+
readonly 'carousel-next.label': 'Next slide';
|
|
33
|
+
readonly 'carousel-indicators.label': 'Carousel slides';
|
|
34
|
+
readonly 'carousel-go-to.label': 'Go to slide {{index}}';
|
|
35
|
+
readonly 'date-picker.placeholder.single.label': 'Pick a date';
|
|
36
|
+
readonly 'date-picker.placeholder.range.label': 'Pick a date range';
|
|
37
|
+
readonly 'date-picker.placeholder.multiple.label': 'Pick dates';
|
|
38
|
+
readonly 'date-picker.clear.label': 'Clear';
|
|
39
|
+
readonly 'calendar.nav.previous.label': 'Previous month';
|
|
40
|
+
readonly 'calendar.nav.next.label': 'Next month';
|
|
41
|
+
readonly 'calendar.footer.today.label': 'Today';
|
|
42
|
+
readonly 'trigger-button.label': 'Open';
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
}];
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export default meta;
|
|
49
|
+
type Story = StoryObj<typeof meta>;
|
|
50
|
+
export declare const Default: Story;
|
|
51
|
+
//# sourceMappingURL=SystemIconButton.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SystemIconButton.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/SystemIconButton.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAoExC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASmC,CAAC;eAE/B,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
|
|
@@ -22,6 +22,6 @@ type ToggleGroupItemProps = Omit<ToggleGroupPrimitive.ToggleGroupItemProps, 'cla
|
|
|
22
22
|
declare const ToggleGroupItem: React.ForwardRefExoticComponent<Omit<ToggleGroupItemProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
23
23
|
type ToggleGroupIconItemProps = Omit<ToggleGroupPrimitive.ToggleGroupItemProps, 'className'> & IconButtonProps;
|
|
24
24
|
declare const ToggleGroupIconItem: React.ForwardRefExoticComponent<Omit<ToggleGroupIconItemProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
25
|
-
export { ToggleGroup,
|
|
26
|
-
export type {
|
|
25
|
+
export { ToggleGroup, ToggleGroupIconItem, ToggleGroupItem };
|
|
26
|
+
export type { ToggleGroupItemProps, ToggleGroupProps };
|
|
27
27
|
//# sourceMappingURL=ToggleGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleGroup.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/ToggleGroup.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAA8C,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACxF,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhE,KAAK,gBAAgB,GACjB,IAAI,CAAC,oBAAoB,CAAC,sBAAsB,EAAE,WAAW,CAAC,GAC9D,IAAI,CAAC,oBAAoB,CAAC,wBAAwB,EAAE,WAAW,CAAC,CAAC;AAErE,QAAA,MAAM,WAAW;;;;;;;;;;;;;;iDAQhB,CAAC;AAEF,KAAK,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC,oBAAoB,EAAE,WAAW,CAAC,GAAG,WAAW,CAAC;AAEvG,QAAA,MAAM,eAAe,6GAQpB,CAAC;AAEF,KAAK,wBAAwB,GAAG,IAAI,CAAC,oBAAoB,CAAC,oBAAoB,EAAE,WAAW,CAAC,GAAG,eAAe,CAAC;AAE/G,QAAA,MAAM,mBAAmB,iHAQxB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"ToggleGroup.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/ToggleGroup.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAA8C,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACxF,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhE,KAAK,gBAAgB,GACjB,IAAI,CAAC,oBAAoB,CAAC,sBAAsB,EAAE,WAAW,CAAC,GAC9D,IAAI,CAAC,oBAAoB,CAAC,wBAAwB,EAAE,WAAW,CAAC,CAAC;AAErE,QAAA,MAAM,WAAW;;;;;;;;;;;;;;iDAQhB,CAAC;AAEF,KAAK,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC,oBAAoB,EAAE,WAAW,CAAC,GAAG,WAAW,CAAC;AAEvG,QAAA,MAAM,eAAe,6GAQpB,CAAC;AAEF,KAAK,wBAAwB,GAAG,IAAI,CAAC,oBAAoB,CAAC,oBAAoB,EAAE,WAAW,CAAC,GAAG,eAAe,CAAC;AAE/G,QAAA,MAAM,mBAAmB,iHAQxB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,eAAe,EAAE,CAAC;AAC7D,YAAY,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Calendar/Calendar.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAgB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Calendar/Calendar.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAgB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,EAAE,KAAK,wBAAwB,EAA8B,MAAM,OAAO,CAAC;AAgBzF,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAwBrD,MAAM,MAAM,SAAS,GAAG;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,EAAE,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAMlD,KAAK,iBAAiB,GAAG;IACvB,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,kFAAkF;IAClF,YAAY,CAAC,EAAE,IAAI,CAAC;CACrB,CAAC;AAEF,KAAK,WAAW,GAAG,iBAAiB,GAAG;IACrC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;CAC7C,CAAC;AAEF,KAAK,UAAU,GAAG,iBAAiB,GAAG;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,UAAU,CAAC;AAoHzD,eAAO,MAAM,QAAQ;IACnB,IAAI;CACL,CAAC;AAGF,OAAO,EAAE,SAAS,IAAI,iBAAiB,EAAE,CAAC;AAC1C,YAAY,EAAE,wBAAwB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.theme.d.ts","sourceRoot":"","sources":["../../../../../src/components/Calendar/Calendar.theme.ts"],"names":[],"mappings":"AAKA,OAAO,EAA0B,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEpE,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"Calendar.theme.d.ts","sourceRoot":"","sources":["../../../../../src/components/Calendar/Calendar.theme.ts"],"names":[],"mappings":"AAKA,OAAO,EAA0B,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEpE,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;AA0D7C,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,kBAAkB,CAUnD,CAAC"}
|
|
@@ -4,13 +4,13 @@ import { type ThemedClassName } from '../../util';
|
|
|
4
4
|
import { type ImageProps } from '../Image';
|
|
5
5
|
import { type ToolbarActionIconButtonProps, type ToolbarDragHandleProps, type ToolbarMenuProps } from '../Toolbar';
|
|
6
6
|
type CardRootProps = {
|
|
7
|
-
id?: string;
|
|
8
|
-
border?: boolean;
|
|
9
|
-
fullWidth?: boolean;
|
|
10
|
-
density?: Density;
|
|
11
|
-
style?: CSSProperties;
|
|
12
|
-
tabIndex?: number;
|
|
13
|
-
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
7
|
+
'id'?: string;
|
|
8
|
+
'border'?: boolean;
|
|
9
|
+
'fullWidth'?: boolean;
|
|
10
|
+
'density'?: Density;
|
|
11
|
+
'style'?: CSSProperties;
|
|
12
|
+
'tabIndex'?: number;
|
|
13
|
+
'onClick'?: MouseEventHandler<HTMLDivElement>;
|
|
14
14
|
'data-selected'?: boolean;
|
|
15
15
|
'data-testid'?: string;
|
|
16
16
|
};
|
|
@@ -128,5 +128,5 @@ export declare const Card: {
|
|
|
128
128
|
Action: typeof CardAction;
|
|
129
129
|
Link: typeof CardLink;
|
|
130
130
|
};
|
|
131
|
-
export type {
|
|
131
|
+
export type { CardActionIconButtonProps, CardBlockProps, CardDragHandleProps, CardHeaderProps, CardMenuProps, CardRootProps, CardSectionProps, };
|
|
132
132
|
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,iBAAiB,EAAE,KAAK,SAAS,EAA8B,MAAM,OAAO,CAAC;AAI5G,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAMnE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAIlD,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAElD,OAAO,EAAE,KAAK,4BAA4B,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IAAI,EACJ,GAAa,EACb,GAAG,UAAU,EACd,EAAE,eAAe,iCAiBjB;;;;AAUD,KAAK,eAAe,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AAEnG,iBAAS,UAAU,CAAC,EAAE,IAAI,EAAE,UAAuC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,eAAe,qBAiBrG;;;;AAUD,KAAK,aAAa,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAErD,iBAAS,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,aAAa,qBAa/C;;;;AAQD,eAAO,MAAM,IAAI;IACf,IAAI;;;IAGJ,MAAM;;;;;;;;;IAGN,KAAK;;;IACL,UAAU;IACV,gBAAgB;IAChB,IAAI;IACJ,KAAK;;;;;IAGL,IAAI;;;;;IACJ,OAAO;;;;;IACP,GAAG;;;;;IAGH,IAAI;;;;;IACJ,IAAI;IACJ,MAAM;IACN,MAAM;IACN,IAAI;CACL,CAAC;AAEF,YAAY,EACV,yBAAyB,EACzB,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,aAAa,EACb,gBAAgB,GACjB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
type
|
|
3
|
+
type StoryArgs = {
|
|
4
4
|
title: string;
|
|
5
5
|
description?: string;
|
|
6
6
|
image?: string;
|
|
@@ -8,7 +8,7 @@ type DefaultStoryProps = {
|
|
|
8
8
|
};
|
|
9
9
|
declare const meta: {
|
|
10
10
|
title: string;
|
|
11
|
-
render: ({ title, description, image, fullWidth }:
|
|
11
|
+
render: ({ title, description, image, fullWidth }: StoryArgs) => React.JSX.Element;
|
|
12
12
|
decorators: import("@storybook/react").Decorator[];
|
|
13
13
|
};
|
|
14
14
|
export default meta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Card/Card.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAiB,MAAM,OAAO,CAAC;AAUtC,KAAK,
|
|
1
|
+
{"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Card/Card.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAiB,MAAM,OAAO,CAAC;AAUtC,KAAK,SAAS,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAqCF,QAAA,MAAM,IAAI;;uDAnCsD,SAAS;;CA6CpC,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAInC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAgBpB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAyBrB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAsBzB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAoDnB,CAAC"}
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
import React, { type PropsWithChildren, type ReactNode } from 'react';
|
|
2
2
|
import { type ThemedClassName } from '../../util';
|
|
3
3
|
import { type MediaKind } from '../MediaPlayer';
|
|
4
|
+
/** Slide change behaviour: `none` hard-swaps the active slide, `slide` animates a horizontal track. */
|
|
5
|
+
export type CarouselTransition = 'none' | 'slide';
|
|
4
6
|
type CarouselContextValue = {
|
|
5
7
|
index: number;
|
|
6
8
|
count: number;
|
|
9
|
+
transition: CarouselTransition;
|
|
10
|
+
/** When `transition === 'slide'`, wrap-around advances continue in the same direction (clone + snap). */
|
|
11
|
+
continuous: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Track position in slide units. Equals `index` except mid-wrap, when it points at a clone cell
|
|
14
|
+
* (`count` = trailing clone of the first slide, `-1` = leading clone of the last) so the track keeps
|
|
15
|
+
* moving in the travel direction. Settled back to the real index once the transition ends.
|
|
16
|
+
*/
|
|
17
|
+
offset: number;
|
|
18
|
+
/** Whether the track transform should animate; disabled for the instantaneous post-wrap snap. */
|
|
19
|
+
animate: boolean;
|
|
20
|
+
/** Snap a clone cell back to its real slide once the wrap transition completes. */
|
|
21
|
+
settle: () => void;
|
|
7
22
|
setIndex: (index: number) => void;
|
|
8
23
|
next: () => void;
|
|
9
24
|
prev: () => void;
|
|
@@ -13,13 +28,21 @@ export declare const useCarousel: () => CarouselContextValue;
|
|
|
13
28
|
export type CarouselRootProps = PropsWithChildren<{
|
|
14
29
|
/** Total number of slides; drives auto-advance and indicator counts. */
|
|
15
30
|
count: number;
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Auto-advance interval in milliseconds. A positive value advances slides on its own until the user
|
|
33
|
+
* interacts with a control; omit (or `0`) to disable.
|
|
34
|
+
*/
|
|
35
|
+
autoAdvance?: number;
|
|
20
36
|
defaultIndex?: number;
|
|
37
|
+
/** Slide change behaviour. Defaults to `none` (hard swap); `slide` animates a horizontal track. */
|
|
38
|
+
transition?: CarouselTransition;
|
|
39
|
+
/**
|
|
40
|
+
* Wrap-around in the same travel direction (last → first slides forward, first → last slides back).
|
|
41
|
+
* Only applies when `transition === 'slide'`; otherwise wrap is an instant index change.
|
|
42
|
+
*/
|
|
43
|
+
continuous?: boolean;
|
|
21
44
|
}>;
|
|
22
|
-
declare function CarouselRoot({ children, count,
|
|
45
|
+
declare function CarouselRoot({ children, count, autoAdvance, defaultIndex, transition, continuous }: CarouselRootProps): React.JSX.Element | null;
|
|
23
46
|
declare namespace CarouselRoot {
|
|
24
47
|
var displayName: string;
|
|
25
48
|
}
|
|
@@ -71,7 +94,7 @@ declare namespace CarouselCaption {
|
|
|
71
94
|
}
|
|
72
95
|
export declare const Carousel: {
|
|
73
96
|
Root: {
|
|
74
|
-
({ children, count,
|
|
97
|
+
({ children, count, autoAdvance, defaultIndex, transition, continuous, }: CarouselRootProps): React.JSX.Element | null;
|
|
75
98
|
displayName: string;
|
|
76
99
|
};
|
|
77
100
|
Content: React.ForwardRefExoticComponent<Omit<{}, "className"> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Carousel/Carousel.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Carousel/Carousel.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAGZ,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAQf,MAAM,OAAO,CAAC;AAMf,OAAO,EAAE,KAAK,eAAe,EAA+B,MAAM,YAAY,CAAC;AAE/E,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,gBAAgB,CAAC;AAQ7D,uGAAuG;AACvG,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,OAAO,CAAC;AAElD,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,kBAAkB,CAAC;IAC/B,yGAAyG;IACzG,UAAU,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,MAAM,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