@versini/ui-system 1.2.1 → 1.3.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/chunks/FlexgridContext.W67Qim_P.js +8 -0
- package/dist/chunks/constants.Gcd2KXZh.js +7 -0
- package/dist/components/Flexgrid/Flexgrid.js +23 -22
- package/dist/components/Flexgrid/FlexgridItem.js +4 -3
- package/dist/components/ThemeProvider/ThemeProvider.js +18 -15
- package/dist/index.d.ts +5 -1
- package/dist/index.js +3 -3
- package/package.json +3 -3
- package/dist/chunks/FlexgridContext.DVgU6-jM.js +0 -11
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { FLEXGRID_CLASSNAME as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import p from "clsx";
|
|
3
|
+
import { FLEXGRID_CLASSNAME as u, FLEXGRID_GAP_RATIO as e } from "../../chunks/constants.Gcd2KXZh.js";
|
|
4
|
+
import { FlexgridContext as A } from "../../chunks/FlexgridContext.W67Qim_P.js";
|
|
5
|
+
const R = ({
|
|
6
|
+
children: i,
|
|
7
|
+
className: m,
|
|
7
8
|
columnGap: r = 1,
|
|
8
|
-
rowGap:
|
|
9
|
-
height:
|
|
10
|
-
width:
|
|
11
|
-
direction:
|
|
9
|
+
rowGap: o = 0,
|
|
10
|
+
height: s = "auto",
|
|
11
|
+
width: l = "auto",
|
|
12
|
+
direction: n = "row",
|
|
12
13
|
alignHorizontal: a = "normal",
|
|
13
14
|
alignVertical: x = "normal",
|
|
14
15
|
...f
|
|
15
16
|
}) => {
|
|
16
17
|
const c = {
|
|
17
|
-
flexDirection:
|
|
18
|
+
flexDirection: n,
|
|
18
19
|
justifyContent: a,
|
|
19
20
|
alignItems: x,
|
|
20
|
-
height:
|
|
21
|
-
width:
|
|
21
|
+
height: s,
|
|
22
|
+
width: l,
|
|
22
23
|
/**
|
|
23
24
|
* Trick to account for the extra space taken
|
|
24
25
|
* by the columnGap and rowGap that will be applied
|
|
25
26
|
* to all FlexgridItems (see context and paddings).
|
|
26
27
|
*/
|
|
27
|
-
marginLeft: r * -1 *
|
|
28
|
-
marginTop:
|
|
29
|
-
}, d =
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
marginLeft: r * -1 * e + "rem",
|
|
29
|
+
marginTop: o * -1 * e + "rem"
|
|
30
|
+
}, d = p(
|
|
31
|
+
m,
|
|
32
|
+
u,
|
|
32
33
|
"box-border flex flex-wrap"
|
|
33
|
-
), g = { columnGap: r, rowGap:
|
|
34
|
-
return /* @__PURE__ */
|
|
34
|
+
), g = { columnGap: r, rowGap: o };
|
|
35
|
+
return /* @__PURE__ */ t("div", { className: d, style: c, ...f, children: /* @__PURE__ */ t(A.Provider, { value: g, children: i }) });
|
|
35
36
|
};
|
|
36
37
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
R as Flexgrid,
|
|
39
|
+
R as default
|
|
39
40
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as I } from "react/jsx-runtime";
|
|
2
2
|
import { useContext as F } from "react";
|
|
3
|
-
import { FLEXGRID_ITEM_CLASSNAME as g,
|
|
3
|
+
import { FLEXGRID_ITEM_CLASSNAME as g, FLEXGRID_GAP_RATIO as u } from "../../chunks/constants.Gcd2KXZh.js";
|
|
4
|
+
import { FlexgridContext as G } from "../../chunks/FlexgridContext.W67Qim_P.js";
|
|
4
5
|
import m from "clsx";
|
|
5
6
|
const i = (l, s) => m({
|
|
6
7
|
"basis-1/12": l === 1 && !s,
|
|
@@ -98,7 +99,7 @@ const i = (l, s) => m({
|
|
|
98
99
|
f
|
|
99
100
|
);
|
|
100
101
|
}
|
|
101
|
-
},
|
|
102
|
+
}, j = ({
|
|
102
103
|
children: l,
|
|
103
104
|
className: s,
|
|
104
105
|
span: f,
|
|
@@ -114,5 +115,5 @@ const i = (l, s) => m({
|
|
|
114
115
|
return /* @__PURE__ */ I("div", { className: C, style: c, ...x, children: l });
|
|
115
116
|
};
|
|
116
117
|
export {
|
|
117
|
-
|
|
118
|
+
j as FlexgridItem
|
|
118
119
|
};
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import u from "clsx";
|
|
3
|
+
import { useRef as E, useEffect as l } from "react";
|
|
4
|
+
import { THEMEPROVIDER_CLASSNAME as y } from "../../chunks/constants.Gcd2KXZh.js";
|
|
5
|
+
const P = ({
|
|
6
|
+
customTheme: r,
|
|
7
|
+
children: o,
|
|
8
|
+
global: e,
|
|
9
|
+
className: f
|
|
7
10
|
}) => {
|
|
8
|
-
const t =
|
|
9
|
-
return
|
|
10
|
-
var
|
|
11
|
-
const
|
|
12
|
-
if (!(!
|
|
13
|
-
for (const [
|
|
14
|
-
|
|
15
|
-
}, [
|
|
11
|
+
const t = E(null), c = u(y, "contents", f);
|
|
12
|
+
return l(() => {
|
|
13
|
+
var n;
|
|
14
|
+
const s = e ? document.documentElement.style : (n = t == null ? void 0 : t.current) == null ? void 0 : n.style;
|
|
15
|
+
if (!(!s || !r))
|
|
16
|
+
for (const [p, i] of Object.entries(r))
|
|
17
|
+
s.setProperty(p, i);
|
|
18
|
+
}, [r, e]), r || !e ? /* @__PURE__ */ m("div", { ref: t, className: c, children: o }) : o;
|
|
16
19
|
};
|
|
17
20
|
export {
|
|
18
|
-
|
|
21
|
+
P as ThemeProvider
|
|
19
22
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -109,6 +109,10 @@ type ThemeProviderProps = {
|
|
|
109
109
|
* The children to render.
|
|
110
110
|
*/
|
|
111
111
|
children: React.ReactNode;
|
|
112
|
+
/**
|
|
113
|
+
* CSS class(es) to add to the main component wrapper.
|
|
114
|
+
*/
|
|
115
|
+
className?: string;
|
|
112
116
|
/**
|
|
113
117
|
* An object specifying custom properties impacting the base theme.
|
|
114
118
|
* Not all custom properties need to be specified.
|
|
@@ -128,6 +132,6 @@ type ThemeProviderProps = {
|
|
|
128
132
|
global?: boolean;
|
|
129
133
|
};
|
|
130
134
|
|
|
131
|
-
declare const ThemeProvider: ({ customTheme, children, global, }: ThemeProviderProps) => string | number | boolean | Iterable<react.ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
135
|
+
declare const ThemeProvider: ({ customTheme, children, global, className, }: ThemeProviderProps) => string | number | boolean | Iterable<react.ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
132
136
|
|
|
133
137
|
export { Flexgrid, FlexgridItem, ThemeProvider };
|
package/dist/index.js
CHANGED
|
@@ -2,13 +2,13 @@ import { Flexgrid as i } from "./components/Flexgrid/Flexgrid.js";
|
|
|
2
2
|
import { FlexgridItem as t } from "./components/Flexgrid/FlexgridItem.js";
|
|
3
3
|
import { ThemeProvider as I } from "./components/ThemeProvider/ThemeProvider.js";
|
|
4
4
|
/*!
|
|
5
|
-
@versini/ui-system v1.
|
|
5
|
+
@versini/ui-system v1.3.0
|
|
6
6
|
© 2024 gizmette.com
|
|
7
7
|
*/
|
|
8
8
|
try {
|
|
9
9
|
window.__VERSINI_UI_SYSTEM__ || (window.__VERSINI_UI_SYSTEM__ = {
|
|
10
|
-
version: "1.
|
|
11
|
-
buildTime: "
|
|
10
|
+
version: "1.3.0",
|
|
11
|
+
buildTime: "04/06/2024 02:17 PM EDT",
|
|
12
12
|
homepage: "https://github.com/aversini/ui-components",
|
|
13
13
|
license: "MIT"
|
|
14
14
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-system",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"react-dom": "^18.2.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@versini/ui-components": "5.
|
|
45
|
+
"@versini/ui-components": "5.12.0",
|
|
46
46
|
"@versini/ui-styles": "1.6.1",
|
|
47
47
|
"react": "18.2.0",
|
|
48
48
|
"react-dom": "18.2.0"
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"sideEffects": [
|
|
55
55
|
"**/*.css"
|
|
56
56
|
],
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "2ee026b7b3a150ebfd4e8d3827f9a81d7a9e096b"
|
|
58
58
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import t from "react";
|
|
2
|
-
const e = "av-flexgrid", r = "av-flexgrid-item", c = 0.25, n = t.createContext({
|
|
3
|
-
columnGap: 0,
|
|
4
|
-
rowGap: 0
|
|
5
|
-
});
|
|
6
|
-
export {
|
|
7
|
-
e as FLEXGRID_CLASSNAME,
|
|
8
|
-
c as FLEXGRID_GAP_RATIO,
|
|
9
|
-
r as FLEXGRID_ITEM_CLASSNAME,
|
|
10
|
-
n as FlexgridContext
|
|
11
|
-
};
|