@dxos/brand 0.6.2-main.8a232a5 → 0.6.2-main.bd4e5d2
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 +212 -68
- package/dist/lib/browser/index.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/types/src/Icons.stories.d.ts +11 -0
- package/dist/types/src/Icons.stories.d.ts.map +1 -0
- package/dist/types/src/Logotypes.stories.d.ts +11 -0
- package/dist/types/src/Logotypes.stories.d.ts.map +1 -0
- package/dist/types/src/components/ComposerLogo/ComposerLogo.d.ts +26 -0
- package/dist/types/src/components/ComposerLogo/ComposerLogo.d.ts.map +1 -0
- package/dist/types/src/components/ComposerLogo/ComposerLogo.stories.d.ts +27 -0
- package/dist/types/src/components/ComposerLogo/ComposerLogo.stories.d.ts.map +1 -0
- package/dist/types/src/components/ComposerLogo/index.d.ts +2 -0
- package/dist/types/src/components/ComposerLogo/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/index.d.ts.map +1 -0
- package/dist/types/src/icons/Composer.d.ts +3 -0
- package/dist/types/src/icons/Composer.d.ts.map +1 -0
- package/dist/types/src/icons/DXNS.d.ts +3 -0
- package/dist/types/src/icons/DXNS.d.ts.map +1 -0
- package/dist/types/src/icons/DXOS.d.ts +3 -0
- package/dist/types/src/icons/DXOS.d.ts.map +1 -0
- package/dist/types/src/icons/ECHO.d.ts +3 -0
- package/dist/types/src/icons/ECHO.d.ts.map +1 -0
- package/dist/types/src/icons/HALO.d.ts +3 -0
- package/dist/types/src/icons/HALO.d.ts.map +1 -0
- package/dist/types/src/icons/KUBE.d.ts +3 -0
- package/dist/types/src/icons/KUBE.d.ts.map +1 -0
- package/dist/types/src/icons/MESH.d.ts +3 -0
- package/dist/types/src/icons/MESH.d.ts.map +1 -0
- package/dist/types/src/icons/index.d.ts +8 -0
- package/dist/types/src/icons/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +4 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/logotypes/DXOSHorizontalType.d.ts +5 -0
- package/dist/types/src/logotypes/DXOSHorizontalType.d.ts.map +1 -0
- package/dist/types/src/logotypes/DXOSType.d.ts +5 -0
- package/dist/types/src/logotypes/DXOSType.d.ts.map +1 -0
- package/dist/types/src/logotypes/DXOSVerticalType.d.ts +5 -0
- package/dist/types/src/logotypes/DXOSVerticalType.d.ts.map +1 -0
- package/dist/types/src/logotypes/index.d.ts +4 -0
- package/dist/types/src/logotypes/index.d.ts.map +1 -0
- package/package.json +11 -5
- package/src/Icons.stories.tsx +38 -0
- package/src/Logotypes.stories.tsx +57 -0
- package/src/components/ComposerLogo/ComposerLogo.stories.tsx +190 -0
- package/src/components/ComposerLogo/ComposerLogo.tsx +254 -0
- package/src/components/ComposerLogo/index.ts +5 -0
- package/src/components/index.ts +5 -0
- package/src/icons/Composer.tsx +19 -0
- package/src/icons/DXNS.tsx +44 -0
- package/src/icons/DXOS.tsx +21 -0
- package/src/icons/ECHO.tsx +21 -0
- package/src/icons/HALO.tsx +25 -0
- package/src/icons/KUBE.tsx +53 -0
- package/src/icons/MESH.tsx +22 -0
- package/src/icons/index.ts +11 -0
- package/src/index.ts +7 -0
- package/src/logotypes/DXOSHorizontalType.tsx +41 -0
- package/src/logotypes/DXOSType.tsx +38 -0
- package/src/logotypes/DXOSVerticalType.tsx +41 -0
- package/src/logotypes/index.ts +7 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { type FC, type HTMLAttributes } from 'react';
|
|
2
|
+
export interface AnimationController {
|
|
3
|
+
spin: () => void;
|
|
4
|
+
}
|
|
5
|
+
export type ComposerLogoProps = {
|
|
6
|
+
animate?: boolean;
|
|
7
|
+
size?: number;
|
|
8
|
+
classNames?: string[];
|
|
9
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'className'>;
|
|
10
|
+
export declare const ComposerLogo: React.ForwardRefExoticComponent<{
|
|
11
|
+
animate?: boolean | undefined;
|
|
12
|
+
size?: number | undefined;
|
|
13
|
+
classNames?: string[] | undefined;
|
|
14
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & React.RefAttributes<AnimationController>>;
|
|
15
|
+
/**
|
|
16
|
+
* Spinning Composer "C" logo.
|
|
17
|
+
*/
|
|
18
|
+
export declare const ComposerSpinner: FC<{
|
|
19
|
+
animate?: boolean;
|
|
20
|
+
size?: number;
|
|
21
|
+
gap?: number;
|
|
22
|
+
color?: string;
|
|
23
|
+
autoFade?: boolean;
|
|
24
|
+
onClick?: () => void;
|
|
25
|
+
}>;
|
|
26
|
+
//# sourceMappingURL=ComposerLogo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComposerLogo.d.ts","sourceRoot":"","sources":["../../../../../src/components/ComposerLogo/ComposerLogo.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAEZ,KAAK,EAAE,EAEP,KAAK,cAAc,EAMpB,MAAM,OAAO,CAAC;AAMf,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAoCD,MAAM,MAAM,iBAAiB,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,IAAI,CAChG,cAAc,CAAC,cAAc,CAAC,EAC9B,WAAW,CACZ,CAAC;AAEF,eAAO,MAAM,YAAY;;;;uGAkCxB,CAAC;AAmDF;;GAEG;AAEH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CA6FA,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import '@dxosTheme';
|
|
2
|
+
import '@fontsource/k2d/100-italic.css';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { type AnimationController } from './ComposerLogo';
|
|
5
|
+
declare const _default: {
|
|
6
|
+
title: string;
|
|
7
|
+
component: React.ForwardRefExoticComponent<{
|
|
8
|
+
animate?: boolean | undefined;
|
|
9
|
+
size?: number | undefined;
|
|
10
|
+
classNames?: string[] | undefined;
|
|
11
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & React.RefAttributes<AnimationController>>;
|
|
12
|
+
decorators: import("@storybook/react/*").Decorator[];
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
15
|
+
export declare const Default: {
|
|
16
|
+
render: () => JSX.Element;
|
|
17
|
+
};
|
|
18
|
+
export declare const Colors: {
|
|
19
|
+
render: () => JSX.Element;
|
|
20
|
+
};
|
|
21
|
+
export declare const Pacman: {
|
|
22
|
+
render: () => JSX.Element;
|
|
23
|
+
};
|
|
24
|
+
export declare const Spinner: {
|
|
25
|
+
render: () => JSX.Element;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=ComposerLogo.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComposerLogo.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ComposerLogo/ComposerLogo.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAEpB,OAAO,gCAAgC,CAAC;AAGxC,OAAO,KAA2B,MAAM,OAAO,CAAC;AAMhD,OAAO,EAAE,KAAK,mBAAmB,EAAiC,MAAM,gBAAgB,CAAC;;;;;;;;;;AAOzF,wBAIE;AAWF,eAAO,MAAM,OAAO;;CAsCnB,CAAC;AAGF,eAAO,MAAM,MAAM;;CA0BlB,CAAC;AAEF,eAAO,MAAM,MAAM;;CAoClB,CAAC;AAuCF,eAAO,MAAM,OAAO;;CAQnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ComposerLogo/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Composer.d.ts","sourceRoot":"","sources":["../../../../src/icons/Composer.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAA6B,MAAM,uBAAuB,CAAC;AAY7E,eAAO,MAAM,QAAQ,EAAE,IAAsF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DXNS.d.ts","sourceRoot":"","sources":["../../../../src/icons/DXNS.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAA6B,MAAM,uBAAuB,CAAC;AAqC7E,eAAO,MAAM,IAAI,EAAE,IAAsF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DXOS.d.ts","sourceRoot":"","sources":["../../../../src/icons/DXOS.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAA6B,MAAM,uBAAuB,CAAC;AAc7E,eAAO,MAAM,IAAI,EAAE,IAAsF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ECHO.d.ts","sourceRoot":"","sources":["../../../../src/icons/ECHO.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAA6B,MAAM,uBAAuB,CAAC;AAc7E,eAAO,MAAM,IAAI,EAAE,IAAsF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HALO.d.ts","sourceRoot":"","sources":["../../../../src/icons/HALO.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAA6B,MAAM,uBAAuB,CAAC;AAkB7E,eAAO,MAAM,IAAI,EAAE,IAAsF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KUBE.d.ts","sourceRoot":"","sources":["../../../../src/icons/KUBE.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAA6B,MAAM,uBAAuB,CAAC;AA8C7E,eAAO,MAAM,IAAI,EAAE,IAAsF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MESH.d.ts","sourceRoot":"","sources":["../../../../src/icons/MESH.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAA6B,MAAM,uBAAuB,CAAC;AAe7E,eAAO,MAAM,IAAI,EAAE,IAAsF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/icons/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DXOSHorizontalType.d.ts","sourceRoot":"","sources":["../../../../src/logotypes/DXOSHorizontalType.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAIvC,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAgCzD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DXOSType.d.ts","sourceRoot":"","sources":["../../../../src/logotypes/DXOSType.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAIvC,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CA6B/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DXOSVerticalType.d.ts","sourceRoot":"","sources":["../../../../src/logotypes/DXOSVerticalType.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAIvC,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAgCvD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/logotypes/index.ts"],"names":[],"mappings":"AAIA,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/brand",
|
|
3
|
-
"version": "0.6.2-main.
|
|
3
|
+
"version": "0.6.2-main.bd4e5d2",
|
|
4
4
|
"description": "DXOS brand assets.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -9,8 +9,14 @@
|
|
|
9
9
|
"main": "dist/lib/browser/index.mjs",
|
|
10
10
|
"types": "dist/types/src/index.d.ts",
|
|
11
11
|
"files": [
|
|
12
|
-
"assets"
|
|
12
|
+
"assets",
|
|
13
|
+
"dist",
|
|
14
|
+
"src"
|
|
13
15
|
],
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"d3": "^7.9.0",
|
|
18
|
+
"@dxos/react-ui-theme": "0.6.2-main.bd4e5d2"
|
|
19
|
+
},
|
|
14
20
|
"devDependencies": {
|
|
15
21
|
"@fontsource/k2d": "^5.0.18",
|
|
16
22
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -19,11 +25,11 @@
|
|
|
19
25
|
"@storybook/components": "^7.0.6",
|
|
20
26
|
"@storybook/core-events": "^7.0.6",
|
|
21
27
|
"@storybook/theming": "^7.0.6",
|
|
28
|
+
"@types/d3": "^7.4.3",
|
|
22
29
|
"react": "^18.2.0",
|
|
23
30
|
"react-dom": "^18.2.0",
|
|
24
|
-
"@dxos/
|
|
25
|
-
"@dxos/
|
|
26
|
-
"@dxos/react-ui-theme": "0.6.2-main.8a232a5"
|
|
31
|
+
"@dxos/storybook-utils": "0.6.2-main.bd4e5d2",
|
|
32
|
+
"@dxos/react-ui": "0.6.2-main.bd4e5d2"
|
|
27
33
|
},
|
|
28
34
|
"peerDependencies": {
|
|
29
35
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import '@dxosTheme';
|
|
6
|
+
|
|
7
|
+
import React from 'react';
|
|
8
|
+
|
|
9
|
+
import { mx } from '@dxos/react-ui-theme';
|
|
10
|
+
import { withTheme } from '@dxos/storybook-utils';
|
|
11
|
+
|
|
12
|
+
import { DXNS, DXOS, ECHO, HALO, KUBE, MESH } from './icons';
|
|
13
|
+
|
|
14
|
+
const Icon = () => null;
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
title: 'brand/Icons',
|
|
18
|
+
component: Icon,
|
|
19
|
+
decorators: [withTheme],
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const Default = {
|
|
23
|
+
render: () => {
|
|
24
|
+
const size = 'w-[128px] h-[128px]';
|
|
25
|
+
return (
|
|
26
|
+
<div className='absolute flex w-full h-full items-center justify-center'>
|
|
27
|
+
<div className='grid grid-cols-3 gap-16'>
|
|
28
|
+
<DXNS className={mx(size, 'fill-orange-700')} />
|
|
29
|
+
<DXOS className={mx(size, 'fill-teal-700')} />
|
|
30
|
+
<ECHO className={mx(size, 'fill-violet-700')} />
|
|
31
|
+
<HALO className={mx(size, 'fill-purple-700')} />
|
|
32
|
+
<KUBE className={mx(size, 'fill-sky-700')} />
|
|
33
|
+
<MESH className={mx(size, 'fill-green-700')} />
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import '@dxosTheme';
|
|
6
|
+
|
|
7
|
+
import React, { type FC, type ReactNode } from 'react';
|
|
8
|
+
|
|
9
|
+
import { mx } from '@dxos/react-ui-theme';
|
|
10
|
+
import { withTheme } from '@dxos/storybook-utils';
|
|
11
|
+
|
|
12
|
+
import { DXOSType, DXOSHorizontalType, DXOSVerticalType } from './logotypes';
|
|
13
|
+
|
|
14
|
+
const Icon = () => null;
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
title: 'brand/LogoTypes',
|
|
18
|
+
component: Icon,
|
|
19
|
+
decorators: [withTheme],
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const Cell: FC<{ children: ReactNode; dark?: boolean }> = ({ children, dark }) => (
|
|
23
|
+
<div className={mx('flex p-4 justify-center rounded-lg', dark ? 'bg-zinc-800 fill-zinc-50' : 'bg-white')}>
|
|
24
|
+
{children}
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
export const Default = {
|
|
29
|
+
render: () => {
|
|
30
|
+
return (
|
|
31
|
+
<div className='absolute flex w-full h-full items-center justify-center'>
|
|
32
|
+
<div className='flex grid grid-cols-2 gap-16'>
|
|
33
|
+
<Cell>
|
|
34
|
+
<DXOSType className='w-[256px]' />
|
|
35
|
+
</Cell>
|
|
36
|
+
<Cell dark>
|
|
37
|
+
<DXOSType className='w-[128px]' />
|
|
38
|
+
</Cell>
|
|
39
|
+
|
|
40
|
+
<Cell>
|
|
41
|
+
<DXOSHorizontalType className='w-[256px]' />
|
|
42
|
+
</Cell>
|
|
43
|
+
<Cell dark>
|
|
44
|
+
<DXOSHorizontalType className='w-[128px]' />
|
|
45
|
+
</Cell>
|
|
46
|
+
|
|
47
|
+
<Cell>
|
|
48
|
+
<DXOSVerticalType className='w-[256px]' />
|
|
49
|
+
</Cell>
|
|
50
|
+
<Cell dark>
|
|
51
|
+
<DXOSVerticalType className='w-[128px]' />
|
|
52
|
+
</Cell>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
},
|
|
57
|
+
};
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import '@dxosTheme';
|
|
6
|
+
|
|
7
|
+
import '@fontsource/k2d/100-italic.css';
|
|
8
|
+
|
|
9
|
+
import { Ghost, Square } from '@phosphor-icons/react';
|
|
10
|
+
import React, { useRef, useState } from 'react';
|
|
11
|
+
|
|
12
|
+
import { Button } from '@dxos/react-ui';
|
|
13
|
+
import { mx } from '@dxos/react-ui-theme';
|
|
14
|
+
import { withTheme } from '@dxos/storybook-utils';
|
|
15
|
+
|
|
16
|
+
import { type AnimationController, ComposerLogo, ComposerSpinner } from './ComposerLogo';
|
|
17
|
+
import { DXOS } from '../../icons';
|
|
18
|
+
|
|
19
|
+
// import ident from '../../../assets/sounds/ident-1.mp3';
|
|
20
|
+
|
|
21
|
+
// https://pixabay.com/sound-effects/search/logo/?pagi=2
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
title: 'brand/Logo',
|
|
25
|
+
component: ComposerLogo,
|
|
26
|
+
decorators: [withTheme],
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// TODO(burdon): Get from theme?
|
|
30
|
+
const colors = {
|
|
31
|
+
gray: '#888888',
|
|
32
|
+
purple: '#AA23D3',
|
|
33
|
+
orange: '#CA6346',
|
|
34
|
+
green: '#4DA676',
|
|
35
|
+
blue: '#539ACD',
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const Default = {
|
|
39
|
+
render: () => {
|
|
40
|
+
const controller = useRef<AnimationController>(null);
|
|
41
|
+
const [logo, setLogo] = useState(false);
|
|
42
|
+
const handleSpin = async () => {
|
|
43
|
+
// const audio = new Audio(ident);
|
|
44
|
+
// await audio.play();
|
|
45
|
+
setTimeout(() => {
|
|
46
|
+
setLogo(true);
|
|
47
|
+
}, 1_500);
|
|
48
|
+
|
|
49
|
+
controller.current?.spin();
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<div className='absolute flex inset-0 items-center justify-center'>
|
|
54
|
+
<div className='absolute left-4 top-4'>
|
|
55
|
+
<Button onClick={handleSpin}>Spin</Button>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<div>
|
|
59
|
+
<div className='flex justify-center'>
|
|
60
|
+
<ComposerLogo ref={controller} size={256} />
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div className={mx('transition opacity-0 duration-1000', logo && 'opacity-100')}>
|
|
64
|
+
<div className={mx('text-[100px] text-teal-400 font-[k2d] italic')}>composer</div>
|
|
65
|
+
<div className={mx('flex items-center -mt-[20px] text-neutral-700')}>
|
|
66
|
+
<span className='ml-[210px] mt-[2px] mr-2'>Powered by DXOS</span>
|
|
67
|
+
<div>
|
|
68
|
+
<DXOS className='w-[32px] h-[32px]' />
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
);
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
// TODO(burdon): Camo.
|
|
79
|
+
export const Colors = {
|
|
80
|
+
render: () => {
|
|
81
|
+
const colors = [
|
|
82
|
+
['fill-teal-400', 'fill-teal-500', 'fill-teal-600'],
|
|
83
|
+
['fill-orange-400', 'fill-orange-500', 'fill-orange-600'],
|
|
84
|
+
['fill-cyan-400', 'fill-cyan-500', 'fill-cyan-600'],
|
|
85
|
+
['fill-purple-400', 'fill-purple-500', 'fill-purple-600'],
|
|
86
|
+
['fill-blue-500', 'fill-blue-600', 'fill-blue-700'],
|
|
87
|
+
['fill-slate-500', 'fill-slate-600', 'fill-slate-700'],
|
|
88
|
+
['fill-blue-500', 'fill-neutral-100', 'fill-red-500'],
|
|
89
|
+
['fill-stone-400', 'fill-stone-500', 'fill-stone-600'],
|
|
90
|
+
['fill-neutral-500', 'fill-neutral-600', 'fill-neutral-700'],
|
|
91
|
+
];
|
|
92
|
+
|
|
93
|
+
return (
|
|
94
|
+
<div className='absolute inset-0 flex justify-center items-center'>
|
|
95
|
+
<div className='grid grid-cols-3 gap-20 w-[800px]'>
|
|
96
|
+
{colors.map((classNames, i) => (
|
|
97
|
+
<div key={i} className='flex justify-center items-center'>
|
|
98
|
+
<ComposerLogo animate={false} size={160} classNames={classNames} />
|
|
99
|
+
</div>
|
|
100
|
+
))}
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
);
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export const Pacman = {
|
|
108
|
+
render: () => {
|
|
109
|
+
return (
|
|
110
|
+
<div className='absolute inset-0 flex flex-col justify-center'>
|
|
111
|
+
<div className='flex flex-col'>
|
|
112
|
+
<div className='flex items-center p-4'>
|
|
113
|
+
<div className='flex ml-8 mr-[100px]'>
|
|
114
|
+
<div>
|
|
115
|
+
<Ghost weight='duotone' className='w-[180px] h-[180px] text-blue-500' />
|
|
116
|
+
</div>
|
|
117
|
+
<div>
|
|
118
|
+
<Ghost weight='duotone' className='w-[180px] h-[180px] text-purple-500' />
|
|
119
|
+
</div>
|
|
120
|
+
<div>
|
|
121
|
+
<Ghost weight='duotone' className='w-[180px] h-[180px] text-red-500' />
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
<ComposerLogo size={145} classNames={['fill-yellow-200', 'fill-yellow-300', 'fill-yellow-400']} />
|
|
126
|
+
|
|
127
|
+
<div className='flex -ml-10'>
|
|
128
|
+
{Array.from({ length: 6 }).map((_, i) => (
|
|
129
|
+
<div key={i} className='p-4'>
|
|
130
|
+
<Square weight='duotone' className='w-6 h-6 text-yellow-200' />
|
|
131
|
+
</div>
|
|
132
|
+
))}
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
|
|
136
|
+
<div className='flex justify-center font-mono font-light text-[60px] mt-8 text-neutral-200'>
|
|
137
|
+
<div>Ready Player 1</div>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
);
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const SpinnerContainer = () => {
|
|
146
|
+
const [spinning, setSpinning] = useState(false);
|
|
147
|
+
return (
|
|
148
|
+
<div>
|
|
149
|
+
<div className='absolute left-4 top-4'>
|
|
150
|
+
{(spinning && <Button onClick={() => setSpinning(false)}>Stop</Button>) || (
|
|
151
|
+
<Button onClick={() => setSpinning(true)}>Start</Button>
|
|
152
|
+
)}
|
|
153
|
+
</div>
|
|
154
|
+
<div className='grid grid-cols-3 gap-20'>
|
|
155
|
+
<>
|
|
156
|
+
<div className='flex justify-center items-center'>
|
|
157
|
+
<ComposerSpinner animate={spinning} gap={1} size={200} color={colors.blue} />
|
|
158
|
+
</div>
|
|
159
|
+
<div className='flex justify-center items-center'>
|
|
160
|
+
<ComposerSpinner animate={spinning} gap={1} size={200} color={colors.green} />
|
|
161
|
+
</div>
|
|
162
|
+
<div className='flex justify-center items-center'>
|
|
163
|
+
<ComposerSpinner animate={spinning} gap={1} size={200} color={colors.orange} />
|
|
164
|
+
</div>
|
|
165
|
+
</>
|
|
166
|
+
<>
|
|
167
|
+
<div className='flex justify-center items-center'>
|
|
168
|
+
<ComposerSpinner animate={spinning} gap={1} size={200} color={colors.blue} />
|
|
169
|
+
</div>
|
|
170
|
+
<div className='flex justify-center items-center'>
|
|
171
|
+
<ComposerSpinner animate={spinning} gap={1} size={100} color={colors.green} />
|
|
172
|
+
</div>
|
|
173
|
+
<div className='flex justify-center items-center'>
|
|
174
|
+
<ComposerSpinner animate={spinning} gap={1} size={40} color={colors.orange} />
|
|
175
|
+
</div>
|
|
176
|
+
</>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
);
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export const Spinner = {
|
|
183
|
+
render: () => {
|
|
184
|
+
return (
|
|
185
|
+
<div className='absolute inset-0 flex items-center justify-center'>
|
|
186
|
+
<SpinnerContainer />
|
|
187
|
+
</div>
|
|
188
|
+
);
|
|
189
|
+
},
|
|
190
|
+
};
|