@dxos/brand 0.8.3 → 0.8.4-main.1068cf700f
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 +54 -40
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/Icons.stories.d.ts +5 -7
- package/dist/types/src/Icons.stories.d.ts.map +1 -1
- package/dist/types/src/Logotypes.stories.d.ts +5 -7
- package/dist/types/src/Logotypes.stories.d.ts.map +1 -1
- package/dist/types/src/components/ComposerLogo/ComposerLogo.d.ts.map +1 -1
- package/dist/types/src/components/ComposerLogo/ComposerLogo.stories.d.ts +9 -18
- package/dist/types/src/components/ComposerLogo/ComposerLogo.stories.d.ts.map +1 -1
- package/dist/types/src/components/rive.stories.d.ts +9 -4
- package/dist/types/src/components/rive.stories.d.ts.map +1 -1
- package/dist/types/src/icons/Composer.d.ts +1 -2
- package/dist/types/src/icons/Composer.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +19 -13
- package/src/Icons.stories.tsx +14 -11
- package/src/Logotypes.stories.tsx +19 -16
- package/src/components/ComposerLogo/ComposerLogo.stories.tsx +24 -21
- package/src/components/ComposerLogo/ComposerLogo.tsx +20 -6
- package/src/components/rive.stories.tsx +31 -17
- package/src/icons/Composer.tsx +19 -5
- package/src/icons/DXNS.tsx +1 -1
- package/src/icons/DXOS.tsx +1 -1
- package/src/icons/ECHO.tsx +1 -1
- package/src/icons/HALO.tsx +1 -1
- package/src/icons/KUBE.tsx +1 -1
- package/src/icons/MESH.tsx +1 -1
- package/src/logotypes/DXOSHorizontalType.tsx +1 -1
- package/src/logotypes/DXOSType.tsx +1 -1
- package/src/logotypes/DXOSVerticalType.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/brand",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4-main.1068cf700f",
|
|
4
4
|
"description": "DXOS brand assets.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/dxos/dxos"
|
|
10
|
+
},
|
|
7
11
|
"license": "MIT",
|
|
8
12
|
"author": "DXOS.org",
|
|
9
|
-
"sideEffects":
|
|
13
|
+
"sideEffects": false,
|
|
10
14
|
"type": "module",
|
|
11
15
|
"exports": {
|
|
12
16
|
".": {
|
|
17
|
+
"source": "./src/index.ts",
|
|
13
18
|
"types": "./dist/types/src/index.d.ts",
|
|
14
19
|
"browser": "./dist/lib/browser/index.mjs"
|
|
15
20
|
}
|
|
@@ -28,20 +33,21 @@
|
|
|
28
33
|
},
|
|
29
34
|
"devDependencies": {
|
|
30
35
|
"@fontsource/k2d": "^5.0.18",
|
|
31
|
-
"@phosphor-icons/react": "
|
|
36
|
+
"@phosphor-icons/react": "2.1.10",
|
|
32
37
|
"@rive-app/react-canvas": "^4.14.0",
|
|
33
38
|
"@types/d3": "^7.4.3",
|
|
34
|
-
"react": "~
|
|
35
|
-
"react-dom": "~
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
+
"react": "~19.2.3",
|
|
40
|
+
"react-dom": "~19.2.3",
|
|
41
|
+
"@dxos/log": "0.8.4-main.1068cf700f",
|
|
42
|
+
"@dxos/storybook-utils": "0.8.4-main.1068cf700f",
|
|
43
|
+
"@dxos/ui-theme": "0.8.4-main.1068cf700f",
|
|
44
|
+
"@dxos/react-ui": "0.8.4-main.1068cf700f"
|
|
39
45
|
},
|
|
40
46
|
"peerDependencies": {
|
|
41
|
-
"@phosphor-icons/react": "
|
|
42
|
-
"react": "~
|
|
43
|
-
"react-dom": "~
|
|
44
|
-
"@dxos/react-ui": "0.8.
|
|
45
|
-
"@dxos/
|
|
47
|
+
"@phosphor-icons/react": "2.1.10",
|
|
48
|
+
"react": "~19.2.3",
|
|
49
|
+
"react-dom": "~19.2.3",
|
|
50
|
+
"@dxos/react-ui": "0.8.4-main.1068cf700f",
|
|
51
|
+
"@dxos/ui-theme": "0.8.4-main.1068cf700f"
|
|
46
52
|
}
|
|
47
53
|
}
|
package/src/Icons.stories.tsx
CHANGED
|
@@ -2,28 +2,31 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@
|
|
6
|
-
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
7
6
|
import React from 'react';
|
|
8
7
|
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
9
|
+
import { mx } from '@dxos/ui-theme';
|
|
11
10
|
|
|
12
|
-
import { DXNS, DXOS, ECHO, HALO, KUBE, MESH
|
|
11
|
+
import { Composer, DXNS, DXOS, ECHO, HALO, KUBE, MESH } from './icons';
|
|
13
12
|
|
|
14
13
|
const Icon = () => null;
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
const meta = {
|
|
17
16
|
title: 'ui/brand/Icons',
|
|
18
17
|
component: Icon,
|
|
19
|
-
decorators: [withTheme],
|
|
20
|
-
}
|
|
18
|
+
decorators: [withTheme()],
|
|
19
|
+
} satisfies Meta<typeof Icon>;
|
|
20
|
+
|
|
21
|
+
export default meta;
|
|
22
|
+
|
|
23
|
+
type Story = StoryObj<typeof meta>;
|
|
21
24
|
|
|
22
|
-
export const Default = {
|
|
25
|
+
export const Default: Story = {
|
|
23
26
|
render: () => {
|
|
24
|
-
const size = '
|
|
27
|
+
const size = 'is-[128px] bs-[128px]';
|
|
25
28
|
return (
|
|
26
|
-
<div className='absolute flex
|
|
29
|
+
<div className='absolute flex is-full bs-full items-center justify-center'>
|
|
27
30
|
<div className='grid grid-cols-3 gap-16'>
|
|
28
31
|
<>
|
|
29
32
|
<div />
|
|
@@ -2,22 +2,25 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@
|
|
6
|
-
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
7
6
|
import React, { type FC, type ReactNode } from 'react';
|
|
8
7
|
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
9
|
+
import { mx } from '@dxos/ui-theme';
|
|
11
10
|
|
|
12
|
-
import {
|
|
11
|
+
import { DXOSHorizontalType, DXOSType, DXOSVerticalType } from './logotypes';
|
|
13
12
|
|
|
14
13
|
const Icon = () => null;
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
const meta = {
|
|
17
16
|
title: 'ui/brand/LogoTypes',
|
|
18
17
|
component: Icon,
|
|
19
|
-
decorators: [withTheme],
|
|
20
|
-
}
|
|
18
|
+
decorators: [withTheme()],
|
|
19
|
+
} satisfies Meta<typeof Icon>;
|
|
20
|
+
|
|
21
|
+
export default meta;
|
|
22
|
+
|
|
23
|
+
type Story = StoryObj<typeof meta>;
|
|
21
24
|
|
|
22
25
|
const Cell: FC<{ children: ReactNode; dark?: boolean }> = ({ children, dark }) => (
|
|
23
26
|
<div className={mx('flex p-4 justify-center rounded-md', dark ? 'bg-zinc-800 fill-zinc-50' : 'bg-white')}>
|
|
@@ -25,30 +28,30 @@ const Cell: FC<{ children: ReactNode; dark?: boolean }> = ({ children, dark }) =
|
|
|
25
28
|
</div>
|
|
26
29
|
);
|
|
27
30
|
|
|
28
|
-
export const Default = {
|
|
31
|
+
export const Default: Story = {
|
|
29
32
|
render: () => {
|
|
30
33
|
return (
|
|
31
|
-
<div className='absolute flex
|
|
34
|
+
<div className='absolute flex is-full bs-full items-center justify-center'>
|
|
32
35
|
<div className='flex grid grid-cols-2 gap-16'>
|
|
33
36
|
<Cell>
|
|
34
|
-
<DXOSType className='
|
|
37
|
+
<DXOSType className='is-[256px]' />
|
|
35
38
|
</Cell>
|
|
36
39
|
<Cell dark>
|
|
37
|
-
<DXOSType className='
|
|
40
|
+
<DXOSType className='is-[128px]' />
|
|
38
41
|
</Cell>
|
|
39
42
|
|
|
40
43
|
<Cell>
|
|
41
|
-
<DXOSHorizontalType className='
|
|
44
|
+
<DXOSHorizontalType className='is-[256px]' />
|
|
42
45
|
</Cell>
|
|
43
46
|
<Cell dark>
|
|
44
|
-
<DXOSHorizontalType className='
|
|
47
|
+
<DXOSHorizontalType className='is-[128px]' />
|
|
45
48
|
</Cell>
|
|
46
49
|
|
|
47
50
|
<Cell>
|
|
48
|
-
<DXOSVerticalType className='
|
|
51
|
+
<DXOSVerticalType className='is-[256px]' />
|
|
49
52
|
</Cell>
|
|
50
53
|
<Cell dark>
|
|
51
|
-
<DXOSVerticalType className='
|
|
54
|
+
<DXOSVerticalType className='is-[128px]' />
|
|
52
55
|
</Cell>
|
|
53
56
|
</div>
|
|
54
57
|
</div>
|
|
@@ -2,29 +2,32 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import '@fontsource/k2d/100-italic.css';
|
|
8
6
|
|
|
9
|
-
import {
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
10
8
|
import React, { useRef, useState } from 'react';
|
|
11
9
|
|
|
12
|
-
import { Button } from '@dxos/react-ui';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
10
|
+
import { Button, Icon } from '@dxos/react-ui';
|
|
11
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
12
|
+
import { mx } from '@dxos/ui-theme';
|
|
15
13
|
|
|
16
|
-
import { type AnimationController, ComposerLogo, ComposerSpinner } from './ComposerLogo';
|
|
17
14
|
import { DXOS } from '../../icons';
|
|
18
15
|
|
|
16
|
+
import { type AnimationController, ComposerLogo, ComposerSpinner } from './ComposerLogo';
|
|
17
|
+
|
|
19
18
|
// import ident from '../../../assets/sounds/ident-1.mp3';
|
|
20
19
|
|
|
21
20
|
// https://pixabay.com/sound-effects/search/logo/?pagi=2
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
const meta = {
|
|
24
23
|
title: 'ui/brand/Logo',
|
|
25
24
|
component: ComposerLogo,
|
|
26
|
-
decorators: [withTheme],
|
|
27
|
-
}
|
|
25
|
+
decorators: [withTheme()],
|
|
26
|
+
} satisfies Meta<typeof ComposerLogo>;
|
|
27
|
+
|
|
28
|
+
export default meta;
|
|
29
|
+
|
|
30
|
+
type Story = StoryObj<typeof meta>;
|
|
28
31
|
|
|
29
32
|
// TODO(burdon): Get from theme?
|
|
30
33
|
const colors = {
|
|
@@ -35,7 +38,7 @@ const colors = {
|
|
|
35
38
|
blue: '#539ACD',
|
|
36
39
|
};
|
|
37
40
|
|
|
38
|
-
export const Default = {
|
|
41
|
+
export const Default: Story = {
|
|
39
42
|
render: () => {
|
|
40
43
|
const controller = useRef<AnimationController>(null);
|
|
41
44
|
const [logo, setLogo] = useState(false);
|
|
@@ -65,7 +68,7 @@ export const Default = {
|
|
|
65
68
|
<div className={mx('flex items-center -mt-[20px] text-neutral-700')}>
|
|
66
69
|
<span className='ml-[210px] mt-[2px] mr-2'>Powered by DXOS</span>
|
|
67
70
|
<div>
|
|
68
|
-
<DXOS className='
|
|
71
|
+
<DXOS className='is-[32px] bs-[32px]' />
|
|
69
72
|
</div>
|
|
70
73
|
</div>
|
|
71
74
|
</div>
|
|
@@ -76,7 +79,7 @@ export const Default = {
|
|
|
76
79
|
};
|
|
77
80
|
|
|
78
81
|
// TODO(burdon): Camo.
|
|
79
|
-
export const Colors = {
|
|
82
|
+
export const Colors: Story = {
|
|
80
83
|
render: () => {
|
|
81
84
|
const colors = [
|
|
82
85
|
['fill-teal-400', 'fill-teal-500', 'fill-teal-600'],
|
|
@@ -92,7 +95,7 @@ export const Colors = {
|
|
|
92
95
|
|
|
93
96
|
return (
|
|
94
97
|
<div className='absolute inset-0 flex justify-center items-center'>
|
|
95
|
-
<div className='grid grid-cols-3 gap-20
|
|
98
|
+
<div className='grid grid-cols-3 gap-20 is-[800px]'>
|
|
96
99
|
{colors.map((classNames, i) => (
|
|
97
100
|
<div key={i} className='flex justify-center items-center'>
|
|
98
101
|
<ComposerLogo animate={false} size={160} classNames={classNames} />
|
|
@@ -104,7 +107,7 @@ export const Colors = {
|
|
|
104
107
|
},
|
|
105
108
|
};
|
|
106
109
|
|
|
107
|
-
export const Pacman = {
|
|
110
|
+
export const Pacman: Story = {
|
|
108
111
|
render: () => {
|
|
109
112
|
return (
|
|
110
113
|
<div className='absolute inset-0 flex flex-col justify-center'>
|
|
@@ -112,13 +115,13 @@ export const Pacman = {
|
|
|
112
115
|
<div className='flex items-center p-4'>
|
|
113
116
|
<div className='flex ml-8 mr-[100px]'>
|
|
114
117
|
<div>
|
|
115
|
-
<
|
|
118
|
+
<Icon icon='ph--ghost--duotone' classNames='is-[180px] bs-[180px] text-blue-500' />
|
|
116
119
|
</div>
|
|
117
120
|
<div>
|
|
118
|
-
<
|
|
121
|
+
<Icon icon='ph--ghost--duotone' classNames='is-[180px] bs-[180px] text-purple-500' />
|
|
119
122
|
</div>
|
|
120
123
|
<div>
|
|
121
|
-
<
|
|
124
|
+
<Icon icon='ph--ghost--duotone' classNames='is-[180px] bs-[180px] text-red-500' />
|
|
122
125
|
</div>
|
|
123
126
|
</div>
|
|
124
127
|
|
|
@@ -127,7 +130,7 @@ export const Pacman = {
|
|
|
127
130
|
<div className='flex -ml-10'>
|
|
128
131
|
{Array.from({ length: 6 }).map((_, i) => (
|
|
129
132
|
<div key={i} className='p-4'>
|
|
130
|
-
<
|
|
133
|
+
<Icon icon='ph--square--duotone' classNames='is-6 bs-6 text-yellow-200' />
|
|
131
134
|
</div>
|
|
132
135
|
))}
|
|
133
136
|
</div>
|
|
@@ -179,7 +182,7 @@ const SpinnerContainer = () => {
|
|
|
179
182
|
);
|
|
180
183
|
};
|
|
181
184
|
|
|
182
|
-
export const Spinner = {
|
|
185
|
+
export const Spinner: Story = {
|
|
183
186
|
render: () => {
|
|
184
187
|
return (
|
|
185
188
|
<div className='absolute inset-0 flex items-center justify-center'>
|
|
@@ -190,7 +193,7 @@ export const Spinner = {
|
|
|
190
193
|
};
|
|
191
194
|
|
|
192
195
|
// https://github.com/grafana/grafana/blob/main/packages/grafana-ui/src/components/LoadingBar/LoadingBar.tsx
|
|
193
|
-
export const Linear = {
|
|
196
|
+
export const Linear: Story = {
|
|
194
197
|
render: () => {
|
|
195
198
|
return (
|
|
196
199
|
<div className='absolute flex flex-col inset-0 bg-black'>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { type IconWeight } from '@phosphor-icons/react';
|
|
6
6
|
import { arc, interpolateString, select } from 'd3';
|
|
7
7
|
import React, {
|
|
8
8
|
type CSSProperties,
|
|
@@ -17,7 +17,7 @@ import React, {
|
|
|
17
17
|
useState,
|
|
18
18
|
} from 'react';
|
|
19
19
|
|
|
20
|
-
import { mx } from '@dxos/
|
|
20
|
+
import { mx } from '@dxos/ui-theme';
|
|
21
21
|
|
|
22
22
|
const weights = new Map<IconWeight, ReactElement>([
|
|
23
23
|
[
|
|
@@ -28,9 +28,23 @@ const weights = new Map<IconWeight, ReactElement>([
|
|
|
28
28
|
],
|
|
29
29
|
]);
|
|
30
30
|
|
|
31
|
-
const Composer = forwardRef<SVGSVGElement,
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
const Composer = forwardRef<SVGSVGElement, any>((props, ref) => {
|
|
32
|
+
const weight = props.weight || 'regular';
|
|
33
|
+
const size = props.size || 256;
|
|
34
|
+
return (
|
|
35
|
+
<svg
|
|
36
|
+
ref={ref}
|
|
37
|
+
{...props}
|
|
38
|
+
width={size}
|
|
39
|
+
height={size}
|
|
40
|
+
viewBox='0 0 256 256'
|
|
41
|
+
fill='currentColor'
|
|
42
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
43
|
+
>
|
|
44
|
+
{weights.get(weight)}
|
|
45
|
+
</svg>
|
|
46
|
+
);
|
|
47
|
+
});
|
|
34
48
|
|
|
35
49
|
export interface AnimationController {
|
|
36
50
|
spin: () => void;
|
|
@@ -103,7 +117,7 @@ export const ComposerLogo = forwardRef<AnimationController, ComposerLogoProps>(
|
|
|
103
117
|
>
|
|
104
118
|
{layers.map(({ inset, spin, style, className }, i) => (
|
|
105
119
|
<div key={i} className='absolute' style={{ inset: `${inset}px` }}>
|
|
106
|
-
<Composer className={mx('
|
|
120
|
+
<Composer className={mx('is-full bs-full', animate && spin, className)} style={style} />
|
|
107
121
|
</div>
|
|
108
122
|
))}
|
|
109
123
|
</div>
|
|
@@ -2,19 +2,15 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Rive, useRive } from '@rive-app/react-canvas';
|
|
6
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
7
|
import React, { useEffect } from 'react';
|
|
9
8
|
|
|
9
|
+
import { log } from '@dxos/log';
|
|
10
10
|
import { useAsyncState } from '@dxos/react-ui';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
export default {
|
|
15
|
-
title: 'ui/brand/Rive',
|
|
16
|
-
decorators: [withTheme, withLayout({ fullscreen: true, classNames: ['absolute inset-0 bg-black'] })],
|
|
17
|
-
};
|
|
11
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
12
|
+
import { render } from '@dxos/storybook-utils';
|
|
13
|
+
import { mx } from '@dxos/ui-theme';
|
|
18
14
|
|
|
19
15
|
const useFlash = (rive: Rive | null, name: string, delay: number, period: number) => {
|
|
20
16
|
useEffect(() => {
|
|
@@ -45,13 +41,16 @@ const Component = ({ buffer }: { buffer: ArrayBuffer }) => {
|
|
|
45
41
|
);
|
|
46
42
|
};
|
|
47
43
|
|
|
48
|
-
|
|
44
|
+
const DefaultStory = () => {
|
|
49
45
|
const [buffer] = useAsyncState<ArrayBuffer>(async () => {
|
|
50
46
|
// CORS set via dashboard.
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
// TODO(wittjosiah): Fetch to external url fails in headless storybook test.
|
|
48
|
+
const response = await fetch('https://dxos.network/dxos.riv', { mode: 'cors' }).catch((error) => {
|
|
49
|
+
log.catch(error);
|
|
50
|
+
});
|
|
51
|
+
if (response?.ok) {
|
|
53
52
|
return await response.arrayBuffer();
|
|
54
|
-
} else {
|
|
53
|
+
} else if (response) {
|
|
55
54
|
console.log(response.status);
|
|
56
55
|
}
|
|
57
56
|
});
|
|
@@ -63,17 +62,17 @@ export const Default = () => {
|
|
|
63
62
|
return (
|
|
64
63
|
<>
|
|
65
64
|
<Component buffer={buffer} />
|
|
66
|
-
<div className='flex absolute left-0 right-0 top-[120px]
|
|
65
|
+
<div className='flex absolute left-0 right-0 top-[120px] bs-[320px] align-center'>
|
|
67
66
|
<div
|
|
68
|
-
className='z-1 absolute inset-0
|
|
67
|
+
className='z-1 absolute inset-0 is-[800px] m-auto'
|
|
69
68
|
style={{
|
|
70
69
|
background: 'radial-gradient(ellipse 200% 100% at center, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0) 50%)',
|
|
71
70
|
}}
|
|
72
71
|
/>
|
|
73
72
|
<div
|
|
74
73
|
className={mx(
|
|
75
|
-
'z-2 absolute inset-0 flex items-center
|
|
76
|
-
'text-white text-[60px] leading-tight text-center font-thin
|
|
74
|
+
'z-2 absolute inset-0 flex items-center is-[720px] m-auto p-2',
|
|
75
|
+
'text-white text-[60px] leading-tight text-center font-thin',
|
|
77
76
|
)}
|
|
78
77
|
>
|
|
79
78
|
The new standard for building collaborative local-first software.
|
|
@@ -82,3 +81,18 @@ export const Default = () => {
|
|
|
82
81
|
</>
|
|
83
82
|
);
|
|
84
83
|
};
|
|
84
|
+
|
|
85
|
+
const meta = {
|
|
86
|
+
title: 'ui/brand/Rive',
|
|
87
|
+
render: render(DefaultStory),
|
|
88
|
+
decorators: [withTheme()],
|
|
89
|
+
parameters: {
|
|
90
|
+
layout: 'fullscreen',
|
|
91
|
+
},
|
|
92
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
93
|
+
|
|
94
|
+
export default meta;
|
|
95
|
+
|
|
96
|
+
type Story = StoryObj<typeof meta>;
|
|
97
|
+
|
|
98
|
+
export const Default: Story = {};
|
package/src/icons/Composer.tsx
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import React, {
|
|
5
|
+
import { type IconWeight } from '@phosphor-icons/react';
|
|
6
|
+
import React, { type ReactElement, forwardRef } from 'react';
|
|
7
7
|
|
|
8
8
|
const weights = new Map<IconWeight, ReactElement>([
|
|
9
9
|
[
|
|
@@ -36,8 +36,22 @@ const weights = new Map<IconWeight, ReactElement>([
|
|
|
36
36
|
],
|
|
37
37
|
]);
|
|
38
38
|
|
|
39
|
-
export const Composer = forwardRef<SVGSVGElement,
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
export const Composer = forwardRef<SVGSVGElement, any>((props, ref) => {
|
|
40
|
+
const weight = props.weight || 'regular';
|
|
41
|
+
const size = props.size || 256;
|
|
42
|
+
return (
|
|
43
|
+
<svg
|
|
44
|
+
ref={ref}
|
|
45
|
+
{...props}
|
|
46
|
+
width={size}
|
|
47
|
+
height={size}
|
|
48
|
+
viewBox='0 0 256 256'
|
|
49
|
+
fill='currentColor'
|
|
50
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
51
|
+
>
|
|
52
|
+
{weights.get(weight)}
|
|
53
|
+
</svg>
|
|
54
|
+
);
|
|
55
|
+
});
|
|
42
56
|
|
|
43
57
|
Composer.displayName = 'Composer';
|
package/src/icons/DXNS.tsx
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { IconBase, type IconProps, type IconWeight } from '@phosphor-icons/react';
|
|
6
|
-
import React, {
|
|
6
|
+
import React, { type ReactElement, forwardRef } from 'react';
|
|
7
7
|
|
|
8
8
|
const weights = new Map<IconWeight, ReactElement>([
|
|
9
9
|
[
|
package/src/icons/DXOS.tsx
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { IconBase, type IconProps, type IconWeight } from '@phosphor-icons/react';
|
|
6
|
-
import React, {
|
|
6
|
+
import React, { type ReactElement, forwardRef } from 'react';
|
|
7
7
|
|
|
8
8
|
const weights = new Map<IconWeight, ReactElement>([
|
|
9
9
|
[
|
package/src/icons/ECHO.tsx
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { IconBase, type IconProps, type IconWeight } from '@phosphor-icons/react';
|
|
6
|
-
import React, {
|
|
6
|
+
import React, { type ReactElement, forwardRef } from 'react';
|
|
7
7
|
|
|
8
8
|
const weights = new Map<IconWeight, ReactElement>([
|
|
9
9
|
[
|
package/src/icons/HALO.tsx
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { IconBase, type IconProps, type IconWeight } from '@phosphor-icons/react';
|
|
6
|
-
import React, {
|
|
6
|
+
import React, { type ReactElement, forwardRef } from 'react';
|
|
7
7
|
|
|
8
8
|
const weights = new Map<IconWeight, ReactElement>([
|
|
9
9
|
[
|
package/src/icons/KUBE.tsx
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { IconBase, type IconProps, type IconWeight } from '@phosphor-icons/react';
|
|
6
|
-
import React, {
|
|
6
|
+
import React, { type ReactElement, forwardRef } from 'react';
|
|
7
7
|
|
|
8
8
|
const weights = new Map<IconWeight, ReactElement>([
|
|
9
9
|
[
|
package/src/icons/MESH.tsx
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { IconBase, type IconProps, type IconWeight } from '@phosphor-icons/react';
|
|
6
|
-
import React, {
|
|
6
|
+
import React, { type ReactElement, forwardRef } from 'react';
|
|
7
7
|
|
|
8
8
|
const weights = new Map<IconWeight, ReactElement>([
|
|
9
9
|
[
|