trepur_components 2.3.4 → 2.3.5
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/archive/theme.ts +1 -1
- package/lib/components/index.d.ts +1 -1
- package/lib/styles/base.css +1 -0
- package/package.json +1 -1
- package/postcss.config.js +8 -0
- package/src/components/index.ts +3 -3
- package/src/styles/base.css +1 -0
- package/tsconfig.json +1 -1
- package/storybook-build/assets/Accordion.stories-Cn994N1H.js +0 -103
- package/storybook-build/assets/AlertBar.stories-BkzNXFBh.js +0 -202
- package/storybook-build/assets/Avatar.stories-CpH6xVwM.js +0 -418
- package/storybook-build/assets/Color-6VNJS4EI-DQV2onvt.js +0 -1378
- package/storybook-build/assets/Colours-r29qjFlW.js +0 -324
- package/storybook-build/assets/DocsRenderer-NNNQARDV-OgWasCIs.js +0 -44
- package/storybook-build/assets/Introduction-Bs1PgnBZ.js +0 -40
- package/storybook-build/assets/WithTooltip-V3YHNWJZ-vi2V5TOO.js +0 -15
- package/storybook-build/assets/_commonjsHelpers-LQfde5yM.js +0 -35
- package/storybook-build/assets/axe-DnFZVv9V.js +0 -32561
- package/storybook-build/assets/chunk-EIRT5I3Z-DFD8udmD.js +0 -480
- package/storybook-build/assets/context-CIRBAiUz.js +0 -20
- package/storybook-build/assets/controls-DJSGrQKd.js +0 -23
- package/storybook-build/assets/entry-preview-DmlPV4-3.js +0 -41
- package/storybook-build/assets/entry-preview-docs-D46Drugi.js +0 -11861
- package/storybook-build/assets/formatter-SWP5E3XI-BWIasvKP.js +0 -14427
- package/storybook-build/assets/iframe-Dzzzanqi.js +0 -144
- package/storybook-build/assets/index-0FT4HXk-.js +0 -7222
- package/storybook-build/assets/index-B9Tccxv4.js +0 -107
- package/storybook-build/assets/index-BdOSk9or.js +0 -41
- package/storybook-build/assets/index-CU7cYjZD.js +0 -9604
- package/storybook-build/assets/index-Clz-aGG3.js +0 -39
- package/storybook-build/assets/index-CpyNLP69.js +0 -63
- package/storybook-build/assets/index-DM9bPmif.js +0 -319
- package/storybook-build/assets/index-ex9_VrIg.js +0 -3734
- package/storybook-build/assets/jsx-runtime-D2-sc1j1.js +0 -35
- package/storybook-build/assets/preview-3kSipVgK.js +0 -430
- package/storybook-build/assets/preview-B4rAxPmB.js +0 -27
- package/storybook-build/assets/preview-BMkwWyrh.js +0 -2920
- package/storybook-build/assets/preview-BeQelhbu.js +0 -204
- package/storybook-build/assets/preview-BiG-rflf.js +0 -2444
- package/storybook-build/assets/preview-BiYUJ7TP.js +0 -22
- package/storybook-build/assets/preview-C4ItOQzM.js +0 -34
- package/storybook-build/assets/preview-CWyhKACi.css +0 -886
- package/storybook-build/assets/preview-CtOV68TG.js +0 -10
- package/storybook-build/assets/preview-De9E9xaR.js +0 -140
- package/storybook-build/assets/preview-bL4x2zrN.js +0 -99
- package/storybook-build/assets/preview-gxqyGMHu.js +0 -323
- package/storybook-build/assets/react-18-B-gfo82w.js +0 -29
- package/storybook-build/assets/syntaxhighlighter-B5GMVT5T-DrY_Dc6-.js +0 -15
- package/storybook-build/favicon.svg +0 -7
- package/storybook-build/iframe.html +0 -458
- package/storybook-build/index.html +0 -163
- package/storybook-build/index.json +0 -1
- package/storybook-build/preview-stats.json +0 -172
- package/storybook-build/project.json +0 -1
- package/storybook-build/sb-addons/a11y-9/manager-bundle.js +0 -3
- package/storybook-build/sb-addons/a11y-9/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/essentials-actions-2/manager-bundle.js +0 -3
- package/storybook-build/sb-addons/essentials-actions-2/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/essentials-backgrounds-3/manager-bundle.js +0 -12
- package/storybook-build/sb-addons/essentials-backgrounds-3/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/essentials-controls-1/manager-bundle.js +0 -63
- package/storybook-build/sb-addons/essentials-controls-1/manager-bundle.js.LEGAL.txt +0 -18
- package/storybook-build/sb-addons/essentials-measure-6/manager-bundle.js +0 -3
- package/storybook-build/sb-addons/essentials-measure-6/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/essentials-outline-7/manager-bundle.js +0 -3
- package/storybook-build/sb-addons/essentials-outline-7/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/essentials-toolbars-5/manager-bundle.js +0 -3
- package/storybook-build/sb-addons/essentials-toolbars-5/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/essentials-viewport-4/manager-bundle.js +0 -3
- package/storybook-build/sb-addons/essentials-viewport-4/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/interactions-8/manager-bundle.js +0 -12
- package/storybook-build/sb-addons/interactions-8/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/links-0/manager-bundle.js +0 -3
- package/storybook-build/sb-addons/links-0/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/storybook-12/manager-bundle.js +0 -151
- package/storybook-build/sb-addons/storybook-12/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/storybook-react-i18next-11/manager-bundle.js +0 -3
- package/storybook-build/sb-addons/storybook-react-i18next-11/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/themes-10/register-bundle.js +0 -5
- package/storybook-build/sb-addons/themes-10/register-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-common-assets/fonts.css +0 -31
- package/storybook-build/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-build/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-build/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-build/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-build/sb-manager/WithTooltip-V3YHNWJZ-TRLNWEGW.js +0 -1
- package/storybook-build/sb-manager/chunk-4IYAVH3S.js +0 -348
- package/storybook-build/sb-manager/chunk-CXYKRFSY.js +0 -9
- package/storybook-build/sb-manager/chunk-KZYAAUOR.js +0 -406
- package/storybook-build/sb-manager/chunk-LVLAH4SI.js +0 -7
- package/storybook-build/sb-manager/chunk-ZEU7PDD3.js +0 -1
- package/storybook-build/sb-manager/formatter-SWP5E3XI-7BGIK6BL.js +0 -156
- package/storybook-build/sb-manager/globals-module-info.js +0 -1
- package/storybook-build/sb-manager/globals.js +0 -1
- package/storybook-build/sb-manager/index.js +0 -1
- package/storybook-build/sb-manager/runtime.js +0 -1
- package/storybook-build/sb-manager/syntaxhighlighter-B5GMVT5T-EA5ASEYD.js +0 -1
- package/storybook-build/sb-preview/globals.js +0 -1
- package/storybook-build/sb-preview/runtime.js +0 -112
- package/storybook-build/src/components/Accordion/Accordion.stories.d.ts +0 -94
- package/storybook-build/src/components/Accordion/index.d.ts +0 -9
- package/storybook-build/src/components/AlertBar/AlertBar.stories.d.ts +0 -162
- package/storybook-build/src/components/AlertBar/index.d.ts +0 -13
- package/storybook-build/src/components/Avatar/Avatar.stories.d.ts +0 -44
- package/storybook-build/src/components/Avatar/index.d.ts +0 -4
- package/storybook-build/src/components/index.d.ts +0 -7
- package/storybook-build/src/index.d.ts +0 -1
- package/storybook-build/src/utils/controls.d.ts +0 -36
- package/storybook-build/src/utils/matchMedia.d.ts +0 -2
- package/storybook-build/src/utils/screens.d.ts +0 -7
- package/storybook-build/src/utils/theme.d.ts +0 -3
- package/storybook-build/stories.json +0 -1
- package/storybook-build/styles/base.css +0 -116
|
@@ -1,418 +0,0 @@
|
|
|
1
|
-
var _a, _b, _c;
|
|
2
|
-
import { i as idAndClassName } from "./controls-DJSGrQKd.js";
|
|
3
|
-
import { j as jsxRuntimeExports } from "./jsx-runtime-D2-sc1j1.js";
|
|
4
|
-
import { r as reactExports } from "./index-DM9bPmif.js";
|
|
5
|
-
import "./_commonjsHelpers-LQfde5yM.js";
|
|
6
|
-
let Snap;
|
|
7
|
-
if (typeof window !== "undefined") {
|
|
8
|
-
Snap = require("snapsvg-cjs");
|
|
9
|
-
}
|
|
10
|
-
const Avatar = () => {
|
|
11
|
-
const [s, setS] = reactExports.useState(null);
|
|
12
|
-
let rightEyeWhite, rightEyePupil, leftEyeWhite, leftEyePupil, avatar, armless, torso, face, legs, rightArm, leftArm, rightHand, leftHand, arms, straps, hands, leftThigh, rightThigh, leftShoe, rightShoe;
|
|
13
|
-
const leftShoulderRotationPoints = "175, 202";
|
|
14
|
-
const rightShoulderRotationPoints = "94, 202";
|
|
15
|
-
const svgContainerHeight = 400;
|
|
16
|
-
const svgContainerWidth = 265;
|
|
17
|
-
const skinColour = "#FFCC9A";
|
|
18
|
-
const zipColour = "#315107";
|
|
19
|
-
const eyeColour = "#1389BF";
|
|
20
|
-
const hairColour = "#F1B452";
|
|
21
|
-
const beardColour = "#F1B452";
|
|
22
|
-
const rucksackColour = "#072765";
|
|
23
|
-
const trouserColour = "#D3D3D3";
|
|
24
|
-
const jacketColour = "#416E0A";
|
|
25
|
-
const mouthColour = "#DC7144";
|
|
26
|
-
const shoeColour = "#000000";
|
|
27
|
-
const eyebrowColour = "#F1B452";
|
|
28
|
-
const noseColour = "#F1B452";
|
|
29
|
-
const createAvatar = (s2, callBack) => {
|
|
30
|
-
var _a2, _b2, _c2, _d;
|
|
31
|
-
if (typeof window === "undefined")
|
|
32
|
-
return;
|
|
33
|
-
const head = s2 == null ? void 0 : s2.rect(103, 90, 68, 87, 50).attr({ fill: skinColour });
|
|
34
|
-
const leftEyebrow = s2 == null ? void 0 : s2.rect(146, 122, 12, 3, 2);
|
|
35
|
-
const rightEyebrow = s2 == null ? void 0 : s2.rect(115, 122, 12, 3, 2);
|
|
36
|
-
leftEyeWhite = s2 == null ? void 0 : s2.ellipse(152, 132, 6, 4);
|
|
37
|
-
rightEyeWhite = s2 == null ? void 0 : s2.ellipse(121, 132, 6, 4);
|
|
38
|
-
leftEyePupil = s2 == null ? void 0 : s2.ellipse(152, 132, 3, 3).attr({ fill: eyeColour });
|
|
39
|
-
rightEyePupil = s2 == null ? void 0 : s2.ellipse(121, 132, 3, 3).attr({ fill: eyeColour });
|
|
40
|
-
const leftEye = s2 == null ? void 0 : s2.group(leftEyeWhite, leftEyePupil);
|
|
41
|
-
const rightEye = s2 == null ? void 0 : s2.group(rightEyeWhite, rightEyePupil);
|
|
42
|
-
const outerBeard = s2 == null ? void 0 : s2.rect(103, 90, 68, 87, 50).attr({ fill: "white" });
|
|
43
|
-
const innerBeard = s2 == null ? void 0 : s2.rect(106, 105, 62, 62, 50);
|
|
44
|
-
const beardGroup = s2 == null ? void 0 : s2.group(outerBeard, innerBeard);
|
|
45
|
-
const beard = s2 == null ? void 0 : s2.rect(103, 140, 68, 60).attr({
|
|
46
|
-
mask: beardGroup,
|
|
47
|
-
fill: beardColour,
|
|
48
|
-
opacity: 0.6
|
|
49
|
-
});
|
|
50
|
-
const outerHair = s2 == null ? void 0 : s2.rect(103, 90, 68, 60, 25).attr({ fill: "white" });
|
|
51
|
-
const innerHair = s2 == null ? void 0 : s2.rect(109, 105, 56, 40, 10);
|
|
52
|
-
const hairGroup = s2 == null ? void 0 : s2.group(outerHair, innerHair);
|
|
53
|
-
const baseHair = s2 == null ? void 0 : s2.rect(103, 90, 68, 40).attr({
|
|
54
|
-
mask: hairGroup,
|
|
55
|
-
fill: hairColour
|
|
56
|
-
});
|
|
57
|
-
const hairLevel1 = s2 == null ? void 0 : s2.rect(113, 88, 50, 16, 10).attr({ fill: hairColour }).transform("r0");
|
|
58
|
-
const hair = s2 == null ? void 0 : s2.group(baseHair, hairLevel1);
|
|
59
|
-
const outerNose = (_a2 = s2 == null ? void 0 : s2.rect(129, 140, 12, 10, 30)) == null ? void 0 : _a2.attr({ fill: "white" });
|
|
60
|
-
const innerNose = s2 == null ? void 0 : s2.rect(130, 142, 10, 12, 30);
|
|
61
|
-
const noseGroup = s2 == null ? void 0 : s2.group(outerNose, innerNose);
|
|
62
|
-
const nose = (_b2 = s2 == null ? void 0 : s2.rect(129, 140, 12, 10)) == null ? void 0 : _b2.attr({
|
|
63
|
-
mask: noseGroup,
|
|
64
|
-
fill: noseColour
|
|
65
|
-
});
|
|
66
|
-
const leftEar = (_c2 = s2 == null ? void 0 : s2.circle(103, 135, 5)) == null ? void 0 : _c2.attr({ fill: "white" });
|
|
67
|
-
const leftEarMask = s2 == null ? void 0 : s2.rect(89, 120, 15, 30).attr({
|
|
68
|
-
mask: leftEar,
|
|
69
|
-
fill: skinColour
|
|
70
|
-
}).transform("r-2");
|
|
71
|
-
const rightEar = (_d = s2 == null ? void 0 : s2.circle(171, 135, 5)) == null ? void 0 : _d.attr({ fill: "white" });
|
|
72
|
-
const rightEarMask = s2 == null ? void 0 : s2.rect(170, 120, 15, 30).attr({
|
|
73
|
-
mask: rightEar,
|
|
74
|
-
fill: skinColour
|
|
75
|
-
}).transform("r2");
|
|
76
|
-
const body = s2 == null ? void 0 : s2.rect(100, 188, 73, 105, 16, 16).attr({ fill: jacketColour });
|
|
77
|
-
const hood = s2 == null ? void 0 : s2.ellipse(136, 182, 24, 10).attr({ fill: jacketColour });
|
|
78
|
-
const rightShoulder = s2 == null ? void 0 : s2.rect(87, 190, 27, 14, 10);
|
|
79
|
-
rightArm = s2 == null ? void 0 : s2.rect(84, 195, 16, 90, 10, 10);
|
|
80
|
-
const leftShoulder = s2 == null ? void 0 : s2.rect(155, 190, 27, 14, 10);
|
|
81
|
-
leftArm = s2 == null ? void 0 : s2.rect(170, 195, 16, 90, 10, 10);
|
|
82
|
-
leftHand = s2 == null ? void 0 : s2.circle(178, 278, 8);
|
|
83
|
-
rightHand = s2 == null ? void 0 : s2.circle(92, 278, 8);
|
|
84
|
-
const wasteBand = s2 == null ? void 0 : s2.rect(98, 277, 74, 33, 0, 0);
|
|
85
|
-
leftThigh = s2 == null ? void 0 : s2.rect(142, 300, 30, 90, 0, 0);
|
|
86
|
-
rightThigh = s2 == null ? void 0 : s2.rect(98, 300, 30, 90, 0, 0);
|
|
87
|
-
const bag = s2 == null ? void 0 : s2.rect(99, 180, 74, 78, 10);
|
|
88
|
-
const rightStrap = s2 == null ? void 0 : s2.rect(101, 185, 5, 100, 10).transform("r4.5");
|
|
89
|
-
const leftStrap = s2 == null ? void 0 : s2.rect(163, 185, 5, 100, 10).transform("r-4.5");
|
|
90
|
-
const mouth = s2 == null ? void 0 : s2.circle(136, 155, 10).attr({ fill: "white" });
|
|
91
|
-
const mouthCutOff = s2 == null ? void 0 : s2.rect(120, 155, 30, 15).attr({ fill: mouthColour });
|
|
92
|
-
const leftShoeTop = s2 == null ? void 0 : s2.rect(142, 370, 30, 20, 10);
|
|
93
|
-
const leftShoeSole = s2 == null ? void 0 : s2.rect(142, 378, 30, 12);
|
|
94
|
-
const rightShoeTop = s2 == null ? void 0 : s2.rect(98, 370, 30, 20, 10);
|
|
95
|
-
const rightShoeSole = s2 == null ? void 0 : s2.rect(98, 378, 30, 12);
|
|
96
|
-
const mainZip = s2 == null ? void 0 : s2.rect(135, 199, 3, 94);
|
|
97
|
-
const leftZip = s2 == null ? void 0 : s2.rect(141, 188, 2, 15).transform("r44.5");
|
|
98
|
-
const rightZip = s2 == null ? void 0 : s2.rect(130, 188, 2, 15).transform("r-44.5");
|
|
99
|
-
const centerNeck = s2 == null ? void 0 : s2.rect(128, 170, 17, 21);
|
|
100
|
-
const leftNeck = s2 == null ? void 0 : s2.rect(139, 181, 10, 10).transform("r-33");
|
|
101
|
-
const rightNeck = s2 == null ? void 0 : s2.rect(124, 181, 10, 10).transform("r33");
|
|
102
|
-
const frontNeck = s2 == null ? void 0 : s2.rect(129, 182, 15, 15).transform("r45");
|
|
103
|
-
const neck = s2 == null ? void 0 : s2.group(centerNeck, leftNeck, rightNeck, frontNeck).attr({ fill: skinColour });
|
|
104
|
-
const zip = s2 == null ? void 0 : s2.group(mainZip, leftZip, rightZip).attr({ fill: zipColour });
|
|
105
|
-
leftShoe = s2 == null ? void 0 : s2.group(leftShoeTop, leftShoeSole);
|
|
106
|
-
rightShoe = s2 == null ? void 0 : s2.group(rightShoeTop, rightShoeSole);
|
|
107
|
-
const rucksack = s2 == null ? void 0 : s2.group(leftStrap, rightStrap, bag).attr({ fill: rucksackColour });
|
|
108
|
-
const eyes = s2 == null ? void 0 : s2.group(leftEye, rightEye).attr({ fill: "white" });
|
|
109
|
-
const eyebrows = s2 == null ? void 0 : s2.group(leftEyebrow, rightEyebrow).attr({ fill: eyebrowColour });
|
|
110
|
-
const shoes = s2 == null ? void 0 : s2.group(leftShoe, rightShoe).attr({ fill: shoeColour });
|
|
111
|
-
const ears = s2 == null ? void 0 : s2.group(leftEarMask, rightEarMask);
|
|
112
|
-
arms = s2 == null ? void 0 : s2.group(rightShoulder, leftShoulder, leftArm, rightArm).attr({ fill: jacketColour });
|
|
113
|
-
hands = s2 == null ? void 0 : s2.group(leftHand, rightHand).attr({ fill: skinColour });
|
|
114
|
-
straps = s2 == null ? void 0 : s2.group(leftStrap, rightStrap).attr({ fill: rucksackColour });
|
|
115
|
-
face = s2 == null ? void 0 : s2.group(
|
|
116
|
-
head,
|
|
117
|
-
eyes,
|
|
118
|
-
eyebrows,
|
|
119
|
-
nose,
|
|
120
|
-
mouth,
|
|
121
|
-
mouthCutOff,
|
|
122
|
-
ears,
|
|
123
|
-
hair,
|
|
124
|
-
beard
|
|
125
|
-
);
|
|
126
|
-
torso = s2 == null ? void 0 : s2.group(rucksack, hood, body, neck, zip);
|
|
127
|
-
legs = s2 == null ? void 0 : s2.group(leftThigh, rightThigh, wasteBand, shoes).attr({ fill: trouserColour });
|
|
128
|
-
armless = s2 == null ? void 0 : s2.group(legs, torso, face);
|
|
129
|
-
avatar = s2 == null ? void 0 : s2.group(armless, arms, straps, hands);
|
|
130
|
-
mouthCutOff == null ? void 0 : mouthCutOff.attr({
|
|
131
|
-
mask: mouth
|
|
132
|
-
});
|
|
133
|
-
callBack(avatar);
|
|
134
|
-
};
|
|
135
|
-
const nextFrame = (s2, frameArray, frame) => {
|
|
136
|
-
if (frame >= frameArray.length) {
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
Snap.animate(
|
|
140
|
-
frameArray[frame].from,
|
|
141
|
-
frameArray[frame].to,
|
|
142
|
-
frameArray[frame].funct,
|
|
143
|
-
frameArray[frame].dur,
|
|
144
|
-
null,
|
|
145
|
-
nextFrame.bind(null, Snap, frameArray, frame + 1)
|
|
146
|
-
);
|
|
147
|
-
};
|
|
148
|
-
const rightWave = [
|
|
149
|
-
{
|
|
150
|
-
funct: function(val) {
|
|
151
|
-
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
152
|
-
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
153
|
-
},
|
|
154
|
-
from: 0,
|
|
155
|
-
to: 170,
|
|
156
|
-
dur: 100
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
funct: function(val) {
|
|
160
|
-
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
161
|
-
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
162
|
-
},
|
|
163
|
-
from: 170,
|
|
164
|
-
to: 120,
|
|
165
|
-
dur: 100
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
funct: function(val) {
|
|
169
|
-
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
170
|
-
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
171
|
-
},
|
|
172
|
-
from: 120,
|
|
173
|
-
to: 170,
|
|
174
|
-
dur: 100
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
funct: function(val) {
|
|
178
|
-
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
179
|
-
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
180
|
-
},
|
|
181
|
-
from: 170,
|
|
182
|
-
to: 120,
|
|
183
|
-
dur: 100
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
funct: function(val) {
|
|
187
|
-
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
188
|
-
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
189
|
-
},
|
|
190
|
-
from: 120,
|
|
191
|
-
to: 170,
|
|
192
|
-
dur: 100
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
funct: function(val) {
|
|
196
|
-
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
197
|
-
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
198
|
-
},
|
|
199
|
-
from: 170,
|
|
200
|
-
to: 120,
|
|
201
|
-
dur: 100
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
funct: function(val) {
|
|
205
|
-
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
206
|
-
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
207
|
-
},
|
|
208
|
-
from: 120,
|
|
209
|
-
to: 0,
|
|
210
|
-
dur: 100
|
|
211
|
-
}
|
|
212
|
-
];
|
|
213
|
-
const leftWave = [
|
|
214
|
-
{
|
|
215
|
-
funct: function(val) {
|
|
216
|
-
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
217
|
-
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
218
|
-
},
|
|
219
|
-
from: 0,
|
|
220
|
-
to: -150,
|
|
221
|
-
dur: 100
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
funct: function(val) {
|
|
225
|
-
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
226
|
-
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
227
|
-
},
|
|
228
|
-
from: -150,
|
|
229
|
-
to: -120,
|
|
230
|
-
dur: 100
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
funct: function(val) {
|
|
234
|
-
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
235
|
-
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
236
|
-
},
|
|
237
|
-
from: -120,
|
|
238
|
-
to: -150,
|
|
239
|
-
dur: 100
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
funct: function(val) {
|
|
243
|
-
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
244
|
-
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
245
|
-
},
|
|
246
|
-
from: -150,
|
|
247
|
-
to: -120,
|
|
248
|
-
dur: 100
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
funct: function(val) {
|
|
252
|
-
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
253
|
-
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
254
|
-
},
|
|
255
|
-
from: -120,
|
|
256
|
-
to: -150,
|
|
257
|
-
dur: 100
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
funct: function(val) {
|
|
261
|
-
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
262
|
-
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
263
|
-
},
|
|
264
|
-
from: -150,
|
|
265
|
-
to: -120,
|
|
266
|
-
dur: 100
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
funct: function(val) {
|
|
270
|
-
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
271
|
-
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
272
|
-
},
|
|
273
|
-
from: -120,
|
|
274
|
-
to: 0,
|
|
275
|
-
dur: 100
|
|
276
|
-
}
|
|
277
|
-
];
|
|
278
|
-
const jump = () => {
|
|
279
|
-
torso.animate({ transform: "t0,20" }, 500);
|
|
280
|
-
arms.animate({ transform: "t0,20" }, 500);
|
|
281
|
-
straps.animate({ transform: "t0,20" }, 500);
|
|
282
|
-
hands.animate({ transform: "t0,20" }, 500);
|
|
283
|
-
face.animate({ transform: "t0,20" }, 500, function() {
|
|
284
|
-
face.animate({ transform: "t0,-70" }, 200);
|
|
285
|
-
torso.animate({ transform: "t0,-70" }, 200);
|
|
286
|
-
arms.animate({ transform: "t0,-70" }, 200);
|
|
287
|
-
straps.animate({ transform: "t0,-70" }, 200);
|
|
288
|
-
hands.animate({ transform: "t0,-70" }, 200);
|
|
289
|
-
legs.animate({ transform: "t0,-70" }, 200, function() {
|
|
290
|
-
face.animate({ transform: "t0,0" }, 200);
|
|
291
|
-
torso.animate({ transform: "t0,0" }, 200);
|
|
292
|
-
arms.animate({ transform: "t0,0" }, 200);
|
|
293
|
-
straps.animate({ transform: "t0,0" }, 200);
|
|
294
|
-
hands.animate({ transform: "t0,0" }, 200);
|
|
295
|
-
legs.animate({ transform: "t0,0" }, 200);
|
|
296
|
-
});
|
|
297
|
-
});
|
|
298
|
-
};
|
|
299
|
-
const eyesLeft = (duration) => {
|
|
300
|
-
leftEyePupil.animate({ transform: "t2,0" }, duration);
|
|
301
|
-
rightEyePupil.animate({ transform: "t2,0" }, duration);
|
|
302
|
-
};
|
|
303
|
-
const eyesRight = (duration) => {
|
|
304
|
-
leftEyePupil.animate({ transform: "t-2,0" }, duration);
|
|
305
|
-
rightEyePupil.animate({ transform: "t-2,0" }, duration);
|
|
306
|
-
};
|
|
307
|
-
const eyesCenter = (duration) => {
|
|
308
|
-
leftEyePupil.animate({ transform: "t0,0" }, duration);
|
|
309
|
-
rightEyePupil.animate({ transform: "t0,0" }, duration);
|
|
310
|
-
};
|
|
311
|
-
const blink = (times) => {
|
|
312
|
-
if (times < 1)
|
|
313
|
-
return;
|
|
314
|
-
[...Array(times)].forEach((_) => {
|
|
315
|
-
leftEyeWhite == null ? void 0 : leftEyeWhite.animate({ ry: 0 }, 120);
|
|
316
|
-
leftEyePupil.animate({ ry: 0 }, 120);
|
|
317
|
-
rightEyeWhite == null ? void 0 : rightEyeWhite.animate({ ry: 0 }, 120);
|
|
318
|
-
rightEyePupil.animate({ ry: 0 }, 120, function() {
|
|
319
|
-
leftEyeWhite == null ? void 0 : leftEyeWhite.animate({ ry: 4 }, 200);
|
|
320
|
-
leftEyePupil == null ? void 0 : leftEyePupil.animate({ ry: 3 }, 200);
|
|
321
|
-
rightEyeWhite == null ? void 0 : rightEyeWhite.animate({ ry: 4 }, 200);
|
|
322
|
-
rightEyePupil == null ? void 0 : rightEyePupil.animate({ ry: 3 }, 200, () => {
|
|
323
|
-
blink(times - 1);
|
|
324
|
-
});
|
|
325
|
-
});
|
|
326
|
-
});
|
|
327
|
-
};
|
|
328
|
-
const animate = (s2, animation) => {
|
|
329
|
-
nextFrame(s2, animation, 0);
|
|
330
|
-
};
|
|
331
|
-
reactExports.useEffect(() => {
|
|
332
|
-
if (typeof window === "undefined")
|
|
333
|
-
return;
|
|
334
|
-
if (Snap) {
|
|
335
|
-
setS(Snap("#svg"));
|
|
336
|
-
}
|
|
337
|
-
const makeBlinkHappen = () => {
|
|
338
|
-
const randNum = Math.floor(Math.random() * 2) + 1;
|
|
339
|
-
blink(randNum);
|
|
340
|
-
};
|
|
341
|
-
const loadActions = () => {
|
|
342
|
-
if (!avatar)
|
|
343
|
-
return;
|
|
344
|
-
setTimeout(() => {
|
|
345
|
-
animate(s, leftWave);
|
|
346
|
-
}, 1e3);
|
|
347
|
-
setInterval(makeBlinkHappen, 3500);
|
|
348
|
-
rightArm == null ? void 0 : rightArm.click(() => animate(s, rightWave));
|
|
349
|
-
rightHand == null ? void 0 : rightHand.click(() => animate(s, rightWave));
|
|
350
|
-
leftArm == null ? void 0 : leftArm.click(() => animate(s, leftWave));
|
|
351
|
-
leftHand == null ? void 0 : leftHand.click(() => animate(s, leftWave));
|
|
352
|
-
armless == null ? void 0 : armless.click(jump);
|
|
353
|
-
leftArm == null ? void 0 : leftArm.hover(() => {
|
|
354
|
-
eyesLeft(200);
|
|
355
|
-
});
|
|
356
|
-
leftThigh == null ? void 0 : leftThigh.hover(() => {
|
|
357
|
-
eyesLeft(200);
|
|
358
|
-
});
|
|
359
|
-
leftShoe == null ? void 0 : leftShoe.hover(() => {
|
|
360
|
-
eyesLeft(200);
|
|
361
|
-
});
|
|
362
|
-
torso == null ? void 0 : torso.hover(() => {
|
|
363
|
-
eyesCenter(200);
|
|
364
|
-
});
|
|
365
|
-
rightArm == null ? void 0 : rightArm.hover(() => {
|
|
366
|
-
eyesRight(200);
|
|
367
|
-
});
|
|
368
|
-
rightThigh == null ? void 0 : rightThigh.hover(() => {
|
|
369
|
-
eyesRight(200);
|
|
370
|
-
});
|
|
371
|
-
rightShoe == null ? void 0 : rightShoe.hover(() => {
|
|
372
|
-
eyesRight(200);
|
|
373
|
-
});
|
|
374
|
-
};
|
|
375
|
-
createAvatar(s, loadActions);
|
|
376
|
-
}, [s]);
|
|
377
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
378
|
-
"svg",
|
|
379
|
-
{
|
|
380
|
-
id: "svg",
|
|
381
|
-
className: "mx-auto",
|
|
382
|
-
height: `${svgContainerHeight.toString()}px`,
|
|
383
|
-
width: `${svgContainerWidth.toString()}px`,
|
|
384
|
-
version: "1.1",
|
|
385
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
386
|
-
}
|
|
387
|
-
);
|
|
388
|
-
};
|
|
389
|
-
try {
|
|
390
|
-
Avatar.displayName = "Avatar";
|
|
391
|
-
Avatar.__docgenInfo = { "description": "", "displayName": "Avatar", "props": {} };
|
|
392
|
-
} catch (__react_docgen_typescript_loader_error) {
|
|
393
|
-
}
|
|
394
|
-
const meta = {
|
|
395
|
-
title: "Components/Avatar",
|
|
396
|
-
component: Avatar,
|
|
397
|
-
argTypes: {
|
|
398
|
-
...idAndClassName
|
|
399
|
-
},
|
|
400
|
-
args: {}
|
|
401
|
-
};
|
|
402
|
-
const Default = {};
|
|
403
|
-
Default.parameters = {
|
|
404
|
-
...Default.parameters,
|
|
405
|
-
docs: {
|
|
406
|
-
...(_a = Default.parameters) == null ? void 0 : _a.docs,
|
|
407
|
-
source: {
|
|
408
|
-
originalSource: "{}",
|
|
409
|
-
...(_c = (_b = Default.parameters) == null ? void 0 : _b.docs) == null ? void 0 : _c.source
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
};
|
|
413
|
-
const __namedExportsOrder = ["Default"];
|
|
414
|
-
export {
|
|
415
|
-
Default,
|
|
416
|
-
__namedExportsOrder,
|
|
417
|
-
meta as default
|
|
418
|
-
};
|