@zuzjs/ui 0.10.0 → 0.10.2
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/cjs/comps/Group/index.d.ts +1 -0
- package/dist/cjs/comps/Group/index.js +8 -2
- package/dist/cjs/funs/stylesheet.js +3 -0
- package/dist/esm/comps/Group/index.d.ts +1 -0
- package/dist/esm/comps/Group/index.js +8 -2
- package/dist/esm/funs/stylesheet.js +3 -0
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -15
|
@@ -4,12 +4,18 @@ import { useDelayed } from "../..";
|
|
|
4
4
|
import { addPropsToChildren } from "../../funs";
|
|
5
5
|
import Box from "../Box";
|
|
6
6
|
const Group = forwardRef((props, ref) => {
|
|
7
|
-
const { children, fx, fxDelay, fxStep, ...rest } = props;
|
|
7
|
+
const { children, fx, fxDelay, fxStep, classToIgnore, ...rest } = props;
|
|
8
8
|
const when = useDelayed();
|
|
9
9
|
const Children = useMemo(() => {
|
|
10
10
|
if (!fx)
|
|
11
11
|
return children;
|
|
12
|
-
return addPropsToChildren(children, child =>
|
|
12
|
+
return addPropsToChildren(children, child => {
|
|
13
|
+
const props = child.props || {};
|
|
14
|
+
const hasFxProp = 'fx' in props;
|
|
15
|
+
const className = props.as ? Array.isArray(props.as) ? props.as.join(` `) : props.as : props.className || '';
|
|
16
|
+
const hasIgnoreClass = typeof className === 'string' && className.includes(classToIgnore || `--ignore`);
|
|
17
|
+
return !hasFxProp && !hasIgnoreClass;
|
|
18
|
+
}, index => ({ fx: {
|
|
13
19
|
...fx,
|
|
14
20
|
delay: (fxDelay || 0) + index * (fxStep || .1), // how to increment per index ?
|
|
15
21
|
when
|
|
@@ -343,6 +343,9 @@ export const cssDirect = {
|
|
|
343
343
|
"text-wrap": "width: 98%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;",
|
|
344
344
|
"text-clip": "color: transparent;background-clip: text;-webkit-background-clip: text;",
|
|
345
345
|
"word-break": "wordc-break: break-word;",
|
|
346
|
+
"uppercase": "text-transform: uppercase;",
|
|
347
|
+
"lowercase": "text-transform: lowercase;",
|
|
348
|
+
"capitalize": "text-transform: capitalize;",
|
|
346
349
|
};
|
|
347
350
|
export const cssPropsWithColor = [
|
|
348
351
|
// Regular CSS keys
|
|
@@ -4,12 +4,18 @@ import { useDelayed } from "../..";
|
|
|
4
4
|
import { addPropsToChildren } from "../../funs";
|
|
5
5
|
import Box from "../Box";
|
|
6
6
|
const Group = forwardRef((props, ref) => {
|
|
7
|
-
const { children, fx, fxDelay, fxStep, ...rest } = props;
|
|
7
|
+
const { children, fx, fxDelay, fxStep, classToIgnore, ...rest } = props;
|
|
8
8
|
const when = useDelayed();
|
|
9
9
|
const Children = useMemo(() => {
|
|
10
10
|
if (!fx)
|
|
11
11
|
return children;
|
|
12
|
-
return addPropsToChildren(children, child =>
|
|
12
|
+
return addPropsToChildren(children, child => {
|
|
13
|
+
const props = child.props || {};
|
|
14
|
+
const hasFxProp = 'fx' in props;
|
|
15
|
+
const className = props.as ? Array.isArray(props.as) ? props.as.join(` `) : props.as : props.className || '';
|
|
16
|
+
const hasIgnoreClass = typeof className === 'string' && className.includes(classToIgnore || `--ignore`);
|
|
17
|
+
return !hasFxProp && !hasIgnoreClass;
|
|
18
|
+
}, index => ({ fx: {
|
|
13
19
|
...fx,
|
|
14
20
|
delay: (fxDelay || 0) + index * (fxStep || .1), // how to increment per index ?
|
|
15
21
|
when
|
|
@@ -343,6 +343,9 @@ export const cssDirect = {
|
|
|
343
343
|
"text-wrap": "width: 98%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;",
|
|
344
344
|
"text-clip": "color: transparent;background-clip: text;-webkit-background-clip: text;",
|
|
345
345
|
"word-break": "wordc-break: break-word;",
|
|
346
|
+
"uppercase": "text-transform: uppercase;",
|
|
347
|
+
"lowercase": "text-transform: lowercase;",
|
|
348
|
+
"capitalize": "text-transform: capitalize;",
|
|
346
349
|
};
|
|
347
350
|
export const cssPropsWithColor = [
|
|
348
351
|
// Regular CSS keys
|