@cronocode/react-box 1.3.4 → 1.3.6
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/baseSvg.module.css.mjs +1 -1
- package/box.d.ts +5 -1
- package/box.mjs +51 -17
- package/box.module.css.mjs +1 -1
- package/components/flex.mjs +7 -6
- package/package.json +1 -1
- package/style.css +1 -1
- package/theme.mjs +9 -10
- package/types.d.ts +4 -0
- package/components/flex.d.ts +0 -17
package/theme.mjs
CHANGED
|
@@ -45,31 +45,30 @@ const r = {
|
|
|
45
45
|
let n = r;
|
|
46
46
|
var u;
|
|
47
47
|
((d) => {
|
|
48
|
-
function
|
|
49
|
-
n = t,
|
|
48
|
+
function i(t) {
|
|
49
|
+
n = t, o();
|
|
50
50
|
}
|
|
51
|
-
d.setup =
|
|
52
|
-
function
|
|
51
|
+
d.setup = i;
|
|
52
|
+
function o() {
|
|
53
53
|
Object.keys(r).forEach((s) => {
|
|
54
|
-
console.log(s);
|
|
55
54
|
const e = n[s], l = r[s];
|
|
56
|
-
e ? (e.styles = { ...l.styles, ...e.styles },
|
|
55
|
+
e ? (e.styles = { ...l.styles, ...e.styles }, e.disabled && l.disabled && (e.disabled = { ...l.disabled, ...e.disabled })) : n[s] = r[s];
|
|
57
56
|
});
|
|
58
57
|
}
|
|
59
58
|
})(u || (u = {}));
|
|
60
59
|
const m = u;
|
|
61
60
|
function p(d) {
|
|
62
|
-
const { clean:
|
|
61
|
+
const { clean: i, disabled: o, theme: t, component: s } = d;
|
|
63
62
|
return y(() => {
|
|
64
63
|
var a, b, c;
|
|
65
|
-
if (
|
|
64
|
+
if (i)
|
|
66
65
|
return {};
|
|
67
66
|
let e = n[s] ?? ((a = n.components) == null ? void 0 : a[s]);
|
|
68
67
|
if (!e)
|
|
69
68
|
return {};
|
|
70
69
|
let l = t ? { ...e.styles, ...(b = e.themes) == null ? void 0 : b[t].styles } : e.styles;
|
|
71
|
-
return
|
|
72
|
-
}, [s,
|
|
70
|
+
return o ? t ? { ...l, ...e.disabled, ...(c = e.themes) == null ? void 0 : c[t].disabled } : { ...l, ...e.disabled } : l;
|
|
71
|
+
}, [s, i, o, t]);
|
|
73
72
|
}
|
|
74
73
|
export {
|
|
75
74
|
m as default,
|
package/types.d.ts
CHANGED
|
@@ -195,10 +195,14 @@ interface BoxText {
|
|
|
195
195
|
interface BoxFlex {
|
|
196
196
|
flexWrap?: (typeof styleVariables.flexWrap)[number];
|
|
197
197
|
justifyContent?: (typeof styleVariables.justifyContent)[number];
|
|
198
|
+
jc?: (typeof styleVariables.justifyContent)[number];
|
|
198
199
|
alignItems?: (typeof styleVariables.alignItems)[number];
|
|
200
|
+
ai?: (typeof styleVariables.alignItems)[number];
|
|
199
201
|
alignContent?: (typeof styleVariables.alignContent)[number];
|
|
202
|
+
ac?: (typeof styleVariables.alignContent)[number];
|
|
200
203
|
flex1?: boolean;
|
|
201
204
|
flexDirection?: (typeof styleVariables.flexDirection)[number];
|
|
205
|
+
d?: (typeof styleVariables.flexDirection)[number];
|
|
202
206
|
gap?: GapType;
|
|
203
207
|
rowGap?: GapType;
|
|
204
208
|
columnGap?: GapType;
|
package/components/flex.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import Box from '../box';
|
|
2
|
-
import { Activated, Focused, Hovered } from '../types';
|
|
3
|
-
type BoxProps = React.ComponentProps<typeof Box>;
|
|
4
|
-
interface FlexStylesShortCuts {
|
|
5
|
-
wrap?: BoxProps['flexWrap'];
|
|
6
|
-
jc?: BoxProps['justifyContent'];
|
|
7
|
-
ai?: BoxProps['alignItems'];
|
|
8
|
-
ac?: BoxProps['alignContent'];
|
|
9
|
-
d?: BoxProps['flexDirection'];
|
|
10
|
-
grow?: BoxProps['flexGrow'];
|
|
11
|
-
shrink?: BoxProps['flexShrink'];
|
|
12
|
-
as?: BoxProps['alignSelf'];
|
|
13
|
-
js?: BoxProps['justifySelf'];
|
|
14
|
-
}
|
|
15
|
-
type Props = BoxProps & FlexStylesShortCuts & Hovered<FlexStylesShortCuts> & Focused<FlexStylesShortCuts> & Activated<FlexStylesShortCuts>;
|
|
16
|
-
export default function Flex(props: Props): JSX.Element;
|
|
17
|
-
export {};
|