@lizzelabs/react-harmony 1.0.0 → 1.1.0
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/animations-B09mMqCx.js +24 -0
- package/dist/animations.es.js +5 -0
- package/dist/components/animations/animations.d.ts +5 -0
- package/dist/components/animations/animations.hook.d.ts +2 -0
- package/dist/components/animations/animations.types.d.ts +16 -0
- package/dist/components/animations/index.d.ts +3 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/media/index.d.ts +3 -0
- package/dist/components/media/media.d.ts +5 -0
- package/dist/components/media/media.hook.d.ts +2 -0
- package/dist/components/media/media.types.d.ts +15 -0
- package/dist/components/piece/index.d.ts +3 -0
- package/dist/components/piece/piece.d.ts +6 -0
- package/dist/components/piece/piece.hook.d.ts +5 -0
- package/dist/components/piece/piece.static.d.ts +2 -0
- package/dist/components/piece/piece.types.d.ts +37 -0
- package/dist/components/piece/piece.utils.d.ts +7 -0
- package/dist/components/piece-provider/index.d.ts +3 -0
- package/dist/components/piece-provider/piece-provider.context.d.ts +2 -0
- package/dist/components/piece-provider/piece-provider.d.ts +4 -0
- package/dist/components/piece-provider/piece-provider.hook.d.ts +2 -0
- package/dist/components/piece-provider/piece-provider.types.d.ts +24 -0
- package/dist/components/screen/index.d.ts +3 -0
- package/dist/components/screen/screen.d.ts +4 -0
- package/dist/components/screen/screen.hook.d.ts +4 -0
- package/dist/components/screen/screen.types.d.ts +15 -0
- package/dist/components/scrollable/index.d.ts +3 -0
- package/dist/components/scrollable/scrollable.d.ts +6 -0
- package/dist/components/scrollable/scrollable.hook.d.ts +5 -0
- package/dist/components/scrollable/scrollable.styles.d.ts +14 -0
- package/dist/components/scrollable/scrollable.types.d.ts +12 -0
- package/dist/components/text/index.d.ts +3 -0
- package/dist/components/text/text.d.ts +4 -0
- package/dist/components/text/text.hook.d.ts +5 -0
- package/dist/components/text/text.types.d.ts +3 -0
- package/dist/components.es.js +24 -0
- package/dist/fillObjectWithDefaults-AoLKqRgC.js +13 -0
- package/dist/hocs/index.d.ts +1 -0
- package/dist/hocs/withPieceAsContainer.d.ts +7 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.es.js +36 -0
- package/dist/media-C5LK6pq4.js +48 -0
- package/dist/media.es.js +5 -0
- package/dist/piece-CqJl-F6G.js +239 -0
- package/dist/piece-provider-DTglah_F.js +1388 -0
- package/dist/piece-provider.es.js +5 -0
- package/dist/piece.es.js +5 -0
- package/dist/screen-C0RCelCe.js +53 -0
- package/dist/screen.es.js +5 -0
- package/dist/scrollable-Dg_gmKLH.js +94 -0
- package/dist/scrollable.es.js +5 -0
- package/dist/styles-DofTX6nZ.js +653 -0
- package/dist/systems/harmony/alignment-container.d.ts +2 -0
- package/dist/systems/harmony/contents.d.ts +2 -0
- package/dist/systems/harmony/index.d.ts +1 -0
- package/dist/systems/harmony/input.d.ts +2 -0
- package/dist/systems/harmony/media.d.ts +2 -0
- package/dist/systems/harmony/piece.d.ts +2 -0
- package/dist/systems/harmony/reset.d.ts +2 -0
- package/dist/systems/harmony/screen.d.ts +2 -0
- package/dist/systems/harmony/scrollable.d.ts +2 -0
- package/dist/systems/index.d.ts +2 -0
- package/dist/systems/mergeSystems.d.ts +2 -0
- package/dist/systems.es.js +97 -0
- package/dist/text-E5g5oMHP.js +72 -0
- package/dist/text.es.js +6 -0
- package/dist/types/css.d.ts +6 -0
- package/dist/types/html.d.ts +5 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/utils.d.ts +20 -0
- package/dist/types.es.js +1 -0
- package/dist/utils/appendClasses.d.ts +1 -0
- package/dist/utils/excludeProperties.d.ts +1 -0
- package/dist/utils/fillObjectWithDefaults.d.ts +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/splitProps.d.ts +4 -0
- package/dist/utils/styles.d.ts +28 -0
- package/dist/utils.es.js +25 -0
- package/package.json +1 -1
package/dist/piece.es.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { u as d, i as f, j as m } from "./piece-provider-DTglah_F.js";
|
|
2
|
+
import { useMemo as u, useId as y, useInsertionEffect as S, memo as h } from "react";
|
|
3
|
+
import { S as b } from "./styles-DofTX6nZ.js";
|
|
4
|
+
import { P as g } from "./piece-CqJl-F6G.js";
|
|
5
|
+
const x = (e) => {
|
|
6
|
+
const { theme: t } = d(), { id: r, fontSize: i, fontFamily: a, containerId: l } = e, n = u(() => new b(), []), s = y();
|
|
7
|
+
return S(() => (n.apply({
|
|
8
|
+
"html,body": {
|
|
9
|
+
margin: 0,
|
|
10
|
+
padding: 0,
|
|
11
|
+
border: 0,
|
|
12
|
+
fontSize: i,
|
|
13
|
+
fontWeight: 400,
|
|
14
|
+
fontStyle: "normal",
|
|
15
|
+
fontFamily: a,
|
|
16
|
+
fontOpticalSizing: "auto",
|
|
17
|
+
overflow: e.overflow ? "auto" : "hidden"
|
|
18
|
+
},
|
|
19
|
+
[`html,body,#${l}`]: {
|
|
20
|
+
height: "100dvh",
|
|
21
|
+
width: "100dvw"
|
|
22
|
+
},
|
|
23
|
+
"*::before, *::after": {
|
|
24
|
+
boxSizing: "border-box"
|
|
25
|
+
},
|
|
26
|
+
...Array.isArray(e.globalStyle) ? e.globalStyle.reduce(
|
|
27
|
+
(c, o) => ({
|
|
28
|
+
...c,
|
|
29
|
+
...typeof o == "function" ? o(t) : o
|
|
30
|
+
}),
|
|
31
|
+
{}
|
|
32
|
+
) : typeof e.globalStyle == "function" ? e.globalStyle(t) : e.globalStyle
|
|
33
|
+
}), () => {
|
|
34
|
+
n.delete();
|
|
35
|
+
}), [n, t]), {
|
|
36
|
+
id: r || s
|
|
37
|
+
};
|
|
38
|
+
}, v = (e) => {
|
|
39
|
+
const { id: t } = x(e);
|
|
40
|
+
return /* @__PURE__ */ m.jsx(
|
|
41
|
+
g,
|
|
42
|
+
{
|
|
43
|
+
id: t,
|
|
44
|
+
as: "main",
|
|
45
|
+
kind: "screen",
|
|
46
|
+
children: e.children
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}, z = h(v, f);
|
|
50
|
+
export {
|
|
51
|
+
z as S,
|
|
52
|
+
x as u
|
|
53
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { useRef as w, useMemo as m, memo as S } from "react";
|
|
2
|
+
import { f as k } from "./fillObjectWithDefaults-AoLKqRgC.js";
|
|
3
|
+
import { u as v, i as $ } from "./piece-provider-DTglah_F.js";
|
|
4
|
+
import { u as C } from "./piece-CqJl-F6G.js";
|
|
5
|
+
const p = (o, e, n, a, s, i, t) => ({
|
|
6
|
+
scrollBehavior: e,
|
|
7
|
+
overflowX: s ? "auto" : "hidden",
|
|
8
|
+
overflowY: i ? "auto" : "hidden",
|
|
9
|
+
flexDirection: i ? "column" : "row",
|
|
10
|
+
...t ? { scrollSnapType: t } : {},
|
|
11
|
+
minHeight: 0,
|
|
12
|
+
boxSizing: "content-box",
|
|
13
|
+
transition: "all 0.3s ease-in-out",
|
|
14
|
+
display: "flex",
|
|
15
|
+
flex: "1 1 100%",
|
|
16
|
+
scrollbarWidth: o,
|
|
17
|
+
scrollbarColor: `${a} ${n}`,
|
|
18
|
+
[`@supports not (scrollbar-width: ${o})`]: {
|
|
19
|
+
"&::-webkit-scrollbar": {
|
|
20
|
+
width: "8px"
|
|
21
|
+
},
|
|
22
|
+
"&::-webkit-scrollbar-thumb": {
|
|
23
|
+
backgroundColor: n,
|
|
24
|
+
border: `1px solid ${n}`
|
|
25
|
+
},
|
|
26
|
+
"&::-webkit-scrollbar-track": {
|
|
27
|
+
boxShadow: `inset 0 0 0 ${o}px ${a}`,
|
|
28
|
+
backgroundColor: a
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}), g = (o) => {
|
|
32
|
+
const { theme: e, getContext: n } = v(), a = w(null), s = m(() => n(o), [o, n]), {
|
|
33
|
+
scrollSnap: i,
|
|
34
|
+
primary: t,
|
|
35
|
+
highlight: l,
|
|
36
|
+
horizontal: c,
|
|
37
|
+
vertical: f,
|
|
38
|
+
behavior: u,
|
|
39
|
+
withStyle: r,
|
|
40
|
+
size: b,
|
|
41
|
+
...y
|
|
42
|
+
} = k(o, s.defaults), h = m(
|
|
43
|
+
() => Array.isArray(r) ? r.reduce(
|
|
44
|
+
(x, d) => ({
|
|
45
|
+
...x,
|
|
46
|
+
...typeof d == "function" ? d(e) : d
|
|
47
|
+
}),
|
|
48
|
+
p(
|
|
49
|
+
b,
|
|
50
|
+
u,
|
|
51
|
+
typeof t == "function" ? t(e) : t,
|
|
52
|
+
typeof l == "function" ? l(e) : l,
|
|
53
|
+
c,
|
|
54
|
+
f,
|
|
55
|
+
i
|
|
56
|
+
)
|
|
57
|
+
) : {
|
|
58
|
+
...r !== void 0 && typeof r == "function" ? r(e) : r,
|
|
59
|
+
...p(
|
|
60
|
+
b,
|
|
61
|
+
u,
|
|
62
|
+
typeof t == "function" ? t(e) : t,
|
|
63
|
+
typeof l == "function" ? l(e) : l,
|
|
64
|
+
c,
|
|
65
|
+
f,
|
|
66
|
+
i
|
|
67
|
+
)
|
|
68
|
+
},
|
|
69
|
+
[
|
|
70
|
+
r,
|
|
71
|
+
e,
|
|
72
|
+
b,
|
|
73
|
+
u,
|
|
74
|
+
t,
|
|
75
|
+
l,
|
|
76
|
+
c,
|
|
77
|
+
f,
|
|
78
|
+
i
|
|
79
|
+
]
|
|
80
|
+
);
|
|
81
|
+
return C({
|
|
82
|
+
...y,
|
|
83
|
+
ref: a,
|
|
84
|
+
kind: o.kind || "scrollable",
|
|
85
|
+
withStyle: h
|
|
86
|
+
});
|
|
87
|
+
}, P = (o) => g(o).element, j = S(
|
|
88
|
+
P,
|
|
89
|
+
$
|
|
90
|
+
);
|
|
91
|
+
export {
|
|
92
|
+
j as S,
|
|
93
|
+
g as u
|
|
94
|
+
};
|