@dxos/react-ui 0.9.0 → 0.9.1-main.c7dcc2e112
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-7JFD5ZHZ.mjs → chunk-F3PLXTDA.mjs} +21 -25
- package/dist/lib/browser/{chunk-7JFD5ZHZ.mjs.map → chunk-F3PLXTDA.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-5SPBSIWS.mjs → chunk-HFJYTGHU.mjs} +11 -1
- package/dist/lib/browser/chunk-HFJYTGHU.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1042 -856
- 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-TTEL2FP2.mjs → chunk-LLVUYLAM.mjs} +21 -25
- package/dist/lib/node-esm/{chunk-TTEL2FP2.mjs.map → chunk-LLVUYLAM.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-FPVTVXND.mjs → chunk-OJYUPUCY.mjs} +11 -1
- package/dist/lib/node-esm/chunk-OJYUPUCY.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1042 -856
- 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/Button/Button.d.ts +2 -0
- package/dist/types/src/components/Button/Button.d.ts.map +1 -1
- package/dist/types/src/components/Button/IconButton.d.ts +0 -1
- package/dist/types/src/components/Button/IconButton.d.ts.map +1 -1
- package/dist/types/src/components/Button/IconButton.stories.d.ts +34 -0
- package/dist/types/src/components/Button/IconButton.stories.d.ts.map +1 -1
- package/dist/types/src/components/Button/SystemIconButton.d.ts +20 -0
- package/dist/types/src/components/Button/SystemIconButton.d.ts.map +1 -0
- package/dist/types/src/components/Button/ToggleIconButton.d.ts +15 -0
- package/dist/types/src/components/Button/ToggleIconButton.d.ts.map +1 -0
- package/dist/types/src/components/Button/index.d.ts +2 -0
- package/dist/types/src/components/Button/index.d.ts.map +1 -1
- package/dist/types/src/components/Card/Card.d.ts +25 -19
- package/dist/types/src/components/Card/Card.d.ts.map +1 -1
- package/dist/types/src/components/Card/Card.stories.d.ts +1 -1
- package/dist/types/src/components/Card/Card.stories.d.ts.map +1 -1
- package/dist/types/src/components/Card/Card.theme.d.ts.map +1 -1
- package/dist/types/src/components/Clipboard/index.d.ts +1 -0
- package/dist/types/src/components/Clipboard/index.d.ts.map +1 -1
- package/dist/types/src/components/Column/Column.d.ts +19 -1
- package/dist/types/src/components/Column/Column.d.ts.map +1 -1
- package/dist/types/src/components/Column/Column.theme.d.ts +8 -0
- package/dist/types/src/components/Column/Column.theme.d.ts.map +1 -1
- package/dist/types/src/components/Input/constants.d.ts +3 -0
- package/dist/types/src/components/Input/constants.d.ts.map +1 -1
- package/dist/types/src/components/Message/Message.theme.d.ts.map +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/Tooltip/TextTooltip.d.ts +19 -0
- package/dist/types/src/components/Tooltip/TextTooltip.d.ts.map +1 -0
- package/dist/types/src/components/Tooltip/index.d.ts +1 -0
- package/dist/types/src/components/Tooltip/index.d.ts.map +1 -1
- package/dist/types/src/testing/Loading.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +10 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -16
- package/src/components/Button/Button.tsx +23 -2
- package/src/components/Button/IconButton.stories.tsx +81 -1
- package/src/components/Button/IconButton.tsx +2 -4
- package/src/components/Button/SystemIconButton.tsx +153 -0
- package/src/components/Button/ToggleIconButton.tsx +32 -0
- package/src/components/Button/index.ts +2 -0
- package/src/components/Card/Card.stories.tsx +69 -27
- package/src/components/Card/Card.theme.ts +27 -9
- package/src/components/Card/Card.tsx +165 -88
- package/src/components/Column/Column.theme.ts +32 -4
- package/src/components/Column/Column.tsx +36 -1
- package/src/components/Input/constants.ts +3 -0
- package/src/components/Message/Message.theme.ts +0 -10
- package/src/components/Message/Message.tsx +4 -4
- package/src/components/Popover/Popover.theme.ts +1 -1
- package/src/components/Toast/Toast.theme.ts +0 -6
- package/src/components/Toast/Toast.tsx +11 -10
- package/src/components/Tooltip/TextTooltip.tsx +54 -0
- package/src/components/Tooltip/index.ts +1 -0
- package/src/testing/Loading.tsx +2 -1
- package/src/testing/decorators/withLayout.tsx +2 -2
- package/src/translations.ts +10 -0
- package/dist/lib/browser/chunk-5SPBSIWS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FPVTVXND.mjs.map +0 -7
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
Tooltip,
|
|
5
5
|
defaultTx,
|
|
6
6
|
parseCaptureOwnerStack
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-F3PLXTDA.mjs";
|
|
8
8
|
|
|
9
9
|
// src/testing/decorators/withLayout.tsx
|
|
10
10
|
import React, { memo } from "react";
|
|
@@ -32,12 +32,12 @@ var layouts = {
|
|
|
32
32
|
centered: ({ classNames, children }) => /* @__PURE__ */ React.createElement("div", {
|
|
33
33
|
className: mx("fixed inset-0 grid overflow-hidden place-items-center bg-black")
|
|
34
34
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
35
|
-
className: mx("flex flex-col
|
|
35
|
+
className: mx("flex flex-col dx-attention-surface", classNames)
|
|
36
36
|
}, children)),
|
|
37
37
|
column: ({ classNames, children }) => /* @__PURE__ */ React.createElement("div", {
|
|
38
38
|
className: "fixed inset-0 flex overflow-hidden justify-center bg-black"
|
|
39
39
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
40
|
-
className: mx("flex flex-col w-[40rem]
|
|
40
|
+
className: mx("flex flex-col w-[40rem] dx-attention-surface", classNames)
|
|
41
41
|
}, children))
|
|
42
42
|
};
|
|
43
43
|
|
|
@@ -109,9 +109,9 @@ var Loading = ({ data }) => {
|
|
|
109
109
|
return () => clearTimeout(t);
|
|
110
110
|
}, []);
|
|
111
111
|
return /* @__PURE__ */ React4.createElement("div", {
|
|
112
|
-
className: "
|
|
112
|
+
className: "grid p-2"
|
|
113
113
|
}, /* @__PURE__ */ React4.createElement("div", {
|
|
114
|
-
className: mx3("flex flex-col w-full p-2 border-2 border-teal-500 rounded-md", "opacity-0 transition delay-1000 duration-1000", visible && "opacity-100")
|
|
114
|
+
className: mx3("flex flex-col w-full p-2 border-2 border-teal-500 rounded-md", "opacity-0 transition delay-1000 duration-1000", "overflow-auto", visible && "opacity-100")
|
|
115
115
|
}, /* @__PURE__ */ React4.createElement("h2", {
|
|
116
116
|
className: "uppercase capitalize text-xs"
|
|
117
117
|
}, "Loading State"), /* @__PURE__ */ React4.createElement("pre", {
|
|
@@ -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-black')}>\n <div className={mx('flex flex-col
|
|
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,gEAAA;KACjB,sBAAA,cAACa,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-black')}>\n <div className={mx('flex flex-col dx-attention-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-black'>\n <div className={mx('flex flex-col w-[40rem] dx-attention-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,U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ACxCF,OAAOc,UAASC,mBAAmBC,WAAWC,gBAAgB;AAE9D,SAASC,MAAAA,WAAU;AACnB,SAASC,qBAAqB;AASvB,IAAMC,UAAU,CAAC,EAAEC,KAAI,MAAgB;AAC5C,QAAM,CAACC,SAASC,UAAAA,IAAcC,SAAS,KAAA;AACvC,QAAMC,cAAcC,uBAAuBC,kBAAAA,CAAAA;AAE3CC,YAAU,MAAA;AACR,UAAMC,IAAIC,WAAW,MAAMP,WAAW,IAAA,GAAO,GAAA;AAC7C,WAAO,MAAMQ,aAAaF,CAAAA;EAC5B,GAAG,CAAA,CAAE;AAEL,SACE,gBAAAG,OAAA,cAACC,OAAAA;IAAIC,WAAU;KACb,gBAAAF,OAAA,cAACC,OAAAA;IACCC,WAAWC,IACT,gEACA,iDACA,iBACAb,WAAW,aAAA;KAGb,gBAAAU,OAAA,cAACI,MAAAA;IAAGF,WAAU;KAA+B,eAAA,GAC7C,gBAAAF,OAAA,cAACK,OAAAA;IAAIH,WAAU;KAA4BI,cAAcjB,MAAMkB,QAAW,CAAA,CAAA,GAE1E,gBAAAP,OAAA,cAACQ,MAAAA;IAAGN,WAAU;KAAoC,aAAA,GACjDT,eAAeA,YAAYgB,SAAS,IACnC,gBAAAT,OAAA,cAACU,YAAAA;IAAWC,QAAQlB;OAEpB,gBAAAO,OAAA,cAACY,KAAAA;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
|
}
|
|
@@ -927,19 +927,24 @@ var iconButtonTheme = {
|
|
|
927
927
|
|
|
928
928
|
// src/components/Card/Card.theme.ts
|
|
929
929
|
import { mx as mx7 } from "@dxos/ui-theme";
|
|
930
|
-
var root5 = ({ border, fullWidth }, ...etc) => mx7("dx-card dx-card-min-width dx-card-max-width min-h-(--dx-rail-item) group/card relative overflow-hidden",
|
|
931
|
-
var header = (_, ...etc) => mx7("dx-card__header
|
|
930
|
+
var root5 = ({ border, fullWidth }, ...etc) => mx7("dx-card dx-card-surface dx-card-min-width dx-card-max-width min-h-(--dx-rail-item) group/card relative overflow-hidden", border && "border border-subdued-separator rounded-sm dx-focus-ring-group-y-indicator", fullWidth && "max-w-none!", ...etc);
|
|
931
|
+
var header = (_, ...etc) => mx7("dx-card__header col-span-3 grid grid-cols-subgrid items-center", "[&>*:not(.dx-gutter)]:col-start-2 [&>*:not(.dx-gutter)>*]:col-start-2", ...etc);
|
|
932
932
|
var title = (_props, ...etc) => mx7("dx-card__title grow truncate", ...etc);
|
|
933
|
-
var body = (_props, ...etc) => mx7("dx-card__body contents
|
|
933
|
+
var body = (_props, ...etc) => mx7("dx-card__body contents", ...etc);
|
|
934
|
+
var block = (_props, ...etc) => mx7("dx-card__block", ...etc);
|
|
934
935
|
var text = ({ variant = "default", truncate: _truncate }, ...etc) => mx7("dx-card__text items-center overflow-hidden", variant === "default" && "py-1", variant === "description" && "py-1.5 text-description", ...etc);
|
|
935
936
|
var textSpan = ({ variant = "default", truncate }, ...etc) => mx7(variant === "description" && "text-sm text-description line-clamp-3", truncate && "truncate", ...etc);
|
|
936
|
-
var poster = (_props, ...etc) => mx7("dx-card__poster col-span-3 max-h-[200px]", ...etc);
|
|
937
|
+
var poster = (_props, ...etc) => mx7("dx-card__poster col-span-3 max-h-[200px] select-none pointer-events-none", ...etc);
|
|
937
938
|
var posterIcon = (_props, ...etc) => mx7("dx-card__poster-icon col-span-3 grid place-items-center bg-input-surface text-subdued max-h-[200px]", ...etc);
|
|
938
|
-
var action = (_props, ...etc) => mx7("dx-
|
|
939
|
+
var action = (_props, ...etc) => mx7("dx-card__action col-span-3 grid grid-cols-subgrid [&>*:not(.dx-gutter)]:col-start-2 [&>*:not(.dx-gutter)>*]:col-start-2 p-0! gap-0! w-full text-start overflow-hidden", ...etc);
|
|
939
940
|
var actionLabel = (_props, ...etc) => mx7("dx-card__action-label min-w-0 flex-1 truncate", ...etc);
|
|
940
|
-
var link = (_props, ...etc) => mx7("dx-card__link col-span-3
|
|
941
|
-
var linkLabel = (_props, ...etc) => mx7("dx-card__link-label min-w-0 flex-1 truncate", ...etc);
|
|
942
|
-
var row = ({ fullWidth }, ...etc) => mx7("dx-card__row", fullWidth ? "col-span-full" :
|
|
941
|
+
var link = (_props, ...etc) => mx7("dx-card__link col-span-3 grid grid-cols-subgrid [&>*:not(.dx-gutter)]:col-start-2 [&>*:not(.dx-gutter)>*]:col-start-2 group p-0! dx-button dx-focus-ring min-h-1!", ...etc);
|
|
942
|
+
var linkLabel = (_props, ...etc) => mx7("dx-card__link-label min-w-0 flex-1 truncate text-sm!", ...etc);
|
|
943
|
+
var row = ({ fullWidth }, ...etc) => mx7("dx-card__row overflow-hidden", fullWidth ? "col-span-full" : (
|
|
944
|
+
// (e.g. `dx-avatar`), which the direct-child selector cannot target. It is inert for normal
|
|
945
|
+
// block children, whose inner nodes are not grid items of this row.
|
|
946
|
+
"col-span-3 grid grid-cols-subgrid [&>*:not(.dx-gutter)]:col-start-2 [&>*:not(.dx-gutter)>*]:col-start-2"
|
|
947
|
+
), ...etc);
|
|
943
948
|
var section = (_props, ...etc) => mx7("dx-card__section col-span-full grid grid-cols-subgrid", ...etc);
|
|
944
949
|
var sectionTitle = (_props, ...etc) => mx7("dx-card__section-title col-start-2 col-span-full py-2 text-xs text-description font-medium uppercase", ...etc);
|
|
945
950
|
var cardTheme = {
|
|
@@ -947,6 +952,7 @@ var cardTheme = {
|
|
|
947
952
|
header,
|
|
948
953
|
title,
|
|
949
954
|
body,
|
|
955
|
+
block,
|
|
950
956
|
row,
|
|
951
957
|
section,
|
|
952
958
|
"section-title": sectionTitle,
|
|
@@ -966,8 +972,9 @@ var root6 = (_, ...etc) => {
|
|
|
966
972
|
return mx8("dx-column-root grid", ...etc);
|
|
967
973
|
};
|
|
968
974
|
var row2 = (_, ...etc) => {
|
|
969
|
-
return mx8("col-span-3 grid grid-cols-subgrid", ...etc);
|
|
975
|
+
return mx8("col-span-3 grid grid-cols-subgrid", "[&>*:not(.dx-gutter)]:col-start-2", ...etc);
|
|
970
976
|
};
|
|
977
|
+
var block2 = ({ end, compact, square }, ...etc) => mx8("dx-gutter grid place-items-center [&>img]:max-w-[1.5rem]", end ? "col-start-3" : "col-start-1", square ? "aspect-square" : "w-[var(--dx-rail-item)]", compact ? "" : "h-[var(--dx-rail-item)]", ...etc);
|
|
971
978
|
var bleed = (_, ...etc) => {
|
|
972
979
|
return mx8("col-span-full grid grid-cols-subgrid min-h-0", ...etc);
|
|
973
980
|
};
|
|
@@ -977,6 +984,7 @@ var center = (_, ...etc) => {
|
|
|
977
984
|
var columnTheme = {
|
|
978
985
|
root: root6,
|
|
979
986
|
row: row2,
|
|
987
|
+
block: block2,
|
|
980
988
|
bleed,
|
|
981
989
|
center
|
|
982
990
|
};
|
|
@@ -1021,10 +1029,10 @@ import { getSize as getSize2, mx as mx11 } from "@dxos/ui-theme";
|
|
|
1021
1029
|
var root7 = ({ size }, etc) => {
|
|
1022
1030
|
return mx11("shrink-0 text-[var(--icons-color,currentColor)]", size ? getSize2(size) : "[width:var(--icon-size,var(--dx-default-icons-size))] [height:var(--icon-size,var(--dx-default-icons-size))]", etc);
|
|
1023
1031
|
};
|
|
1024
|
-
var
|
|
1032
|
+
var block3 = ({ compact, square }, ...etc) => mx11("grid place-items-center [&>img]:max-w-[1.5rem]", square ? "aspect-square" : "w-[var(--dx-rail-item)]", compact ? "" : "h-[var(--dx-rail-item)]", ...etc);
|
|
1025
1033
|
var iconTheme = {
|
|
1026
1034
|
root: root7,
|
|
1027
|
-
block
|
|
1035
|
+
block: block3
|
|
1028
1036
|
};
|
|
1029
1037
|
|
|
1030
1038
|
// src/components/Input/Input.theme.ts
|
|
@@ -1230,21 +1238,13 @@ var header3 = (_, etc) => {
|
|
|
1230
1238
|
var title3 = (_, etc) => {
|
|
1231
1239
|
return mx18("col-start-2 overflow-hidden truncate", etc);
|
|
1232
1240
|
};
|
|
1233
|
-
var icon = (_, etc) => {
|
|
1234
|
-
return mx18("col-start-1 grid place-items-center", etc);
|
|
1235
|
-
};
|
|
1236
|
-
var close = (_, etc) => {
|
|
1237
|
-
return mx18("col-start-3", etc);
|
|
1238
|
-
};
|
|
1239
1241
|
var content4 = (_, etc) => {
|
|
1240
1242
|
return mx18("col-start-2 flex flex-col first:font-medium pb-1.5", etc);
|
|
1241
1243
|
};
|
|
1242
1244
|
var messageTheme = {
|
|
1243
1245
|
root: root11,
|
|
1244
1246
|
header: header3,
|
|
1245
|
-
icon,
|
|
1246
1247
|
title: title3,
|
|
1247
|
-
close,
|
|
1248
1248
|
content: content4
|
|
1249
1249
|
};
|
|
1250
1250
|
|
|
@@ -1273,7 +1273,7 @@ var panelTheme = {
|
|
|
1273
1273
|
|
|
1274
1274
|
// src/components/Popover/Popover.theme.ts
|
|
1275
1275
|
import { mx as mx20, surfaceShadow as surfaceShadow3, surfaceZIndex as surfaceZIndex3 } from "@dxos/ui-theme";
|
|
1276
|
-
var content6 = ({ elevation }, ...etc) => mx20("dx-popover-surface border border-separator rounded-sm", surfaceShadow3({
|
|
1276
|
+
var content6 = ({ elevation }, ...etc) => mx20("dx-popover-surface overflow-hidden border border-separator rounded-sm", surfaceShadow3({
|
|
1277
1277
|
elevation: "positioned"
|
|
1278
1278
|
}), surfaceZIndex3({
|
|
1279
1279
|
elevation,
|
|
@@ -1427,9 +1427,7 @@ var root19 = (_props, ...etc) => mx28("dx-popover-surface rounded-md p-1", surfa
|
|
|
1427
1427
|
}), "radix-state-open:animate-toast-slide-in-bottom md:radix-state-open:animate-toast-slide-in-right", "radix-state-closed:animate-toast-hide", "radix-swipe-end:animate-toast-swipe-out", "translate-x-radix-toast-swipe-move-x", "radix-swipe-cancel:translate-x-0 radix-swipe-cancel:duration-200 radix-swipe-cancel:ease-[ease]", "dx-focus-ring", ...etc);
|
|
1428
1428
|
var grid = (_props, ...etc) => mx28("gap-y-1 pbe-1", ...etc);
|
|
1429
1429
|
var header4 = (_props, ...etc) => mx28("items-center", ...etc);
|
|
1430
|
-
var icon2 = (_props, ...etc) => mx28("col-start-1 grid place-items-center", ...etc);
|
|
1431
1430
|
var title4 = (_props, ...etc) => mx28("col-start-2 truncate font-medium", ...etc);
|
|
1432
|
-
var close2 = (_props, ...etc) => mx28("col-start-3", ...etc);
|
|
1433
1431
|
var description4 = (_props, ...etc) => mx28("col-start-2 overflow-hidden text-description", ...etc);
|
|
1434
1432
|
var actions = (_props, ...etc) => mx28("flex gap-2 mbs-1", ...etc);
|
|
1435
1433
|
var toastTheme = {
|
|
@@ -1437,9 +1435,7 @@ var toastTheme = {
|
|
|
1437
1435
|
root: root19,
|
|
1438
1436
|
grid,
|
|
1439
1437
|
header: header4,
|
|
1440
|
-
icon: icon2,
|
|
1441
1438
|
title: title4,
|
|
1442
|
-
close: close2,
|
|
1443
1439
|
description: description4,
|
|
1444
1440
|
actions
|
|
1445
1441
|
};
|
|
@@ -1611,4 +1607,4 @@ export {
|
|
|
1611
1607
|
defaultTheme,
|
|
1612
1608
|
defaultTx
|
|
1613
1609
|
};
|
|
1614
|
-
//# sourceMappingURL=chunk-
|
|
1610
|
+
//# sourceMappingURL=chunk-LLVUYLAM.mjs.map
|