@pittorica/stack-react 0.22.4 → 0.23.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/dist/index.js +90 -98
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,125 +1,117 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
function
|
|
3
|
-
var a,
|
|
4
|
-
if (typeof
|
|
5
|
-
else if (typeof
|
|
6
|
-
var
|
|
7
|
-
for (a = 0; a <
|
|
8
|
-
} else for (
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
function x(i) {
|
|
3
|
+
var a, t, r = "";
|
|
4
|
+
if (typeof i == "string" || typeof i == "number") r += i;
|
|
5
|
+
else if (typeof i == "object") if (Array.isArray(i)) {
|
|
6
|
+
var o = i.length;
|
|
7
|
+
for (a = 0; a < o; a++) i[a] && (t = x(i[a])) && (r && (r += " "), r += t);
|
|
8
|
+
} else for (t in i) i[t] && (r && (r += " "), r += t);
|
|
9
9
|
return r;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
for (var
|
|
11
|
+
function q() {
|
|
12
|
+
for (var i, a, t = 0, r = "", o = arguments.length; t < o; t++) (i = arguments[t]) && (a = x(i)) && (r && (r += " "), r += a);
|
|
13
13
|
return r;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
var a,
|
|
17
|
-
if (typeof
|
|
18
|
-
else if (typeof
|
|
19
|
-
var
|
|
20
|
-
for (a = 0; a <
|
|
21
|
-
} else for (
|
|
15
|
+
function j(i) {
|
|
16
|
+
var a, t, r = "";
|
|
17
|
+
if (typeof i == "string" || typeof i == "number") r += i;
|
|
18
|
+
else if (typeof i == "object") if (Array.isArray(i)) {
|
|
19
|
+
var o = i.length;
|
|
20
|
+
for (a = 0; a < o; a++) i[a] && (t = j(i[a])) && (r && (r += " "), r += t);
|
|
21
|
+
} else for (t in i) i[t] && (r && (r += " "), r += t);
|
|
22
22
|
return r;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
for (var
|
|
24
|
+
function z() {
|
|
25
|
+
for (var i, a, t = 0, r = "", o = arguments.length; t < o; t++) (i = arguments[t]) && (a = j(i)) && (r && (r += " "), r += a);
|
|
26
26
|
return r;
|
|
27
27
|
}
|
|
28
|
-
const
|
|
29
|
-
ref:
|
|
28
|
+
const N = ({
|
|
29
|
+
ref: i,
|
|
30
30
|
as: a = "div",
|
|
31
|
-
children:
|
|
31
|
+
children: t,
|
|
32
32
|
display: r,
|
|
33
|
-
m:
|
|
34
|
-
mt:
|
|
35
|
-
mr:
|
|
36
|
-
mb:
|
|
37
|
-
ml:
|
|
38
|
-
p:
|
|
39
|
-
pt:
|
|
40
|
-
pr:
|
|
41
|
-
pb:
|
|
42
|
-
pl:
|
|
43
|
-
width:
|
|
44
|
-
height:
|
|
45
|
-
position:
|
|
33
|
+
m: o,
|
|
34
|
+
mt: l,
|
|
35
|
+
mr: n,
|
|
36
|
+
mb: f,
|
|
37
|
+
ml: p,
|
|
38
|
+
p: g,
|
|
39
|
+
pt: m,
|
|
40
|
+
pr: s,
|
|
41
|
+
pb: y,
|
|
42
|
+
pl: h,
|
|
43
|
+
width: v,
|
|
44
|
+
height: $,
|
|
45
|
+
position: b,
|
|
46
46
|
style: w,
|
|
47
|
-
className:
|
|
48
|
-
href:
|
|
49
|
-
target:
|
|
50
|
-
rel:
|
|
51
|
-
htmlFor:
|
|
52
|
-
type:
|
|
53
|
-
disabled:
|
|
54
|
-
...
|
|
47
|
+
className: A,
|
|
48
|
+
href: B,
|
|
49
|
+
target: F,
|
|
50
|
+
rel: L,
|
|
51
|
+
htmlFor: O,
|
|
52
|
+
type: R,
|
|
53
|
+
disabled: S,
|
|
54
|
+
...T
|
|
55
55
|
}) => {
|
|
56
|
-
const
|
|
57
|
-
r && (
|
|
58
|
-
const
|
|
56
|
+
const e = {};
|
|
57
|
+
r && (e.display = r), v && (e.width = v), $ && (e.height = $), b && (e.position = b), o && (e.margin = `var(--pittorica-space-${o})`), l && (e.marginTop = `var(--pittorica-space-${l})`), n && (e.marginRight = `var(--pittorica-space-${n})`), f && (e.marginBottom = `var(--pittorica-space-${f})`), p && (e.marginLeft = `var(--pittorica-space-${p})`), g && (e.padding = `var(--pittorica-space-${g})`), m && (e.paddingTop = `var(--pittorica-space-${m})`), s && (e.paddingRight = `var(--pittorica-space-${s})`), y && (e.paddingBottom = `var(--pittorica-space-${y})`), h && (e.paddingLeft = `var(--pittorica-space-${h})`);
|
|
58
|
+
const k = {
|
|
59
59
|
...w,
|
|
60
|
-
...
|
|
60
|
+
...e
|
|
61
61
|
};
|
|
62
|
-
return /* @__PURE__ */
|
|
62
|
+
return /* @__PURE__ */ u(
|
|
63
63
|
a,
|
|
64
64
|
{
|
|
65
|
-
ref:
|
|
66
|
-
className:
|
|
67
|
-
style:
|
|
68
|
-
href:
|
|
69
|
-
target:
|
|
70
|
-
rel:
|
|
71
|
-
htmlFor:
|
|
72
|
-
type:
|
|
73
|
-
disabled:
|
|
74
|
-
...
|
|
75
|
-
children:
|
|
65
|
+
ref: i,
|
|
66
|
+
className: z("pittorica-box", A),
|
|
67
|
+
style: k,
|
|
68
|
+
href: B,
|
|
69
|
+
target: F,
|
|
70
|
+
rel: L,
|
|
71
|
+
htmlFor: O,
|
|
72
|
+
type: R,
|
|
73
|
+
disabled: S,
|
|
74
|
+
...T,
|
|
75
|
+
children: t
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
78
|
};
|
|
79
|
-
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
end: "flex-end",
|
|
91
|
-
baseline: "baseline",
|
|
92
|
-
stretch: "stretch"
|
|
93
|
-
}, I = ({
|
|
94
|
-
children: t,
|
|
95
|
-
direction: a = "row",
|
|
96
|
-
align: e,
|
|
79
|
+
N.displayName = "Box";
|
|
80
|
+
const d = (i) => typeof i == "string" && i.startsWith("auto-");
|
|
81
|
+
function c(i, a) {
|
|
82
|
+
return !a || d(a) ? [] : typeof a == "string" ? [`pittorica-flex--${i}-${a}`] : Object.entries(a).filter(([, t]) => t !== void 0 && !d(t)).map(
|
|
83
|
+
([t, r]) => t === "initial" ? `pittorica-flex--${i}-${r}` : `pittorica-flex--${t}-${i}-${r}`
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
const W = ({
|
|
87
|
+
children: i,
|
|
88
|
+
direction: a,
|
|
89
|
+
align: t,
|
|
97
90
|
justify: r,
|
|
98
|
-
wrap:
|
|
99
|
-
gap:
|
|
91
|
+
wrap: o,
|
|
92
|
+
gap: l,
|
|
93
|
+
basis: n,
|
|
94
|
+
className: f,
|
|
100
95
|
style: p,
|
|
101
|
-
|
|
102
|
-
...s
|
|
96
|
+
...g
|
|
103
97
|
}) => {
|
|
104
|
-
const
|
|
105
|
-
...
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
return /* @__PURE__ */ f(
|
|
114
|
-
$,
|
|
98
|
+
const m = [
|
|
99
|
+
...c("direction", a),
|
|
100
|
+
...c("align", t),
|
|
101
|
+
...c("justify", r),
|
|
102
|
+
...c("wrap", o),
|
|
103
|
+
...c("gap", l)
|
|
104
|
+
], s = { ...p };
|
|
105
|
+
return d(n) && (s["--pittorica-flex-basis"] = n.split("-")[1]), /* @__PURE__ */ u(
|
|
106
|
+
N,
|
|
115
107
|
{
|
|
116
|
-
className:
|
|
117
|
-
style:
|
|
118
|
-
...
|
|
119
|
-
children:
|
|
108
|
+
className: q("pittorica-flex", m, f),
|
|
109
|
+
style: { ...p, ...s },
|
|
110
|
+
...g,
|
|
111
|
+
children: i
|
|
120
112
|
}
|
|
121
113
|
);
|
|
122
|
-
},
|
|
114
|
+
}, D = (i) => /* @__PURE__ */ u(W, { direction: "column", ...i });
|
|
123
115
|
export {
|
|
124
|
-
|
|
116
|
+
D as Stack
|
|
125
117
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pittorica/stack-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@pittorica/flex-react": "0.
|
|
12
|
+
"@pittorica/flex-react": "0.23.1"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@testing-library/jest-dom": "^6.9.1",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"typescript": "^5.0.0",
|
|
22
22
|
"vite": "^5.0.0",
|
|
23
23
|
"vitest": "^2.1.9",
|
|
24
|
-
"@pittorica/box-react": "0.
|
|
25
|
-
"pittorica": "0.
|
|
26
|
-
"
|
|
24
|
+
"@pittorica/box-react": "0.23.1",
|
|
25
|
+
"@pittorica/theme-react": "0.23.1",
|
|
26
|
+
"pittorica": "0.23.1"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"react": ">=19",
|