@xyo-network/react-os 2.68.0-rc.1
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/LICENSE +165 -0
- package/README.md +13 -0
- package/dist/browser/components/Profile/Profile.d.cts +9 -0
- package/dist/browser/components/Profile/Profile.d.cts.map +1 -0
- package/dist/browser/components/Profile/Profile.d.mts +9 -0
- package/dist/browser/components/Profile/Profile.d.mts.map +1 -0
- package/dist/browser/components/Profile/Profile.d.ts +9 -0
- package/dist/browser/components/Profile/Profile.d.ts.map +1 -0
- package/dist/browser/components/Profile/StatsModal.d.cts +3 -0
- package/dist/browser/components/Profile/StatsModal.d.cts.map +1 -0
- package/dist/browser/components/Profile/StatsModal.d.mts +3 -0
- package/dist/browser/components/Profile/StatsModal.d.mts.map +1 -0
- package/dist/browser/components/Profile/StatsModal.d.ts +3 -0
- package/dist/browser/components/Profile/StatsModal.d.ts.map +1 -0
- package/dist/browser/components/Profile/index.d.cts +2 -0
- package/dist/browser/components/Profile/index.d.cts.map +1 -0
- package/dist/browser/components/Profile/index.d.mts +2 -0
- package/dist/browser/components/Profile/index.d.mts.map +1 -0
- package/dist/browser/components/Profile/index.d.ts +2 -0
- package/dist/browser/components/Profile/index.d.ts.map +1 -0
- package/dist/browser/components/TestComponent.d.cts +5 -0
- package/dist/browser/components/TestComponent.d.cts.map +1 -0
- package/dist/browser/components/TestComponent.d.mts +5 -0
- package/dist/browser/components/TestComponent.d.mts.map +1 -0
- package/dist/browser/components/TestComponent.d.ts +5 -0
- package/dist/browser/components/TestComponent.d.ts.map +1 -0
- package/dist/browser/components/XyOsClock/XyOsClock.d.cts +18 -0
- package/dist/browser/components/XyOsClock/XyOsClock.d.cts.map +1 -0
- package/dist/browser/components/XyOsClock/XyOsClock.d.mts +18 -0
- package/dist/browser/components/XyOsClock/XyOsClock.d.mts.map +1 -0
- package/dist/browser/components/XyOsClock/XyOsClock.d.ts +18 -0
- package/dist/browser/components/XyOsClock/XyOsClock.d.ts.map +1 -0
- package/dist/browser/components/XyOsClock/index.d.cts +2 -0
- package/dist/browser/components/XyOsClock/index.d.cts.map +1 -0
- package/dist/browser/components/XyOsClock/index.d.mts +2 -0
- package/dist/browser/components/XyOsClock/index.d.mts.map +1 -0
- package/dist/browser/components/XyOsClock/index.d.ts +2 -0
- package/dist/browser/components/XyOsClock/index.d.ts.map +1 -0
- package/dist/browser/components/index.d.cts +2 -0
- package/dist/browser/components/index.d.cts.map +1 -0
- package/dist/browser/components/index.d.mts +2 -0
- package/dist/browser/components/index.d.mts.map +1 -0
- package/dist/browser/components/index.d.ts +2 -0
- package/dist/browser/components/index.d.ts.map +1 -0
- package/dist/browser/index.cjs +33 -0
- package/dist/browser/index.cjs.map +1 -0
- package/dist/browser/index.d.cts +2 -0
- package/dist/browser/index.d.cts.map +1 -0
- package/dist/browser/index.d.mts +2 -0
- package/dist/browser/index.d.mts.map +1 -0
- package/dist/browser/index.d.ts +2 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +10 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/node/components/Profile/Profile.d.cts +9 -0
- package/dist/node/components/Profile/Profile.d.cts.map +1 -0
- package/dist/node/components/Profile/Profile.d.mts +9 -0
- package/dist/node/components/Profile/Profile.d.mts.map +1 -0
- package/dist/node/components/Profile/Profile.d.ts +9 -0
- package/dist/node/components/Profile/Profile.d.ts.map +1 -0
- package/dist/node/components/Profile/StatsModal.d.cts +3 -0
- package/dist/node/components/Profile/StatsModal.d.cts.map +1 -0
- package/dist/node/components/Profile/StatsModal.d.mts +3 -0
- package/dist/node/components/Profile/StatsModal.d.mts.map +1 -0
- package/dist/node/components/Profile/StatsModal.d.ts +3 -0
- package/dist/node/components/Profile/StatsModal.d.ts.map +1 -0
- package/dist/node/components/Profile/index.d.cts +2 -0
- package/dist/node/components/Profile/index.d.cts.map +1 -0
- package/dist/node/components/Profile/index.d.mts +2 -0
- package/dist/node/components/Profile/index.d.mts.map +1 -0
- package/dist/node/components/Profile/index.d.ts +2 -0
- package/dist/node/components/Profile/index.d.ts.map +1 -0
- package/dist/node/components/TestComponent.d.cts +5 -0
- package/dist/node/components/TestComponent.d.cts.map +1 -0
- package/dist/node/components/TestComponent.d.mts +5 -0
- package/dist/node/components/TestComponent.d.mts.map +1 -0
- package/dist/node/components/TestComponent.d.ts +5 -0
- package/dist/node/components/TestComponent.d.ts.map +1 -0
- package/dist/node/components/XyOsClock/XyOsClock.d.cts +18 -0
- package/dist/node/components/XyOsClock/XyOsClock.d.cts.map +1 -0
- package/dist/node/components/XyOsClock/XyOsClock.d.mts +18 -0
- package/dist/node/components/XyOsClock/XyOsClock.d.mts.map +1 -0
- package/dist/node/components/XyOsClock/XyOsClock.d.ts +18 -0
- package/dist/node/components/XyOsClock/XyOsClock.d.ts.map +1 -0
- package/dist/node/components/XyOsClock/index.d.cts +2 -0
- package/dist/node/components/XyOsClock/index.d.cts.map +1 -0
- package/dist/node/components/XyOsClock/index.d.mts +2 -0
- package/dist/node/components/XyOsClock/index.d.mts.map +1 -0
- package/dist/node/components/XyOsClock/index.d.ts +2 -0
- package/dist/node/components/XyOsClock/index.d.ts.map +1 -0
- package/dist/node/components/index.d.cts +2 -0
- package/dist/node/components/index.d.cts.map +1 -0
- package/dist/node/components/index.d.mts +2 -0
- package/dist/node/components/index.d.mts.map +1 -0
- package/dist/node/components/index.d.ts +2 -0
- package/dist/node/components/index.d.ts.map +1 -0
- package/dist/node/index.cjs +37 -0
- package/dist/node/index.cjs.map +1 -0
- package/dist/node/index.d.cts +2 -0
- package/dist/node/index.d.cts.map +1 -0
- package/dist/node/index.d.mts +2 -0
- package/dist/node/index.d.mts.map +1 -0
- package/dist/node/index.d.ts +2 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +10 -0
- package/dist/node/index.js.map +1 -0
- package/package.json +82 -0
- package/src/components/Profile/Profile.stories.tsx +36 -0
- package/src/components/Profile/Profile.tsx +59 -0
- package/src/components/Profile/StatsModal.tsx +49 -0
- package/src/components/Profile/index.ts +1 -0
- package/src/components/TestComponent.stories.tsx +16 -0
- package/src/components/TestComponent.tsx +8 -0
- package/src/components/XyOsClock/XyOsClock.stories.tsx +41 -0
- package/src/components/XyOsClock/XyOsClock.tsx +114 -0
- package/src/components/XyOsClock/index.ts +1 -0
- package/src/components/index.ts +1 -0
- package/src/index.ts +1 -0
- package/src/types/images.d.ts +5 -0
- package/typedoc.json +5 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestComponent.d.ts","sourceRoot":"","sources":["../../../src/components/TestComponent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAEzC,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;CAAG;AAEhE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAEtD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestComponent.d.ts","sourceRoot":"","sources":["../../../src/components/TestComponent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAEzC,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;CAAG;AAEhE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAEtD,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@mui/material';
|
|
3
|
+
interface ClockProps extends BoxProps {
|
|
4
|
+
date: number;
|
|
5
|
+
}
|
|
6
|
+
export interface XyOsClockProps {
|
|
7
|
+
clockSize: 'small' | 'medium' | 'large';
|
|
8
|
+
clockType: 'appbar' | 'widget';
|
|
9
|
+
}
|
|
10
|
+
export declare const XyOsClock: React.FC<XyOsClockProps>;
|
|
11
|
+
export declare const SmallAppBarClock: React.FC<ClockProps>;
|
|
12
|
+
export declare const MediumAppBarClock: React.FC<ClockProps>;
|
|
13
|
+
export declare const LargeAppBarClock: React.FC<ClockProps>;
|
|
14
|
+
export declare const SmallWidgetClock: React.FC<ClockProps>;
|
|
15
|
+
export declare const MediumWidgetClock: React.FC<ClockProps>;
|
|
16
|
+
export declare const LargeWidgetClock: React.FC<ClockProps>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=XyOsClock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"XyOsClock.d.ts","sourceRoot":"","sources":["../../../../src/components/XyOsClock/XyOsClock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAqB,MAAM,eAAe,CAAA;AAK3D,UAAU,UAAW,SAAQ,QAAQ;IACnC,IAAI,EAAE,MAAM,CAAA;CACb;AAaD,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACvC,SAAS,EAAE,QAAQ,GAAG,QAAQ,CAAA;CAC/B;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA2B9C,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAOjD,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAOlD,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAOjD,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CASjD,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CASlD,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAUjD,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@mui/material';
|
|
3
|
+
interface ClockProps extends BoxProps {
|
|
4
|
+
date: number;
|
|
5
|
+
}
|
|
6
|
+
export interface XyOsClockProps {
|
|
7
|
+
clockSize: 'small' | 'medium' | 'large';
|
|
8
|
+
clockType: 'appbar' | 'widget';
|
|
9
|
+
}
|
|
10
|
+
export declare const XyOsClock: React.FC<XyOsClockProps>;
|
|
11
|
+
export declare const SmallAppBarClock: React.FC<ClockProps>;
|
|
12
|
+
export declare const MediumAppBarClock: React.FC<ClockProps>;
|
|
13
|
+
export declare const LargeAppBarClock: React.FC<ClockProps>;
|
|
14
|
+
export declare const SmallWidgetClock: React.FC<ClockProps>;
|
|
15
|
+
export declare const MediumWidgetClock: React.FC<ClockProps>;
|
|
16
|
+
export declare const LargeWidgetClock: React.FC<ClockProps>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=XyOsClock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"XyOsClock.d.ts","sourceRoot":"","sources":["../../../../src/components/XyOsClock/XyOsClock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAqB,MAAM,eAAe,CAAA;AAK3D,UAAU,UAAW,SAAQ,QAAQ;IACnC,IAAI,EAAE,MAAM,CAAA;CACb;AAaD,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACvC,SAAS,EAAE,QAAQ,GAAG,QAAQ,CAAA;CAC/B;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA2B9C,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAOjD,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAOlD,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAOjD,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CASjD,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CASlD,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAUjD,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@mui/material';
|
|
3
|
+
interface ClockProps extends BoxProps {
|
|
4
|
+
date: number;
|
|
5
|
+
}
|
|
6
|
+
export interface XyOsClockProps {
|
|
7
|
+
clockSize: 'small' | 'medium' | 'large';
|
|
8
|
+
clockType: 'appbar' | 'widget';
|
|
9
|
+
}
|
|
10
|
+
export declare const XyOsClock: React.FC<XyOsClockProps>;
|
|
11
|
+
export declare const SmallAppBarClock: React.FC<ClockProps>;
|
|
12
|
+
export declare const MediumAppBarClock: React.FC<ClockProps>;
|
|
13
|
+
export declare const LargeAppBarClock: React.FC<ClockProps>;
|
|
14
|
+
export declare const SmallWidgetClock: React.FC<ClockProps>;
|
|
15
|
+
export declare const MediumWidgetClock: React.FC<ClockProps>;
|
|
16
|
+
export declare const LargeWidgetClock: React.FC<ClockProps>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=XyOsClock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"XyOsClock.d.ts","sourceRoot":"","sources":["../../../../src/components/XyOsClock/XyOsClock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAqB,MAAM,eAAe,CAAA;AAK3D,UAAU,UAAW,SAAQ,QAAQ;IACnC,IAAI,EAAE,MAAM,CAAA;CACb;AAaD,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACvC,SAAS,EAAE,QAAQ,GAAG,QAAQ,CAAA;CAC/B;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA2B9C,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAOjD,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAOlD,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAOjD,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CASjD,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CASlD,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAUjD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/XyOsClock/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/XyOsClock/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/XyOsClock/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
TestComponent: () => TestComponent
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(src_exports);
|
|
26
|
+
|
|
27
|
+
// src/components/TestComponent.tsx
|
|
28
|
+
var import_react_flexbox = require("@xylabs/react-flexbox");
|
|
29
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
30
|
+
var TestComponent = ({ children, ...props }) => {
|
|
31
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_flexbox.FlexRow, { ...props, children });
|
|
32
|
+
};
|
|
33
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
+
0 && (module.exports = {
|
|
35
|
+
TestComponent
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/components/TestComponent.tsx"],"sourcesContent":["export * from './components'\n","import { FlexRow } from '@xylabs/react-flexbox'\nimport { PropsWithChildren } from 'react'\n\nexport interface TestComponentProps extends PropsWithChildren {}\n\nexport const TestComponent: React.FC<TestComponentProps> = ({ children, ...props }) => {\n return <FlexRow {...props}>{children}</FlexRow>\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,2BAAwB;AAMf;AADF,IAAM,gBAA8C,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM;AACrF,SAAO,4CAAC,gCAAS,GAAG,OAAQ,UAAS;AACvC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/components/TestComponent.tsx
|
|
2
|
+
import { FlexRow } from "@xylabs/react-flexbox";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
var TestComponent = ({ children, ...props }) => {
|
|
5
|
+
return /* @__PURE__ */ jsx(FlexRow, { ...props, children });
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
TestComponent
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/TestComponent.tsx"],"sourcesContent":["import { FlexRow } from '@xylabs/react-flexbox'\nimport { PropsWithChildren } from 'react'\n\nexport interface TestComponentProps extends PropsWithChildren {}\n\nexport const TestComponent: React.FC<TestComponentProps> = ({ children, ...props }) => {\n return <FlexRow {...props}>{children}</FlexRow>\n}\n"],"mappings":";AAAA,SAAS,eAAe;AAMf;AADF,IAAM,gBAA8C,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM;AACrF,SAAO,oBAAC,WAAS,GAAG,OAAQ,UAAS;AACvC;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xyo-network/react-os",
|
|
3
|
+
"author": {
|
|
4
|
+
"email": "support@xyo.network",
|
|
5
|
+
"name": "XYO Development Team",
|
|
6
|
+
"url": "https://xyo.network"
|
|
7
|
+
},
|
|
8
|
+
"bugs": {
|
|
9
|
+
"email": "support@xyo.network",
|
|
10
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@xylabs/react-flexbox": "^3.0.39",
|
|
14
|
+
"date-fns": "^3.3.1"
|
|
15
|
+
},
|
|
16
|
+
"peerDependencies": {
|
|
17
|
+
"@mui/material": "^5",
|
|
18
|
+
"@mui/styles": "^5",
|
|
19
|
+
"react": "^18",
|
|
20
|
+
"react-dom": "^18"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@storybook/react": "^7.6.13",
|
|
24
|
+
"@xylabs/ts-scripts-yarn3": "^3.2.42",
|
|
25
|
+
"@xylabs/tsconfig-react": "^3.2.42",
|
|
26
|
+
"typescript": "^5.3.3"
|
|
27
|
+
},
|
|
28
|
+
"description": "Common React library for all XYO projects that use React",
|
|
29
|
+
"docs": "dist/docs.json",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"node": {
|
|
33
|
+
"import": {
|
|
34
|
+
"types": "./dist/node/index.d.mts",
|
|
35
|
+
"default": "./dist/node/index.js"
|
|
36
|
+
},
|
|
37
|
+
"require": {
|
|
38
|
+
"types": "./dist/node/index.d.cts",
|
|
39
|
+
"default": "./dist/node/index.cjs"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"browser": {
|
|
43
|
+
"import": {
|
|
44
|
+
"types": "./dist/browser/index.d.mts",
|
|
45
|
+
"default": "./dist/browser/index.js"
|
|
46
|
+
},
|
|
47
|
+
"require": {
|
|
48
|
+
"types": "./dist/browser/index.d.cts",
|
|
49
|
+
"default": "./dist/browser/index.cjs"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"default": "./dist/browser/index.js"
|
|
53
|
+
},
|
|
54
|
+
"./package.json": "./package.json"
|
|
55
|
+
},
|
|
56
|
+
"main": "dist/browser/index.cjs",
|
|
57
|
+
"module": "dist/browser/index.js",
|
|
58
|
+
"homepage": "https://xyo.network",
|
|
59
|
+
"keywords": [
|
|
60
|
+
"xyo",
|
|
61
|
+
"utility",
|
|
62
|
+
"typescript",
|
|
63
|
+
"react"
|
|
64
|
+
],
|
|
65
|
+
"license": "LGPL-3.0-only",
|
|
66
|
+
"publishConfig": {
|
|
67
|
+
"access": "public"
|
|
68
|
+
},
|
|
69
|
+
"repository": {
|
|
70
|
+
"type": "git",
|
|
71
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js.git"
|
|
72
|
+
},
|
|
73
|
+
"scripts": {
|
|
74
|
+
"lint-pkg": "npmPkgJsonLint .",
|
|
75
|
+
"license": "yarn license-checker --exclude \"MIT, ISC, Apache-2.0, BSD, BSD-2-Clause, CC-BY-4.0, Unlicense, CC-BY-3.0, CC0-1.0\""
|
|
76
|
+
},
|
|
77
|
+
"sideEffects": false,
|
|
78
|
+
"types": "dist/browser/index.d.ts",
|
|
79
|
+
"version": "2.68.0-rc.1",
|
|
80
|
+
"type": "module",
|
|
81
|
+
"stableVersion": "2.67.18"
|
|
82
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Meta, StoryFn } from '@storybook/react'
|
|
2
|
+
import { BrowserRouter } from 'react-router-dom'
|
|
3
|
+
|
|
4
|
+
import { FlexGrowCol } from '@xylabs/react-flexbox'
|
|
5
|
+
import { XyOsProfile } from './Profile'
|
|
6
|
+
const StorybookEntry = {
|
|
7
|
+
argTypes: {},
|
|
8
|
+
component: XyOsProfile,
|
|
9
|
+
parameters: {
|
|
10
|
+
docs: {
|
|
11
|
+
page: null,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
title: 'shared/XyOsProfile',
|
|
15
|
+
} as Meta<typeof XyOsProfile>
|
|
16
|
+
|
|
17
|
+
const Template: StoryFn<typeof XyOsProfile> = (args) => (
|
|
18
|
+
<BrowserRouter>
|
|
19
|
+
<XyOsProfile {...args}></XyOsProfile>
|
|
20
|
+
</BrowserRouter>
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
const Default = Template.bind({})
|
|
24
|
+
Default.args = {
|
|
25
|
+
xns:'@arietrouw'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
31
|
+
//@ts-ignore
|
|
32
|
+
|
|
33
|
+
export { Default }
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line import/no-default-export
|
|
36
|
+
export default StorybookEntry
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Avatar, Button, Divider, Icon, IconButton, Paper, PaperProps, Typography, useTheme } from '@mui/material'
|
|
2
|
+
import { green, purple } from '@mui/material/colors'
|
|
3
|
+
import { FlexGrowCol, FlexGrowRow } from '@xylabs/react-flexbox'
|
|
4
|
+
import { format, subHours } from 'date-fns'
|
|
5
|
+
|
|
6
|
+
import { StatsModal } from './StatsModal'
|
|
7
|
+
interface XyOsProfileProps extends PaperProps {
|
|
8
|
+
pfp: string
|
|
9
|
+
xns: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const XyOsProfile: React.FC<XyOsProfileProps> = ({ xns, pfp, ...props }) => {
|
|
13
|
+
const theme = useTheme()
|
|
14
|
+
return (
|
|
15
|
+
<FlexGrowCol gap={1} alignItems="flex-start">
|
|
16
|
+
<FlexGrowRow gap={1}>
|
|
17
|
+
<Avatar alt={xns} src={'https://arietrouw.com/assets/img/arie.jpg'} sx={{ height: 100, width: 100 }} />
|
|
18
|
+
<FlexGrowCol width="100%" alignItems={'flex-start'}>
|
|
19
|
+
<Typography variant="h5">{xns}</Typography>
|
|
20
|
+
<Typography variant="subtitle2">Last Active: {format(subHours(Date.now(), 4), 'pp')}</Typography>
|
|
21
|
+
</FlexGrowCol>
|
|
22
|
+
</FlexGrowRow>
|
|
23
|
+
<Paper sx={{ padding: 1 }}>
|
|
24
|
+
<FlexGrowRow paddingBottom={1} width="100%" alignItems="center" justifyContent="space-between">
|
|
25
|
+
<Typography variant="body1" fontWeight={'medium'}>
|
|
26
|
+
2024 Stats
|
|
27
|
+
</Typography>
|
|
28
|
+
<StatsModal />
|
|
29
|
+
</FlexGrowRow>
|
|
30
|
+
<FlexGrowRow justifyContent="flex-start" width="100%" gap={1}>
|
|
31
|
+
<FlexGrowCol alignItems={'flex-start'}>
|
|
32
|
+
<Typography variant="h5">3,921</Typography>
|
|
33
|
+
<Typography variant="body2">Bound Witnesses</Typography>
|
|
34
|
+
</FlexGrowCol>
|
|
35
|
+
<Divider flexItem orientation="vertical"></Divider>
|
|
36
|
+
<FlexGrowCol alignItems={'flex-start'}>
|
|
37
|
+
<Typography variant="h5">30</Typography>
|
|
38
|
+
<Typography variant="body2">Connected Bridges</Typography>
|
|
39
|
+
</FlexGrowCol>
|
|
40
|
+
<Divider flexItem orientation="vertical"></Divider>
|
|
41
|
+
<FlexGrowCol alignItems={'flex-start'}>
|
|
42
|
+
<Typography variant="h5">3,921</Typography>
|
|
43
|
+
<Typography variant="body2">Bound Witnesses</Typography>
|
|
44
|
+
</FlexGrowCol>
|
|
45
|
+
</FlexGrowRow>
|
|
46
|
+
</Paper>
|
|
47
|
+
<Paper sx={{ padding: 1 }}>
|
|
48
|
+
<Typography paddingBottom={1} variant="h6">
|
|
49
|
+
Badges
|
|
50
|
+
</Typography>
|
|
51
|
+
<FlexGrowRow justifyContent="flex-start" width="100%" gap={1}>
|
|
52
|
+
<Avatar sx={{ color: theme.palette.primary.main, height: 50, width: 50 }}></Avatar>
|
|
53
|
+
<Avatar sx={{ color: theme.palette.primary.main, height: 50, width: 50 }}></Avatar>
|
|
54
|
+
<Avatar sx={{ color: theme.palette.primary.main, height: 50, width: 50 }}></Avatar>
|
|
55
|
+
</FlexGrowRow>
|
|
56
|
+
</Paper>
|
|
57
|
+
</FlexGrowCol>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import ArrowForwardRoundedIcon from '@mui/icons-material/ArrowForwardRounded'
|
|
2
|
+
import { Avatar, Backdrop, Box, Fade, IconButton, Modal, Typography } from '@mui/material'
|
|
3
|
+
import { FlexGrowCol } from '@xylabs/react-flexbox'
|
|
4
|
+
import * as React from 'react'
|
|
5
|
+
|
|
6
|
+
const style = {
|
|
7
|
+
bgcolor: 'background.paper',
|
|
8
|
+
boxShadow: 24,
|
|
9
|
+
p: 4,
|
|
10
|
+
width: 400,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const StatsModal: React.FC = () => {
|
|
14
|
+
const [open, setOpen] = React.useState(false)
|
|
15
|
+
const handleOpen = () => setOpen(true)
|
|
16
|
+
const handleClose = () => setOpen(false)
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<div>
|
|
20
|
+
<IconButton size="small" color="primary" onClick={handleOpen}>
|
|
21
|
+
<ArrowForwardRoundedIcon />
|
|
22
|
+
</IconButton>
|
|
23
|
+
<Modal
|
|
24
|
+
aria-labelledby="transition-modal-title"
|
|
25
|
+
aria-describedby="transition-modal-description"
|
|
26
|
+
open={open}
|
|
27
|
+
onClose={handleClose}
|
|
28
|
+
closeAfterTransition
|
|
29
|
+
slots={{ backdrop: Backdrop }}
|
|
30
|
+
slotProps={{
|
|
31
|
+
backdrop: {
|
|
32
|
+
timeout: 500,
|
|
33
|
+
},
|
|
34
|
+
}}
|
|
35
|
+
>
|
|
36
|
+
<Fade in={open}>
|
|
37
|
+
<Box sx={style}>
|
|
38
|
+
<FlexGrowCol alignItems={'center'}>
|
|
39
|
+
<Avatar sx={{ height: '200px', width: '200px' }}></Avatar>
|
|
40
|
+
<Typography id="transition-modal-description" align="center" sx={{ mt: 2 }}>
|
|
41
|
+
Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
|
|
42
|
+
</Typography>
|
|
43
|
+
</FlexGrowCol>
|
|
44
|
+
</Box>
|
|
45
|
+
</Fade>
|
|
46
|
+
</Modal>
|
|
47
|
+
</div>
|
|
48
|
+
)
|
|
49
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Profile'
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Meta, StoryFn } from '@storybook/react'
|
|
2
|
+
import { TestComponent, TestComponentProps } from './TestComponent'
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line import/no-default-export
|
|
5
|
+
export default {
|
|
6
|
+
title: 'modules/os/TestComponent',
|
|
7
|
+
} as Meta
|
|
8
|
+
|
|
9
|
+
const Template: StoryFn<React.FC<TestComponentProps>> = (props) => {
|
|
10
|
+
return <TestComponent {...props} />
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const Default = Template.bind({})
|
|
14
|
+
Default.args = {}
|
|
15
|
+
|
|
16
|
+
export { Default }
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FlexRow } from '@xylabs/react-flexbox'
|
|
2
|
+
import { PropsWithChildren } from 'react'
|
|
3
|
+
|
|
4
|
+
export interface TestComponentProps extends PropsWithChildren {}
|
|
5
|
+
|
|
6
|
+
export const TestComponent: React.FC<TestComponentProps> = ({ children, ...props }) => {
|
|
7
|
+
return <FlexRow {...props}>{children}</FlexRow>
|
|
8
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Meta, StoryFn } from '@storybook/react'
|
|
2
|
+
import { BrowserRouter } from 'react-router-dom'
|
|
3
|
+
|
|
4
|
+
import { FlexGrowCol } from '@xylabs/react-flexbox'
|
|
5
|
+
import { XyOsClock } from './XyOsClock'
|
|
6
|
+
import { Box, Typography } from '@mui/material'
|
|
7
|
+
const StorybookEntry = {
|
|
8
|
+
argTypes: {},
|
|
9
|
+
component: XyOsClock,
|
|
10
|
+
parameters: {
|
|
11
|
+
docs: {
|
|
12
|
+
page: null,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
title: 'shared/XyOsClock',
|
|
16
|
+
} as Meta<typeof XyOsClock>
|
|
17
|
+
|
|
18
|
+
const Template: StoryFn<typeof XyOsClock> = (args) => (
|
|
19
|
+
<BrowserRouter>
|
|
20
|
+
<FlexGrowCol gap={2} alignItems={'center'} justifyContent={'center'}>
|
|
21
|
+
<FlexGrowCol alignItems={'center'} justifyContent={'center'}>
|
|
22
|
+
<XyOsClock {...args}></XyOsClock>
|
|
23
|
+
</FlexGrowCol>
|
|
24
|
+
</FlexGrowCol>
|
|
25
|
+
</BrowserRouter>
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
const Default = Template.bind({})
|
|
29
|
+
Default.args = {
|
|
30
|
+
clockType:'appbar'
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
36
|
+
//@ts-ignore
|
|
37
|
+
|
|
38
|
+
export { Default }
|
|
39
|
+
|
|
40
|
+
// eslint-disable-next-line import/no-default-export
|
|
41
|
+
export default StorybookEntry
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { BoxProps, Paper, Typography } from '@mui/material'
|
|
2
|
+
import { FlexGrowCol, FlexGrowRow } from '@xylabs/react-flexbox'
|
|
3
|
+
import { format } from 'date-fns'
|
|
4
|
+
import { ReactElement, useEffect, useState } from 'react'
|
|
5
|
+
|
|
6
|
+
interface ClockProps extends BoxProps {
|
|
7
|
+
date: number
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface ComponentSizeProps {
|
|
11
|
+
large: ReactElement<XyOsClockProps>
|
|
12
|
+
medium: ReactElement<XyOsClockProps>
|
|
13
|
+
small: ReactElement<XyOsClockProps>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface ClockComponentsProps {
|
|
17
|
+
components: ComponentSizeProps
|
|
18
|
+
type: 'appbar' | 'widget'
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface XyOsClockProps {
|
|
22
|
+
clockSize: 'small' | 'medium' | 'large'
|
|
23
|
+
clockType: 'appbar' | 'widget'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const XyOsClock: React.FC<XyOsClockProps> = ({ clockType, clockSize, ...props }) => {
|
|
27
|
+
const [date, setDate] = useState(Date.now())
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
const timer = setInterval(() => setDate(Date.now()), 500)
|
|
30
|
+
return function cleanup() {
|
|
31
|
+
clearInterval(timer)
|
|
32
|
+
}
|
|
33
|
+
}, [])
|
|
34
|
+
const ClockComponents: ClockComponentsProps[] = [
|
|
35
|
+
{
|
|
36
|
+
components: {
|
|
37
|
+
large: <LargeAppBarClock date={date} {...props} />,
|
|
38
|
+
medium: <MediumAppBarClock date={date} {...props} />,
|
|
39
|
+
small: <SmallAppBarClock date={date} {...props} />,
|
|
40
|
+
},
|
|
41
|
+
type: 'appbar',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
components: {
|
|
45
|
+
large: <LargeWidgetClock date={date} {...props} />,
|
|
46
|
+
medium: <MediumWidgetClock date={date} {...props} />,
|
|
47
|
+
small: <SmallWidgetClock date={date} {...props} />,
|
|
48
|
+
},
|
|
49
|
+
type: 'widget',
|
|
50
|
+
},
|
|
51
|
+
]
|
|
52
|
+
return ClockComponents.find((component) => component.type === clockType)?.components[`${clockSize}`]
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export const SmallAppBarClock: React.FC<ClockProps> = ({ date }) => {
|
|
56
|
+
return (
|
|
57
|
+
<FlexGrowRow gap={1}>
|
|
58
|
+
<Typography variant="body1">{format(date, 'E MMM dd')}</Typography>
|
|
59
|
+
<Typography variant="body1">{format(date, 'p')}</Typography>
|
|
60
|
+
</FlexGrowRow>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export const MediumAppBarClock: React.FC<ClockProps> = ({ date }) => {
|
|
65
|
+
return (
|
|
66
|
+
<FlexGrowRow gap={1}>
|
|
67
|
+
<Typography variant="body1">{format(date, 'E MMM dd')}</Typography>
|
|
68
|
+
<Typography variant="body1">{format(date, 'pp')}</Typography>
|
|
69
|
+
</FlexGrowRow>
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export const LargeAppBarClock: React.FC<ClockProps> = ({ date }) => {
|
|
74
|
+
return (
|
|
75
|
+
<FlexGrowRow gap={1}>
|
|
76
|
+
<Typography variant="body1">{format(date, 'EEEE MMM dd, yyy')}</Typography>
|
|
77
|
+
<Typography variant="body1">{format(date, 'ppp')}</Typography>
|
|
78
|
+
</FlexGrowRow>
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export const SmallWidgetClock: React.FC<ClockProps> = ({ date }) => {
|
|
83
|
+
return (
|
|
84
|
+
<Paper sx={{ padding: 1 }}>
|
|
85
|
+
<FlexGrowCol>
|
|
86
|
+
<Typography variant="h6">{format(date, 'p')}</Typography>
|
|
87
|
+
<Typography variant="body2">{format(date, 'E MMM dd')}</Typography>
|
|
88
|
+
</FlexGrowCol>
|
|
89
|
+
</Paper>
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export const MediumWidgetClock: React.FC<ClockProps> = ({ date }) => {
|
|
94
|
+
return (
|
|
95
|
+
<Paper sx={{ padding: 1 }}>
|
|
96
|
+
<FlexGrowCol>
|
|
97
|
+
<Typography variant="h6">{format(date, 'pp')}</Typography>
|
|
98
|
+
<Typography variant="body2">{format(date, 'E MMM dd, yyyy')}</Typography>
|
|
99
|
+
</FlexGrowCol>
|
|
100
|
+
</Paper>
|
|
101
|
+
)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export const LargeWidgetClock: React.FC<ClockProps> = ({ date }) => {
|
|
105
|
+
return (
|
|
106
|
+
<Paper sx={{ padding: 1 }}>
|
|
107
|
+
<FlexGrowCol>
|
|
108
|
+
<Typography variant="body2">{format(date, 'EEEE')}</Typography>
|
|
109
|
+
<Typography variant="h5">{format(date, 'pp')}</Typography>
|
|
110
|
+
<Typography variant="body1">{format(date, 'MMM dd, yyyy')}</Typography>
|
|
111
|
+
</FlexGrowCol>
|
|
112
|
+
</Paper>
|
|
113
|
+
)
|
|
114
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './XyOsClock'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TestComponent'
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components'
|