@lizzelabs/react-harmony 1.0.1 → 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/components/piece/piece.types.d.ts +3 -0
- package/dist/components.es.js +5 -5
- package/dist/index.es.js +5 -5
- package/dist/{media-BrSPl6_U.js → media-C5LK6pq4.js} +1 -1
- package/dist/media.es.js +1 -1
- package/dist/{piece-Mpz6AD6r.js → piece-CqJl-F6G.js} +40 -22
- package/dist/piece.es.js +1 -1
- package/dist/{screen-gL0zeQqb.js → screen-C0RCelCe.js} +1 -1
- package/dist/screen.es.js +1 -1
- package/dist/{scrollable-hsA1xMFz.js → scrollable-Dg_gmKLH.js} +1 -1
- package/dist/scrollable.es.js +1 -1
- package/dist/{text-BEFRS4fh.js → text-E5g5oMHP.js} +18 -16
- package/dist/text.es.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { ElementEvents, HtmlTag, NoEventsAndAria, PropWithTheme, WithStyle } from '../../types';
|
|
2
2
|
import { AriaAttributes, ComponentPropsWithoutRef, CSSProperties, ReactNode, RefObject } from 'react';
|
|
3
3
|
export type PieceAlignmentAndStyleProperties<Theme extends object | undefined> = {
|
|
4
|
+
containerType?: CSSProperties['containerType'];
|
|
5
|
+
containerName?: CSSProperties['containerName'];
|
|
6
|
+
cursor?: CSSProperties['cursor'];
|
|
4
7
|
margin?: PropWithTheme<string, Theme>;
|
|
5
8
|
padding?: PropWithTheme<string, Theme>;
|
|
6
9
|
textColor?: PropWithTheme<string, Theme>;
|
package/dist/components.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { A as r, u as a } from "./animations-B09mMqCx.js";
|
|
2
|
-
import { P as u, u as t } from "./piece-
|
|
2
|
+
import { P as u, u as t } from "./piece-CqJl-F6G.js";
|
|
3
3
|
import { P as x, u as m } from "./piece-provider-DTglah_F.js";
|
|
4
|
-
import { S as n, u as P } from "./scrollable-
|
|
5
|
-
import { S as l, u as p } from "./screen-
|
|
6
|
-
import { I as d, T, u as A } from "./text-
|
|
7
|
-
import { M as b, u as v } from "./media-
|
|
4
|
+
import { S as n, u as P } from "./scrollable-Dg_gmKLH.js";
|
|
5
|
+
import { S as l, u as p } from "./screen-C0RCelCe.js";
|
|
6
|
+
import { I as d, T, u as A } from "./text-E5g5oMHP.js";
|
|
7
|
+
import { M as b, u as v } from "./media-C5LK6pq4.js";
|
|
8
8
|
export {
|
|
9
9
|
r as Animations,
|
|
10
10
|
d as InternalText,
|
package/dist/index.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { A as r, u as a } from "./animations-B09mMqCx.js";
|
|
2
|
-
import { P as t, u as i } from "./piece-
|
|
2
|
+
import { P as t, u as i } from "./piece-CqJl-F6G.js";
|
|
3
3
|
import { P as u, u as m } from "./piece-provider-DTglah_F.js";
|
|
4
|
-
import { S as f, u as l } from "./scrollable-
|
|
5
|
-
import { S as n, u as P } from "./screen-
|
|
6
|
-
import { I as d, T as A, u as M, w as T } from "./text-
|
|
7
|
-
import { M as h, u as v } from "./media-
|
|
4
|
+
import { S as f, u as l } from "./scrollable-Dg_gmKLH.js";
|
|
5
|
+
import { S as n, u as P } from "./screen-C0RCelCe.js";
|
|
6
|
+
import { I as d, T as A, u as M, w as T } from "./text-E5g5oMHP.js";
|
|
7
|
+
import { M as h, u as v } from "./media-C5LK6pq4.js";
|
|
8
8
|
import { HARMONY_SYSTEM as y, mergeSystems as C } from "./systems.es.js";
|
|
9
9
|
import { S as O, e as Y } from "./styles-DofTX6nZ.js";
|
|
10
10
|
import { a as j, f as D } from "./fillObjectWithDefaults-AoLKqRgC.js";
|
package/dist/media.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useMemo as i, useId as b, useInsertionEffect as y, memo as
|
|
2
|
-
import { u as
|
|
1
|
+
import { useMemo as i, useId as b, useInsertionEffect as y, memo as r } from "react";
|
|
2
|
+
import { u as k, j as w, i as P } from "./piece-provider-DTglah_F.js";
|
|
3
3
|
import { a as x, f as S } from "./fillObjectWithDefaults-AoLKqRgC.js";
|
|
4
|
-
import { S as
|
|
5
|
-
const
|
|
4
|
+
import { S as N } from "./styles-DofTX6nZ.js";
|
|
5
|
+
const R = [
|
|
6
6
|
"as",
|
|
7
7
|
"kind",
|
|
8
8
|
"aria",
|
|
@@ -24,11 +24,14 @@ const I = [
|
|
|
24
24
|
"backgroundColor",
|
|
25
25
|
"background",
|
|
26
26
|
"margin",
|
|
27
|
-
"padding"
|
|
28
|
-
|
|
27
|
+
"padding",
|
|
28
|
+
"containerType",
|
|
29
|
+
"containerName",
|
|
30
|
+
"cursor"
|
|
31
|
+
], v = {
|
|
29
32
|
pickComponentProps: (e) => {
|
|
30
33
|
const n = { ...e };
|
|
31
|
-
for (const t of
|
|
34
|
+
for (const t of R)
|
|
32
35
|
delete n[t];
|
|
33
36
|
return {
|
|
34
37
|
...n,
|
|
@@ -37,7 +40,7 @@ const I = [
|
|
|
37
40
|
},
|
|
38
41
|
pickComponentStyle: (e, n) => {
|
|
39
42
|
if (n)
|
|
40
|
-
return typeof n == "function" ?
|
|
43
|
+
return typeof n == "function" ? v.pickComponentStyle(e, n(e)) : Array.isArray(n) ? n.reduce(
|
|
41
44
|
(t, a) => ({
|
|
42
45
|
...t,
|
|
43
46
|
...typeof a == "function" ? a(e) : a
|
|
@@ -146,6 +149,21 @@ const I = [
|
|
|
146
149
|
enabled: e.padding !== void 0,
|
|
147
150
|
name: "padding",
|
|
148
151
|
value: typeof e.padding == "function" ? e.padding(t) : e.padding
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
enabled: e.cursor !== void 0,
|
|
155
|
+
name: "cursor",
|
|
156
|
+
value: e.cursor
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
enabled: e.containerType !== void 0,
|
|
160
|
+
name: "containerType",
|
|
161
|
+
value: e.containerType
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
enabled: e.containerName !== void 0,
|
|
165
|
+
name: "containerName",
|
|
166
|
+
value: e.containerName
|
|
149
167
|
}
|
|
150
168
|
], m = a.some((l) => l.enabled), u = a.reduce(
|
|
151
169
|
(l, d) => ({
|
|
@@ -161,8 +179,8 @@ const I = [
|
|
|
161
179
|
...u
|
|
162
180
|
};
|
|
163
181
|
}
|
|
164
|
-
},
|
|
165
|
-
const { getContext: n, theme: t } =
|
|
182
|
+
}, I = (e) => {
|
|
183
|
+
const { getContext: n, theme: t } = k(), a = i(() => new N(), []), m = b(), u = i(() => e.kind || "piece", [e.kind]), l = i(() => e.id || m, [e.id, m]), d = i(() => `${u}-${l}`, [u, l]), c = i(
|
|
166
184
|
() => ({
|
|
167
185
|
...e,
|
|
168
186
|
kind: u,
|
|
@@ -174,13 +192,13 @@ const I = [
|
|
|
174
192
|
() => n(c),
|
|
175
193
|
[n, c]
|
|
176
194
|
), f = i(
|
|
177
|
-
() =>
|
|
195
|
+
() => v.loadPositionProps(
|
|
178
196
|
c,
|
|
179
|
-
|
|
197
|
+
v.pickComponentStyle(t, c.withStyle),
|
|
180
198
|
t
|
|
181
199
|
),
|
|
182
200
|
[c, t]
|
|
183
|
-
),
|
|
201
|
+
), s = i(
|
|
184
202
|
() => S(
|
|
185
203
|
{
|
|
186
204
|
className: `${c.className} ${o.className}`
|
|
@@ -190,9 +208,9 @@ const I = [
|
|
|
190
208
|
),
|
|
191
209
|
[o.defaults, o.className, c]
|
|
192
210
|
), g = i(
|
|
193
|
-
() =>
|
|
194
|
-
[
|
|
195
|
-
), C =
|
|
211
|
+
() => v.pickComponentProps(s),
|
|
212
|
+
[s]
|
|
213
|
+
), C = s.as || "div";
|
|
196
214
|
return y(
|
|
197
215
|
function() {
|
|
198
216
|
return o.style && a.apply(o.style, o.className), f && a.apply(f, d), () => {
|
|
@@ -208,14 +226,14 @@ const I = [
|
|
|
208
226
|
f
|
|
209
227
|
]
|
|
210
228
|
), {
|
|
211
|
-
element: /* @__PURE__ */
|
|
229
|
+
element: /* @__PURE__ */ w.jsx(C, { ...g })
|
|
212
230
|
};
|
|
213
231
|
};
|
|
214
|
-
function
|
|
215
|
-
return
|
|
232
|
+
function j(e) {
|
|
233
|
+
return I(e).element;
|
|
216
234
|
}
|
|
217
|
-
const
|
|
235
|
+
const E = r(j, P);
|
|
218
236
|
export {
|
|
219
|
-
|
|
220
|
-
|
|
237
|
+
E as P,
|
|
238
|
+
I as u
|
|
221
239
|
};
|
package/dist/piece.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { u as d, i as f, j as m } from "./piece-provider-DTglah_F.js";
|
|
2
2
|
import { useMemo as u, useId as y, useInsertionEffect as S, memo as h } from "react";
|
|
3
3
|
import { S as b } from "./styles-DofTX6nZ.js";
|
|
4
|
-
import { P as g } from "./piece-
|
|
4
|
+
import { P as g } from "./piece-CqJl-F6G.js";
|
|
5
5
|
const x = (e) => {
|
|
6
6
|
const { theme: t } = d(), { id: r, fontSize: i, fontFamily: a, containerId: l } = e, n = u(() => new b(), []), s = y();
|
|
7
7
|
return S(() => (n.apply({
|
package/dist/screen.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useRef as w, useMemo as m, memo as S } from "react";
|
|
2
2
|
import { f as k } from "./fillObjectWithDefaults-AoLKqRgC.js";
|
|
3
3
|
import { u as v, i as $ } from "./piece-provider-DTglah_F.js";
|
|
4
|
-
import { u as C } from "./piece-
|
|
4
|
+
import { u as C } from "./piece-CqJl-F6G.js";
|
|
5
5
|
const p = (o, e, n, a, s, i, t) => ({
|
|
6
6
|
scrollBehavior: e,
|
|
7
7
|
overflowX: s ? "auto" : "hidden",
|
package/dist/scrollable.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { memo as
|
|
2
|
-
import { u
|
|
3
|
-
import { j as
|
|
1
|
+
import { memo as l } from "react";
|
|
2
|
+
import { u, P as d } from "./piece-CqJl-F6G.js";
|
|
3
|
+
import { j as a, i as f } from "./piece-provider-DTglah_F.js";
|
|
4
4
|
import "./animations-B09mMqCx.js";
|
|
5
5
|
import { splitProps as x } from "./utils.es.js";
|
|
6
|
-
import "./scrollable-
|
|
7
|
-
import "./screen-
|
|
8
|
-
import "./media-
|
|
6
|
+
import "./scrollable-Dg_gmKLH.js";
|
|
7
|
+
import "./screen-C0RCelCe.js";
|
|
8
|
+
import "./media-C5LK6pq4.js";
|
|
9
9
|
const h = (t) => {
|
|
10
10
|
const { as: n, children: o, kind: e, ...i } = t;
|
|
11
|
-
return
|
|
11
|
+
return u({
|
|
12
12
|
...i,
|
|
13
13
|
kind: e || "text",
|
|
14
14
|
as: n,
|
|
@@ -34,23 +34,23 @@ function w(t, n = {}) {
|
|
|
34
34
|
"width",
|
|
35
35
|
"margin",
|
|
36
36
|
"padding"
|
|
37
|
-
], { known:
|
|
37
|
+
], { known: c, unknown: r } = x(
|
|
38
38
|
e,
|
|
39
39
|
i
|
|
40
|
-
), { injectContainerProps:
|
|
40
|
+
), { injectContainerProps: p, ...s } = n, m = {
|
|
41
41
|
...s,
|
|
42
|
-
...
|
|
42
|
+
...c
|
|
43
43
|
};
|
|
44
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ a.jsx(
|
|
45
45
|
d,
|
|
46
46
|
{
|
|
47
47
|
kind: "alignment-container",
|
|
48
|
-
...
|
|
49
|
-
children: /* @__PURE__ */
|
|
48
|
+
...m,
|
|
49
|
+
children: /* @__PURE__ */ a.jsx(
|
|
50
50
|
t,
|
|
51
51
|
{
|
|
52
52
|
...r,
|
|
53
|
-
...
|
|
53
|
+
...p ? s : {},
|
|
54
54
|
children: r?.children
|
|
55
55
|
}
|
|
56
56
|
)
|
|
@@ -58,8 +58,10 @@ function w(t, n = {}) {
|
|
|
58
58
|
);
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
const P = (t) => h(t).element, E =
|
|
62
|
-
w(P
|
|
61
|
+
const P = (t) => h(t).element, E = l(
|
|
62
|
+
w(P, {
|
|
63
|
+
withStyle: { display: "flex", flex: "1 1 auto" }
|
|
64
|
+
}),
|
|
63
65
|
f
|
|
64
66
|
);
|
|
65
67
|
export {
|
package/dist/text.es.js
CHANGED