@dxos/brand 0.8.4-main.ae835ea → 0.8.4-main.bc2380dfbc

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.
Files changed (91) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +16 -1
  3. package/dist/lib/browser/index.mjs +139 -310
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/types/src/components/experimental/ComposerLogo.d.ts +7 -0
  7. package/dist/types/src/components/experimental/ComposerLogo.d.ts.map +1 -0
  8. package/dist/types/src/components/experimental/Logo.stories.d.ts +15 -0
  9. package/dist/types/src/components/experimental/Logo.stories.d.ts.map +1 -0
  10. package/dist/types/src/components/{ComposerLogo/ComposerLogo.d.ts → experimental/experimental.d.ts} +3 -3
  11. package/dist/types/src/components/experimental/experimental.d.ts.map +1 -0
  12. package/dist/types/src/components/{rive.stories.d.ts → experimental/rive.stories.d.ts} +1 -1
  13. package/dist/types/src/components/experimental/rive.stories.d.ts.map +1 -0
  14. package/dist/types/src/components/icons/Composer.d.ts.map +1 -0
  15. package/dist/types/src/components/icons/DXNS.d.ts.map +1 -0
  16. package/dist/types/src/components/icons/DXOS.d.ts.map +1 -0
  17. package/dist/types/src/components/icons/ECHO.d.ts.map +1 -0
  18. package/dist/types/src/components/icons/HALO.d.ts.map +1 -0
  19. package/dist/types/src/{Icons.stories.d.ts → components/icons/Icons.stories.d.ts} +3 -0
  20. package/dist/types/src/components/icons/Icons.stories.d.ts.map +1 -0
  21. package/dist/types/src/components/icons/KUBE.d.ts.map +1 -0
  22. package/dist/types/src/components/icons/MESH.d.ts.map +1 -0
  23. package/dist/types/src/components/icons/index.d.ts.map +1 -0
  24. package/dist/types/src/components/index.d.ts +2 -1
  25. package/dist/types/src/components/index.d.ts.map +1 -1
  26. package/dist/types/src/components/logotypes/DXOSHorizontalType.d.ts.map +1 -0
  27. package/dist/types/src/components/logotypes/DXOSType.d.ts.map +1 -0
  28. package/dist/types/src/components/logotypes/DXOSVerticalType.d.ts.map +1 -0
  29. package/dist/types/src/components/logotypes/Logotypes.stories.d.ts.map +1 -0
  30. package/dist/types/src/components/logotypes/index.d.ts.map +1 -0
  31. package/dist/types/src/index.d.ts +0 -2
  32. package/dist/types/src/index.d.ts.map +1 -1
  33. package/dist/types/tsconfig.tsbuildinfo +1 -1
  34. package/package.json +19 -18
  35. package/src/components/experimental/ComposerLogo.tsx +66 -0
  36. package/src/components/experimental/Logo.stories.tsx +279 -0
  37. package/src/components/{ComposerLogo/ComposerLogo.tsx → experimental/experimental.tsx} +11 -23
  38. package/src/components/{rive.stories.tsx → experimental/rive.stories.tsx} +27 -22
  39. package/src/{icons → components/icons}/Composer.tsx +2 -2
  40. package/src/{icons → components/icons}/DXNS.tsx +2 -1
  41. package/src/{icons → components/icons}/DXOS.tsx +2 -1
  42. package/src/{icons → components/icons}/ECHO.tsx +2 -1
  43. package/src/{icons → components/icons}/HALO.tsx +2 -1
  44. package/src/components/icons/Icons.stories.tsx +68 -0
  45. package/src/{icons → components/icons}/KUBE.tsx +2 -1
  46. package/src/{icons → components/icons}/MESH.tsx +2 -1
  47. package/src/components/index.ts +3 -2
  48. package/src/{Logotypes.stories.tsx → components/logotypes/Logotypes.stories.tsx} +10 -8
  49. package/src/index.ts +0 -2
  50. package/src/types.d.ts +9 -0
  51. package/dist/types/src/Icons.stories.d.ts.map +0 -1
  52. package/dist/types/src/Logotypes.stories.d.ts.map +0 -1
  53. package/dist/types/src/components/ComposerLogo/ComposerLogo.d.ts.map +0 -1
  54. package/dist/types/src/components/ComposerLogo/ComposerLogo.stories.d.ts +0 -21
  55. package/dist/types/src/components/ComposerLogo/ComposerLogo.stories.d.ts.map +0 -1
  56. package/dist/types/src/components/ComposerLogo/index.d.ts +0 -2
  57. package/dist/types/src/components/ComposerLogo/index.d.ts.map +0 -1
  58. package/dist/types/src/components/rive.stories.d.ts.map +0 -1
  59. package/dist/types/src/icons/Composer.d.ts.map +0 -1
  60. package/dist/types/src/icons/DXNS.d.ts.map +0 -1
  61. package/dist/types/src/icons/DXOS.d.ts.map +0 -1
  62. package/dist/types/src/icons/ECHO.d.ts.map +0 -1
  63. package/dist/types/src/icons/HALO.d.ts.map +0 -1
  64. package/dist/types/src/icons/KUBE.d.ts.map +0 -1
  65. package/dist/types/src/icons/MESH.d.ts.map +0 -1
  66. package/dist/types/src/icons/index.d.ts.map +0 -1
  67. package/dist/types/src/logotypes/DXOSHorizontalType.d.ts.map +0 -1
  68. package/dist/types/src/logotypes/DXOSType.d.ts.map +0 -1
  69. package/dist/types/src/logotypes/DXOSVerticalType.d.ts.map +0 -1
  70. package/dist/types/src/logotypes/index.d.ts.map +0 -1
  71. package/src/Icons.stories.tsx +0 -50
  72. package/src/components/ComposerLogo/ComposerLogo.stories.tsx +0 -210
  73. package/src/components/ComposerLogo/index.ts +0 -5
  74. /package/dist/types/src/{icons → components/icons}/Composer.d.ts +0 -0
  75. /package/dist/types/src/{icons → components/icons}/DXNS.d.ts +0 -0
  76. /package/dist/types/src/{icons → components/icons}/DXOS.d.ts +0 -0
  77. /package/dist/types/src/{icons → components/icons}/ECHO.d.ts +0 -0
  78. /package/dist/types/src/{icons → components/icons}/HALO.d.ts +0 -0
  79. /package/dist/types/src/{icons → components/icons}/KUBE.d.ts +0 -0
  80. /package/dist/types/src/{icons → components/icons}/MESH.d.ts +0 -0
  81. /package/dist/types/src/{icons → components/icons}/index.d.ts +0 -0
  82. /package/dist/types/src/{logotypes → components/logotypes}/DXOSHorizontalType.d.ts +0 -0
  83. /package/dist/types/src/{logotypes → components/logotypes}/DXOSType.d.ts +0 -0
  84. /package/dist/types/src/{logotypes → components/logotypes}/DXOSVerticalType.d.ts +0 -0
  85. /package/dist/types/src/{Logotypes.stories.d.ts → components/logotypes/Logotypes.stories.d.ts} +0 -0
  86. /package/dist/types/src/{logotypes → components/logotypes}/index.d.ts +0 -0
  87. /package/src/{icons → components/icons}/index.ts +0 -0
  88. /package/src/{logotypes → components/logotypes}/DXOSHorizontalType.tsx +0 -0
  89. /package/src/{logotypes → components/logotypes}/DXOSType.tsx +0 -0
  90. /package/src/{logotypes → components/logotypes}/DXOSVerticalType.tsx +0 -0
  91. /package/src/{logotypes → components/logotypes}/index.ts +0 -0
@@ -0,0 +1,68 @@
1
+ //
2
+ // Copyright 2022 DXOS.org
3
+ //
4
+
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+ import React from 'react';
7
+
8
+ import { withTheme } from '@dxos/react-ui/testing';
9
+ import { mx } from '@dxos/ui-theme';
10
+
11
+ import { Composer } from './Composer';
12
+ import { DXNS } from './DXNS';
13
+ import { DXOS } from './DXOS';
14
+ import { ECHO } from './ECHO';
15
+ import { HALO } from './HALO';
16
+ import { KUBE } from './KUBE';
17
+ import { MESH } from './MESH';
18
+
19
+ const Icon = () => null;
20
+
21
+ const meta = {
22
+ title: 'ui/brand/components/Icons',
23
+ component: Icon,
24
+ decorators: [withTheme()],
25
+ parameters: {
26
+ layout: 'centered',
27
+ },
28
+ } satisfies Meta<typeof Icon>;
29
+
30
+ export default meta;
31
+
32
+ type Story = StoryObj<typeof meta>;
33
+
34
+ export const Default: Story = {
35
+ render: () => {
36
+ const size = 'w-[192px] h-[192px]';
37
+ return (
38
+ <div className='grid grid-cols-3 gap-16'>
39
+ <>
40
+ <div className='col-span-full flex justify-center'>
41
+ <Composer className={mx(size)} />
42
+ </div>
43
+ </>
44
+ <>
45
+ <ECHO className={mx(size, 'fill-sky-700')} />
46
+ <HALO className={mx(size, 'fill-violet-700')} />
47
+ <MESH className={mx(size, 'fill-green-700')} />
48
+ </>
49
+ <>
50
+ <DXNS className={mx(size, 'fill-neutral-700')} />
51
+ <DXOS className={mx(size, 'fill-neutral-700')} />
52
+ <KUBE className={mx(size, 'fill-neutral-700')} />
53
+ </>
54
+ <>
55
+ <div className='flex justify-center'>
56
+ <DXOS className={mx('w-[40px] h-[40px] fill-sky-700')} />
57
+ </div>
58
+ <div className='flex justify-center'>
59
+ <DXOS className={mx('w-[24px] h-[24px] fill-sky-700')} />
60
+ </div>
61
+ <div className='flex justify-center'>
62
+ <DXOS className={mx('w-[16px] h-[16px] fill-sky-700')} />
63
+ </div>
64
+ </>
65
+ </div>
66
+ );
67
+ },
68
+ };
@@ -2,7 +2,8 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { IconBase, type IconProps, type IconWeight } from '@phosphor-icons/react';
5
+ import { type IconProps, type IconWeight } from '@phosphor-icons/react';
6
+ import IconBase from '@phosphor-icons/react/dist/lib/IconBase';
6
7
  import React, { type ReactElement, forwardRef } from 'react';
7
8
 
8
9
  const weights = new Map<IconWeight, ReactElement>([
@@ -2,7 +2,8 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { IconBase, type IconProps, type IconWeight } from '@phosphor-icons/react';
5
+ import { type IconProps, type IconWeight } from '@phosphor-icons/react';
6
+ import IconBase from '@phosphor-icons/react/dist/lib/IconBase';
6
7
  import React, { type ReactElement, forwardRef } from 'react';
7
8
 
8
9
  const weights = new Map<IconWeight, ReactElement>([
@@ -1,5 +1,6 @@
1
1
  //
2
- // Copyright 2024 DXOS.org
2
+ // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- export * from './ComposerLogo';
5
+ export * from './icons';
6
+ export * from './logotypes';
@@ -3,27 +3,29 @@
3
3
  //
4
4
 
5
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
6
- import React, { type FC, type ReactNode } from 'react';
6
+ import React, { type PropsWithChildren } from 'react';
7
7
 
8
8
  import { withTheme } from '@dxos/react-ui/testing';
9
- import { mx } from '@dxos/react-ui-theme';
9
+ import { mx } from '@dxos/ui-theme';
10
10
 
11
- import { DXOSHorizontalType, DXOSType, DXOSVerticalType } from './logotypes';
11
+ import { DXOSHorizontalType } from './DXOSHorizontalType';
12
+ import { DXOSType } from './DXOSType';
13
+ import { DXOSVerticalType } from './DXOSVerticalType';
12
14
 
13
15
  const Icon = () => null;
14
16
 
15
17
  const meta = {
16
- title: 'ui/brand/LogoTypes',
18
+ title: 'ui/brand/components/LogoTypes',
17
19
  component: Icon,
18
- decorators: [withTheme],
20
+ decorators: [withTheme()],
19
21
  } satisfies Meta<typeof Icon>;
20
22
 
21
23
  export default meta;
22
24
 
23
25
  type Story = StoryObj<typeof meta>;
24
26
 
25
- const Cell: FC<{ children: ReactNode; dark?: boolean }> = ({ children, dark }) => (
26
- <div className={mx('flex p-4 justify-center rounded-md', dark ? 'bg-zinc-800 fill-zinc-50' : 'bg-white')}>
27
+ const Cell = ({ children, dark }: PropsWithChildren<{ dark?: boolean }>) => (
28
+ <div className={mx('flex p-4 justify-center rounded-md', dark ? 'bg-zinc-800 fill-zinc-50' : 'bg-zinc-100')}>
27
29
  {children}
28
30
  </div>
29
31
  );
@@ -31,7 +33,7 @@ const Cell: FC<{ children: ReactNode; dark?: boolean }> = ({ children, dark }) =
31
33
  export const Default: Story = {
32
34
  render: () => {
33
35
  return (
34
- <div className='absolute flex w-full h-full items-center justify-center'>
36
+ <div className='absolute flex h-full w-full items-center justify-center'>
35
37
  <div className='flex grid grid-cols-2 gap-16'>
36
38
  <Cell>
37
39
  <DXOSType className='w-[256px]' />
package/src/index.ts CHANGED
@@ -3,5 +3,3 @@
3
3
  //
4
4
 
5
5
  export * from './components';
6
- export * from './icons';
7
- export * from './logotypes';
package/src/types.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ //
2
+ // Copyright 2022 DXOS.org
3
+ //
4
+
5
+ // Vite resolves audio imports to asset URLs at build/serve time.
6
+ declare module '*.mp3' {
7
+ const src: string;
8
+ export default src;
9
+ }
@@ -1 +0,0 @@
1
- {"version":3,"file":"Icons.stories.d.ts","sourceRoot":"","sources":["../../../src/Icons.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAUjE,QAAA,MAAM,IAAI;;;;CAImB,CAAC;AAE9B,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAyBrB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Logotypes.stories.d.ts","sourceRoot":"","sources":["../../../src/Logotypes.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAUjE,QAAA,MAAM,IAAI;;;;CAImB,CAAC;AAE9B,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAQnC,eAAO,MAAM,OAAO,EAAE,KA6BrB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ComposerLogo.d.ts","sourceRoot":"","sources":["../../../../../src/components/ComposerLogo/ComposerLogo.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAEZ,KAAK,EAAE,EASR,MAAM,OAAO,CAAC;AA+Bf,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAyCD,eAAO,MAAM,YAAY;cALY,OAAO;WAAS,MAAM;iBAAe,MAAM,EAAE;uGAuCjF,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,CAkGA,CAAC"}
@@ -1,21 +0,0 @@
1
- import '@fontsource/k2d/100-italic.css';
2
- import { type StoryObj } from '@storybook/react-vite';
3
- import React from 'react';
4
- import { type AnimationController } from './ComposerLogo';
5
- declare const meta: {
6
- title: string;
7
- component: React.ForwardRefExoticComponent<{
8
- animate?: boolean;
9
- size?: number;
10
- classNames?: string[];
11
- } & Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & React.RefAttributes<AnimationController>>;
12
- decorators: import("@storybook/react").Decorator[];
13
- };
14
- export default meta;
15
- type Story = StoryObj<typeof meta>;
16
- export declare const Default: Story;
17
- export declare const Colors: Story;
18
- export declare const Pacman: Story;
19
- export declare const Spinner: Story;
20
- export declare const Linear: Story;
21
- //# sourceMappingURL=ComposerLogo.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ComposerLogo.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ComposerLogo/ComposerLogo.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,gCAAgC,CAAC;AAExC,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAA2B,MAAM,OAAO,CAAC;AAQhD,OAAO,EAAE,KAAK,mBAAmB,EAAiC,MAAM,gBAAgB,CAAC;AAMzF,QAAA,MAAM,IAAI;;;;;;;;CAI2B,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAWnC,eAAO,MAAM,OAAO,EAAE,KAsCrB,CAAC;AAGF,eAAO,MAAM,MAAM,EAAE,KA0BpB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAoCpB,CAAC;AAuCF,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC;AAGF,eAAO,MAAM,MAAM,EAAE,KAcpB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './ComposerLogo';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ComposerLogo/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"rive.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/rive.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAoB,MAAM,OAAO,CAAC;AA8EzC,QAAA,MAAM,IAAI;;;;;;;CAO2B,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Composer.d.ts","sourceRoot":"","sources":["../../../../src/icons/Composer.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAiC7D,eAAO,MAAM,QAAQ,wFAgBnB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DXNS.d.ts","sourceRoot":"","sources":["../../../../src/icons/DXNS.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAY,KAAK,SAAS,EAAmB,MAAM,uBAAuB,CAAC;AAClF,OAAO,KAAwC,MAAM,OAAO,CAAC;AAoC7D,eAAO,MAAM,IAAI,8FAEf,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DXOS.d.ts","sourceRoot":"","sources":["../../../../src/icons/DXOS.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAY,KAAK,SAAS,EAAmB,MAAM,uBAAuB,CAAC;AAClF,OAAO,KAAwC,MAAM,OAAO,CAAC;AAa7D,eAAO,MAAM,IAAI,8FAEf,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ECHO.d.ts","sourceRoot":"","sources":["../../../../src/icons/ECHO.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAY,KAAK,SAAS,EAAmB,MAAM,uBAAuB,CAAC;AAClF,OAAO,KAAwC,MAAM,OAAO,CAAC;AAa7D,eAAO,MAAM,IAAI,8FAEf,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"HALO.d.ts","sourceRoot":"","sources":["../../../../src/icons/HALO.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAY,KAAK,SAAS,EAAmB,MAAM,uBAAuB,CAAC;AAClF,OAAO,KAAwC,MAAM,OAAO,CAAC;AAiB7D,eAAO,MAAM,IAAI,8FAEf,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"KUBE.d.ts","sourceRoot":"","sources":["../../../../src/icons/KUBE.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAY,KAAK,SAAS,EAAmB,MAAM,uBAAuB,CAAC;AAClF,OAAO,KAAwC,MAAM,OAAO,CAAC;AA6C7D,eAAO,MAAM,IAAI,8FAEf,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"MESH.d.ts","sourceRoot":"","sources":["../../../../src/icons/MESH.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAY,KAAK,SAAS,EAAmB,MAAM,uBAAuB,CAAC;AAClF,OAAO,KAAwC,MAAM,OAAO,CAAC;AAc7D,eAAO,MAAM,IAAI,8FAEf,CAAC"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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"}
@@ -1,50 +0,0 @@
1
- //
2
- // Copyright 2022 DXOS.org
3
- //
4
-
5
- import { type Meta, type StoryObj } from '@storybook/react-vite';
6
- import React from 'react';
7
-
8
- import { withTheme } from '@dxos/react-ui/testing';
9
- import { mx } from '@dxos/react-ui-theme';
10
-
11
- import { Composer, DXNS, DXOS, ECHO, HALO, KUBE, MESH } from './icons';
12
-
13
- const Icon = () => null;
14
-
15
- const meta = {
16
- title: 'ui/brand/Icons',
17
- component: Icon,
18
- decorators: [withTheme],
19
- } satisfies Meta<typeof Icon>;
20
-
21
- export default meta;
22
-
23
- type Story = StoryObj<typeof meta>;
24
-
25
- export const Default: Story = {
26
- render: () => {
27
- const size = 'w-[128px] h-[128px]';
28
- return (
29
- <div className='absolute flex w-full h-full items-center justify-center'>
30
- <div className='grid grid-cols-3 gap-16'>
31
- <>
32
- <div />
33
- <Composer className={mx(size)} />
34
- <div />
35
- </>
36
- <>
37
- <DXNS className={mx(size, 'fill-orange-700')} />
38
- <DXOS className={mx(size, 'fill-teal-700')} />
39
- <ECHO className={mx(size, 'fill-violet-700')} />
40
- </>
41
- <>
42
- <HALO className={mx(size, 'fill-purple-700')} />
43
- <KUBE className={mx(size, 'fill-sky-700')} />
44
- <MESH className={mx(size, 'fill-green-700')} />
45
- </>
46
- </div>
47
- </div>
48
- );
49
- },
50
- };
@@ -1,210 +0,0 @@
1
- //
2
- // Copyright 2022 DXOS.org
3
- //
4
-
5
- import '@fontsource/k2d/100-italic.css';
6
-
7
- import { type Meta, type StoryObj } from '@storybook/react-vite';
8
- import React, { useRef, useState } from 'react';
9
-
10
- import { Button, Icon } from '@dxos/react-ui';
11
- import { withTheme } from '@dxos/react-ui/testing';
12
- import { mx } from '@dxos/react-ui-theme';
13
-
14
- import { DXOS } from '../../icons';
15
-
16
- import { type AnimationController, ComposerLogo, ComposerSpinner } from './ComposerLogo';
17
-
18
- // import ident from '../../../assets/sounds/ident-1.mp3';
19
-
20
- // https://pixabay.com/sound-effects/search/logo/?pagi=2
21
-
22
- const meta = {
23
- title: 'ui/brand/Logo',
24
- component: ComposerLogo,
25
- decorators: [withTheme],
26
- } satisfies Meta<typeof ComposerLogo>;
27
-
28
- export default meta;
29
-
30
- type Story = StoryObj<typeof meta>;
31
-
32
- // TODO(burdon): Get from theme?
33
- const colors = {
34
- gray: '#888888',
35
- purple: '#AA23D3',
36
- orange: '#CA6346',
37
- green: '#4DA676',
38
- blue: '#539ACD',
39
- };
40
-
41
- export const Default: Story = {
42
- render: () => {
43
- const controller = useRef<AnimationController>(null);
44
- const [logo, setLogo] = useState(false);
45
- const handleSpin = async () => {
46
- // const audio = new Audio(ident);
47
- // await audio.play();
48
- setTimeout(() => {
49
- setLogo(true);
50
- }, 1_500);
51
-
52
- controller.current?.spin();
53
- };
54
-
55
- return (
56
- <div className='absolute flex inset-0 items-center justify-center'>
57
- <div className='absolute left-4 top-4'>
58
- <Button onClick={handleSpin}>Spin</Button>
59
- </div>
60
-
61
- <div>
62
- <div className='flex justify-center'>
63
- <ComposerLogo ref={controller} size={256} />
64
- </div>
65
-
66
- <div className={mx('transition opacity-0 duration-1000', logo && 'opacity-100')}>
67
- <div className={mx('text-[100px] text-teal-400 font-[k2d] italic')}>composer</div>
68
- <div className={mx('flex items-center -mt-[20px] text-neutral-700')}>
69
- <span className='ml-[210px] mt-[2px] mr-2'>Powered by DXOS</span>
70
- <div>
71
- <DXOS className='w-[32px] h-[32px]' />
72
- </div>
73
- </div>
74
- </div>
75
- </div>
76
- </div>
77
- );
78
- },
79
- };
80
-
81
- // TODO(burdon): Camo.
82
- export const Colors: Story = {
83
- render: () => {
84
- const colors = [
85
- ['fill-teal-400', 'fill-teal-500', 'fill-teal-600'],
86
- ['fill-orange-400', 'fill-orange-500', 'fill-orange-600'],
87
- ['fill-cyan-400', 'fill-cyan-500', 'fill-cyan-600'],
88
- ['fill-purple-400', 'fill-purple-500', 'fill-purple-600'],
89
- ['fill-blue-500', 'fill-blue-600', 'fill-blue-700'],
90
- ['fill-slate-500', 'fill-slate-600', 'fill-slate-700'],
91
- ['fill-blue-500', 'fill-neutral-100', 'fill-red-500'],
92
- ['fill-stone-400', 'fill-stone-500', 'fill-stone-600'],
93
- ['fill-neutral-500', 'fill-neutral-600', 'fill-neutral-700'],
94
- ];
95
-
96
- return (
97
- <div className='absolute inset-0 flex justify-center items-center'>
98
- <div className='grid grid-cols-3 gap-20 w-[800px]'>
99
- {colors.map((classNames, i) => (
100
- <div key={i} className='flex justify-center items-center'>
101
- <ComposerLogo animate={false} size={160} classNames={classNames} />
102
- </div>
103
- ))}
104
- </div>
105
- </div>
106
- );
107
- },
108
- };
109
-
110
- export const Pacman: Story = {
111
- render: () => {
112
- return (
113
- <div className='absolute inset-0 flex flex-col justify-center'>
114
- <div className='flex flex-col'>
115
- <div className='flex items-center p-4'>
116
- <div className='flex ml-8 mr-[100px]'>
117
- <div>
118
- <Icon icon='ph--ghost--duotone' classNames='w-[180px] h-[180px] text-blue-500' />
119
- </div>
120
- <div>
121
- <Icon icon='ph--ghost--duotone' classNames='w-[180px] h-[180px] text-purple-500' />
122
- </div>
123
- <div>
124
- <Icon icon='ph--ghost--duotone' classNames='w-[180px] h-[180px] text-red-500' />
125
- </div>
126
- </div>
127
-
128
- <ComposerLogo size={145} classNames={['fill-yellow-200', 'fill-yellow-300', 'fill-yellow-400']} />
129
-
130
- <div className='flex -ml-10'>
131
- {Array.from({ length: 6 }).map((_, i) => (
132
- <div key={i} className='p-4'>
133
- <Icon icon='ph--square--duotone' classNames='w-6 h-6 text-yellow-200' />
134
- </div>
135
- ))}
136
- </div>
137
- </div>
138
-
139
- <div className='flex justify-center font-mono font-light text-[60px] mt-8 text-neutral-200'>
140
- <div>Ready Player 1</div>
141
- </div>
142
- </div>
143
- </div>
144
- );
145
- },
146
- };
147
-
148
- const SpinnerContainer = () => {
149
- const [spinning, setSpinning] = useState(false);
150
- return (
151
- <div>
152
- <div className='absolute left-4 top-4'>
153
- {(spinning && <Button onClick={() => setSpinning(false)}>Stop</Button>) || (
154
- <Button onClick={() => setSpinning(true)}>Start</Button>
155
- )}
156
- </div>
157
- <div className='grid grid-cols-3 gap-20'>
158
- <>
159
- <div className='flex justify-center items-center'>
160
- <ComposerSpinner animate={spinning} gap={1} size={200} color={colors.blue} />
161
- </div>
162
- <div className='flex justify-center items-center'>
163
- <ComposerSpinner animate={spinning} gap={1} size={200} color={colors.green} />
164
- </div>
165
- <div className='flex justify-center items-center'>
166
- <ComposerSpinner animate={spinning} gap={1} size={200} color={colors.orange} />
167
- </div>
168
- </>
169
- <>
170
- <div className='flex justify-center items-center'>
171
- <ComposerSpinner animate={spinning} gap={1} size={200} color={colors.blue} />
172
- </div>
173
- <div className='flex justify-center items-center'>
174
- <ComposerSpinner animate={spinning} gap={1} size={100} color={colors.green} />
175
- </div>
176
- <div className='flex justify-center items-center'>
177
- <ComposerSpinner animate={spinning} gap={1} size={40} color={colors.orange} />
178
- </div>
179
- </>
180
- </div>
181
- </div>
182
- );
183
- };
184
-
185
- export const Spinner: Story = {
186
- render: () => {
187
- return (
188
- <div className='absolute inset-0 flex items-center justify-center'>
189
- <SpinnerContainer />
190
- </div>
191
- );
192
- },
193
- };
194
-
195
- // https://github.com/grafana/grafana/blob/main/packages/grafana-ui/src/components/LoadingBar/LoadingBar.tsx
196
- export const Linear: Story = {
197
- render: () => {
198
- return (
199
- <div className='absolute flex flex-col inset-0 bg-black'>
200
- <div
201
- className={'h-[1px] translateX(-100%) animate-progress-linear'}
202
- style={{
203
- background:
204
- 'linear-gradient(90deg, rgba(110, 159, 255, 0) 0%, #6E9FFF 80.75%, rgba(110, 159, 255, 0) 100%)',
205
- }}
206
- />
207
- </div>
208
- );
209
- },
210
- };
@@ -1,5 +0,0 @@
1
- //
2
- // Copyright 2024 DXOS.org
3
- //
4
-
5
- export * from './ComposerLogo';
File without changes